diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2017-06-20 02:49:07 +0200 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2017-06-20 17:10:19 +0000 |
commit | 5897c97cef0094120c434f3e40bf1ebd620525ad (patch) | |
tree | ea7c53fb4cee7183280ef6f6a24bca9a2f0240a1 | |
parent | a8793793630bd33e0d10d18d565944aa31a6d77f (diff) | |
download | wireshark-5897c97cef0094120c434f3e40bf1ebd620525ad.tar.gz |
GTPv2: put dissection under GTPv2 protocol item
Bug: 13813
Change-Id: Ic1582406896b2d4d3505ae1d3bb79cdbafa481da
Reviewed-on: https://code.wireshark.org/review/22247
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
(cherry picked from commit 59670461b00414d504b2a9ed9e7bafeab65a7420)
Reviewed-on: https://code.wireshark.org/review/22270
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
-rw-r--r-- | epan/dissectors/packet-gtpv2.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c index 71785cfa11..dfa930333a 100644 --- a/epan/dissectors/packet-gtpv2.c +++ b/epan/dissectors/packet-gtpv2.c @@ -6982,7 +6982,7 @@ static int dissect_gtpv2(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_) { proto_tree *gtpv2_tree, *flags_tree; - proto_item *tf; + proto_item *ti; guint8 message_type, t_flag, p_flag, cause_aux; int offset = 0; guint16 msg_length; @@ -7009,7 +7009,8 @@ dissect_gtpv2(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data p_flag = (tvb_get_guint8(tvb, offset) & 0x10) >> 4; msg_length = tvb_get_ntohs(tvb, offset + 2); - proto_tree_add_item(tree, proto_gtpv2, tvb, offset, msg_length + 4, ENC_NA); + ti = proto_tree_add_item(tree, proto_gtpv2, tvb, offset, msg_length + 4, ENC_NA); + gtpv2_tree = proto_item_add_subtree(ti, ett_gtpv2); if (g_gtp_session) { args = wmem_new0(wmem_packet_scope(), session_args_t); @@ -7040,9 +7041,6 @@ dissect_gtpv2(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data conversation_add_proto_data(conversation, proto_gtpv2, gtpv2_info); } - gtpv2_tree = proto_tree_add_subtree(tree, tvb, offset, msg_length + 4, ett_gtpv2, NULL, - val_to_str_ext_const(message_type, >pv2_message_type_vals_ext, "Unknown")); - /* Control Plane GTP uses a variable length header. Control Plane GTP header * length shall be a multiple of 4 octets. * Figure 5.1-1 illustrates the format of the GTPv2-C Header. @@ -7058,8 +7056,8 @@ dissect_gtpv2(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data * Figure 5.1-1: General format of GTPv2 Header for Control Plane */ gtpv2_hdr->flags = tvb_get_guint8(tvb, offset); - tf = proto_tree_add_uint(gtpv2_tree, hf_gtpv2_flags, tvb, offset, 1, gtpv2_hdr->flags); - flags_tree = proto_item_add_subtree(tf, ett_gtpv2_flags); + ti = proto_tree_add_uint(gtpv2_tree, hf_gtpv2_flags, tvb, offset, 1, gtpv2_hdr->flags); + flags_tree = proto_item_add_subtree(ti, ett_gtpv2_flags); /* Octet 1 */ t_flag = (tvb_get_guint8(tvb, offset) & 0x08) >> 3; |