diff options
author | Gerald Combs <gerald@wireshark.org> | 2013-11-14 17:37:40 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2013-11-14 17:37:40 +0000 |
commit | 190bdc32de952cc679c25f61d47e2dfab41c29e7 (patch) | |
tree | de80eb71b731298780f01eeea92448fe541684a8 /epan | |
parent | 2809240ead3af25b531ae3048b6e437dbf1ab004 (diff) |
Add packet information and selection to the Follow Stream dialog.
Collect packet numbers when following streams so that we can correlate
text positions with packets. Add a FollowStreamText class so that we can
track mouse events. Add a hint label that shows the packet under the
cursor along with packet counts and the number of "turns".
Add the packet number to the C array dump. Note that dumping to YAML
might be useful for Scapy users.
svn path=/trunk/; revision=53314
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-tcp.c | 3 | ||||
-rw-r--r-- | epan/follow.c | 7 | ||||
-rw-r--r-- | epan/follow.h | 3 |
3 files changed, 8 insertions, 5 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index da8c1fd6d8..a9903fa958 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -4632,7 +4632,8 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) &pinfo->net_src, &pinfo->net_dst, pinfo->srcport, - pinfo->destport); + pinfo->destport, + pinfo->fd->num); } } diff --git a/epan/follow.c b/epan/follow.c index ed930c12b4..be4f0f576f 100644 --- a/epan/follow.c +++ b/epan/follow.c @@ -231,7 +231,7 @@ void reassemble_tcp( guint32 tcp_stream, guint32 sequence, guint32 acknowledgement, guint32 length, const char* data, guint32 data_length, int synflag, address *net_src, address *net_dst, - guint srcport, guint dstport) { + guint srcport, guint dstport, guint32 packet_num) { guint8 srcx[MAX_IPADDR_LEN], dstx[MAX_IPADDR_LEN]; int src_index, j, first = 0, len; guint32 newseq; @@ -325,8 +325,9 @@ reassemble_tcp( guint32 tcp_stream, guint32 sequence, guint32 acknowledgement, /* Initialize our stream chunk. This data gets written to disk. */ memcpy(sc.src_addr, srcx, len); - sc.src_port = srcport; - sc.dlen = data_length; + sc.src_port = srcport; + sc.dlen = data_length; + sc.packet_num = packet_num; /* now that we have filed away the srcs, lets get the sequence number stuff figured out */ diff --git a/epan/follow.h b/epan/follow.h index b1e02dbcad..5c23feae41 100644 --- a/epan/follow.h +++ b/epan/follow.h @@ -44,6 +44,7 @@ typedef struct _tcp_stream_chunk { guint8 src_addr[MAX_IPADDR_LEN]; guint16 src_port; guint32 dlen; + guint32 packet_num; } tcp_stream_chunk; /** Build a follow filter based on the current packet's conversation. @@ -84,7 +85,7 @@ WS_DLL_PUBLIC guint32 get_follow_tcp_index(void); void reassemble_tcp( guint32, guint32, guint32, guint32, const char*, guint32, - int, address *, address *, guint, guint ); + int, address *, address *, guint, guint, guint32 ); WS_DLL_PUBLIC void reset_tcp_reassembly( void ); |