diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2012-02-26 17:10:40 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2012-02-26 17:10:40 +0000 |
commit | 279010cbcbe9ce56871c5048cf324c9331d2a733 (patch) | |
tree | c4bec5a803bbda523a13e2ff8aa1681dfbb47d9a /epan/dissectors/packet-gtp.c | |
parent | 83083da75a5dc49ec0a4cca1bef2b691f733486c (diff) |
Add entry for TPDU in the tree
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41194 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-gtp.c')
-rw-r--r-- | epan/dissectors/packet-gtp.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c index ea8ec34805..69d4979dd5 100644 --- a/epan/dissectors/packet-gtp.c +++ b/epan/dissectors/packet-gtp.c @@ -13,7 +13,7 @@ * Copyright 2011, Grzegorz Szczytowski <grzegorz.szczytowski@gmail.com> * * Updates and corrections: - * Copyright 2011, Anders Broman <anders.broman@ericsson.com> + * Copyright 2011-2012, Anders Broman <anders.broman@ericsson.com> * * PDCP PDU number extension header support added by Martin Isaksson <martin.isaksson@ericsson.com> * @@ -7096,6 +7096,7 @@ static void dissect_gtp_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * } else offset = 20; + proto_tree_add_text(tree, tvb, offset, gtp_hdr.length, "T-PDU Data %u bytes", gtp_hdr.length); /* Can only handle one extension header type... */ if (noOfExtHdrs != 0) offset+= 1 + noOfExtHdrs*4; @@ -7131,6 +7132,19 @@ static void dissect_gtp_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * col_prepend_fstr(pinfo->cinfo, COL_PROTOCOL, "GTP <"); col_append_str(pinfo->cinfo, COL_PROTOCOL, ">"); + }else{ + if (gtp_prime) + offset = 6; + else if (gtp_version == 1) { + if (gtp_hdr.flags & 0x07) { + offset = 11; + if (tvb_get_guint8(tvb, offset) == 0) + offset++; + } else + offset = 8; + } else + offset = 20; + proto_tree_add_text(tree, tvb, offset, gtp_hdr.length, "T-PDU Data %u bytes", gtp_hdr.length); } pinfo->private_data = pd_save; } |