summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-ipv6.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2012-09-07 02:09:59 +0000
committerJeff Morriss <jeff.morriss.ws@gmail.com>2012-09-07 02:09:59 +0000
commitaa5d9d78ddcb4b7066ab03afa4277fab0bf0f468 (patch)
tree7549708474866dbbdbe811f34c57a3a7bd6ccf0b /epan/dissectors/packet-ipv6.c
parent8ba24b5530a5916769d2fa0012de4943bac2fde3 (diff)
downloadwireshark-aa5d9d78ddcb4b7066ab03afa4277fab0bf0f468.tar.gz
From Robert Bullen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 :
The reassembled fragments tree in the Packet Details view is awesome, but it lacks one thing: a field that exposes the reassembled data. tcp.data already exists for exposing a single TCP segment's payload as a byte array. It would be handy to have something similar for a single application layer PDU when TCP segment reassembly is involved. I propose tcp.reassembled.data, named and placed after the already existing field tcp.reassembled.length. My primary use case for this feature is outputting tcp.reassembled.data with tshark for further processing with a script. The attached patch implements this very feature. Because the reassembled fragment tree code is general purpose, i.e. not specific to just TCP, any dissector that relies upon it can add a similar field very cheaply. In that vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which expose reassembled fragment data as a single byte stream for IPv4 and IPv6, respectively. All other protocols that use the reassembly code have been left alone, other than inserting NULL into their initializer lists for the newly introduced struct field reassemble.h:fragment_items.hf_reassembled_data. svn path=/trunk/; revision=44802
Diffstat (limited to 'epan/dissectors/packet-ipv6.c')
-rw-r--r--epan/dissectors/packet-ipv6.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c
index 85e30e819d..b213267340 100644
--- a/epan/dissectors/packet-ipv6.c
+++ b/epan/dissectors/packet-ipv6.c
@@ -182,6 +182,7 @@ static int hf_ipv6_fragment_error = -1;
static int hf_ipv6_fragment_count = -1;
static int hf_ipv6_reassembled_in = -1;
static int hf_ipv6_reassembled_length = -1;
+static int hf_ipv6_reassembled_data = -1;
static int hf_ipv6_mipv6_home_address = -1;
@@ -292,6 +293,7 @@ static const fragment_items ipv6_frag_items = {
&hf_ipv6_fragment_count,
&hf_ipv6_reassembled_in,
&hf_ipv6_reassembled_length,
+ &hf_ipv6_reassembled_data,
"IPv6 fragments"
};
@@ -2545,6 +2547,10 @@ proto_register_ipv6(void)
FT_UINT32, BASE_DEC, NULL, 0x0,
"The total length of the reassembled payload", HFILL }},
+ { &hf_ipv6_reassembled_data,
+ { "Reassembled IPv6 data", "ipv6.reassembled.data",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "The reassembled payload", HFILL }},
/* RPL Routing Header */
{ &hf_ipv6_routing_hdr_rpl_cmprI,
{ "Compressed Internal Octets (CmprI)", "ipv6.routing_hdr.rpl.cmprI",