1 /* packet-nr-rrc-template.c
3 * Radio Resource Control (RRC) protocol specification
4 * (3GPP TS 38.331 V18.3.0 Release 18) packet dissection
5 * Copyright 2018-2024, Pascal Quantin
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * SPDX-License-Identifier: GPL-2.0-or-later
18 #include <epan/packet.h>
19 #include <epan/asn1.h>
20 #include <epan/expert.h>
21 #include <epan/reassemble.h>
22 #include <epan/exceptions.h>
23 #include <epan/show_exception.h>
24 #include <epan/proto_data.h>
25 #include <epan/prefs.h>
27 #include <epan/unit_strings.h>
29 #include <wsutil/array.h>
31 #include <wsutil/str_util.h>
32 #include <wsutil/epochs.h>
34 #include "packet-per.h"
35 #include "packet-gsm_map.h"
36 #include "packet-cell_broadcast.h"
37 #include "packet-mac-nr.h"
38 #include "packet-rlc-nr.h"
39 #include "packet-pdcp-nr.h"
40 #include "packet-rrc.h"
41 #include "packet-lte-rrc.h"
42 #include "packet-nr-rrc.h"
43 #include "packet-gsm_a_common.h"
44 #include "packet-lpp.h"
46 #define PNAME "NR Radio Resource Control (RRC) protocol"
47 #define PSNAME "NR RRC"
48 #define PFNAME "nr-rrc"
50 void proto_register_nr_rrc(void);
51 void proto_reg_handoff_nr_rrc(void);
53 static dissector_handle_t nas_5gs_handle
;
54 static dissector_handle_t lte_rrc_conn_reconf_handle
;
55 static dissector_handle_t lte_rrc_conn_reconf_compl_handle
;
56 static dissector_handle_t lte_rrc_ul_dcch_handle
;
57 static dissector_handle_t lte_rrc_dl_dcch_handle
;
59 static wmem_map_t
*nr_rrc_etws_cmas_dcs_hash
;
61 static wmem_map_t
*nr_rrc_dcch_segment_ueid_count_hash
;
62 static wmem_tree_t
*nr_rrc_dcch_segment_id_tree
;
64 static reassembly_table nr_rrc_sib7_reassembly_table
;
65 static reassembly_table nr_rrc_sib8_reassembly_table
;
66 static reassembly_table nr_rrc_dcch_segment_reassembly_table
;
68 static bool nr_rrc_nas_in_root_tree
;
69 static bool nr_rrc_reassemble_dcch_segments
;
71 extern int proto_mac_nr
;
72 extern int proto_rlc_nr
;
73 extern int proto_pdcp_nr
;
75 /* Include constants */
76 #include "packet-nr-rrc-val.h"
78 /* Initialize the protocol and registered fields */
79 static int proto_nr_rrc
;
80 #include "packet-nr-rrc-hf.c"
81 static int hf_nr_rrc_serialNumber_gs
;
82 static int hf_nr_rrc_serialNumber_msg_code
;
83 static int hf_nr_rrc_serialNumber_upd_nb
;
84 static int hf_nr_rrc_warningType_value
;
85 static int hf_nr_rrc_warningType_emergency_user_alert
;
86 static int hf_nr_rrc_warningType_popup
;
87 static int hf_nr_rrc_warningMessageSegment_nb_pages
;
88 static int hf_nr_rrc_warningMessageSegment_decoded_page
;
89 static int hf_nr_rrc_sib7_fragments
;
90 static int hf_nr_rrc_sib7_fragment
;
91 static int hf_nr_rrc_sib7_fragment_overlap
;
92 static int hf_nr_rrc_sib7_fragment_overlap_conflict
;
93 static int hf_nr_rrc_sib7_fragment_multiple_tails
;
94 static int hf_nr_rrc_sib7_fragment_too_long_fragment
;
95 static int hf_nr_rrc_sib7_fragment_error
;
96 static int hf_nr_rrc_sib7_fragment_count
;
97 static int hf_nr_rrc_sib7_reassembled_in
;
98 static int hf_nr_rrc_sib7_reassembled_length
;
99 static int hf_nr_rrc_sib7_reassembled_data
;
100 static int hf_nr_rrc_sib8_fragments
;
101 static int hf_nr_rrc_sib8_fragment
;
102 static int hf_nr_rrc_sib8_fragment_overlap
;
103 static int hf_nr_rrc_sib8_fragment_overlap_conflict
;
104 static int hf_nr_rrc_sib8_fragment_multiple_tails
;
105 static int hf_nr_rrc_sib8_fragment_too_long_fragment
;
106 static int hf_nr_rrc_sib8_fragment_error
;
107 static int hf_nr_rrc_sib8_fragment_count
;
108 static int hf_nr_rrc_sib8_reassembled_in
;
109 static int hf_nr_rrc_sib8_reassembled_length
;
110 static int hf_nr_rrc_sib8_reassembled_data
;
111 static int hf_nr_rrc_dcch_segment_fragments
;
112 static int hf_nr_rrc_dcch_segment_fragment
;
113 static int hf_nr_rrc_dcch_segment_fragment_overlap
;
114 static int hf_nr_rrc_dcch_segment_fragment_overlap_conflict
;
115 static int hf_nr_rrc_dcch_segment_fragment_multiple_tails
;
116 static int hf_nr_rrc_dcch_segment_fragment_too_long_fragment
;
117 static int hf_nr_rrc_dcch_segment_fragment_error
;
118 static int hf_nr_rrc_dcch_segment_fragment_count
;
119 static int hf_nr_rrc_dcch_segment_reassembled_in
;
120 static int hf_nr_rrc_dcch_segment_reassembled_length
;
121 static int hf_nr_rrc_dcch_segment_reassembled_data
;
122 static int hf_nr_rrc_utc_time
;
123 static int hf_nr_rrc_local_time
;
124 static int hf_nr_rrc_absolute_time
;
126 /* Initialize the subtree pointers */
127 static int ett_nr_rrc
;
128 #include "packet-nr-rrc-ett.c"
129 static int ett_nr_rrc_DedicatedNAS_Message
;
130 static int ett_nr_rrc_targetRAT_MessageContainer
;
131 static int ett_nr_rrc_nas_Container
;
132 static int ett_nr_rrc_serialNumber
;
133 static int ett_nr_rrc_warningType
;
134 static int ett_nr_rrc_dataCodingScheme
;
135 static int ett_nr_rrc_sib7_fragment
;
136 static int ett_nr_rrc_sib7_fragments
;
137 static int ett_nr_rrc_sib8_fragment
;
138 static int ett_nr_rrc_sib8_fragments
;
139 static int ett_nr_rrc_dcch_segment_fragment
;
140 static int ett_nr_rrc_dcch_segment_fragments
;
141 static int ett_nr_rrc_warningMessageSegment
;
142 static int ett_nr_rrc_timeInfo
;
143 static int ett_nr_rrc_capabilityRequestFilter
;
144 static int ett_nr_rrc_sourceSCG_EUTRA_Config
;
145 static int ett_nr_rrc_scg_CellGroupConfigEUTRA
;
146 static int ett_nr_rrc_candidateCellInfoListSN_EUTRA
;
147 static int ett_nr_rrc_candidateCellInfoListMN_EUTRA
;
148 static int ett_nr_rrc_sourceConfigSCG_EUTRA
;
149 static int ett_nr_rrc_eutra_SCG
;
150 static int ett_nr_rrc_nr_SCG_Response
;
151 static int ett_nr_rrc_eutra_SCG_Response
;
152 static int ett_nr_rrc_measResultSCG_FailureMRDC
;
153 static int ett_nr_rrc_ul_DCCH_MessageNR
;
154 static int ett_nr_rrc_ul_DCCH_MessageEUTRA
;
155 static int ett_rr_rrc_nas_SecurityParamFromNR
;
156 static int ett_nr_rrc_sidelinkUEInformationNR
;
157 static int ett_nr_rrc_sidelinkUEInformationEUTRA
;
158 static int ett_nr_rrc_ueAssistanceInformationEUTRA
;
159 static int ett_nr_rrc_dl_DCCH_MessageNR
;
160 static int ett_nr_rrc_dl_DCCH_MessageEUTRA
;
161 static int ett_nr_rrc_sl_ConfigDedicatedEUTRA
;
162 static int ett_nr_rrc_sl_CapabilityInformationSidelink
;
163 static int ett_nr_rrc_measResult_RLF_Report_EUTRA
;
164 static int ett_nr_rrc_measResult_RLF_Report_EUTRA_v1690
;
165 static int ett_nr_rrc_locationTimestamp_r16
;
166 static int ett_nr_rrc_locationCoordinate_r16
;
167 static int ett_nr_rrc_locationError_r16
;
168 static int ett_nr_rrc_locationSource_r16
;
169 static int ett_nr_rrc_velocityEstimate_r16
;
170 static int ett_nr_rrc_sensor_MeasurementInformation_r16
;
171 static int ett_nr_rrc_sensor_MotionInformation_r16
;
172 static int ett_nr_rrc_bandParametersSidelinkEUTRA1_r16
;
173 static int ett_nr_rrc_bandParametersSidelinkEUTRA2_r16
;
174 static int ett_nr_rrc_sl_ParametersEUTRA1_r16
;
175 static int ett_nr_rrc_sl_ParametersEUTRA2_r16
;
176 static int ett_nr_rrc_sl_ParametersEUTRA3_r16
;
177 static int ett_nr_rrc_absTimeInfo
;
178 static int ett_nr_rrc_assistanceDataSIB_Element_r16
;
179 static int ett_nr_rrc_sl_V2X_ConfigCommon_r16
;
180 static int ett_nr_rrc_tdd_Config_r16
;
181 static int ett_nr_rrc_coarseLocationInfo_r17
;
182 static int ett_nr_rrc_sl_MeasResultsCandRelay_r17
;
183 static int ett_nr_rrc_sl_MeasResultServingRelay_r17
;
184 static int ett_nr_rrc_ReferenceLocation_r17
;
185 static int ett_nr_rrc_wayPointLocation_r18
;
187 static expert_field ei_nr_rrc_number_pages_le15
;
189 /* Forward declarations */
190 static int dissect_UECapabilityInformationSidelink_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
);
191 static int dissect_DL_DCCH_Message_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
);
192 static int dissect_DL_CCCH_Message_PDU(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
);
193 static int dissect_UL_CCCH_Message_PDU(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
);
194 static int dissect_UERadioAccessCapabilityInformation_PDU(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
);
195 static int dissect_SL_MeasResultListRelay_r17_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
);
196 static int dissect_SL_MeasResultRelay_r17_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
);
198 static const unit_name_string units_periodicities
= { " periodicity", " periodicities" };
199 static const unit_name_string units_prbs
= { " PRB", " PRBs" };
200 static const unit_name_string units_slots
= { " slot", " slots" };
204 uint8_t target_rat_type
;
205 uint16_t message_identifier
;
206 uint8_t warning_message_segment_type
;
207 uint8_t warning_message_segment_number
;
208 nr_drb_mac_rlc_mapping_t drb_rlc_mapping
;
209 nr_drb_rlc_pdcp_mapping_t drb_pdcp_mapping
;
210 lpp_pos_sib_type_t pos_sib_type
;
211 pdcp_nr_security_info_t pdcp_security
;
212 uint8_t dcch_segment_number
;
213 tvbuff_t
*dcch_segment
;
214 bool dcch_segment_last
;
215 } nr_rrc_private_data_t
;
217 /* Helper function to get UE identifier from lower layers (in order MAC, RLC, PDCP) */
219 nr_rrc_get_ueid_from_lower_layers(wmem_allocator_t
*scope
, struct _packet_info
* pinfo
)
222 mac_nr_info
*p_mac_nr_info
= (mac_nr_info
*)p_get_proto_data(scope
, pinfo
, proto_mac_nr
, 0);
223 if (p_mac_nr_info
!= NULL
) {
224 return &p_mac_nr_info
->ueid
;
226 /* Not found, try RLC */
227 rlc_nr_info
*p_rlc_nr_info
= (rlc_nr_info
*)p_get_proto_data(scope
, pinfo
, proto_rlc_nr
, 0);
228 if (p_rlc_nr_info
!= NULL
) {
229 return &p_rlc_nr_info
->ueid
;
231 /* Not found, try PDCP */
232 pdcp_nr_info
*p_pdcp_nr_info
= (pdcp_nr_info
*)p_get_proto_data(scope
, pinfo
, proto_pdcp_nr
, 0);
233 if (p_pdcp_nr_info
!= NULL
) {
234 return &p_pdcp_nr_info
->ueid
;
236 /* Nothing found, give up */
240 /* Helper function to get or create a struct that will be actx->private_data */
241 static nr_rrc_private_data_t
*
242 nr_rrc_get_private_data(asn1_ctx_t
*actx
)
244 if (actx
->private_data
== NULL
) {
245 actx
->private_data
= wmem_new0(actx
->pinfo
->pool
, nr_rrc_private_data_t
);
247 return (nr_rrc_private_data_t
*)actx
->private_data
;
252 nr_rrc_call_dissector(dissector_handle_t handle
, tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
255 call_dissector(handle
, tvb
, pinfo
, tree
);
257 CATCH_BOUNDS_ERRORS
{
258 show_exception(tvb
, pinfo
, tree
, EXCEPT_CODE
, GET_MESSAGE
);
264 nr_rrc_q_RxLevMin_fmt(char *s
, uint32_t v
)
266 int32_t d
= (int32_t)v
;
268 snprintf(s
, ITEM_LABEL_LENGTH
, "%d dB (%d)", 2*d
, d
);
271 static const value_string nr_rrc_serialNumber_gs_vals
[] = {
272 { 0, "Display mode immediate, cell wide"},
273 { 1, "Display mode normal, PLMN wide"},
274 { 2, "Display mode normal, tracking area wide"},
275 { 3, "Display mode normal, cell wide"},
279 static const value_string nr_rrc_warningType_vals
[] = {
282 { 2, "Earthquake and Tsunami"},
288 static const fragment_items nr_rrc_sib7_frag_items
= {
289 &ett_nr_rrc_sib7_fragment
,
290 &ett_nr_rrc_sib7_fragments
,
291 &hf_nr_rrc_sib7_fragments
,
292 &hf_nr_rrc_sib7_fragment
,
293 &hf_nr_rrc_sib7_fragment_overlap
,
294 &hf_nr_rrc_sib7_fragment_overlap_conflict
,
295 &hf_nr_rrc_sib7_fragment_multiple_tails
,
296 &hf_nr_rrc_sib7_fragment_too_long_fragment
,
297 &hf_nr_rrc_sib7_fragment_error
,
298 &hf_nr_rrc_sib7_fragment_count
,
299 &hf_nr_rrc_sib7_reassembled_in
,
300 &hf_nr_rrc_sib7_reassembled_length
,
301 &hf_nr_rrc_sib7_reassembled_data
,
302 "SIB7 warning message segments"
305 static const fragment_items nr_rrc_sib8_frag_items
= {
306 &ett_nr_rrc_sib8_fragment
,
307 &ett_nr_rrc_sib8_fragments
,
308 &hf_nr_rrc_sib8_fragments
,
309 &hf_nr_rrc_sib8_fragment
,
310 &hf_nr_rrc_sib8_fragment_overlap
,
311 &hf_nr_rrc_sib8_fragment_overlap_conflict
,
312 &hf_nr_rrc_sib8_fragment_multiple_tails
,
313 &hf_nr_rrc_sib8_fragment_too_long_fragment
,
314 &hf_nr_rrc_sib8_fragment_error
,
315 &hf_nr_rrc_sib8_fragment_count
,
316 &hf_nr_rrc_sib8_reassembled_in
,
317 &hf_nr_rrc_sib8_reassembled_length
,
318 &hf_nr_rrc_sib8_reassembled_data
,
319 "SIB8 warning message segments"
322 static const fragment_items nr_rrc_dcch_segment_frag_items
= {
323 &ett_nr_rrc_dcch_segment_fragment
,
324 &ett_nr_rrc_dcch_segment_fragments
,
325 &hf_nr_rrc_dcch_segment_fragments
,
326 &hf_nr_rrc_dcch_segment_fragment
,
327 &hf_nr_rrc_dcch_segment_fragment_overlap
,
328 &hf_nr_rrc_dcch_segment_fragment_overlap_conflict
,
329 &hf_nr_rrc_dcch_segment_fragment_multiple_tails
,
330 &hf_nr_rrc_dcch_segment_fragment_too_long_fragment
,
331 &hf_nr_rrc_dcch_segment_fragment_error
,
332 &hf_nr_rrc_dcch_segment_fragment_count
,
333 &hf_nr_rrc_dcch_segment_reassembled_in
,
334 &hf_nr_rrc_dcch_segment_reassembled_length
,
335 &hf_nr_rrc_dcch_segment_reassembled_data
,
336 "DCCH message segments"
340 dissect_nr_rrc_warningMessageSegment(tvbuff_t
*warning_msg_seg_tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint8_t dataCodingScheme
)
343 uint8_t nb_of_pages
, length
, *str
;
345 tvbuff_t
*cb_data_page_tvb
, *cb_data_tvb
;
348 nb_of_pages
= tvb_get_uint8(warning_msg_seg_tvb
, 0);
349 ti
= proto_tree_add_uint(tree
, hf_nr_rrc_warningMessageSegment_nb_pages
, warning_msg_seg_tvb
, 0, 1, nb_of_pages
);
350 if (nb_of_pages
> 15) {
351 expert_add_info_format(pinfo
, ti
, &ei_nr_rrc_number_pages_le15
,
352 "Number of pages should be <=15 (found %u)", nb_of_pages
);
355 for (i
= 0, offset
= 1; i
< nb_of_pages
; i
++) {
356 length
= tvb_get_uint8(warning_msg_seg_tvb
, offset
+82);
357 cb_data_page_tvb
= tvb_new_subset_length(warning_msg_seg_tvb
, offset
, length
);
358 cb_data_tvb
= dissect_cbs_data(dataCodingScheme
, cb_data_page_tvb
, tree
, pinfo
, 0);
360 str
= tvb_get_string_enc(pinfo
->pool
, cb_data_tvb
, 0, tvb_reported_length(cb_data_tvb
), ENC_UTF_8
|ENC_NA
);
361 proto_tree_add_string_format(tree
, hf_nr_rrc_warningMessageSegment_decoded_page
, warning_msg_seg_tvb
, offset
, 83,
362 str
, "Decoded Page %u: %s", i
+1, str
);
368 static const value_string nr_rrc_daylightSavingTime_vals
[] = {
369 { 0, "No adjustment for Daylight Saving Time"},
370 { 1, "+1 hour adjustment for Daylight Saving Time"},
371 { 2, "+2 hours adjustment for Daylight Saving Time"},
377 nr_rrc_localTimeOffset_fmt(char *s
, uint32_t v
)
379 int32_t time_offset
= (int32_t) v
;
381 snprintf(s
, ITEM_LABEL_LENGTH
, "UTC time %c %dhr %dmin (%d)",
382 (time_offset
< 0) ? '-':'+', abs(time_offset
) >> 2,
383 (abs(time_offset
) & 0x03) * 15, time_offset
);
387 nr_rrc_drx_SlotOffset_fmt(char *s
, uint32_t v
)
389 snprintf(s
, ITEM_LABEL_LENGTH
, "%g ms (%u)", 1./32 * v
, v
);
393 nr_rrc_Hysteresis_fmt(char *s
, uint32_t v
)
395 snprintf(s
, ITEM_LABEL_LENGTH
, "%gdB (%u)", 0.5 * v
, v
);
399 nr_rrc_msg3_DeltaPreamble_fmt(char *s
, uint32_t v
)
401 int32_t d
= (int32_t)v
;
403 snprintf(s
, ITEM_LABEL_LENGTH
, "%ddB (%d)", 2 * d
, d
);
407 nr_rrc_Q_RxLevMin_fmt(char *s
, uint32_t v
)
409 int32_t d
= (int32_t)v
;
411 snprintf(s
, ITEM_LABEL_LENGTH
, "%ddBm (%d)", 2 * d
, d
);
415 nr_rrc_RSRP_RangeEUTRA_fmt(char *s
, uint32_t v
)
418 snprintf(s
, ITEM_LABEL_LENGTH
, "RSRP < -140dBm (0)");
420 snprintf(s
, ITEM_LABEL_LENGTH
, "%ddBm <= RSRP < %ddBm (%u)", v
-141, v
-140, v
);
422 snprintf(s
, ITEM_LABEL_LENGTH
, "-44dBm <= RSRP (97)");
427 nr_rrc_RSRQ_RangeEUTRA_fmt(char *s
, uint32_t v
)
430 snprintf(s
, ITEM_LABEL_LENGTH
, "RSRQ < -19.5dB (0)");
432 snprintf(s
, ITEM_LABEL_LENGTH
, "%.1fdB <= RSRQ < %.1fdB (%u)", ((float)v
/2)-20, (((float)v
+1)/2)-20, v
);
434 snprintf(s
, ITEM_LABEL_LENGTH
, "-3dB <= RSRQ (34)");
439 nr_rrc_SINR_RangeEUTRA_fmt(char *s
, uint32_t v
)
442 snprintf(s
, ITEM_LABEL_LENGTH
, "SINR < -23dB (0)");
443 } else if (v
== 127) {
444 snprintf(s
, ITEM_LABEL_LENGTH
, "40dB <= SINR (127)");
446 snprintf(s
, ITEM_LABEL_LENGTH
, "%.1fdB <= SINR < %.1fdB (%u)", (((float)v
-1)/2)-23, ((float)v
/2)-23, v
);
451 nr_rrc_ReselectionThreshold_fmt(char *s
, uint32_t v
)
453 snprintf(s
, ITEM_LABEL_LENGTH
, "%udB (%u)", 2 * v
, v
);
457 nr_rrc_RSRP_Range_fmt(char *s
, uint32_t v
)
460 snprintf(s
, ITEM_LABEL_LENGTH
, "SS-RSRP < -156dBm (0)");
461 } else if (v
< 126) {
462 snprintf(s
, ITEM_LABEL_LENGTH
, "%ddBm <= SS-RSRP < %ddBm (%u)", v
-157, v
-156, v
);
463 } else if (v
== 126) {
464 snprintf(s
, ITEM_LABEL_LENGTH
, "-31dBm <= SS-RSRP (126)");
466 snprintf(s
, ITEM_LABEL_LENGTH
, "infinity (127)");
471 nr_rrc_RSRQ_Range_fmt(char *s
, uint32_t v
)
474 snprintf(s
, ITEM_LABEL_LENGTH
, "SS-RSRQ < -43dB (0)");
475 } else if (v
< 127) {
476 snprintf(s
, ITEM_LABEL_LENGTH
, "%.1fdB <= SS-RSRQ < %.1fdB (%u)", (((float)v
-1)/2)-43, ((float)v
/2)-43, v
);
478 snprintf(s
, ITEM_LABEL_LENGTH
, "20dB <= SS-RSRQ (127)");
483 nr_rrc_SINR_Range_fmt(char *s
, uint32_t v
)
486 snprintf(s
, ITEM_LABEL_LENGTH
, "SS-SINR < -23dB (0)");
487 } else if (v
< 127) {
488 snprintf(s
, ITEM_LABEL_LENGTH
, "%.1fdB <= SS-SINR < %.1fdB (%u)", (((float)v
-1)/2)-23, ((float)v
/2)-23, v
);
490 snprintf(s
, ITEM_LABEL_LENGTH
, "40dB <= SS-SINR (127)");
495 nr_rrc_dl_1024QAM_TotalWeightedLayers_fmt(char *s
, uint32_t v
)
497 snprintf(s
, ITEM_LABEL_LENGTH
, "%u (%u)", 10+(2*v
), v
);
501 nr_rrc_timeConnFailure_r16_fmt(char *s
, uint32_t v
)
503 snprintf(s
, ITEM_LABEL_LENGTH
, "%ums (%u)", 100*v
, v
);
507 nr_rrc_RSSI_Range_r16_fmt(char *s
, uint32_t v
)
510 snprintf(s
, ITEM_LABEL_LENGTH
, "RSSI < -100dBm (0)");
512 snprintf(s
, ITEM_LABEL_LENGTH
, "%ddBm <= RSSI < %ddBm (%u)", v
-101, v
-100, v
);
514 snprintf(s
, ITEM_LABEL_LENGTH
, "-25dBm <= RSSI (76)");
519 nr_rrc_RSRQ_RangeEUTRA_r16_fmt(char *s
, uint32_t v
)
521 int32_t d
= (int32_t)v
;
524 snprintf(s
, ITEM_LABEL_LENGTH
, "RSRQ < -36dB (-34)");
526 snprintf(s
, ITEM_LABEL_LENGTH
, "%.1fdB <= RSRQ < %.1fdB (%d)", (((float)d
-1)/2)-19, ((float)d
/2)-19, d
);
528 snprintf(s
, ITEM_LABEL_LENGTH
, "RSRQ < -19.5dB (0)");
530 snprintf(s
, ITEM_LABEL_LENGTH
, "%.1fdB <= RSRQ < %.1fdB (%d)", (((float)d
-1)/2)-19.5, ((float)d
/2)-19.5, d
);
531 } else if (d
== 34) {
532 snprintf(s
, ITEM_LABEL_LENGTH
, "-3dB <= RSRQ (34)");
534 snprintf(s
, ITEM_LABEL_LENGTH
, "%.1fdB <= RSRQ < %.1fdB (%d)", (((float)d
-1)/2)-20, ((float)d
/2)-20, d
);
536 snprintf(s
, ITEM_LABEL_LENGTH
, "2.5dB <= RSRQ (46)");
541 nr_rrc_utra_FDD_RSCP_r16_fmt(char *s
, uint32_t v
)
543 int32_t d
= (int32_t)v
;
546 snprintf(s
, ITEM_LABEL_LENGTH
, "RSCP < -120dBm (-5)");
548 snprintf(s
, ITEM_LABEL_LENGTH
, "%ddBm <= RSCP < %ddB (%d)", d
-116, d
-115, d
);
550 snprintf(s
, ITEM_LABEL_LENGTH
, "-25dBm <= RSCP (91)");
555 nr_rrc_utra_FDD_EcN0_r16_fmt(char *s
, uint32_t v
)
558 snprintf(s
, ITEM_LABEL_LENGTH
, "Ec/No < -24dB (0)");
560 snprintf(s
, ITEM_LABEL_LENGTH
, "%.1fdB <= Ec/No < %.1fdB (%u)", (((float)v
-1)/2)-24, ((float)v
/2)-24, v
);
562 snprintf(s
, ITEM_LABEL_LENGTH
, "0dB <= Ec/No (49)");
567 nr_rrc_averageDelay_r16_fmt(char *s
, uint32_t v
)
569 snprintf(s
, ITEM_LABEL_LENGTH
, "%.1fms (%u)", (float)v
/10, v
);
573 nr_rrc_measTriggerQuantity_utra_FDD_RSCP_r16_fmt(char *s
, uint32_t v
)
575 int32_t d
= (int32_t)v
;
577 snprintf(s
, ITEM_LABEL_LENGTH
, "%ddBm (%d)", d
-115, d
);
581 nr_rrc_measTriggerQuantity_utra_FDD_EcN0_r16_fmt(char *s
, uint32_t v
)
583 snprintf(s
, ITEM_LABEL_LENGTH
, "%.1fdB (%u)", (float)v
/2-24.5, v
);
587 nr_rrc_SRS_RSRP_r16_fmt(char *s
, uint32_t v
)
590 snprintf(s
, ITEM_LABEL_LENGTH
, "SRS-RSRP < -140dBm (0)");
592 snprintf(s
, ITEM_LABEL_LENGTH
, "%ddBm <= SRS-RSRP < %ddB (%u)", v
-141, v
-140, v
);
593 } else if (v
== 97) {
594 snprintf(s
, ITEM_LABEL_LENGTH
, "-44dBm <= SRS-RSRP (97)");
596 snprintf(s
, ITEM_LABEL_LENGTH
, "Infinity (98)");
601 nr_rrc_MeasTriggerQuantityOffset_fmt(char *s
, uint32_t v
)
603 int32_t d
= (int32_t)v
;
605 snprintf(s
, ITEM_LABEL_LENGTH
, "%.1fdB (%d)", (float)d
/2, d
);
609 nr_rrc_TimeSinceCHO_Reconfig_r17_fmt(char *s
, uint32_t v
)
611 snprintf(s
, ITEM_LABEL_LENGTH
, "%.1fs (%u)", (float)v
/10, v
);
615 nr_rrc_FlightPathUpdateDistanceThr_r18_fmt(char *s
, uint32_t v
)
617 snprintf(s
, ITEM_LABEL_LENGTH
, "%um (%u)", v
*5, v
);
621 dissect_nr_rrc_cg_configinfo_msg(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
)
624 proto_tree
* sub_tree
;
626 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NR RRC");
627 col_set_str(pinfo
->cinfo
, COL_INFO
, "CG-ConfigInfo");
629 ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
630 sub_tree
= proto_item_add_subtree(ti
, ett_nr_rrc
);
631 return dissect_nr_rrc_CG_ConfigInfo_PDU(tvb
, pinfo
, sub_tree
, NULL
);
635 dissect_nr_rrc_radiobearerconfig_msg(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
)
638 proto_tree
* sub_tree
;
640 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NR RRC");
641 col_set_str(pinfo
->cinfo
, COL_INFO
, "RadioBearerConfig");
643 ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
644 sub_tree
= proto_item_add_subtree(ti
, ett_nr_rrc
);
645 return dissect_nr_rrc_RadioBearerConfig_PDU(tvb
, pinfo
, sub_tree
, NULL
);
649 dissect_nr_rrc_ue_mrdc_capability_msg(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
)
652 proto_tree
* sub_tree
;
654 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NR RRC");
655 col_set_str(pinfo
->cinfo
, COL_INFO
, "UE-MRDC-Capability");
657 ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
658 sub_tree
= proto_item_add_subtree(ti
, ett_nr_rrc
);
659 return dissect_nr_rrc_UE_MRDC_Capability_PDU(tvb
, pinfo
, sub_tree
, NULL
);
663 dissect_nr_rrc_ue_nr_capability_msg(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
)
666 proto_tree
* sub_tree
;
668 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NR RRC");
669 col_set_str(pinfo
->cinfo
, COL_INFO
, "UE-NR-Capability");
671 ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
672 sub_tree
= proto_item_add_subtree(ti
, ett_nr_rrc
);
673 return dissect_nr_rrc_UE_NR_Capability_PDU(tvb
, pinfo
, sub_tree
, NULL
);
677 dissect_nr_rrc_ul_dcch_message_msg(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
)
680 proto_tree
* sub_tree
;
682 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NR RRC");
683 col_set_str(pinfo
->cinfo
, COL_INFO
, "UL-DCCH-Message");
685 ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
686 sub_tree
= proto_item_add_subtree(ti
, ett_nr_rrc
);
687 return dissect_nr_rrc_UL_DCCH_Message_PDU(tvb
, pinfo
, sub_tree
, NULL
);
691 dissect_nr_rrc_dl_dcch_message_msg(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
)
694 proto_tree
* sub_tree
;
696 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NR RRC");
697 col_set_str(pinfo
->cinfo
, COL_INFO
, "DL-DCCH-Message");
699 ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
700 sub_tree
= proto_item_add_subtree(ti
, ett_nr_rrc
);
701 return dissect_DL_DCCH_Message_PDU(tvb
, pinfo
, sub_tree
, NULL
);
705 dissect_nr_rrc_dl_ccch_message_msg(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
)
708 proto_tree
* sub_tree
;
710 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NR RRC");
711 col_set_str(pinfo
->cinfo
, COL_INFO
, "DL-CCCH-Message");
713 ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
714 sub_tree
= proto_item_add_subtree(ti
, ett_nr_rrc
);
715 return dissect_DL_CCCH_Message_PDU(tvb
, pinfo
, sub_tree
, NULL
);
719 dissect_nr_rrc_ul_ccch_message_msg(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
)
722 proto_tree
* sub_tree
;
724 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NR RRC");
725 col_set_str(pinfo
->cinfo
, COL_INFO
, "UL-CCCH-Message");
727 ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
728 sub_tree
= proto_item_add_subtree(ti
, ett_nr_rrc
);
729 return dissect_UL_CCCH_Message_PDU(tvb
, pinfo
, sub_tree
, NULL
);
734 dissect_nr_rrc_cellgroupconfig_msg(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
)
737 proto_tree
* sub_tree
;
739 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NR RRC");
740 col_set_str(pinfo
->cinfo
, COL_INFO
, "CellGroupConfig");
742 ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
743 sub_tree
= proto_item_add_subtree(ti
, ett_nr_rrc
);
744 return dissect_nr_rrc_CellGroupConfig_PDU(tvb
, pinfo
, sub_tree
, NULL
);
748 dissect_ueradioaccesscapabilityinformation_msg(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
)
751 proto_tree
* sub_tree
;
753 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NR RRC");
754 col_set_str(pinfo
->cinfo
, COL_INFO
, "UERadioAccessCapabilityInformation");
756 ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
757 sub_tree
= proto_item_add_subtree(ti
, ett_nr_rrc
);
758 return dissect_UERadioAccessCapabilityInformation_PDU(tvb
, pinfo
, sub_tree
, NULL
);
762 dissect_nr_rrc_measconfig_msg(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
)
765 proto_tree
* sub_tree
;
767 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NR RRC");
768 col_set_str(pinfo
->cinfo
, COL_INFO
, "MeasConfig");
770 ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
771 sub_tree
= proto_item_add_subtree(ti
, ett_nr_rrc
);
772 return dissect_nr_rrc_MeasConfig_PDU(tvb
, pinfo
, sub_tree
, NULL
);
776 dissect_nr_rrc_measgapconfig_msg(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
)
779 proto_tree
* sub_tree
;
781 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NR RRC");
782 col_set_str(pinfo
->cinfo
, COL_INFO
, "MeasGapConfig");
784 ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
785 sub_tree
= proto_item_add_subtree(ti
, ett_nr_rrc
);
786 return dissect_nr_rrc_MeasGapConfig_PDU(tvb
, pinfo
, sub_tree
, NULL
);
790 dissect_nr_rrc_handoverpreparationinformation_msg(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
)
793 proto_tree
* sub_tree
;
795 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NR RRC");
796 col_set_str(pinfo
->cinfo
, COL_INFO
, "HandoverPreparationInformation");
798 ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
799 sub_tree
= proto_item_add_subtree(ti
, ett_nr_rrc
);
800 return dissect_nr_rrc_HandoverPreparationInformation_PDU(tvb
, pinfo
, sub_tree
, NULL
);
806 dissect_nr_rrc_rrcreconfiguration_msg(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
)
809 proto_tree
* sub_tree
;
811 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NR RRC");
812 col_set_str(pinfo
->cinfo
, COL_INFO
, "RRCReconfiguration");
814 ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
815 sub_tree
= proto_item_add_subtree(ti
, ett_nr_rrc
);
816 return dissect_nr_rrc_RRCReconfiguration_PDU(tvb
, pinfo
, sub_tree
, NULL
);
821 dissect_nr_rrc_rrcreconfigurationcomplete_msg(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
)
824 proto_tree
* sub_tree
;
826 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NR RRC");
827 col_set_str(pinfo
->cinfo
, COL_INFO
, "RRCReconfigurationComplete");
829 ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
830 sub_tree
= proto_item_add_subtree(ti
, ett_nr_rrc
);
831 return dissect_nr_rrc_RRCReconfigurationComplete_PDU(tvb
, pinfo
, sub_tree
, NULL
);
836 dissect_nr_rrc_ue_capabilityrat_containerlist_msg(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
)
839 proto_tree
* sub_tree
;
841 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NR RRC");
842 col_set_str(pinfo
->cinfo
, COL_INFO
, "UE-CapabilityRAT-ContainerList");
844 ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
845 sub_tree
= proto_item_add_subtree(ti
, ett_nr_rrc
);
846 return dissect_nr_rrc_UE_CapabilityRAT_ContainerList_PDU(tvb
, pinfo
, sub_tree
, NULL
);
850 dissect_nr_rrc_handovercommand_msg(tvbuff_t
* tvb _U_
, packet_info
* pinfo _U_
, proto_tree
* tree _U_
, void* data _U_
)
853 proto_tree
* sub_tree
;
855 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NR RRC");
856 col_set_str(pinfo
->cinfo
, COL_INFO
, "HandoverCommand");
858 ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
859 sub_tree
= proto_item_add_subtree(ti
, ett_nr_rrc
);
860 return dissect_nr_rrc_HandoverCommand_PDU(tvb
, pinfo
, sub_tree
, NULL
);
864 #include "packet-nr-rrc-fn.c"
867 dissect_nr_rrc_nr_RLF_Report_r16_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
) {
868 proto_item
*prot_ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
869 proto_item_set_hidden(prot_ti
);
872 asn1_ctx_init(&asn1_ctx
, ASN1_ENC_PER
, false, pinfo
);
873 offset
= dissect_nr_rrc_T_nr_RLF_Report_r16(tvb
, offset
, &asn1_ctx
, tree
, hf_nr_rrc_BCCH_DL_SCH_Message_PDU
);
874 offset
+= 7; offset
>>= 3;
879 dissect_nr_rrc_subCarrierSpacingCommon_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
) {
880 proto_item
*prot_ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
881 proto_item_set_hidden(prot_ti
);
884 asn1_ctx_init(&asn1_ctx
, ASN1_ENC_PER
, false, pinfo
);
885 offset
= dissect_nr_rrc_T_subCarrierSpacingCommon(tvb
, offset
, &asn1_ctx
, tree
, hf_nr_rrc_BCCH_DL_SCH_Message_PDU
);
886 offset
+= 7; offset
>>= 3;
891 dissect_nr_rrc_rach_ConfigCommonIAB_r16_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
) {
892 proto_item
*prot_ti
= proto_tree_add_item(tree
, proto_nr_rrc
, tvb
, 0, -1, ENC_NA
);
893 proto_item_set_hidden(prot_ti
);
896 asn1_ctx_init(&asn1_ctx
, ASN1_ENC_PER
, false, pinfo
);
897 offset
= dissect_nr_rrc_T_rach_ConfigCommonIAB_r16(tvb
, offset
, &asn1_ctx
, tree
, hf_nr_rrc_BCCH_DL_SCH_Message_PDU
);
898 offset
+= 7; offset
>>= 3;
903 proto_register_nr_rrc(void) {
906 static hf_register_info hf
[] = {
908 #include "packet-nr-rrc-hfarr.c"
910 { &hf_nr_rrc_serialNumber_gs
,
911 { "Geographical Scope", "nr-rrc.serialNumber.gs",
912 FT_UINT16
, BASE_DEC
, VALS(nr_rrc_serialNumber_gs_vals
), 0xc000,
914 { &hf_nr_rrc_serialNumber_msg_code
,
915 { "Message Code", "nr-rrc.serialNumber.msg_code",
916 FT_UINT16
, BASE_DEC
, NULL
, 0x3ff0,
918 { &hf_nr_rrc_serialNumber_upd_nb
,
919 { "Update Number", "nr-rrc.serialNumber.upd_nb",
920 FT_UINT16
, BASE_DEC
, NULL
, 0x000f,
922 { &hf_nr_rrc_warningType_value
,
923 { "Warning Type Value", "nr-rrc.warningType.value",
924 FT_UINT16
, BASE_DEC
, VALS(nr_rrc_warningType_vals
), 0xfe00,
926 { &hf_nr_rrc_warningType_emergency_user_alert
,
927 { "Emergency User Alert", "nr-rrc.warningType.emergency_user_alert",
928 FT_BOOLEAN
, 16, TFS(&tfs_yes_no
), 0x0100,
930 { &hf_nr_rrc_warningType_popup
,
931 { "Popup", "nr-rrc.warningType.popup",
932 FT_BOOLEAN
, 16, TFS(&tfs_yes_no
), 0x0080,
934 { &hf_nr_rrc_warningMessageSegment_nb_pages
,
935 { "Number of Pages", "nr-rrc.warningMessageSegment.nb_pages",
936 FT_UINT8
, BASE_DEC
, NULL
, 0,
938 { &hf_nr_rrc_warningMessageSegment_decoded_page
,
939 { "Decoded Page", "nr-rrc.warningMessageSegment.decoded_page",
940 FT_STRING
, BASE_NONE
, NULL
, 0,
942 { &hf_nr_rrc_sib7_fragments
,
943 { "Fragments", "nr-rrc.warningMessageSegment.fragments",
944 FT_NONE
, BASE_NONE
, NULL
, 0,
946 { &hf_nr_rrc_sib7_fragment
,
947 { "Fragment", "nr-rrc.warningMessageSegment.fragment",
948 FT_FRAMENUM
, BASE_NONE
, NULL
, 0,
950 { &hf_nr_rrc_sib7_fragment_overlap
,
951 { "Fragment Overlap", "nr-rrc.warningMessageSegment.fragment_overlap",
952 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
954 { &hf_nr_rrc_sib7_fragment_overlap_conflict
,
955 { "Fragment Overlap Conflict", "nr-rrc.warningMessageSegment.fragment_overlap_conflict",
956 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
958 { &hf_nr_rrc_sib7_fragment_multiple_tails
,
959 { "Fragment Multiple Tails", "nr-rrc.warningMessageSegment.fragment_multiple_tails",
960 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
962 { &hf_nr_rrc_sib7_fragment_too_long_fragment
,
963 { "Too Long Fragment", "nr-rrc.warningMessageSegment.fragment_too_long_fragment",
964 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
966 { &hf_nr_rrc_sib7_fragment_error
,
967 { "Fragment Error", "nr-rrc.warningMessageSegment.fragment_error",
968 FT_FRAMENUM
, BASE_NONE
, NULL
, 0,
970 { &hf_nr_rrc_sib7_fragment_count
,
971 { "Fragment Count", "nr-rrc.warningMessageSegment.fragment_count",
972 FT_UINT32
, BASE_DEC
, NULL
, 0,
974 { &hf_nr_rrc_sib7_reassembled_in
,
975 { "Reassembled In", "nr-rrc.warningMessageSegment.reassembled_in",
976 FT_FRAMENUM
, BASE_NONE
, NULL
, 0,
978 { &hf_nr_rrc_sib7_reassembled_length
,
979 { "Reassembled Length", "nr-rrc.warningMessageSegment.reassembled_length",
980 FT_UINT32
, BASE_DEC
, NULL
, 0,
982 { &hf_nr_rrc_sib7_reassembled_data
,
983 { "Reassembled Data", "nr-rrc.warningMessageSegment.reassembled_data",
984 FT_BYTES
, BASE_NONE
, NULL
, 0,
986 { &hf_nr_rrc_sib8_fragments
,
987 { "Fragments", "nr-rrc.warningMessageSegment.fragments",
988 FT_NONE
, BASE_NONE
, NULL
, 0,
990 { &hf_nr_rrc_sib8_fragment
,
991 { "Fragment", "nr-rrc.warningMessageSegment.fragment",
992 FT_FRAMENUM
, BASE_NONE
, NULL
, 0,
994 { &hf_nr_rrc_sib8_fragment_overlap
,
995 { "Fragment Overlap", "nr-rrc.warningMessageSegment.fragment_overlap",
996 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
998 { &hf_nr_rrc_sib8_fragment_overlap_conflict
,
999 { "Fragment Overlap Conflict", "nr-rrc.warningMessageSegment.fragment_overlap_conflict",
1000 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
1002 { &hf_nr_rrc_sib8_fragment_multiple_tails
,
1003 { "Fragment Multiple Tails", "nr-rrc.warningMessageSegment.fragment_multiple_tails",
1004 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
1006 { &hf_nr_rrc_sib8_fragment_too_long_fragment
,
1007 { "Too Long Fragment", "nr-rrc.warningMessageSegment.fragment_too_long_fragment",
1008 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
1010 { &hf_nr_rrc_sib8_fragment_error
,
1011 { "Fragment Error", "nr-rrc.warningMessageSegment.fragment_error",
1012 FT_FRAMENUM
, BASE_NONE
, NULL
, 0,
1014 { &hf_nr_rrc_sib8_fragment_count
,
1015 { "Fragment Count", "nr-rrc.warningMessageSegment.fragment_count",
1016 FT_UINT32
, BASE_DEC
, NULL
, 0,
1018 { &hf_nr_rrc_sib8_reassembled_in
,
1019 { "Reassembled In", "nr-rrc.warningMessageSegment.reassembled_in",
1020 FT_FRAMENUM
, BASE_NONE
, NULL
, 0,
1022 { &hf_nr_rrc_sib8_reassembled_length
,
1023 { "Reassembled Length", "nr-rrc.warningMessageSegment.reassembled_length",
1024 FT_UINT32
, BASE_DEC
, NULL
, 0,
1026 { &hf_nr_rrc_sib8_reassembled_data
,
1027 { "Reassembled Data", "nr-rrc.warningMessageSegment.reassembled_data",
1028 FT_BYTES
, BASE_NONE
, NULL
, 0,
1030 { &hf_nr_rrc_dcch_segment_fragments
,
1031 { "Fragments", "nr-rrc.dedicatedMessageSegment_r16.fragments",
1032 FT_NONE
, BASE_NONE
, NULL
, 0,
1034 { &hf_nr_rrc_dcch_segment_fragment
,
1035 { "Fragment", "nr-rrc.dedicatedMessageSegment_r16.fragment",
1036 FT_FRAMENUM
, BASE_NONE
, NULL
, 0,
1038 { &hf_nr_rrc_dcch_segment_fragment_overlap
,
1039 { "Fragment Overlap", "nr-rrc.dedicatedMessageSegment_r16.fragment_overlap",
1040 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
1042 { &hf_nr_rrc_dcch_segment_fragment_overlap_conflict
,
1043 { "Fragment Overlap Conflict", "nr-rrc.dedicatedMessageSegment_r16.fragment_overlap_conflict",
1044 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
1046 { &hf_nr_rrc_dcch_segment_fragment_multiple_tails
,
1047 { "Fragment Multiple Tails", "nr-rrc.dedicatedMessageSegment_r16.fragment_multiple_tails",
1048 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
1050 { &hf_nr_rrc_dcch_segment_fragment_too_long_fragment
,
1051 { "Too Long Fragment", "nr-rrc.dedicatedMessageSegment_r16.fragment_too_long_fragment",
1052 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
1054 { &hf_nr_rrc_dcch_segment_fragment_error
,
1055 { "Fragment Error", "nr-rrc.dedicatedMessageSegment_r16.fragment_error",
1056 FT_FRAMENUM
, BASE_NONE
, NULL
, 0,
1058 { &hf_nr_rrc_dcch_segment_fragment_count
,
1059 { "Fragment Count", "nr-rrc.dedicatedMessageSegment_r16.fragment_count",
1060 FT_UINT32
, BASE_DEC
, NULL
, 0,
1062 { &hf_nr_rrc_dcch_segment_reassembled_in
,
1063 { "Reassembled In", "nr-rrc.dedicatedMessageSegment_r16.reassembled_in",
1064 FT_FRAMENUM
, BASE_NONE
, NULL
, 0,
1066 { &hf_nr_rrc_dcch_segment_reassembled_length
,
1067 { "Reassembled Length", "nr-rrc.dedicatedMessageSegment_r16.reassembled_length",
1068 FT_UINT32
, BASE_DEC
, NULL
, 0,
1070 { &hf_nr_rrc_dcch_segment_reassembled_data
,
1071 { "Reassembled Data", "nr-rrc.dedicatedMessageSegment_r16.reassembled_data",
1072 FT_BYTES
, BASE_NONE
, NULL
, 0,
1074 { &hf_nr_rrc_utc_time
,
1075 { "UTC time", "nr-rrc.utc_time",
1076 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_UTC
, NULL
, 0x0,
1078 { &hf_nr_rrc_local_time
,
1079 { "Local time", "nr-rrc.local_time",
1080 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, NULL
, 0x0,
1082 { &hf_nr_rrc_absolute_time
,
1083 { "Absolute time", "nr-rrc.absolute_time",
1084 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1088 static int *ett
[] = {
1090 #include "packet-nr-rrc-ettarr.c"
1091 &ett_nr_rrc_DedicatedNAS_Message
,
1092 &ett_nr_rrc_targetRAT_MessageContainer
,
1093 &ett_nr_rrc_nas_Container
,
1094 &ett_nr_rrc_serialNumber
,
1095 &ett_nr_rrc_warningType
,
1096 &ett_nr_rrc_dataCodingScheme
,
1097 &ett_nr_rrc_sib7_fragment
,
1098 &ett_nr_rrc_sib7_fragments
,
1099 &ett_nr_rrc_sib8_fragment
,
1100 &ett_nr_rrc_sib8_fragments
,
1101 &ett_nr_rrc_dcch_segment_fragment
,
1102 &ett_nr_rrc_dcch_segment_fragments
,
1103 &ett_nr_rrc_warningMessageSegment
,
1104 &ett_nr_rrc_timeInfo
,
1105 &ett_nr_rrc_capabilityRequestFilter
,
1106 &ett_nr_rrc_sourceSCG_EUTRA_Config
,
1107 &ett_nr_rrc_scg_CellGroupConfigEUTRA
,
1108 &ett_nr_rrc_candidateCellInfoListSN_EUTRA
,
1109 &ett_nr_rrc_candidateCellInfoListMN_EUTRA
,
1110 &ett_nr_rrc_sourceConfigSCG_EUTRA
,
1111 &ett_nr_rrc_eutra_SCG
,
1112 &ett_nr_rrc_nr_SCG_Response
,
1113 &ett_nr_rrc_eutra_SCG_Response
,
1114 &ett_nr_rrc_measResultSCG_FailureMRDC
,
1115 &ett_nr_rrc_ul_DCCH_MessageNR
,
1116 &ett_nr_rrc_ul_DCCH_MessageEUTRA
,
1117 &ett_rr_rrc_nas_SecurityParamFromNR
,
1118 &ett_nr_rrc_sidelinkUEInformationNR
,
1119 &ett_nr_rrc_sidelinkUEInformationEUTRA
,
1120 &ett_nr_rrc_ueAssistanceInformationEUTRA
,
1121 &ett_nr_rrc_dl_DCCH_MessageNR
,
1122 &ett_nr_rrc_dl_DCCH_MessageEUTRA
,
1123 &ett_nr_rrc_sl_ConfigDedicatedEUTRA
,
1124 &ett_nr_rrc_sl_CapabilityInformationSidelink
,
1125 &ett_nr_rrc_measResult_RLF_Report_EUTRA
,
1126 &ett_nr_rrc_measResult_RLF_Report_EUTRA_v1690
,
1127 &ett_nr_rrc_locationTimestamp_r16
,
1128 &ett_nr_rrc_locationCoordinate_r16
,
1129 &ett_nr_rrc_locationError_r16
,
1130 &ett_nr_rrc_locationSource_r16
,
1131 &ett_nr_rrc_velocityEstimate_r16
,
1132 &ett_nr_rrc_sensor_MeasurementInformation_r16
,
1133 &ett_nr_rrc_sensor_MotionInformation_r16
,
1134 &ett_nr_rrc_bandParametersSidelinkEUTRA1_r16
,
1135 &ett_nr_rrc_bandParametersSidelinkEUTRA2_r16
,
1136 &ett_nr_rrc_sl_ParametersEUTRA1_r16
,
1137 &ett_nr_rrc_sl_ParametersEUTRA2_r16
,
1138 &ett_nr_rrc_sl_ParametersEUTRA3_r16
,
1139 &ett_nr_rrc_absTimeInfo
,
1140 &ett_nr_rrc_assistanceDataSIB_Element_r16
,
1141 &ett_nr_rrc_sl_V2X_ConfigCommon_r16
,
1142 &ett_nr_rrc_tdd_Config_r16
,
1143 &ett_nr_rrc_coarseLocationInfo_r17
,
1144 &ett_nr_rrc_sl_MeasResultsCandRelay_r17
,
1145 &ett_nr_rrc_sl_MeasResultServingRelay_r17
,
1146 &ett_nr_rrc_ReferenceLocation_r17
,
1147 &ett_nr_rrc_wayPointLocation_r18
1150 static ei_register_info ei
[] = {
1151 { &ei_nr_rrc_number_pages_le15
, { "nr-rrc.number_pages_le15", PI_MALFORMED
, PI_ERROR
, "Number of pages should be <=15", EXPFILL
}},
1154 expert_module_t
* expert_nr_rrc
;
1155 module_t
*nr_rrc_module
;
1157 /* Register protocol */
1158 proto_nr_rrc
= proto_register_protocol(PNAME
, PSNAME
, PFNAME
);
1160 /* Register fields and subtrees */
1161 proto_register_field_array(proto_nr_rrc
, hf
, array_length(hf
));
1162 proto_register_subtree_array(ett
, array_length(ett
));
1163 expert_nr_rrc
= expert_register_protocol(proto_nr_rrc
);
1164 expert_register_field_array(expert_nr_rrc
, ei
, array_length(ei
));
1166 /* Register the dissectors defined in nr-rrc.cnf */
1167 register_dissector("nr-rrc.cg_configinfo", dissect_nr_rrc_cg_configinfo_msg
, proto_nr_rrc
);
1168 register_dissector("nr-rrc.radiobearerconfig", dissect_nr_rrc_radiobearerconfig_msg
, proto_nr_rrc
);
1169 register_dissector("nr-rrc.rrc_reconf_msg", dissect_nr_rrc_rrcreconfiguration_msg
, proto_nr_rrc
);
1170 register_dissector("nr-rrc.rrc_reconf_compl_msg", dissect_nr_rrc_rrcreconfigurationcomplete_msg
, proto_nr_rrc
);
1171 register_dissector("nr-rrc.ue_capabilityrat_containerlist", dissect_nr_rrc_ue_capabilityrat_containerlist_msg
, proto_nr_rrc
);
1172 register_dissector("nr-rrc.ue_mrdc_cap_msg", dissect_nr_rrc_ue_mrdc_capability_msg
, proto_nr_rrc
);
1173 register_dissector("nr-rrc.ue_nr_cap_msg", dissect_nr_rrc_ue_nr_capability_msg
, proto_nr_rrc
);
1174 register_dissector("nr-rrc.ul.dcch_msg_msg", dissect_nr_rrc_ul_dcch_message_msg
, proto_nr_rrc
);
1175 register_dissector("nr-rrc.dl.dcch_msg_msg", dissect_nr_rrc_dl_dcch_message_msg
, proto_nr_rrc
);
1176 register_dissector("nr-rrc.ul.ccch_msg_msg", dissect_nr_rrc_ul_ccch_message_msg
, proto_nr_rrc
);
1177 register_dissector("nr-rrc.dl.ccch_msg_msg", dissect_nr_rrc_dl_ccch_message_msg
, proto_nr_rrc
);
1178 register_dissector("nr-rrc.cellgroupconfig_msg", dissect_nr_rrc_cellgroupconfig_msg
, proto_nr_rrc
);
1179 register_dissector("nr-rrc.ue_radio_access_cap_info_msg", dissect_ueradioaccesscapabilityinformation_msg
, proto_nr_rrc
);
1180 register_dissector("nr-rrc.measconfig_msg", dissect_nr_rrc_measconfig_msg
, proto_nr_rrc
);
1181 register_dissector("nr-rrc.measgapconfig_msg", dissect_nr_rrc_measgapconfig_msg
, proto_nr_rrc
);
1182 register_dissector("nr-rrc.handoverpreparationinformation_msg", dissect_nr_rrc_handoverpreparationinformation_msg
, proto_nr_rrc
);
1183 register_dissector("nr-rrc.handovercommand_msg", dissect_nr_rrc_handovercommand_msg
, proto_nr_rrc
);
1184 /*#include "packet-nr-rrc-dis-reg.c" */
1185 #include "packet-nr-rrc-dis-reg.c"
1187 nr_rrc_etws_cmas_dcs_hash
= wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(),
1188 g_direct_hash
, g_direct_equal
);
1189 nr_rrc_dcch_segment_ueid_count_hash
= wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(),
1190 g_direct_hash
, g_direct_equal
);
1191 nr_rrc_dcch_segment_id_tree
= wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
1193 reassembly_table_register(&nr_rrc_sib7_reassembly_table
,
1194 &addresses_reassembly_table_functions
);
1195 reassembly_table_register(&nr_rrc_sib8_reassembly_table
,
1196 &addresses_reassembly_table_functions
);
1197 reassembly_table_register(&nr_rrc_dcch_segment_reassembly_table
,
1198 &addresses_reassembly_table_functions
);
1200 /* Register configuration preferences */
1201 nr_rrc_module
= prefs_register_protocol(proto_nr_rrc
, NULL
);
1202 prefs_register_bool_preference(nr_rrc_module
, "nas_in_root_tree",
1203 "Show NAS PDU in root packet details",
1204 "Whether the NAS PDU should be shown in the root packet details tree",
1205 &nr_rrc_nas_in_root_tree
);
1206 prefs_register_bool_preference(nr_rrc_module
, "reassemble_dcch_segments",
1207 "Try to reassemble DCCH segmented messages",
1208 "Whether the NR RRC dissector should attempt to reassemble DCCH segmented messages",
1209 &nr_rrc_reassemble_dcch_segments
);
1213 proto_reg_handoff_nr_rrc(void)
1215 nas_5gs_handle
= find_dissector("nas-5gs");
1216 lte_rrc_conn_reconf_handle
= find_dissector("lte-rrc.rrc_conn_reconf");
1217 lte_rrc_conn_reconf_compl_handle
= find_dissector("lte-rrc.rrc_conn_reconf_compl");
1218 lte_rrc_ul_dcch_handle
= find_dissector("lte-rrc.ul.dcch");
1219 lte_rrc_dl_dcch_handle
= find_dissector("lte-rrc.dl.dcch");