aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_map.c
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2021-03-30 21:39:49 -0400
committerJohn Thacker <johnthacker@gmail.com>2021-03-30 21:48:00 -0400
commit68ba60774f8e055da60352cb710e02817546ca52 (patch)
tree78ff93a2dfa2766372e88a6eaaa08c9660954220 /epan/dissectors/packet-gsm_map.c
parentf29563b8609b75530f78d4a47211b877bdbc8602 (diff)
Prettify and standardize LAC, RAC, SAC, TAC in several ASN.1 dissectors
The LAC, RAC, SAC, and TAC tend to be defined in ASN.1 as OCTET STRINGS of lengths 1, 2, or 3. It generally makes sense to dissect them as FT_UINT[8,16,24], as appropriate, with BASE_DEC_HEX instead of as FT_BYTES, so standardize on that. See commit d6f91a7ca421caa7787c1539bca61f943923fa9c for similar work for S1AP.
Diffstat (limited to 'epan/dissectors/packet-gsm_map.c')
-rw-r--r--epan/dissectors/packet-gsm_map.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/epan/dissectors/packet-gsm_map.c b/epan/dissectors/packet-gsm_map.c
index 00de07240c..a46a671a49 100644
--- a/epan/dissectors/packet-gsm_map.c
+++ b/epan/dissectors/packet-gsm_map.c
@@ -8553,8 +8553,16 @@ dissect_gsm_map_ms_ADD_Info(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
static int
dissect_gsm_map_ms_LAC(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
- offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+#line 1198 "./asn1/gsm_map/gsm_map.cnf"
+ tvbuff_t *parameter_tvb = NULL;
+ offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, -1,
+ &parameter_tvb);
+
+ if (parameter_tvb) {
+ actx->created_item = proto_tree_add_item(tree, hf_index, parameter_tvb, 0, 2, ENC_BIG_ENDIAN);
+ }
+
+
return offset;
}
@@ -26396,7 +26404,7 @@ void proto_register_gsm_map(void) {
NULL, HFILL }},
{ &hf_gsm_map_ms_lac,
{ "lac", "gsm_map.ms.lac",
- FT_BYTES, BASE_NONE, NULL, 0,
+ FT_UINT16, BASE_DEC_HEX, NULL, 0,
NULL, HFILL }},
{ &hf_gsm_map_ms_identity,
{ "identity", "gsm_map.ms.identity",