diff options
author | Gerald Combs <gerald@wireshark.org> | 2013-09-12 21:37:47 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2013-09-12 21:37:47 +0000 |
commit | 07c3d057b8a2a1184734e2f516a0576441c171f2 (patch) | |
tree | f9e38bfae949887a662ade2692300d4fc8b0e33f /epan | |
parent | 467f128306df3ff058c702b39f3941026f61813f (diff) |
Add previous/next stream navigation to the TCP stream graph dialog.
Add get_tcp_stream_count() to the TCP dissector and modify
graph_segment_list_get() to allow matching based solely on a stream.
Use text instead of icons for the mouse click behavior buttons. Remove
their PNG resources since we aren't using them any more. Fix setting the
cursor in the graph widget.
svn path=/trunk/; revision=51989
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-tcp.c | 11 | ||||
-rw-r--r-- | epan/dissectors/packet-tcp.h | 6 |
2 files changed, 14 insertions, 3 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 5f622e3f4b..b258263bac 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -448,7 +448,7 @@ static dissector_table_t subdissector_table; static heur_dissector_list_t heur_subdissector_list; static dissector_handle_t data_handle; static dissector_handle_t sport_handle; -static guint32 tcp_stream_index; +static guint32 tcp_stream_count; /* TCP structs and definitions */ @@ -511,7 +511,7 @@ init_tcp_conversation_data(packet_info *pinfo) tcpd->ts_prev.nsecs=pinfo->fd->abs_ts.nsecs; tcpd->flow1.valid_bif = 1; tcpd->flow2.valid_bif = 1; - tcpd->stream = tcp_stream_index++; + tcpd->stream = tcp_stream_count++; tcpd->server_port = 0; return tcpd; @@ -595,6 +595,11 @@ add_tcp_process_info(guint32 frame_num, address *local_addr, address *remote_add flow->command = wmem_strdup(wmem_file_scope(), command); } +/* Return the current stream count */ +guint32 get_tcp_stream_count(void) +{ + return tcp_stream_count; +} /* Calculate the timestamps relative to this conversation */ static void @@ -4764,7 +4769,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) static void tcp_init(void) { - tcp_stream_index = 0; + tcp_stream_count = 0; reassembly_table_init(&tcp_reassembly_table, &addresses_ports_reassembly_table_functions); } diff --git a/epan/dissectors/packet-tcp.h b/epan/dissectors/packet-tcp.h index 839eec6dd7..52f84b6343 100644 --- a/epan/dissectors/packet-tcp.h +++ b/epan/dissectors/packet-tcp.h @@ -293,6 +293,12 @@ extern gboolean decode_tcp_ports(tvbuff_t *, int, packet_info *, proto_tree *, i */ extern void add_tcp_process_info(guint32 frame_num, address *local_addr, address *remote_addr, guint16 local_port, guint16 remote_port, guint32 uid, guint32 pid, gchar *username, gchar *command); +/** Get the current number of TCP streams + * + * @return The number of TCP streams + */ +WS_DLL_PUBLIC guint32 get_tcp_stream_count(void); + #ifdef __cplusplus } #endif /* __cplusplus */ |