aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorDarien Spencer <cusneud@mail.com>2019-09-21 13:28:38 +0300
committerPascal Quantin <pascal@wireshark.org>2019-09-23 20:17:05 +0000
commit10edd0749a40087586975f513859f56535e5f2bb (patch)
tree33eb15ba295b920c1e2fc49842b228f55887dc2d /epan/dissectors
parent1f01322dc0b0990865955e9c4eacb398b20f6f94 (diff)
RRC: Partial SIB dissection in BCCH-BCH messages
Support detection and dissection of 'complete sib short' payloads which include the entire SIB in a single RRC message. Change-Id: Ie216a394e8f858edad5f3b4b4a0f818986216085 Reviewed-on: https://code.wireshark.org/review/34585 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/asn1/rrc/packet-rrc-template.c41
-rw-r--r--epan/dissectors/asn1/rrc/rrc.cnf121
-rw-r--r--epan/dissectors/packet-rrc.c243
3 files changed, 366 insertions, 39 deletions
diff --git a/epan/dissectors/asn1/rrc/packet-rrc-template.c b/epan/dissectors/asn1/rrc/packet-rrc-template.c
index ad50fe4c6e..6fa156902f 100644
--- a/epan/dissectors/asn1/rrc/packet-rrc-template.c
+++ b/epan/dissectors/asn1/rrc/packet-rrc-template.c
@@ -56,6 +56,19 @@ GTree * rrc_ciph_info_tree = NULL;
wmem_tree_t* rrc_global_urnti_crnti_map = NULL;
static int msg_type _U_;
+enum rrc_sib_segment_type {
+ RRC_SIB_SEG_NO_SEGMENT = 0,
+ RRC_SIB_SEG_FIRST = 1,
+ RRC_SIB_SEG_SUBSEQUENT = 2,
+ RRC_SIB_SEG_LAST_SHORT = 3,
+ RRC_SIB_SEG_LAST_AND_FIRST = 4,
+ RRC_SIB_SEG_LAST_AND_COMP = 5,
+ RRC_SIB_SEG_LAST_AND_COMP_AND_FIRST = 6,
+ RRC_SIB_SEG_COMP_LIST = 7,
+ RRC_SIB_SEG_COMP_AND_FIRST = 8,
+ RRC_SIB_SEG_COMP = 10,
+};
+
/*****************************************************************************/
/* Packet private data */
/* For this dissector, all access to actx->private_data should be made */
@@ -77,6 +90,8 @@ typedef struct umts_rrc_private_data_t
guint32 rlc_ciphering_sqn; /* Sequence number where ciphering starts in a given bearer */
rrc_ciphering_info* ciphering_info;
enum rrc_ue_state rrc_state_indicator;
+ enum rrc_sib_segment_type curr_sib_segment_type;
+ guint32 curr_sib_type;
} umts_rrc_private_data_t;
@@ -245,6 +260,30 @@ static void private_data_set_rrc_state_indicator(asn1_ctx_t *actx, enum rrc_ue_s
private_data->rrc_state_indicator = rrc_state_indicator;
}
+static enum rrc_sib_segment_type private_data_get_curr_sib_segment_type(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->curr_sib_segment_type;
+}
+
+static void private_data_set_curr_sib_segment_type(asn1_ctx_t *actx, enum rrc_sib_segment_type curr_sib_segment_type)
+{
+ umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
+ private_data->curr_sib_segment_type = curr_sib_segment_type;
+}
+
+static guint32 private_data_get_curr_sib_type(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->curr_sib_type;
+}
+
+static void private_data_set_curr_sib_type(asn1_ctx_t *actx, guint32 curr_sib_type)
+{
+ umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
+ private_data->curr_sib_type = curr_sib_type;
+}
+
/*****************************************************************************/
static dissector_handle_t gsm_a_dtap_handle;
@@ -289,6 +328,7 @@ static gint ett_rrc_eutraFeatureGroupIndicators = -1;
static gint ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo = -1;
static gint ett_rrc_ims_info = -1;
static gint ett_rrc_cellIdentity = -1;
+static gint ett_rrc_sib_data_var = -1;
static expert_field ei_rrc_no_hrnti = EI_INIT;
@@ -562,6 +602,7 @@ void proto_register_rrc(void) {
&ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo,
&ett_rrc_ims_info,
&ett_rrc_cellIdentity,
+ &ett_rrc_sib_data_var,
};
static ei_register_info ei[] = {
diff --git a/epan/dissectors/asn1/rrc/rrc.cnf b/epan/dissectors/asn1/rrc/rrc.cnf
index 058e8e03aa..0887c0bd23 100644
--- a/epan/dissectors/asn1/rrc/rrc.cnf
+++ b/epan/dissectors/asn1/rrc/rrc.cnf
@@ -973,6 +973,127 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
wmem_strbuf_append_c(digits_strbuf, digit_char);
}
+#.FN_BODY CompleteSIBshort
+ private_data_set_curr_sib_segment_type(actx,RRC_SIB_SEG_COMP);
+%(DEFAULT_BODY)s
+ private_data_set_curr_sib_segment_type(actx,RRC_SIB_SEG_NO_SEGMENT); /* Resetting value */
+
+#.FN_BODY SIB-Type VAL_PTR = &sib_type
+ guint32 sib_type;
+%(DEFAULT_BODY)s
+ private_data_set_curr_sib_type(actx,sib_type);
+
+#.FN_BODY SIB-Data-variable VAL_PTR = &sib_data_tvb
+ tvbuff_t *sib_data_tvb;
+ guint32 sib_type;
+ proto_tree *subtree;
+ guint32 seg_type;
+
+%(DEFAULT_BODY)s
+
+ seg_type = (guint32)private_data_get_curr_sib_segment_type(actx);
+ if(seg_type != RRC_SIB_SEG_COMP) {
+ /* TODO: The Dissector only handles 'complete SIBs' right now.
+ * Reassembly logic should be implemented, taking into acocunt that
+ * different fragments might arrive in different frames.
+ */
+ return offset;
+ }
+
+ /* This is a complete SIB - Call handler according to previous SIB-Type field*/
+ subtree = proto_item_add_subtree(actx->created_item, ett_rrc_sib_data_var);
+ sib_type = private_data_get_curr_sib_type(actx);
+ switch(sib_type){
+ case 0:
+ /* mIB */
+ dissect_rrc_MasterInformationBlock_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 1:
+ dissect_rrc_SysInfoType1_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 2:
+ dissect_rrc_SysInfoType2_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 3:
+ dissect_rrc_SysInfoType3_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 4:
+ dissect_rrc_SysInfoType4_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 5:
+ dissect_rrc_SysInfoType5_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 6:
+ dissect_rrc_SysInfoType6_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 7:
+ dissect_rrc_SysInfoType7_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 11:
+ dissect_rrc_SysInfoType11_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 12:
+ dissect_rrc_SysInfoType12_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 13:
+ dissect_rrc_SysInfoType13_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 14:
+ /* SIB-Type: systemInformationBlockType13-1 */
+ dissect_rrc_SysInfoType13_1_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 15:
+ /* SIB-Type: systemInformationBlockType13-2 */
+ dissect_rrc_SysInfoType13_2_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 16:
+ /* SIB-Type: systemInformationBlockType13-3 */
+ dissect_rrc_SysInfoType13_3_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 17:
+ /* SIB-Type: systemInformationBlockType13-4 */
+ dissect_rrc_SysInfoType13_4_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 18:
+ /* SIB-Type: systemInformationBlockType14 */
+ dissect_rrc_SysInfoType14_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 19:
+ /* SIB-Type: systemInformationBlockType15 */
+ dissect_rrc_SysInfoType15_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 20:
+ /* SIB-Type: systemInformationBlockType15-1 */
+ dissect_rrc_SysInfoType15_1_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 21:
+ /* SIB-Type: systemInformationBlockType15-2 */
+ dissect_rrc_SysInfoType15_2_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 22:
+ /* SIB-Type: systemInformationBlockType15-3 */
+ dissect_rrc_SysInfoType15_3_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 23:
+ /* SIB-Type: systemInformationBlockType16 */
+ dissect_rrc_SysInfoType16_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 24:
+ /* SIB-Type: systemInformationBlockType17 */
+ dissect_rrc_SysInfoType17_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 25:
+ /* SIB-Type: systemInformationBlockType15-4 */
+ dissect_rrc_SysInfoType15_4_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 26:
+ /* SIB-Type: systemInformationBlockType18 */
+ dissect_rrc_SysInfoType18_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ default:
+ break;
+ }
+
#.FN_BODY RSR-VCC-Info/ims-Information VAL_PTR = &imsInformation_tvb
tvbuff_t *imsInformation_tvb=NULL;
%(DEFAULT_BODY)s
diff --git a/epan/dissectors/packet-rrc.c b/epan/dissectors/packet-rrc.c
index 6422582156..d65fe792c2 100644
--- a/epan/dissectors/packet-rrc.c
+++ b/epan/dissectors/packet-rrc.c
@@ -64,6 +64,19 @@ GTree * rrc_ciph_info_tree = NULL;
wmem_tree_t* rrc_global_urnti_crnti_map = NULL;
static int msg_type _U_;
+enum rrc_sib_segment_type {
+ RRC_SIB_SEG_NO_SEGMENT = 0,
+ RRC_SIB_SEG_FIRST = 1,
+ RRC_SIB_SEG_SUBSEQUENT = 2,
+ RRC_SIB_SEG_LAST_SHORT = 3,
+ RRC_SIB_SEG_LAST_AND_FIRST = 4,
+ RRC_SIB_SEG_LAST_AND_COMP = 5,
+ RRC_SIB_SEG_LAST_AND_COMP_AND_FIRST = 6,
+ RRC_SIB_SEG_COMP_LIST = 7,
+ RRC_SIB_SEG_COMP_AND_FIRST = 8,
+ RRC_SIB_SEG_COMP = 10,
+};
+
/*****************************************************************************/
/* Packet private data */
/* For this dissector, all access to actx->private_data should be made */
@@ -85,6 +98,8 @@ typedef struct umts_rrc_private_data_t
guint32 rlc_ciphering_sqn; /* Sequence number where ciphering starts in a given bearer */
rrc_ciphering_info* ciphering_info;
enum rrc_ue_state rrc_state_indicator;
+ enum rrc_sib_segment_type curr_sib_segment_type;
+ guint32 curr_sib_type;
} umts_rrc_private_data_t;
@@ -253,6 +268,30 @@ static void private_data_set_rrc_state_indicator(asn1_ctx_t *actx, enum rrc_ue_s
private_data->rrc_state_indicator = rrc_state_indicator;
}
+static enum rrc_sib_segment_type private_data_get_curr_sib_segment_type(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->curr_sib_segment_type;
+}
+
+static void private_data_set_curr_sib_segment_type(asn1_ctx_t *actx, enum rrc_sib_segment_type curr_sib_segment_type)
+{
+ umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
+ private_data->curr_sib_segment_type = curr_sib_segment_type;
+}
+
+static guint32 private_data_get_curr_sib_type(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->curr_sib_type;
+}
+
+static void private_data_set_curr_sib_type(asn1_ctx_t *actx, guint32 curr_sib_type)
+{
+ umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
+ private_data->curr_sib_type = curr_sib_type;
+}
+
/*****************************************************************************/
static dissector_handle_t gsm_a_dtap_handle;
@@ -477,7 +516,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 274 "./asn1/rrc/packet-rrc-template.c"
+#line 313 "./asn1/rrc/packet-rrc-template.c"
/* Initialize the protocol and registered fields */
int proto_rrc = -1;
@@ -11382,7 +11421,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 282 "./asn1/rrc/packet-rrc-template.c"
+#line 321 "./asn1/rrc/packet-rrc-template.c"
/* Initialize the subtree pointers */
static int ett_rrc = -1;
@@ -18329,12 +18368,13 @@ 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 287 "./asn1/rrc/packet-rrc-template.c"
+#line 326 "./asn1/rrc/packet-rrc-template.c"
static gint ett_rrc_eutraFeatureGroupIndicators = -1;
static gint ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo = -1;
static gint ett_rrc_ims_info = -1;
static gint ett_rrc_cellIdentity = -1;
+static gint ett_rrc_sib_data_var = -1;
static expert_field ei_rrc_no_hrnti = EI_INIT;
@@ -18699,7 +18739,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 1386 "./asn1/rrc/rrc.cnf"
+#line 1507 "./asn1/rrc/rrc.cnf"
guint32 rbid;
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
1U, 32U, &rbid, FALSE);
@@ -18716,7 +18756,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 1392 "./asn1/rrc/rrc.cnf"
+#line 1513 "./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);
@@ -18737,7 +18777,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 1356 "./asn1/rrc/rrc.cnf"
+#line 1477 "./asn1/rrc/rrc.cnf"
fp_info *fpinf;
rlc_info *rlcinf;
rrc_ciphering_info *ciphering_info;
@@ -18808,7 +18848,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 1070 "./asn1/rrc/rrc.cnf"
+#line 1191 "./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);
@@ -18826,7 +18866,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 1077 "./asn1/rrc/rrc.cnf"
+#line 1198 "./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);
@@ -18849,7 +18889,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 1084 "./asn1/rrc/rrc.cnf"
+#line 1205 "./asn1/rrc/rrc.cnf"
private_data_set_s_rnc_id(actx, 0);
private_data_set_s_rnti(actx, 0);
guint32 s_rnc_id;
@@ -19025,7 +19065,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 1038 "./asn1/rrc/rrc.cnf"
+#line 1159 "./asn1/rrc/rrc.cnf"
tvbuff_t *nas_sys_info_gsm_map_tvb = NULL;
guint32 length;
enum nas_sys_info_gsm_map cn_domain;
@@ -19068,7 +19108,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 1022 "./asn1/rrc/rrc.cnf"
+#line 1143 "./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);
@@ -19088,7 +19128,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 1015 "./asn1/rrc/rrc.cnf"
+#line 1136 "./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);
@@ -22766,7 +22806,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 1210 "./asn1/rrc/rrc.cnf"
+#line 1331 "./asn1/rrc/rrc.cnf"
tvbuff_t * cell_id_tvb = NULL;
proto_item *temp_ti;
proto_tree *cell_identity_tree;
@@ -22991,7 +23031,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 1298 "./asn1/rrc/rrc.cnf"
+#line 1419 "./asn1/rrc/rrc.cnf"
tvbuff_t *hrnti_tvb;
struct rrc_info *rrcinf;
offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
@@ -23000,7 +23040,7 @@ dissect_rrc_H_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot
-#line 1303 "./asn1/rrc/rrc.cnf"
+#line 1424 "./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);
@@ -23026,7 +23066,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 1026 "./asn1/rrc/rrc.cnf"
+#line 1147 "./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);
@@ -28500,7 +28540,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 1197 "./asn1/rrc/rrc.cnf"
+#line 1318 "./asn1/rrc/rrc.cnf"
guint32 scrambling_code;
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
0U, 16777215U, &scrambling_code, FALSE);
@@ -39245,7 +39285,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 1127 "./asn1/rrc/rrc.cnf"
+#line 1248 "./asn1/rrc/rrc.cnf"
fp_info *fpinf = NULL;
umts_mac_info *macinf = NULL;
rlc_info *rlcinf = NULL;
@@ -39334,7 +39374,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 1202 "./asn1/rrc/rrc.cnf"
+#line 1323 "./asn1/rrc/rrc.cnf"
gint32 state_dec = -1;
offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
4, &state_dec, FALSE, 0, NULL);
@@ -46374,7 +46414,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 1295 "./asn1/rrc/rrc.cnf"
+#line 1416 "./asn1/rrc/rrc.cnf"
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
0U, 7U, &flowd, FALSE);
@@ -46422,7 +46462,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 1224 "./asn1/rrc/rrc.cnf"
+#line 1345 "./asn1/rrc/rrc.cnf"
/*Here we try to figure out which HS-DSCH channels are multiplexed*/
guint *flowd_p;
guint *cur_val=NULL;
@@ -49896,7 +49936,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 1259 "./asn1/rrc/rrc.cnf"
+#line 1380 "./asn1/rrc/rrc.cnf"
/*Here we try to figure out which HS-DSCH channels are multiplexed*/
guint *flowd_p;
guint *cur_val=NULL;
@@ -91343,7 +91383,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 1414 "./asn1/rrc/rrc.cnf"
+#line 1535 "./asn1/rrc/rrc.cnf"
guint32 value;
offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
8, &value, FALSE, 0, NULL);
@@ -96993,7 +97033,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 1030 "./asn1/rrc/rrc.cnf"
+#line 1151 "./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);
@@ -99660,7 +99700,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 977 "./asn1/rrc/rrc.cnf"
+#line 1098 "./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);
@@ -100850,7 +100890,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 1397 "./asn1/rrc/rrc.cnf"
+#line 1518 "./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);
@@ -100870,7 +100910,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 1400 "./asn1/rrc/rrc.cnf"
+#line 1521 "./asn1/rrc/rrc.cnf"
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_rrc_DL_DCCH_Message, DL_DCCH_Message_sequence);
@@ -100884,7 +100924,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 1311 "./asn1/rrc/rrc.cnf"
+#line 1432 "./asn1/rrc/rrc.cnf"
tvbuff_t * start_val;
fp_info *fpinf;
rlc_info *rlcinf;
@@ -122720,8 +122760,14 @@ static value_string_ext rrc_SIB_Type_vals_ext = VALUE_STRING_EXT_INIT(rrc_SIB_Ty
static int
dissect_rrc_SIB_Type(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
+#line 982 "./asn1/rrc/rrc.cnf"
+ guint32 sib_type;
offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
- 32, NULL, FALSE, 0, NULL);
+ 32, &sib_type, FALSE, 0, NULL);
+
+ private_data_set_curr_sib_type(actx,sib_type);
+
+
return offset;
}
@@ -122782,8 +122828,120 @@ dissect_rrc_SubsequentSegment(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
static int
dissect_rrc_SIB_Data_variable(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"
+ tvbuff_t *sib_data_tvb;
+ guint32 sib_type;
+ proto_tree *subtree;
+ guint32 seg_type;
+
offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
- 1, 214, FALSE, NULL, 0, NULL, NULL);
+ 1, 214, FALSE, NULL, 0, &sib_data_tvb, NULL);
+
+
+ seg_type = (guint32)private_data_get_curr_sib_segment_type(actx);
+ if(seg_type != RRC_SIB_SEG_COMP) {
+ /* TODO: The Dissector only handles 'complete SIBs' right now.
+ * Reassembly logic should be implemented, taking into acocunt that
+ * different fragments might arrive in different frames.
+ */
+ return offset;
+ }
+
+ /* This is a complete SIB - Call handler according to previous SIB-Type field*/
+ subtree = proto_item_add_subtree(actx->created_item, ett_rrc_sib_data_var);
+ sib_type = private_data_get_curr_sib_type(actx);
+ switch(sib_type){
+ case 0:
+ /* mIB */
+ dissect_rrc_MasterInformationBlock_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 1:
+ dissect_rrc_SysInfoType1_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 2:
+ dissect_rrc_SysInfoType2_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 3:
+ dissect_rrc_SysInfoType3_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 4:
+ dissect_rrc_SysInfoType4_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 5:
+ dissect_rrc_SysInfoType5_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 6:
+ dissect_rrc_SysInfoType6_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 7:
+ dissect_rrc_SysInfoType7_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 11:
+ dissect_rrc_SysInfoType11_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 12:
+ dissect_rrc_SysInfoType12_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 13:
+ dissect_rrc_SysInfoType13_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 14:
+ /* SIB-Type: systemInformationBlockType13-1 */
+ dissect_rrc_SysInfoType13_1_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 15:
+ /* SIB-Type: systemInformationBlockType13-2 */
+ dissect_rrc_SysInfoType13_2_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 16:
+ /* SIB-Type: systemInformationBlockType13-3 */
+ dissect_rrc_SysInfoType13_3_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 17:
+ /* SIB-Type: systemInformationBlockType13-4 */
+ dissect_rrc_SysInfoType13_4_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 18:
+ /* SIB-Type: systemInformationBlockType14 */
+ dissect_rrc_SysInfoType14_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 19:
+ /* SIB-Type: systemInformationBlockType15 */
+ dissect_rrc_SysInfoType15_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 20:
+ /* SIB-Type: systemInformationBlockType15-1 */
+ dissect_rrc_SysInfoType15_1_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 21:
+ /* SIB-Type: systemInformationBlockType15-2 */
+ dissect_rrc_SysInfoType15_2_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 22:
+ /* SIB-Type: systemInformationBlockType15-3 */
+ dissect_rrc_SysInfoType15_3_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 23:
+ /* SIB-Type: systemInformationBlockType16 */
+ dissect_rrc_SysInfoType16_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 24:
+ /* SIB-Type: systemInformationBlockType17 */
+ dissect_rrc_SysInfoType17_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 25:
+ /* SIB-Type: systemInformationBlockType15-4 */
+ dissect_rrc_SysInfoType15_4_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ case 26:
+ /* SIB-Type: systemInformationBlockType18 */
+ dissect_rrc_SysInfoType18_PDU(sib_data_tvb, actx->pinfo, subtree, NULL);
+ break;
+ default:
+ break;
+ }
+
+
return offset;
}
@@ -122844,9 +123002,15 @@ static const per_sequence_t CompleteSIBshort_sequence[] = {
static int
dissect_rrc_CompleteSIBshort(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
+#line 977 "./asn1/rrc/rrc.cnf"
+ private_data_set_curr_sib_segment_type(actx,RRC_SIB_SEG_COMP);
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_rrc_CompleteSIBshort, CompleteSIBshort_sequence);
+ private_data_set_curr_sib_segment_type(actx,RRC_SIB_SEG_NO_SEGMENT); /* Resetting value */
+
+
+
return offset;
}
@@ -130735,7 +130899,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 1403 "./asn1/rrc/rrc.cnf"
+#line 1524 "./asn1/rrc/rrc.cnf"
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
ett_rrc_HandoverToUTRANCommand, HandoverToUTRANCommand_choice,
NULL);
@@ -130876,7 +131040,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 1406 "./asn1/rrc/rrc.cnf"
+#line 1527 "./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);
@@ -131279,7 +131443,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 1410 "./asn1/rrc/rrc.cnf"
+#line 1531 "./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);
@@ -152319,7 +152483,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 1009 "./asn1/rrc/rrc.cnf"
+#line 1130 "./asn1/rrc/rrc.cnf"
tvbuff_t *hnbname_tvb = NULL;
offset = dissect_per_octet_string(tvb, offset, actx, tree, -1,
@@ -152914,7 +153078,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 1034 "./asn1/rrc/rrc.cnf"
+#line 1155 "./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);
@@ -165084,7 +165248,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 416 "./asn1/rrc/packet-rrc-template.c"
+#line 456 "./asn1/rrc/packet-rrc-template.c"
static int
@@ -208736,7 +208900,7 @@ void proto_register_rrc(void) {
NULL, HFILL }},
/*--- End of included file: packet-rrc-hfarr.c ---*/
-#line 499 "./asn1/rrc/packet-rrc-template.c"
+#line 539 "./asn1/rrc/packet-rrc-template.c"
{ &hf_test,
{ "RAB Test", "rrc.RAB.test",
FT_UINT8, BASE_DEC, NULL, 0,
@@ -215740,11 +215904,12 @@ void proto_register_rrc(void) {
&ett_rrc_UL_RFC3095_Context,
/*--- End of included file: packet-rrc-ettarr.c ---*/
-#line 561 "./asn1/rrc/packet-rrc-template.c"
+#line 601 "./asn1/rrc/packet-rrc-template.c"
&ett_rrc_eutraFeatureGroupIndicators,
&ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo,
&ett_rrc_ims_info,
&ett_rrc_cellIdentity,
+ &ett_rrc_sib_data_var,
};
static ei_register_info ei[] = {
@@ -215839,7 +216004,7 @@ void proto_register_rrc(void) {
/*--- End of included file: packet-rrc-dis-reg.c ---*/
-#line 584 "./asn1/rrc/packet-rrc-template.c"
+#line 625 "./asn1/rrc/packet-rrc-template.c"