diff options
author | Michael Mann <mmann78@netscape.net> | 2017-10-29 14:29:27 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-10-29 20:17:03 +0000 |
commit | 63966ec5d5b65cde2297f1f7417d288f884a80b2 (patch) | |
tree | 95833a554ec62bac1981ecc6d9a63bd047c735d2 /ui | |
parent | 765a67b68af28a6dbbb5c79d350896efbaa7adf4 (diff) |
Use endpoint_type in conversation tables and hostlists
Follow up to having conversions use endpoint_type instead of
port_type.
Change-Id: Ifd59a33bd8b9a013c242bce5fcceb09533f02c17
Reviewed-on: https://code.wireshark.org/review/24172
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/cli/tap-endpoints.c | 2 | ||||
-rw-r--r-- | ui/cli/tap-iousers.c | 4 | ||||
-rw-r--r-- | ui/gtk/conversations_table.c | 14 | ||||
-rw-r--r-- | ui/gtk/hostlist_table.c | 4 | ||||
-rw-r--r-- | ui/qt/conversation_dialog.cpp | 18 | ||||
-rw-r--r-- | ui/qt/endpoint_dialog.cpp | 2 |
6 files changed, 22 insertions, 22 deletions
diff --git a/ui/cli/tap-endpoints.c b/ui/cli/tap-endpoints.c index 5e261bd29b..c99ba7d1d0 100644 --- a/ui/cli/tap-endpoints.c +++ b/ui/cli/tap-endpoints.c @@ -81,7 +81,7 @@ endpoints_draw(void *arg) conversation_str = get_conversation_address(NULL, &host->myaddress, TRUE); if (display_port) { /* XXX - TODO: make port resolution configurable (through gbl_resolv_flags?) */ - port_str = get_conversation_port(NULL, host->port, host->ptype, TRUE); + port_str = get_conversation_port(NULL, host->port, host->etype, TRUE); printf("%-20s %5s %6" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER "u %6" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER "u %6" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER "u \n", diff --git a/ui/cli/tap-iousers.c b/ui/cli/tap-iousers.c index 129b56e580..3fc22060f6 100644 --- a/ui/cli/tap-iousers.c +++ b/ui/cli/tap-iousers.c @@ -105,8 +105,8 @@ iousers_draw(void *arg) dst_addr = get_conversation_address(NULL, &iui->dst_address, TRUE); if (display_ports) { char *src, *dst, *src_port, *dst_port; - src_port = get_conversation_port(NULL, iui->src_port, iui->ptype, TRUE); - dst_port = get_conversation_port(NULL, iui->dst_port, iui->ptype, TRUE); + src_port = get_conversation_port(NULL, iui->src_port, iui->etype, TRUE); + dst_port = get_conversation_port(NULL, iui->dst_port, iui->etype, TRUE); src = wmem_strconcat(NULL, src_addr, ":", src_port, NULL); dst = wmem_strconcat(NULL, dst_addr, ":", dst_port, NULL); printf("%-26s <-> %-26s %6" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER diff --git a/ui/gtk/conversations_table.c b/ui/gtk/conversations_table.c index 044be7a133..f6acef1a8f 100644 --- a/ui/gtk/conversations_table.c +++ b/ui/gtk/conversations_table.c @@ -1600,8 +1600,8 @@ draw_ct_table_addresses(conversations_table *ct) conv_item = &g_array_index(ct->hash.conv_array, conv_item_t, idx); src_addr = get_conversation_address(NULL, &conv_item->src_address, ct->resolve_names); dst_addr = get_conversation_address(NULL, &conv_item->dst_address, ct->resolve_names); - src_port = get_conversation_port(NULL, conv_item->src_port, conv_item->ptype, ct->resolve_names); - dst_port = get_conversation_port(NULL, conv_item->dst_port, conv_item->ptype, ct->resolve_names); + src_port = get_conversation_port(NULL, conv_item->src_port, conv_item->etype, ct->resolve_names); + dst_port = get_conversation_port(NULL, conv_item->dst_port, conv_item->etype, ct->resolve_names); gtk_list_store_set (store, &iter, CONV_COLUMN_SRC_ADDR, src_addr, CONV_COLUMN_SRC_PORT, src_port, @@ -1721,8 +1721,8 @@ draw_ct_table_data(conversations_table *ct) src_addr = get_conversation_address(NULL, &conv_item->src_address, ct->resolve_names); dst_addr = get_conversation_address(NULL, &conv_item->dst_address, ct->resolve_names); - src_port = get_conversation_port(NULL, conv_item->src_port, conv_item->ptype, ct->resolve_names); - dst_port = get_conversation_port(NULL, conv_item->dst_port, conv_item->ptype, ct->resolve_names); + src_port = get_conversation_port(NULL, conv_item->src_port, conv_item->etype, ct->resolve_names); + dst_port = get_conversation_port(NULL, conv_item->dst_port, conv_item->etype, ct->resolve_names); /* New row. All entries, including fixed ones */ gtk_list_store_insert_with_values(store, &iter, G_MAXINT, CONV_COLUMN_SRC_ADDR, src_addr, @@ -2150,11 +2150,11 @@ follow_stream_cb(GtkWidget *follow_stream_bt, gpointer data _U_) /* Generate and apply a display filter to isolate the conversation. */ - switch (conv->ptype) { - case PT_TCP: + switch (conv->etype) { + case ENDPOINT_TCP: filter = g_strdup_printf("tcp.stream eq %d", conv->conv_id); break; - case PT_UDP: + case ENDPOINT_UDP: filter = g_strdup_printf("udp.stream eq %d", conv->conv_id); break; default: diff --git a/ui/gtk/hostlist_table.c b/ui/gtk/hostlist_table.c index 9fc09f9989..25aa75e99e 100644 --- a/ui/gtk/hostlist_table.c +++ b/ui/gtk/hostlist_table.c @@ -482,7 +482,7 @@ draw_hostlist_table_addresses(hostlist_table *hl) host = &g_array_index(hl->hash.conv_array, hostlist_talker_t, idx); addr_str = get_conversation_address(NULL, &host->myaddress, hl->resolve_names); - port_str = get_conversation_port(NULL, host->port, host->ptype, hl->resolve_names); + port_str = get_conversation_port(NULL, host->port, host->etype, hl->resolve_names); gtk_list_store_set (store, &iter, ENDP_COLUMN_ADDR, addr_str, ENDP_COLUMN_PORT, port_str, @@ -602,7 +602,7 @@ draw_hostlist_table_data(hostlist_table *hl) #endif /* HAVE_GEOIP */ addr_str = get_conversation_address(NULL, &host->myaddress, hl->resolve_names); - port_str = get_conversation_port(NULL, host->port, host->ptype, hl->resolve_names); + port_str = get_conversation_port(NULL, host->port, host->etype, hl->resolve_names); gtk_list_store_insert_with_values( store, &iter, G_MAXINT, ENDP_COLUMN_ADDR, addr_str, ENDP_COLUMN_PORT, port_str, diff --git a/ui/qt/conversation_dialog.cpp b/ui/qt/conversation_dialog.cpp index 413ce966a0..a66ceb5974 100644 --- a/ui/qt/conversation_dialog.cpp +++ b/ui/qt/conversation_dialog.cpp @@ -213,11 +213,11 @@ void ConversationDialog::followStream() QString filter; follow_type_t ftype = FOLLOW_TCP; - switch (conv_item->ptype) { - case PT_TCP: + switch (conv_item->etype) { + case ENDPOINT_TCP: filter = QString("tcp.stream eq %1").arg(conv_item->conv_id); break; - case PT_UDP: + case ENDPOINT_UDP: filter = QString("udp.stream eq %1").arg(conv_item->conv_id); ftype = FOLLOW_UDP; break; @@ -247,7 +247,7 @@ void ConversationDialog::graphTcp() // XXX The GTK+ code opens the TCP Stream dialog. We might want // to open the IO Graph dialog instead. QString filter; - if (conv_item->ptype == PT_TCP) { + if (conv_item->etype == ENDPOINT_TCP) { filter = QString("tcp.stream eq %1").arg(conv_item->conv_id); } else { return; @@ -275,11 +275,11 @@ void ConversationDialog::conversationSelectionChanged() conv_item_t *conv_item = currentConversation(); if (!file_closed_ && conv_item) { - switch (conv_item->ptype) { - case PT_TCP: + switch (conv_item->etype) { + case ENDPOINT_TCP: graph_enable = true; // Fall through - case PT_UDP: + case ENDPOINT_UDP: follow_enable = true; break; default: @@ -470,7 +470,7 @@ public: } case CONV_COLUMN_SRC_PORT: if (resolve_names) { - char* port_str = get_conversation_port(NULL, conv_item->src_port, conv_item->ptype, resolve_names); + char* port_str = get_conversation_port(NULL, conv_item->src_port, conv_item->etype, resolve_names); QString q_port_str(port_str); wmem_free(NULL, port_str); return q_port_str; @@ -486,7 +486,7 @@ public: } case CONV_COLUMN_DST_PORT: if (resolve_names) { - char* port_str = get_conversation_port(NULL, conv_item->dst_port, conv_item->ptype, resolve_names); + char* port_str = get_conversation_port(NULL, conv_item->dst_port, conv_item->etype, resolve_names); QString q_port_str(port_str); wmem_free(NULL, port_str); return q_port_str; diff --git a/ui/qt/endpoint_dialog.cpp b/ui/qt/endpoint_dialog.cpp index 3d388ce9f9..001f3d67a2 100644 --- a/ui/qt/endpoint_dialog.cpp +++ b/ui/qt/endpoint_dialog.cpp @@ -286,7 +286,7 @@ public: } case ENDP_COLUMN_PORT: if (resolve_names) { - char* port_str = get_conversation_port(NULL, endp_item->port, endp_item->ptype, resolve_names); + char* port_str = get_conversation_port(NULL, endp_item->port, endp_item->etype, resolve_names); QString q_port_str(port_str); wmem_free(NULL, port_str); return q_port_str; |