gtp: cleaner printout of IE Selection Mode

Change-Id: I799efc1892448d4c4f1fad6d9f88f188a5c9be0e
Reviewed-on: https://code.wireshark.org/review/23471
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Joakim Karlsson 2017-09-10 15:23:26 +02:00 committed by Anders Broman
parent adf8236da7
commit 8c74580773
1 changed files with 10 additions and 1 deletions

View File

@ -3834,8 +3834,17 @@ dissect_radius_selection_mode(proto_tree * tree, tvbuff_t * tvb, packet_info* pi
static int
decode_gtp_sel_mode(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_)
{
proto_tree *ext_tree;
proto_item *te;
guint8 sel_mode;
sel_mode = tvb_get_guint8(tvb, offset + 1) & 0x03;
ext_tree = proto_tree_add_subtree(tree, tvb, offset, 2, ett_gtp_ies[GTP_EXT_SEL_MODE], &te,
val_to_str_ext_const(GTP_EXT_SEL_MODE, &gtp_val_ext, "Unknown message"));
proto_item_append_text(te, ": %s", val_to_str_const(sel_mode, sel_mode_type, "Unknown"));
proto_tree_add_item(ext_tree, hf_gtp_sel_mode, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_gtp_sel_mode, tvb, offset, 2, ENC_BIG_ENDIAN);
return 2;
}