RRC: Reconstruct MCC-MNC pairs in PLMN-IdentityWithOptionalMCC element
In this patch when a 'PLMN-IdentityWithOptionalMCC' field is found where MCC is missing but a MCC was seen previously in the packet, the last MCC will be used for E.212 dissection. Change-Id: I6bda9540f63acc693751606c1f99d6aa9539bd98 Reviewed-on: https://code.wireshark.org/review/33925 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
2e174bcae0
commit
6d150bdf62
|
@ -71,6 +71,7 @@ typedef struct umts_rrc_private_data_t
|
|||
guint32 scrambling_code;
|
||||
enum nas_sys_info_gsm_map cn_domain;
|
||||
wmem_strbuf_t* digits_strbuf; /* A collection of digits in a string. Used for reconstructing IMSIs or MCC-MNC pairs */
|
||||
wmem_strbuf_t* last_mcc_strbuf; /* Last seen MCC digits string */
|
||||
gboolean digits_strbuf_parsing_failed_flag; /* Whether an error occured when creating the IMSI/MCC-MNC pair string */
|
||||
guint32 rbid;
|
||||
guint32 rlc_ciphering_sqn; /* Sequence number where ciphering starts in a given bearer */
|
||||
|
@ -184,6 +185,18 @@ static void private_data_set_digits_strbuf_parsing_failed_flag(asn1_ctx_t *actx,
|
|||
private_data->digits_strbuf_parsing_failed_flag = digits_strbuf_parsing_failed_flag;
|
||||
}
|
||||
|
||||
static wmem_strbuf_t* private_data_get_last_mcc_strbuf(asn1_ctx_t *actx)
|
||||
{
|
||||
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
|
||||
return private_data->last_mcc_strbuf;
|
||||
}
|
||||
|
||||
static void private_data_set_last_mcc_strbuf(asn1_ctx_t *actx, wmem_strbuf_t* last_mcc_strbuf)
|
||||
{
|
||||
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
|
||||
private_data->last_mcc_strbuf = last_mcc_strbuf;
|
||||
}
|
||||
|
||||
static guint32 private_data_get_rbid(asn1_ctx_t *actx)
|
||||
{
|
||||
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
|
||||
|
|
|
@ -818,6 +818,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
|
|||
|
||||
#.FN_BODY PLMN-Identity
|
||||
wmem_strbuf_t* mcc_mnc_strbuf;
|
||||
wmem_strbuf_t* mcc_strbuf;
|
||||
guint32 string_len;
|
||||
gchar* mcc_mnc_string;
|
||||
tvbuff_t* mcc_mnc_tvb;
|
||||
|
@ -839,6 +840,17 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
|
|||
string_len = (guint32)wmem_strbuf_get_len(mcc_mnc_strbuf);
|
||||
mcc_mnc_string = wmem_strbuf_finalize(mcc_mnc_strbuf);
|
||||
|
||||
if(string_len >= 3)
|
||||
{
|
||||
/* 3 MCC digits were found, keep for later in case MCC is missing in other PLMN ids*/
|
||||
mcc_strbuf = wmem_strbuf_sized_new(actx->pinfo->pool,4,4);
|
||||
wmem_strbuf_append_c(mcc_strbuf,mcc_mnc_string[0]);
|
||||
wmem_strbuf_append_c(mcc_strbuf,mcc_mnc_string[1]);
|
||||
wmem_strbuf_append_c(mcc_strbuf,mcc_mnc_string[2]);
|
||||
wmem_strbuf_append_c(mcc_strbuf,'\0');
|
||||
private_data_set_last_mcc_strbuf(actx,mcc_strbuf);
|
||||
}
|
||||
|
||||
/* Creating TVB from extracted string*/
|
||||
mcc_mnc_tvb = tvb_new_child_real_data(tvb, (guint8*)mcc_mnc_string, string_len, string_len);
|
||||
add_new_data_source(actx->pinfo, mcc_mnc_tvb, "MCC-MNC");
|
||||
|
@ -848,6 +860,8 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
|
|||
|
||||
#.FN_BODY PLMN-IdentityWithOptionalMCC-r6
|
||||
wmem_strbuf_t* mcc_mnc_strbuf;
|
||||
wmem_strbuf_t* temp_strbuf;
|
||||
wmem_strbuf_t* last_mcc_strbuf;
|
||||
guint32 string_len;
|
||||
gchar* mcc_mnc_string;
|
||||
tvbuff_t* mcc_mnc_tvb;
|
||||
|
@ -867,10 +881,35 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
|
|||
|
||||
/* Extracting the string collected in the strbuf */
|
||||
string_len = (guint32)wmem_strbuf_get_len(mcc_mnc_strbuf);
|
||||
mcc_mnc_string = wmem_strbuf_finalize(mcc_mnc_strbuf);
|
||||
if (string_len > 3) {
|
||||
/* 3 MCC digits and at least 1 MNC digit were found, keep MCC for later
|
||||
in case it's missing in other PLMN ids*/
|
||||
temp_strbuf = wmem_strbuf_sized_new(actx->pinfo->pool,4,4);
|
||||
wmem_strbuf_append_c(temp_strbuf,mcc_mnc_string[0]);
|
||||
wmem_strbuf_append_c(temp_strbuf,mcc_mnc_string[1]);
|
||||
wmem_strbuf_append_c(temp_strbuf,mcc_mnc_string[2]);
|
||||
wmem_strbuf_append_c(temp_strbuf,'\0');
|
||||
private_data_set_last_mcc_strbuf(actx,temp_strbuf);
|
||||
}
|
||||
else {
|
||||
/* mcc_mnc_strbuf Probably only has 3/2 digits of MNC */
|
||||
/* Try to fill MCC form "last MCC" if we have it stored */
|
||||
last_mcc_strbuf = private_data_get_last_mcc_strbuf(actx);
|
||||
if(last_mcc_strbuf)
|
||||
{
|
||||
/* Concat MCC and MNC in temp buffer */
|
||||
temp_strbuf = wmem_strbuf_sized_new(actx->pinfo->pool,7,7);
|
||||
wmem_strbuf_append_printf(temp_strbuf,"%%s",wmem_strbuf_get_str(last_mcc_strbuf));
|
||||
wmem_strbuf_append_printf(temp_strbuf,"%%s",wmem_strbuf_get_str(mcc_mnc_strbuf));
|
||||
/* Update length of recovered MCC-MNC pair */
|
||||
string_len = (guint32)wmem_strbuf_get_len(temp_strbuf);
|
||||
mcc_mnc_string = wmem_strbuf_finalize(temp_strbuf);
|
||||
}
|
||||
}
|
||||
|
||||
if (string_len >= 5) {
|
||||
/* optional MCC was present, we can call E.212 dissector */
|
||||
/* if not present, we could apply the algorithm in 25.331 chapter 8.1.1.5 */
|
||||
mcc_mnc_string = wmem_strbuf_finalize(mcc_mnc_strbuf);
|
||||
/* optional MCC was present (or restored above), we can call E.212 dissector */
|
||||
|
||||
/* Creating TVB from extracted string*/
|
||||
mcc_mnc_tvb = tvb_new_child_real_data(tvb, (guint8*)mcc_mnc_string, string_len, string_len);
|
||||
|
|
|
@ -79,6 +79,7 @@ typedef struct umts_rrc_private_data_t
|
|||
guint32 scrambling_code;
|
||||
enum nas_sys_info_gsm_map cn_domain;
|
||||
wmem_strbuf_t* digits_strbuf; /* A collection of digits in a string. Used for reconstructing IMSIs or MCC-MNC pairs */
|
||||
wmem_strbuf_t* last_mcc_strbuf; /* Last seen MCC digits string */
|
||||
gboolean digits_strbuf_parsing_failed_flag; /* Whether an error occured when creating the IMSI/MCC-MNC pair string */
|
||||
guint32 rbid;
|
||||
guint32 rlc_ciphering_sqn; /* Sequence number where ciphering starts in a given bearer */
|
||||
|
@ -192,6 +193,18 @@ static void private_data_set_digits_strbuf_parsing_failed_flag(asn1_ctx_t *actx,
|
|||
private_data->digits_strbuf_parsing_failed_flag = digits_strbuf_parsing_failed_flag;
|
||||
}
|
||||
|
||||
static wmem_strbuf_t* private_data_get_last_mcc_strbuf(asn1_ctx_t *actx)
|
||||
{
|
||||
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
|
||||
return private_data->last_mcc_strbuf;
|
||||
}
|
||||
|
||||
static void private_data_set_last_mcc_strbuf(asn1_ctx_t *actx, wmem_strbuf_t* last_mcc_strbuf)
|
||||
{
|
||||
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
|
||||
private_data->last_mcc_strbuf = last_mcc_strbuf;
|
||||
}
|
||||
|
||||
static guint32 private_data_get_rbid(asn1_ctx_t *actx)
|
||||
{
|
||||
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
|
||||
|
@ -464,7 +477,7 @@ static int dissect_SysInfoType22_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tr
|
|||
#define maxWLANs 64
|
||||
|
||||
/*--- End of included file: packet-rrc-val.h ---*/
|
||||
#line 261 "./asn1/rrc/packet-rrc-template.c"
|
||||
#line 274 "./asn1/rrc/packet-rrc-template.c"
|
||||
|
||||
/* Initialize the protocol and registered fields */
|
||||
int proto_rrc = -1;
|
||||
|
@ -11369,7 +11382,7 @@ static int hf_rrc_GsmSecurityCapability_a5_2 = -1;
|
|||
static int hf_rrc_GsmSecurityCapability_a5_1 = -1;
|
||||
|
||||
/*--- End of included file: packet-rrc-hf.c ---*/
|
||||
#line 269 "./asn1/rrc/packet-rrc-template.c"
|
||||
#line 282 "./asn1/rrc/packet-rrc-template.c"
|
||||
|
||||
/* Initialize the subtree pointers */
|
||||
static int ett_rrc = -1;
|
||||
|
@ -18316,7 +18329,7 @@ static gint ett_rrc_UE_RadioAccessCapability_r6 = -1;
|
|||
static gint ett_rrc_UL_RFC3095_Context = -1;
|
||||
|
||||
/*--- End of included file: packet-rrc-ett.c ---*/
|
||||
#line 274 "./asn1/rrc/packet-rrc-template.c"
|
||||
#line 287 "./asn1/rrc/packet-rrc-template.c"
|
||||
|
||||
static gint ett_rrc_eutraFeatureGroupIndicators = -1;
|
||||
static gint ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo = -1;
|
||||
|
@ -18686,7 +18699,7 @@ dissect_rrc_ActivationTime(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _
|
|||
|
||||
static int
|
||||
dissect_rrc_RB_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1347 "./asn1/rrc/rrc.cnf"
|
||||
#line 1386 "./asn1/rrc/rrc.cnf"
|
||||
guint32 rbid;
|
||||
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
|
||||
1U, 32U, &rbid, FALSE);
|
||||
|
@ -18703,7 +18716,7 @@ private_data_set_rbid(actx, rbid);
|
|||
|
||||
static int
|
||||
dissect_rrc_RLC_SequenceNumber(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1353 "./asn1/rrc/rrc.cnf"
|
||||
#line 1392 "./asn1/rrc/rrc.cnf"
|
||||
guint32 rlc_ciphering_sqn;
|
||||
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
|
||||
0U, 4095U, &rlc_ciphering_sqn, FALSE);
|
||||
|
@ -18724,7 +18737,7 @@ static const per_sequence_t RB_ActivationTimeInfo_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_RB_ActivationTimeInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1317 "./asn1/rrc/rrc.cnf"
|
||||
#line 1356 "./asn1/rrc/rrc.cnf"
|
||||
fp_info *fpinf;
|
||||
rlc_info *rlcinf;
|
||||
rrc_ciphering_info *ciphering_info;
|
||||
|
@ -18795,7 +18808,7 @@ dissect_rrc_CipheringModeInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
|
|||
|
||||
static int
|
||||
dissect_rrc_SRNC_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1031 "./asn1/rrc/rrc.cnf"
|
||||
#line 1070 "./asn1/rrc/rrc.cnf"
|
||||
tvbuff_t * s_rnc_id_tvb = NULL;
|
||||
offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
|
||||
12, 12, FALSE, NULL, 0, &s_rnc_id_tvb, NULL);
|
||||
|
@ -18813,7 +18826,7 @@ dissect_rrc_SRNC_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
|
|||
|
||||
static int
|
||||
dissect_rrc_S_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1038 "./asn1/rrc/rrc.cnf"
|
||||
#line 1077 "./asn1/rrc/rrc.cnf"
|
||||
tvbuff_t * s_rnti_tvb = NULL;
|
||||
offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
|
||||
20, 20, FALSE, NULL, 0, &s_rnti_tvb, NULL);
|
||||
|
@ -18836,7 +18849,7 @@ static const per_sequence_t U_RNTI_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_U_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1045 "./asn1/rrc/rrc.cnf"
|
||||
#line 1084 "./asn1/rrc/rrc.cnf"
|
||||
private_data_set_s_rnc_id(actx, 0);
|
||||
private_data_set_s_rnti(actx, 0);
|
||||
guint32 s_rnc_id;
|
||||
|
@ -18890,7 +18903,7 @@ dissect_rrc_U_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot
|
|||
|
||||
static int
|
||||
dissect_rrc_Digit(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 913 "./asn1/rrc/rrc.cnf"
|
||||
#line 952 "./asn1/rrc/rrc.cnf"
|
||||
guint32 digit;
|
||||
wmem_strbuf_t* digits_strbuf; /* The string of either an IMSI or a MCC-MNC pair */
|
||||
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
|
||||
|
@ -18961,6 +18974,7 @@ static int
|
|||
dissect_rrc_PLMN_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 820 "./asn1/rrc/rrc.cnf"
|
||||
wmem_strbuf_t* mcc_mnc_strbuf;
|
||||
wmem_strbuf_t* mcc_strbuf;
|
||||
guint32 string_len;
|
||||
gchar* mcc_mnc_string;
|
||||
tvbuff_t* mcc_mnc_tvb;
|
||||
|
@ -18984,6 +18998,17 @@ dissect_rrc_PLMN_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
|
|||
string_len = (guint32)wmem_strbuf_get_len(mcc_mnc_strbuf);
|
||||
mcc_mnc_string = wmem_strbuf_finalize(mcc_mnc_strbuf);
|
||||
|
||||
if(string_len >= 3)
|
||||
{
|
||||
/* 3 MCC digits were found, keep for later in case MCC is missing in other PLMN ids*/
|
||||
mcc_strbuf = wmem_strbuf_sized_new(actx->pinfo->pool,4,4);
|
||||
wmem_strbuf_append_c(mcc_strbuf,mcc_mnc_string[0]);
|
||||
wmem_strbuf_append_c(mcc_strbuf,mcc_mnc_string[1]);
|
||||
wmem_strbuf_append_c(mcc_strbuf,mcc_mnc_string[2]);
|
||||
wmem_strbuf_append_c(mcc_strbuf,'\0');
|
||||
private_data_set_last_mcc_strbuf(actx,mcc_strbuf);
|
||||
}
|
||||
|
||||
/* Creating TVB from extracted string*/
|
||||
mcc_mnc_tvb = tvb_new_child_real_data(tvb, (guint8*)mcc_mnc_string, string_len, string_len);
|
||||
add_new_data_source(actx->pinfo, mcc_mnc_tvb, "MCC-MNC");
|
||||
|
@ -19000,7 +19025,7 @@ dissect_rrc_PLMN_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
|
|||
|
||||
static int
|
||||
dissect_rrc_NAS_SystemInformationGSM_MAP(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 999 "./asn1/rrc/rrc.cnf"
|
||||
#line 1038 "./asn1/rrc/rrc.cnf"
|
||||
tvbuff_t *nas_sys_info_gsm_map_tvb = NULL;
|
||||
guint32 length;
|
||||
enum nas_sys_info_gsm_map cn_domain;
|
||||
|
@ -19043,7 +19068,7 @@ dissect_rrc_NAS_SystemInformationGSM_MAP(tvbuff_t *tvb _U_, int offset _U_, asn1
|
|||
|
||||
static int
|
||||
dissect_rrc_T_cn_CommonGSM_MAP_NAS_SysInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 983 "./asn1/rrc/rrc.cnf"
|
||||
#line 1022 "./asn1/rrc/rrc.cnf"
|
||||
private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_CN_COMMON);
|
||||
offset = dissect_rrc_NAS_SystemInformationGSM_MAP(tvb, offset, actx, tree, hf_index);
|
||||
|
||||
|
@ -19063,7 +19088,7 @@ static const value_string rrc_CN_DomainIdentity_vals[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_CN_DomainIdentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 976 "./asn1/rrc/rrc.cnf"
|
||||
#line 1015 "./asn1/rrc/rrc.cnf"
|
||||
guint32 nas_sys_info;
|
||||
offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
|
||||
2, &nas_sys_info, FALSE, 0, NULL);
|
||||
|
@ -22741,7 +22766,7 @@ dissect_rrc_SSDT_UL(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pro
|
|||
|
||||
static int
|
||||
dissect_rrc_CellIdentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1171 "./asn1/rrc/rrc.cnf"
|
||||
#line 1210 "./asn1/rrc/rrc.cnf"
|
||||
tvbuff_t * cell_id_tvb = NULL;
|
||||
proto_item *temp_ti;
|
||||
proto_tree *cell_identity_tree;
|
||||
|
@ -22966,7 +22991,7 @@ dissect_rrc_T_r3(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_
|
|||
|
||||
static int
|
||||
dissect_rrc_H_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1259 "./asn1/rrc/rrc.cnf"
|
||||
#line 1298 "./asn1/rrc/rrc.cnf"
|
||||
tvbuff_t *hrnti_tvb;
|
||||
struct rrc_info *rrcinf;
|
||||
offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
|
||||
|
@ -22975,7 +23000,7 @@ dissect_rrc_H_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot
|
|||
|
||||
|
||||
|
||||
#line 1264 "./asn1/rrc/rrc.cnf"
|
||||
#line 1303 "./asn1/rrc/rrc.cnf"
|
||||
rrcinf = (struct rrc_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_rrc, 0);
|
||||
if (!rrcinf) {
|
||||
rrcinf = wmem_new0(wmem_file_scope(), struct rrc_info);
|
||||
|
@ -23001,7 +23026,7 @@ dissect_rrc_E_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot
|
|||
|
||||
static int
|
||||
dissect_rrc_T_cn_CommonGSM_MAP_NAS_SysInfo_01(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 987 "./asn1/rrc/rrc.cnf"
|
||||
#line 1026 "./asn1/rrc/rrc.cnf"
|
||||
private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_CN_COMMON);
|
||||
offset = dissect_rrc_NAS_SystemInformationGSM_MAP(tvb, offset, actx, tree, hf_index);
|
||||
|
||||
|
@ -28475,7 +28500,7 @@ dissect_rrc_ScramblingCodeType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac
|
|||
|
||||
static int
|
||||
dissect_rrc_UL_ScramblingCode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1158 "./asn1/rrc/rrc.cnf"
|
||||
#line 1197 "./asn1/rrc/rrc.cnf"
|
||||
guint32 scrambling_code;
|
||||
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
|
||||
0U, 16777215U, &scrambling_code, FALSE);
|
||||
|
@ -39220,7 +39245,7 @@ dissect_rrc_CellChangeOrderFromUTRAN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx
|
|||
|
||||
static int
|
||||
dissect_rrc_C_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1088 "./asn1/rrc/rrc.cnf"
|
||||
#line 1127 "./asn1/rrc/rrc.cnf"
|
||||
fp_info *fpinf = NULL;
|
||||
umts_mac_info *macinf = NULL;
|
||||
rlc_info *rlcinf = NULL;
|
||||
|
@ -39309,7 +39334,7 @@ static const value_string rrc_RRC_StateIndicator_vals[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_RRC_StateIndicator(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1163 "./asn1/rrc/rrc.cnf"
|
||||
#line 1202 "./asn1/rrc/rrc.cnf"
|
||||
gint32 state_dec = -1;
|
||||
offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
|
||||
4, &state_dec, FALSE, 0, NULL);
|
||||
|
@ -46349,7 +46374,7 @@ dissect_rrc_RLC_Info_r5(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_,
|
|||
|
||||
static int
|
||||
dissect_rrc_MAC_d_FlowIdentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1256 "./asn1/rrc/rrc.cnf"
|
||||
#line 1295 "./asn1/rrc/rrc.cnf"
|
||||
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
|
||||
0U, 7U, &flowd, FALSE);
|
||||
|
||||
|
@ -46397,7 +46422,7 @@ static const per_choice_t DL_TransportChannelType_r5_choice[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_DL_TransportChannelType_r5(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1185 "./asn1/rrc/rrc.cnf"
|
||||
#line 1224 "./asn1/rrc/rrc.cnf"
|
||||
/*Here we try to figure out which HS-DSCH channels are multiplexed*/
|
||||
guint *flowd_p;
|
||||
guint *cur_val=NULL;
|
||||
|
@ -49871,7 +49896,7 @@ static const per_choice_t DL_TransportChannelType_r7_choice[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_DL_TransportChannelType_r7(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1220 "./asn1/rrc/rrc.cnf"
|
||||
#line 1259 "./asn1/rrc/rrc.cnf"
|
||||
/*Here we try to figure out which HS-DSCH channels are multiplexed*/
|
||||
guint *flowd_p;
|
||||
guint *cur_val=NULL;
|
||||
|
@ -91318,7 +91343,7 @@ static const value_string rrc_ReleaseCause_vals[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_ReleaseCause(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1375 "./asn1/rrc/rrc.cnf"
|
||||
#line 1414 "./asn1/rrc/rrc.cnf"
|
||||
guint32 value;
|
||||
offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
|
||||
8, &value, FALSE, 0, NULL);
|
||||
|
@ -96968,7 +96993,7 @@ dissect_rrc_UE_ConnTimersAndConstants(tvbuff_t *tvb _U_, int offset _U_, asn1_ct
|
|||
|
||||
static int
|
||||
dissect_rrc_T_cn_CommonGSM_MAP_NAS_SysInfo_02(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 991 "./asn1/rrc/rrc.cnf"
|
||||
#line 1030 "./asn1/rrc/rrc.cnf"
|
||||
private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_CN_COMMON);
|
||||
offset = dissect_rrc_NAS_SystemInformationGSM_MAP(tvb, offset, actx, tree, hf_index);
|
||||
|
||||
|
@ -99635,7 +99660,7 @@ dissect_rrc_T_r8_04(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pro
|
|||
|
||||
static int
|
||||
dissect_rrc_T_ims_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 938 "./asn1/rrc/rrc.cnf"
|
||||
#line 977 "./asn1/rrc/rrc.cnf"
|
||||
tvbuff_t *imsInformation_tvb=NULL;
|
||||
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
|
||||
1, 32, FALSE, &imsInformation_tvb);
|
||||
|
@ -100825,7 +100850,7 @@ static const per_choice_t DL_DCCH_MessageType_choice[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_DL_DCCH_MessageType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1358 "./asn1/rrc/rrc.cnf"
|
||||
#line 1397 "./asn1/rrc/rrc.cnf"
|
||||
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_DL_DCCH_MessageType, DL_DCCH_MessageType_choice,
|
||||
&msg_type);
|
||||
|
@ -100845,7 +100870,7 @@ static const per_sequence_t DL_DCCH_Message_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_DL_DCCH_Message(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1361 "./asn1/rrc/rrc.cnf"
|
||||
#line 1400 "./asn1/rrc/rrc.cnf"
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_DL_DCCH_Message, DL_DCCH_Message_sequence);
|
||||
|
||||
|
@ -100859,7 +100884,7 @@ dissect_rrc_DL_DCCH_Message(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
|
|||
|
||||
static int
|
||||
dissect_rrc_START_Value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1272 "./asn1/rrc/rrc.cnf"
|
||||
#line 1311 "./asn1/rrc/rrc.cnf"
|
||||
tvbuff_t * start_val;
|
||||
fp_info *fpinf;
|
||||
rlc_info *rlcinf;
|
||||
|
@ -116119,7 +116144,7 @@ static const per_sequence_t IMSI_GSM_MAP_sequence_of[1] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_IMSI_GSM_MAP(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 884 "./asn1/rrc/rrc.cnf"
|
||||
#line 923 "./asn1/rrc/rrc.cnf"
|
||||
wmem_strbuf_t* imsi_strbuf;
|
||||
guint32 string_len;
|
||||
gchar* imsi_string;
|
||||
|
@ -130710,7 +130735,7 @@ static int
|
|||
dissect_rrc_HandoverToUTRANCommand(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
proto_item *prot_ti = proto_tree_add_item(tree, proto_rrc, tvb, 0, -1, ENC_NA);
|
||||
proto_item_set_hidden(prot_ti);
|
||||
#line 1364 "./asn1/rrc/rrc.cnf"
|
||||
#line 1403 "./asn1/rrc/rrc.cnf"
|
||||
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_HandoverToUTRANCommand, HandoverToUTRANCommand_choice,
|
||||
NULL);
|
||||
|
@ -130851,7 +130876,7 @@ static const per_sequence_t UE_SecurityInformation_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_UE_SecurityInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1367 "./asn1/rrc/rrc.cnf"
|
||||
#line 1406 "./asn1/rrc/rrc.cnf"
|
||||
private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_CS);
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_UE_SecurityInformation, UE_SecurityInformation_sequence);
|
||||
|
@ -131254,7 +131279,7 @@ static const per_sequence_t UE_SecurityInformation2_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_UE_SecurityInformation2(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 1371 "./asn1/rrc/rrc.cnf"
|
||||
#line 1410 "./asn1/rrc/rrc.cnf"
|
||||
private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_PS);
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_UE_SecurityInformation2, UE_SecurityInformation2_sequence);
|
||||
|
@ -135791,8 +135816,10 @@ static const per_sequence_t PLMN_IdentityWithOptionalMCC_r6_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_PLMN_IdentityWithOptionalMCC_r6(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 850 "./asn1/rrc/rrc.cnf"
|
||||
#line 862 "./asn1/rrc/rrc.cnf"
|
||||
wmem_strbuf_t* mcc_mnc_strbuf;
|
||||
wmem_strbuf_t* temp_strbuf;
|
||||
wmem_strbuf_t* last_mcc_strbuf;
|
||||
guint32 string_len;
|
||||
gchar* mcc_mnc_string;
|
||||
tvbuff_t* mcc_mnc_tvb;
|
||||
|
@ -135814,10 +135841,35 @@ dissect_rrc_PLMN_IdentityWithOptionalMCC_r6(tvbuff_t *tvb _U_, int offset _U_, a
|
|||
|
||||
/* Extracting the string collected in the strbuf */
|
||||
string_len = (guint32)wmem_strbuf_get_len(mcc_mnc_strbuf);
|
||||
mcc_mnc_string = wmem_strbuf_finalize(mcc_mnc_strbuf);
|
||||
if (string_len > 3) {
|
||||
/* 3 MCC digits and at least 1 MNC digit were found, keep MCC for later
|
||||
in case it's missing in other PLMN ids*/
|
||||
temp_strbuf = wmem_strbuf_sized_new(actx->pinfo->pool,4,4);
|
||||
wmem_strbuf_append_c(temp_strbuf,mcc_mnc_string[0]);
|
||||
wmem_strbuf_append_c(temp_strbuf,mcc_mnc_string[1]);
|
||||
wmem_strbuf_append_c(temp_strbuf,mcc_mnc_string[2]);
|
||||
wmem_strbuf_append_c(temp_strbuf,'\0');
|
||||
private_data_set_last_mcc_strbuf(actx,temp_strbuf);
|
||||
}
|
||||
else {
|
||||
/* mcc_mnc_strbuf Probably only has 3/2 digits of MNC */
|
||||
/* Try to fill MCC form "last MCC" if we have it stored */
|
||||
last_mcc_strbuf = private_data_get_last_mcc_strbuf(actx);
|
||||
if(last_mcc_strbuf)
|
||||
{
|
||||
/* Concat MCC and MNC in temp buffer */
|
||||
temp_strbuf = wmem_strbuf_sized_new(actx->pinfo->pool,7,7);
|
||||
wmem_strbuf_append_printf(temp_strbuf,"%s",wmem_strbuf_get_str(last_mcc_strbuf));
|
||||
wmem_strbuf_append_printf(temp_strbuf,"%s",wmem_strbuf_get_str(mcc_mnc_strbuf));
|
||||
/* Update length of recovered MCC-MNC pair */
|
||||
string_len = (guint32)wmem_strbuf_get_len(temp_strbuf);
|
||||
mcc_mnc_string = wmem_strbuf_finalize(temp_strbuf);
|
||||
}
|
||||
}
|
||||
|
||||
if (string_len >= 5) {
|
||||
/* optional MCC was present, we can call E.212 dissector */
|
||||
/* if not present, we could apply the algorithm in 25.331 chapter 8.1.1.5 */
|
||||
mcc_mnc_string = wmem_strbuf_finalize(mcc_mnc_strbuf);
|
||||
/* optional MCC was present (or restored above), we can call E.212 dissector */
|
||||
|
||||
/* Creating TVB from extracted string*/
|
||||
mcc_mnc_tvb = tvb_new_child_real_data(tvb, (guint8*)mcc_mnc_string, string_len, string_len);
|
||||
|
@ -152267,7 +152319,7 @@ dissect_rrc_ExtSIBTypeInfoSchedulingInfo_List3(tvbuff_t *tvb _U_, int offset _U_
|
|||
|
||||
static int
|
||||
dissect_rrc_HNBName(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 970 "./asn1/rrc/rrc.cnf"
|
||||
#line 1009 "./asn1/rrc/rrc.cnf"
|
||||
tvbuff_t *hnbname_tvb = NULL;
|
||||
|
||||
offset = dissect_per_octet_string(tvb, offset, actx, tree, -1,
|
||||
|
@ -152862,7 +152914,7 @@ dissect_rrc_SIB_ReferenceList2(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac
|
|||
|
||||
static int
|
||||
dissect_rrc_T_cn_CommonGSM_MAP_NAS_SysInfo_03(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 995 "./asn1/rrc/rrc.cnf"
|
||||
#line 1034 "./asn1/rrc/rrc.cnf"
|
||||
private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_CN_COMMON);
|
||||
offset = dissect_rrc_NAS_SystemInformationGSM_MAP(tvb, offset, actx, tree, hf_index);
|
||||
|
||||
|
@ -165032,7 +165084,7 @@ static int dissect_SRNC_RelocationInfo_r7_add_ext_IEs_PDU(tvbuff_t *tvb _U_, pac
|
|||
|
||||
|
||||
/*--- End of included file: packet-rrc-fn.c ---*/
|
||||
#line 403 "./asn1/rrc/packet-rrc-template.c"
|
||||
#line 416 "./asn1/rrc/packet-rrc-template.c"
|
||||
|
||||
|
||||
static int
|
||||
|
@ -208684,7 +208736,7 @@ void proto_register_rrc(void) {
|
|||
NULL, HFILL }},
|
||||
|
||||
/*--- End of included file: packet-rrc-hfarr.c ---*/
|
||||
#line 486 "./asn1/rrc/packet-rrc-template.c"
|
||||
#line 499 "./asn1/rrc/packet-rrc-template.c"
|
||||
{ &hf_test,
|
||||
{ "RAB Test", "rrc.RAB.test",
|
||||
FT_UINT8, BASE_DEC, NULL, 0,
|
||||
|
@ -215688,7 +215740,7 @@ void proto_register_rrc(void) {
|
|||
&ett_rrc_UL_RFC3095_Context,
|
||||
|
||||
/*--- End of included file: packet-rrc-ettarr.c ---*/
|
||||
#line 548 "./asn1/rrc/packet-rrc-template.c"
|
||||
#line 561 "./asn1/rrc/packet-rrc-template.c"
|
||||
&ett_rrc_eutraFeatureGroupIndicators,
|
||||
&ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo,
|
||||
&ett_rrc_ims_info,
|
||||
|
@ -215787,7 +215839,7 @@ void proto_register_rrc(void) {
|
|||
|
||||
|
||||
/*--- End of included file: packet-rrc-dis-reg.c ---*/
|
||||
#line 571 "./asn1/rrc/packet-rrc-template.c"
|
||||
#line 584 "./asn1/rrc/packet-rrc-template.c"
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue