aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/conversations_tcpip.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2014-04-29 11:10:27 -0400
committerMichael Mann <mmann78@netscape.net>2014-07-21 23:19:09 +0000
commit59ef97dd652131a6df0edd26cc8709461587a224 (patch)
treec3428c9388757895136b7ea43d168b1966feb68e /ui/gtk/conversations_tcpip.c
parentd81a34cc24598778d3f8073cf85027a777cbbc10 (diff)
[WIP] Add a conversation dialog.
Items are sorted by value. Move common conversation code to ui/conversation_hash.[ch]. Add a conversation_type_e enum along with convenience functions for fetching titles, tap names, etc. We have a single main dialog instead of a main dialog + individual protocol dialogs. It de-clutters the statistics menu and results in simpler code. Conversation type tabs can be added and removed within the dialog itself. The tab list is sticky and saved with the current profile when the dialog closes. Data can be copied as CSV or YAML. Add a FilterAction class and a corresponding filterAction slot to MainWindow. Use it for the Conversations context menu. Add an addressResolutionChanged signal and related plumbing. Get rid of the iterator members in the conversation item struct. Update the GTK+ code accordingly. Excercise for the reader: - Update TShark to use the common hash code. Ping-Bug: 9231 Ping-Bug: 8703 Ping-Bug: 6727 Change-Id: I8728d771fc5b1a85937bed9d898e53c3ecc3a544 Reviewed-on: https://code.wireshark.org/review/2987 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/gtk/conversations_tcpip.c')
-rw-r--r--ui/gtk/conversations_tcpip.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/gtk/conversations_tcpip.c b/ui/gtk/conversations_tcpip.c
index afd6e76c73..0491c50fd2 100644
--- a/ui/gtk/conversations_tcpip.c
+++ b/ui/gtk/conversations_tcpip.c
@@ -41,9 +41,10 @@ void register_tap_listener_tcpip_conversation(void);
static int
tcpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
+ conversations_table *ct = (conversations_table *) pct;
const struct tcpheader *tcphdr=(const struct tcpheader *)vip;
- add_conversation_table_data_with_conv_id((conversations_table *)pct, &tcphdr->ip_src, &tcphdr->ip_dst, tcphdr->th_sport, tcphdr->th_dport, (conv_id_t) tcphdr->th_stream, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_NONE, PT_TCP);
+ add_conversation_table_data_with_conv_id(&ct->hash, &tcphdr->ip_src, &tcphdr->ip_dst, tcphdr->th_sport, tcphdr->th_dport, (conv_id_t) tcphdr->th_stream, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, CONV_TYPE_TCP, PT_TCP);
return 1;
}
@@ -61,7 +62,7 @@ tcpip_conversation_init(const char *opt_arg, void* userdata _U_)
filter=NULL;
}
- init_conversation_table(FALSE, "TCP", "tcp", filter, tcpip_conversation_packet);
+ init_conversation_table(CONV_TYPE_TCP, filter, tcpip_conversation_packet);
}
@@ -75,5 +76,5 @@ void
register_tap_listener_tcpip_conversation(void)
{
register_stat_cmd_arg("conv,tcp", tcpip_conversation_init,NULL);
- register_conversation_table(FALSE, "TCP", "tcp", NULL /*filter*/, tcpip_conversation_packet);
+ register_conversation_table(CONV_TYPE_TCP, NULL /*filter*/, tcpip_conversation_packet);
}