RNSAP: Dissect IMSI

This commit is contained in:
John Thacker 2024-02-23 08:36:36 -05:00 committed by Alexis La Goutte
parent 62e8882701
commit 92573aad71
3 changed files with 22 additions and 1 deletions

View File

@ -23,6 +23,7 @@
#include "packet-isup.h"
#include "packet-per.h"
#include "packet-ber.h"
#include "packet-e212.h"
#ifdef _MSC_VER
/* disable: "warning C4146: unary minus operator applied to unsigned type, result still unsigned" */
@ -64,6 +65,7 @@ static int hf_rnsap_transportLayerAddress_nsap;
static int ett_rnsap;
static int ett_rnsap_transportLayerAddress;
static int ett_rnsap_transportLayerAddress_nsap;
static int ett_rnsap_IMSI;
#include "packet-rnsap-ett.c"
@ -261,6 +263,7 @@ void proto_register_rnsap(void) {
&ett_rnsap,
&ett_rnsap_transportLayerAddress,
&ett_rnsap_transportLayerAddress_nsap,
&ett_rnsap_IMSI,
#include "packet-rnsap-ettarr.c"
};

View File

@ -247,6 +247,14 @@ TAC TYPE = FT_UINT16 DISPLAY = BASE_DEC_HEX
actx->created_item = proto_tree_add_item(tree, hf_index, parameter_tvb, 0, 2, ENC_BIG_ENDIAN);
}
#.FN_BODY IMSI VAL_PTR = &parameter_tvb
tvbuff_t *parameter_tvb;
%(DEFAULT_BODY)s
if (parameter_tvb) {
proto_tree *subtree = proto_item_add_subtree(actx->created_item, ett_rnsap_IMSI);
dissect_e212_imsi(parameter_tvb, actx->pinfo, subtree, 0, tvb_reported_length(parameter_tvb), FALSE);
}
#.REGISTER
#RNSAP-PROTOCOL-IES

View File

@ -28,6 +28,7 @@
#include "packet-isup.h"
#include "packet-per.h"
#include "packet-ber.h"
#include "packet-e212.h"
#ifdef _MSC_VER
/* disable: "warning C4146: unary minus operator applied to unsigned type, result still unsigned" */
@ -4388,6 +4389,7 @@ static int hf_rnsap_value_05; /* Outcome_value */
static int ett_rnsap;
static int ett_rnsap_transportLayerAddress;
static int ett_rnsap_transportLayerAddress_nsap;
static int ett_rnsap_IMSI;
static gint ett_rnsap_PrivateIE_ID;
static gint ett_rnsap_ProcedureID;
@ -25047,8 +25049,15 @@ dissect_rnsap_IMEISV(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr
static int
dissect_rnsap_IMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
tvbuff_t *parameter_tvb;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
3, 8, FALSE, NULL);
3, 8, FALSE, &parameter_tvb);
if (parameter_tvb) {
proto_tree *subtree = proto_item_add_subtree(actx->created_item, ett_rnsap_IMSI);
dissect_e212_imsi(parameter_tvb, actx->pinfo, subtree, 0, tvb_reported_length(parameter_tvb), FALSE);
}
return offset;
}
@ -61673,6 +61682,7 @@ void proto_register_rnsap(void) {
&ett_rnsap,
&ett_rnsap_transportLayerAddress,
&ett_rnsap_transportLayerAddress_nsap,
&ett_rnsap_IMSI,
&ett_rnsap_PrivateIE_ID,
&ett_rnsap_ProcedureID,
&ett_rnsap_TransactionID,