aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_a_dtap.c
diff options
context:
space:
mode:
authorMikhail Koreshkov <drkor@hotbox.ru>2015-03-30 22:16:35 +0300
committerAnders Broman <a.broman58@gmail.com>2015-03-31 04:09:00 +0000
commit4db7c2d435e32f4958aeb48eba45b11c16b8f066 (patch)
treefd3867d2c906131f3b779cf0eefb12c0a1c04e2c /epan/dissectors/packet-gsm_a_dtap.c
parentc3c8552aa1ae4ecd3fe47e19d33079d04c0e2cf9 (diff)
GSM_A: dissector table for User-To-User signalling
Add User-To-User (UUS) dissector table to be able further data processing. Change-Id: I44cc32441072c643d19af53849cf5b53909b4889 Reviewed-on: https://code.wireshark.org/review/7857 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-gsm_a_dtap.c')
-rw-r--r--epan/dissectors/packet-gsm_a_dtap.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/epan/dissectors/packet-gsm_a_dtap.c b/epan/dissectors/packet-gsm_a_dtap.c
index c4eb82aa3b..085664aa2d 100644
--- a/epan/dissectors/packet-gsm_a_dtap.c
+++ b/epan/dissectors/packet-gsm_a_dtap.c
@@ -732,6 +732,8 @@ static expert_field ei_gsm_a_dtap_missing_mandatory_element = EI_INIT;
static char a_bigbuf[1024];
+static dissector_table_t u2u_dissector_table;
+
static dissector_handle_t data_handle;
static dissector_handle_t gsm_map_handle;
static dissector_handle_t rp_handle;
@@ -3041,15 +3043,21 @@ static guint16
de_u2u(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
+ guint32 proto_discr;
proto_tree *subtree;
+ tvbuff_t *u2u_tvb;
curr_offset = offset;
- proto_tree_add_item(tree, hf_gsm_a_dtap_u2u_prot_discr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item_ret_uint(tree, hf_gsm_a_dtap_u2u_prot_discr, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &proto_discr);
curr_offset++;
subtree = proto_tree_add_subtree(tree, tvb, curr_offset, len - 1, ett_gsm_dtap_elem[DE_USER_USER], NULL, "User-user information");
proto_tree_add_item(subtree, hf_gsm_a_dtap_data, tvb, curr_offset, len - 1, ENC_NA);
+ u2u_tvb = tvb_new_subset_length(tvb, curr_offset, len - 1);
+ dissector_try_uint_new(u2u_dissector_table, proto_discr, u2u_tvb, pinfo, proto_tree_get_root(tree), TRUE, NULL);
+
+
return (len);
}
/*
@@ -8252,6 +8260,8 @@ proto_register_gsm_a_dtap(void)
/* subdissector code */
new_register_dissector("gsm_a_dtap", dissect_dtap, proto_a_dtap);
+ u2u_dissector_table = register_dissector_table("gsm_a.dtap.u2u_prot_discr", "GSM User to User Signalling",
+ FT_UINT8, BASE_DEC);
}
void