From 20ab1ba46b7c3b88575c880ce3cf71291d4cc64b Mon Sep 17 00:00:00 2001 From: John Thacker Date: Mon, 15 Feb 2021 19:39:06 -0500 Subject: [PATCH] HNBAP: Break out MCC and MNC from PLMNidentity --- epan/dissectors/asn1/hnbap/hnbap.cnf | 8 ++++++++ epan/dissectors/packet-hnbap.c | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/epan/dissectors/asn1/hnbap/hnbap.cnf b/epan/dissectors/asn1/hnbap/hnbap.cnf index a44879e4e7..c721c76b46 100644 --- a/epan/dissectors/asn1/hnbap/hnbap.cnf +++ b/epan/dissectors/asn1/hnbap/hnbap.cnf @@ -162,6 +162,14 @@ AccessResult dissect_e212_imsi(parameter_tvb, actx->pinfo, subtree, 0, tvb_reported_length(parameter_tvb), FALSE); } +#.FN_BODY PLMNidentity VAL_PTR = ¶meter_tvb + tvbuff_t *parameter_tvb; +%(DEFAULT_BODY)s + if (parameter_tvb) { + dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, FALSE); + } +#.END + #.ASSIGN_VALUE_TO_TYPE # HNBAP ASN.1 does not have constants assigned to types # ProcedureCode id-HNBRegister ProcedureCode diff --git a/epan/dissectors/packet-hnbap.c b/epan/dissectors/packet-hnbap.c index 1776cd6d1f..12b14b2b10 100644 --- a/epan/dissectors/packet-hnbap.c +++ b/epan/dissectors/packet-hnbap.c @@ -940,8 +940,15 @@ dissect_hnbap_CSGMembershipStatus(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_hnbap_PLMNidentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 166 "./asn1/hnbap/hnbap.cnf" + tvbuff_t *parameter_tvb; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, - 3, 3, FALSE, NULL); + 3, 3, FALSE, ¶meter_tvb); + + if (parameter_tvb) { + dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, FALSE); + } + return offset; }