aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tcp.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-06-02 18:52:55 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-06-02 18:52:55 +0000
commite2c3b60280ff697553e360089ee84af905a311c3 (patch)
treeeff0348fc3925c767288ab7d60e5d5944d061234 /epan/dissectors/packet-tcp.c
parent5c4f8770318963d77a7829cb2113d625bb654a50 (diff)
add a generated toplevel line between the TCP protocol and the desegmented content, to better understand what's going on while desegmenting.
We'll have to add similar mechanisms for other protocols as well... svn path=/trunk/; revision=14527
Diffstat (limited to 'epan/dissectors/packet-tcp.c')
-rw-r--r--epan/dissectors/packet-tcp.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index 82a702bff2..5dbabd1c96 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -1678,6 +1678,9 @@ desegment_tcp(tvbuff_t *tvb, packet_info *pinfo, int offset,
guint32 deseg_seq;
gint nbytes;
proto_item *item;
+ proto_item *frag_tree_item;
+ proto_item *tcp_tree_item;
+
/*
* Initialize these to assume no desegmentation.
@@ -1872,7 +1875,13 @@ desegment_tcp(tvbuff_t *tvb, packet_info *pinfo, int offset,
* so we show a tree with all segments.
*/
show_fragment_tree(ipfd_head, &tcp_segment_items,
- tcp_tree, pinfo, next_tvb);
+ tree, pinfo, next_tvb, &frag_tree_item);
+ /* the toplevel fragment subtree is now behind all desegmented data,
+ * move it right behind the TCP tree */
+ tcp_tree_item = proto_tree_get_parent(tcp_tree);
+ if(frag_tree_item && tcp_tree_item) {
+ proto_tree_move_item(tree, tcp_tree_item, frag_tree_item);
+ }
/* Did the subdissector ask us to desegment
some more data? This means that the data
@@ -3278,7 +3287,7 @@ proto_register_tcp(void)
"TCP Segment", HFILL }},
{ &hf_tcp_segments,
- { "TCP Segments", "tcp.segments", FT_NONE, BASE_NONE, NULL, 0x0,
+ { "Reassembled TCP Segments", "tcp.segments", FT_NONE, BASE_NONE, NULL, 0x0,
"TCP Segments", HFILL }},
{ &hf_tcp_reassembled_in,