diff options
author | AndersBroman <anders.broman@ericsson.com> | 2014-03-27 10:34:59 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-03-27 09:50:44 +0000 |
commit | 3584a21c8703207580ff512be574989f485f0a79 (patch) | |
tree | 322e2bc33fe54667889549699951324dbc6d5da9 /epan/dissectors/packet-nas_eps.c | |
parent | f3fe29f0fccaebaa7b7bb5db86604b241a1fa749 (diff) |
From Martin Mathiesson: Display Detach Type in info col.
Change-Id: I33692ac93f60cbabec0804f6ee7e75a9d5b9497c
Reviewed-on: https://code.wireshark.org/review/842
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-nas_eps.c')
-rw-r--r-- | epan/dissectors/packet-nas_eps.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/epan/dissectors/packet-nas_eps.c b/epan/dissectors/packet-nas_eps.c index e53b60d8d7..8187d71cb5 100644 --- a/epan/dissectors/packet-nas_eps.c +++ b/epan/dissectors/packet-nas_eps.c @@ -3182,6 +3182,8 @@ nas_emm_detach_req_UL(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, g guint32 curr_offset,bit_offset; guint32 consumed; guint curr_len; + guint64 switch_off; + guint64 detach_type; curr_offset = offset; curr_len = len; @@ -3192,10 +3194,14 @@ nas_emm_detach_req_UL(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, g de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, NULL); bit_offset+=4; /* Detach type Detach type 9.9.3.6 M V 1/2 */ - proto_tree_add_bits_item(tree, hf_nas_eps_emm_switch_off, tvb, bit_offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_bits_ret_val(tree, hf_nas_eps_emm_switch_off, tvb, bit_offset, 1, &switch_off, ENC_BIG_ENDIAN); bit_offset++; - proto_tree_add_bits_item(tree, hf_nas_eps_emm_detach_type_UL, tvb, bit_offset, 3, ENC_BIG_ENDIAN); + proto_tree_add_bits_ret_val(tree, hf_nas_eps_emm_detach_type_UL, tvb, bit_offset, 3, &detach_type, ENC_BIG_ENDIAN); /* bit_offset+=3;*/ + /* Show detach reason in Info column. TODO: expert info ? */ + col_append_fstr(pinfo->cinfo, COL_INFO, " (%s%s)", + val_to_str_const((guint32)detach_type, nas_eps_emm_type_of_dtatch_UL_vals, "Unknown"), + (switch_off==0) ? "" : " / switch-off"); /* Fix the lengths */ curr_len--; |