1 /* packet-nfapi.c
2  * Routines for Network Function Application Platform Interface (nFAPI) dissection
3  * Copyright 2017 Cisco Systems, Inc.
4  *
5  * Wireshark - Network traffic analyzer
6  * By Gerald Combs <gerald@wireshark.org>
7  * Copyright 1998 Gerald Combs
8  *
9  * SPDX-License-Identifier: GPL-2.0-or-later
10  *
11  * References:
12  * SCF082.09.04  http://scf.io/en/documents/082_-_nFAPI_and_FAPI_specifications.php
13  *
14  */
15 
16 #include "config.h"
17 
18 #include <epan/packet.h>
19 #include <epan/exceptions.h>
20 #include <epan/expert.h>
21 #include <epan/reassemble.h>
22 #include <epan/wmem_scopes.h>
23 
24 #include <ptvcursor.h>
25 
26 void proto_register_nfapi(void);
27 void proto_reg_handoff_nfapi(void);
28 
29 #define NFAPI_HEADER_LENGTH 8
30 #define NFAPI_P7_HEADER_LENGTH 16
31 
32 static const unit_name_string khz_100_units_db = { " (100)khz", NULL };
33 
34 typedef enum{
35 	NFAPI_DL_CONFIG_REQUEST_MSG_ID = 0x0080,
36 	NFAPI_UL_CONFIG_REQUEST_MSG_ID,
37 	NFAPI_SUBFRAME_INDICATION_MSG_ID,
38 	NFAPI_HI_DCI0_REQUEST_MSG_ID,
39 	NFAPI_TX_REQUEST_MSG_ID,
40 	NFAPI_HARQ_INDICATION_MSG_ID,
41 	NFAPI_CRC_INDICATION_MSG_ID,
42 	NFAPI_RX_ULSCH_INDICATION_MSG_ID,
43 	NFAPI_RACH_INDICATION_MSG_ID,
44 	NFAPI_SRS_INDICATION_MSG_ID,
45 	NFAPI_RX_SR_INDICATION_MSG_ID,
46 	NFAPI_RX_CQI_INDICATION_MSG_ID,
47 	NFAPI_LBT_DL_CONFIG_REQUEST_MSG_ID,
48 	NFAPI_LBT_DL_INDICATION_MSG_ID,
49 
50 	NFAPI_PNF_PARAM_REQUEST_MSG_ID = 0x0100,
51 	NFAPI_PNF_PARAM_RESPONSE_MSG_ID,
52 	NFAPI_PNF_CONFIG_REQUEST_MSG_ID,
53 	NFAPI_PNF_CONFIG_RESPONSE_MSG_ID,
54 	NFAPI_PNF_START_REQUEST_MSG_ID,
55 	NFAPI_PNF_START_RESPONSE_MSG_ID,
56 	NFAPI_PNF_STOP_REQUEST_MSG_ID,
57 	NFAPI_PNF_STOP_RESPONSE_MSG_ID,
58 	NFAPI_PARAM_REQUEST_MSG_ID,
59 	NFAPI_PARAM_RESPONSE_MSG_ID,
60 	NFAPI_CONFIG_REQUEST_MSG_ID,
61 	NFAPI_CONFIG_RESPONSE_MSG_ID,
62 	NFAPI_START_REQUEST_MSG_ID,
63 	NFAPI_START_RESPONSE_MSG_ID,
64 	NFAPI_STOP_REQUEST_MSG_ID,
65 	NFAPI_STOP_RESPONSE_MSG_ID,
66 	NFAPI_MEASUREMENT_REQUEST_MSG_ID,
67 	NFAPI_MEASUREMENT_RESPONSE_MSG_ID,
68 
69 	NFAPI_DL_NODE_SYNC_MSG_ID = 0x0180,
70 	NFAPI_UL_NODE_SYNC_MSG_ID,
71 	NFAPI_TIMING_INFO_MSG_ID,
72 
73 	NFAPI_RSSI_REQUEST_MSG_ID = 0x0200,
74 	NFAPI_RSSI_RESPONSE_MSG_ID,
75 	NFAPI_RSSI_INDICATION_MSG_ID,
76 	NFAPI_CELL_SEARCH_REQUEST_MSG_ID,
77 	NFAPI_CELL_SEARCH_RESPONSE_MSG_ID,
78 	NFAPI_CELL_SEARCH_INDICATION_MSG_ID,
79 	NFAPI_BROADCAST_DETECT_REQUEST_MSG_ID,
80 	NFAPI_BROADCAST_DETECT_RESPONSE_MSG_ID,
81 	NFAPI_BROADCAST_DETECT_INDICATION_MSG_ID,
82 	NFAPI_SYSTEM_INFORMATION_SCHEDULE_REQUEST_MSG_ID,
83 	NFAPI_SYSTEM_INFORMATION_SCHEDULE_RESPONSE_MSG_ID,
84 	NFAPI_SYSTEM_INFORMATION_SCHEDULE_INDICATION_MSG_ID,
85 	NFAPI_SYSTEM_INFORMATION_REQUEST_MSG_ID,
86 	NFAPI_SYSTEM_INFORMATION_RESPONSE_MSG_ID,
87 	NFAPI_SYSTEM_INFORMATION_INDICATION_MSG_ID,
88 	NFAPI_NMM_STOP_REQUEST_MSG_ID,
89 	NFAPI_NMM_STOP_RESPONSE_MSG_ID,
90 } nfapi_message_id_e;
91 
92 static const value_string nfapi_error_vals[] = {
93 	{ 0x0, "MSG_OK" },
94 	{ 0x1, "MSG_INVALID_STATE" },
95 	{ 0x2, "MSG_INVALID_CONFIG" },
96 	{ 0x3, "SFN_OUT_OF_SYNC" },
97 	{ 0x4, "MSG_SUBFRAME_ERR" },
98 	{ 0x5, "MSG_BCH_MISSING" },
99 	{ 0x6, "MSG_INVALID_SFN" },
100 	{ 0x7, "MSG_HI_ERR" },
101 	{ 0x8, "MSG_TX_ERR" },
102 	{ 0, NULL },
103 };
104 
105 static const value_string nfapi_p4_error_vals[] = {
106 	{ 100, "MSG_OK" },
107 	{ 101, "MSG_INVALID_STATE" },
108 	{ 102, "MSG_INVALID_CONFIG" },
109 	{ 103, "MSG_RAT_NOT_SUPPORTED" },
110 	{ 200, "MSG_NMM_STOP_OK" },
111 	{ 201, "MSG_NMM_STOP_IGNORED" },
112 	{ 202, "MSG_NMM_STOP_INVALID_STATE" },
113 	{ 300, "MSG_PROCEDURE_COMPLETE" },
114 	{ 301, "MSG_PROCEDURE_STOPPED" },
115 	{ 302, "MSG_PARTIAL_RESULTS" },
116 	{ 303, "MSG_TIMEOUT" },
117 	{ 0, NULL },
118 };
119 
120 static const value_string nfapi_rat_type_vals[] = {
121 	{ 0, "LTE" },
122 	{ 1, "UTRAN" },
123 	{ 2, "GERAN" },
124 	{ 0, NULL },
125 };
126 
127 typedef enum{
128 	UN_ALIGNED_SYNCHRONIZATION = 0,
129 	INTERNAL_PNF_FRAME_ALIGNMENT,
130 	ABSOLUTE_TIME_ALIGNED_SYNCHRONIZATION
131 } nfapi_sync_mode_e;
132 
133 static const value_string nfapi_sync_mode_vals[] = {
134 	{ UN_ALIGNED_SYNCHRONIZATION, "UN-ALIGNED SYNCHRONIZATION" },
135 	{ INTERNAL_PNF_FRAME_ALIGNMENT, "INTERNAL PNF FRAME ALIGNMENT" },
136 	{ ABSOLUTE_TIME_ALIGNED_SYNCHRONIZATION, "ABSOLUTE TIME ALIGNED SYNCHRONIZATION" },
137 	{ 0, NULL },
138 };
139 
140 typedef enum {
141 	NONE = 0,
142 	GPS,
143 	GLONASS,
144 	BEIDOU
145 } location_mode_e;
146 
147 static const value_string location_mode_vals[] = {
148 	{ NONE, "NONE" },
149 	{ GPS, "GPS" },
150 	{ GLONASS, "GLONASS" },
151 	{ BEIDOU, "BeiDou" },
152 	{ 0, NULL }
153 };
154 
155 static const value_string nfapi_uplink_rs_hopping_vals[] = {
156 	{ 0, "RS_NO_HOPPING" },
157 	{ 1, "RS_GROUP_HOPPING" },
158 	{ 2, "RS_SEQUENCE_HOPPING" },
159 	{ 0, NULL }
160 };
161 
162 static const value_string nfapi_laa_carrier_type_vals[] = {
163 	{ 0, "No multi carrier support" },
164 	{ 1, "Mode A1" },
165 	{ 2, "Mode A12" },
166 	{ 3, "Mode B1" },
167 	{ 4, "Mode B2" },
168 	{ 0, NULL }
169 };
170 
171 static const value_string nfapi_multi_carrier_lbt_support_vals[] = {
172 	{ 0, "Multi carrier Mode A1" },
173 	{ 1, "Multi carrier Mode A2" },
174 	{ 2, "Multi carrier Mode B1" },
175 	{ 3, "Multi carrier Mode B2" },
176 	{ 0, NULL }
177 };
178 
179 static const value_string nfapi_lbt_dl_req_pdu_type[] = {
180 	{ 0, "LBT_PDSCH_REQ PDU" },
181 	{ 1, "LBT_DRS_REQ PDU" },
182 	{ 0, NULL }
183 };
184 
185 
186 static const value_string nfapi_lbt_dl_ind_pdu_type[] = {
187 	{ 0, "LBT_PDSCH_RSP PDU" },
188 	{ 1, "LBT_DRS_RSP PDU" },
189 	{ 0, NULL }
190 };
191 
192 static const value_string nfapi_phy_state_vals[] = {
193 	{ 0, "IDLE" },
194 	{ 1, "CONFIGURED" },
195 	{ 2, "RUNNING" },
196 	{ 0, NULL },
197 };
198 
199 
200 /* These are definitions where data 0 & 1 represent/provide a string name*/
201 static const true_false_string nfapi_csi_report_type_strname = {
202 	"Periodic",
203 	"Aperiodic",
204 };
205 
206 static const true_false_string nfapi_control_type_string_name = {
207 	"CQI/PMI",
208 	"RI",
209 };
210 
211 static const true_false_string cyclic_prefix_type_strname = {
212 	"CP_NORMAL",
213 	"CP_EXTENDED"
214 };
215 
216 static const true_false_string support_strname = {
217 	"No Support",
218 	"Support"
219 };
220 
221 static const true_false_string partial_sf_support_strname =
222 {
223 	"Start partial SF support",
224 	"End partial SF support"
225 };
226 
227 static const true_false_string phich_duration_strname = {
228 	"PHICH_D_NORMAL",
229 	"PHICH_D_EXTENDED"
230 };
231 
232 static const true_false_string high_speed_flag_strname = {
233 	"HS_UNRESTRICTED_SET",
234 	"HS_RESTRICTED_SET"
235 };
236 
237 static const true_false_string hopping_mode_strname = {
238 	"HM_INTER_SF",
239 	"HM_INTRA_INTER_SF"
240 };
241 
242 static const true_false_string srs_simult_tx_strname = {
243 	"No Simultaneous Transmission",
244 	"Simultaneous Transmission"
245 };
246 
247 static const true_false_string crc_flag_strname = {
248 	"CRC_CORRECT",
249 	"CRC_ERROR"
250 };
251 
252 static const true_false_string hi_value_strname = {
253 	"HI_NACK",
254 	"HI_ACK"
255 };
256 
257 static const true_false_string flag_tb2_strname = {
258 	"HI_NOT_PRESENT",
259 	"HI_PRESENT"
260 };
261 
262 static const true_false_string nfapi_multi_carrier_tx_strname = {
263 	"Mutual transmission (self-deferral support for current carrier)",
264 	"Transmit on channel access win (no self-deferral)"
265 };
266 
267 static const true_false_string nfapi_multi_carrier_freeze_strname = {
268 	"Absence of other technology is not guaranteed",
269 	"Absence of other technology is guaranteed"
270 };
271 
272 static const true_false_string initial_partial_sf_strname = {
273 	"Full SF",
274 	"Partial SF"
275 };
276 
277 static const true_false_string lbt_mode_strname = {
278 	"Full LBT",
279 	"Partial LBT"
280 };
281 
282 static const true_false_string data_report_mode_vals = {
283 	"Crc reported in CRC.indication",
284 	"Crc reported in RX.indication"
285 };
286 
287 static const true_false_string mcch_flag_string_name = {
288 	"MCCH or SC-MCCH change notification field is not valid",
289 	"MCCH or SC-MCCH change notification field is valid"
290 };
291 
292 static const true_false_string cross_carrier_scheduling_flag_strname = {
293 	"Carrier indicator field is not valid",
294 	"Carrier indicator field is valid"
295 };
296 
297 static const true_false_string srs_flag_strname = {
298 	"SRS request field is not valid",
299 	"SRS request field is valid"
300 };
301 static const true_false_string srs_request_strname = {
302 	"SRS not requested",
303 	"SRS requested"
304 };
305 
306 static const true_false_string ul_dl_configuration_flag_strname = {
307 	"UL/DL configuration field is not valid",
308 	"UL/DL configuration field is valid"
309 };
310 
311 static const true_false_string prs_cyclic_prefix_type_strname = {
312 	"normal cyclic prefix",
313 	"extended cyclic prefix"
314 };
315 
316 static const true_false_string prs_muting_strname = {
317 	"no muting",
318 	"muting"
319 };
320 
321 
322 static const value_string nfapi_dl_config_pdu_type_vals[] = {
323 	{ 0, "DL_CONFIG_DCI_DL_PDU" },
324 	{ 1, "DL_CONFIG_BCH_PDU" },
325 	{ 2, "DL_CONFIG_MCH_PDU" },
326 	{ 3, "DL_CONFIG_DLSCH_PDU" },
327 	{ 4, "DL_CONFIG_PCH_PDU" },
328 	{ 5, "DL_CONFIG_PRS_PDU" },
329 	{ 6, "DL_CONFIG_CSI_RS_PDU" },
330 	{ 7, "DL_CONFIG_EPDCCH_DL_PDU" },
331 	{ 8, "DL_MPDCCH" },
332 	{ 0, NULL }
333 };
334 
335 static const value_string nfapi_duplex_mode_vals[] = {
336 	{ 0, "TDD" },
337 	{ 1, "FDD" },
338 	{ 2, "HD-FDD" },
339 	{ 0, NULL }
340 };
341 
342 static const value_string modulation_vals[] = {
343 	{ 2, "QPSK" },
344 	{ 4, "16QAM" },
345 	{ 6, "64QAM" },
346 	{ 8, "256QAM" },
347 	{ 0, NULL }
348 };
349 
350 static const value_string pch_modulation_vals[] = {
351 	{ 0, "QPSK" },
352 	{ 0, NULL }
353 };
354 
355 static const value_string ue_mode_vals[] = {
356 	{ 0, "non LC/CE UE" },
357 	{ 1, "LC/CE UE" },
358 	{ 0, NULL }
359 };
360 
361 static const value_string csi_rs_class_vals[] = {
362 	{ 0, "not used" },
363 	{ 1, "Class A" },
364 	{ 2, "Class B" },
365 	{ 0, NULL }
366 };
367 
368 static const value_string csi_rs_cdm_type_vals[] = {
369 	{ 0, "cdm 2" },
370 	{ 1, "cdm 4" },
371 	{ 0, NULL }
372 };
373 
374 static const value_string antenna_ports_vals[] = {
375 	{ 0, "1 antenna ports" },
376 	{ 1, "2 antenna ports" },
377 	{ 2, "4 antenna ports" },
378 	{ 0, NULL }
379 };
380 
381 static const value_string combs_vals[] = {
382 	{ 0, "2 TC" },
383 	{ 1, "4 TC" },
384 	{ 0, NULL }
385 };
386 
387 static const value_string resource_allocation_type_vals[] = {
388 	{ 0, "type 0" },
389 	{ 1, "type 1" },
390 	{ 2, "type 2 1A/1B/1D" },
391 	{ 3, "type 2 1C" },
392 	{ 4, "type 2 6-1A" },
393 	{ 5, "type UEModeB" },
394 	{ 6, "NB Index" },
395 	{ 0, NULL }
396 };
397 
398 static const value_string transmission_scheme_vals[] = {
399 	{ 0, "SINGLE_ANTENNA_PORT_0" },
400 	{ 1, "TX_DIVERSITY" },
401 	{ 2, "LARGE_DELAY_CDD" },
402 	{ 3, "CLOSED_LOOP_SPATIAL_MULTIPLEXING" },
403 	{ 4, "MULTI_USER_MIMO" },
404 	{ 5, "CLOSED_LOOP_RANK_1_PRECODING" },
405 	{ 6, "SINGLE_ANTENNA_PORT_5" },
406 	{ 7, "SINGLE_ANTENNA_PORT_7" },
407 	{ 8, "SINGLE_ANTENNA_PORT_8" },
408 	{ 9, "DUAL_LAYER_TX_PORT_7_AND_8" },
409 	{ 10, "UP_TO_8_LAYER_TX" },
410 	{ 11, "SINGLE_ANTENNA_PORT_11" },
411 	{ 12, "SINGLE_ANTENNA_PORT_13" },
412 	{ 13, "DUAL_LAYER_TX_PORT_11_13" },
413 	{ 0, NULL }
414 };
415 
416 static const value_string ul_transmission_scheme_vals[] = {
417 	{ 0, "SINGLE_ANTENNA_PORT_10" },
418 	{ 1, "CLOSED_LOOP_SPATIAL_MULTIPLEXING" },
419 	{ 0, NULL },
420 };
421 
422 static const value_string dl_dci_format_vals[] = {
423 	{ 0, "1" },
424 	{ 1, "1A" },
425 	{ 2, "1B" },
426 	{ 3, "1C" },
427 	{ 4, "1D" },
428 	{ 5, "2" },
429 	{ 6, "2A" },
430 	{ 7, "2B" },
431 	{ 8, "2C" },
432 	{ 9, "2D" },
433 	{ 10, "6-1A" },
434 	{ 11, "6-1B" },
435 	{ 12, "6-2" },
436 	{ 0, NULL }
437 };
438 
439 static const value_string ul_dci_format_vals[] = {
440 	{ 0, "0" },
441 	{ 1, "3" },
442 	{ 2, "3A" },
443 	{ 3, "4" },
444 	{ 4, "5" },
445 	{ 0, NULL }
446 };
447 
448 static const value_string mpdcch_ul_dci_format_vals[] = {
449 	{ 1, "3" },
450 	{ 2, "3A" },
451 	{ 4, "6-0A" },
452 	{ 5, "6-0B" },
453 	{ 0, NULL }
454 };
455 
456 
457 static const value_string pa_vals[] = {
458 	{ 0, "-6dB" },
459 	{ 1, "-4.77dB" },
460 	{ 2, "-3dB" },
461 	{ 3, "-1.77dB" },
462 	{ 4, "0dB" },
463 	{ 5, "1dB" },
464 	{ 6, "2dB" },
465 	{ 7, "3dB" },
466 	{ 0, NULL }
467 };
468 
469 static const value_string transmission_mode_vals[] = {
470 	{ 1, "Mode 1" },
471 	{ 2, "Mode 2" },
472 	{ 3, "Mode 3" },
473 	{ 4, "Mode 4" },
474 	{ 5, "Mode 5" },
475 	{ 6, "Mode 6" },
476 	{ 7, "Mode 7" },
477 	{ 8, "Mode 8" },
478 	{ 9, "Mode 9" },
479 	{ 10, "Mode 10" },
480 	{ 0, NULL }
481 };
482 
483 static const value_string nfapi_ul_config_pdu_type_vals[] = {
484 	{ 0, "ULSCH" },
485 	{ 1, "ULSCH_CQI_RI" },
486 	{ 2, "ULSCH_HARQ" },
487 	{ 3, "ULSCH_CQI_HARQ_RI" },
488 	{ 4, "UCI_CQI" },
489 	{ 5, "UCI_SR" },
490 	{ 6, "UCI_HARQ" },
491 	{ 7, "UCI_SR_HARQ" },
492 	{ 8, "UCI_CQI_HARQ" },
493 	{ 9, "UCI_CQI_SR" },
494 	{ 10, "UCI_CQI_SR_HARQ" },
495 	{ 11, "SRS" },
496 	{ 12, "HARQ_BUFFER" },
497 	{ 13, "ULSCH_UCI_CSI" },
498 	{ 14, "ULSCH_UCI_HARQ" },
499 	{ 15, "ULSCH_CSI_UCI_HARQ" },
500 	{ 0, NULL }
501 };
502 
503 static const value_string nfapi_tdd_ack_nack_mode_vals[] = {
504 	{ 0, "Bundling" },
505 	{ 1, "Multiplexing" },
506 	{ 2, "Format 1b with channel selection" },
507 	{ 3, "Format 3" },
508 	{ 4, "Format 4" },
509 	{ 5, "Format 5" },
510 	{ 0, NULL }
511 };
512 static const value_string nfapi_fdd_ack_nack_mode_vals[] = {
513 	{ 0, "Format 1a/1b" },
514 	{ 1, "Channel selection" },
515 	{ 2, "Format 3" },
516 	{ 3, "Format 4" },
517 	{ 4, "Format 5" },
518 	{ 0, NULL }
519 };
520 
521 static const value_string nfapi_phich_resource_vals[] = {
522 	{ 0, "PHICH_R_ONE_SIXTH " },
523 	{ 1, "PHICH_R_HALF" },
524 	{ 2, "PHICH_R_ONE" },
525 	{ 3, "PHICH_R_TWO" },
526 	{ 0, NULL }
527 };
528 
529 static const value_string local_distributed_vals[] = {
530 	{ 0, "localized" },
531 	{ 1, "distributed" },
532 	{ 0, NULL }
533 };
534 
535 static const value_string transport_block_to_codeword_swap_flag_vals[] = {
536 	{ 0, "no swapping" },
537 	{ 1, "swapped" },
538 	{ 0, NULL }
539 };
540 
541 static const value_string ngap_vals[] = {
542 	{ 0, "Ngap1" },
543 	{ 1, "Ngap2" },
544 	{ 0, NULL }
545 };
546 
547 static const value_string pmi_vals[] = {
548 	{ 0, "Use precoding indicated in TPMI field" },
549 	{ 1, "Use precoding indicated in last PMI report on PUSCH" },
550 	{ 2, "use precoding indicated in TPM field" },
551 	{ 0, NULL }
552 };
553 
554 static const value_string true_false_vals[] = {
555 	{ 0, "false" },
556 	{ 1, "true" },
557 	{ 0, NULL }
558 };
559 
560 static const value_string exhustive_search_vals[] = {
561 	{ 0, "non-exhaustive search" },
562 	{ 1, "exhaustive search" },
563 	{ 0, NULL }
564 };
565 
566 static const value_string not_used_enabled_vals[] = {
567 	{ 0, "not used" },
568 	{ 1, "enabled" },
569 	{ 0, NULL }
570 };
571 
572 static const value_string hopping_vals[] = {
573 	{ 0, "no hopping" },
574 	{ 1, "hopping enabled" },
575 	{ 0, NULL }
576 };
577 
578 
579 static const value_string mpdcch_rnti_type_vals[] = {
580 	{ 1, "Temporary C-RNTI" },
581 	{ 2, "RA-RNTI" },
582 	{ 3, "P-RNTI" },
583 	{ 4, "other" },
584 	{ 0, NULL }
585 };
586 
587 static const value_string rnti_type_vals[] = {
588 	{ 1, "C-RNTI" },
589 	{ 2, "RA-RNTI, P-RNTI, SI-RNTI, SC-RNTI, G-RNTI" },
590 	{ 3, "SPS-CRNTI" },
591 	{ 0, NULL }
592 };
593 
594 static const value_string primary_cells_type_vals[] = {
595 	{ 1, "TDD" },
596 	{ 2, "FDD" },
597 	{ 3, "HD_FDD" },
598 	{ 0, NULL }
599 };
600 
601 static const value_string ul_rssi_supported_vals[] = {
602 	{ 0, "Uplink RSSI not supported" },
603 	{ 1, "Uplink RSSI supported" },
604 	{ 0, NULL }
605 };
606 
607 static const value_string nprb_vals[] = {
608 	{ 0, "2" },
609 	{ 1, "3" },
610 	{ 0, NULL }
611 };
612 
613 static const value_string nmm_modes_supported_vals[] =
614 {
615 	{ 0, "NONE" },
616 	{ 1, "NMM_ONLY" },
617 	{ 2, "NMM_IN_CONFIGURED_STATE" },
618 	{ 3, "NMM_IN_RUNNING_STATE" },
619 	{ 4, "NMM_IN_CONFIGURED_AND_RUNNING_STATE" },
620 	{ 0, NULL }
621 };
622 
623 static const value_string dlsch_re13_ue_type_vals[] = {
624 	{ 0, "non LC/CE UE" },
625 	{ 1, "LC/CE CEModeA UE" },
626 	{ 2, "LC/CE CEModeB UE" },
627 	{ 0, NULL }
628 };
629 
630 static const value_string dlsch_re13_pdsch_payload_type_vals[] = {
631 	{ 0, "PDSCH carrying SIB1-BR " },
632 	{ 1, "PDSCH carrying SI message (except for SIB1-BR or PCH)" },
633 	{ 2, "PDSCH carrying other" },
634 	{ 0, NULL }
635 };
636 
637 
638 static const value_string paging_direct_indication_differtiation_flag_vals[] = {
639 	{ 0, "Direct Information" },
640 	{ 1, "Paging" },
641 	{ 0, NULL }
642 };
643 
644 static const value_string ul_tx_mode_vals[] = {
645 	{ 0, "SISO/MIMO" },
646 	{ 1, "MIMO" },
647 	{ 0, NULL }
648 };
649 
650 static const value_string n_srs_vals[] = {
651 	{ 0, "No overlap" },
652 	{ 1, "Overlap" },
653 	{ 0, NULL }
654 };
655 
656 static const value_string n_srs_initial_vals[] = {
657 	{ 0, "Last OFDM symbol is not punctured" },
658 	{ 1, "Last OFDM symbol is punctured." },
659 	{ 0, NULL }
660 };
661 
662 
663 static const value_string csi_mode_vals[] = {
664 	{ 0, "PUCCH format 2/2a/2b/3" },
665 	{ 1, "PUCCH format 4" },
666 	{ 2, "PUCCH format 5" },
667 	{ 0, NULL }
668 };
669 
670 static const value_string hi_dci0_pdu_type_vals[] = {
671 	{ 0, "HI" },
672 	{ 1, "DCI UL" },
673 	{ 2, "EPDCCH DCI UL" },
674 	{ 3, "MDPCCH DCI UL" },
675 	{ 0, NULL }
676 };
677 
678 static const value_string ue_tx_antenna_selection_vals[] = {
679 	{ 0, "Not Configured" },
680 	{ 1, "Configured and using UE port 0" },
681 	{ 2, "Configured and using UE port 1" },
682 	{ 0, NULL }
683 };
684 
685 static const value_string size_of_cqi_csi_field_vals[] = {
686 	{ 0, "1 bit" },
687 	{ 1, "2 bits" },
688 	{ 2, "3 bits" },
689 	{ 0, NULL }
690 };
691 
692 static const value_string number_of_antenna_port_vals[] = {
693 	{ 0, "1 antenna port" },
694 	{ 1, "2 antenna ports" },
695 	{ 2, "4 antenna ports" },
696 	{ 0, NULL }
697 };
698 
699 static const value_string ce_mode_vals[] = {
700 	{ 1, "CEModeA" },
701 	{ 2, "CEModeB" },
702 	{ 0, NULL }
703 };
704 
705 
706 static const value_string csi_request_vals[] = {
707 	{ 0, "Aperiodic CSI not requested" },
708 	{ 1, "Aperiodic CSI requested" },
709 	{ 0, NULL }
710 };
711 
712 static const value_string tdd_harq_mode_vals[] = {
713 	{ 0, "Format 1a/1b BUNDLING" },
714 	{ 1, "Format 1a/1b MULTIPLEXING" },
715 	{ 2, "Format 1a/1b SPECIAL BUNDLING" },
716 	{ 3, "Channel Selection" },
717 	{ 4, "Format 3" },
718 	{ 5, "Format 4" },
719 	{ 6, "Format 5" },
720 	{ 0, NULL }
721 };
722 
723 static const value_string fdd_harq_mode_vals[] = {
724 	{ 0, "Format 1a/1b" },
725 	{ 1, "Channel Selection" },
726 	{ 2, "Format 3" },
727 	{ 3, "Format 4" },
728 	{ 4, "Format 5" },
729 	{ 0, NULL }
730 };
731 
732 static const value_string harq_value_vals[] = {
733 	{ 1, "ACK" },
734 	{ 2, "NACK" },
735 	{ 3, "ACK or NACK" },
736 	{ 4, "DTX" },
737 	{ 5, "ACK or DTX" },
738 	{ 6, "NACK or DTX" },
739 	{ 7, "ACK or NACK or DTX" },
740 	{ 0, NULL }
741 };
742 
743 
744 static const value_string harq_special_value_vals[] = {
745 	{ 0, "0 or None" },
746 	{ 1, "1 or 4 or 7 ACKs reported" },
747 	{ 2, "2 or 5 or 8 ACKs reported" },
748 	{ 3, "3 or 6 or 9 ACKs reported" },
749 	{ 4, "DTX (UE did not transmit anything)" },
750 	{ 0, NULL }
751 };
752 
753 static const value_string channel_vals[] = {
754 	{ 0, "PUCCH" },
755 	{ 1, "PUSCH" },
756 	{ 0, NULL }
757 };
758 
759 static const value_string rach_resource_type_vals[] = {
760 	{ 0, "Non LC / CE RACH" },
761 	{ 1, "LC / CE RACH CE level 0" },
762 	{ 2, "LC / CE RACH CE level 1" },
763 	{ 3, "LC / CE RACH CE level 2" },
764 	{ 4, "LC / CE RACH CE level 3" },
765 	{ 0, NULL }
766 };
767 
768 static const value_string up_pts_symbol_vals[] = {
769 	{ 0, "Symbol 0" },
770 	{ 1, "Symbol 1" },
771 	{ 0, NULL }
772 };
773 
774 static const value_string arfcn_direction_vals[] = {
775 	{ 0, "DL" },
776 	{ 1, "UL" },
777 	{ 0, NULL }
778 };
779 
780 static int proto_nfapi = -1;
781 
782 /* These are for the subtrees */
783 static gint ett_nfapi = -1;
784 static gint ett_nfapi_p4_p5_message_header = -1;
785 static gint ett_nfapi_p7_message_header = -1;
786 static gint ett_nfapi_tlv_tree = -1;
787 static gint ett_nfapi_tl = -1;
788 static gint ett_nfapi_pnf_phy = -1;
789 static gint ett_nfapi_pnf_phy_rel10 = -1;
790 static gint ett_nfapi_pnf_phy_rel11 = -1;
791 static gint ett_nfapi_pnf_phy_rel12 = -1;
792 static gint ett_nfapi_pnf_phy_rel13 = -1;
793 static gint ett_nfapi_pnf_phy_rf_config = -1;
794 static gint ett_nfapi_rf_bands = -1;
795 static gint ett_nfapi_tx_antenna_ports = -1;
796 static gint ett_nfapi_harq_ack_nack_data = -1;
797 static gint ett_nfapi_harq_data = -1;
798 static gint ett_nfapi_cc = -1;
799 static gint ett_nfapi_rbs = -1;
800 static gint ett_nfapi_antennas = -1;
801 static gint ett_nfapi_dl_config_request_pdu_list = -1;
802 static gint ett_nfapi_ul_config_request_pdu_list = -1;
803 static gint ett_nfapi_hi_dci0_request_pdu_list = -1;
804 static gint ett_nfapi_tx_request_pdu_list = -1;
805 static gint ett_nfapi_rx_indication_pdu_list = -1;
806 static gint ett_nfapi_harq_indication_pdu_list = -1;
807 static gint ett_nfapi_crc_indication_pdu_list = -1;
808 static gint ett_nfapi_sr_indication_pdu_list = -1;
809 static gint ett_nfapi_cqi_indication_pdu_list = -1;
810 static gint ett_nfapi_preamble_indication_pdu_list = -1;
811 static gint ett_nfapi_srs_indication_pdu_list = -1;
812 static gint ett_nfapi_lbt_dl_config_pdu_list = -1;
813 static gint ett_nfapi_lbt_dl_indication_pdu_list = -1;
814 static gint ett_nfapi_subbands = -1;
815 static gint ett_nfapi_bf_vector_antennas = -1;
816 static gint ett_nfapi_bf_vectors = -1;
817 static gint ett_nfapi_csi_rs_resource_configs = -1;
818 static gint ett_nfapi_csi_rs_bf_vector = -1;
819 static gint ett_nfapi_epdcch_prbs = -1;
820 static gint ett_nfapi_precoding = -1;
821 static gint ett_nfapi_earfcn_list = -1;
822 static gint ett_nfapi_uarfcn_list = -1;
823 static gint ett_nfapi_arfcn_list = -1;
824 static gint ett_nfapi_rssi_list = -1;
825 static gint ett_nfapi_pci_list = -1;
826 static gint ett_nfapi_psc_list = -1;
827 static gint ett_nfapi_lte_cells_found_list = -1;
828 static gint ett_nfapi_utran_cells_found_list = -1;
829 static gint ett_nfapi_geran_cells_found_list = -1;
830 static gint ett_nfapi_si_periodicity_list = -1;
831 static gint ett_nfapi_downlink_bandwidth_support = -1;
832 static gint ett_nfapi_uplink_bandwidth_support = -1;
833 static gint ett_nfapi_downlink_modulation_support = -1;
834 static gint ett_nfapi_uplink_modulation_support = -1;
835 static gint ett_nfapi_received_interference_power_mesurement_results = -1;
836 static gint ett_nfapi_release_support = -1;
837 static expert_field ei_invalid_range = EI_INIT;
838 static expert_field ei_invalid_tlv_length = EI_INIT;
839 
840 static int hf_nfapi_p4_p5_message_header_phy_id = -1;
841 static int hf_nfapi_p4_p5_message_header_message_id = -1;
842 static int hf_nfapi_p4_p5_message_header_message_length = -1;
843 static int hf_nfapi_p4_p5_message_header_spare = -1;
844 static int hf_nfapi_p7_message_header_phy_id = -1;
845 static int hf_nfapi_p7_message_header_message_id = -1;
846 static int hf_nfapi_p7_message_header_message_length = -1;
847 static int hf_nfapi_p7_message_header_m = -1;
848 static int hf_nfapi_p7_message_header_segment = -1;
849 static int hf_nfapi_p7_message_header_sequence_number = -1;
850 static int hf_nfapi_p7_message_header_checksum = -1;
851 static int hf_nfapi_p7_message_header_transmit_timestamp = -1;
852 static int hf_nfapi_tl_tag = -1;
853 static int hf_nfapi_tl_length = -1;
854 static int hf_nfapi_sync_mode = -1;
855 static int hf_nfapi_location_mode = -1;
856 static int hf_nfapi_location_coordinates = -1;
857 static int hf_nfapi_dl_config_timing = -1;
858 static int hf_nfapi_tx_timing = -1;
859 static int hf_nfapi_ul_config_timing = -1;
860 static int hf_nfapi_hi_dci0_timing = -1;
861 static int hf_nfapi_maximum_number_phys = -1;
862 static int hf_nfapi_maximum_total_bandwidth = -1;
863 static int hf_nfapi_maximum_total_number_dl_layers = -1;
864 static int hf_nfapi_maximum_total_number_ul_layers = -1;
865 static int hf_nfapi_shared_bands = -1;
866 static int hf_nfapi_shared_pa = -1;
867 static int hf_nfapi_maximum_total_power = -1;
868 static int hf_nfapi_oui = -1;
869 static int hf_nfapi_pdu = -1;
870 static int hf_nfapi_pnf_phy_number_phy = -1;
871 static int hf_nfapi_pnf_phy_config_index = -1;
872 static int hf_nfapi_number_of_rf_exclusions = -1;
873 static int hf_nfapi_dl_bandwidth_support = -1;
874 static int hf_nfapi_dl_bandwidth_support_6 = -1;
875 static int hf_nfapi_dl_bandwidth_support_15 = -1;
876 static int hf_nfapi_dl_bandwidth_support_25 = -1;
877 static int hf_nfapi_dl_bandwidth_support_50 = -1;
878 static int hf_nfapi_dl_bandwidth_support_75 = -1;
879 static int hf_nfapi_dl_bandwidth_support_100 = -1;
880 static int hf_nfapi_ul_bandwidth_support = -1;
881 static int hf_nfapi_ul_bandwidth_support_6 = -1;
882 static int hf_nfapi_ul_bandwidth_support_15= -1;
883 static int hf_nfapi_ul_bandwidth_support_25 = -1;
884 static int hf_nfapi_ul_bandwidth_support_50 = -1;
885 static int hf_nfapi_ul_bandwidth_support_75 = -1;
886 static int hf_nfapi_ul_bandwidth_support_100 = -1;
887 static int hf_nfapi_downlink_channel_bandwidth_supported = -1;
888 static int hf_nfapi_uplink_channel_bandwidth_supported = -1;
889 static int hf_nfapi_number_of_dl_layers_supported = -1;
890 static int hf_nfapi_number_of_ul_layers_supported = -1;
891 static int hf_nfapi_maximum_3gpp_release_supported = -1;
892 static int hf_nfapi_maximum_3gpp_release_supported_rel8 = -1;
893 static int hf_nfapi_maximum_3gpp_release_supported_rel9 = -1;
894 static int hf_nfapi_maximum_3gpp_release_supported_rel10 = -1;
895 static int hf_nfapi_maximum_3gpp_release_supported_rel11 = -1;
896 static int hf_nfapi_maximum_3gpp_release_supported_rel12 = -1;
897 static int hf_nfapi_maximum_3gpp_release_supported_rel13 = -1;
898 static int hf_nfapi_nmm_modes_supported = -1;
899 static int hf_nfapi_number_of_rfs = -1;
900 static int hf_nfapi_rf_config_index = -1;
901 static int hf_nfapi_band = -1;
902 static int hf_nfapi_maximum_transmit_power = -1;
903 static int hf_nfapi_maximum_transmit_power_2 = -1;
904 static int hf_nfapi_earfcn = -1;
905 static int hf_nfapi_minimum_transmit_power = -1;
906 static int hf_nfapi_number_of_antennas_suppported = -1;
907 static int hf_nfapi_minimum_downlink_frequency = -1;
908 static int hf_nfapi_maximum_downlink_frequency = -1;
909 static int hf_nfapi_minimum_uplink_frequency = -1;
910 static int hf_nfapi_maximum_uplink_frequency = -1;
911 static int hf_nfapi_number_of_rf_bands = -1;
912 static int hf_nfapi_nmm_uplink_rssi_supported = -1;
913 static int hf_nfapi_phy_rf_config_info_phy_id = -1;
914 static int hf_nfapi_transmission_mode7_supported = -1;
915 static int hi_nfapi_transmission_mode8_supported = -1;
916 static int hi_nfapi_two_antennas_ports_for_pucch = -1;
917 static int hi_nfapi_transmission_mode_9_supported = -1;
918 static int hi_nfapi_simultaneous_pucch_pusch = -1;
919 static int hi_nfapi_four_layer_tx_with_tm3_and_tm4 = -1;
920 static int hf_nfapi_epdcch_supported = -1;
921 static int hi_nfapi_multi_ack_csi_reporting = -1;
922 static int hi_nfapi_pucch_tx_diversity_with_channel_selection = -1;
923 static int hi_nfapi_ul_comp_supported = -1;
924 static int hi_nfapi_transmission_mode_5_supported = -1;
925 static int hf_nfapi_csi_subframe_set = -1;
926 static int hi_nfapi_enhanced_4tx_codebook = -1;
927 static int hi_nfapi_drs_supported = -1;
928 static int hi_nfapi_ul_64qam_supported = -1;
929 static int hi_nfapi_transmission_mode_10_supported = -1;
930 static int hi_nfapi_alternative_tbs_indices = -1;
931 static int hf_nfapi_pucch_format_4_supported = -1;
932 static int hf_nfapi_pucch_format_5_supported = -1;
933 static int hf_nfapi_more_than_5_ca_supported = -1;
934 static int hf_nfapi_laa_supported = -1;
935 static int hf_nfapi_laa_ending_in_dwpts_supported = -1;
936 static int hf_nfapi_laa_starting_in_second_slot_supported = -1;
937 static int hf_nfapi_beamforming_supported = -1;
938 static int hf_nfapi_csi_rs_enhancements_supported = -1;
939 static int hf_nfapi_drms_enhancements_supported = -1;
940 static int hf_nfapi_srs_enhancements_supported = -1;
941 static int hf_nfapi_dl_rs_tx_power = -1;
942 static int hf_nfapi_received_interference_power = -1;
943 static int hf_nfapi_thermal_noise_power = -1;
944 static int hf_nfapi_dl_rs_tx_power_measurement = -1;
945 static int hf_nfapi_received_interference_power_measurement = -1;
946 static int hf_nfapi_thermal_noise_power_measurement = -1;
947 
948 // P5 Message Structures
949 static int hf_nfapi_error_code = -1;
950 static int hf_nfapi_p4_error_code = -1;
951 static int hf_nfapi_rat_type = -1;
952 static int hf_nfapi_num_tlv = -1;
953 static int hf_nfapi_phy_state = -1;
954 static int hf_nfapi_phy_antenna_capability = -1;
955 static int hf_nfapi_release_capability = -1;
956 static int hf_nfapi_mbsfn_capability = -1;
957 static int hf_nfapi_laa_capability = -1;
958 static int hf_nfapi_pd_sensing_lbt_support = -1;
959 static int hf_nfapi_multi_carrier_lbt_support = -1;
960 static int hf_nfapi_partial_sf_support = -1;
961 
962 static int hf_nfapi_pnf_address_ipv4 = -1;
963 static int hf_nfapi_pnf_address_ipv6 = -1;
964 static int hf_nfapi_vnf_address_ipv4 = -1;
965 static int hf_nfapi_vnf_address_ipv6 = -1;
966 static int hf_nfapi_pnf_port = -1;
967 static int hf_nfapi_vnf_port = -1;
968 static int hf_nfapi_dl_ue_per_sf = -1;
969 static int hf_nfapi_ul_ue_per_sf = -1;
970 static int hf_nfapi_timing_window = -1;
971 static int hf_nfapi_timing_info_mode = -1;
972 static int hf_nfapi_timing_info_period = -1;
973 static int hf_nfapi_duplex_mode = -1;
974 static int hf_nfapi_pcfich_power_offset = -1;
975 static int hf_nfapi_pb = -1;
976 static int hf_nfapi_dl_cyclic_prefix_type = -1;
977 static int hf_nfapi_ul_cyclic_prefix_type = -1;
978 static int hf_nfapi_tx_antenna_ports = -1;
979 static int hf_nfapi_rx_antenna_ports = -1;
980 static int hf_nfapi_downlink_channel_bandwidth = -1;
981 static int hf_nfapi_uplink_channel_bandwidth = -1;
982 static int hf_nfapi_reference_signal_power = -1;
983 static int hf_nfapi_phich_resource = -1;
984 static int hf_nfapi_phich_duration = -1;
985 static int hf_nfapi_phich_power_offset = -1;
986 static int hf_nfapi_primary_synchronization_signal_epre_eprers = -1;
987 static int hf_nfapi_secondary_synchronization_signal_epre_eprers = -1;
988 static int hf_nfapi_physical_cell_id = -1;
989 static int hf_nfapi_configuration_index = -1;
990 static int hf_nfapi_root_sequence_index = -1;
991 static int hf_nfapi_zero_correlation_zone_configuration = -1;
992 static int hf_nfapi_high_speed_flag = -1;
993 static int hf_nfapi_frequency_offset = -1;
994 static int hf_nfapi_hopping_mode = -1;
995 static int hf_nfapi_hopping_offset = -1;
996 static int hf_nfapi_delta_pucch_shift = -1;
997 static int hf_nfapi_n_cqi_rb = -1;
998 static int hf_nfapi_n_an_cs = -1;
999 static int hf_nfapi_n1_pucch_an = -1;
1000 static int hf_nfapi_bandwidth_configuration = -1;
1001 static int hf_nfapi_max_up_pts = -1;
1002 static int hf_nfapi_srs_subframe_configuration = -1;
1003 static int hf_nfapi_srs_acknack_srs_simultaneous_transmission = -1;
1004 static int hf_nfapi_uplink_rs_hopping = -1;
1005 static int hf_nfapi_group_assignment = -1;
1006 static int hf_nfapi_cyclic_shift_1_for_drms = -1;
1007 static int hf_nfapi_subframe_assignment = -1;
1008 static int hf_nfapi_special_subframe_patterns = -1;
1009 static int hf_nfapi_ed_threshold_for_lbt_for_pdsch = -1;
1010 static int hf_nfapi_ed_threshold_for_lbt_for_drs = -1;
1011 static int hf_nfapi_pd_threshold = -1;
1012 static int hf_nfapi_multi_carrier_type = -1;
1013 static int hf_nfapi_multi_carrier_tx = -1;
1014 static int hf_nfapi_multi_carrier_freeze = -1;
1015 static int hf_nfapi_tx_antenna_ports_for_drs = -1;
1016 static int hf_nfapi_transmission_power_for_drs = -1;
1017 static int hf_nfapi_pbch_repetitions_enabled_r13 = -1;
1018 static int hf_nfapi_prach_cat_m_root_sequence_index = -1;
1019 static int hf_nfapi_prach_cat_m_zero_correlation_zone_configuration = -1;
1020 static int hf_nfapi_prach_cat_m_high_speed_flag = -1;
1021 static int hf_nfapi_prach_ce_level_0_enable = -1;
1022 static int hf_nfapi_prach_ce_level_0_configuration_index = -1;
1023 static int hf_nfapi_prach_ce_level_0_frequency_offset = -1;
1024 static int hf_nfapi_prach_ce_level_0_number_of_repetitions_per_attempt = -1;
1025 static int hf_nfapi_prach_ce_level_0_starting_subframe_periodicity = -1;
1026 static int hf_nfapi_prach_ce_level_0_hopping_enabled = -1;
1027 static int hf_nfapi_prach_ce_level_0_hopping_offset = -1;
1028 static int hf_nfapi_prach_ce_level_1_enable = -1;
1029 static int hf_nfapi_prach_ce_level_1_configuration_index = -1;
1030 static int hf_nfapi_prach_ce_level_1_frequency_offset = -1;
1031 static int hf_nfapi_prach_ce_level_1_number_of_repetitions_per_attempt = -1;
1032 static int hf_nfapi_prach_ce_level_1_starting_subframe_periodicity = -1;
1033 static int hf_nfapi_prach_ce_level_1_hopping_enabled = -1;
1034 static int hf_nfapi_prach_ce_level_1_hopping_offset = -1;
1035 static int hf_nfapi_prach_ce_level_2_enable = -1;
1036 static int hf_nfapi_prach_ce_level_2_configuration_index = -1;
1037 static int hf_nfapi_prach_ce_level_2_frequency_offset = -1;
1038 static int hf_nfapi_prach_ce_level_2_number_of_repetitions_per_attempt = -1;
1039 static int hf_nfapi_prach_ce_level_2_starting_subframe_periodicity = -1;
1040 static int hf_nfapi_prach_ce_level_2_hopping_enabled = -1;
1041 static int hf_nfapi_prach_ce_level_2_hopping_offset = -1;
1042 static int hf_nfapi_prach_ce_level_3_enable = -1;
1043 static int hf_nfapi_prach_ce_level_3_configuration_index = -1;
1044 static int hf_nfapi_prach_ce_level_3_frequency_offset = -1;
1045 static int hf_nfapi_prach_ce_level_3_number_of_repetitions_per_attempt = -1;
1046 static int hf_nfapi_prach_ce_level_3_starting_subframe_periodicity = -1;
1047 static int hf_nfapi_prach_ce_level_3_hopping_enabled = -1;
1048 static int hf_nfapi_prach_ce_level_3_hopping_offset = -1;
1049 static int hf_nfapi_pucch_internal_ul_hopping_config_common_mode_b = -1;
1050 static int hf_nfapi_pucch_internal_ul_hopping_config_common_mode_a = -1;
1051 static int hf_nfapi_dl_modulation_support = -1;
1052 static int hf_nfapi_dl_modulation_support_qpsk = -1;
1053 static int hf_nfapi_dl_modulation_support_16qam = -1;
1054 static int hf_nfapi_dl_modulation_support_64qam = -1;
1055 static int hf_nfapi_dl_modulation_support_256qam = -1;
1056 static int hf_nfapi_ul_modulation_support = -1;
1057 static int hf_nfapi_ul_modulation_support_qpsk = -1;
1058 static int hf_nfapi_ul_modulation_support_16qam = -1;
1059 static int hf_nfapi_ul_modulation_support_64qam = -1;
1060 static int hf_nfapi_data_report_mode = -1;
1061 static int hf_nfapi_sfnsf = -1;
1062 
1063 // P7 Sub Structures
1064 static int hf_nfapi_dl_dci_format = -1;
1065 static int hf_nfapi_ul_dci_format = -1;
1066 static int hf_nfapi_mpdcch_ul_dci_format = -1;
1067 static int hf_nfapi_cce_idx = -1;
1068 static int hf_nfapi_aggregation_level = -1;
1069 static int hf_nfapi_mcs_1 = -1;
1070 static int hf_nfapi_redundancy_version_1 = -1;
1071 static int hf_nfapi_new_data_indicator_1 = -1;
1072 static int hf_nfapi_mcs_2 = -1;
1073 static int hf_nfapi_redundancy_version_2 = -1;
1074 static int hf_nfapi_new_data_indicator_2 = -1;
1075 static int hf_nfapi_harq_process = -1;
1076 static int hf_nfapi_tpmi = -1;
1077 static int hf_nfapi_pmi = -1;
1078 static int hf_nfapi_precoding_information = -1;
1079 static int hf_nfapi_tpc = -1;
1080 static int hf_nfapi_downlink_assignment_index = -1;
1081 static int hf_nfapi_transport_block_size_index = -1;
1082 static int hf_nfapi_downlink_power_offset = -1;
1083 static int hf_nfapi_allocate_prach_flag = -1;
1084 static int hf_nfapi_preamble_index = -1;
1085 static int hf_nfapi_prach_mask_index = -1;
1086 static int hf_nfapi_rnti_type = -1;
1087 static int hf_nfapi_mpdcch_rnti_type = -1;
1088 static int hf_nfapi_mcch_flag = -1;
1089 static int hf_nfapi_mcch_change_notification = -1;
1090 static int hf_nfapi_scrambling_identity = -1;
1091 static int hf_nfapi_cross_carrier_scheduling_flag = -1;
1092 static int hf_nfapi_carrier_indicator = -1;
1093 static int hf_nfapi_srs_flag = -1;
1094 static int hf_nfapi_srs_request = -1;
1095 static int hf_nfapi_antenna_ports_scrambling_and_layers = -1;
1096 static int hf_nfapi_total_dci_length_including_padding = -1;
1097 static int hf_nfapi_harq_ack_resource_offset = -1;
1098 static int hf_nfapi_pdsch_re_mapping_and_quasi_co_location_indicator = -1;
1099 static int hf_nfapi_primary_cell_type = -1;
1100 static int hf_nfapi_ul_dl_configuration_flag = -1;
1101 static int hf_nfapi_number_of_ul_dl_configurations = -1;
1102 static int hf_nfapi_ul_dl_configuration_index = -1;
1103 static int hf_nfapi_laa_end_partial_sf_flag = -1;
1104 static int hf_nfapi_laa_end_partial_sf_configuration = -1;
1105 static int hf_nfapi_initial_lbt_sf = -1;
1106 static int hf_nfapi_codebooksize_determination_r13 = -1;
1107 static int hf_nfapi_rel13_drms_table_flag = -1;
1108 static int hf_nfapi_csi_rs_resource_config = -1;
1109 static int hf_nfapi_csi_rs_number_of_nzp_configurations = -1;
1110 static int hf_nfapi_pdsch_start = -1;
1111 static int hf_nfapi_drms_config_flag = -1;
1112 static int hf_nfapi_drms_scrambling = -1;
1113 static int hf_nfapi_csi_config_flag = -1;
1114 static int hf_nfapi_csi_scrambling = -1;
1115 static int hf_nfapi_pdsch_re_mapping_flag = -1;
1116 static int hf_nfapi_pdsch_re_mapping_antenna_ports = -1;
1117 static int hf_nfapi_pdsch_re_mapping_freq_shift = -1;
1118 static int hf_nfapi_alt_cqi_table_r12 = -1;
1119 static int hf_nfapi_max_layers = -1;
1120 static int hf_nfapi_n_dl_harq = -1;
1121 static int hf_nfapi_dwpts_symbols = -1;
1122 static int hf_nfapi_ue_type = -1;
1123 static int hf_nfapi_pdsch_payload_type = -1;
1124 static int hf_nfapi_initial_transmission_sf = -1;
1125 static int hf_nfapi_req13_drms_table_flag = -1;
1126 static int hf_nfapi_prnti = -1;
1127 static int hf_nfapi_mcs = -1;
1128 static int hf_nfapi_number_of_transport_blocks = -1;
1129 static int hf_nfapi_ue_mode = -1;
1130 static int hf_prs_bandwidth = -1;
1131 static int hf_prs_cyclic_prefix_type = -1;
1132 static int hf_prs_muting = -1;
1133 static int hf_nfapi_csi_rs_resource_index = -1;
1134 static int hf_nfapi_csi_rs_class = -1;
1135 static int hf_nfapi_cdm_type = -1;
1136 static int hf_nfapi_epdcch_prb_index = -1;
1137 static int hf_nfapi_epdcch_resource_assignment_flag = -1;
1138 static int hf_nfapi_epdcch_id = -1;
1139 static int hf_nfapi_epdcch_start_symbol = -1;
1140 static int hf_nfapi_epdcch_num_prb = -1;
1141 static int hf_nfapi_precoding_value = -1;
1142 static int hf_nfapi_mpdcch_narrowband = -1;
1143 static int hf_nfapi_number_of_prb_pairs = -1;
1144 static int hf_nfapi_resource_block_assignment = -1;
1145 static int hf_nfapi_start_symbol = -1;
1146 static int hf_nfapi_ecce_index = -1;
1147 static int hf_nfapi_ce_mode = -1;
1148 static int hf_nfapi_drms_scrabmling_init = -1;
1149 static int hf_nfapi_pdsch_reception_levels = -1;
1150 static int hf_nfapi_new_data_indicator = -1;
1151 static int hf_nfapi_tpmi_length = -1;
1152 static int hf_nfapi_pmi_flag = -1;
1153 static int hf_nfapi_harq_resource_offset = -1;
1154 static int hf_nfapi_dci_subframe_repetition_number = -1;
1155 static int hf_nfapi_downlink_assignment_index_length = -1;
1156 static int hf_nfapi_starting_ce_level = -1;
1157 static int hf_nfapi_antenna_ports_and_scrambling_identity_flag = -1;
1158 static int hf_nfapi_antenna_ports_and_scrambling_identity = -1;
1159 static int hf_nfapi_paging_direct_indication_differentiation_flag = -1;
1160 static int hf_nfapi_direct_indication = -1;
1161 static int hf_nfapi_number_of_tx_antenna_ports = -1;
1162 
1163 // P7 Message Structures
1164 static int hf_nfapi_dl_node_sync_t1 = -1;
1165 static int hf_nfapi_dl_node_sync_delta_sfn_sf = -1;
1166 static int hf_nfapi_ul_node_sync_t1 = -1;
1167 static int hf_nfapi_ul_node_sync_t2 = -1;
1168 static int hf_nfapi_ul_node_sync_t3 = -1;
1169 static int hf_nfapi_timing_info_last_sfn_sf = -1;
1170 static int hf_nfapi_timing_info_time_since_last_timing_info = -1;
1171 static int hf_nfapi_timing_info_dl_config_jitter = -1;
1172 static int hf_nfapi_timing_info_tx_request_jitter = -1;
1173 static int hf_nfapi_timing_info_ul_config_jitter = -1;
1174 static int hf_nfapi_timing_info_hi_dci0_jitter = -1;
1175 static int hf_nfapi_timing_info_dl_config_latest_delay = -1;
1176 static int hf_nfapi_timing_info_tx_request_latest_delay = -1;
1177 static int hf_nfapi_timing_info_ul_config_latest_delay = -1;
1178 static int hf_nfapi_timing_info_hi_dci0_latest_delay = -1;
1179 static int hf_nfapi_timing_info_dl_config_earliest_arrival = -1;
1180 static int hf_nfapi_timing_info_tx_request_earliest_arrival = -1;
1181 static int hf_nfapi_timing_info_ul_config_earliest_arrival = -1;
1182 static int hf_nfapi_timing_info_hi_dci0_earliest_arrival = -1;
1183 static int hf_nfapi_sfn_sf = -1;
1184 static int hf_nfapi_number_pdcch_ofdm_symbols = -1;
1185 static int hf_nfapi_number_dci = -1;
1186 static int hf_nfapi_number_pdus = -1;
1187 static int hf_nfapi_number_pdsch_rnti = -1;
1188 static int hf_nfapi_transmission_power_pcfich = -1;
1189 static int hf_nfapi_number_of_harqs = -1;
1190 static int hf_nfapi_number_of_crcs = -1;
1191 static int hf_nfapi_number_of_srs = -1;
1192 static int hf_nfapi_number_of_cqi = -1;
1193 static int hf_nfapi_number_of_preambles = -1;
1194 static int hf_nfapi_number_of_srss = -1;
1195 static int hf_nfapi_lbt_dl_req_pdu_type = -1;
1196 static int hf_nfapi_lbt_dl_ind_pdu_type = -1;
1197 static int hf_nfapi_dl_config_pdu_type = -1;
1198 static int hf_nfapi_pdu_size = -1;
1199 static int hf_nfapi_instance_length = -1;
1200 static int hf_nfapi_length;
1201 static int hf_nfapi_pdu_index = -1;
1202 static int hf_nfapi_rnti = -1;
1203 static int hf_nfapi_resource_allocation_type = -1;
1204 static int hf_nfapi_virtual_resource_block_assignment_flag = -1;
1205 static int hf_nfapi_resource_block_coding = -1;
1206 static int hf_nfapi_modulation = -1;
1207 static int hf_nfapi_redundancy_version = -1;
1208 static int hf_nfapi_transport_blocks = -1;
1209 static int hf_nfapi_transport_block_to_codeword_swap_flag = -1;
1210 static int hf_nfapi_transmission_scheme = -1;
1211 static int hf_nfapi_ul_transmission_scheme = -1;
1212 static int hf_nfapi_number_of_layers = -1;
1213 static int hf_nfapi_number_of_subbands = -1;
1214 static int hf_nfapi_codebook_index = -1;
1215 static int hf_nfapi_ue_category_capacity = -1;
1216 static int hf_nfapi_pa = -1;
1217 static int hf_nfapi_delta_power_offset_index = -1;
1218 static int hf_nfapi_ngap = -1;
1219 static int hf_nfapi_nprb = -1;
1220 static int hf_nfapi_transmission_mode = -1;
1221 static int hf_nfapi_num_bf_prb_per_subband = -1;
1222 static int hf_nfapi_num_bf_vector = -1;
1223 static int hf_nfapi_bf_vector_subband_index = -1;
1224 static int hf_nfapi_bf_vector_num_antennas = -1;
1225 static int hf_nfapi_bf_vector_bf_value = -1;
1226 static int hf_nfapi_nscid = -1;
1227 static int hf_nfapi_csi_rs_flag = -1;
1228 static int hf_nfapi_csi_rs_resource_config_r10 = -1;
1229 static int hf_nfapi_csi_rs_zero_tx_power_resource_config_bitmap_r10 = -1;
1230 static int hf_nfapi_transmission_power = -1;
1231 static int hf_nfapi_mbsfn_area_id = -1;
1232 static int hf_nfapi_csi_rs_antenna_port_count_r10 = -1;
1233 static int hf_nfapi_ul_config_pdu_type = -1;
1234 static int hf_nfapi_rach_prach_frequency_resources = -1;
1235 static int hf_nfapi_srs_present = -1;
1236 static int hf_nfapi_handle = -1;
1237 static int hf_nfapi_pucch_index = -1;
1238 static int hf_nfapi_size = -1;
1239 static int hf_nfapi_resource_block_start = -1;
1240 static int hf_nfapi_number_of_resource_blocks = -1;
1241 static int hf_nfapi_cyclic_shift_2_for_drms = -1;
1242 static int hf_nfapi_frequency_hopping_enabled_flag = -1;
1243 static int hf_nfapi_frequency_hopping_bits = -1;
1244 static int hf_nfapi_new_data_indication = -1;
1245 static int hf_nfapi_harq_process_number = -1;
1246 static int hf_nfapi_ul_tx_mode = -1;
1247 static int hf_nfapi_current_tx_nb = -1;
1248 static int hf_nfapi_n_srs = -1;
1249 static int hf_nfapi_disable_sequence_hopping_flag = -1;
1250 static int hf_nfapi_dl_cqi_pmi_size_rank_1 = -1;
1251 static int hf_nfapi_dl_cqi_pmi_size_rank_greater_1 = -1;
1252 static int hf_nfapi_ri_size = -1;
1253 static int hf_nfapi_delta_offset_cqi = -1;
1254 static int hf_nfapi_delta_offset_ri = -1;
1255 static int hf_nfapi_harq_size = -1;
1256 static int hf_nfapi_delta_offset_harq = -1;
1257 static int hf_nfapi_tdd_ack_nack_mode = -1;
1258 static int hf_nfapi_fdd_ack_nack_mode = -1;
1259 static int hf_nfapi_n_srs_initial = -1;
1260 static int hf_nfapi_initial_number_of_resource_blocks = -1;
1261 static int hf_nfapi_dl_cqi_pmi_size = -1;
1262 static int hf_nfapi_report_type = -1;
1263 static int hf_nfapi_dl_cqi_ri_pmi_size = -1;
1264 static int hf_nfapi_control_type = -1;
1265 static int hf_nfapi_number_of_cc = -1;
1266 static int hf_nfapi_virtual_cell_id_enabled_flag = -1;
1267 static int hf_nfapi_npusch_identity = -1;
1268 static int hf_nfapi_ndrms_csh_identity = -1;
1269 static int hf_nfapi_total_number_of_repetitions = -1;
1270 static int hf_nfapi_repetition_number = -1;
1271 static int hf_nfapi_initial_sf_io = -1;
1272 static int hf_nfapi_empty_symbols_due_to_retunning = -1;
1273 static int hf_nfapi_dl_cqi_ri_pmi_size_2 = -1;
1274 static int hf_nfapi_npucch_identity = -1;
1275 static int hf_nfapi_harq_size_2 = -1;
1276 static int hf_nfapi_delta_offset_harq_2 = -1;
1277 static int hf_nfapi_empty_symbols = -1;
1278 static int hf_nfapi_csi_mode = -1;
1279 static int hf_nfapi_dl_cqi_pmi_size_2 = -1;
1280 static int hf_nfapi_statring_prb = -1;
1281 static int hf_nfapi_cdm_index = -1;
1282 static int hf_nfapi_nsrs = -1;
1283 static int hf_nfapi_num_ant_ports = -1;
1284 static int hf_nfapi_n_pucch_2_0 = -1;
1285 static int hf_nfapi_n_pucch_2_1 = -1;
1286 static int hf_nfapi_n_pucch_2_2 = -1;
1287 static int hf_nfapi_n_pucch_2_3 = -1;
1288 static int hf_nfapi_starting_prb = -1;
1289 static int hf_nfapi_antenna_port = -1;
1290 static int hf_nfapi_number_of_combs = -1;
1291 static int hf_nfapi_number_of_pucch_resource = -1;
1292 static int hf_nfapi_pucch_index_p1 = -1;
1293 static int hf_nfapi_n_pucch_1_0 = -1;
1294 static int hf_nfapi_n_pucch_1_1 = -1;
1295 static int hf_nfapi_n_pucch_1_2 = -1;
1296 static int hf_nfapi_n_pucch_1_3 = -1;
1297 static int hf_nfapi_srs_bandwidth = -1;
1298 static int hf_nfapi_frequency_domain_position = -1;
1299 static int hf_nfapi_srs_hopping_bandwidth = -1;
1300 static int hf_nfapi_transmission_comb = -1;
1301 static int hf_nfapi_i_srs = -1;
1302 static int hf_nfapi_sounding_reference_cyclic_shift = -1;
1303 static int hf_nfapi_pdu_length = -1;
1304 static int hf_nfapi_crc_flag = -1;
1305 static int hf_nfapi_number_of_hi_pdus = -1;
1306 static int hf_nfapi_number_of_dci_pdus = -1;
1307 static int hf_nfapi_hi_dci0_pdu_type = -1;
1308 static int hf_nfapi_hi_value = -1;
1309 static int hf_nfapi_i_phich = -1;
1310 static int hf_nfapi_flag_tb2 = -1;
1311 static int hf_nfapi_hi_value_2 = -1;
1312 static int hf_nfapi_ue_tx_antenna_selection = -1;
1313 static int hf_nfapi_cqi_csi_request = -1;
1314 static int hf_nfapi_ul_index = -1;
1315 static int hf_nfapi_dl_assignment_index = -1;
1316 static int hf_nfapi_tpc_bitmap = -1;
1317 static int hf_nfapi_new_data_indication_two = -1;
1318 static int hf_nfapi_size_of_cqi_csi_field = -1;
1319 static int hf_nfapi_resource_allocation_flag = -1;
1320 static int hf_nfapi_number_of_antenna_ports = -1;
1321 static int hf_nfapi_n_ul_rb = -1;
1322 static int hf_nfapi_pscch_resource = -1;
1323 static int hf_nfapi_time_resource_pattern = -1;
1324 static int hf_nfapi_mpdcch_transmission_type = -1;
1325 static int hf_nfapi_drms_scrambling_init = -1;
1326 static int hf_nfapi_pusch_repetition_levels = -1;
1327 static int hf_nfapi_frequency_hopping_flag = -1;
1328 static int hf_nfapi_csi_request = -1;
1329 static int hf_nfapi_dai_presence_flag = -1;
1330 static int hf_nfapi_total_dci_length_include_padding = -1;
1331 static int hf_nfapi_data_offset = -1;
1332 static int hf_nfapi_ul_cqi = -1;
1333 static int hf_nfapi_timing_advance_r9 = -1;
1334 static int hf_nfapi_timing_advance = -1;
1335 static int hf_nfapi_harq_data_value_0 = -1;
1336 static int hf_nfapi_harq_data_value_0_special = -1;
1337 static int hf_nfapi_harq_data_value_1 = -1;
1338 static int hf_nfapi_harq_data_value_2 = -1;
1339 static int hf_nfapi_harq_data_value_3 = -1;
1340 static int hf_nfapi_tdd_harq_mode = -1;
1341 static int hf_nfapi_fdd_harq_mode = -1;
1342 static int hf_nfapi_number_of_ack_nack = -1;
1343 static int hf_nfapi_harq_tb_1 = -1;
1344 static int hf_nfapi_harq_tb_2 = -1;
1345 static int hf_nfapi_harq_tb_n = -1;
1346 static int hf_nfapi_channel = -1;
1347 static int hf_nfapi_ri = -1;
1348 static int hf_nfapi_number_of_cc_reported = -1;
1349 static int hf_nfapi_preamble = -1;
1350 static int hf_nfapi_rach_resource_type = -1;
1351 static int hf_nfapi_snr = -1;
1352 static int hf_nfapi_doppler_estimation = -1;
1353 static int hf_nfapi_rb_start = -1;
1354 static int hf_nfapi_up_pts_symbol = -1;
1355 static int hf_nfapi_number_prb_per_subband = -1;
1356 static int hf_nfapi_number_antennas = -1;
1357 static int hf_nfapi_subband_index = -1;
1358 static int hf_nfapi_channel_coefficient = -1;
1359 static int hf_nfapi_ul_rtoa = -1;
1360 static int hf_nfapi_mp_cca = -1;
1361 static int hf_nfapi_n_cca = -1;
1362 static int hf_nfapi_offset = -1;
1363 static int hf_nfapi_lte_txop_sf = -1;
1364 static int hf_nfapi_txop_sfn_sf_end = -1;
1365 static int hf_nfapi_lbt_mode = -1;
1366 static int hf_nfapi_sfn_sf_end = -1;
1367 static int hf_nfapi_result = -1;
1368 static int hf_nfapi_txop_symbols = -1;
1369 static int hf_nfapi_initial_partial_sf = -1;
1370 static int hf_nfapi_frequency_band_indicator = -1;
1371 static int hf_nfapi_measurement_period = -1;
1372 static int hf_nfapi_bandwidth = -1;
1373 static int hf_nfapi_timeout = -1;
1374 static int hf_nfapi_number_of_earfcns = -1;
1375 static int hf_nfapi_uarfcn = -1;
1376 static int hf_nfapi_number_of_uarfcns = -1;
1377 static int hf_nfapi_arfcn = -1;
1378 static int hf_nfapi_arfcn_direction = -1;
1379 static int hf_nfapi_number_of_arfcns = -1;
1380 static int hf_nfapi_rssi = -1;
1381 static int hf_nfapi_number_of_rssi = -1;
1382 static int hf_nfapi_pci = -1;
1383 static int hf_nfapi_measurement_bandwidth = -1;
1384 static int hf_nfapi_exhaustive_search = -1;
1385 static int hf_nfapi_number_of_pci = -1;
1386 static int hf_nfapi_psc = -1;
1387 static int hf_nfapi_number_of_psc = -1;
1388 static int hf_nfapi_rsrp = -1;
1389 static int hf_nfapi_rsrq = -1;
1390 static int hf_nfapi_number_of_lte_cells_found = -1;
1391 static int hf_nfapi_rscp = -1;
1392 static int hf_nfapi_enco = -1;
1393 static int hf_nfapi_number_of_utran_cells_found = -1;
1394 static int hf_nfapi_bsic = -1;
1395 static int hf_nfapi_rxlev = -1;
1396 static int hf_nfapi_rxqual = -1;
1397 static int hf_nfapi_sfn_offset = -1;
1398 static int hf_nfapi_number_of_geran_cells_found = -1;
1399 static int hf_nfapi_number_of_tx_antenna = -1;
1400 static int hf_nfapi_mib = -1;
1401 static int hf_nfapi_phich_configuration = -1;
1402 static int hf_nfapi_retry_count = -1;
1403 static int hf_nfapi_sib1 = -1;
1404 static int hf_nfapi_si_periodicity = -1;
1405 static int hf_nfapi_si_index = -1;
1406 static int hf_nfapi_number_of_si_periodicity = -1;
1407 static int hf_nfapi_si_window_length = -1;
1408 static int hf_nfapi_sib_type = -1;
1409 static int hf_nfapi_sib = -1;
1410 static int hf_nfapi_si = -1;
1411 static int hf_nfapi_pnf_search_state = -1;
1412 static int hf_nfapi_pnf_broadcast_state = -1;
1413 
1414 static const value_string message_id_vals[] =
1415 {
1416 	{ NFAPI_DL_CONFIG_REQUEST_MSG_ID, "DL_CONFIG.request" },
1417 	{ NFAPI_UL_CONFIG_REQUEST_MSG_ID, "UL_CONFIG.request" },
1418 	{ NFAPI_SUBFRAME_INDICATION_MSG_ID, "SUBFRAME_INDICATION" },
1419 	{ NFAPI_HI_DCI0_REQUEST_MSG_ID, "HI_DCI0.request" },
1420 	{ NFAPI_TX_REQUEST_MSG_ID, "TX.request" },
1421 	{ NFAPI_HARQ_INDICATION_MSG_ID, "HARQ.indication" },
1422 	{ NFAPI_CRC_INDICATION_MSG_ID, "CRC.indication" },
1423 	{ NFAPI_RX_ULSCH_INDICATION_MSG_ID, "RX_ULSCH.indication" },
1424 	{ NFAPI_RACH_INDICATION_MSG_ID, "RACH.indication" },
1425 	{ NFAPI_SRS_INDICATION_MSG_ID, "SRS.indication" },
1426 	{ NFAPI_RX_SR_INDICATION_MSG_ID, "RX_SR.indication" },
1427 	{ NFAPI_RX_CQI_INDICATION_MSG_ID, "RX_CQI.indication" },
1428 	{ NFAPI_LBT_DL_CONFIG_REQUEST_MSG_ID, "LBT_DL_CONFIG.request" },
1429 	{ NFAPI_LBT_DL_INDICATION_MSG_ID, "LBT_DL.indication" },
1430 
1431 	{ NFAPI_PNF_PARAM_REQUEST_MSG_ID, "PNF_PARAM.request" },
1432 	{ NFAPI_PNF_PARAM_RESPONSE_MSG_ID, "PNF_PARAM.response" },
1433 	{ NFAPI_PNF_CONFIG_REQUEST_MSG_ID, "PNF_CONFIG.request" },
1434 	{ NFAPI_PNF_CONFIG_RESPONSE_MSG_ID, "PNF_CONFIG.response" },
1435 	{ NFAPI_PNF_START_REQUEST_MSG_ID, "PNF_START.request" },
1436 	{ NFAPI_PNF_START_RESPONSE_MSG_ID, "PNF_START.response" },
1437 	{ NFAPI_PNF_STOP_REQUEST_MSG_ID, "PNF_STOP.request" },
1438 	{ NFAPI_PNF_STOP_RESPONSE_MSG_ID, "PNF_STOP.response" },
1439 	{ NFAPI_PARAM_REQUEST_MSG_ID, "PARAM.request" },
1440 	{ NFAPI_PARAM_RESPONSE_MSG_ID, "PARAM.response" },
1441 	{ NFAPI_CONFIG_REQUEST_MSG_ID, "CONFIG.request" },
1442 	{ NFAPI_CONFIG_RESPONSE_MSG_ID, "CONFIG.response" },
1443 	{ NFAPI_START_REQUEST_MSG_ID, "START.request" },
1444 	{ NFAPI_START_RESPONSE_MSG_ID, "START.response" },
1445 	{ NFAPI_STOP_REQUEST_MSG_ID, "STOP.request" },
1446 	{ NFAPI_STOP_RESPONSE_MSG_ID, "STOP.response" },
1447 	{ NFAPI_MEASUREMENT_REQUEST_MSG_ID, "MEASUREMENT.request" },
1448 	{ NFAPI_MEASUREMENT_RESPONSE_MSG_ID, "MEASUREMENT.response" },
1449 
1450 	{ NFAPI_DL_NODE_SYNC_MSG_ID, "UL_NODE_SYNC" },
1451 	{ NFAPI_UL_NODE_SYNC_MSG_ID, "DL_NODE_SYNC" },
1452 	{ NFAPI_TIMING_INFO_MSG_ID, "TIMING_INFO" },
1453 
1454 	{ NFAPI_RSSI_REQUEST_MSG_ID, "RSSI.request" },
1455 	{ NFAPI_RSSI_RESPONSE_MSG_ID, "RSSI.response" },
1456 	{ NFAPI_RSSI_INDICATION_MSG_ID, "RSSI.indication" },
1457 	{ NFAPI_CELL_SEARCH_REQUEST_MSG_ID, "CELL_SEARCH.request" },
1458 	{ NFAPI_CELL_SEARCH_RESPONSE_MSG_ID, "CELL_SEARCH.response" },
1459 	{ NFAPI_CELL_SEARCH_INDICATION_MSG_ID, "CELL_SEARCH.indication" },
1460 	{ NFAPI_BROADCAST_DETECT_REQUEST_MSG_ID, "BROADCAST_DETECT.request" },
1461 	{ NFAPI_BROADCAST_DETECT_RESPONSE_MSG_ID, "BROADCAST_DETECT.response" },
1462 	{ NFAPI_BROADCAST_DETECT_INDICATION_MSG_ID, "BROADCAST_DETECT.indication" },
1463 	{ NFAPI_SYSTEM_INFORMATION_SCHEDULE_REQUEST_MSG_ID, "SYSTEM_INFORMATION_SCHEDULE.request" },
1464 	{ NFAPI_SYSTEM_INFORMATION_SCHEDULE_RESPONSE_MSG_ID, "SYSTEM_INFORMATION_SCHEDULE.response" },
1465 	{ NFAPI_SYSTEM_INFORMATION_SCHEDULE_INDICATION_MSG_ID, "SYSTEM_INFORMATION_SCHEDULE.indication" },
1466 	{ NFAPI_SYSTEM_INFORMATION_REQUEST_MSG_ID, "SYSTEM_INFORMATION.request" },
1467 	{ NFAPI_SYSTEM_INFORMATION_RESPONSE_MSG_ID, "SYSTEM_INFORMATION.response" },
1468 	{ NFAPI_SYSTEM_INFORMATION_INDICATION_MSG_ID, "SYSTEM_INFORMATION.indication" },
1469 	{ NFAPI_NMM_STOP_REQUEST_MSG_ID, "NMM_STOP.request" },
1470 	{ NFAPI_NMM_STOP_RESPONSE_MSG_ID, "NMM_STOP.response" },
1471 
1472 	{ 0, NULL },
1473 };
1474 
1475 static dissector_handle_t nfapi_handle;
1476 static dissector_table_t message_table;
1477 
1478 static int * const dl_bandwidth_support_fields[] = {
1479 	&hf_nfapi_dl_bandwidth_support_6,
1480 	&hf_nfapi_dl_bandwidth_support_15,
1481 	&hf_nfapi_dl_bandwidth_support_25,
1482 	&hf_nfapi_dl_bandwidth_support_50,
1483 	&hf_nfapi_dl_bandwidth_support_75,
1484 	&hf_nfapi_dl_bandwidth_support_100,
1485 	NULL
1486 };
1487 
1488 static int * const ul_bandwidth_support_fields[] = {
1489 	&hf_nfapi_ul_bandwidth_support_6,
1490 	&hf_nfapi_ul_bandwidth_support_15,
1491 	&hf_nfapi_ul_bandwidth_support_25,
1492 	&hf_nfapi_ul_bandwidth_support_50,
1493 	&hf_nfapi_ul_bandwidth_support_75,
1494 	&hf_nfapi_ul_bandwidth_support_100,
1495 	NULL
1496 };
1497 
1498 static int * const maximum_3gpp_release_supported_fields[] = {
1499 	&hf_nfapi_maximum_3gpp_release_supported_rel8,
1500 	&hf_nfapi_maximum_3gpp_release_supported_rel9,
1501 	&hf_nfapi_maximum_3gpp_release_supported_rel10,
1502 	&hf_nfapi_maximum_3gpp_release_supported_rel11,
1503 	&hf_nfapi_maximum_3gpp_release_supported_rel12,
1504 	&hf_nfapi_maximum_3gpp_release_supported_rel13,
1505 	&hf_nfapi_dl_bandwidth_support_100,
1506 	NULL
1507 };
1508 
1509 typedef void(*tlv_decode)(ptvcursor_t * ptvc, packet_info* pinfo);
1510 
1511 typedef struct
1512 {
1513 	guint16 tag_id;
1514 	char* name;
1515 	tlv_decode decode;
1516 } tlv_t;
1517 
1518 static void dissect_tlv_list(ptvcursor_t * ptvc, packet_info* pinfo, gint len);
1519 
dissect_array_value(ptvcursor_t * ptvc,packet_info * pinfo,const char * name,guint32 ett_idx,guint32 count,tlv_decode decode)1520 static void dissect_array_value(ptvcursor_t * ptvc, packet_info* pinfo, const char* name, guint32 ett_idx, guint32 count, tlv_decode decode)
1521 {
1522 	guint16 i = 0;
1523 
1524 	if (count > 0)
1525 	{
1526 		ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_idx, "%s", name);
1527 
1528 		for (i = 0; i < count; ++i)
1529 		{
1530 			ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_idx, "[%d]", i);
1531 			decode(ptvc, pinfo);
1532 			ptvcursor_pop_subtree(ptvc);
1533 		}
1534 
1535 		ptvcursor_pop_subtree(ptvc);
1536 	}
1537 }
1538 
dissect_pnf_param_general_value(ptvcursor_t * ptvc,packet_info * pinfo)1539 static void dissect_pnf_param_general_value(ptvcursor_t * ptvc, packet_info* pinfo)
1540 {
1541 	proto_item* item;
1542 	gint32 test_value;
1543 
1544 	// nFAPI Sync Mode
1545 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_sync_mode, 1, ENC_BIG_ENDIAN, &test_value);
1546 	if (test_value > 2)
1547 	{
1548 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nfapi sync mode value [0..2]");
1549 	}
1550 
1551 	// Location Mode
1552 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_location_mode, 1, ENC_BIG_ENDIAN, &test_value);
1553 	if (test_value > 3)
1554 	{
1555 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid location mode value [0..3]");
1556 	}
1557 
1558 	ptvcursor_add(ptvc, hf_nfapi_location_coordinates, 2, ENC_BIG_ENDIAN|ENC_NA);
1559 	ptvcursor_add(ptvc, hf_nfapi_dl_config_timing, 4, ENC_BIG_ENDIAN);
1560 	ptvcursor_add(ptvc, hf_nfapi_tx_timing, 4, ENC_BIG_ENDIAN);
1561 	ptvcursor_add(ptvc, hf_nfapi_ul_config_timing, 4, ENC_BIG_ENDIAN);
1562 	ptvcursor_add(ptvc, hf_nfapi_hi_dci0_timing, 4, ENC_BIG_ENDIAN);
1563 	ptvcursor_add(ptvc, hf_nfapi_maximum_number_phys, 2, ENC_BIG_ENDIAN);
1564 	ptvcursor_add(ptvc, hf_nfapi_maximum_total_bandwidth, 2, ENC_BIG_ENDIAN);
1565 	ptvcursor_add(ptvc, hf_nfapi_maximum_total_number_dl_layers, 1, ENC_BIG_ENDIAN);
1566 	ptvcursor_add(ptvc, hf_nfapi_maximum_total_number_ul_layers, 1, ENC_BIG_ENDIAN);
1567 
1568 	// Shared Bands
1569 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_shared_bands, 1, ENC_BIG_ENDIAN, &test_value);
1570 	if (test_value > 1)
1571 	{
1572 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid shared bands value [0..1]");
1573 	}
1574 
1575 	// Shared PA
1576 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_shared_pa, 1, ENC_BIG_ENDIAN, &test_value);
1577 	if (test_value > 1)
1578 	{
1579 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid shared pa value [0..1]");
1580 	}
1581 
1582 	ptvcursor_add(ptvc, hf_nfapi_maximum_total_power, 2, ENC_BIG_ENDIAN);
1583 	ptvcursor_add(ptvc, hf_nfapi_oui, 3, ENC_HOST_ENDIAN);
1584 }
dissect_pnf_rf_config_instance_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)1585 static void dissect_pnf_rf_config_instance_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
1586 {
1587 	ptvcursor_add(ptvc, hf_nfapi_rf_config_index, 2, ENC_BIG_ENDIAN);
1588 }
1589 
dissect_pnf_phy_instance_value(ptvcursor_t * ptvc,packet_info * pinfo)1590 static void dissect_pnf_phy_instance_value(ptvcursor_t * ptvc, packet_info* pinfo)
1591 {
1592 	proto_item* item;
1593 	guint32 array_size, test_value;
1594 	guint64 test_value64;
1595 
1596 	ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1597 
1598 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rfs, 2, ENC_BIG_ENDIAN, &array_size);
1599 	dissect_array_value(ptvc, pinfo, "RF Config List", ett_nfapi_pnf_phy, array_size, dissect_pnf_rf_config_instance_value);
1600 
1601 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rf_exclusions, 2, ENC_BIG_ENDIAN, &array_size);
1602 	dissect_array_value(ptvc, pinfo, "RF Exclusion List", ett_nfapi_pnf_phy, array_size, dissect_pnf_rf_config_instance_value);
1603 
1604 	// Downlink Channel Bandwidth Supported
1605 	item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
1606 											hf_nfapi_downlink_channel_bandwidth_supported, ett_nfapi_downlink_bandwidth_support, dl_bandwidth_support_fields, ENC_BIG_ENDIAN, &test_value64);
1607 	if (test_value64 > 0x3F)
1608 	{
1609 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink channel bandwidth supported bits [0..0x3F]");
1610 	}
1611 	ptvcursor_advance(ptvc, 2);
1612 
1613 	// Uplink Channel Bandwidth Supported
1614 	item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
1615 											hf_nfapi_uplink_channel_bandwidth_supported, ett_nfapi_uplink_bandwidth_support, ul_bandwidth_support_fields, ENC_BIG_ENDIAN, &test_value64);
1616 	if (test_value64 > 0x3F)
1617 	{
1618 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid uplink channel bandwidth supported bits [0..0x3F]");
1619 	}
1620 	ptvcursor_advance(ptvc, 2);
1621 
1622 	// Number of DL layers supported
1623 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_dl_layers_supported, 1, ENC_BIG_ENDIAN, &test_value);
1624 	switch (test_value)
1625 	{
1626 	case 1:
1627 	case 2:
1628 	case 4:
1629 	case 8:
1630 		break;
1631 	default:
1632 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of dl layers supported value [1, 2, 4, 8]");
1633 		break;
1634 	}
1635 
1636 	// Number of DL layers supported
1637 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ul_layers_supported, 1, ENC_BIG_ENDIAN, &test_value);
1638 	switch (test_value)
1639 	{
1640 	case 1:
1641 	case 2:
1642 	case 4:
1643 	case 8:
1644 		break;
1645 	default:
1646 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ul layers supported value [1, 2, 4, 8]");
1647 		break;
1648 	}
1649 
1650 	// Maximum 3GPP Release Supported
1651 	item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
1652 											hf_nfapi_maximum_3gpp_release_supported, ett_nfapi_release_support, maximum_3gpp_release_supported_fields, ENC_BIG_ENDIAN, &test_value64);
1653 	if (test_value64 > 0x3F)
1654 	{
1655 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid maximum 3GPP release supported value [0..0x3F]");
1656 	}
1657 	ptvcursor_advance(ptvc, 2);
1658 
1659 	// NMM Modes Supported
1660 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nmm_modes_supported, 1, ENC_BIG_ENDIAN, &test_value);
1661 	if (test_value > 3)
1662 	{
1663 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nmm modes supported value [0..3]");
1664 	}
1665 }
1666 
dissect_pnf_phy_value(ptvcursor_t * ptvc,packet_info * pinfo)1667 static void dissect_pnf_phy_value(ptvcursor_t * ptvc, packet_info* pinfo)
1668 {
1669 	guint32 num_phy;
1670 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_phy);
1671 	dissect_array_value(ptvc, pinfo, "PHY List", ett_nfapi_pnf_phy, num_phy, dissect_pnf_phy_instance_value);
1672 }
1673 
dissect_pnf_rf_config_value(ptvcursor_t * ptvc,packet_info * pinfo)1674 static void dissect_pnf_rf_config_value(ptvcursor_t * ptvc, packet_info* pinfo)
1675 {
1676 	proto_item* item;
1677 	guint32 test_value;
1678 
1679 	ptvcursor_add(ptvc, hf_nfapi_rf_config_index, 2, ENC_BIG_ENDIAN);
1680 	ptvcursor_add(ptvc, hf_nfapi_band, 2, ENC_BIG_ENDIAN);
1681 	ptvcursor_add(ptvc, hf_nfapi_maximum_transmit_power, 2, ENC_BIG_ENDIAN);
1682 	ptvcursor_add(ptvc, hf_nfapi_minimum_transmit_power, 2, ENC_BIG_ENDIAN);
1683 
1684 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_antennas_suppported, 1, ENC_BIG_ENDIAN, &test_value);
1685 	switch (test_value)
1686 	{
1687 	case 1:
1688 	case 2:
1689 	case 4:
1690 	case 8:
1691 		break;
1692 	default:
1693 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of supported antennas [1, 2, 4, 8]");
1694 		break;
1695 	}
1696 
1697 	ptvcursor_add(ptvc, hf_nfapi_minimum_downlink_frequency, 4, ENC_BIG_ENDIAN);
1698 	ptvcursor_add(ptvc, hf_nfapi_maximum_downlink_frequency, 4, ENC_BIG_ENDIAN);
1699 	ptvcursor_add(ptvc, hf_nfapi_minimum_uplink_frequency, 4, ENC_BIG_ENDIAN);
1700 	ptvcursor_add(ptvc, hf_nfapi_maximum_uplink_frequency, 4, ENC_BIG_ENDIAN);
1701 }
1702 
1703 
dissect_pnf_rf_value(ptvcursor_t * ptvc,packet_info * pinfo)1704 static void dissect_pnf_rf_value(ptvcursor_t * ptvc, packet_info* pinfo)
1705 {
1706 	guint32 num_rf;
1707 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rfs, 2, ENC_BIG_ENDIAN, &num_rf);
1708 	dissect_array_value(ptvc, pinfo, "RF List", ett_nfapi_pnf_phy_rf_config, num_rf, dissect_pnf_rf_config_value);
1709 }
1710 
dissect_pnf_phy_rel10_instance_value(ptvcursor_t * ptvc,packet_info * pinfo)1711 static void dissect_pnf_phy_rel10_instance_value(ptvcursor_t * ptvc, packet_info* pinfo)
1712 {
1713 	proto_item* item;
1714 	guint32 test_value;
1715 
1716 	// PHY Config Index
1717 	ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1718 
1719 	// Transmission mode 7 supported
1720 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_mode7_supported, 2, ENC_BIG_ENDIAN, &test_value);
1721 	if (test_value > 1)
1722 	{
1723 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode 7 supported value [0..1]");
1724 	}
1725 
1726 	// Two antennas ports for PUCCH
1727 	item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_transmission_mode8_supported, 2, ENC_BIG_ENDIAN, &test_value);
1728 	if (test_value > 1)
1729 	{
1730 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode 8 supported value [0..1]");
1731 	}
1732 
1733 	// Transmission mode 8 supported
1734 	item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_two_antennas_ports_for_pucch, 2, ENC_BIG_ENDIAN, &test_value);
1735 	if (test_value > 1)
1736 	{
1737 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid two antennas ports for pucch value [0..1]");
1738 	}
1739 
1740 	// Transmission mode 9 supported
1741 	item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_transmission_mode_9_supported, 2, ENC_BIG_ENDIAN, &test_value);
1742 	if (test_value > 1)
1743 	{
1744 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode 9 supported value [0..1]");
1745 	}
1746 
1747 	// Simultaneous PUCCH PUSCH
1748 	item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_simultaneous_pucch_pusch, 2, ENC_BIG_ENDIAN, &test_value);
1749 	if (test_value > 1)
1750 	{
1751 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid simultaneous pucch pusch supported value [0..1]");
1752 	}
1753 
1754 	// Four layer Tx with TM3 and TM4
1755 	item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_four_layer_tx_with_tm3_and_tm4, 2, ENC_BIG_ENDIAN, &test_value);
1756 	if (test_value > 1)
1757 	{
1758 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid four layer tx with tm3 and tm4 value [0..1]");
1759 	}
1760 }
1761 
dissect_pnf_phy_rel10_value(ptvcursor_t * ptvc,packet_info * pinfo)1762 static void dissect_pnf_phy_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
1763 {
1764 	guint32 num_phy;
1765 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_phy);
1766 	dissect_array_value(ptvc, pinfo, "PHY Rel 10 List", ett_nfapi_pnf_phy_rel10, num_phy, dissect_pnf_phy_rel10_instance_value);
1767 }
1768 
dissect_pnf_phy_rel11_instance_value(ptvcursor_t * ptvc,packet_info * pinfo)1769 static void dissect_pnf_phy_rel11_instance_value(ptvcursor_t * ptvc, packet_info* pinfo)
1770 {
1771 	proto_item* item;
1772 	guint32 test_value;
1773 
1774 	// PHY Config Index
1775 	ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1776 
1777 	// ePDCCH supported
1778 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_epdcch_supported, 2, ENC_BIG_ENDIAN, &test_value);
1779 	if (test_value > 1)
1780 	{
1781 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid epdcch supported value [0..1]");
1782 	}
1783 
1784 	// Multi ACK CSI reporting
1785 	item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_multi_ack_csi_reporting, 2, ENC_BIG_ENDIAN, &test_value);
1786 	if (test_value > 1)
1787 	{
1788 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid multi ack csi reporting value [0..1]");
1789 	}
1790 
1791 	// PUCCH Tx diversity with channel selection
1792 	item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_pucch_tx_diversity_with_channel_selection, 2, ENC_BIG_ENDIAN, &test_value);
1793 	if (test_value > 1)
1794 	{
1795 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch tx diversity with channel selection value [0..1]");
1796 	}
1797 
1798 	// UL CoMP supported
1799 	item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_ul_comp_supported, 2, ENC_BIG_ENDIAN, &test_value);
1800 	if (test_value > 1)
1801 	{
1802 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul comp supported value [0..1]");
1803 	}
1804 
1805 	// Transmission mode 5 supported
1806 	item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_transmission_mode_5_supported, 2, ENC_BIG_ENDIAN, &test_value);
1807 	if (test_value > 1)
1808 	{
1809 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode 5 supported value [0..1]");
1810 	}
1811 }
1812 
dissect_pnf_phy_rel11_value(ptvcursor_t * ptvc,packet_info * pinfo)1813 static void dissect_pnf_phy_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
1814 {
1815 	guint32 num_phy;
1816 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_phy);
1817 	dissect_array_value(ptvc, pinfo, "PHY Rel 11 List", ett_nfapi_pnf_phy_rel11, num_phy, dissect_pnf_phy_rel11_instance_value);
1818 }
1819 
dissect_pnf_phy_rel12_instance_value(ptvcursor_t * ptvc,packet_info * pinfo)1820 static void dissect_pnf_phy_rel12_instance_value(ptvcursor_t * ptvc, packet_info* pinfo)
1821 {
1822 	proto_item* item;
1823 	guint32 test_value;
1824 
1825 	// PHY Config Index
1826 	ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1827 
1828 	// CSI subframe set
1829 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_subframe_set, 2, ENC_BIG_ENDIAN, &test_value);
1830 	if (test_value > 1)
1831 	{
1832 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi subframe set value [0..1]");
1833 	}
1834 
1835 	// Enhanced 4TX codebook
1836 	item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_enhanced_4tx_codebook, 2, ENC_BIG_ENDIAN, &test_value);
1837 	if (test_value > 1)
1838 	{
1839 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid enhanced 4TX codebook value [0..1]");
1840 	}
1841 
1842 	// DRS supported
1843 	item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_drs_supported, 2, ENC_BIG_ENDIAN, &test_value);
1844 	if (test_value > 1)
1845 	{
1846 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drs supported value [0..1]");
1847 	}
1848 
1849 	// UL 64QAM supported
1850 	item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_ul_64qam_supported, 2, ENC_BIG_ENDIAN, &test_value);
1851 	if (test_value > 1)
1852 	{
1853 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul 64 QAM supported value [0..1]");
1854 	}
1855 
1856 	// Transmission mode 10 supported
1857 	item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_transmission_mode_10_supported, 2, ENC_BIG_ENDIAN, &test_value);
1858 	if (test_value > 1)
1859 	{
1860 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode 10 supported value [0..1]");
1861 	}
1862 
1863 	// Alternative TBS indices
1864 	item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_alternative_tbs_indices, 2, ENC_BIG_ENDIAN, &test_value);
1865 	if (test_value > 1)
1866 	{
1867 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid alternative tbs indices supported value [0..1]");
1868 	}
1869 }
1870 
dissect_pnf_phy_rel12_value(ptvcursor_t * ptvc,packet_info * pinfo)1871 static void dissect_pnf_phy_rel12_value(ptvcursor_t * ptvc, packet_info* pinfo)
1872 {
1873 	guint32 num_phy;
1874 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_phy);
1875 	dissect_array_value(ptvc, pinfo, "PHY Rel 12 List", ett_nfapi_pnf_phy_rel12, num_phy, dissect_pnf_phy_rel12_instance_value);
1876 }
1877 
dissect_pnf_phy_rel13_instance_value(ptvcursor_t * ptvc,packet_info * pinfo)1878 static void dissect_pnf_phy_rel13_instance_value(ptvcursor_t * ptvc, packet_info* pinfo)
1879 {
1880 	proto_item* item;
1881 	guint32 test_value;
1882 
1883 	// PHY Config Index
1884 	ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1885 
1886 	// PUCCH format 4 supported
1887 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_format_4_supported, 2, ENC_BIG_ENDIAN, &test_value);
1888 	if (test_value > 1)
1889 	{
1890 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch format 4 supported value [0..1]");
1891 	}
1892 
1893 	// PUCCH format 5 supported
1894 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_format_5_supported, 2, ENC_BIG_ENDIAN, &test_value);
1895 	if (test_value > 1)
1896 	{
1897 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch format 5 supported value [0..1]");
1898 	}
1899 
1900 	// More than 5 CA support
1901 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_more_than_5_ca_supported, 2, ENC_BIG_ENDIAN, &test_value);
1902 	if (test_value > 1)
1903 	{
1904 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid more than 5 ca supported value [0..1]");
1905 	}
1906 
1907 	// LAA supported
1908 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_laa_supported, 2, ENC_BIG_ENDIAN, &test_value);
1909 	if (test_value > 1)
1910 	{
1911 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid laa supported value [0..1]");
1912 	}
1913 
1914 	// LAA ending in DwPTS supported
1915 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_laa_ending_in_dwpts_supported, 2, ENC_BIG_ENDIAN, &test_value);
1916 	if (test_value > 1)
1917 	{
1918 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid laa ending in dwpts supported value [0..1]");
1919 	}
1920 
1921 	// LAA starting in second slot Supported
1922 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_laa_starting_in_second_slot_supported, 2, ENC_BIG_ENDIAN, &test_value);
1923 	if (test_value > 1)
1924 	{
1925 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid laa starting in second slot supported value [0..1]");
1926 	}
1927 
1928 	// Beamforming Supported
1929 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_beamforming_supported, 2, ENC_BIG_ENDIAN, &test_value);
1930 	if (test_value > 1)
1931 	{
1932 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid beamforming supported value [0..1]");
1933 	}
1934 
1935 	// CSI-RS enhancements supported
1936 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_enhancements_supported, 2, ENC_BIG_ENDIAN, &test_value);
1937 	if (test_value > 1)
1938 	{
1939 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi rs enhancements supported value [0..1]");
1940 	}
1941 
1942 	// DMRS enhancements supported
1943 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_enhancements_supported, 2, ENC_BIG_ENDIAN, &test_value);
1944 	if (test_value > 1)
1945 	{
1946 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms enhancements supported value [0..1]");
1947 	}
1948 
1949 	// SRS enhancements supported
1950 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_srs_enhancements_supported, 2, ENC_BIG_ENDIAN, &test_value);
1951 	if (test_value > 1)
1952 	{
1953 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs enhancements supported value [0..1]");
1954 	}
1955 
1956 }
1957 
dissect_pnf_phy_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)1958 static void dissect_pnf_phy_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
1959 {
1960 	guint32 num_phy;
1961 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_phy);
1962 	dissect_array_value(ptvc, pinfo, "PHY Rel 13 List", ett_nfapi_pnf_phy_rel13, num_phy, dissect_pnf_phy_rel13_instance_value);
1963 }
1964 
dissect_pnf_phy_rf_config_instance_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)1965 static void dissect_pnf_phy_rf_config_instance_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
1966 {
1967 	ptvcursor_add(ptvc, hf_nfapi_phy_rf_config_info_phy_id, 2, ENC_BIG_ENDIAN);
1968 	ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1969 	ptvcursor_add(ptvc, hf_nfapi_rf_config_index, 2, ENC_BIG_ENDIAN);
1970 }
dissect_pnf_phy_rf_config_value(ptvcursor_t * ptvc,packet_info * pinfo)1971 static void dissect_pnf_phy_rf_config_value(ptvcursor_t * ptvc, packet_info* pinfo)
1972 {
1973 	guint32 num_configs;
1974 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_configs);
1975 	dissect_array_value(ptvc, pinfo, "PHY RF Config List", ett_nfapi_pnf_phy_rf_config, num_configs, dissect_pnf_phy_rf_config_instance_value);
1976 }
1977 
dissect_dl_rs_tx_power_value(ptvcursor_t * ptvc,packet_info * pinfo)1978 static void dissect_dl_rs_tx_power_value(ptvcursor_t * ptvc, packet_info* pinfo)
1979 {
1980 	guint32 test_value;
1981 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_rs_tx_power, 2, ENC_BIG_ENDIAN, &test_value);
1982 
1983 	if (!(test_value >= 1 && test_value <= 255))
1984 	{
1985 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value [1..255]");
1986 	}
1987 }
dissect_received_interference_power_value(ptvcursor_t * ptvc,packet_info * pinfo)1988 static void dissect_received_interference_power_value(ptvcursor_t * ptvc, packet_info* pinfo)
1989 {
1990 	guint32 test_value;
1991 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_received_interference_power, 2, ENC_BIG_ENDIAN, &test_value);
1992 
1993 	if (!(test_value >= 1 && test_value <= 255))
1994 	{
1995 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value [1..255]");
1996 	}
1997 }
dissect_thermal_noise_power_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)1998 static void dissect_thermal_noise_power_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
1999 {
2000 	ptvcursor_add(ptvc, hf_nfapi_thermal_noise_power, 2, ENC_BIG_ENDIAN);
2001 }
dissect_dl_rs_tx_power_measurement_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)2002 static void dissect_dl_rs_tx_power_measurement_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
2003 {
2004 	ptvcursor_add(ptvc, hf_nfapi_dl_rs_tx_power_measurement, 2, ENC_BIG_ENDIAN);
2005 }
2006 
dissect_received_interference_power_result_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)2007 static void dissect_received_interference_power_result_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
2008 {
2009 	ptvcursor_add(ptvc, hf_nfapi_received_interference_power_measurement, 2, ENC_BIG_ENDIAN);
2010 }
dissect_received_interference_power_measurement_value(ptvcursor_t * ptvc,packet_info * pinfo)2011 static void dissect_received_interference_power_measurement_value(ptvcursor_t * ptvc, packet_info* pinfo)
2012 {
2013 	guint32 num_resource_block;
2014 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_resource_blocks, 2, ENC_BIG_ENDIAN, &num_resource_block);
2015 	dissect_array_value(ptvc, pinfo, "Results", ett_nfapi_received_interference_power_mesurement_results, num_resource_block, dissect_received_interference_power_result_value);
2016 }
dissect_thermal_noise_power_measurement_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)2017 static void dissect_thermal_noise_power_measurement_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
2018 {
2019 	ptvcursor_add(ptvc, hf_nfapi_thermal_noise_power_measurement, 2, ENC_BIG_ENDIAN);
2020 }
dissect_duplex_mode_value(ptvcursor_t * ptvc,packet_info * pinfo)2021 static void dissect_duplex_mode_value(ptvcursor_t * ptvc, packet_info* pinfo)
2022 {
2023 	guint32 test_value;
2024 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_duplex_mode, 2, ENC_BIG_ENDIAN, &test_value);
2025 
2026 	if (test_value > 2)
2027 	{
2028 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid duplex mode [0..2]");
2029 	}
2030 }
dissect_pcfich_power_offset_value(ptvcursor_t * ptvc,packet_info * pinfo)2031 static void dissect_pcfich_power_offset_value(ptvcursor_t* ptvc, packet_info *pinfo)
2032 {
2033 	guint32 test_value;
2034 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pcfich_power_offset, 2, ENC_BIG_ENDIAN, &test_value);
2035 
2036 	if (test_value > 10000)
2037 	{
2038 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid power level [0..10000]");
2039 	}
2040 }
dissect_pb_value(ptvcursor_t * ptvc,packet_info * pinfo)2041 static void dissect_pb_value(ptvcursor_t * ptvc, packet_info* pinfo)
2042 {
2043 	guint32 test_value;
2044 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pb, 2, ENC_BIG_ENDIAN, &test_value);
2045 
2046 	if (test_value > 3)
2047 	{
2048 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink power allocation Index [0..3]");
2049 	}
2050 }
2051 
dissect_dl_cyclic_prefix_value(ptvcursor_t * ptvc,packet_info * pinfo)2052 static void dissect_dl_cyclic_prefix_value(ptvcursor_t * ptvc, packet_info* pinfo)
2053 {
2054 	gint32 test_value;
2055 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_dl_cyclic_prefix_type, 2, ENC_BIG_ENDIAN, &test_value);
2056 
2057 	if (test_value > 1)
2058 	{
2059 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dl cyclic prefix type [0..1]");
2060 	}
2061 }
dissect_ul_cyclic_prefix_value(ptvcursor_t * ptvc,packet_info * pinfo)2062 static void dissect_ul_cyclic_prefix_value(ptvcursor_t * ptvc, packet_info* pinfo)
2063 {
2064 	gint32 test_value;
2065 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_ul_cyclic_prefix_type, 2, ENC_BIG_ENDIAN, &test_value);
2066 
2067 	if (test_value > 1)
2068 	{
2069 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul cyclic prefix type [0..1]");
2070 	}
2071 }
dissect_dl_channel_bandwidth_value(ptvcursor_t * ptvc,packet_info * pinfo)2072 static void dissect_dl_channel_bandwidth_value(ptvcursor_t * ptvc, packet_info* pinfo)
2073 {
2074 	guint32 test_value;
2075 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_channel_bandwidth, 2, ENC_BIG_ENDIAN, &test_value);
2076 
2077 	if (!(test_value == 6 || test_value == 15 || test_value == 25 || test_value == 50 || test_value == 75 || test_value == 100))
2078 	{
2079 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink bandwidth value [6, 15, 25, 50, 75, 100]");
2080 	}
2081 }
dissect_ul_channel_bandwidth_value(ptvcursor_t * ptvc,packet_info * pinfo)2082 static void dissect_ul_channel_bandwidth_value(ptvcursor_t * ptvc, packet_info* pinfo)
2083 {
2084 	guint32 test_value;
2085 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_uplink_channel_bandwidth, 2, ENC_BIG_ENDIAN, &test_value);
2086 
2087 	if (!(test_value == 6 || test_value == 15 || test_value == 25 || test_value == 50 || test_value == 75 || test_value == 100))
2088 	{
2089 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid uplink bandwidth value [6, 15, 25, 50, 75, 100]");
2090 	}
2091 }
dissect_reference_signal_power_value(ptvcursor_t * ptvc,packet_info * pinfo)2092 static void dissect_reference_signal_power_value(ptvcursor_t * ptvc, packet_info* pinfo)
2093 {
2094 	guint32 test_value;
2095 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_reference_signal_power, 2, ENC_BIG_ENDIAN, &test_value);
2096 
2097 	if (test_value > 255)
2098 	{
2099 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid reference signal power [0..255]");
2100 	}
2101 
2102 }
dissect_tx_antenna_ports_value(ptvcursor_t * ptvc,packet_info * pinfo)2103 static void dissect_tx_antenna_ports_value(ptvcursor_t * ptvc, packet_info* pinfo)
2104 {
2105 	guint32 test_value;
2106 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tx_antenna_ports, 2, ENC_BIG_ENDIAN, &test_value);
2107 
2108 	if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16))
2109 	{
2110 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tx antenna ports value [1, 2, 4, 8, 16]");
2111 	}
2112 }
dissect_rx_antenna_ports_value(ptvcursor_t * ptvc,packet_info * pinfo)2113 static void dissect_rx_antenna_ports_value(ptvcursor_t * ptvc, packet_info* pinfo)
2114 {
2115 	guint32 test_value;
2116 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rx_antenna_ports, 2, ENC_BIG_ENDIAN, &test_value);
2117 
2118 	if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16))
2119 	{
2120 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rx antenna ports value [1, 2, 4, 8, 16]");
2121 	}
2122 }
dissect_phich_resource_value(ptvcursor_t * ptvc,packet_info * pinfo)2123 static void dissect_phich_resource_value(ptvcursor_t * ptvc, packet_info* pinfo)
2124 {
2125 	guint32 test_value;
2126 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_phich_resource, 2, ENC_BIG_ENDIAN, &test_value);
2127 
2128 	if (test_value > 3)
2129 	{
2130 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid phich resource value [0..3]");
2131 	}
2132 }
dissect_phich_duration_value(ptvcursor_t * ptvc,packet_info * pinfo)2133 static void dissect_phich_duration_value(ptvcursor_t * ptvc, packet_info* pinfo)
2134 {
2135 	gint32 test_value;
2136 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_phich_duration, 2, ENC_BIG_ENDIAN, &test_value);
2137 
2138 	if (test_value > 1)
2139 	{
2140 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid phich duration value [0..1]");
2141 	}
2142 }
dissect_phich_power_offset_value(ptvcursor_t * ptvc,packet_info * pinfo)2143 static void dissect_phich_power_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2144 {
2145 	guint32 test_value;
2146 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_phich_power_offset, 2, ENC_BIG_ENDIAN, &test_value);
2147 
2148 	if (test_value > 10000)
2149 	{
2150 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid phich power offset value [0..10000]");
2151 	}
2152 }
dissect_psch_synch_signal_epre_eprers_value(ptvcursor_t * ptvc,packet_info * pinfo)2153 static void dissect_psch_synch_signal_epre_eprers_value(ptvcursor_t * ptvc, packet_info* pinfo)
2154 {
2155 	guint32 test_value;
2156 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_primary_synchronization_signal_epre_eprers, 2, ENC_BIG_ENDIAN, &test_value);
2157 
2158 	if (test_value > 10000)
2159 	{
2160 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid primary synchronization signal epre/eprers value [0..10000]");
2161 	}
2162 }
dissect_physical_cell_id_value(ptvcursor_t * ptvc,packet_info * pinfo)2163 static void dissect_physical_cell_id_value(ptvcursor_t * ptvc, packet_info* pinfo)
2164 {
2165 	guint32 test_value;
2166 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_physical_cell_id, 2, ENC_BIG_ENDIAN, &test_value);
2167 
2168 	if (test_value > 503)
2169 	{
2170 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid physical cell id [0..503]");
2171 	}
2172 }
dissect_ssch_synch_signal_epre_eprers_value(ptvcursor_t * ptvc,packet_info * pinfo)2173 static void dissect_ssch_synch_signal_epre_eprers_value(ptvcursor_t * ptvc, packet_info* pinfo)
2174 {
2175 	guint32 test_value;
2176 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_secondary_synchronization_signal_epre_eprers, 2, ENC_BIG_ENDIAN, &test_value);
2177 
2178 	if (test_value > 10000)
2179 	{
2180 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid secondary synchronization signal epre/eprers value [0..10000]");
2181 	}
2182 }
dissect_prach_configuration_index_value(ptvcursor_t * ptvc,packet_info * pinfo)2183 static void dissect_prach_configuration_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
2184 {
2185 	guint32 test_value;
2186 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_configuration_index, 2, ENC_BIG_ENDIAN, &test_value);
2187 
2188 	if (test_value > 63)
2189 	{
2190 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach configuration Index [0..63]");
2191 	}
2192 }
dissect_prach_root_sequence_index_value(ptvcursor_t * ptvc,packet_info * pinfo)2193 static void dissect_prach_root_sequence_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
2194 {
2195 	guint32 test_value;
2196 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_root_sequence_index, 2, ENC_BIG_ENDIAN, &test_value);
2197 
2198 	if (test_value > 837)
2199 	{
2200 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach root sequence Index [0..837]");
2201 	}
2202 }
dissect_prach_zero_correlation_zone_configuration_value(ptvcursor_t * ptvc,packet_info * pinfo)2203 static void dissect_prach_zero_correlation_zone_configuration_value(ptvcursor_t * ptvc, packet_info* pinfo)
2204 {
2205 	guint32 test_value;
2206 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_zero_correlation_zone_configuration, 2, ENC_BIG_ENDIAN, &test_value);
2207 
2208 	// How do differentiate between fdd 0..6 and tdd 0..15 ranges?
2209 	if (test_value > 15)
2210 	{
2211 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid zero correlation zone configuration [0..15]");
2212 	}
2213 }
dissect_prach_high_speed_flag_value(ptvcursor_t * ptvc,packet_info * pinfo)2214 static void dissect_prach_high_speed_flag_value(ptvcursor_t * ptvc, packet_info* pinfo)
2215 {
2216 	gint32 test_value;
2217 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_high_speed_flag, 2, ENC_BIG_ENDIAN, &test_value);
2218 
2219 	if (test_value > 1)
2220 	{
2221 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid high speed flag value [0..1]");
2222 	}
2223 }
dissect_prach_frequency_offset_value(ptvcursor_t * ptvc,packet_info * pinfo)2224 static void dissect_prach_frequency_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2225 {
2226 	guint32 test_value;
2227 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_offset, 2, ENC_BIG_ENDIAN, &test_value);
2228 
2229 	// How to determine the ul channel bandwidth?
2230 	if (test_value > (100 -6))
2231 	{
2232 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach frequency offset value [0..94]");
2233 	}
2234 }
dissect_pusch_hopping_mode_value(ptvcursor_t * ptvc,packet_info * pinfo)2235 static void dissect_pusch_hopping_mode_value(ptvcursor_t * ptvc, packet_info* pinfo)
2236 {
2237 	gint32 test_value;
2238 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_hopping_mode, 2, ENC_BIG_ENDIAN, &test_value);
2239 
2240 	if (test_value > 1)
2241 	{
2242 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pusch hopping mode value [0..1]");
2243 	}
2244 }
dissect_pusch_hopping_offset_value(ptvcursor_t * ptvc,packet_info * pinfo)2245 static void dissect_pusch_hopping_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2246 {
2247 	guint32 test_value;
2248 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_hopping_offset, 2, ENC_BIG_ENDIAN, &test_value);
2249 
2250 	if (test_value > 98)
2251 	{
2252 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pusch hopping offset value [0..98]");
2253 	}
2254 }
dissect_pusch_number_of_subbands_value(ptvcursor_t * ptvc,packet_info * pinfo)2255 static void dissect_pusch_number_of_subbands_value(ptvcursor_t * ptvc, packet_info* pinfo)
2256 {
2257 	guint32 test_value;
2258 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_subbands, 2, ENC_BIG_ENDIAN, &test_value);
2259 
2260 	if (!(test_value >= 1 && test_value <= 4))
2261 	{
2262 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of sub-bands [1..4]");
2263 	}
2264 }
dissect_pucch_delta_pucch_shift_value(ptvcursor_t * ptvc,packet_info * pinfo)2265 static void dissect_pucch_delta_pucch_shift_value(ptvcursor_t * ptvc, packet_info* pinfo)
2266 {
2267 	guint32 test_value;
2268 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_pucch_shift, 2, ENC_BIG_ENDIAN, &test_value);
2269 
2270 	if (!(test_value >= 1 && test_value <= 3))
2271 	{
2272 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta pucch shift [1..3]");
2273 	}
2274 }
dissect_pucch_n_cqi_rb_value(ptvcursor_t * ptvc,packet_info * pinfo)2275 static void dissect_pucch_n_cqi_rb_value(ptvcursor_t * ptvc, packet_info* pinfo)
2276 {
2277 	guint32 test_value;
2278 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_cqi_rb, 2, ENC_BIG_ENDIAN, &test_value);
2279 
2280 	if (test_value > 98)
2281 	{
2282 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n cqi rb value [0..98]");
2283 	}
2284 }
dissect_pucch_n_an_cs_value(ptvcursor_t * ptvc,packet_info * pinfo)2285 static void dissect_pucch_n_an_cs_value(ptvcursor_t * ptvc, packet_info* pinfo)
2286 {
2287 	guint32 test_value;
2288 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_an_cs, 2, ENC_BIG_ENDIAN, &test_value);
2289 
2290 	if (test_value > 7)
2291 	{
2292 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n an cs value [0..7]");
2293 	}
2294 }
dissect_pucch_n1_pucch_an_value(ptvcursor_t * ptvc,packet_info * pinfo)2295 static void dissect_pucch_n1_pucch_an_value(ptvcursor_t * ptvc, packet_info* pinfo)
2296 {
2297 	guint32 test_value;
2298 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n1_pucch_an, 2, ENC_BIG_ENDIAN, &test_value);
2299 
2300 	if (test_value > 2047)
2301 	{
2302 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n1pucch an value [0..2047]");
2303 	}
2304 }
dissect_srs_bandwidth_configuration_value(ptvcursor_t * ptvc,packet_info * pinfo)2305 static void dissect_srs_bandwidth_configuration_value(ptvcursor_t * ptvc, packet_info* pinfo)
2306 {
2307 	guint32 test_value;
2308 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_bandwidth_configuration, 2, ENC_BIG_ENDIAN, &test_value);
2309 
2310 	if (test_value > 7)
2311 	{
2312 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs bandwidth configuration value [0..7]");
2313 	}
2314 }
dissect_srs_max_uppts_value(ptvcursor_t * ptvc,packet_info * pinfo)2315 static void dissect_srs_max_uppts_value(ptvcursor_t * ptvc, packet_info* pinfo)
2316 {
2317 	gint32 test_value;
2318 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_max_up_pts, 2, ENC_BIG_ENDIAN, &test_value);
2319 
2320 	if (test_value > 1)
2321 	{
2322 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid max up pts value [0..1]");
2323 	}
2324 }
dissect_srs_subframe_configuration_value(ptvcursor_t * ptvc,packet_info * pinfo)2325 static void dissect_srs_subframe_configuration_value(ptvcursor_t * ptvc, packet_info* pinfo)
2326 {
2327 	guint32 test_value;
2328 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_srs_subframe_configuration, 2, ENC_BIG_ENDIAN, &test_value);
2329 
2330 	if (test_value > 15)
2331 	{
2332 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs subframe configuration value [0..15]");
2333 	}
2334 }
dissect_srs_acknack_srs_sim_tx_value(ptvcursor_t * ptvc,packet_info * pinfo)2335 static void dissect_srs_acknack_srs_sim_tx_value(ptvcursor_t * ptvc, packet_info* pinfo)
2336 {
2337 	gint32 test_value;
2338 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_acknack_srs_simultaneous_transmission, 2, ENC_BIG_ENDIAN, &test_value);
2339 
2340 	if (test_value > 1)
2341 	{
2342 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs ack nack srs simultaneous transmission value [0..1]");
2343 	}
2344 }
dissect_uplink_rs_hopping_value(ptvcursor_t * ptvc,packet_info * pinfo)2345 static void dissect_uplink_rs_hopping_value(ptvcursor_t * ptvc, packet_info* pinfo)
2346 {
2347 	guint32 test_value;
2348 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_uplink_rs_hopping, 2, ENC_BIG_ENDIAN, &test_value);
2349 
2350 	if (test_value > 2)
2351 	{
2352 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid uplink rs hopping value [0..2]");
2353 	}
2354 }
dissect_group_assignment_value(ptvcursor_t * ptvc,packet_info * pinfo)2355 static void dissect_group_assignment_value(ptvcursor_t * ptvc, packet_info* pinfo)
2356 {
2357 	guint32 test_value;
2358 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_group_assignment, 2, ENC_BIG_ENDIAN, &test_value);
2359 
2360 	if (test_value > 29)
2361 	{
2362 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid group assignment value [0..29]");
2363 	}
2364 }
dissect_cyclic_shift_1_for_drms_value(ptvcursor_t * ptvc,packet_info * pinfo)2365 static void dissect_cyclic_shift_1_for_drms_value(ptvcursor_t * ptvc, packet_info* pinfo)
2366 {
2367 	guint32 test_value;
2368 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cyclic_shift_1_for_drms, 2, ENC_BIG_ENDIAN, &test_value);
2369 
2370 	if (test_value > 7)
2371 	{
2372 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cyclic shift 1 for drms value [0..7]");
2373 	}
2374 }
dissect_tdd_subframe_assignment_value(ptvcursor_t * ptvc,packet_info * pinfo)2375 static void dissect_tdd_subframe_assignment_value(ptvcursor_t * ptvc, packet_info* pinfo)
2376 {
2377 	guint32 test_value;
2378 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_subframe_assignment, 2, ENC_BIG_ENDIAN, &test_value);
2379 
2380 	if (test_value > 6)
2381 	{
2382 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tdd subframe assignment value [0..6]");
2383 	}
2384 }
dissect_tdd_subframe_patterns_value(ptvcursor_t * ptvc,packet_info * pinfo)2385 static void dissect_tdd_subframe_patterns_value(ptvcursor_t * ptvc, packet_info* pinfo)
2386 {
2387 	guint32 test_value;
2388 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_special_subframe_patterns, 2, ENC_BIG_ENDIAN, &test_value);
2389 
2390 	if (test_value > 9)
2391 	{
2392 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid special subframe pattern value [0..9]");
2393 	}
2394 }
dissect_laa_ed_threashold_for_lbt_for_pdsch_value(ptvcursor_t * ptvc,packet_info * pinfo)2395 static void dissect_laa_ed_threashold_for_lbt_for_pdsch_value(ptvcursor_t * ptvc, packet_info* pinfo)
2396 {
2397 	guint32 test_value;
2398 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ed_threshold_for_lbt_for_pdsch, 2, ENC_BIG_ENDIAN, &test_value);
2399 
2400 	if (test_value > 70)
2401 	{
2402 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ed threshold for ltb for pdsch value [0..70]");
2403 	}
2404 }
dissect_laa_ed_threashold_for_lbt_for_drs_value(ptvcursor_t * ptvc,packet_info * pinfo)2405 static void dissect_laa_ed_threashold_for_lbt_for_drs_value(ptvcursor_t * ptvc, packet_info* pinfo)
2406 {
2407 	guint32 test_value;
2408 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ed_threshold_for_lbt_for_drs, 2, ENC_BIG_ENDIAN, &test_value);
2409 
2410 	if (test_value > 70)
2411 	{
2412 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ed threshold for ltb for drs value [0..70]");
2413 	}
2414 }
dissect_laa_pd_threshold_value(ptvcursor_t * ptvc,packet_info * pinfo)2415 static void dissect_laa_pd_threshold_value(ptvcursor_t * ptvc, packet_info* pinfo)
2416 {
2417 	guint32 test_value;
2418 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pd_threshold, 2, ENC_BIG_ENDIAN, &test_value);
2419 
2420 	if (test_value > 70 && test_value != 65535)
2421 	{
2422 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pd threshold value [0..70, 65536]");
2423 	}
2424 }
dissect_laa_multi_carrier_type_value(ptvcursor_t * ptvc,packet_info * pinfo)2425 static void dissect_laa_multi_carrier_type_value(ptvcursor_t * ptvc, packet_info* pinfo)
2426 {
2427 	guint32 test_value;
2428 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_multi_carrier_type, 2, ENC_BIG_ENDIAN, &test_value);
2429 
2430 	if (test_value > 4)
2431 	{
2432 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid multi carrier type [0..4]");
2433 	}
2434 }
dissect_laa_multi_carrier_tx_value(ptvcursor_t * ptvc,packet_info * pinfo)2435 static void dissect_laa_multi_carrier_tx_value(ptvcursor_t * ptvc, packet_info* pinfo)
2436 {
2437 	gint32 test_value;
2438 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_multi_carrier_tx, 2, ENC_BIG_ENDIAN, &test_value);
2439 
2440 	if (test_value > 1)
2441 	{
2442 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid multi carrier tx value [0..1]");
2443 	}
2444 }
dissect_laa_multi_carrier_freeze_value(ptvcursor_t * ptvc,packet_info * pinfo)2445 static void dissect_laa_multi_carrier_freeze_value(ptvcursor_t * ptvc, packet_info* pinfo)
2446 {
2447 	gint32 test_value;
2448 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_multi_carrier_freeze, 2, ENC_BIG_ENDIAN, &test_value);
2449 
2450 	if (test_value > 1)
2451 	{
2452 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid multi carrier freeze value [0..1]");
2453 	}
2454 }
dissect_laa_tx_antenna_port_for_drs_value(ptvcursor_t * ptvc,packet_info * pinfo)2455 static void dissect_laa_tx_antenna_port_for_drs_value(ptvcursor_t * ptvc, packet_info* pinfo)
2456 {
2457 	guint32 test_value;
2458 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tx_antenna_ports_for_drs, 2, ENC_BIG_ENDIAN, &test_value);
2459 
2460 	if (!(test_value == 1 || test_value == 2 || test_value == 4))
2461 	{
2462 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tx antenna ports for drs value [1, 2, 4]");
2463 	}
2464 }
dissect_laa_transmission_power_for_drs_value(ptvcursor_t * ptvc,packet_info * pinfo)2465 static void dissect_laa_transmission_power_for_drs_value(ptvcursor_t * ptvc, packet_info* pinfo)
2466 {
2467 	guint32 test_value;
2468 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power_for_drs, 2, ENC_BIG_ENDIAN, &test_value);
2469 
2470 	if (test_value > 10000)
2471 	{
2472 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power for drs [0..10000]");
2473 	}
2474 }
dissect_emtc_pbch_repeitions_enabled_r13_value(ptvcursor_t * ptvc,packet_info * pinfo)2475 static void dissect_emtc_pbch_repeitions_enabled_r13_value(ptvcursor_t * ptvc, packet_info* pinfo)
2476 {
2477 	gint32 test_value;
2478 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_pbch_repetitions_enabled_r13, 2, ENC_BIG_ENDIAN, &test_value);
2479 
2480 	if (test_value > 1)
2481 	{
2482 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pbch repetitions enabled r13 value [0..1]");
2483 	}
2484 }
dissect_emtc_prach_cat_m_root_sequence_index_value(ptvcursor_t * ptvc,packet_info * pinfo)2485 static void dissect_emtc_prach_cat_m_root_sequence_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
2486 {
2487 	guint32 test_value;
2488 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_cat_m_root_sequence_index, 2, ENC_BIG_ENDIAN, &test_value);
2489 
2490 	if (test_value > 837)
2491 	{
2492 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach cat-m root sequence Index value [0..837]");
2493 	}
2494 }
dissect_emtc_prach_cat_m_zero_correlation_zone_configuration_value(ptvcursor_t * ptvc,packet_info * pinfo)2495 static void dissect_emtc_prach_cat_m_zero_correlation_zone_configuration_value(ptvcursor_t * ptvc, packet_info* pinfo)
2496 {
2497 	guint32 test_value;
2498 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_cat_m_zero_correlation_zone_configuration, 2, ENC_BIG_ENDIAN, &test_value);
2499 
2500 	if (test_value > 15)
2501 	{
2502 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach cat-m zero correlation zone configuration value [0..15]");
2503 	}
2504 }
dissect_emtc_prach_cat_m_high_speed_flag_value(ptvcursor_t * ptvc,packet_info * pinfo)2505 static void dissect_emtc_prach_cat_m_high_speed_flag_value(ptvcursor_t * ptvc, packet_info* pinfo)
2506 {
2507 	gint32 test_value;
2508 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_cat_m_high_speed_flag, 2, ENC_BIG_ENDIAN, &test_value);
2509 
2510 	if (test_value > 1)
2511 	{
2512 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach cat-m high speed flag value [0..1]");
2513 	}
2514 }
dissect_emtc_prach_ce_level_0_enabled_value(ptvcursor_t * ptvc,packet_info * pinfo)2515 static void dissect_emtc_prach_ce_level_0_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2516 {
2517 	gint32 test_value;
2518 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_0_enable, 2, ENC_BIG_ENDIAN, &test_value);
2519 
2520 	if (test_value > 1)
2521 	{
2522 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #0 enable value [0..1]");
2523 	}
2524 }
dissect_emtc_prach_ce_level_0_configuration_offset_value(ptvcursor_t * ptvc,packet_info * pinfo)2525 static void dissect_emtc_prach_ce_level_0_configuration_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2526 {
2527 	guint32 test_value;
2528 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_0_configuration_index, 2, ENC_BIG_ENDIAN, &test_value);
2529 
2530 	if (test_value > 63)
2531 	{
2532 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #0 configuration Index value [0..63]");
2533 	}
2534 }
dissect_emtc_prach_ce_level_0_frequency_offset_value(ptvcursor_t * ptvc,packet_info * pinfo)2535 static void dissect_emtc_prach_ce_level_0_frequency_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2536 {
2537 	guint32 test_value;
2538 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_0_frequency_offset, 2, ENC_BIG_ENDIAN, &test_value);
2539 
2540 	if (test_value > (100 - 6))
2541 	{
2542 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #0 frequency offset value [0..94]");
2543 	}
2544 }
dissect_emtc_preach_ce_level_0_num_of_repeitions_per_attempt_value(ptvcursor_t * ptvc,packet_info * pinfo)2545 static void dissect_emtc_preach_ce_level_0_num_of_repeitions_per_attempt_value(ptvcursor_t * ptvc, packet_info* pinfo)
2546 {
2547 	guint32 test_value;
2548 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_0_number_of_repetitions_per_attempt, 2, ENC_BIG_ENDIAN, &test_value);
2549 
2550 	if (!( test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2551 		   test_value == 64 || test_value == 128))
2552 	{
2553 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #0 number of repetitions per attempt value [1, 2, 4, 8, 16, 32, 64, 128]");
2554 	}
2555 }
dissect_emtc_ce_level_0_starting_subframe_periodicity_value(ptvcursor_t * ptvc,packet_info * pinfo)2556 static void dissect_emtc_ce_level_0_starting_subframe_periodicity_value(ptvcursor_t * ptvc, packet_info* pinfo)
2557 {
2558 	guint32 test_value;
2559 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_0_starting_subframe_periodicity, 2, ENC_BIG_ENDIAN, &test_value);
2560 
2561 	if (!(test_value == 0xFFF || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2562 		  test_value == 64 || test_value == 128 || test_value == 256))
2563 	{
2564 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #0 starting subframe periodicity value [2, 4, 8, 16, 32, 64, 128, 256, 0xFFFF]");
2565 	}
2566 }
dissect_emtc_preach_ce_level_0_hopping_enabled_value(ptvcursor_t * ptvc,packet_info * pinfo)2567 static void dissect_emtc_preach_ce_level_0_hopping_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2568 {
2569 	gint32 test_value;
2570 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_0_hopping_enabled, 2, ENC_BIG_ENDIAN, &test_value);
2571 
2572 	if (test_value > 1)
2573 	{
2574 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #0 hopping enabled value [0..1]");
2575 	}
2576 }
dissect_emtc_preach_ce_level_0_hopping_offset_value(ptvcursor_t * ptvc,packet_info * pinfo)2577 static void dissect_emtc_preach_ce_level_0_hopping_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2578 {
2579 	guint32 test_value;
2580 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_0_hopping_offset, 2, ENC_BIG_ENDIAN, &test_value);
2581 
2582 	if (test_value > 94)
2583 	{
2584 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #0 hopping offset value [0..94]");
2585 	}
2586 }
dissect_emtc_prach_ce_level_1_enabled_value(ptvcursor_t * ptvc,packet_info * pinfo)2587 static void dissect_emtc_prach_ce_level_1_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2588 {
2589 	gint32 test_value;
2590 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_1_enable, 2, ENC_BIG_ENDIAN, &test_value);
2591 
2592 	if (test_value > 1)
2593 	{
2594 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #1 enable value [0..1]");
2595 	}
2596 }
dissect_emtc_prach_ce_level_1_configuration_offset_value(ptvcursor_t * ptvc,packet_info * pinfo)2597 static void dissect_emtc_prach_ce_level_1_configuration_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2598 {
2599 	guint32 test_value;
2600 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_1_configuration_index, 2, ENC_BIG_ENDIAN, &test_value);
2601 
2602 	if (test_value > 63)
2603 	{
2604 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #1 configuration Index value [0..63]");
2605 	}
2606 }
dissect_emtc_prach_ce_level_1_frequency_offset_value(ptvcursor_t * ptvc,packet_info * pinfo)2607 static void dissect_emtc_prach_ce_level_1_frequency_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2608 {
2609 	guint32 test_value;
2610 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_1_frequency_offset, 2, ENC_BIG_ENDIAN, &test_value);
2611 
2612 	if (test_value > (100 - 6))
2613 	{
2614 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #1 frequency offset value [0..94]");
2615 	}
2616 }
dissect_emtc_preach_ce_level_1_num_of_repeitions_per_attempt_value(ptvcursor_t * ptvc,packet_info * pinfo)2617 static void dissect_emtc_preach_ce_level_1_num_of_repeitions_per_attempt_value(ptvcursor_t * ptvc, packet_info* pinfo)
2618 {
2619 	guint32 test_value;
2620 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_1_number_of_repetitions_per_attempt, 2, ENC_BIG_ENDIAN, &test_value);
2621 
2622 	if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2623 		test_value == 64 || test_value == 128))
2624 	{
2625 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #1 number of repetitions per attempt value [1, 2, 4, 8, 16, 32, 64, 128]");
2626 	}
2627 }
dissect_emtc_ce_level_1_starting_subframe_periodicity_value(ptvcursor_t * ptvc,packet_info * pinfo)2628 static void dissect_emtc_ce_level_1_starting_subframe_periodicity_value(ptvcursor_t * ptvc, packet_info* pinfo)
2629 {
2630 	guint32 test_value;
2631 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_1_starting_subframe_periodicity, 2, ENC_BIG_ENDIAN, &test_value);
2632 
2633 	if (!(test_value == 0xFFF || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2634 		test_value == 64 || test_value == 128 || test_value == 256))
2635 	{
2636 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #1 starting subframe periodicity value [2, 4, 8, 16, 32, 64, 128, 256, 0xFFFF]");
2637 	}
2638 }
dissect_emtc_preach_ce_level_1_hopping_enabled_value(ptvcursor_t * ptvc,packet_info * pinfo)2639 static void dissect_emtc_preach_ce_level_1_hopping_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2640 {
2641 	gint32 test_value;
2642 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_1_hopping_enabled, 2, ENC_BIG_ENDIAN, &test_value);
2643 
2644 	if (test_value > 1)
2645 	{
2646 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #1 hopping enabled value [0..1]");
2647 	}
2648 }
dissect_emtc_preach_ce_level_1_hopping_offset_value(ptvcursor_t * ptvc,packet_info * pinfo)2649 static void dissect_emtc_preach_ce_level_1_hopping_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2650 {
2651 	guint32 test_value;
2652 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_1_hopping_offset, 2, ENC_BIG_ENDIAN, &test_value);
2653 
2654 	if (test_value > 94)
2655 	{
2656 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #1 hopping offset value [0..94]");
2657 	}
2658 }
dissect_emtc_prach_ce_level_2_enabled_value(ptvcursor_t * ptvc,packet_info * pinfo)2659 static void dissect_emtc_prach_ce_level_2_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2660 {
2661 	gint32 test_value;
2662 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_2_enable, 2, ENC_BIG_ENDIAN, &test_value);
2663 
2664 	if (test_value > 1)
2665 	{
2666 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 enable value [0..1]");
2667 	}
2668 }
dissect_emtc_prach_ce_level_2_configuration_offset_value(ptvcursor_t * ptvc,packet_info * pinfo)2669 static void dissect_emtc_prach_ce_level_2_configuration_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2670 {
2671 	guint32 test_value;
2672 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_2_configuration_index, 2, ENC_BIG_ENDIAN, &test_value);
2673 
2674 	if (test_value > 63)
2675 	{
2676 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 configuration Index value [0..63]");
2677 	}
2678 }
dissect_emtc_prach_ce_level_2_frequency_offset_value(ptvcursor_t * ptvc,packet_info * pinfo)2679 static void dissect_emtc_prach_ce_level_2_frequency_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2680 {
2681 	guint32 test_value;
2682 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_2_frequency_offset, 2, ENC_BIG_ENDIAN, &test_value);
2683 
2684 	if (test_value > (100 - 6))
2685 	{
2686 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 frequency offset value [0..94]");
2687 	}
2688 }
dissect_emtc_preach_ce_level_2_num_of_repeitions_per_attempt_value(ptvcursor_t * ptvc,packet_info * pinfo)2689 static void dissect_emtc_preach_ce_level_2_num_of_repeitions_per_attempt_value(ptvcursor_t * ptvc, packet_info* pinfo)
2690 {
2691 	guint32 test_value;
2692 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_2_number_of_repetitions_per_attempt, 2, ENC_BIG_ENDIAN, &test_value);
2693 
2694 	if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2695 		test_value == 64 || test_value == 128))
2696 	{
2697 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 number of repetitions per attempt value [1, 2, 4, 8, 16, 32, 64, 128]");
2698 	}
2699 }
dissect_emtc_ce_level_2_starting_subframe_periodicity_value(ptvcursor_t * ptvc,packet_info * pinfo)2700 static void dissect_emtc_ce_level_2_starting_subframe_periodicity_value(ptvcursor_t * ptvc, packet_info* pinfo)
2701 {
2702 	guint32 test_value;
2703 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_2_starting_subframe_periodicity, 2, ENC_BIG_ENDIAN, &test_value);
2704 
2705 	if (!(test_value == 0xFFF || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2706 		test_value == 64 || test_value == 128 || test_value == 256))
2707 	{
2708 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 starting subframe periodicity value [2, 4, 8, 16, 32, 64, 128, 256, 0xFFFF]");
2709 	}
2710 }
dissect_emtc_preach_ce_level_2_hopping_enabled_value(ptvcursor_t * ptvc,packet_info * pinfo)2711 static void dissect_emtc_preach_ce_level_2_hopping_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2712 {
2713 	gint32 test_value;
2714 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_2_hopping_enabled, 2, ENC_BIG_ENDIAN, &test_value);
2715 
2716 	if (test_value > 1)
2717 	{
2718 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 hopping enabled value [0..1]");
2719 	}
2720 }
dissect_emtc_preach_ce_level_2_hopping_offset_value(ptvcursor_t * ptvc,packet_info * pinfo)2721 static void dissect_emtc_preach_ce_level_2_hopping_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2722 {
2723 	guint32 test_value;
2724 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_2_hopping_offset, 2, ENC_BIG_ENDIAN, &test_value);
2725 
2726 	if (test_value > 94)
2727 	{
2728 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 hopping offset value [0..94]");
2729 	}
2730 }
dissect_emtc_prach_ce_level_3_enabled_value(ptvcursor_t * ptvc,packet_info * pinfo)2731 static void dissect_emtc_prach_ce_level_3_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2732 {
2733 	gint32 test_value;
2734 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_3_enable, 2, ENC_BIG_ENDIAN, &test_value);
2735 
2736 	if (test_value > 1)
2737 	{
2738 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #3 enable value [0..1]");
2739 	}
2740 }
dissect_emtc_prach_ce_level_3_configuration_offset_value(ptvcursor_t * ptvc,packet_info * pinfo)2741 static void dissect_emtc_prach_ce_level_3_configuration_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2742 {
2743 	guint32 test_value;
2744 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_3_configuration_index, 2, ENC_BIG_ENDIAN, &test_value);
2745 
2746 	if (test_value > 63)
2747 	{
2748 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 configuration Index value [0..63]");
2749 	}
2750 }
dissect_emtc_prach_ce_level_3_frequency_offset_value(ptvcursor_t * ptvc,packet_info * pinfo)2751 static void dissect_emtc_prach_ce_level_3_frequency_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2752 {
2753 	guint32 test_value;
2754 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_3_frequency_offset, 2, ENC_BIG_ENDIAN, &test_value);
2755 
2756 	if (test_value > (100 - 6))
2757 	{
2758 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #3 frequency offset value [0..94]");
2759 	}
2760 }
dissect_emtc_preach_ce_level_3_num_of_repeitions_per_attempt_value(ptvcursor_t * ptvc,packet_info * pinfo)2761 static void dissect_emtc_preach_ce_level_3_num_of_repeitions_per_attempt_value(ptvcursor_t * ptvc, packet_info* pinfo)
2762 {
2763 	guint32 test_value;
2764 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_3_number_of_repetitions_per_attempt, 2, ENC_BIG_ENDIAN, &test_value);
2765 
2766 	if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2767 		test_value == 64 || test_value == 128))
2768 	{
2769 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #3 number of repetitions per attempt value [1, 2, 4, 8, 16, 32, 64, 128]");
2770 	}
2771 }
dissect_emtc_ce_level_3_starting_subframe_periodicity_value(ptvcursor_t * ptvc,packet_info * pinfo)2772 static void dissect_emtc_ce_level_3_starting_subframe_periodicity_value(ptvcursor_t * ptvc, packet_info* pinfo)
2773 {
2774 	guint32 test_value;
2775 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_3_starting_subframe_periodicity, 2, ENC_BIG_ENDIAN, &test_value);
2776 
2777 	if (!(test_value == 0xFFF || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2778 		test_value == 64 || test_value == 128 || test_value == 256))
2779 	{
2780 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #3 starting subframe periodicity value [2, 4, 8, 16, 32, 64, 128, 256, 0xFFFF]");
2781 	}
2782 }
dissect_emtc_preach_ce_level_3_hopping_enabled_value(ptvcursor_t * ptvc,packet_info * pinfo)2783 static void dissect_emtc_preach_ce_level_3_hopping_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2784 {
2785 	gint32 test_value;
2786 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_3_hopping_enabled, 2, ENC_BIG_ENDIAN, &test_value);
2787 
2788 	if (test_value > 1)
2789 	{
2790 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #3 hopping enabled value [0..1]");
2791 	}
2792 }
dissect_emtc_preach_ce_level_3_hopping_offset_value(ptvcursor_t * ptvc,packet_info * pinfo)2793 static void dissect_emtc_preach_ce_level_3_hopping_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2794 {
2795 	guint32 test_value;
2796 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_3_hopping_offset, 2, ENC_BIG_ENDIAN, &test_value);
2797 
2798 	if (test_value > 94)
2799 	{
2800 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #3 hopping offset value [0..94]");
2801 	}
2802 }
dissect_emtc_pucch_interval_ul_hopping_config_common_mode_a_value(ptvcursor_t * ptvc,packet_info * pinfo)2803 static void dissect_emtc_pucch_interval_ul_hopping_config_common_mode_a_value(ptvcursor_t * ptvc, packet_info* pinfo)
2804 {
2805 	guint32 test_value;
2806 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_internal_ul_hopping_config_common_mode_a, 2, ENC_BIG_ENDIAN, &test_value);
2807 
2808 	if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 5 || test_value == 10 || test_value == 20))
2809 	{
2810 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch internal ul hopping config common mode a value [1, 2, 4, 8] or [1, 5, 10, 20]");
2811 	}
2812 }
dissect_emtc_pucch_interval_ul_hopping_config_common_mode_b_value(ptvcursor_t * ptvc,packet_info * pinfo)2813 static void dissect_emtc_pucch_interval_ul_hopping_config_common_mode_b_value(ptvcursor_t * ptvc, packet_info* pinfo)
2814 {
2815 	guint32 test_value;
2816 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_internal_ul_hopping_config_common_mode_b, 2, ENC_BIG_ENDIAN, &test_value);
2817 
2818 	if (!(test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 5 || test_value == 10 || test_value == 20 || test_value == 40))
2819 	{
2820 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch internal ul hopping config common mode a value [2, 4, 8, 16] or [5, 10, 20, 40]");
2821 	}
2822 }
dissect_dl_bandwidth_support_value(ptvcursor_t * ptvc,packet_info * pinfo)2823 static void dissect_dl_bandwidth_support_value(ptvcursor_t * ptvc, packet_info* pinfo)
2824 {
2825 	guint64 test_value64;
2826 	proto_item* item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
2827 					hf_nfapi_dl_bandwidth_support, ett_nfapi_downlink_bandwidth_support, dl_bandwidth_support_fields, ENC_BIG_ENDIAN, &test_value64);
2828 	if (test_value64 > 0x3F)
2829 	{
2830 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink bandwidth supported bits [0..0x3F]");
2831 	}
2832 
2833 	ptvcursor_advance(ptvc, 2);
2834 }
dissect_ul_bandwidth_support_value(ptvcursor_t * ptvc,packet_info * pinfo)2835 static void dissect_ul_bandwidth_support_value(ptvcursor_t * ptvc, packet_info* pinfo)
2836 {
2837 	guint64 test_value64;
2838 	proto_item* item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
2839 					hf_nfapi_ul_bandwidth_support, ett_nfapi_uplink_bandwidth_support, ul_bandwidth_support_fields, ENC_BIG_ENDIAN, &test_value64);
2840 	if (test_value64 > 0x3F)
2841 	{
2842 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid uplink bandwidth supported bits [0..0x3F]");
2843 	}
2844 
2845 	ptvcursor_advance(ptvc, 2);
2846 
2847 }
dissect_dl_modulation_value(ptvcursor_t * ptvc,packet_info * pinfo)2848 static void dissect_dl_modulation_value(ptvcursor_t * ptvc, packet_info* pinfo)
2849 {
2850 	static int * const dl_modulation_support_fields[] = {
2851 		&hf_nfapi_dl_modulation_support_qpsk,
2852 		&hf_nfapi_dl_modulation_support_16qam,
2853 		&hf_nfapi_dl_modulation_support_64qam,
2854 		&hf_nfapi_dl_modulation_support_256qam,
2855 		NULL
2856 	};
2857 
2858 	guint64 test_value64;
2859 	proto_item* item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
2860 					hf_nfapi_dl_modulation_support, ett_nfapi_downlink_modulation_support, dl_modulation_support_fields, ENC_BIG_ENDIAN, &test_value64);
2861 
2862 	if (test_value64 > 0xF)
2863 	{
2864 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink modulation support bit [0..0xF]");
2865 	}
2866 
2867 	ptvcursor_advance(ptvc, 2);
2868 }
dissect_ul_modulation_value(ptvcursor_t * ptvc,packet_info * pinfo)2869 static void dissect_ul_modulation_value(ptvcursor_t * ptvc, packet_info* pinfo)
2870 {
2871 	static int * const ul_modulation_support_fields[] = {
2872 		&hf_nfapi_ul_modulation_support_qpsk,
2873 		&hf_nfapi_ul_modulation_support_16qam,
2874 		&hf_nfapi_ul_modulation_support_64qam,
2875 		NULL
2876 	};
2877 
2878 	guint64 test_value64;
2879 	proto_item* item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
2880 					hf_nfapi_ul_modulation_support, ett_nfapi_uplink_modulation_support, ul_modulation_support_fields, ENC_BIG_ENDIAN, &test_value64);
2881 
2882 	if (test_value64 > 0x7)
2883 	{
2884 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid uplink modulation support bit [0..0x7]");
2885 	}
2886 
2887 	ptvcursor_advance(ptvc, 2);
2888 }
dissect_phy_antenna_capability_value(ptvcursor_t * ptvc,packet_info * pinfo)2889 static void dissect_phy_antenna_capability_value(ptvcursor_t * ptvc, packet_info* pinfo)
2890 {
2891 	guint32 test_value;
2892 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_phy_antenna_capability, 2, ENC_BIG_ENDIAN, &test_value);
2893 
2894 	if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16))
2895 	{
2896 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid phy antenna capability [1, 2, 4, 8, 16]");
2897 	}
2898 }
dissect_release_capability_value(ptvcursor_t * ptvc,packet_info * pinfo)2899 static void dissect_release_capability_value(ptvcursor_t * ptvc, packet_info* pinfo)
2900 {
2901 	guint64 test_value64;
2902 	proto_item* item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
2903 											hf_nfapi_release_capability, ett_nfapi_release_support, maximum_3gpp_release_supported_fields, ENC_BIG_ENDIAN, &test_value64);
2904 	if (test_value64 > 0x3F)
2905 	{
2906 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid release capability value [0..0x3F]");
2907 	}
2908 
2909 	ptvcursor_advance(ptvc, 2);
2910 }
dissect_mbsfn_value(ptvcursor_t * ptvc,packet_info * pinfo)2911 static void dissect_mbsfn_value(ptvcursor_t * ptvc, packet_info* pinfo)
2912 {
2913 	gint32 test_value;
2914 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_mbsfn_capability, 2, ENC_BIG_ENDIAN, &test_value);
2915 
2916 	if (test_value > 1)
2917 	{
2918 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mbsfn capability bit [0..0x1]");
2919 	}
2920 }
dissect_laa_support_value(ptvcursor_t * ptvc,packet_info * pinfo)2921 static void dissect_laa_support_value(ptvcursor_t * ptvc, packet_info* pinfo)
2922 {
2923 	gint32 test_value;
2924 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_laa_capability, 2, ENC_BIG_ENDIAN, &test_value);
2925 
2926 	if (test_value > 1)
2927 	{
2928 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid laa support bit [0..0x1]");
2929 	}
2930 }
dissect_laa_pd_sensing_lbt_support_value(ptvcursor_t * ptvc,packet_info * pinfo)2931 static void dissect_laa_pd_sensing_lbt_support_value(ptvcursor_t * ptvc, packet_info* pinfo)
2932 {
2933 	gint32 test_value;
2934 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_pd_sensing_lbt_support, 2, ENC_BIG_ENDIAN, &test_value);
2935 
2936 	if (test_value > 1)
2937 	{
2938 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pd sensing lbt support bit [0..0x1]");
2939 	}
2940 }
dissect_laa_multi_carrier_lbt_support_value(ptvcursor_t * ptvc,packet_info * pinfo)2941 static void dissect_laa_multi_carrier_lbt_support_value(ptvcursor_t * ptvc, packet_info* pinfo)
2942 {
2943 	guint32 test_value;
2944 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_multi_carrier_lbt_support, 2, ENC_BIG_ENDIAN, &test_value);
2945 
2946 	if (test_value > 0xF)
2947 	{
2948 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid multi carrier LBT support bit [0..0xF]");
2949 	}
2950 }
dissect_laa_partial_sf_support_value(ptvcursor_t * ptvc,packet_info * pinfo)2951 static void dissect_laa_partial_sf_support_value(ptvcursor_t * ptvc, packet_info* pinfo)
2952 {
2953 	gint32 test_value;
2954 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_partial_sf_support, 2, ENC_BIG_ENDIAN, &test_value);
2955 
2956 	if (test_value > 0x1)
2957 	{
2958 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid partial SF support bit [0..0x1]");
2959 	}
2960 }
dissect_data_report_mode_value(ptvcursor_t * ptvc,packet_info * pinfo)2961 static void dissect_data_report_mode_value(ptvcursor_t * ptvc, packet_info* pinfo)
2962 {
2963 	gboolean test_value;
2964 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_data_report_mode, 2, ENC_BIG_ENDIAN, &test_value);
2965 
2966 	if (test_value > 1)
2967 	{
2968 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid data report mode value [0..1]");
2969 	}
2970 }
dissect_sfn_sf_value(ptvcursor_t * ptvc,packet_info * pinfo)2971 static void dissect_sfn_sf_value(ptvcursor_t * ptvc, packet_info* pinfo)
2972 {
2973 	guint32 test_value;
2974 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_sfnsf, 2, ENC_BIG_ENDIAN, &test_value);
2975 
2976 	guint32 sfn = test_value >> 0x4;
2977 	guint32 sf = test_value & 0x000F;
2978 	if (sfn > 1023 || sf > 9)
2979 	{
2980 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid sfn/sf value sfn:%u [0..1023] sf:%u [0..9]", sfn, sf);
2981 	}
2982 }
dissect_phy_state_value(ptvcursor_t * ptvc,packet_info * pinfo)2983 static void dissect_phy_state_value(ptvcursor_t * ptvc, packet_info* pinfo)
2984 {
2985 	guint32 test_value;
2986 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_phy_state, 2, ENC_BIG_ENDIAN, &test_value);
2987 
2988 	if (test_value > 2)
2989 	{
2990 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid phy state [0..2]");
2991 	}
2992 }
dissect_p7_vnf_address_ipv4_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)2993 static void dissect_p7_vnf_address_ipv4_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
2994 {
2995 	ptvcursor_add(ptvc, hf_nfapi_vnf_address_ipv4, 4, ENC_NA);
2996 }
dissect_p7_vnf_address_ipv6_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)2997 static void dissect_p7_vnf_address_ipv6_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
2998 {
2999 	ptvcursor_add(ptvc, hf_nfapi_vnf_address_ipv6, 16, ENC_NA);
3000 }
dissect_p7_vnf_port_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)3001 static void dissect_p7_vnf_port_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3002 {
3003 	ptvcursor_add(ptvc, hf_nfapi_vnf_port, 2, ENC_BIG_ENDIAN);
3004 }
dissect_p7_pnf_address_ipv4_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)3005 static void dissect_p7_pnf_address_ipv4_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3006 {
3007 	ptvcursor_add(ptvc, hf_nfapi_pnf_address_ipv4, 4, ENC_NA);
3008 }
dissect_p7_pnf_address_ipv6_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)3009 static void dissect_p7_pnf_address_ipv6_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3010 {
3011 	ptvcursor_add(ptvc, hf_nfapi_pnf_address_ipv6, 16, ENC_NA);
3012 }
dissect_p7_pnf_port_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)3013 static void dissect_p7_pnf_port_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3014 {
3015 	ptvcursor_add(ptvc, hf_nfapi_pnf_port, 2, ENC_BIG_ENDIAN);
3016 }
dissect_downlink_ues_per_subframe_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)3017 static void dissect_downlink_ues_per_subframe_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3018 {
3019 	ptvcursor_add(ptvc, hf_nfapi_dl_ue_per_sf, 1, ENC_BIG_ENDIAN);
3020 }
dissect_uplink_ues_per_subframe_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)3021 static void dissect_uplink_ues_per_subframe_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3022 {
3023 	ptvcursor_add(ptvc, hf_nfapi_ul_ue_per_sf, 1, ENC_BIG_ENDIAN);
3024 }
dissect_rf_band_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)3025 static void dissect_rf_band_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3026 {
3027 	ptvcursor_add(ptvc, hf_nfapi_band, 2, ENC_BIG_ENDIAN);
3028 }
dissect_rf_bands_value(ptvcursor_t * ptvc,packet_info * pinfo)3029 static void dissect_rf_bands_value(ptvcursor_t * ptvc, packet_info* pinfo)
3030 {
3031 	guint32 count;
3032 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rf_bands, 2, ENC_BIG_ENDIAN, &count);
3033 	dissect_array_value(ptvc, pinfo, "RF Band List", ett_nfapi_rf_bands, count, dissect_rf_band_value);
3034 }
dissect_timing_window_value(ptvcursor_t * ptvc,packet_info * pinfo)3035 static void dissect_timing_window_value(ptvcursor_t * ptvc, packet_info* pinfo)
3036 {
3037 	guint32 test_value;
3038 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_window, 1, ENC_BIG_ENDIAN, &test_value);
3039 
3040 	if (test_value > 30)
3041 	{
3042 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing window value [0..30]");
3043 	}
3044 }
dissect_timing_info_mode_value(ptvcursor_t * ptvc,packet_info * pinfo)3045 static void dissect_timing_info_mode_value(ptvcursor_t * ptvc, packet_info* pinfo)
3046 {
3047 	guint32 test_value;
3048 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_info_mode, 1, ENC_BIG_ENDIAN, &test_value);
3049 
3050 	if (test_value > 0x3)
3051 	{
3052 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing info mode [0..0x3]");
3053 	}
3054 }
dissect_timing_info_period_value(ptvcursor_t * ptvc,packet_info * pinfo)3055 static void dissect_timing_info_period_value(ptvcursor_t * ptvc, packet_info* pinfo)
3056 {
3057 	guint32 test_value;
3058 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_info_period, 1, ENC_BIG_ENDIAN, &test_value);
3059 
3060 	if (!(test_value >= 1 && test_value <= 255))
3061 	{
3062 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing info period [1..255]");
3063 	}
3064 }
dissect_maximum_transmit_power_value(ptvcursor_t * ptvc,packet_info * pinfo)3065 static void dissect_maximum_transmit_power_value(ptvcursor_t * ptvc, packet_info* pinfo)
3066 {
3067 	guint32 test_value;
3068 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_maximum_transmit_power_2, 2, ENC_BIG_ENDIAN, &test_value);
3069 
3070 	if (test_value > 700)
3071 	{
3072 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid maximum transmit power [0..700]");
3073 	}
3074 }
dissect_earfcn_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)3075 static void dissect_earfcn_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3076 {
3077 	ptvcursor_add(ptvc, hf_nfapi_earfcn, 2, ENC_BIG_ENDIAN);
3078 }
dissect_nmm_gsm_frequency_bands_value(ptvcursor_t * ptvc,packet_info * pinfo)3079 static void dissect_nmm_gsm_frequency_bands_value(ptvcursor_t * ptvc, packet_info* pinfo)
3080 {
3081 	guint32 count;
3082 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rf_bands, 2, ENC_BIG_ENDIAN, &count);
3083 	dissect_array_value(ptvc, pinfo, "RF Band List", ett_nfapi_rf_bands, count, dissect_rf_band_value);
3084 }
dissect_nmm_umts_frequency_bands_value(ptvcursor_t * ptvc,packet_info * pinfo)3085 static void dissect_nmm_umts_frequency_bands_value(ptvcursor_t * ptvc, packet_info* pinfo)
3086 {
3087 	guint32 count;
3088 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rf_bands, 2, ENC_BIG_ENDIAN, &count);
3089 	dissect_array_value(ptvc, pinfo, "RF Band List", ett_nfapi_rf_bands, count, dissect_rf_band_value);
3090 }
dissect_nmm_lte_frequency_bands_value(ptvcursor_t * ptvc,packet_info * pinfo)3091 static void dissect_nmm_lte_frequency_bands_value(ptvcursor_t * ptvc, packet_info* pinfo)
3092 {
3093 	guint32 count;
3094 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rf_bands, 2, ENC_BIG_ENDIAN, &count);
3095 	dissect_array_value(ptvc, pinfo, "RF Band List", ett_nfapi_rf_bands, count, dissect_rf_band_value);
3096 }
dissect_nmm_uplink_rssi_supported_value(ptvcursor_t * ptvc,packet_info * pinfo)3097 static void dissect_nmm_uplink_rssi_supported_value(ptvcursor_t * ptvc, packet_info* pinfo)
3098 {
3099 	guint32 test_value;
3100 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nmm_uplink_rssi_supported, 1, ENC_BIG_ENDIAN, &test_value);
3101 
3102 	if (test_value > 1)
3103 	{
3104 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nmm uplink rssi supported value [0..1]");
3105 	}
3106 }
dissect_dl_config_pdu(ptvcursor_t * ptvc,packet_info * pinfo)3107 static void dissect_dl_config_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
3108 {
3109 	guint32 size;
3110 	ptvcursor_add(ptvc, hf_nfapi_dl_config_pdu_type, 1, ENC_BIG_ENDIAN);
3111 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_size, 1, ENC_BIG_ENDIAN, &size);
3112 
3113 	guint pdu_end = (ptvcursor_current_offset(ptvc) + size - 2);
3114 	dissect_tlv_list(ptvc, pinfo, pdu_end);
3115 }
dissect_dl_config_request_body_value(ptvcursor_t * ptvc,packet_info * pinfo)3116 static void dissect_dl_config_request_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
3117 {
3118 	proto_item* item;
3119 	guint32 test_value, number_of_dcis_value, number_of_pdus_value;
3120 
3121 	// Number of PDCCH OFDM symbols
3122 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdcch_ofdm_symbols, 1, ENC_BIG_ENDIAN, &test_value);
3123 	if (test_value > 4)
3124 	{
3125 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pdcch ofdm symbols value [0..4]");
3126 	}
3127 
3128 	// Number of DCIs
3129 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_dci, 1, ENC_BIG_ENDIAN, &number_of_dcis_value);
3130 
3131 	// Number of PDUs
3132 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 2, ENC_BIG_ENDIAN, &number_of_pdus_value);
3133 	if (number_of_pdus_value > 514)
3134 	{
3135 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pdus value [0..514]");
3136 	}
3137 
3138 	// Number of PDSCH RNTIs
3139 	ptvcursor_add(ptvc, hf_nfapi_number_pdsch_rnti, 1, ENC_BIG_ENDIAN);
3140 
3141 	// Transmission power for PCFICH
3142 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power_pcfich, 2, ENC_BIG_ENDIAN, &test_value);
3143 	if (test_value > 10000)
3144 	{
3145 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power for pcfich value [0..10000]");
3146 	}
3147 
3148 	dissect_array_value(ptvc, pinfo, "DL Config PDU List", ett_nfapi_dl_config_request_pdu_list, number_of_dcis_value + number_of_pdus_value, dissect_dl_config_pdu);
3149 }
dissect_dl_config_request_bch_pdu_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)3150 static void dissect_dl_config_request_bch_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
3151 {
3152 	proto_item* item;
3153 	guint32 test_value;
3154 
3155 	// Length
3156 	ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
3157 
3158 	// PDU index
3159 	ptvcursor_add(ptvc, hf_nfapi_pdu_index, 2, ENC_BIG_ENDIAN);
3160 
3161 	// Transmission power
3162 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
3163 	if (test_value > 10000)
3164 	{
3165 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
3166 	}
3167 
3168 }
dissect_dl_config_request_dl_dci_pdu_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)3169 static void dissect_dl_config_request_dl_dci_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
3170 {
3171 	proto_item* item;
3172 	guint32 test_value;
3173 
3174 	// DCI format
3175 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_dci_format, 1, ENC_BIG_ENDIAN, &test_value);
3176 	if (test_value > 9)
3177 	{
3178 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci format value [0..9]");
3179 	}
3180 
3181 	// CCE index
3182 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cce_idx, 1, ENC_BIG_ENDIAN, &test_value);
3183 	if (test_value > 88)
3184 	{
3185 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cce Index value [0..88]");
3186 	}
3187 
3188 	// Aggregation level
3189 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_aggregation_level, 1, ENC_BIG_ENDIAN, &test_value);
3190 	if (!(test_value == 1 || test_value == 2 || test_value == 4 ||
3191 		  test_value == 8 || test_value == 16 || test_value == 32))
3192 	{
3193 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid aggregation level value [1, 2, 4, 8, 16, 32]");
3194 	}
3195 
3196 	// RNTI
3197 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
3198 	if (test_value < 1)
3199 	{
3200 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
3201 	}
3202 
3203 	// Resource allocation type
3204 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN, &test_value);
3205 	if (test_value > 1)
3206 	{
3207 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocation type value [0..1]");
3208 	}
3209 
3210 	// Virtual resource block assignment flag
3211 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_virtual_resource_block_assignment_flag, 1, ENC_BIG_ENDIAN, &test_value);
3212 	if (test_value > 1)
3213 	{
3214 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid virtual resource block assignment flag value [0..1]");
3215 	}
3216 
3217 	// Resource block coding
3218 	ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
3219 
3220 	// MCS_1
3221 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs_1, 1, ENC_BIG_ENDIAN, &test_value);
3222 	if (test_value > 31)
3223 	{
3224 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs 1 value [0..31]");
3225 	}
3226 
3227 	// Redundancy version_1
3228 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version_1, 1, ENC_BIG_ENDIAN, &test_value);
3229 	if (test_value > 3)
3230 	{
3231 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy version 1 value [0..3]");
3232 	}
3233 
3234 	// New data indicator_1
3235 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indicator_1, 1, ENC_BIG_ENDIAN, &test_value);
3236 	if (test_value > 3)
3237 	{
3238 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indicator 1 value [0..1]");
3239 	}
3240 
3241 	// Transport block to codeword swap flag
3242 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transport_block_to_codeword_swap_flag, 1, ENC_BIG_ENDIAN, &test_value);
3243 	if (test_value > 3)
3244 	{
3245 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport block to codeword swap flag value [0..1]");
3246 	}
3247 
3248 	// MCS_2
3249 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs_2, 1, ENC_BIG_ENDIAN, &test_value);
3250 	if (test_value > 31)
3251 	{
3252 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs 2 value [0..31]");
3253 	}
3254 
3255 	// Redundancy version_2
3256 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version_2, 1, ENC_BIG_ENDIAN, &test_value);
3257 	if (test_value > 3)
3258 	{
3259 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy version 2 value [0..3]");
3260 	}
3261 
3262 	// New Data indicator_2
3263 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indicator_2, 1, ENC_BIG_ENDIAN, &test_value);
3264 	if (test_value > 3)
3265 	{
3266 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indicator 2 value [0..1]");
3267 	}
3268 
3269 	// HARQ process
3270 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_process, 1, ENC_BIG_ENDIAN, &test_value);
3271 	if (test_value > 3)
3272 	{
3273 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq process value [0..15]");
3274 	}
3275 
3276 	// TPMI
3277 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpmi, 1, ENC_BIG_ENDIAN, &test_value);
3278 	if (test_value > 3)
3279 	{
3280 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi value [0..3]");
3281 	}
3282 
3283 	// PMI
3284 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pmi, 1, ENC_BIG_ENDIAN, &test_value);
3285 	if (test_value > 2)
3286 	{
3287 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi value [0..2]");
3288 	}
3289 
3290 	// Precoding information
3291 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_precoding_information, 1, ENC_BIG_ENDIAN, &test_value);
3292 	if (test_value > 2)
3293 	{
3294 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid precoding information value [0..15]");
3295 	}
3296 
3297 	// TPC
3298 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpc, 1, ENC_BIG_ENDIAN, &test_value);
3299 	if (test_value > 3)
3300 	{
3301 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpc value [0..3]");
3302 	}
3303 
3304 	// Downlink assignment index
3305 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_assignment_index, 1, ENC_BIG_ENDIAN, &test_value);
3306 	if (test_value > 15)
3307 	{
3308 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink assignment value [0..15]");
3309 	}
3310 
3311 	// NGAP
3312 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ngap, 1, ENC_BIG_ENDIAN, &test_value);
3313 	if (test_value > 1)
3314 	{
3315 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ngap value [0..1]");
3316 	}
3317 
3318 	// Transport block size index
3319 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transport_block_size_index, 1, ENC_BIG_ENDIAN, &test_value);
3320 	if (test_value > 31)
3321 	{
3322 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport block size Index value [0..31]");
3323 	}
3324 
3325 	// Downlink power offset
3326 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_power_offset, 1, ENC_BIG_ENDIAN, &test_value);
3327 	if (test_value > 1)
3328 	{
3329 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink power offset value [0..1]");
3330 	}
3331 
3332 	// Allocate PRACH flag
3333 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_allocate_prach_flag, 1, ENC_BIG_ENDIAN, &test_value);
3334 	if (test_value > 1)
3335 	{
3336 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid allocate prach flag value [0..1]");
3337 	}
3338 
3339 	// Preamble index
3340 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_preamble_index, 1, ENC_BIG_ENDIAN, &test_value);
3341 	if (test_value > 63)
3342 	{
3343 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid preamble Index value [0..63]");
3344 	}
3345 
3346 	// PRACH mask index
3347 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_mask_index, 1, ENC_BIG_ENDIAN, &test_value);
3348 	if (test_value > 15)
3349 	{
3350 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach mask Index value [0..15]");
3351 	}
3352 
3353 	// RNTI type
3354 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti_type, 1, ENC_BIG_ENDIAN, &test_value);
3355 	if (!(test_value >= 1 && test_value <= 3))
3356 	{
3357 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti type value [1..3]");
3358 	}
3359 
3360 	// Transmission power
3361 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
3362 	if (test_value > 10000)
3363 	{
3364 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value value [0..10000]");
3365 	}
3366 
3367 }
dissect_dl_config_request_dl_dci_pdu_rel9_value(ptvcursor_t * ptvc,packet_info * pinfo)3368 static void dissect_dl_config_request_dl_dci_pdu_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
3369 {
3370 	proto_item* item;
3371 	guint32 test_value;
3372 	gboolean test_boolean;
3373 
3374 	// MCCH flag
3375 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_mcch_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
3376 	if (test_boolean > 1)
3377 	{
3378 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcch flag value [0..1]");
3379 	}
3380 
3381 	// MCCH change notification
3382 	ptvcursor_add(ptvc, hf_nfapi_mcch_change_notification, 1, ENC_BIG_ENDIAN);
3383 
3384 	// Scrambling identity
3385 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_scrambling_identity, 1, ENC_BIG_ENDIAN, &test_value);
3386 	if (test_value > 1)
3387 	{
3388 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid scrambling identity value [0..1]");
3389 	}
3390 
3391 }
dissect_dl_config_request_dl_dci_pdu_rel10_value(ptvcursor_t * ptvc,packet_info * pinfo)3392 static void dissect_dl_config_request_dl_dci_pdu_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
3393 {
3394 	proto_item* item;
3395 	guint32 test_value;
3396 	gboolean test_boolean;
3397 
3398 	// Cross carrier scheduling flag
3399 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_cross_carrier_scheduling_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
3400 	if (test_boolean > 1)
3401 	{
3402 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cross carrier scheduling flag value [0..1]");
3403 	}
3404 
3405 	// Carrier indicator
3406 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_carrier_indicator, 1, ENC_BIG_ENDIAN, &test_value);
3407 	if (test_value > 7)
3408 	{
3409 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid carrier indicator value [0..7]");
3410 	}
3411 
3412 	// SRS flag
3413 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
3414 	if (test_boolean > 1)
3415 	{
3416 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs flag value [0..1]");
3417 	}
3418 
3419 	// SRS request
3420 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_request, 1, ENC_BIG_ENDIAN, &test_boolean);
3421 	if (test_boolean > 1)
3422 	{
3423 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs request value [0..1]");
3424 	}
3425 
3426 	// Antenna ports, scrambling and layers
3427 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_antenna_ports_scrambling_and_layers, 1, ENC_BIG_ENDIAN, &test_value);
3428 	if (test_value > 15)
3429 	{
3430 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid antenna ports scrambling and layers value [0..15]");
3431 	}
3432 
3433 	// Total DCI length including padding
3434 	ptvcursor_add(ptvc, hf_nfapi_total_dci_length_including_padding, 1, ENC_BIG_ENDIAN);
3435 
3436 	// N_DL_RB
3437 	// TODO : This is missing from the encoder....
3438 	//ptvcursor_add(ptvc, hf_nfapi_n_dl_rb, 1, ENC_BIG_ENDIAN);
3439 }
dissect_dl_config_request_dl_dci_pdu_rel11_value(ptvcursor_t * ptvc,packet_info * pinfo)3440 static void dissect_dl_config_request_dl_dci_pdu_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
3441 {
3442 	proto_item* item;
3443 	guint32 test_value;
3444 
3445 	// HARQ-ACK resource offset
3446 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_ack_resource_offset, 1, ENC_BIG_ENDIAN, &test_value);
3447 	if (test_value > 3)
3448 	{
3449 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid hack ack resource offset value [0..3]");
3450 	}
3451 
3452 	// PDSCH RE Mapping and Quasi-Co-Location Indicator
3453 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_re_mapping_and_quasi_co_location_indicator, 1, ENC_BIG_ENDIAN, &test_value);
3454 	if (test_value > 3)
3455 	{
3456 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch re mapping value [0..3]");
3457 	}
3458 
3459 }
dissect_ul_dl_configuration_index_value(ptvcursor_t * ptvc,packet_info * pinfo)3460 static void dissect_ul_dl_configuration_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
3461 {
3462 	guint32 test_value;
3463 
3464 	// UL/DL configuration indication
3465 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_dl_configuration_index, 1, ENC_BIG_ENDIAN, &test_value);
3466 	if (!(test_value >= 1 && test_value <= 5))
3467 	{
3468 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul/dl configuration indication value [1..5]");
3469 	}
3470 }
dissect_dl_config_request_dl_dci_pdu_rel12_value(ptvcursor_t * ptvc,packet_info * pinfo)3471 static void dissect_dl_config_request_dl_dci_pdu_rel12_value(ptvcursor_t * ptvc, packet_info* pinfo)
3472 {
3473 	proto_item* item;
3474 	guint32 test_value, count;
3475 	gboolean test_boolean;
3476 
3477 	// Primary cell type
3478 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_primary_cell_type, 1, ENC_BIG_ENDIAN, &test_value);
3479 	if (test_value > 2)
3480 	{
3481 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid primary cell type value [0..2]");
3482 	}
3483 
3484 	// UL/DL configuration flag
3485 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_ul_dl_configuration_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
3486 	if (test_boolean > 1)
3487 	{
3488 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul/dl configuration flag value [0..1]");
3489 	}
3490 
3491 	// Number of UL / DL configurations
3492 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ul_dl_configurations, 1, ENC_BIG_ENDIAN, &count);
3493 
3494 	dissect_array_value(ptvc, pinfo, "UL/DL Configurations", ett_nfapi_pnf_phy, count, dissect_ul_dl_configuration_index_value);
3495 }
dissect_dl_config_request_dl_dci_pdu_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)3496 static void dissect_dl_config_request_dl_dci_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3497 {
3498 	ptvcursor_add(ptvc, hf_nfapi_laa_end_partial_sf_flag, 1, ENC_BIG_ENDIAN);
3499 	ptvcursor_add(ptvc, hf_nfapi_laa_end_partial_sf_configuration, 1, ENC_BIG_ENDIAN);
3500 	ptvcursor_add(ptvc, hf_nfapi_initial_lbt_sf, 1, ENC_BIG_ENDIAN);
3501 	ptvcursor_add(ptvc, hf_nfapi_codebooksize_determination_r13, 1, ENC_BIG_ENDIAN);
3502 	ptvcursor_add(ptvc, hf_nfapi_rel13_drms_table_flag, 1, ENC_BIG_ENDIAN);
3503 }
dissect_dl_config_request_mch_pdu_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)3504 static void dissect_dl_config_request_mch_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3505 {
3506 	ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
3507 	ptvcursor_add(ptvc, hf_nfapi_pdu_index, 2, ENC_BIG_ENDIAN);
3508 	ptvcursor_add(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN);
3509 	ptvcursor_add(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN);
3510 	ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
3511 	ptvcursor_add(ptvc, hf_nfapi_modulation, 1, ENC_BIG_ENDIAN);
3512 	ptvcursor_add(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN);
3513 	ptvcursor_add(ptvc, hf_nfapi_mbsfn_area_id, 2, ENC_BIG_ENDIAN);
3514 }
dissect_codebook_index_value(ptvcursor_t * ptvc,packet_info * pinfo)3515 static void dissect_codebook_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
3516 {
3517 	guint32 test_value;
3518 
3519 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_codebook_index, 1, ENC_BIG_ENDIAN, &test_value);
3520 	if (test_value > 15)
3521 	{
3522 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid codebook Index value [0..15]");
3523 	}
3524 }
dissect_bf_vector_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)3525 static void dissect_bf_vector_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3526 {
3527 	ptvcursor_add(ptvc, hf_nfapi_bf_vector_bf_value, 2, ENC_BIG_ENDIAN);
3528 }
dissect_bf_vector_type_value(ptvcursor_t * ptvc,packet_info * pinfo)3529 static void dissect_bf_vector_type_value(ptvcursor_t * ptvc, packet_info* pinfo)
3530 {
3531 	guint32 count;
3532 
3533 	ptvcursor_add(ptvc, hf_nfapi_bf_vector_subband_index, 1, ENC_BIG_ENDIAN);
3534 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_bf_vector_num_antennas, 1, ENC_BIG_ENDIAN, &count);
3535 	dissect_array_value(ptvc, pinfo, "Antennas", ett_nfapi_bf_vector_antennas, count, dissect_bf_vector_value);
3536 }
dissect_dl_config_request_dlsch_pdu_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)3537 static void dissect_dl_config_request_dlsch_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
3538 {
3539 	proto_item* item;
3540 	guint32 test_value, num_subbands, num_vectors;
3541 
3542 	// Length
3543 	ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
3544 
3545 	// PDU index
3546 	ptvcursor_add(ptvc, hf_nfapi_pdu_index, 2, ENC_BIG_ENDIAN);
3547 
3548 	// RNTI
3549 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
3550 	if (!(test_value >= 1 /* && rnti_value <= 65535)*/))
3551 	{
3552 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid codebook Index value [1..65535]");
3553 	}
3554 
3555 	// Resource allocation type
3556 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN, &test_value);
3557 	if (test_value > 5)
3558 	{
3559 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocation type value [0..5]");
3560 	}
3561 
3562 	// Virtual resource block assignment flag
3563 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_virtual_resource_block_assignment_flag, 1, ENC_BIG_ENDIAN, &test_value);
3564 	if (test_value > 1)
3565 	{
3566 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid virtual resource block allocation assignment value [0..1]");
3567 	}
3568 
3569 	// Resource block coding
3570 	ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
3571 
3572 	// Modulation
3573 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_modulation, 1, ENC_BIG_ENDIAN, &test_value);
3574 	if (!(test_value == 2 || test_value == 4 || test_value == 6 || test_value == 8))
3575 	{
3576 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid modulation value [2, 4, 6, 8]");
3577 	}
3578 
3579 	// Redundancy version
3580 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version, 1, ENC_BIG_ENDIAN, &test_value);
3581 	if (test_value > 3)
3582 	{
3583 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy value [0..3]");
3584 	}
3585 
3586 	// Transport blocks
3587 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transport_blocks, 1, ENC_BIG_ENDIAN, &test_value);
3588 	if (!(test_value >= 1 && test_value <= 2))
3589 	{
3590 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport blocks value [1..2]");
3591 	}
3592 
3593 	// Transport block to codeword swap flag
3594 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transport_block_to_codeword_swap_flag, 1, ENC_BIG_ENDIAN, &test_value);
3595 	if (test_value > 1)
3596 	{
3597 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport block to codeword swap flag value [0..1]");
3598 	}
3599 
3600 	// Transmission scheme
3601 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_scheme, 1, ENC_BIG_ENDIAN, &test_value);
3602 	if (test_value > 13)
3603 	{
3604 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission scheme value [0..13]");
3605 	}
3606 
3607 	// Number of layers
3608 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_layers, 1, ENC_BIG_ENDIAN, &test_value);
3609 	if (!(test_value >= 1 && test_value <= 8))
3610 	{
3611 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of layers value [1..8]");
3612 	}
3613 
3614 	// Number of subbands
3615 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_subbands, 1, ENC_BIG_ENDIAN, &num_subbands);
3616 	if (num_subbands > 13)
3617 	{
3618 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of subbands value [0..13]");
3619 	}
3620 
3621 	dissect_array_value(ptvc, pinfo, "Subbands", ett_nfapi_subbands, num_subbands, dissect_codebook_index_value);
3622 
3623 	// UE category capacity
3624 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_category_capacity, 1, ENC_BIG_ENDIAN, &test_value);
3625 	if (test_value > 14)
3626 	{
3627 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue category capacity value [0..14]");
3628 	}
3629 
3630 	// P-A
3631 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pa, 1, ENC_BIG_ENDIAN, &test_value);
3632 	if (test_value > 7)
3633 	{
3634 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid p-a value [0..7]");
3635 	}
3636 
3637 	// Delta power offset index
3638 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_power_offset_index, 1, ENC_BIG_ENDIAN, &test_value);
3639 	if (test_value > 1)
3640 	{
3641 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta power offset value [0..1]");
3642 	}
3643 
3644 	// NGAP
3645 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ngap, 1, ENC_BIG_ENDIAN, &test_value);
3646 	if (test_value > 1)
3647 	{
3648 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ngap value [0..1]");
3649 	}
3650 
3651 	// NPRB
3652 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nprb, 1, ENC_BIG_ENDIAN, &test_value);
3653 	if (test_value > 1)
3654 	{
3655 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nprb value [0..1]");
3656 	}
3657 
3658 	// Transmission mode
3659 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_mode, 1, ENC_BIG_ENDIAN, &test_value);
3660 	if (!(test_value >= 1 && test_value <= 10))
3661 	{
3662 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode value [1..10]");
3663 	}
3664 
3665 	// numBfPRBperSubband
3666 	ptvcursor_add(ptvc, hf_nfapi_num_bf_prb_per_subband, 1, ENC_BIG_ENDIAN);
3667 
3668 	// numBfVector
3669 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_num_bf_vector, 1, ENC_BIG_ENDIAN, &num_vectors);
3670 
3671 	dissect_array_value(ptvc, pinfo, "Beamforming Vectors", ett_nfapi_bf_vectors, num_vectors, dissect_bf_vector_type_value);
3672 }
dissect_csi_rs_resource_config_value(ptvcursor_t * ptvc,packet_info * pinfo)3673 static void dissect_csi_rs_resource_config_value(ptvcursor_t * ptvc, packet_info* pinfo)
3674 {
3675 	guint32 test_value;
3676 
3677 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_resource_config, 1, ENC_BIG_ENDIAN, &test_value);
3678 	if (test_value > 31)
3679 	{
3680 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi-rs resource config value [0..31]");
3681 	}
3682 }
dissect_dl_config_request_dlsch_pdu_rel9_value(ptvcursor_t * ptvc,packet_info * pinfo)3683 static void dissect_dl_config_request_dlsch_pdu_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
3684 {
3685 	guint32 test_value;
3686 
3687 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nscid, 1, ENC_BIG_ENDIAN, &test_value);
3688 	if (test_value > 1)
3689 	{
3690 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nscid value [0..1]");
3691 	}
3692 }
dissect_dl_config_request_dlsch_pdu_rel10_value(ptvcursor_t * ptvc,packet_info * pinfo)3693 static void dissect_dl_config_request_dlsch_pdu_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
3694 {
3695 	proto_item* item;
3696 	guint32 test_value, count;
3697 	gboolean test_boolean;
3698 
3699 	// CSI-RS flag
3700 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_csi_rs_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
3701 	if (test_boolean > 1)
3702 	{
3703 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi-rs flag value [0..1]");
3704 	}
3705 
3706 	// CSI-RS resource config R10
3707 	ptvcursor_add(ptvc, hf_nfapi_csi_rs_resource_config_r10, 1, ENC_BIG_ENDIAN);
3708 
3709 	// CSI-RS zero Tx power resource config bitmap R10
3710 	ptvcursor_add(ptvc, hf_nfapi_csi_rs_zero_tx_power_resource_config_bitmap_r10, 2, ENC_BIG_ENDIAN);
3711 
3712 	// CSI-RS Number of NZP configuration
3713 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_number_of_nzp_configurations, 1, ENC_BIG_ENDIAN, &count);
3714 	if (count > 3)
3715 	{
3716 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi-rs number of nzp configuration value [0..3]");
3717 	}
3718 
3719 	// CSI-RS configuration
3720 	dissect_array_value(ptvc, pinfo, "CSI-RS Resource Configs", ett_nfapi_csi_rs_resource_configs, count, dissect_csi_rs_resource_config_value);
3721 
3722 	// PDSCH start
3723 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_start, 1, ENC_BIG_ENDIAN, &test_value);
3724 	if (test_value > 4)
3725 	{
3726 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch start value [0..4]");
3727 	}
3728 
3729 }
dissect_dl_config_request_dlsch_pdu_rel11_value(ptvcursor_t * ptvc,packet_info * pinfo)3730 static void dissect_dl_config_request_dlsch_pdu_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
3731 {
3732 	proto_item* item;
3733 	guint32 test_value;
3734 
3735 	// DMRS Config flag
3736 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_config_flag, 1, ENC_BIG_ENDIAN, &test_value);
3737 	if (test_value > 1)
3738 	{
3739 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms config flag value [0..1]");
3740 	}
3741 
3742 	// DMRS-Scrambling
3743 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_scrambling, 2, ENC_BIG_ENDIAN, &test_value);
3744 	if (test_value > 503)
3745 	{
3746 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms scrambling value [0..503]");
3747 	}
3748 
3749 	// CSI Config flag
3750 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_config_flag, 1, ENC_BIG_ENDIAN, &test_value);
3751 	if (test_value > 1)
3752 	{
3753 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi config flag value [0..1]");
3754 	}
3755 
3756 	// CSI- Scrambling
3757 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_scrambling, 2, ENC_BIG_ENDIAN, &test_value);
3758 	if (test_value > 503)
3759 	{
3760 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi scrambling value [0..503]");
3761 	}
3762 
3763 	// PDSCH RE mapping flag
3764 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_re_mapping_flag, 1, ENC_BIG_ENDIAN, &test_value);
3765 	if (test_value > 1)
3766 	{
3767 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch re mapping flag value [0..1]");
3768 	}
3769 
3770 	// PDSCH RE mapping antenna ports
3771 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_re_mapping_antenna_ports, 1, ENC_BIG_ENDIAN, &test_value);
3772 	if (!(test_value == 1 || test_value == 2 || test_value == 4))
3773 	{
3774 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch re mapping antenna ports value [1, 2, 4]");
3775 	}
3776 
3777 	// PDSCH RE mapping freq shift
3778 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_re_mapping_freq_shift, 1, ENC_BIG_ENDIAN, &test_value);
3779 	if (test_value > 5)
3780 	{
3781 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch re mapping freq shift value [0..5]");
3782 	}
3783 }
dissect_dl_config_request_dlsch_pdu_rel12_value(ptvcursor_t * ptvc,packet_info * pinfo)3784 static void dissect_dl_config_request_dlsch_pdu_rel12_value(ptvcursor_t * ptvc, packet_info* pinfo)
3785 {
3786 	proto_item* item;
3787 	guint32 test_value;
3788 
3789 	// altCQI-Table-r12
3790 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_alt_cqi_table_r12, 1, ENC_BIG_ENDIAN, &test_value);
3791 	if (test_value > 1)
3792 	{
3793 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid alt cqi table r12 value [0..1]");
3794 	}
3795 
3796 	// MaxLayers
3797 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_max_layers, 1, ENC_BIG_ENDIAN, &test_value);
3798 	if (!(test_value >= 1 && test_value <= 8))
3799 	{
3800 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid max layers value [1..8]");
3801 	}
3802 
3803 	ptvcursor_add(ptvc, hf_nfapi_n_dl_harq, 1, ENC_BIG_ENDIAN);
3804 }
dissect_dl_config_request_dlsch_pdu_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)3805 static void dissect_dl_config_request_dlsch_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
3806 {
3807 	proto_item* item;
3808 	guint32 test_value;
3809 
3810 	// DwPTS Symbols
3811 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dwpts_symbols, 1, ENC_BIG_ENDIAN, &test_value);
3812 	if (!(test_value == 3 || test_value == 6 || test_value == 9 ||
3813 		test_value == 10 || test_value == 11 || test_value == 12 ||
3814 		test_value == 14))
3815 	{
3816 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dwpts symbols value [3, 6, 9, 10, 11, 12, 14]");
3817 	}
3818 
3819 	// Initial LBT SF
3820 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_lbt_sf, 1, ENC_BIG_ENDIAN, &test_value);
3821 	if (test_value > 1)
3822 	{
3823 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial lbt sf value [0..1]");
3824 	}
3825 
3826 	// UE Type
3827 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_type, 1, ENC_BIG_ENDIAN, &test_value);
3828 	if (test_value > 2)
3829 	{
3830 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue type value [0..2]");
3831 	}
3832 
3833 	// PDSCH Payload Type
3834 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_payload_type, 1, ENC_BIG_ENDIAN, &test_value);
3835 	if (test_value > 2)
3836 	{
3837 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch payload type value [0..2]");
3838 	}
3839 
3840 	// Initial transmission SF (io)
3841 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_transmission_sf, 2, ENC_BIG_ENDIAN, &test_value);
3842 	if (!(test_value <= 10239 || test_value == 0xFFFF))
3843 	{
3844 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial transmission sf io value [0..10239, 0xFFFF]");
3845 	}
3846 
3847 	// Rel-13-DMRS-tabe flag
3848 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_req13_drms_table_flag, 1, ENC_BIG_ENDIAN, &test_value);
3849 	if (test_value > 1)
3850 	{
3851 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rel13 drms table flag value [0..1]");
3852 	}
3853 }
dissect_dl_config_request_pch_pdu_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)3854 static void dissect_dl_config_request_pch_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
3855 {
3856 	proto_item* item;
3857 	guint32 test_value;
3858 
3859 	// Length
3860 	ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
3861 
3862 	// PDU index
3863 	ptvcursor_add(ptvc, hf_nfapi_pdu_index, 2, ENC_BIG_ENDIAN);
3864 
3865 	// P-RNTI
3866 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prnti, 2, ENC_BIG_ENDIAN, &test_value);
3867 	if (test_value != 0xFFFE)
3868 	{
3869 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prnti value [0xFFFE]");
3870 	}
3871 
3872 	// Resource allocation type
3873 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN, &test_value);
3874 	if (!(test_value == 2 || test_value == 3 || test_value == 6))
3875 	{
3876 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocate type value [2, 3, 6]");
3877 	}
3878 
3879 	// Virtual resource block assignment flag
3880 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_virtual_resource_block_assignment_flag, 1, ENC_BIG_ENDIAN, &test_value);
3881 	if (test_value > 1)
3882 	{
3883 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid virtual resource block assignment flag value [0..1]");
3884 	}
3885 
3886 	// Resource block coding
3887 	ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
3888 
3889 	// MCS
3890 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs, 1, ENC_BIG_ENDIAN, &test_value);
3891 	if (test_value != 0)
3892 	{
3893 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs value [0]");
3894 	}
3895 
3896 	// Redundancy version
3897 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version, 1, ENC_BIG_ENDIAN, &test_value);
3898 	if (test_value != 0)
3899 	{
3900 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy value [0]");
3901 	}
3902 
3903 	// Number of transport blocks
3904 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_transport_blocks, 1, ENC_BIG_ENDIAN, &test_value);
3905 	if (test_value != 1)
3906 	{
3907 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport blocks value [1]");
3908 	}
3909 
3910 	// Transport block to codeword swap flag
3911 	ptvcursor_add(ptvc, hf_nfapi_transport_block_to_codeword_swap_flag, 1, ENC_BIG_ENDIAN);
3912 
3913 	// Transmission scheme
3914 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_scheme, 1, ENC_BIG_ENDIAN, &test_value);
3915 	if (!(test_value == 0 || test_value == 1 || test_value == 6))
3916 	{
3917 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission schemes value [0, 1, 6]");
3918 	}
3919 
3920 	// Number of layers
3921 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_layers, 1, ENC_BIG_ENDIAN, &test_value);
3922 	if (!(test_value >= 1 && test_value <= 4))
3923 	{
3924 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of layers value [1..4]");
3925 	}
3926 
3927 	// Codebook index
3928 	ptvcursor_add(ptvc, hf_nfapi_codebook_index, 1, ENC_BIG_ENDIAN);
3929 
3930 	// UE category capacity
3931 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_category_capacity, 1, ENC_BIG_ENDIAN, &test_value);
3932 	if (test_value > 14)
3933 	{
3934 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue category capacity value [0..14]");
3935 	}
3936 
3937 	// P-A
3938 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pa, 1, ENC_BIG_ENDIAN, &test_value);
3939 	if (test_value > 7)
3940 	{
3941 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid p-a value value [0..7]");
3942 	}
3943 
3944 	// Transmission power
3945 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
3946 	if (test_value > 10000)
3947 	{
3948 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
3949 	}
3950 
3951 	// NPRB
3952 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nprb, 1, ENC_BIG_ENDIAN, &test_value);
3953 	if (test_value > 1)
3954 	{
3955 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nprb value [0..1]");
3956 	}
3957 
3958 	// NGAP
3959 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ngap, 1, ENC_BIG_ENDIAN, &test_value);
3960 	if (test_value > 1)
3961 	{
3962 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ngap value [0..1]");
3963 	}
3964 
3965 }
dissect_dl_config_request_pch_pdu_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)3966 static void dissect_dl_config_request_pch_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
3967 {
3968 	proto_item* item;
3969 	guint32 test_value;
3970 
3971 	// UE mode
3972 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_mode, 1, ENC_BIG_ENDIAN, &test_value);
3973 	if (test_value > 1)
3974 	{
3975 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue mode value [0..1]");
3976 	}
3977 
3978 	// Initial transmission SF (io)
3979 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_transmission_sf, 2, ENC_BIG_ENDIAN, &test_value);
3980 	if (!(test_value <= 10239 || test_value == 0xFFFF))
3981 	{
3982 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial transmission sf io value [0..10239, 0xFFFF]");
3983 	}
3984 }
dissect_dl_config_request_prs_pdu_rel9_value(ptvcursor_t * ptvc,packet_info * pinfo)3985 static void dissect_dl_config_request_prs_pdu_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
3986 {
3987 	proto_item* item;
3988 	guint32 test_value;
3989 	gboolean test_boolean;
3990 
3991 	// Transmission power
3992 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
3993 	if (test_value > 10000)
3994 	{
3995 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
3996 	}
3997 
3998 	// PRS bandwidth
3999 	item = ptvcursor_add_ret_uint(ptvc, hf_prs_bandwidth, 1, ENC_BIG_ENDIAN, &test_value);
4000 	if (!(test_value == 6 || test_value == 15 || test_value == 25 ||
4001 		  test_value == 50 || test_value == 75 || test_value == 100))
4002 	{
4003 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prs bandwidth value [6, 15, 25, 50, 75, 100]");
4004 	}
4005 
4006 	// PRS cyclic prefix type
4007 	item = ptvcursor_add_ret_boolean(ptvc, hf_prs_cyclic_prefix_type, 1, ENC_BIG_ENDIAN, &test_boolean);
4008 	if (test_boolean > 1)
4009 	{
4010 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prs cyclic prefix value [0..1]");
4011 	}
4012 
4013 	// PRS muting
4014 	item = ptvcursor_add_ret_boolean(ptvc, hf_prs_muting, 1, ENC_BIG_ENDIAN, &test_boolean);
4015 	if (test_boolean > 1)
4016 	{
4017 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prs muting value [0..1]");
4018 	}
4019 }
dissect_dl_config_request_csi_rs_pdu_rel10_value(ptvcursor_t * ptvc,packet_info * pinfo)4020 static void dissect_dl_config_request_csi_rs_pdu_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
4021 {
4022 	proto_item* item;
4023 	guint32 test_value, count;
4024 
4025 	// CSI-RS antenna port count R10
4026 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_antenna_port_count_r10, 1, ENC_BIG_ENDIAN, &test_value);
4027 	if (!(test_value == 1 || test_value == 2 ||
4028 		  test_value == 4 || test_value == 8 ||
4029 		  test_value == 12 || test_value == 16))
4030 	{
4031 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi rs antenna port count r10 value [1, 2, 4, 6, 8, 10]");
4032 	}
4033 
4034 	// CSI-RS resource config R10
4035 	ptvcursor_add(ptvc, hf_nfapi_csi_rs_resource_config_r10, 1, ENC_BIG_ENDIAN);
4036 
4037 	// Transmission power
4038 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
4039 	if (test_value > 10000)
4040 	{
4041 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
4042 	}
4043 
4044 	// CSI-RS zero Tx power resource config bitmap R10
4045 	ptvcursor_add(ptvc, hf_nfapi_csi_rs_zero_tx_power_resource_config_bitmap_r10, 2, ENC_BIG_ENDIAN);
4046 
4047 	// CSI-RS Number of NZP configuration
4048 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_number_of_nzp_configurations, 1, ENC_BIG_ENDIAN, &count);
4049 	if (count > 8)
4050 	{
4051 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi-rs number of nzp configuration value [0..8]");
4052 	}
4053 
4054 	// CSI-RS configuration
4055 	dissect_array_value(ptvc, pinfo, "CSI-RS Resource Configs", ett_nfapi_csi_rs_resource_configs, count, dissect_csi_rs_resource_config_value);
4056 }
dissect_csi_rs_bf_vector_value(ptvcursor_t * ptvc,packet_info * pinfo)4057 static void dissect_csi_rs_bf_vector_value(ptvcursor_t * ptvc, packet_info* pinfo)
4058 {
4059 	guint32 count;
4060 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_resource_index, 1, ENC_BIG_ENDIAN, &count);
4061 	if (count > 7)
4062 	{
4063 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi-rs resource Index value [0..7]");
4064 	}
4065 
4066 	// todo : how to work out the antenna port count for the bfValue
4067 }
dissect_dl_config_request_csi_rs_pdu_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)4068 static void dissect_dl_config_request_csi_rs_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4069 {
4070 	proto_item* item;
4071 	guint32 test_value, class_value, count;
4072 
4073 	// Class
4074 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_class, 1, ENC_BIG_ENDIAN, &class_value);
4075 	if (class_value > 2)
4076 	{
4077 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid class value [0..2]");
4078 	}
4079 
4080 	// cdmType
4081 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cdm_type, 1, ENC_BIG_ENDIAN, &test_value);
4082 	if (test_value > 1)
4083 	{
4084 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cdm type value [0..1]");
4085 	}
4086 
4087 	// numBfVector
4088 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_num_bf_vector, 1, ENC_BIG_ENDIAN, &count);
4089 	if (!((class_value == 1 && count == 0) || (class_value == 2 && count <= 8)))
4090 	{
4091 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid num bf vector value [0] or [0..8]");
4092 	}
4093 
4094 	dissect_array_value(ptvc, pinfo, "Beamforming Vector", ett_nfapi_csi_rs_bf_vector, count, dissect_csi_rs_bf_vector_value);
4095 }
dissect_epdcch_prb_index_value(ptvcursor_t * ptvc,packet_info * pinfo)4096 static void dissect_epdcch_prb_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
4097 {
4098 	guint32 test_value;
4099 
4100 	// EPDCCH PRB index
4101 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_epdcch_prb_index, 1, ENC_BIG_ENDIAN, &test_value);
4102 	if (test_value > 99)
4103 	{
4104 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid epdcch prb_index value [0..99]");
4105 	}
4106 }
dissect_dl_config_request_depdcch_params_rel11_value(ptvcursor_t * ptvc,packet_info * pinfo)4107 static void dissect_dl_config_request_depdcch_params_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
4108 {
4109 	proto_item* item;
4110 	guint32 test_value, count;
4111 
4112 	// EPDCCH Resource assignment flag
4113 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_epdcch_resource_assignment_flag, 1, ENC_BIG_ENDIAN, &test_value);
4114 	if (test_value > 1)
4115 	{
4116 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid epdcch resource assignment flag value [0..1]");
4117 	}
4118 
4119 	// EPDCCH ID
4120 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_epdcch_id, 2, ENC_BIG_ENDIAN, &test_value);
4121 	if (test_value > 503)
4122 	{
4123 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid epdcch id value [0..503]");
4124 	}
4125 
4126 	// EPDCCH Start Symbol
4127 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_epdcch_start_symbol, 1, ENC_BIG_ENDIAN, &test_value);
4128 	if (!(test_value >= 1 && test_value <= 4))
4129 	{
4130 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid epdcch start symbol value [1..4]");
4131 	}
4132 
4133 	// EPDCCH NumPRB
4134 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_epdcch_num_prb, 1, ENC_BIG_ENDIAN, &count);
4135 	if (!(count == 2 || count == 4 || count == 8))
4136 	{
4137 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid epdcch num prb value [2, 4, 8]");
4138 	}
4139 
4140 	dissect_array_value(ptvc, pinfo, "PRBs", ett_nfapi_epdcch_prbs, count, dissect_epdcch_prb_index_value);
4141 
4142 	dissect_bf_vector_type_value(ptvc, pinfo);
4143 }
dissect_dl_config_request_depdcch_params_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)4144 static void dissect_dl_config_request_depdcch_params_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4145 {
4146 	proto_item* item;
4147 	guint32 test_value;
4148 
4149 	// DwPTS Symbols
4150 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_lbt_sf, 1, ENC_BIG_ENDIAN, &test_value);
4151 	if (!(test_value == 3 || test_value == 6 || test_value == 9 ||
4152 		test_value == 10 || test_value == 11 || test_value == 12 ||
4153 		test_value == 14))
4154 	{
4155 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dwpts symbols value [3, 6, 9, 10, 11, 12, 14]");
4156 	}
4157 
4158 	// Initial LBT SF
4159 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dwpts_symbols, 1, ENC_BIG_ENDIAN, &test_value);
4160 	if (test_value > 1)
4161 	{
4162 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial lbt sf value [0..1]");
4163 	}
4164 
4165 }
dissect_precoding_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)4166 static void dissect_precoding_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
4167 {
4168 	ptvcursor_add(ptvc, hf_nfapi_precoding_value, 2, ENC_BIG_ENDIAN);
4169 }
dissect_dl_config_request_mpdpcch_pdu_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)4170 static void dissect_dl_config_request_mpdpcch_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4171 {
4172 	proto_item* item;
4173 	guint32 test_value, count;
4174 	gboolean test_boolean;
4175 
4176 	// MPDCCH Narrowband
4177 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_narrowband, 1, ENC_BIG_ENDIAN, &test_value);
4178 	if (test_value > 15)
4179 	{
4180 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mpdcch narrowband value [0..15]");
4181 	}
4182 
4183 	// Number of PRB pairs
4184 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_prb_pairs, 1, ENC_BIG_ENDIAN, &test_value);
4185 	if (!(test_value == 2 || test_value == 4 || test_value == 6))
4186 	{
4187 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of prb pair value [2, 4, 6]");
4188 	}
4189 
4190 	// Resource Block Assignment
4191 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_assignment, 1, ENC_BIG_ENDIAN, &test_value);
4192 	if (test_value > 14)
4193 	{
4194 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block assignment value [0..14]");
4195 	}
4196 
4197 	// MPDCCH transmission type
4198 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_transmission_type, 1, ENC_BIG_ENDIAN, &test_value);
4199 	if (test_value > 1)
4200 	{
4201 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mpdcch transmission type value [0..1]");
4202 	}
4203 
4204 	// Start symbol
4205 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_start_symbol, 1, ENC_BIG_ENDIAN, &test_value);
4206 	if (!(test_value >= 1 && test_value <=4))
4207 	{
4208 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid start symbol value [1..4]");
4209 	}
4210 
4211 	// ECCE index
4212 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ecce_index, 1, ENC_BIG_ENDIAN, &test_value);
4213 	if (test_value > 22)
4214 	{
4215 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ecce Index value [0..22]");
4216 	}
4217 
4218 	// Aggregation level
4219 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_aggregation_level, 1, ENC_BIG_ENDIAN, &test_value);
4220 	if (!(test_value == 2 || test_value == 4 || test_value == 8 ||
4221 		test_value == 16 || test_value == 24))
4222 	{
4223 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid aggregation level value [2, 4, 8, 16, 24]");
4224 	}
4225 
4226 	// RNTI type
4227 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_rnti_type, 1, ENC_BIG_ENDIAN, &test_value);
4228 	if (test_value > 4)
4229 	{
4230 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti type value [0..4]");
4231 	}
4232 
4233 	// RNTI
4234 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
4235 	if (!(test_value >= 1))
4236 	{
4237 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
4238 	}
4239 
4240 	// CEMode
4241 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ce_mode, 1, ENC_BIG_ENDIAN, &test_value);
4242 	if (!(test_value >= 1 && test_value <= 2))
4243 	{
4244 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cemode value [1..2]");
4245 	}
4246 
4247 	// DMRS scrambling init
4248 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_scrabmling_init, 2, ENC_BIG_ENDIAN, &test_value);
4249 	if (test_value > 503)
4250 	{
4251 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms scrambling init value [0..503]");
4252 	}
4253 
4254 	// Initial transmission SF (io)
4255 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_transmission_sf, 2, ENC_BIG_ENDIAN, &test_value);
4256 	if (!(test_value <= 10239 || test_value == 0xFFFF))
4257 	{
4258 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial transmission sf io value [0..10239, 0xFFFF]");
4259 	}
4260 
4261 	// Transmission power
4262 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
4263 	if (test_value > 10000)
4264 	{
4265 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
4266 	}
4267 
4268 	// DCI format
4269 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_dci_format, 1, ENC_BIG_ENDIAN, &test_value);
4270 	if (!(test_value == 10 || test_value == 11 || test_value == 12))
4271 	{
4272 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci format value [10, 11, 12]");
4273 	}
4274 
4275 	// Resource block coding
4276 	ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 2, ENC_BIG_ENDIAN);
4277 
4278 	// MCS
4279 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs, 1, ENC_BIG_ENDIAN, &test_value);
4280 	if (test_value > 15)
4281 	{
4282 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..15]");
4283 	}
4284 
4285 	// PDSCH repetition levels
4286 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_reception_levels, 1, ENC_BIG_ENDIAN, &test_value);
4287 	if (!(test_value >= 1 && test_value <= 8))
4288 	{
4289 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch repetition levels value [1..8]");
4290 	}
4291 
4292 	// Redundancy version
4293 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version, 1, ENC_BIG_ENDIAN, &test_value);
4294 	if (test_value > 3)
4295 	{
4296 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy version value [0..3]");
4297 	}
4298 
4299 	// New data indicator
4300 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indicator, 1, ENC_BIG_ENDIAN, &test_value);
4301 	if (test_value > 1)
4302 	{
4303 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indicator value [0..1]");
4304 	}
4305 
4306 	// HARQ process
4307 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_process, 1, ENC_BIG_ENDIAN, &test_value);
4308 	if (test_value > 15)
4309 	{
4310 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq process value [0..15]");
4311 	}
4312 
4313 	// TPMI length
4314 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpmi_length, 1, ENC_BIG_ENDIAN, &test_value);
4315 	if (!(test_value == 0 || test_value == 2 || test_value == 4))
4316 	{
4317 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi length value [0, 2, 4]");
4318 	}
4319 
4320 	// TPMI
4321 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpmi, 1, ENC_BIG_ENDIAN, &test_value);
4322 	if (test_value > 15)
4323 	{
4324 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi value [0..15]");
4325 	}
4326 
4327 	// PMI flag
4328 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_pmi_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
4329 	if (test_boolean > 1)
4330 	{
4331 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pmi flag value [0..1]");
4332 	}
4333 
4334 	// PMI
4335 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pmi, 1, ENC_BIG_ENDIAN, &test_value);
4336 	if (test_value > 1)
4337 	{
4338 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pmi value [0..1]");
4339 	}
4340 
4341 	// HARQ resource offset
4342 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_resource_offset, 1, ENC_BIG_ENDIAN, &test_value);
4343 	if (test_value > 3)
4344 	{
4345 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq resource offset value [0..3]");
4346 	}
4347 
4348 	// DCI subframe repetition number
4349 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dci_subframe_repetition_number, 1, ENC_BIG_ENDIAN, &test_value);
4350 	if (!(test_value >= 1 && test_value <= 4))
4351 	{
4352 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci subframe repetition number value [1..4]");
4353 	}
4354 
4355 	// TPC
4356 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpc, 1, ENC_BIG_ENDIAN, &test_value);
4357 	if (test_value > 3)
4358 	{
4359 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpc value [0..3]");
4360 	}
4361 
4362 	// Downlink assignment Index Length
4363 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_assignment_index_length, 1, ENC_BIG_ENDIAN, &test_value);
4364 	if (!(test_value == 0 || test_value == 2 || test_value == 4))
4365 	{
4366 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink assignment Index length value [0, 2, 4]");
4367 	}
4368 
4369 	// Downlink assignment index
4370 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_assignment_index, 1, ENC_BIG_ENDIAN, &test_value);
4371 	if (test_value > 15)
4372 	{
4373 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink assignment Index value [0..15]");
4374 	}
4375 
4376 	// Allocate PRACH flag
4377 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_allocate_prach_flag, 1, ENC_BIG_ENDIAN, &test_value);
4378 	if (test_value > 1)
4379 	{
4380 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid allocate prach flag value [0..1]");
4381 	}
4382 
4383 	// Preamble index
4384 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_preamble_index, 1, ENC_BIG_ENDIAN, &test_value);
4385 	if (test_value > 63)
4386 	{
4387 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid preamble Index value [0..63]");
4388 	}
4389 
4390 	// PRACH mask index
4391 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_mask_index, 1, ENC_BIG_ENDIAN, &test_value);
4392 	if (test_value > 15)
4393 	{
4394 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach mask Index value [0..15]");
4395 	}
4396 
4397 	// Starting CE Level
4398 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_starting_ce_level, 1, ENC_BIG_ENDIAN, &test_value);
4399 	if (test_value > 3)
4400 	{
4401 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid starting ce level value [0..3]");
4402 	}
4403 
4404 	// SRS request
4405 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_request, 1, ENC_BIG_ENDIAN, &test_boolean);
4406 	if (test_boolean > 1)
4407 	{
4408 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs request value [0..1]");
4409 	}
4410 
4411 	// Antenna ports and scrambling identity flag
4412 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_antenna_ports_and_scrambling_identity_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
4413 	if (test_boolean > 1)
4414 	{
4415 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid antenna ports and scrambling identity flag value [0..1]");
4416 	}
4417 
4418 	// Antenna ports and scrambling identity
4419 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_antenna_ports_and_scrambling_identity, 1, ENC_BIG_ENDIAN, &test_value);
4420 	if (test_value > 3)
4421 	{
4422 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid antenna ports and scrambling identity value [0..3]");
4423 	}
4424 
4425 	// Frequency hopping enabled flag
4426 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_enabled_flag, 1, ENC_BIG_ENDIAN, &test_value);
4427 	if (test_value > 1)
4428 	{
4429 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping enabled flag value [0..1]");
4430 	}
4431 
4432 	// Paging/Direct indication differentiation flag
4433 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_paging_direct_indication_differentiation_flag, 1, ENC_BIG_ENDIAN, &test_value);
4434 	if (test_value > 1)
4435 	{
4436 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid paging/direct indication differentiation flag value [0..1]");
4437 	}
4438 
4439 	// Direct indication
4440 	ptvcursor_add(ptvc, hf_nfapi_direct_indication, 1, ENC_BIG_ENDIAN);
4441 
4442 	// Total DCI length including padding
4443 	ptvcursor_add(ptvc, hf_nfapi_total_dci_length_including_padding, 1, ENC_BIG_ENDIAN);
4444 
4445 	// Number of TX Antenna ports
4446 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_tx_antenna_ports, 1, ENC_BIG_ENDIAN, &count);
4447 
4448 	dissect_array_value(ptvc, pinfo, "Precoding", ett_nfapi_precoding, count, dissect_precoding_value);
4449 }
dissect_ul_config_pdu(ptvcursor_t * ptvc,packet_info * pinfo)4450 static void dissect_ul_config_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
4451 {
4452 	proto_item* item;
4453 	guint32 test_value, size;
4454 
4455 	// PDU Type
4456 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_config_pdu_type, 1, ENC_BIG_ENDIAN, &test_value);
4457 	if (test_value > 15)
4458 	{
4459 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul pdu type value [0..15]");
4460 	}
4461 
4462 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_size, 1, ENC_BIG_ENDIAN, &size);
4463 
4464 	guint pdu_end = (ptvcursor_current_offset(ptvc) + size - 2);
4465 	dissect_tlv_list(ptvc, pinfo, pdu_end);
4466 }
dissect_ul_config_request_body_value(ptvcursor_t * ptvc,packet_info * pinfo)4467 static void dissect_ul_config_request_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
4468 {
4469 	proto_item* item;
4470 	guint32 test_value, num_pdu;
4471 	gboolean test_boolean;
4472 
4473 	// Number of PDUs
4474 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 1, ENC_BIG_ENDIAN, &num_pdu);
4475 
4476 	// RACH/PRACH frequency resources
4477 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rach_prach_frequency_resources, 1, ENC_BIG_ENDIAN, &test_value);
4478 	if (test_value > 1)
4479 	{
4480 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rach prach frequency resources value [0..1]");
4481 	}
4482 
4483 	// SRS present
4484 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_present, 1, ENC_BIG_ENDIAN, &test_boolean);
4485 	if (test_boolean > 1)
4486 	{
4487 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs present value [0..1]");
4488 	}
4489 
4490 	dissect_array_value(ptvc, pinfo, "UL Config PDU List", ett_nfapi_ul_config_request_pdu_list, num_pdu, dissect_ul_config_pdu);
4491 }
dissect_ul_config_ulsch_pdu_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)4492 static void dissect_ul_config_ulsch_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
4493 {
4494 	proto_item* item;
4495 	guint32 test_value;
4496 
4497 	// Handle
4498 	ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
4499 
4500 	// Size
4501 	ptvcursor_add(ptvc, hf_nfapi_size, 2, ENC_BIG_ENDIAN);
4502 
4503 	// RNTI
4504 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
4505 	if (!(test_value >= 1))
4506 	{
4507 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
4508 	}
4509 
4510 	// Resource block start
4511 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_start, 1, ENC_BIG_ENDIAN, &test_value);
4512 	if (test_value > 99)
4513 	{
4514 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block start value [0..99]");
4515 	}
4516 
4517 	// Number of resource blocks
4518 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_resource_blocks, 1, ENC_BIG_ENDIAN, &test_value);
4519 	if (!(test_value >= 1 && test_value <= 100))
4520 	{
4521 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of resource blocks value [1..100]");
4522 	}
4523 
4524 	// Modulation type
4525 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_modulation, 1, ENC_BIG_ENDIAN, &test_value);
4526 	if (!(test_value == 2 || test_value == 4 || test_value == 6))
4527 	{
4528 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid modulation type value [2, 4, 6]");
4529 	}
4530 
4531 	// Cyclic Shift 2 for DMRS
4532 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cyclic_shift_2_for_drms, 1, ENC_BIG_ENDIAN, &test_value);
4533 	if (test_value > 99)
4534 	{
4535 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cyclic shift 2 for drms value [0..7]");
4536 	}
4537 
4538 	// Frequency hopping enabled flag
4539 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_enabled_flag, 1, ENC_BIG_ENDIAN, &test_value);
4540 	if (test_value > 1)
4541 	{
4542 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping enabled flag value [0..1]");
4543 	}
4544 
4545 	// Frequency hopping bits
4546 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_bits, 1, ENC_BIG_ENDIAN, &test_value);
4547 	if (test_value > 3)
4548 	{
4549 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping bits value [0..3]");
4550 	}
4551 
4552 	// New data indication
4553 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indication, 1, ENC_BIG_ENDIAN, &test_value);
4554 	if (test_value > 1)
4555 	{
4556 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indicator value [0..1]");
4557 	}
4558 
4559 	// Redundancy version
4560 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version, 1, ENC_BIG_ENDIAN, &test_value);
4561 	if (test_value > 3)
4562 	{
4563 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy version value [0..3]");
4564 	}
4565 
4566 	// HARQ process number
4567 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_process_number, 1, ENC_BIG_ENDIAN, &test_value);
4568 	if (test_value > 15)
4569 	{
4570 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq process number value [0..15]");
4571 	}
4572 
4573 	// UL Tx mode
4574 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_tx_mode, 1, ENC_BIG_ENDIAN, &test_value);
4575 	if (test_value > 1)
4576 	{
4577 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul tx mode value [0..1]");
4578 	}
4579 
4580 	// Current TX NB
4581 	ptvcursor_add(ptvc, hf_nfapi_current_tx_nb, 1, ENC_BIG_ENDIAN);
4582 
4583 	// N srs
4584 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_srs, 1, ENC_BIG_ENDIAN, &test_value);
4585 	if (test_value > 1)
4586 	{
4587 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n_srs value [0..1]");
4588 	}
4589 }
dissect_ul_config_ulsch_pdu_rel10_value(ptvcursor_t * ptvc,packet_info * pinfo)4590 static void dissect_ul_config_ulsch_pdu_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
4591 {
4592 	proto_item* item;
4593 	guint32 test_value;
4594 
4595 	// Resource allocation type
4596 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN, &test_value);
4597 	if (test_value > 1)
4598 	{
4599 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocation type value [0..1]");
4600 	}
4601 
4602 	// Resource block coding
4603 	ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
4604 
4605 	// Transport blocks
4606 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transport_blocks, 1, ENC_BIG_ENDIAN, &test_value);
4607 	if (!(test_value >= 1 && test_value <= 2))
4608 	{
4609 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport blocks value [1..2]");
4610 	}
4611 
4612 	// Transmission scheme
4613 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_transmission_scheme, 1, ENC_BIG_ENDIAN, &test_value);
4614 	if (test_value > 1)
4615 	{
4616 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission scheme value [0..1]");
4617 	}
4618 
4619 	// Number Of layers
4620 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_layers, 1, ENC_BIG_ENDIAN, &test_value);
4621 	if (!(test_value >= 1 && test_value <=4 ))
4622 	{
4623 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of layers value [1..4]");
4624 	}
4625 
4626 	// Codebook Index
4627 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_codebook_index, 1, ENC_BIG_ENDIAN, &test_value);
4628 	if (test_value > 23)
4629 	{
4630 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid codebook Index value [0..23]");
4631 	}
4632 
4633 	// Disable sequence hopping flag
4634 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_disable_sequence_hopping_flag, 1, ENC_BIG_ENDIAN, &test_value);
4635 	if (test_value > 1)
4636 	{
4637 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid disable sequence hopping flag value [0..1]");
4638 	}
4639 }
dissect_ul_config_ulsch_pdu_rel11_value(ptvcursor_t * ptvc,packet_info * pinfo)4640 static void dissect_ul_config_ulsch_pdu_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
4641 {
4642 	proto_item* item;
4643 	guint32 test_value;
4644 
4645 	// Virtual cell ID enabled flag
4646 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_virtual_cell_id_enabled_flag, 1, ENC_BIG_ENDIAN, &test_value);
4647 	if (test_value > 1)
4648 	{
4649 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid virtual cell id enabled flag value [0..1]");
4650 	}
4651 
4652 	// nPUSCH Identity
4653 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_npusch_identity, 2, ENC_BIG_ENDIAN, &test_value);
4654 	if (test_value > 509)
4655 	{
4656 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npusch identity value [0..509]");
4657 	}
4658 
4659 	// DMRS Config flag
4660 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_config_flag, 1, ENC_BIG_ENDIAN, &test_value);
4661 	if (test_value > 1)
4662 	{
4663 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms config flag value [0..1]");
4664 	}
4665 
4666 	// nDMRS-CSH Identity
4667 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ndrms_csh_identity, 2, ENC_BIG_ENDIAN, &test_value);
4668 	if (test_value > 509)
4669 	{
4670 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ndrms-csh identity value [0..509]");
4671 	}
4672 
4673 }
dissect_ul_config_ulsch_pdu_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)4674 static void dissect_ul_config_ulsch_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4675 {
4676 	proto_item* item;
4677 	guint32 test_value;
4678 
4679 	// UE Type
4680 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_type, 1, ENC_BIG_ENDIAN, &test_value);
4681 	if (test_value > 2)
4682 	{
4683 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue type value [0..2]");
4684 	}
4685 
4686 	// Total Number of repetitions
4687 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_total_number_of_repetitions, 2, ENC_BIG_ENDIAN, &test_value);
4688 	if (!(test_value >= 1 && test_value <= 2048))
4689 	{
4690 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid total number of repetitions value [1..2048]");
4691 	}
4692 
4693 	// Repetition Number
4694 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_repetition_number, 2, ENC_BIG_ENDIAN, &test_value);
4695 	if (!(test_value >= 1 && test_value <= 2048))
4696 	{
4697 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid repetition number value [1..2048]");
4698 	}
4699 
4700 	// Initial transmission SF (io)
4701 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_sf_io, 2, ENC_BIG_ENDIAN, &test_value);
4702 	if (!(test_value <= 10239 || test_value == 0xFFFF))
4703 	{
4704 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid repetition number value [0..10239, 0xFFFF]");
4705 	}
4706 
4707 	// Empty symbols due to re-tunning
4708 	// todo : decode as a bitmap
4709 	ptvcursor_add(ptvc, hf_nfapi_empty_symbols_due_to_retunning, 1, ENC_BIG_ENDIAN);
4710 }
dissect_ul_config_init_tx_params_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)4711 static void dissect_ul_config_init_tx_params_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
4712 {
4713 	proto_item* item;
4714 	guint32 test_value;
4715 
4716 	// N srs initial
4717 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_srs_initial, 1, ENC_BIG_ENDIAN, &test_value);
4718 	if (test_value > 1)
4719 	{
4720 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n srs initial value [0..1]");
4721 	}
4722 
4723 	// Initial number of resource blocks
4724 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_number_of_resource_blocks, 1, ENC_BIG_ENDIAN, &test_value);
4725 	if (!(test_value >= 1 && test_value <= 100))
4726 	{
4727 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial number of resource blocks value [1..100]");
4728 	}
4729 
4730 }
dissect_ul_config_cqi_ri_info_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)4731 static void dissect_ul_config_cqi_ri_info_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
4732 {
4733 	proto_item* item;
4734 	guint32 test_value;
4735 
4736 	// DL CQI/PMI Size Rank = 1
4737 	ptvcursor_add(ptvc, hf_nfapi_dl_cqi_pmi_size_rank_1, 1, ENC_BIG_ENDIAN);
4738 
4739 	// DL CQI/PMI Size Rank>1
4740 	ptvcursor_add(ptvc, hf_nfapi_dl_cqi_pmi_size_rank_greater_1, 1, ENC_BIG_ENDIAN);
4741 
4742 	// RI Size
4743 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ri_size, 1, ENC_BIG_ENDIAN, &test_value);
4744 	if (test_value > 3)
4745 	{
4746 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ri size value [0..3]");
4747 	}
4748 
4749 	// Delta Offset CQI
4750 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_cqi, 1, ENC_BIG_ENDIAN, &test_value);
4751 	if (test_value > 15)
4752 	{
4753 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset cqi value [0..15]");
4754 	}
4755 
4756 	// Delta Offset RI
4757 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_ri, 1, ENC_BIG_ENDIAN, &test_value);
4758 	if (test_value > 15)
4759 	{
4760 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset ri value [0..15]");
4761 	}
4762 
4763 }
dissect_ul_config_cqi_ri_info_rel9_later_value(ptvcursor_t * ptvc,packet_info * pinfo)4764 static void dissect_ul_config_cqi_ri_info_rel9_later_value(ptvcursor_t * ptvc, packet_info* pinfo)
4765 {
4766 	proto_item* item;
4767 	guint32 test_value;
4768 	gboolean type, test_boolean;
4769 
4770 	// Report type
4771 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_report_type, 1, ENC_BIG_ENDIAN, &type);
4772 	if (type > 1)
4773 	{
4774 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid report type value [0..1]");
4775 	}
4776 
4777 	// Delta offset CQI
4778 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_cqi, 1, ENC_BIG_ENDIAN, &test_value);
4779 	if (test_value > 15)
4780 	{
4781 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset cqi value [0..15]");
4782 	}
4783 
4784 	// Delta offset RI
4785 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_ri, 1, ENC_BIG_ENDIAN, &test_value);
4786 	if (test_value > 15)
4787 	{
4788 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset ri value [0..15]");
4789 	}
4790 
4791 	switch (type)
4792 	{
4793 		case 0:
4794 		{
4795 			// DL CQI/PMI/RI size
4796 			ptvcursor_add(ptvc, hf_nfapi_dl_cqi_ri_pmi_size, 1, ENC_BIG_ENDIAN);
4797 
4798 			// Control Type
4799 			ptvcursor_add_ret_boolean(ptvc, hf_nfapi_control_type, 1, ENC_BIG_ENDIAN, &test_boolean);
4800 			if (test_boolean > 1)
4801 			{
4802 				expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid control type value [0..1]");
4803 			}
4804 			break;
4805 		}
4806 		case 1:
4807 		{
4808 			// todo : encoder not right for this case.
4809 			ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_cc, 1, ENC_BIG_ENDIAN, &test_value);
4810 
4811 			if (!(test_value >= 1 && test_value <= 32))
4812 			{
4813 				expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of cc value [1..32]");
4814 			}
4815 
4816 			/*
4817 			ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "CCs");
4818 
4819 			for (int i = 0; i < num_cc; ++i)
4820 			{
4821 				ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "[%d]", i);
4822 
4823 				guint8 ri_size = tvb_get_guint8(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
4824 				ptvcursor_add(ptvc, hf_nfapi_ri_size, 1, ENC_BIG_ENDIAN);
4825 
4826 				ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "Rank");
4827 
4828 				for (int j = 0; j < ri_size; ++j)
4829 				{
4830 					ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "[%d]", j);
4831 					ptvcursor_add(ptvc, hf_nfapi_dl_cqi_pmi_size, 1, ENC_BIG_ENDIAN);
4832 					ptvcursor_pop_subtree(ptvc);
4833 				}
4834 
4835 				ptvcursor_pop_subtree(ptvc);
4836 
4837 				ptvcursor_pop_subtree(ptvc);
4838 			}
4839 
4840 			ptvcursor_pop_subtree(ptvc);
4841 			*/
4842 
4843 			break;
4844 		}
4845 	}
4846 }
dissect_ul_config_cqi_ri_info_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)4847 static void dissect_ul_config_cqi_ri_info_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4848 {
4849 	guint32 test_value;
4850 
4851 	// DL CQI/PMI/RI size 2
4852 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_cqi_ri_pmi_size_2, 2, ENC_BIG_ENDIAN, &test_value);
4853 	if (test_value < 255)
4854 	{
4855 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dl cqi ri pmi size 2 value [>= 255]");
4856 	}
4857 }
dissect_ul_config_harq_info_ulsch_rel10_value(ptvcursor_t * ptvc,packet_info * pinfo)4858 static void dissect_ul_config_harq_info_ulsch_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
4859 {
4860 	proto_item* item;
4861 	guint32 test_value;
4862 
4863 	// HARQ Size
4864 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_size, 1, ENC_BIG_ENDIAN, &test_value);
4865 	if (test_value > 21)
4866 	{
4867 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq size value [0..21]");
4868 	}
4869 
4870 	// Delta Offset HARQ
4871 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_harq, 1, ENC_BIG_ENDIAN, &test_value);
4872 	if (test_value > 15)
4873 	{
4874 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset harq value [0..15]");
4875 	}
4876 
4877 	// ACK_NACK mode
4878 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tdd_ack_nack_mode, 1, ENC_BIG_ENDIAN, &test_value);
4879 	if (test_value > 5)
4880 	{
4881 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ack nack mode value [0..5]");
4882 	}
4883 }
dissect_ul_config_harq_info_ulsch_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)4884 static void dissect_ul_config_harq_info_ulsch_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4885 {
4886 	proto_item* item;
4887 	guint32 test_value;
4888 
4889 	// HARQ Size 2
4890 	ptvcursor_add(ptvc, hf_nfapi_harq_size_2, 2, ENC_BIG_ENDIAN);
4891 
4892 	// Delta Offset HARQ 2
4893 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_harq_2, 1, ENC_BIG_ENDIAN, &test_value);
4894 	if (test_value > 15)
4895 	{
4896 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset harq 2 value [0..15]");
4897 	}
4898 }
dissect_ul_config_ue_info_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)4899 static void dissect_ul_config_ue_info_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
4900 {
4901 	proto_item* item;
4902 	guint32 test_value;
4903 
4904 	// Handle
4905 	ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
4906 
4907 	// RNTI
4908 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
4909 	if (test_value < 1)
4910 	{
4911 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
4912 	}
4913 }
dissect_ul_config_ue_info_rel11_value(ptvcursor_t * ptvc,packet_info * pinfo)4914 static void dissect_ul_config_ue_info_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
4915 {
4916 	proto_item* item;
4917 	guint32 test_value;
4918 
4919 	// Virtual cell ID enabled flag
4920 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_virtual_cell_id_enabled_flag, 1, ENC_BIG_ENDIAN, &test_value);
4921 	if (test_value > 1)
4922 	{
4923 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid virtual cell id enabled flag value [0..1]");
4924 	}
4925 
4926 	// nPUCCH Identity
4927 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_npucch_identity, 2, ENC_BIG_ENDIAN, &test_value);
4928 	if (test_value > 503)
4929 	{
4930 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch identity value [0..503]");
4931 	}
4932 
4933 }
dissect_ul_config_ue_info_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)4934 static void dissect_ul_config_ue_info_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4935 {
4936 	proto_item* item;
4937 	guint32 test_value;
4938 
4939 	// UE Type
4940 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_type, 1, ENC_BIG_ENDIAN, &test_value);
4941 	if (test_value > 2)
4942 	{
4943 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue type value [0..2]");
4944 	}
4945 
4946 	// Empty symbols
4947 	// todo : use bit map decoding
4948 	ptvcursor_add(ptvc, hf_nfapi_empty_symbols, 1, ENC_BIG_ENDIAN);
4949 
4950 	// Total Number of repetitions
4951 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_total_number_of_repetitions, 2, ENC_BIG_ENDIAN, &test_value);
4952 	if (!(test_value >= 1 && test_value <= 32))
4953 	{
4954 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid total number of repetitions value [1..32]");
4955 	}
4956 
4957 	// Repetition Number
4958 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_repetition_number, 2, ENC_BIG_ENDIAN, &test_value);
4959 	if (!(test_value >= 1 && test_value <= 32))
4960 	{
4961 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid repetition number value [1..32]");
4962 	}
4963 
4964 }
dissect_ul_config_cqi_info_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)4965 static void dissect_ul_config_cqi_info_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
4966 {
4967 	proto_item* item;
4968 	guint32 test_value;
4969 
4970 	// PUCCH index
4971 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_index, 2, ENC_BIG_ENDIAN, &test_value);
4972 	if (test_value > 1184)
4973 	{
4974 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch Index value [0..1184]");
4975 	}
4976 
4977 	// DL CQI/PMI Size
4978 	ptvcursor_add(ptvc, hf_nfapi_dl_cqi_pmi_size, 1, ENC_BIG_ENDIAN);
4979 }
dissect_ul_config_cqi_info_rel10_value(ptvcursor_t * ptvc,packet_info * pinfo)4980 static void dissect_ul_config_cqi_info_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
4981 {
4982 	proto_item* item;
4983 	guint32 test_value;
4984 
4985 	// Number of PUCCH Resources
4986 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_pucch_resource, 1, ENC_BIG_ENDIAN, &test_value);
4987 	if (!(test_value >= 1 && test_value <= 2))
4988 	{
4989 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pucch resources value [1..2]");
4990 	}
4991 
4992 	//PUCCH Index P1
4993 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_index_p1, 2, ENC_BIG_ENDIAN, &test_value);
4994 	if (test_value > 1184)
4995 	{
4996 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch Index p1 value [0..1184]");
4997 	}
4998 }
dissect_ul_config_cqi_info_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)4999 static void dissect_ul_config_cqi_info_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
5000 {
5001 	proto_item* item;
5002 	guint32 test_value;
5003 
5004 	// CSI_mode
5005 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_mode, 1, ENC_BIG_ENDIAN, &test_value);
5006 	if (test_value > 2)
5007 	{
5008 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi mode value [0..2]");
5009 	}
5010 
5011 	// DL CQI/PMI Size 2
5012 	ptvcursor_add(ptvc, hf_nfapi_dl_cqi_pmi_size_2, 2, ENC_BIG_ENDIAN);
5013 
5014 	// Starting PRB
5015 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_statring_prb, 1, ENC_BIG_ENDIAN, &test_value);
5016 	if (test_value > 109)
5017 	{
5018 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid starting prb value [0..109]");
5019 	}
5020 
5021 	// n_PRB
5022 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nprb, 1, ENC_BIG_ENDIAN, &test_value);
5023 	if (test_value > 7)
5024 	{
5025 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n prb value [0..7]");
5026 	}
5027 
5028 	// cdm_Index
5029 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cdm_index, 1, ENC_BIG_ENDIAN, &test_value);
5030 	if (test_value > 1)
5031 	{
5032 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cdm Index value [0..1]");
5033 	}
5034 
5035 	// N srs
5036 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nsrs, 1, ENC_BIG_ENDIAN, &test_value);
5037 	if (test_value > 1)
5038 	{
5039 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n srs value [0..1]");
5040 	}
5041 
5042 }
dissect_ul_config_sr_info_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)5043 static void dissect_ul_config_sr_info_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
5044 {
5045 	guint32 test_value;
5046 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_index, 1, ENC_BIG_ENDIAN, &test_value);
5047 	if (test_value > 2047)
5048 	{
5049 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch Index value [0..2047]");
5050 	}
5051 }
dissect_ul_config_sr_info_rel10_value(ptvcursor_t * ptvc,packet_info * pinfo)5052 static void dissect_ul_config_sr_info_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
5053 {
5054 	proto_item* item;
5055 	guint32 test_value;
5056 
5057 	// Number of PUCCH Resources
5058 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_pucch_resource, 1, ENC_BIG_ENDIAN, &test_value);
5059 	if (!(test_value >= 1 && test_value <= 2))
5060 	{
5061 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pucch resources value [1..2]");
5062 	}
5063 
5064 	// PUCCH Index P1
5065 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_index_p1, 2, ENC_BIG_ENDIAN, &test_value);
5066 	if (test_value > 2047)
5067 	{
5068 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch Index p1 value [0..2047]");
5069 	}
5070 }
dissect_ul_config_harq_info_uci_rel10_tdd_value(ptvcursor_t * ptvc,packet_info * pinfo)5071 static void dissect_ul_config_harq_info_uci_rel10_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
5072 {
5073 	proto_item* item;
5074 	guint32 test_value, ack_nack_mode_value;
5075 
5076 	// HARQ size
5077 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_size, 1, ENC_BIG_ENDIAN, &test_value);
5078 	if (test_value > 21)
5079 	{
5080 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq size value [0..21]");
5081 	}
5082 
5083 	// ACK_NACK mode
5084 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tdd_ack_nack_mode, 1, ENC_BIG_ENDIAN, &ack_nack_mode_value);
5085 	if (ack_nack_mode_value > 5)
5086 	{
5087 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ack nack mode value [0..5]");
5088 	}
5089 
5090 	// Number of PUCCH resources
5091 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_pucch_resource, 1, ENC_BIG_ENDIAN, &test_value);
5092 	if (test_value > 4)
5093 	{
5094 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pucch resources value [0..4]");
5095 	}
5096 
5097 	// n_PUCCH_1_0
5098 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_0, 2, ENC_BIG_ENDIAN, &test_value);
5099 	if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1 || ack_nack_mode_value == 2)
5100 	{
5101 		if (test_value > 2047)
5102 		{
5103 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 0 value [0..2047] (All Format 1a/1b)");
5104 		}
5105 	}
5106 	else if (ack_nack_mode_value == 3)
5107 	{
5108 		if (test_value > 549)
5109 		{
5110 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 0 value [0..549] (Format 3)");
5111 		}
5112 	}
5113 
5114 	// n_PUCCH_1_1
5115 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_1, 2, ENC_BIG_ENDIAN, &test_value);
5116 	if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1 || ack_nack_mode_value == 2)
5117 	{
5118 		if (test_value > 2047)
5119 		{
5120 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 1 value [0..2047] (All Format 1a/1b)");
5121 		}
5122 	}
5123 
5124 	// n_PUCCH_1_2
5125 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_2, 2, ENC_BIG_ENDIAN, &test_value);
5126 	if (ack_nack_mode_value == 2)
5127 	{
5128 		if (test_value > 2047)
5129 		{
5130 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 2 value [0..2047] (All Format 1a/1b)");
5131 		}
5132 	}
5133 
5134 	// n_PUCCH_1_3
5135 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_3, 2, ENC_BIG_ENDIAN, &test_value);
5136 	if (ack_nack_mode_value == 2)
5137 	{
5138 		if (test_value > 2047)
5139 		{
5140 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 3 value [0..2047] (All Format 1a/1b)");
5141 		}
5142 	}
5143 }
dissect_ul_config_harq_info_uci_rel8_fdd_value(ptvcursor_t * ptvc,packet_info * pinfo)5144 static void dissect_ul_config_harq_info_uci_rel8_fdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
5145 {
5146 	proto_item* item;
5147 	guint32 test_value;
5148 
5149 	// n_PUCCH_1_0
5150 	// todo : how to work out the ack_nack mode?
5151 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_0, 2, ENC_BIG_ENDIAN, &test_value);
5152 	if (test_value > 2047)
5153 	{
5154 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 0 value [0..2047]");
5155 	}
5156 
5157 	// HARQ Size
5158 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_size, 1, ENC_BIG_ENDIAN, &test_value);
5159 	if (!(test_value >= 1 && test_value <= 2))
5160 	{
5161 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq size value [1..2]");
5162 	}
5163 }
dissect_ul_config_harq_info_uci_rel9_later_fdd_value(ptvcursor_t * ptvc,packet_info * pinfo)5164 static void dissect_ul_config_harq_info_uci_rel9_later_fdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
5165 {
5166 	proto_item *item, *harq_size_item;
5167 	guint32 test_value, harq_size_value, ack_nack_mode_value;
5168 
5169 	// HARQ Size
5170 	harq_size_item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_size, 1, ENC_BIG_ENDIAN, &harq_size_value);
5171 
5172 	// ACK_NAK mode
5173 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_fdd_ack_nack_mode, 1, ENC_BIG_ENDIAN, &ack_nack_mode_value);
5174 	if (ack_nack_mode_value > 4)
5175 	{
5176 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ack nack mode value [0..4]");
5177 	}
5178 
5179 	if (ack_nack_mode_value == 0 || ack_nack_mode_value == 2)
5180 	{
5181 		if (!(harq_size_value >= 1 && harq_size_value <= 10))
5182 		{
5183 			expert_add_info_format(pinfo, harq_size_item, &ei_invalid_range, "Invalid harq size value [1..10] (Format 1a/1b/3)");
5184 		}
5185 	}
5186 	else if (ack_nack_mode_value == 3 || ack_nack_mode_value == 4)
5187 	{
5188 		if (harq_size_value != 0)
5189 		{
5190 			expert_add_info_format(pinfo, harq_size_item, &ei_invalid_range, "Invalid harq size value [0] (Format 4/5)");
5191 		}
5192 	}
5193 
5194 	// Number of PUCCH Resources
5195 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_pucch_resource, 1, ENC_BIG_ENDIAN, &test_value);
5196 	if (test_value == 0 || test_value == 2)
5197 	{
5198 		if (!(harq_size_value >= 1 && harq_size_value <= 4))
5199 		{
5200 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq size value [1..4] (Format 1a/1b/3)");
5201 		}
5202 	}
5203 	else if (test_value == 3 || test_value == 4)
5204 	{
5205 		if (harq_size_value != 0)
5206 		{
5207 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq size value [0] (Format 4/5)");
5208 		}
5209 	}
5210 
5211 	// n_PUCCH_1_0
5212 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_0, 2, ENC_BIG_ENDIAN, &test_value);
5213 	if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1)
5214 	{
5215 		if (test_value > 2047)
5216 		{
5217 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 1 0 value [0..2047] (Format 1a/1b/channel selection)");
5218 		}
5219 	}
5220 	else if (ack_nack_mode_value == 2)
5221 	{
5222 		if (test_value > 549)
5223 		{
5224 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 1 0 value [0..549] (Format 3)");
5225 		}
5226 	}
5227 
5228 	// n_PUCCH_1_1
5229 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_1, 2, ENC_BIG_ENDIAN, &test_value);
5230 	if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1)
5231 	{
5232 		if (test_value > 2047)
5233 		{
5234 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 1 1 value [0..2047] (Format 1a/1b/channel selection)");
5235 		}
5236 	}
5237 
5238 	// n_PUCCH_1_2
5239 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_2, 2, ENC_BIG_ENDIAN, &test_value);
5240 	if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1)
5241 	{
5242 		if (test_value > 2047)
5243 		{
5244 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 1 2 value [0..2047] (Format 1a/1b/channel selection)");
5245 		}
5246 	}
5247 
5248 	// n_PUCCH_1_3
5249 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_3, 2, ENC_BIG_ENDIAN, &test_value);
5250 	if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1)
5251 	{
5252 		if (test_value > 2047)
5253 		{
5254 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 1 3 value [0..2047] (Format 1a/1b/channel selection)");
5255 		}
5256 	}
5257 }
dissect_ul_config_harq_info_uci_rel11_fdd_tdd_value(ptvcursor_t * ptvc,packet_info * pinfo)5258 static void dissect_ul_config_harq_info_uci_rel11_fdd_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
5259 {
5260 	proto_item* item;
5261 	guint32 test_value;
5262 
5263 	// Num_ant_ports
5264 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_num_ant_ports, 1, ENC_BIG_ENDIAN, &test_value);
5265 	if (!(test_value >= 1 && test_value <= 2))
5266 	{
5267 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid num ant ports value [1..2]");
5268 	}
5269 
5270 	// n_PUCCH_2_0
5271 	// todo : how to work out the ack nack mode
5272 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_2_0, 2, ENC_BIG_ENDIAN, &test_value);
5273 	if (test_value > 2047)
5274 	{
5275 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 2 0 value [0..2047]");
5276 	}
5277 
5278 	// n_PUCCH_2_1
5279 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_2_1, 2, ENC_BIG_ENDIAN, &test_value);
5280 	if (test_value > 2047)
5281 	{
5282 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 2 1 value [0..2047]");
5283 	}
5284 
5285 	// n_PUCCH_2_2
5286 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_2_2, 2, ENC_BIG_ENDIAN, &test_value);
5287 	if (test_value > 2047)
5288 	{
5289 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 2 2 value [0..2047]");
5290 	}
5291 
5292 	// n_PUCCH_2_3
5293 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_2_3, 2, ENC_BIG_ENDIAN, &test_value);
5294 	if (test_value > 2047)
5295 	{
5296 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 2 3 value [0..2047]");
5297 	}
5298 
5299 }
dissect_ul_config_harq_info_uci_rel13_fdd_tdd_value(ptvcursor_t * ptvc,packet_info * pinfo)5300 static void dissect_ul_config_harq_info_uci_rel13_fdd_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
5301 {
5302 	proto_item* item;
5303 	guint32 test_value;
5304 
5305 	// HARQ Size 2
5306 	ptvcursor_add(ptvc, hf_nfapi_harq_size_2, 2, ENC_BIG_ENDIAN);
5307 
5308 	// Starting PRB
5309 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_starting_prb, 1, ENC_BIG_ENDIAN, &test_value);
5310 	if (test_value > 109)
5311 	{
5312 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid starting prb value [0..109]");
5313 	}
5314 
5315 	// n_PRB
5316 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nprb, 1, ENC_BIG_ENDIAN, &test_value);
5317 	if (test_value > 109)
5318 	{
5319 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n prb value [0..7]");
5320 	}
5321 
5322 	// cdm_Index
5323 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cdm_index, 1, ENC_BIG_ENDIAN, &test_value);
5324 	if (test_value > 1)
5325 	{
5326 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cdm Index value [0..1]");
5327 	}
5328 
5329 	// N srs
5330 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nsrs, 1, ENC_BIG_ENDIAN, &test_value);
5331 	if (test_value > 1)
5332 	{
5333 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n srs value [0..1]");
5334 	}
5335 }
dissect_ul_config_srs_info_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)5336 static void dissect_ul_config_srs_info_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
5337 {
5338 	proto_item* item;
5339 	guint32 test_value;
5340 
5341 	// Handle
5342 	ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
5343 
5344 	// Size
5345 	ptvcursor_add(ptvc, hf_nfapi_size, 2, ENC_BIG_ENDIAN);
5346 
5347 	// RNTI
5348 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
5349 	if (test_value < 1)
5350 	{
5351 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
5352 	}
5353 
5354 	// SRS Bandwidth
5355 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_srs_bandwidth, 1, ENC_BIG_ENDIAN, &test_value);
5356 	if (test_value > 3)
5357 	{
5358 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs bandwidth value [0..3]");
5359 	}
5360 
5361 	// Frequency Domain Position
5362 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_domain_position, 1, ENC_BIG_ENDIAN, &test_value);
5363 	if (test_value > 23)
5364 	{
5365 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency domain bandwidth value [0..23]");
5366 	}
5367 
5368 	// SRS Hopping Bandwidth
5369 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_srs_hopping_bandwidth, 1, ENC_BIG_ENDIAN, &test_value);
5370 	if (test_value > 3)
5371 	{
5372 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs hopping bandwidth value [0..3]");
5373 	}
5374 
5375 	// Transmission Comb
5376 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_comb, 1, ENC_BIG_ENDIAN, &test_value);
5377 	if (test_value > 3)
5378 	{
5379 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission comb value [0..3]");
5380 	}
5381 
5382 	// ISRS / SRS-ConfigIndex
5383 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_i_srs, 2, ENC_BIG_ENDIAN, &test_value);
5384 	if (test_value > 1023)
5385 	{
5386 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid isrs/srs-configindex value [0..1023]");
5387 	}
5388 
5389 	// Sounding Reference Cyclic Shift
5390 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_sounding_reference_cyclic_shift, 1, ENC_BIG_ENDIAN, &test_value);
5391 	if (test_value > 11)
5392 	{
5393 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid sounding reference cyclic shift value [0..11]");
5394 	}
5395 }
dissect_ul_config_srs_info_rel10_value(ptvcursor_t * ptvc,packet_info * pinfo)5396 static void dissect_ul_config_srs_info_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
5397 {
5398 	guint32 test_value;
5399 
5400 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_antenna_port, 1, ENC_BIG_ENDIAN, &test_value);
5401 	if (test_value > 2)
5402 	{
5403 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid antenna port value [0..2]");
5404 	}
5405 }
dissect_ul_config_srs_info_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)5406 static void dissect_ul_config_srs_info_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
5407 {
5408 	guint32 test_value;
5409 
5410 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_combs, 1, ENC_BIG_ENDIAN, &test_value);
5411 	if (test_value > 1)
5412 	{
5413 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of combs value [0..1]");
5414 	}
5415 }
dissect_hi_dci0_pdu(ptvcursor_t * ptvc,packet_info * pinfo)5416 static void dissect_hi_dci0_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
5417 {
5418 	guint32 test_value, size;
5419 
5420 	// PDU Type
5421 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_hi_dci0_pdu_type, 1, ENC_BIG_ENDIAN, &test_value);
5422 	if (test_value > 3)
5423 	{
5424 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdu type value [0..3]");
5425 	}
5426 
5427 	// PDU Size
5428 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_size, 1, ENC_BIG_ENDIAN, &size);
5429 
5430 	guint pdu_end = (ptvcursor_current_offset(ptvc) + size - 2);
5431 	dissect_tlv_list(ptvc, pinfo, pdu_end);
5432 }
dissect_hi_dci0_request_body_value(ptvcursor_t * ptvc,packet_info * pinfo)5433 static void dissect_hi_dci0_request_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
5434 {
5435 	guint32 test_value, num_pdu;
5436 
5437 	// SFN/SF
5438 	ptvcursor_add(ptvc, hf_nfapi_sfn_sf, 2, ENC_BIG_ENDIAN);
5439 
5440 	// Number of DCI
5441 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_dci_pdus, 1, ENC_BIG_ENDIAN, &num_pdu);
5442 
5443 	// Number of HI
5444 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_hi_pdus, 1, ENC_BIG_ENDIAN, &test_value);
5445 	num_pdu += test_value;
5446 
5447 	dissect_array_value(ptvc, pinfo, "HI DCI0 PDU List", ett_nfapi_hi_dci0_request_pdu_list, num_pdu, dissect_hi_dci0_pdu);
5448 }
dissect_hi_dci0_hi_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)5449 static void dissect_hi_dci0_hi_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
5450 {
5451 	proto_item* item;
5452 	guint32 test_value;
5453 	gboolean test_boolean;
5454 
5455 	// Resource block start
5456 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_start, 1, ENC_BIG_ENDIAN, &test_value);
5457 	if (test_value > 100)
5458 	{
5459 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block start value [0..100]");
5460 	}
5461 
5462 	// Cyclic Shift 2 for DMRS
5463 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cyclic_shift_2_for_drms, 1, ENC_BIG_ENDIAN, &test_value);
5464 	if (test_value > 7)
5465 	{
5466 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cyclic shift 2 for drms value [0..7]");
5467 	}
5468 
5469 	// HI value
5470 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_hi_value, 1, ENC_BIG_ENDIAN, &test_boolean);
5471 	if (test_boolean > 1)
5472 	{
5473 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid hi value [0..1]");
5474 	}
5475 
5476 	// I_PHICH
5477 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_i_phich, 1, ENC_BIG_ENDIAN, &test_value);
5478 	if (test_value > 1)
5479 	{
5480 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid i phich value [0..1]");
5481 	}
5482 
5483 	// Transmission power
5484 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
5485 	if (test_value > 10000)
5486 	{
5487 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
5488 	}
5489 
5490 }
dissect_hi_dci0_hi_rel10_value(ptvcursor_t * ptvc,packet_info * pinfo)5491 static void dissect_hi_dci0_hi_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
5492 {
5493 	proto_item* item;
5494 	gboolean test_boolean;
5495 
5496 	// Flag TB2
5497 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_flag_tb2, 1, ENC_BIG_ENDIAN, &test_boolean);
5498 	if (test_boolean > 1)
5499 	{
5500 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid flag tb2 value [0..1]");
5501 	}
5502 
5503 	// HI Value 2
5504 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_hi_value_2, 1, ENC_BIG_ENDIAN, &test_boolean);
5505 	if (test_boolean > 1)
5506 	{
5507 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid hi2 value [0..1]");
5508 	}
5509 
5510 }
dissect_hi_dci0_dci_ul_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)5511 static void dissect_hi_dci0_dci_ul_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
5512 {
5513 	proto_item* item;
5514 	guint32 test_value;
5515 
5516 	// DCI format
5517 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_dci_format, 1, ENC_BIG_ENDIAN, &test_value);
5518 	if (test_value > 4)
5519 	{
5520 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci format value [0..4]");
5521 	}
5522 
5523 	// CCE index
5524 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cce_idx, 1, ENC_BIG_ENDIAN, &test_value);
5525 	if (test_value > 88)
5526 	{
5527 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cce Index value [0..88]");
5528 	}
5529 
5530 	// Aggregation level
5531 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_aggregation_level, 1, ENC_BIG_ENDIAN, &test_value);
5532 	if (!(test_value == 1 || test_value == 2 || test_value == 4 ||
5533 		  test_value == 8))
5534 	{
5535 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid aggregation level value [1, 2, 4, 8]");
5536 	}
5537 
5538 	// RNTI
5539 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
5540 	if (test_value < 1)
5541 	{
5542 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
5543 	}
5544 
5545 	// Resource block start
5546 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_start, 1, ENC_BIG_ENDIAN, &test_value);
5547 	if (test_value > 100)
5548 	{
5549 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block start value [0..100]");
5550 	}
5551 
5552 	// Number of resource blocks
5553 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_resource_blocks, 1, ENC_BIG_ENDIAN, &test_value);
5554 	if (test_value > 100)
5555 	{
5556 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of resource blocks value [0..100]");
5557 	}
5558 
5559 	// MCS_1
5560 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs_1, 1, ENC_BIG_ENDIAN, &test_value);
5561 	if (test_value > 31)
5562 	{
5563 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs 1 value [0..31]");
5564 	}
5565 
5566 	// Cyclic Shift 2 for DMRS
5567 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cyclic_shift_2_for_drms, 1, ENC_BIG_ENDIAN, &test_value);
5568 	if (test_value > 7)
5569 	{
5570 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cyclic shift 2 for drms value [0..7]");
5571 	}
5572 
5573 	// Frequency hopping enabled flag
5574 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_enabled_flag, 1, ENC_BIG_ENDIAN, &test_value);
5575 	if (test_value > 1)
5576 	{
5577 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping enabled flag value [0..1]");
5578 	}
5579 
5580 	// Frequency hopping bits
5581 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_bits, 1, ENC_BIG_ENDIAN, &test_value);
5582 	if (test_value > 3)
5583 	{
5584 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping bits value [0..3]");
5585 	}
5586 
5587 	// New Data indication_1
5588 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indication, 1, ENC_BIG_ENDIAN, &test_value);
5589 	if (test_value > 1)
5590 	{
5591 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indication value [0..1]");
5592 	}
5593 
5594 	// UE TX antenna selection
5595 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_tx_antenna_selection, 1, ENC_BIG_ENDIAN, &test_value);
5596 	if (test_value > 2)
5597 	{
5598 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue tx antenna selection value [0..2]");
5599 	}
5600 
5601 	// TPC
5602 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpc, 1, ENC_BIG_ENDIAN, &test_value);
5603 	if (test_value > 3)
5604 	{
5605 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpc value value [0..3]");
5606 	}
5607 
5608 	// CQI/CSI request
5609 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cqi_csi_request, 1, ENC_BIG_ENDIAN, &test_value);
5610 	if (test_value > 7)
5611 	{
5612 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cqi csi value [0..7]");
5613 	}
5614 
5615 	// UL index
5616 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_index, 1, ENC_BIG_ENDIAN, &test_value);
5617 	if (test_value > 3)
5618 	{
5619 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul Index value [0..3]");
5620 	}
5621 
5622 	// DL assignment index
5623 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_assignment_index, 1, ENC_BIG_ENDIAN, &test_value);
5624 	if (!(test_value >= 1 && test_value <= 4))
5625 	{
5626 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dl assignment Index value [1..4]");
5627 	}
5628 
5629 	// TPC bitmap
5630 	ptvcursor_add(ptvc, hf_nfapi_tpc_bitmap, 4, ENC_BIG_ENDIAN);
5631 
5632 	// Transmission power
5633 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
5634 	if (test_value > 10000)
5635 	{
5636 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
5637 	}
5638 }
5639 
dissect_hi_dci0_dci_ul_rel10_value(ptvcursor_t * ptvc,packet_info * pinfo)5640 static void dissect_hi_dci0_dci_ul_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
5641 {
5642 	proto_item* item;
5643 	guint32 test_value, number_of_antenna_ports_value;
5644 	gboolean test_boolean;
5645 
5646 	// Cross carrier scheduling flag
5647 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_cross_carrier_scheduling_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
5648 	if (test_boolean > 1)
5649 	{
5650 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cross carrier scheduling flag value [0..1]");
5651 	}
5652 
5653 	// Carrier indicator
5654 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_carrier_indicator, 1, ENC_BIG_ENDIAN, &test_value);
5655 	if (test_value > 7)
5656 	{
5657 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid carrier indicator value [0..7]");
5658 	}
5659 
5660 	// Size of CQI/CSI field
5661 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_size_of_cqi_csi_field, 1, ENC_BIG_ENDIAN, &test_value);
5662 	if (test_value > 2)
5663 	{
5664 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid size of cqi/csi field value [0..2]");
5665 	}
5666 
5667 	// SRS flag
5668 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
5669 	if (test_boolean > 1)
5670 	{
5671 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs field value [0..1]");
5672 	}
5673 
5674 	// SRS request
5675 	ptvcursor_add(ptvc, hf_nfapi_srs_request, 1, ENC_BIG_ENDIAN);
5676 
5677 	// Resource allocation flag
5678 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_flag, 1, ENC_BIG_ENDIAN, &test_value);
5679 	if (test_value > 1)
5680 	{
5681 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocation flag value [0..1]");
5682 	}
5683 
5684 	// Resource allocation type
5685 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN, &test_value);
5686 	if (test_value > 1)
5687 	{
5688 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocation type value [0..1]");
5689 	}
5690 
5691 	// Resource block coding
5692 	ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
5693 
5694 	// MCS_2
5695 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs_2, 1, ENC_BIG_ENDIAN, &test_value);
5696 	if (test_value > 31)
5697 	{
5698 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs 2 value [0..31]");
5699 	}
5700 
5701 	// New data indication_2
5702 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indication_two, 1, ENC_BIG_ENDIAN, &test_value);
5703 	if (test_value > 1)
5704 	{
5705 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indication 2 value [0..1]");
5706 	}
5707 
5708 	// Number of antenna ports
5709 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_antenna_ports, 1, ENC_BIG_ENDIAN, &number_of_antenna_ports_value);
5710 	if (number_of_antenna_ports_value > 2)
5711 	{
5712 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of antenna ports value [0..2]");
5713 	}
5714 
5715 	// TPMI
5716 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpmi, 1, ENC_BIG_ENDIAN, &test_value);
5717 	if (number_of_antenna_ports_value == 2)
5718 	{
5719 		if (test_value > 7)
5720 		{
5721 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi value [0..7]");
5722 		}
5723 	}
5724 	else if (number_of_antenna_ports_value == 4)
5725 	{
5726 		if (test_value > 63)
5727 		{
5728 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi value [0..63]");
5729 		}
5730 	}
5731 
5732 	// Total DCI length including padding
5733 	ptvcursor_add(ptvc, hf_nfapi_total_dci_length_including_padding, 1, ENC_BIG_ENDIAN);
5734 
5735 	// N_UL_RB
5736 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_ul_rb, 1, ENC_BIG_ENDIAN, &test_value);
5737 	if (!(test_value == 6 || test_value == 15 || test_value == 25 || test_value == 50 ||
5738 		test_value == 75 || test_value == 100))
5739 	{
5740 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n ul rb value [6, 15, 25, 50, 75, 100]");
5741 	}
5742 }
dissect_hi_dci0_dci_ul_rel12_value(ptvcursor_t * ptvc,packet_info * pinfo)5743 static void dissect_hi_dci0_dci_ul_rel12_value(ptvcursor_t * ptvc, packet_info* pinfo)
5744 {
5745 	proto_item* item;
5746 	guint32 test_value;
5747 
5748 	// PSCCH Resource
5749 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pscch_resource, 1, ENC_BIG_ENDIAN, &test_value);
5750 	if (test_value > 0x3F)
5751 	{
5752 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pscch resource value [0..0x3F]");
5753 	}
5754 
5755 	// Time resource pattern
5756 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_time_resource_pattern, 1, ENC_BIG_ENDIAN, &test_value);
5757 	if (test_value > 0x7F)
5758 	{
5759 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid time resource pattern value [0..0x7F]");
5760 	}
5761 
5762 }
dissect_hi_dci0_mdpcch_dci_ul_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)5763 static void dissect_hi_dci0_mdpcch_dci_ul_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
5764 {
5765 	proto_item* item;
5766 	guint32 test_value, dci_format_value, count;
5767 	gboolean test_boolean;
5768 
5769 	// MPDCCH Narrowband
5770 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_narrowband, 1, ENC_BIG_ENDIAN, &test_value);
5771 	if (test_value > 15)
5772 	{
5773 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mpdcch narrowband value [0..15]");
5774 	}
5775 
5776 	// Number of PRB pairs
5777 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_prb_pairs, 1, ENC_BIG_ENDIAN, &test_value);
5778 	if (!(test_value == 2 || test_value == 4 || test_value == 6))
5779 	{
5780 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of prb pairs value [2, 4, 6]");
5781 	}
5782 
5783 	// Resource Block Assignment
5784 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_assignment, 1, ENC_BIG_ENDIAN, &test_value);
5785 	if (test_value > 14)
5786 	{
5787 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block assignment value [0..14]");
5788 	}
5789 
5790 	// MPDCCH transmission type
5791 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_transmission_type, 1, ENC_BIG_ENDIAN, &test_value);
5792 	if (test_value > 1)
5793 	{
5794 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mpdcch transmission type value [0..1]");
5795 	}
5796 
5797 	// Start symbol
5798 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_start_symbol, 1, ENC_BIG_ENDIAN, &test_value);
5799 	if (!(test_value >= 1 && test_value <=4))
5800 	{
5801 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid start symbol value [0..1]");
5802 	}
5803 
5804 	// ECCE index
5805 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ecce_index, 1, ENC_BIG_ENDIAN, &test_value);
5806 	if (test_value > 22)
5807 	{
5808 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ecce Index value [0..22]");
5809 	}
5810 
5811 	// Aggregation level
5812 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_aggregation_level, 1, ENC_BIG_ENDIAN, &test_value);
5813 	if (!(test_value == 2 || test_value == 4 || test_value == 8 ||
5814 		test_value == 16 || test_value == 24))
5815 	{
5816 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid aggregation level value [2, 4, 8, 16, 24]");
5817 	}
5818 
5819 	// RNTI type
5820 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_rnti_type, 1, ENC_BIG_ENDIAN, &test_value);
5821 	if (!(test_value == 0 || test_value == 4))
5822 	{
5823 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti type value [0, 4]");
5824 	}
5825 
5826 	// RNTI
5827 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
5828 	if (test_value < 1)
5829 	{
5830 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
5831 	}
5832 
5833 	// CEMode
5834 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ce_mode, 1, ENC_BIG_ENDIAN, &test_value);
5835 	if (!(test_value == 1 || test_value == 2))
5836 	{
5837 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cemode value [1,2]");
5838 	}
5839 
5840 	// DMRS scrambling init
5841 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_scrambling_init, 2, ENC_BIG_ENDIAN, &test_value);
5842 	if (test_value < 503)
5843 	{
5844 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms scrambling init value [0..503]");
5845 	}
5846 
5847 	// Initial transmission SF (io)
5848 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_transmission_sf, 2, ENC_BIG_ENDIAN, &test_value);
5849 	if (!(test_value <= 10239 || test_value == 0xFFFF))
5850 	{
5851 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial transmission sf io value [0..10239, 0xFFFF]");
5852 	}
5853 
5854 	// Transmission power
5855 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
5856 	if (test_value > 10000)
5857 	{
5858 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
5859 	}
5860 
5861 	// DCI format
5862 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_ul_dci_format, 1, ENC_BIG_ENDIAN, &dci_format_value);
5863 	if (!(dci_format_value == 1 || dci_format_value == 2 || dci_format_value == 4 || dci_format_value == 5))
5864 	{
5865 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci format value [1, 2, 4, 5]");
5866 	}
5867 
5868 	// Resource block start
5869 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_start, 1, ENC_BIG_ENDIAN, &test_value);
5870 	if (test_value > 99)
5871 	{
5872 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block start value [0..99]");
5873 	}
5874 
5875 	// Number of resource blocks
5876 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_resource_blocks, 1, ENC_BIG_ENDIAN, &test_value);
5877 	if (!(test_value >= 1 && test_value <= 6))
5878 	{
5879 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of resource blocks value [1..6]");
5880 	}
5881 
5882 	// MCS
5883 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs, 1, ENC_BIG_ENDIAN, &test_value);
5884 	if (test_value > 15)
5885 	{
5886 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs value [0..15]");
5887 	}
5888 
5889 	// PUSCH repetition levels
5890 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pusch_repetition_levels, 1, ENC_BIG_ENDIAN, &test_value);
5891 	if (dci_format_value == 4)
5892 	{
5893 		if (!(test_value >= 1 && test_value <= 4))
5894 		{
5895 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pusch repetition levels value [1..4]");
5896 		}
5897 	}
5898 	else if (dci_format_value == 5)
5899 	{
5900 		if (!(test_value >= 1 && test_value <= 8))
5901 		{
5902 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pusch repetition levels value [1..8]");
5903 		}
5904 	}
5905 
5906 	// Frequency hopping flag
5907 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_flag, 1, ENC_BIG_ENDIAN, &test_value);
5908 	if (test_value > 1)
5909 	{
5910 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping flag value [0..1]");
5911 	}
5912 
5913 	// New Data indication
5914 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indication, 1, ENC_BIG_ENDIAN, &test_value);
5915 	if (test_value > 1)
5916 	{
5917 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indication value [0..1]");
5918 	}
5919 
5920 	// HARQ process
5921 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_process, 1, ENC_BIG_ENDIAN, &test_value);
5922 	if (test_value > 7)
5923 	{
5924 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq process value [0..7]");
5925 	}
5926 
5927 	// Redundancy version
5928 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version, 1, ENC_BIG_ENDIAN, &test_value);
5929 	if (test_value > 3)
5930 	{
5931 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy version value [0..3]");
5932 	}
5933 
5934 	// TPC
5935 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpc, 1, ENC_BIG_ENDIAN, &test_value);
5936 	if (test_value > 3)
5937 	{
5938 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpc value [0..3]");
5939 	}
5940 
5941 	// CSI request
5942 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_request, 1, ENC_BIG_ENDIAN, &test_value);
5943 	if (test_value > 1)
5944 	{
5945 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi request value [0..1]");
5946 	}
5947 
5948 	// UL index
5949 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_index, 1, ENC_BIG_ENDIAN, &test_value);
5950 	if (test_value > 3)
5951 	{
5952 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul Index value [0..3]");
5953 	}
5954 
5955 	// DAI presence flag
5956 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_dai_presence_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
5957 	if (test_boolean > 1)
5958 	{
5959 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dai presence value [0..1]");
5960 	}
5961 
5962 	// DL assignment index
5963 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_assignment_index, 1, ENC_BIG_ENDIAN, &test_value);
5964 	if (!(test_value >=1 && test_value <= 4))
5965 	{
5966 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dl assignment value [1, 2, 3, 4]");
5967 	}
5968 
5969 	// SRS request
5970 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_request, 1, ENC_BIG_ENDIAN, &test_boolean);
5971 	if (test_boolean > 1)
5972 	{
5973 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs request value [0..1]");
5974 	}
5975 
5976 	// DCI subframe repetition number
5977 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dci_subframe_repetition_number, 1, ENC_BIG_ENDIAN, &test_value);
5978 	if (!(test_value >= 1 && test_value <= 4))
5979 	{
5980 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci subframe repetition number value [1..4]");
5981 	}
5982 
5983 	//TPC bitmap
5984 	ptvcursor_add(ptvc, hf_nfapi_tpc_bitmap, 4, ENC_BIG_ENDIAN);
5985 
5986 	// Total DCI length including padding
5987 	ptvcursor_add(ptvc, hf_nfapi_total_dci_length_include_padding, 1, ENC_BIG_ENDIAN);
5988 
5989 	// Number of TX Antenna ports
5990 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_tx_antenna_ports, 1, ENC_BIG_ENDIAN, &count);
5991 
5992 	dissect_array_value(ptvc, pinfo, "TX Antenna Ports", ett_nfapi_tx_antenna_ports, count, dissect_precoding_value);
5993 }
dissect_rx_ue_info_value(ptvcursor_t * ptvc,packet_info * pinfo)5994 static void dissect_rx_ue_info_value(ptvcursor_t * ptvc, packet_info* pinfo)
5995 {
5996 	guint32 test_value;
5997 
5998 	// Handle
5999 	ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
6000 
6001 	// RNTI
6002 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
6003 	if (test_value < 1)
6004 	{
6005 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
6006 	}
6007 }
dissect_rx_indication_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)6008 static void dissect_rx_indication_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
6009 {
6010 	proto_item* item;
6011 	guint32 test_value;
6012 
6013 	// Length
6014 	ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
6015 
6016 	// Data offset
6017 	ptvcursor_add(ptvc, hf_nfapi_data_offset, 2, ENC_BIG_ENDIAN);
6018 
6019 	// UL_CQI
6020 	ptvcursor_add(ptvc, hf_nfapi_ul_cqi, 1, ENC_BIG_ENDIAN);
6021 
6022 	// Timing advance
6023 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN, &test_value);
6024 	if (test_value > 63)
6025 	{
6026 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..63]");
6027 	}
6028 }
dissect_rx_indication_rel9_value(ptvcursor_t * ptvc,packet_info * pinfo)6029 static void dissect_rx_indication_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
6030 {
6031 	guint32 test_value;
6032 
6033 	// Timing advance R9
6034 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance_r9, 2, ENC_BIG_ENDIAN, &test_value);
6035 	if (test_value > 7690)
6036 	{
6037 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance r9 value [0..7690]");
6038 	}
6039 
6040 }
dissect_harq_indication_data_bundling_value(ptvcursor_t * ptvc,packet_info * pinfo)6041 static void dissect_harq_indication_data_bundling_value(ptvcursor_t * ptvc, packet_info* pinfo)
6042 {
6043 	proto_item* item;
6044 	guint32 test_value;
6045 
6046 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6047 	if (!(test_value >= 1 && test_value <= 7))
6048 	{
6049 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6050 	}
6051 
6052 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_1, 1, ENC_BIG_ENDIAN, &test_value);
6053 	if (!(test_value >= 1 && test_value <= 7))
6054 	{
6055 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 1 [1..7]");
6056 	}
6057 }
dissect_harq_indication_data_format_1a_1b_bundling_value(ptvcursor_t * ptvc,packet_info * pinfo)6058 static void dissect_harq_indication_data_format_1a_1b_bundling_value(ptvcursor_t * ptvc, packet_info* pinfo)
6059 {
6060 	guint32 test_value;
6061 
6062 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6063 	if (!(test_value >= 1 && test_value <= 7))
6064 	{
6065 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6066 	}
6067 }
dissect_harq_indication_data_multplexing_value(ptvcursor_t * ptvc,packet_info * pinfo)6068 static void dissect_harq_indication_data_multplexing_value(ptvcursor_t * ptvc, packet_info* pinfo)
6069 {
6070 	proto_item* item;
6071 	guint32 test_value;
6072 
6073 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6074 	if (!(test_value >= 1 && test_value <= 7))
6075 	{
6076 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6077 	}
6078 
6079 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_1, 1, ENC_BIG_ENDIAN, &test_value);
6080 	if (!(test_value >= 1 && test_value <= 7))
6081 	{
6082 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 1 [1..7]");
6083 	}
6084 
6085 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_2, 1, ENC_BIG_ENDIAN, &test_value);
6086 	if (!(test_value >= 1 && test_value <= 7))
6087 	{
6088 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 2 [1..7]");
6089 	}
6090 
6091 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_3, 1, ENC_BIG_ENDIAN, &test_value);
6092 	if (!(test_value >= 1 && test_value <= 7))
6093 	{
6094 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 3 [1..7]");
6095 	}
6096 
6097 }
dissect_harq_indication_data_format_1a_1b_multplexing_value(ptvcursor_t * ptvc,packet_info * pinfo)6098 static void dissect_harq_indication_data_format_1a_1b_multplexing_value(ptvcursor_t * ptvc, packet_info* pinfo)
6099 {
6100 	guint32 test_value;
6101 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6102 	if (!(test_value >= 1 && test_value <= 7))
6103 	{
6104 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6105 	}
6106 }
dissect_harq_indication_data_special_bundling_value(ptvcursor_t * ptvc,packet_info * pinfo)6107 static void dissect_harq_indication_data_special_bundling_value(ptvcursor_t * ptvc, packet_info* pinfo)
6108 {
6109 	guint32 test_value;
6110 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0_special, 1, ENC_BIG_ENDIAN, &test_value);
6111 
6112 	if (test_value > 4)
6113 	{
6114 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [0..4]");
6115 	}
6116 }
dissect_harq_indication_data_format_1a_1b_special_bundling_value(ptvcursor_t * ptvc,packet_info * pinfo)6117 static void dissect_harq_indication_data_format_1a_1b_special_bundling_value(ptvcursor_t * ptvc, packet_info* pinfo)
6118 {
6119 	guint32 test_value;
6120 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0_special, 1, ENC_BIG_ENDIAN, &test_value);
6121 	if (test_value > 4)
6122 	{
6123 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [0..4]");
6124 	}
6125 }
dissect_harq_indication_data_channel_selection_value(ptvcursor_t * ptvc,packet_info * pinfo)6126 static void dissect_harq_indication_data_channel_selection_value(ptvcursor_t * ptvc, packet_info* pinfo)
6127 {
6128 	guint32 test_value;
6129 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6130 	if (!(test_value >= 1 && test_value <= 7))
6131 	{
6132 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6133 	}
6134 }
dissect_harq_indication_data_format_3_value(ptvcursor_t * ptvc,packet_info * pinfo)6135 static void dissect_harq_indication_data_format_3_value(ptvcursor_t * ptvc, packet_info* pinfo)
6136 {
6137 	guint32 test_value;
6138 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6139 	if (!(test_value >= 1 && test_value <= 7))
6140 	{
6141 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6142 	}
6143 }
dissect_harq_indication_data_format_4_value(ptvcursor_t * ptvc,packet_info * pinfo)6144 static void dissect_harq_indication_data_format_4_value(ptvcursor_t * ptvc, packet_info* pinfo)
6145 {
6146 	guint32 test_value;
6147 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6148 	if (!(test_value >= 1 && test_value <= 7))
6149 	{
6150 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6151 	}
6152 }
dissect_harq_indication_data_format_5_value(ptvcursor_t * ptvc,packet_info * pinfo)6153 static void dissect_harq_indication_data_format_5_value(ptvcursor_t * ptvc, packet_info* pinfo)
6154 {
6155 	guint32 test_value;
6156 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6157 	if (!(test_value >= 1 && test_value <= 7))
6158 	{
6159 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6160 	}
6161 }
dissect_harq_indication_rel8_tdd_value(ptvcursor_t * ptvc,packet_info * pinfo)6162 static void dissect_harq_indication_rel8_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6163 {
6164 	proto_item* item;
6165 	guint32 test_value, mode;
6166 
6167 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tdd_harq_mode, 1, ENC_BIG_ENDIAN, &mode);
6168 	if (mode > 4)
6169 	{
6170 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mode value [0..4]");
6171 	}
6172 
6173 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ack_nack, 1, ENC_BIG_ENDIAN, &test_value);
6174 	if (!(test_value >= 1 && test_value <= 4))
6175 	{
6176 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..4]");
6177 	}
6178 
6179 	switch (mode)
6180 	{
6181 		case 0:
6182 		{
6183 			dissect_harq_indication_data_bundling_value(ptvc, pinfo);
6184 			break;
6185 		}
6186 		case 1:
6187 		{
6188 			dissect_harq_indication_data_multplexing_value(ptvc, pinfo);
6189 			break;
6190 		}
6191 		case 2:
6192 		{
6193 			dissect_harq_indication_data_special_bundling_value(ptvc, pinfo);
6194 			break;
6195 		}
6196 	};
6197 }
dissect_harq_indication_rel9_later_tdd_value(ptvcursor_t * ptvc,packet_info * pinfo)6198 static void dissect_harq_indication_rel9_later_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6199 {
6200 	proto_item* item;
6201 	guint32 mode, i, count;
6202 
6203 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tdd_harq_mode, 1, ENC_BIG_ENDIAN, &mode);
6204 	if (mode > 4)
6205 	{
6206 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mode value [0..4]");
6207 	}
6208 
6209 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ack_nack, 1, ENC_BIG_ENDIAN, &count);
6210 	if (mode == 0 || mode == 1)
6211 	{
6212 		if (!(count >= 1 && count <= 4))
6213 		{
6214 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..4]");
6215 		}
6216 	}
6217 	else if (mode == 3)
6218 	{
6219 		if (!(count >= 1 && count <= 8))
6220 		{
6221 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..8]");
6222 		}
6223 	}
6224 	else if (mode == 4)
6225 	{
6226 		if (!(count >= 1 && count <= 21))
6227 		{
6228 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..21]");
6229 		}
6230 	}
6231 
6232 
6233 	ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_harq_ack_nack_data, "ACK/NACK Data");
6234 
6235 	for (i = 0; i < count; ++i)
6236 	{
6237 		ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_harq_ack_nack_data, "[%u]", i);
6238 
6239 		switch (mode)
6240 		{
6241 			case 0:
6242 			{
6243 				dissect_harq_indication_data_format_1a_1b_bundling_value(ptvc, pinfo);
6244 				break;
6245 			}
6246 			case 1:
6247 			{
6248 				dissect_harq_indication_data_format_1a_1b_multplexing_value(ptvc, pinfo);
6249 				break;
6250 			}
6251 			case 2:
6252 			{
6253 				dissect_harq_indication_data_format_1a_1b_special_bundling_value(ptvc, pinfo);
6254 				break;
6255 			}
6256 			case 3:
6257 			{
6258 				dissect_harq_indication_data_channel_selection_value(ptvc, pinfo);
6259 				break;
6260 			}
6261 			case 4:
6262 			{
6263 				dissect_harq_indication_data_format_3_value(ptvc, pinfo);
6264 				break;
6265 			}
6266 		};
6267 
6268 		ptvcursor_pop_subtree(ptvc);
6269 	}
6270 
6271 	ptvcursor_pop_subtree(ptvc);
6272 }
dissect_harq_indication_rel13_later_tdd_value(ptvcursor_t * ptvc,packet_info * pinfo)6273 static void dissect_harq_indication_rel13_later_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6274 {
6275 	proto_item* item;
6276 	guint32 mode, i, count;
6277 
6278 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tdd_harq_mode, 1, ENC_BIG_ENDIAN, &mode);
6279 	if (mode > 6)
6280 	{
6281 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mode value [0..6]");
6282 	}
6283 
6284 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ack_nack, 2, ENC_BIG_ENDIAN, &count);
6285 	if (mode == 0 || mode == 1)
6286 	{
6287 		if (!(count >= 1 && count <= 4))
6288 		{
6289 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..4]");
6290 		}
6291 	}
6292 	else if (mode == 3)
6293 	{
6294 		if (!(count >= 1 && count <= 8))
6295 		{
6296 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..8]");
6297 		}
6298 	}
6299 	else if (mode == 4)
6300 	{
6301 		if (!(count >= 1 && count <= 21))
6302 		{
6303 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..21]");
6304 		}
6305 	}
6306 	else if (mode == 5 || mode == 6)
6307 	{
6308 		if (count < 22)
6309 		{
6310 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [>= 22]");
6311 		}
6312 
6313 	}
6314 
6315 	ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_harq_ack_nack_data, "ACK/NACK Data");
6316 
6317 	for (i = 0; i < count; ++i)
6318 	{
6319 		ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_harq_ack_nack_data, "[%u]", i);
6320 
6321 		switch (mode)
6322 		{
6323 			case 0:
6324 			{
6325 				dissect_harq_indication_data_format_1a_1b_bundling_value(ptvc, pinfo);
6326 				break;
6327 			}
6328 			case 1:
6329 			{
6330 				dissect_harq_indication_data_format_1a_1b_multplexing_value(ptvc, pinfo);
6331 				break;
6332 			}
6333 			case 2:
6334 			{
6335 				dissect_harq_indication_data_special_bundling_value(ptvc, pinfo);
6336 				break;
6337 			}
6338 			case 3:
6339 			{
6340 				dissect_harq_indication_data_channel_selection_value(ptvc, pinfo);
6341 				break;
6342 			}
6343 			case 4:
6344 			{
6345 				dissect_harq_indication_data_format_3_value(ptvc, pinfo);
6346 				break;
6347 			}
6348 			case 5:
6349 			{
6350 				dissect_harq_indication_data_format_4_value(ptvc, pinfo);
6351 				break;
6352 			}
6353 			case 6:
6354 			{
6355 				dissect_harq_indication_data_format_5_value(ptvc, pinfo);
6356 				break;
6357 			}
6358 		};
6359 
6360 		ptvcursor_pop_subtree(ptvc);
6361 	}
6362 
6363 	ptvcursor_pop_subtree(ptvc);
6364 }
dissect_harq_indication_rel8_fdd_value(ptvcursor_t * ptvc,packet_info * pinfo)6365 static void dissect_harq_indication_rel8_fdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6366 {
6367 	proto_item* item;
6368 	guint32 test_value;
6369 
6370 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_tb_1, 1, ENC_BIG_ENDIAN, &test_value);
6371 	if (!(test_value >= 1 && test_value <= 7))
6372 	{
6373 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq tb 1 [1..7]");
6374 	}
6375 
6376 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_tb_2, 1, ENC_BIG_ENDIAN, &test_value);
6377 	if (!(test_value >= 1 && test_value <= 7))
6378 	{
6379 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq tb 2 [1..7]");
6380 	}
6381 
6382 }
dissect_harq_tb_value(ptvcursor_t * ptvc,packet_info * pinfo)6383 static void dissect_harq_tb_value(ptvcursor_t * ptvc, packet_info* pinfo)
6384 {
6385 	guint32 test_value;
6386 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_tb_n, 1, ENC_BIG_ENDIAN, &test_value);
6387 
6388 	if (!(test_value >= 1 && test_value <= 7))
6389 	{
6390 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq tb n [1..7]");
6391 	}
6392 }
dissect_harq_indication_rel9_later_fdd_value(ptvcursor_t * ptvc,packet_info * pinfo)6393 static void dissect_harq_indication_rel9_later_fdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6394 {
6395 	guint32 harq_mode_value, count;
6396 
6397 	// Mode
6398 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_fdd_harq_mode, 1, ENC_BIG_ENDIAN, &harq_mode_value);
6399 	if (harq_mode_value > 2)
6400 	{
6401 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq mode value [0..2]");
6402 	}
6403 
6404 	// Number of ACK/NACK
6405 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ack_nack, 1, ENC_BIG_ENDIAN, &count);
6406 
6407 	if (harq_mode_value == 0)
6408 	{
6409 		if (!(count >=1 && count <= 2))
6410 		{
6411 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..2]");
6412 		}
6413 	}
6414 	else if (harq_mode_value == 1)
6415 	{
6416 		if (!(count >= 1 && count <= 4))
6417 		{
6418 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..4]");
6419 		}
6420 
6421 	}
6422 	else if (harq_mode_value == 2)
6423 	{
6424 		if (!(count >= 1 && count <= 10))
6425 		{
6426 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..10]");
6427 		}
6428 
6429 	}
6430 
6431 	dissect_array_value(ptvc, pinfo, "HARQ TB List", ett_nfapi_harq_data, count, dissect_harq_tb_value);
6432 }
dissect_harq_indication_rel13_later_fdd_value(ptvcursor_t * ptvc,packet_info * pinfo)6433 static void dissect_harq_indication_rel13_later_fdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6434 {
6435 	guint32 harq_mode_value, count;
6436 
6437 	// Mode
6438 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_fdd_harq_mode, 1, ENC_BIG_ENDIAN, &harq_mode_value);
6439 	if (harq_mode_value > 4)
6440 	{
6441 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq mode value [0..4]");
6442 	}
6443 
6444 	// Number of ACK/NACK
6445 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ack_nack, 2, ENC_BIG_ENDIAN, &count);
6446 
6447 	if (harq_mode_value == 0)
6448 	{
6449 		if (!(count >= 1 && count <= 2))
6450 		{
6451 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..2]");
6452 		}
6453 	}
6454 	else if (harq_mode_value == 1)
6455 	{
6456 		if (!(count >= 1 && count <= 4))
6457 		{
6458 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..4]");
6459 		}
6460 
6461 	}
6462 	else if (harq_mode_value == 2)
6463 	{
6464 		if (!(count >= 1 && count <= 10))
6465 		{
6466 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..10]");
6467 		}
6468 	}
6469 	else if (harq_mode_value == 3 || harq_mode_value == 4)
6470 	{
6471 		if (count < 22)
6472 		{
6473 			expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [>= 22]");
6474 		}
6475 	}
6476 
6477 	dissect_array_value(ptvc, pinfo, "HARQ TB List", ett_nfapi_harq_data, count, dissect_harq_tb_value);
6478 }
dissect_ul_cqi_information_value(ptvcursor_t * ptvc,packet_info * pinfo)6479 static void dissect_ul_cqi_information_value(ptvcursor_t * ptvc, packet_info* pinfo)
6480 {
6481 	proto_item* item;
6482 	guint32 test_value;
6483 
6484 	// UL_CQI
6485 	ptvcursor_add(ptvc, hf_nfapi_ul_cqi, 1, ENC_BIG_ENDIAN);
6486 
6487 	// Channel
6488 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_channel, 1, ENC_BIG_ENDIAN, &test_value);
6489 	if (test_value > 1)
6490 	{
6491 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid channel value [0..1]");
6492 	}
6493 }
dissect_crc_indication_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)6494 static void dissect_crc_indication_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
6495 {
6496 	gboolean test_boolean;
6497 
6498 	// CRC Flag
6499 	proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_crc_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
6500 	if (test_boolean > 1)
6501 	{
6502 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid crc flag value [0..1]");
6503 	}
6504 }
dissect_rx_cqi_indication_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)6505 static void dissect_rx_cqi_indication_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
6506 {
6507 	proto_item* item;
6508 	guint32 test_value;
6509 
6510 	//Length
6511 	ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
6512 
6513 	// Data Offset
6514 	ptvcursor_add(ptvc, hf_nfapi_data_offset, 2, ENC_BIG_ENDIAN);
6515 
6516 	// UL_CQI
6517 	ptvcursor_add(ptvc, hf_nfapi_ul_cqi, 1, ENC_BIG_ENDIAN);
6518 
6519 	// RI
6520 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ri, 1, ENC_BIG_ENDIAN, &test_value);
6521 	if (test_value > 8)
6522 	{
6523 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ri value [0..8]");
6524 	}
6525 
6526 	// Timing Advance
6527 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN, &test_value);
6528 	if (test_value > 63)
6529 	{
6530 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..63]");
6531 	}
6532 }
dissect_ri_value(ptvcursor_t * ptvc,packet_info * pinfo)6533 static void dissect_ri_value(ptvcursor_t * ptvc, packet_info* pinfo)
6534 {
6535 	guint32 test_value;
6536 
6537 	// RI
6538 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ri, 1, ENC_BIG_ENDIAN, &test_value);
6539 	if (test_value > 8)
6540 	{
6541 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ri value [0..8]");
6542 	}
6543 }
dissect_rx_cqi_indication_rel9_value(ptvcursor_t * ptvc,packet_info * pinfo)6544 static void dissect_rx_cqi_indication_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
6545 {
6546 	proto_item* item;
6547 	guint32 test_value, count;
6548 
6549 	// Length
6550 	ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
6551 
6552 	// Data Offset
6553 	ptvcursor_add(ptvc, hf_nfapi_data_offset, 2, ENC_BIG_ENDIAN);
6554 
6555 	// UL_CQI
6556 	ptvcursor_add(ptvc, hf_nfapi_ul_cqi, 1, ENC_BIG_ENDIAN);
6557 
6558 	// Number of CC reported
6559 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_cc_reported, 1, ENC_BIG_ENDIAN, &count);
6560 	if (!(count >= 1 && count <= 5))
6561 	{
6562 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of CC reported value [1..5]");
6563 	}
6564 
6565 	dissect_array_value(ptvc, pinfo, "CC List", ett_nfapi_cc, count, dissect_ri_value);
6566 
6567 	// Timing Advance
6568 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN, &test_value);
6569 	if (test_value > 63)
6570 	{
6571 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..63]");
6572 	}
6573 
6574 	// Timing Advance R9
6575 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance_r9, 2, ENC_BIG_ENDIAN, &test_value);
6576 	if (test_value > 7690)
6577 	{
6578 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..7690]");
6579 	}
6580 }
dissect_rach_indication_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)6581 static void dissect_rach_indication_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
6582 {
6583 	proto_item* item;
6584 	guint32 test_value;
6585 
6586 	// RNTI
6587 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
6588 	if (test_value < 1)
6589 	{
6590 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
6591 	}
6592 
6593 	// Preamble
6594 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_preamble, 1, ENC_BIG_ENDIAN, &test_value);
6595 	if (test_value > 63)
6596 	{
6597 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid preamble value [0..63]");
6598 	}
6599 
6600 	// Timing Advance
6601 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN, &test_value);
6602 	if (test_value > 1282)
6603 	{
6604 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..1282]");
6605 	}
6606 
6607 }
dissect_rach_indication_rel9_value(ptvcursor_t * ptvc,packet_info * pinfo)6608 static void dissect_rach_indication_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
6609 {
6610 	guint32 test_value;
6611 
6612 	// Timing Advance R9
6613 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance_r9, 2, ENC_BIG_ENDIAN, &test_value);
6614 	if (test_value > 7690)
6615 	{
6616 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..7690]");
6617 	}
6618 }
dissect_rach_indication_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)6619 static void dissect_rach_indication_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
6620 {
6621 	guint32 test_value;
6622 
6623 	// RACH resource type
6624 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rach_resource_type, 1, ENC_BIG_ENDIAN, &test_value);
6625 	if (test_value > 4)
6626 	{
6627 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rach resource type value [0..4]");
6628 	}
6629 }
dissect_snr_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)6630 static void dissect_snr_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
6631 {
6632 	// SNR
6633 	ptvcursor_add(ptvc, hf_nfapi_snr, 1, ENC_BIG_ENDIAN);
6634 }
dissect_srs_indication_rel8_value(ptvcursor_t * ptvc,packet_info * pinfo)6635 static void dissect_srs_indication_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
6636 {
6637 	proto_item* item;
6638 	guint32 test_value, count;
6639 
6640 	// Doppler estimation
6641 	ptvcursor_add(ptvc, hf_nfapi_doppler_estimation, 2, ENC_BIG_ENDIAN);
6642 
6643 	// Timing Advance
6644 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN, &test_value);
6645 	if (test_value > 1282)
6646 	{
6647 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..1282]");
6648 	}
6649 
6650 	// Number of resource blocks
6651 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_resource_blocks, 1, ENC_BIG_ENDIAN, &count);
6652 
6653 	// RB start
6654 	ptvcursor_add(ptvc, hf_nfapi_rb_start, 1, ENC_BIG_ENDIAN);
6655 
6656 
6657 	dissect_array_value(ptvc, pinfo, "RB List", ett_nfapi_rbs, count, dissect_snr_value);
6658 }
dissect_srs_indication_rel9_value(ptvcursor_t * ptvc,packet_info * pinfo)6659 static void dissect_srs_indication_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
6660 {
6661 	guint32 test_value;
6662 
6663 	// Timing Advance R9
6664 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance_r9, 2, ENC_BIG_ENDIAN, &test_value);
6665 	if (test_value > 7690)
6666 	{
6667 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..7690]");
6668 	}
6669 }
dissect_srs_indication_rel10_tdd_value(ptvcursor_t * ptvc,packet_info * pinfo)6670 static void dissect_srs_indication_rel10_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6671 {
6672 	guint32 test_value;
6673 
6674 	// UpPTS Symbol
6675 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_up_pts_symbol, 1, ENC_BIG_ENDIAN, &test_value);
6676 	if (test_value > 1)
6677 	{
6678 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid up pts symbol value [0..1]");
6679 	}
6680 
6681 }
dissect_tdd_channel_measurement_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)6682 static void dissect_tdd_channel_measurement_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
6683 {
6684 	guint32 i, j, num_subbands, num_phy_ant;
6685 
6686 	// numPRBperSubband
6687 	ptvcursor_add(ptvc, hf_nfapi_number_prb_per_subband, 1, ENC_BIG_ENDIAN);
6688 
6689 	// Number of subbands
6690 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_subbands, 1, ENC_BIG_ENDIAN, &num_subbands);
6691 
6692 	// numAntennas
6693 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_antennas, 1, ENC_BIG_ENDIAN, &num_phy_ant);
6694 
6695 	ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_subbands, "Subbands");
6696 
6697 	for (i = 0; i < num_subbands; ++i)
6698 	{
6699 		ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_subbands, "[%u]", i);
6700 
6701 		// subbandIndex
6702 		ptvcursor_add(ptvc, hf_nfapi_subband_index, 1, ENC_BIG_ENDIAN);
6703 
6704 		ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_antennas, "Physical Antennas");
6705 
6706 		for (j = 0; j < num_phy_ant; ++j)
6707 		{
6708 			ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_antennas, "[%u]", j);
6709 
6710 			// Channel
6711 			ptvcursor_add(ptvc, hf_nfapi_channel_coefficient, 2, ENC_BIG_ENDIAN);
6712 
6713 			ptvcursor_pop_subtree(ptvc);
6714 		}
6715 
6716 		ptvcursor_pop_subtree(ptvc);
6717 
6718 		ptvcursor_pop_subtree(ptvc);
6719 	}
6720 
6721 	ptvcursor_pop_subtree(ptvc);
6722 }
dissect_srs_indication_rel11_value(ptvcursor_t * ptvc,packet_info * pinfo)6723 static void dissect_srs_indication_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
6724 {
6725 	guint32 test_value;
6726 
6727 	//UL_RTOA
6728 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_rtoa, 2, ENC_BIG_ENDIAN, &test_value);
6729 	if (test_value > 4800)
6730 	{
6731 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul rtoa value [0..4800]");
6732 	}
6733 }
dissect_lbt_dl_config_request_pdsch_req_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)6734 static void dissect_lbt_dl_config_request_pdsch_req_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
6735 {
6736 	proto_item* item;
6737 	guint32 test_value;
6738 	gint32 test_boolean;
6739 
6740 	// Handle
6741 	ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
6742 
6743 	// nCCA
6744 	ptvcursor_add(ptvc, hf_nfapi_mp_cca, 4, ENC_BIG_ENDIAN);
6745 
6746 	// NCCA
6747 	ptvcursor_add(ptvc, hf_nfapi_n_cca, 4, ENC_BIG_ENDIAN);
6748 
6749 	// Offset
6750 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_offset, 4, ENC_BIG_ENDIAN, &test_value);
6751 	if (test_value > 999)
6752 	{
6753 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid offset value [0..999]");
6754 	}
6755 
6756 	// LTE TXOP SF
6757 	ptvcursor_add(ptvc, hf_nfapi_lte_txop_sf, 4, ENC_BIG_ENDIAN);
6758 
6759 	// TXOP SFN/SF End
6760 	ptvcursor_add(ptvc, hf_nfapi_txop_sfn_sf_end, 2, ENC_BIG_ENDIAN);
6761 
6762 	// LBT mode
6763 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_lbt_mode, 4, ENC_BIG_ENDIAN, &test_boolean);
6764 	if (test_boolean > 1)
6765 	{
6766 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid offset value [0..1]");
6767 	}
6768 }
dissect_lbt_dl_config_request_drs_req_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)6769 static void dissect_lbt_dl_config_request_drs_req_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
6770 {
6771 	proto_item* item;
6772 	guint32 test_value;
6773 	gint32 test_boolean;
6774 
6775 	// Handle
6776 	ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
6777 
6778 	// Offset
6779 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_offset, 4, ENC_BIG_ENDIAN, &test_value);
6780 	if (test_value > 999)
6781 	{
6782 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid offset value [0..999]");
6783 	}
6784 
6785 	// SFN/SF End
6786 	ptvcursor_add(ptvc, hf_nfapi_sfn_sf_end, 2, ENC_BIG_ENDIAN);
6787 
6788 	// LBT mode
6789 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_lbt_mode, 4, ENC_BIG_ENDIAN, &test_boolean);
6790 	if (test_boolean > 1)
6791 	{
6792 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid offset value [0..1]");
6793 	}
6794 }
dissect_lbt_dl_config_request_pdsch_resp_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)6795 static void dissect_lbt_dl_config_request_pdsch_resp_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
6796 {
6797 	proto_item* item;
6798 	gint32 test_boolean;
6799 
6800 	// Handle
6801 	ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
6802 
6803 	// result
6804 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_result, 4, ENC_BIG_ENDIAN, &test_boolean);
6805 	if (test_boolean > 1)
6806 	{
6807 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid result value [0..1]");
6808 	}
6809 
6810 	// LTE TXOP symbols
6811 	ptvcursor_add(ptvc, hf_nfapi_txop_symbols, 4, ENC_BIG_ENDIAN);
6812 
6813 	// Initial Partial SF
6814 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_initial_partial_sf, 4, ENC_BIG_ENDIAN, &test_boolean);
6815 	if (test_boolean > 1)
6816 	{
6817 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial partial sf value [0..1]");
6818 	}
6819 }
dissect_lbt_dl_config_request_drs_resp_rel13_value(ptvcursor_t * ptvc,packet_info * pinfo)6820 static void dissect_lbt_dl_config_request_drs_resp_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
6821 {
6822 	proto_item* item;
6823 	gint32 test_boolean;
6824 
6825 	// Handle
6826 	ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
6827 
6828 	// result
6829 	item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_result, 4, ENC_BIG_ENDIAN, &test_boolean);
6830 	if (test_boolean > 1)
6831 	{
6832 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid result value [0..1]");
6833 	}
6834 }
dissect_tx_pdu(ptvcursor_t * ptvc,packet_info * pinfo _U_)6835 static void dissect_tx_pdu(ptvcursor_t * ptvc, packet_info* pinfo _U_)
6836 {
6837 	guint32 len;
6838 
6839 	// PDU length
6840 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_length, 2, ENC_BIG_ENDIAN, &len);
6841 
6842 	// PDU index
6843 	ptvcursor_add(ptvc, hf_nfapi_pdu_index, 2, ENC_BIG_ENDIAN);
6844 
6845 	// PDU#N
6846 	ptvcursor_add(ptvc, hf_nfapi_pdu, len, ENC_NA);
6847 }
dissect_tx_request_body_value(ptvcursor_t * ptvc,packet_info * pinfo)6848 static void dissect_tx_request_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
6849 {
6850 	guint32 num_pdu;
6851 
6852 	// Number of PDUs
6853 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 2, ENC_BIG_ENDIAN, &num_pdu);
6854 
6855 	dissect_array_value(ptvc, pinfo, "TX PDU List", ett_nfapi_tx_request_pdu_list, num_pdu, dissect_tx_pdu);
6856 }
dissect_harq_indication_pdu(ptvcursor_t * ptvc,packet_info * pinfo)6857 static void dissect_harq_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
6858 {
6859 	guint32 instance_len;
6860 
6861 	// Instance Length
6862 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
6863 
6864 	guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
6865 	dissect_tlv_list(ptvc, pinfo, instance_end);
6866 }
dissect_harq_indication_body_value(ptvcursor_t * ptvc,packet_info * pinfo)6867 static void dissect_harq_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
6868 {
6869 	guint32 num_pdu;
6870 
6871 	// Number of HARQs
6872 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_harqs, 2, ENC_BIG_ENDIAN, &num_pdu);
6873 
6874 	dissect_array_value(ptvc, pinfo, "HARQ PDU List", ett_nfapi_harq_indication_pdu_list, num_pdu, dissect_harq_indication_pdu);
6875 }
dissect_crc_indication_pdu(ptvcursor_t * ptvc,packet_info * pinfo)6876 static void dissect_crc_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
6877 {
6878 	guint32 instance_len;
6879 
6880 	// Instance Length
6881 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
6882 
6883 	guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
6884 	dissect_tlv_list(ptvc, pinfo, instance_end);
6885 }
dissect_crc_indication_body_value(ptvcursor_t * ptvc,packet_info * pinfo)6886 static void dissect_crc_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
6887 {
6888 	guint32 num_pdu;
6889 
6890 	// Number of CRCs
6891 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_crcs, 2, ENC_BIG_ENDIAN, &num_pdu);
6892 	dissect_array_value(ptvc, pinfo, "CRC PDU List", ett_nfapi_crc_indication_pdu_list, num_pdu, dissect_crc_indication_pdu);
6893 }
dissect_sr_indication_pdu(ptvcursor_t * ptvc,packet_info * pinfo)6894 static void dissect_sr_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
6895 {
6896 	guint32 instance_len;
6897 
6898 	// Instance Length
6899 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
6900 
6901 	guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
6902 	dissect_tlv_list(ptvc, pinfo, instance_end);
6903 }
dissect_rx_sr_indication_body_value(ptvcursor_t * ptvc,packet_info * pinfo)6904 static void dissect_rx_sr_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
6905 {
6906 	guint32 num_pdu;
6907 
6908 	// Number of SRs
6909 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_srs, 2, ENC_BIG_ENDIAN, &num_pdu);
6910 
6911 	dissect_array_value(ptvc, pinfo, "SR PDU List", ett_nfapi_sr_indication_pdu_list, num_pdu, dissect_sr_indication_pdu);
6912 }
dissect_cqi_indication_pdu(ptvcursor_t * ptvc,packet_info * pinfo)6913 static void dissect_cqi_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
6914 {
6915 	guint32 instance_len;
6916 
6917 	// Instance Length
6918 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
6919 
6920 	guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
6921 	dissect_tlv_list(ptvc, pinfo, instance_end);
6922 }
dissect_rx_cqi_indication_body_value(ptvcursor_t * ptvc,packet_info * pinfo)6923 static void dissect_rx_cqi_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
6924 {
6925 	guint32 i, num_pdu;
6926 	guint16* lengths = NULL;
6927 
6928 	// Number of PDUs
6929 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_cqi, 2, ENC_BIG_ENDIAN, &num_pdu);
6930 
6931 
6932 	tvbuff_t* tvb = ptvcursor_tvbuff(ptvc);
6933 	guint32 tmp_offset = ptvcursor_current_offset(ptvc);
6934 
6935 	if (num_pdu > 0)
6936 	{
6937 		lengths = (guint16*)wmem_alloc0(pinfo->pool, num_pdu * 2);
6938 	}
6939 
6940 	for (i = 0; i < num_pdu; ++i)
6941 	{
6942 		guint32 instance_len = tvb_get_ntohs(tvb, tmp_offset);
6943 		tmp_offset += 2;
6944 		guint32 pdu_end = tmp_offset + instance_len;
6945 
6946 		while (tmp_offset < pdu_end)
6947 		{
6948 			guint16 tlv_id = tvb_get_ntohs(tvb, tmp_offset);
6949 			tmp_offset += 2;
6950 			guint16 tlv_len = tvb_get_ntohs(tvb, tmp_offset);
6951 			tmp_offset += 2;
6952 
6953 			if (tlv_id == 0x202F)
6954 			{
6955 				lengths[i] = tvb_get_ntohs(tvb, tmp_offset);
6956 			}
6957 			else if (tlv_id == 0x2030)
6958 			{
6959 				lengths[i] = tvb_get_ntohs(tvb, tmp_offset);
6960 			}
6961 
6962 			tmp_offset += tlv_len;
6963 		}
6964 	}
6965 
6966 	dissect_array_value(ptvc, pinfo, "CQI PDU List", ett_nfapi_cqi_indication_pdu_list, num_pdu, dissect_cqi_indication_pdu);
6967 
6968 	for (i = 0; i < num_pdu; ++i)
6969 	{
6970 		ptvcursor_add(ptvc, hf_nfapi_pdu, lengths[i], ENC_NA);
6971 	}
6972 }
dissect_preamble_indication_pdu(ptvcursor_t * ptvc,packet_info * pinfo)6973 static void dissect_preamble_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
6974 {
6975 	guint32 instance_len;
6976 
6977 	// Instance Length
6978 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
6979 
6980 	guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
6981 	dissect_tlv_list(ptvc, pinfo, instance_end);
6982 }
dissect_rach_indication_body_value(ptvcursor_t * ptvc,packet_info * pinfo)6983 static void dissect_rach_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
6984 {
6985 	guint32 num_pdu;
6986 
6987 	// Number of Preambles
6988 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_preambles, 2, ENC_BIG_ENDIAN, &num_pdu);
6989 	dissect_array_value(ptvc, pinfo, "Preamble PDU List", ett_nfapi_preamble_indication_pdu_list, num_pdu, dissect_preamble_indication_pdu);
6990 }
dissect_srs_indication_pdu(ptvcursor_t * ptvc,packet_info * pinfo)6991 static void dissect_srs_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
6992 {
6993 	guint32 instance_len;
6994 
6995 	// Instance Length
6996 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
6997 	guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
6998 	dissect_tlv_list(ptvc, pinfo, instance_end);
6999 }
dissect_srs_indication_body_value(ptvcursor_t * ptvc,packet_info * pinfo)7000 static void dissect_srs_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
7001 {
7002 	guint32 num_pdu;
7003 
7004 	// Number of UEs
7005 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_srss, 1, ENC_BIG_ENDIAN, &num_pdu);
7006 	dissect_array_value(ptvc, pinfo, "SRS PDU List", ett_nfapi_srs_indication_pdu_list, num_pdu, dissect_srs_indication_pdu);
7007 }
dissect_lbt_dl_config_pdu(ptvcursor_t * ptvc,packet_info * pinfo)7008 static void dissect_lbt_dl_config_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
7009 {
7010 	guint32 test_value, size;
7011 
7012 	// PDU Type
7013 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_lbt_dl_req_pdu_type, 1, ENC_BIG_ENDIAN, &test_value);
7014 	if (test_value > 1)
7015 	{
7016 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdu type value [0..1]");
7017 	}
7018 
7019 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_size, 1, ENC_BIG_ENDIAN, &size);
7020 	guint pdu_end = (ptvcursor_current_offset(ptvc) + size - 2);
7021 
7022 	dissect_tlv_list(ptvc, pinfo, pdu_end);
7023 }
dissect_lbt_dl_config_request_body_value(ptvcursor_t * ptvc,packet_info * pinfo)7024 static void dissect_lbt_dl_config_request_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
7025 {
7026 	guint32 num_pdu;
7027 
7028 	// Number of PDUs
7029 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 2, ENC_BIG_ENDIAN, &num_pdu);
7030 	if (!(num_pdu >= 1 && num_pdu <= 2))
7031 	{
7032 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pdus value [1..2]");
7033 	}
7034 
7035 	dissect_array_value(ptvc, pinfo, "LBT DL PDU List", ett_nfapi_lbt_dl_config_pdu_list, num_pdu, dissect_lbt_dl_config_pdu);
7036 }
dissect_lbt_dl_indication_pdu(ptvcursor_t * ptvc,packet_info * pinfo)7037 static void dissect_lbt_dl_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
7038 {
7039 	guint32 test_value, size;
7040 
7041 	// PDU Type
7042 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_lbt_dl_ind_pdu_type, 1, ENC_BIG_ENDIAN, &test_value);
7043 	if (test_value > 1)
7044 	{
7045 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdu type value [0..1]");
7046 	}
7047 
7048 	// PDU Size
7049 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_size, 1, ENC_BIG_ENDIAN, &size);
7050 	guint32 pdu_end = (ptvcursor_current_offset(ptvc) + size - 2);
7051 	dissect_tlv_list(ptvc, pinfo, pdu_end);
7052 }
dissect_lbt_indication_message_body_value(ptvcursor_t * ptvc,packet_info * pinfo)7053 static void dissect_lbt_indication_message_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
7054 {
7055 	guint32 num_pdu;
7056 
7057 	// Number of PDUs
7058 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 2, ENC_BIG_ENDIAN, &num_pdu);
7059 	if (!(num_pdu >= 1 && num_pdu <= 2))
7060 	{
7061 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pdus value [1..2]");
7062 	}
7063 
7064 	dissect_array_value(ptvc, pinfo, "LBT DL PDU List", ett_nfapi_lbt_dl_indication_pdu_list, num_pdu, dissect_lbt_dl_indication_pdu);
7065 }
dissect_lte_rssi_request_value(ptvcursor_t * ptvc,packet_info * pinfo)7066 static void dissect_lte_rssi_request_value(ptvcursor_t * ptvc, packet_info* pinfo)
7067 {
7068 	guint32 test_value, num_earfcns;
7069 
7070 	// Frequency Band Indicator
7071 	ptvcursor_add(ptvc, hf_nfapi_frequency_band_indicator, 1, ENC_BIG_ENDIAN);
7072 
7073 	// Measurement Period
7074 	ptvcursor_add(ptvc, hf_nfapi_measurement_period, 2, ENC_BIG_ENDIAN);
7075 
7076 	// Bandwidth
7077 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_bandwidth, 1, ENC_BIG_ENDIAN, &test_value);
7078 	if (!(test_value == 6 || test_value == 15 || test_value == 25 ||
7079 		test_value == 50 || test_value == 75 || test_value == 100))
7080 	{
7081 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid bandwidth value [6, 15, 25, 50, 75, 100]");
7082 	}
7083 
7084 	// Timeout
7085 	ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7086 
7087 	// Number of EARFCNs
7088 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_earfcns, 1, ENC_BIG_ENDIAN, &num_earfcns);
7089 
7090 	dissect_array_value(ptvc, pinfo, "EARFCNs", ett_nfapi_earfcn_list, num_earfcns, dissect_earfcn_value);
7091 }
dissect_uarfcn_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7092 static void dissect_uarfcn_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7093 {
7094 	// UARFCN
7095 	ptvcursor_add(ptvc, hf_nfapi_uarfcn, 2, ENC_BIG_ENDIAN);
7096 }
dissect_utran_rssi_request_value(ptvcursor_t * ptvc,packet_info * pinfo)7097 static void dissect_utran_rssi_request_value(ptvcursor_t * ptvc, packet_info* pinfo)
7098 {
7099 	guint32 num_uarfcns;
7100 
7101 	// Frequency Band Indicator
7102 	ptvcursor_add(ptvc, hf_nfapi_frequency_band_indicator, 1, ENC_BIG_ENDIAN);
7103 
7104 	// Measurement Period
7105 	ptvcursor_add(ptvc, hf_nfapi_measurement_period, 2, ENC_BIG_ENDIAN);
7106 
7107 	// Timeout
7108 	ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7109 
7110 	// Number of UARFCNs
7111 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_uarfcns, 1, ENC_BIG_ENDIAN, &num_uarfcns);
7112 
7113 	dissect_array_value(ptvc, pinfo, "UARFCNs", ett_nfapi_uarfcn_list, num_uarfcns, dissect_uarfcn_value);
7114 }
dissect_arfcn_dir_value(ptvcursor_t * ptvc,packet_info * pinfo)7115 static void dissect_arfcn_dir_value(ptvcursor_t * ptvc, packet_info* pinfo)
7116 {
7117 	guint32 test_value;
7118 
7119 	// ARFCN
7120 	ptvcursor_add(ptvc, hf_nfapi_arfcn, 2, ENC_BIG_ENDIAN);
7121 
7122 	// Direction
7123 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_arfcn_direction, 1, ENC_BIG_ENDIAN, &test_value);
7124 	if (test_value > 1)
7125 	{
7126 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid direction value [0..1]");
7127 	}
7128 
7129 }
dissect_geran_rssi_request_value(ptvcursor_t * ptvc,packet_info * pinfo)7130 static void dissect_geran_rssi_request_value(ptvcursor_t * ptvc, packet_info* pinfo)
7131 {
7132 	guint32 num_arfcns;
7133 
7134 	// Frequency Band Indicator
7135 	ptvcursor_add(ptvc, hf_nfapi_frequency_band_indicator, 1, ENC_BIG_ENDIAN);
7136 
7137 	// Measurement Period
7138 	ptvcursor_add(ptvc, hf_nfapi_measurement_period, 2, ENC_BIG_ENDIAN);
7139 
7140 	// Timeout
7141 	ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7142 
7143 	// Number of ARFCNs
7144 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_arfcns, 1, ENC_BIG_ENDIAN, &num_arfcns);
7145 
7146 	dissect_array_value(ptvc, pinfo, "ARFCNs", ett_nfapi_arfcn_list, num_arfcns, dissect_arfcn_dir_value);
7147 }
dissect_rssi_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7148 static void dissect_rssi_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7149 {
7150 	// RSSI
7151 	ptvcursor_add(ptvc, hf_nfapi_rssi, 2, ENC_BIG_ENDIAN);
7152 }
dissect_rssi_indication_value(ptvcursor_t * ptvc,packet_info * pinfo)7153 static void dissect_rssi_indication_value(ptvcursor_t * ptvc, packet_info* pinfo)
7154 {
7155 	guint32 num_rssi;
7156 
7157 	// Number of RSSI
7158 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rssi, 2, ENC_BIG_ENDIAN, &num_rssi);
7159 
7160 	dissect_array_value(ptvc, pinfo, "ARFCNs", ett_nfapi_rssi_list, num_rssi, dissect_rssi_value);
7161 }
dissect_pci_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7162 static void dissect_pci_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7163 {
7164 	// PCI
7165 	ptvcursor_add(ptvc, hf_nfapi_pci, 2, ENC_BIG_ENDIAN);
7166 }
dissect_lte_cell_search_value(ptvcursor_t * ptvc,packet_info * pinfo)7167 static void dissect_lte_cell_search_value(ptvcursor_t * ptvc, packet_info* pinfo)
7168 {
7169 	guint32 num_pci;
7170 
7171 	// EARFCN
7172 	ptvcursor_add(ptvc, hf_nfapi_earfcn, 2, ENC_BIG_ENDIAN);
7173 
7174 	// Measurement Bandwidth
7175 	ptvcursor_add(ptvc, hf_nfapi_measurement_bandwidth, 1, ENC_BIG_ENDIAN);
7176 
7177 	// Exhaustive Search
7178 	ptvcursor_add(ptvc, hf_nfapi_exhaustive_search, 1, ENC_BIG_ENDIAN);
7179 
7180 	// Timeout
7181 	ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7182 
7183 	// Number of PCI
7184 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_pci, 1, ENC_BIG_ENDIAN, &num_pci);
7185 
7186 	dissect_array_value(ptvc, pinfo, "PCIs", ett_nfapi_pci_list, num_pci, dissect_pci_value);
7187 }
dissect_psc_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7188 static void dissect_psc_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7189 {
7190 	// PSC
7191 	ptvcursor_add(ptvc, hf_nfapi_psc, 2, ENC_BIG_ENDIAN);
7192 }
dissect_utran_cell_search_value(ptvcursor_t * ptvc,packet_info * pinfo)7193 static void dissect_utran_cell_search_value(ptvcursor_t * ptvc, packet_info* pinfo)
7194 {
7195 	guint32 num_psc;
7196 
7197 	// UARFCN
7198 	ptvcursor_add(ptvc, hf_nfapi_uarfcn, 2, ENC_BIG_ENDIAN);
7199 
7200 	// Exhaustive Search
7201 	ptvcursor_add(ptvc, hf_nfapi_exhaustive_search, 1, ENC_BIG_ENDIAN);
7202 
7203 	// Timeout
7204 	ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7205 
7206 	// Number of PSC
7207 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_psc, 1, ENC_BIG_ENDIAN, &num_psc);
7208 
7209 	dissect_array_value(ptvc, pinfo, "PSCs", ett_nfapi_psc_list, num_psc, dissect_psc_value);
7210 }
dissect_arfcn_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7211 static void dissect_arfcn_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7212 {
7213 	// ARFCN
7214 	ptvcursor_add(ptvc, hf_nfapi_arfcn, 2, ENC_BIG_ENDIAN);
7215 }
dissect_geran_cell_search_value(ptvcursor_t * ptvc,packet_info * pinfo)7216 static void dissect_geran_cell_search_value(ptvcursor_t * ptvc, packet_info* pinfo)
7217 {
7218 	guint32 num_arfcn;
7219 
7220 	// Timeout
7221 	ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7222 
7223 	// Number of ARFCN
7224 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_arfcns, 1, ENC_BIG_ENDIAN, &num_arfcn);
7225 
7226 	dissect_array_value(ptvc, pinfo, "ARFCNs", ett_nfapi_arfcn_list, num_arfcn, dissect_arfcn_value);
7227 }
7228 
dissect_lte_cell_found_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7229 static void dissect_lte_cell_found_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7230 {
7231 	// PCI
7232 	ptvcursor_add(ptvc, hf_nfapi_pci, 2, ENC_BIG_ENDIAN);
7233 
7234 	// RSRP
7235 	ptvcursor_add(ptvc, hf_nfapi_rsrp, 1, ENC_BIG_ENDIAN);
7236 
7237 	// RSRQ
7238 	ptvcursor_add(ptvc, hf_nfapi_rsrq, 1, ENC_BIG_ENDIAN);
7239 
7240 	// Frequency Offset
7241 	ptvcursor_add(ptvc, hf_nfapi_frequency_offset, 2, ENC_BIG_ENDIAN);
7242 }
dissect_lte_cell_search_indication_value(ptvcursor_t * ptvc,packet_info * pinfo)7243 static void dissect_lte_cell_search_indication_value(ptvcursor_t * ptvc, packet_info* pinfo)
7244 {
7245 	guint32 num_lte_cells;
7246 
7247 	// Number of LTE Cells Found
7248 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_lte_cells_found, 2, ENC_BIG_ENDIAN, &num_lte_cells);
7249 	dissect_array_value(ptvc, pinfo, "LTE Cells Found", ett_nfapi_lte_cells_found_list, num_lte_cells, dissect_lte_cell_found_value);
7250 }
dissect_utran_cell_found_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7251 static void dissect_utran_cell_found_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7252 {
7253 	// PSC
7254 	ptvcursor_add(ptvc, hf_nfapi_psc, 2, ENC_BIG_ENDIAN);
7255 
7256 	// RSCP
7257 	ptvcursor_add(ptvc, hf_nfapi_rscp, 1, ENC_BIG_ENDIAN);
7258 
7259 	// EcN0
7260 	ptvcursor_add(ptvc, hf_nfapi_enco, 1, ENC_BIG_ENDIAN);
7261 
7262 	// Frequency Offset
7263 	ptvcursor_add(ptvc, hf_nfapi_frequency_offset, 2, ENC_BIG_ENDIAN);
7264 }
dissect_utran_cell_search_indication_value(ptvcursor_t * ptvc,packet_info * pinfo)7265 static void dissect_utran_cell_search_indication_value(ptvcursor_t * ptvc, packet_info* pinfo)
7266 {
7267 	guint32 num_utran_cells;
7268 
7269 	// Number of UTRAN Cells Found
7270 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_utran_cells_found, 2, ENC_BIG_ENDIAN, &num_utran_cells);
7271 	dissect_array_value(ptvc, pinfo, "UTRAN Cells Found", ett_nfapi_utran_cells_found_list, num_utran_cells, dissect_utran_cell_found_value);
7272 }
dissect_geran_cell_found_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7273 static void dissect_geran_cell_found_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7274 {
7275 	// ARFCN
7276 	ptvcursor_add(ptvc, hf_nfapi_arfcn, 2, ENC_BIG_ENDIAN);
7277 
7278 	// BSIC
7279 	ptvcursor_add(ptvc, hf_nfapi_bsic, 1, ENC_BIG_ENDIAN);
7280 
7281 	// RxLev
7282 	ptvcursor_add(ptvc, hf_nfapi_rxlev, 1, ENC_BIG_ENDIAN);
7283 
7284 	// RxQual
7285 	ptvcursor_add(ptvc, hf_nfapi_rxqual, 1, ENC_BIG_ENDIAN);
7286 
7287 	// Frequency Offset
7288 	ptvcursor_add(ptvc, hf_nfapi_frequency_offset, 2, ENC_BIG_ENDIAN);
7289 
7290 	// SFN Offset
7291 	ptvcursor_add(ptvc, hf_nfapi_sfn_offset, 4, ENC_BIG_ENDIAN);
7292 }
dissect_geran_cell_search_indication_value(ptvcursor_t * ptvc,packet_info * pinfo)7293 static void dissect_geran_cell_search_indication_value(ptvcursor_t * ptvc, packet_info* pinfo)
7294 {
7295 	guint32 num_geran_cells;
7296 
7297 	// Number of GSM Cells Found
7298 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_geran_cells_found, 2, ENC_BIG_ENDIAN, &num_geran_cells);
7299 	dissect_array_value(ptvc, pinfo, "GERAN Cells Found", ett_nfapi_geran_cells_found_list, num_geran_cells, dissect_geran_cell_found_value);
7300 }
dissect_pnf_cell_search_state_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7301 static void dissect_pnf_cell_search_state_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7302 {
7303 	guint len = tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
7304 	ptvcursor_add(ptvc, hf_nfapi_pnf_search_state, len, ENC_NA);
7305 }
dissect_pnf_cell_broadcast_state_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7306 static void dissect_pnf_cell_broadcast_state_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7307 {
7308 	guint len = tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
7309 	ptvcursor_add(ptvc, hf_nfapi_pnf_broadcast_state, len, ENC_NA);
7310 }
dissect_lte_broadcast_detect_request_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7311 static void dissect_lte_broadcast_detect_request_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7312 {
7313 	// EARFCN
7314 	ptvcursor_add(ptvc, hf_nfapi_earfcn, 2, ENC_BIG_ENDIAN);
7315 
7316 	// PCI
7317 	ptvcursor_add(ptvc, hf_nfapi_pci, 2, ENC_BIG_ENDIAN);
7318 
7319 	// Timeout
7320 	ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7321 }
dissect_utran_broadcast_detect_request_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7322 static void dissect_utran_broadcast_detect_request_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7323 {
7324 	// UARFCN
7325 	ptvcursor_add(ptvc, hf_nfapi_uarfcn, 2, ENC_BIG_ENDIAN);
7326 
7327 	// PSC
7328 	ptvcursor_add(ptvc, hf_nfapi_psc, 2, ENC_BIG_ENDIAN);
7329 
7330 	// Timeout
7331 	ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7332 }
dissect_lte_broadcast_detect_indication_value(ptvcursor_t * ptvc,packet_info * pinfo)7333 static void dissect_lte_broadcast_detect_indication_value(ptvcursor_t * ptvc, packet_info* pinfo)
7334 {
7335 	guint32 test_value;
7336 
7337 	// Number of Tx Antenna
7338 	proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_tx_antenna, 1, ENC_BIG_ENDIAN, &test_value);
7339 	if (!(test_value == 1 || test_value == 2 || test_value == 4))
7340 	{
7341 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of tx antenna value [1, 2, 4]");
7342 	}
7343 
7344 	// MIB[MIB Length]
7345 	ptvcursor_add(ptvc, hf_nfapi_mib, 2, ENC_BIG_ENDIAN|ENC_NA);
7346 
7347 	// SFN Offset
7348 	ptvcursor_add(ptvc, hf_nfapi_sfn_offset, 4, ENC_BIG_ENDIAN);
7349 }
dissect_utran_broadcast_detect_indication_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7350 static void dissect_utran_broadcast_detect_indication_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7351 {
7352 	// MIB[MIB Length]
7353 	ptvcursor_add(ptvc, hf_nfapi_mib, 2, ENC_BIG_ENDIAN|ENC_NA);
7354 
7355 	// SFN Offset
7356 	ptvcursor_add(ptvc, hf_nfapi_sfn_offset, 4, ENC_BIG_ENDIAN);
7357 }
dissect_lte_system_information_schedule_request_value(ptvcursor_t * ptvc,packet_info * pinfo)7358 static void dissect_lte_system_information_schedule_request_value(ptvcursor_t * ptvc, packet_info* pinfo)
7359 {
7360 	proto_item* item;
7361 	guint32 test_value;
7362 
7363 	// EARFCN
7364 	ptvcursor_add(ptvc, hf_nfapi_earfcn, 2, ENC_BIG_ENDIAN);
7365 
7366 	// PCI
7367 	ptvcursor_add(ptvc, hf_nfapi_pci, 2, ENC_BIG_ENDIAN);
7368 
7369 	// Bandwidth
7370 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_bandwidth, 2, ENC_BIG_ENDIAN, &test_value);
7371 	if (!(test_value == 6 || test_value == 15 || test_value == 25 ||
7372 		test_value == 50 || test_value == 75 || test_value == 100))
7373 	{
7374 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid bandwidth value [6, 15, 25, 50, 75, 100]");
7375 	}
7376 
7377 	// PHICH Configuration
7378 	// todo : phich bit decode
7379 	ptvcursor_add(ptvc, hf_nfapi_phich_configuration, 1, ENC_BIG_ENDIAN);
7380 
7381 	// Number of Tx Antenna
7382 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_tx_antenna, 1, ENC_BIG_ENDIAN, &test_value);
7383 	if (!(test_value == 1 || test_value == 2 || test_value == 4))
7384 	{
7385 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of tx antenna value [1, 2, 4]");
7386 	}
7387 
7388 	// retryCount
7389 	ptvcursor_add(ptvc, hf_nfapi_retry_count, 1, ENC_BIG_ENDIAN);
7390 
7391 	// Timeout
7392 	ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7393 }
dissect_lte_system_information_schedule_indication_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7394 static void dissect_lte_system_information_schedule_indication_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7395 {
7396 	// this needs to be SIB 1
7397 	guint len = tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
7398 	ptvcursor_add(ptvc, hf_nfapi_sib1, len, ENC_NA);
7399 }
dissect_si_periodicity_value(ptvcursor_t * ptvc,packet_info * pinfo)7400 static void dissect_si_periodicity_value(ptvcursor_t * ptvc, packet_info* pinfo)
7401 {
7402 	proto_item* item;
7403 	guint32 test_value;
7404 
7405 	// SI Periodicity
7406 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_si_periodicity, 1, ENC_BIG_ENDIAN, &test_value);
7407 	if (test_value > 7)
7408 	{
7409 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid si periodicity value [0..7]");
7410 	}
7411 
7412 	// SI Index
7413 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_si_index, 1, ENC_BIG_ENDIAN, &test_value);
7414 	if (test_value > 32)
7415 	{
7416 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid si Index value [0..32]");
7417 	}
7418 }
7419 
dissect_lte_system_information_request_value(ptvcursor_t * ptvc,packet_info * pinfo)7420 static void dissect_lte_system_information_request_value(ptvcursor_t * ptvc, packet_info* pinfo)
7421 {
7422 	proto_item* item;
7423 	guint32 test_value, si_priodicity;
7424 
7425 	// EARFCN
7426 	ptvcursor_add(ptvc, hf_nfapi_earfcn, 2, ENC_BIG_ENDIAN);
7427 
7428 	// PCI
7429 	ptvcursor_add(ptvc, hf_nfapi_pci, 2, ENC_BIG_ENDIAN);
7430 
7431 	// Downlink channel bandwidth
7432 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_channel_bandwidth, 2, ENC_BIG_ENDIAN, &test_value);
7433 	if (!(test_value == 6 || test_value == 15 || test_value == 25 ||
7434 		test_value == 50 || test_value == 75 || test_value == 100))
7435 	{
7436 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid bandwidth value [6, 15, 25, 50, 75, 100]");
7437 	}
7438 
7439 	// PHICH Configuration
7440 	ptvcursor_add(ptvc, hf_nfapi_phich_configuration, 1, ENC_BIG_ENDIAN);
7441 
7442 	// Number of Tx Antenna
7443 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_tx_antenna, 1, ENC_BIG_ENDIAN, &test_value);
7444 	if (!(test_value == 1 || test_value == 2 || test_value == 4))
7445 	{
7446 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of tx antenna value [1, 2, 4]");
7447 	}
7448 
7449 	// Number of SI Periodicity
7450 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_si_periodicity, 1, ENC_BIG_ENDIAN, &si_priodicity);
7451 
7452 	dissect_array_value(ptvc, pinfo, "Number SI Periodicity", ett_nfapi_si_periodicity_list, si_priodicity, dissect_si_periodicity_value);
7453 
7454 	// SI Window Length
7455 	item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_si_window_length, 1, ENC_BIG_ENDIAN, &test_value);
7456 	if (!(test_value == 1 || test_value == 2 || test_value == 5 || test_value == 10 ||
7457 		  test_value == 15 || test_value == 20 || test_value == 40))
7458 	{
7459 		expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid si window length value [1, 2, 5, 10, 15, 20, 40]");
7460 	}
7461 
7462 	// Timeout
7463 	ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7464 }
dissect_utran_system_information_request_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7465 static void dissect_utran_system_information_request_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7466 {
7467 	// UARFCN
7468 	ptvcursor_add(ptvc, hf_nfapi_uarfcn, 2, ENC_BIG_ENDIAN);
7469 
7470 	// PSC
7471 	ptvcursor_add(ptvc, hf_nfapi_psc, 2, ENC_BIG_ENDIAN);
7472 
7473 	// Timeout
7474 	ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7475 }
dissect_geran_system_information_request_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7476 static void dissect_geran_system_information_request_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7477 {
7478 	// ARFCN
7479 	ptvcursor_add(ptvc, hf_nfapi_arfcn, 2, ENC_BIG_ENDIAN);
7480 
7481 	// BSIC
7482 	ptvcursor_add(ptvc, hf_nfapi_bsic, 1, ENC_BIG_ENDIAN);
7483 
7484 	// Timeout
7485 	ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7486 }
dissect_lte_system_information_indication_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7487 static void dissect_lte_system_information_indication_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7488 {
7489 	// SIB Type
7490 	ptvcursor_add(ptvc, hf_nfapi_sib_type, 1, ENC_BIG_ENDIAN);
7491 
7492 	// SIB[SIB Length]
7493 	ptvcursor_add(ptvc, hf_nfapi_sib, 2, ENC_BIG_ENDIAN|ENC_NA);
7494 }
dissect_utran_system_information_indication_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7495 static void dissect_utran_system_information_indication_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7496 {
7497 	// SIB[SIB Length]
7498 	ptvcursor_add(ptvc, hf_nfapi_sib, 2, ENC_BIG_ENDIAN|ENC_NA);
7499 }
dissect_geran_system_information_indication_value(ptvcursor_t * ptvc,packet_info * pinfo _U_)7500 static void dissect_geran_system_information_indication_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7501 {
7502 	// SI[SI Length]
7503 	ptvcursor_add(ptvc, hf_nfapi_si, 2, ENC_BIG_ENDIAN|ENC_NA);
7504 }
7505 
7506 static void dissect_rx_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo _U_);
7507 
7508 // Important the tags must be in numerical order so that they can be indexed correctly
7509 static const tlv_t nfapi_tags[] =
7510 {
7511 	{ 0x1000, "PNF Param General", dissect_pnf_param_general_value },
7512 	{ 0x1001, "PNF PHY", dissect_pnf_phy_value },
7513 	{ 0x1002, "PNF RF", dissect_pnf_rf_value },
7514 	{ 0x1003, "PNF PHY RF Config", dissect_pnf_phy_rf_config_value },
7515 	{ 0x1004, "DL RS Tx power", dissect_dl_rs_tx_power_value },
7516 	{ 0x1005, "Received interference power", dissect_received_interference_power_value },
7517 	{ 0x1006, "Thermal noise power", dissect_thermal_noise_power_value },
7518 	{ 0x1007, "DL RS TX Power measurement", dissect_dl_rs_tx_power_measurement_value },
7519 	{ 0x1008, "Received Interference power measurement", dissect_received_interference_power_measurement_value },
7520 	{ 0x1009, "Thermal noise power measurement", dissect_thermal_noise_power_measurement_value },
7521 	{ 0x100A, "PNF PHY Rel 10", dissect_pnf_phy_rel10_value },
7522 	{ 0x100B, "PNF PHY Rel 11", dissect_pnf_phy_rel11_value },
7523 	{ 0x100C, "PNF PHY Rel 12", dissect_pnf_phy_rel12_value },
7524 	{ 0x100D, "PNF PHY Rel 13", dissect_pnf_phy_rel13_value },
7525 };
7526 
7527 static const tlv_t configuration_tags[] =
7528 {
7529 	{ 0x0000, NULL, NULL },
7530 	{ 0x0001, "Subframe config - Duplex Mode", dissect_duplex_mode_value },
7531 	{ 0x0002, "Subframe config - PCFICH power offset TLV", dissect_pcfich_power_offset_value },
7532 	{ 0x0003, "Subframe config - P-B", dissect_pb_value },
7533 	{ 0x0004, "Subframe config - DL cyclic prefix type", dissect_dl_cyclic_prefix_value },
7534 	{ 0x0005, "Subframe config - UL cyclic prefix type", dissect_ul_cyclic_prefix_value },
7535 	{ 0x0006, NULL, NULL },
7536 	{ 0x0007, NULL, NULL },
7537 	{ 0x0008, NULL, NULL },
7538 	{ 0x0009, NULL, NULL },
7539 	{ 0x000A, "RF config - Downlink channel bandwidth", dissect_dl_channel_bandwidth_value },
7540 	{ 0x000B, "RF config - Uplink channel bandwidth", dissect_ul_channel_bandwidth_value },
7541 	{ 0x000C, "RF config - Reference signal power", dissect_reference_signal_power_value },
7542 	{ 0x000D, "RF config - Tx antenna ports", dissect_tx_antenna_ports_value },
7543 	{ 0x000E, "RF config - Rx Antenna ports", dissect_rx_antenna_ports_value },
7544 	{ 0x000F, NULL, NULL },
7545 	{ 0x0010, NULL, NULL },
7546 	{ 0x0011, NULL, NULL },
7547 	{ 0x0012, NULL, NULL },
7548 	{ 0x0013, NULL, NULL },
7549 	{ 0x0014, "PHICH config - PHICH resource", dissect_phich_resource_value },
7550 	{ 0x0015, "PHICH config - PHICH duration", dissect_phich_duration_value },
7551 	{ 0x0016, "PHICH config - PHICH power offset", dissect_phich_power_offset_value },
7552 	{ 0x0017, NULL, NULL },
7553 	{ 0x0018, NULL, NULL },
7554 	{ 0x0019, NULL, NULL },
7555 	{ 0x001A, NULL, NULL },
7556 	{ 0x001B, NULL, NULL },
7557 	{ 0x001C, NULL, NULL },
7558 	{ 0x001D, NULL, NULL },
7559 	{ 0x001E, "SCH config - Primary synchronization signal EPRE/EPRERS", dissect_psch_synch_signal_epre_eprers_value },
7560 	{ 0x001F, "SCH config - Secondary synchronization signal EPRE/EPRERS", dissect_ssch_synch_signal_epre_eprers_value },
7561 	{ 0x0020, "SCH config - Physical Cell Id", dissect_physical_cell_id_value },
7562 	{ 0x0021, NULL, NULL },
7563 	{ 0x0022, NULL, NULL },
7564 	{ 0x0023, NULL, NULL },
7565 	{ 0x0024, NULL, NULL },
7566 	{ 0x0025, NULL, NULL },
7567 	{ 0x0026, NULL, NULL },
7568 	{ 0x0027, NULL, NULL },
7569 	{ 0x0028, "PRACH config - Configuration Index", dissect_prach_configuration_index_value },
7570 	{ 0x0029, "PRACH config - Root sequence Index", dissect_prach_root_sequence_index_value },
7571 	{ 0x002A, "PRACH config - Zero correlation zone configuration", dissect_prach_zero_correlation_zone_configuration_value },
7572 	{ 0x002B, "PRACH config - High speed flag", dissect_prach_high_speed_flag_value },
7573 	{ 0x002C, "PRACH config - Frequency offset", dissect_prach_frequency_offset_value },
7574 	{ 0x002D, NULL, NULL },
7575 	{ 0x002E, NULL, NULL },
7576 	{ 0x002F, NULL, NULL },
7577 	{ 0x0030, NULL, NULL },
7578 	{ 0x0031, NULL, NULL },
7579 	{ 0x0032, "PUSCH config - Hopping mode", dissect_pusch_hopping_mode_value },
7580 	{ 0x0033, "PUSCH config - Hopping offset", dissect_pusch_hopping_offset_value },
7581 	{ 0x0034, "PUSCH config - Number of sub-bands", dissect_pusch_number_of_subbands_value },
7582 	{ 0x0035, NULL, NULL },
7583 	{ 0x0036, NULL, NULL },
7584 	{ 0x0037, NULL, NULL },
7585 	{ 0x0038, NULL, NULL },
7586 	{ 0x0039, NULL, NULL },
7587 	{ 0x003A, NULL, NULL },
7588 	{ 0x003B, NULL, NULL },
7589 	{ 0x003C, "PUCCH config - Delta PUCCH Shift", dissect_pucch_delta_pucch_shift_value },
7590 	{ 0x003D, "PUCCH config - N_CQI RB", dissect_pucch_n_cqi_rb_value },
7591 	{ 0x003E, "PUCCH config - N_AN CS", dissect_pucch_n_an_cs_value },
7592 	{ 0x003F, "PUCCH config - N1Pucch-AN", dissect_pucch_n1_pucch_an_value },
7593 	{ 0x0040, NULL, NULL },
7594 	{ 0x0041, NULL, NULL },
7595 	{ 0x0042, NULL, NULL },
7596 	{ 0x0043, NULL, NULL },
7597 	{ 0x0044, NULL, NULL },
7598 	{ 0x0045, NULL, NULL },
7599 	{ 0x0046, "SRS config - Bandwidth configuration", dissect_srs_bandwidth_configuration_value },
7600 	{ 0x0047, "SRS config - MaxUpPTS", dissect_srs_max_uppts_value },
7601 	{ 0x0048, "SRS config - SRS subframe configuration", dissect_srs_subframe_configuration_value },
7602 	{ 0x0049, "SRS config - SRS AckNack SRS simultaneous transmission", dissect_srs_acknack_srs_sim_tx_value },
7603 	{ 0x004A, NULL, NULL },
7604 	{ 0x004B, NULL, NULL },
7605 	{ 0x004C, NULL, NULL },
7606 	{ 0x004D, NULL, NULL },
7607 	{ 0x004E, NULL, NULL },
7608 	{ 0x004F, NULL, NULL },
7609 	{ 0x0050, "Uplink reference signal config - Uplink RS hopping", dissect_uplink_rs_hopping_value },
7610 	{ 0x0051, "Uplink reference signal config - Group assignment (delta sequence-shift pattern)", dissect_group_assignment_value },
7611 	{ 0x0052, "Uplink reference signal config - Cyclic Shift 1 for DMRS", dissect_cyclic_shift_1_for_drms_value },
7612 	{ 0x0053, NULL, NULL },
7613 	{ 0x0054, NULL, NULL },
7614 	{ 0x0055, NULL, NULL },
7615 	{ 0x0056, NULL, NULL },
7616 	{ 0x0057, NULL, NULL },
7617 	{ 0x0058, NULL, NULL },
7618 	{ 0x0059, NULL, NULL },
7619 	{ 0x005A, "TDD frame structure config - Subframe assignment", dissect_tdd_subframe_assignment_value },
7620 	{ 0x005B, "TDD frame structure config - Special sub-frame patterns", dissect_tdd_subframe_patterns_value },
7621 	{ 0x005C, NULL, NULL },
7622 	{ 0x005D, NULL, NULL },
7623 	{ 0x005E, NULL, NULL },
7624 	{ 0x005F, NULL, NULL },
7625 	{ 0x0060, NULL, NULL },
7626 	{ 0x0061, NULL, NULL },
7627 	{ 0x0062, NULL, NULL },
7628 	{ 0x0063, NULL, NULL },
7629 	{ 0x0064, "LAA config - ED Threshold for LBT for PDSCH", dissect_laa_ed_threashold_for_lbt_for_pdsch_value },
7630 	{ 0x0065, "LAA config - ED Threshold for LBT for DRS", dissect_laa_ed_threashold_for_lbt_for_drs_value },
7631 	{ 0x0066, "LAA config - PD Threshold", dissect_laa_pd_threshold_value },
7632 	{ 0x0067, "LAA config - Multi carrier type", dissect_laa_multi_carrier_type_value },
7633 	{ 0x0068, "LAA config - Multi carrier TX", dissect_laa_multi_carrier_tx_value },
7634 	{ 0x0069, "LAA config - Multi carrier freeze", dissect_laa_multi_carrier_freeze_value },
7635 	{ 0x006A, "LAA config - Tx antenna ports for DRS", dissect_laa_tx_antenna_port_for_drs_value },
7636 	{ 0x006B, "LAA config - Transmission power for DRS", dissect_laa_transmission_power_for_drs_value },
7637 	{ 0x006C, NULL, NULL },
7638 	{ 0x006D, NULL, NULL },
7639 	{ 0x006E, NULL, NULL },
7640 	{ 0x006F, NULL, NULL },
7641 	{ 0x0070, NULL, NULL },
7642 	{ 0x0071, NULL, NULL },
7643 	{ 0x0072, NULL, NULL },
7644 	{ 0x0073, NULL, NULL },
7645 	{ 0x0074, NULL, NULL },
7646 	{ 0x0075, NULL, NULL },
7647 	{ 0x0076, NULL, NULL },
7648 	{ 0x0077, NULL, NULL },
7649 	{ 0x0078, "eMTC config - PBCH Repetitions enable R13", dissect_emtc_pbch_repeitions_enabled_r13_value },
7650 	{ 0x0079, "eMTC config - PRACH CAT-M Root sequence Index", dissect_emtc_prach_cat_m_root_sequence_index_value },
7651 	{ 0x007A, "eMTC config - PRACH CAT-M Zero correlation zone configuration", dissect_emtc_prach_cat_m_zero_correlation_zone_configuration_value },
7652 	{ 0x007B, "eMTC config - PRACH CAT-M High speed flag", dissect_emtc_prach_cat_m_high_speed_flag_value },
7653 	{ 0x007C, "eMTC config - PRACH CE level #0 Enable", dissect_emtc_prach_ce_level_0_enabled_value },
7654 	{ 0x007D, "eMTC config - PRACH CE level #0 Configuration Index", dissect_emtc_prach_ce_level_0_configuration_offset_value },
7655 	{ 0x007E, "eMTC config - PRACH CE level #0 Frequency offset", dissect_emtc_prach_ce_level_0_frequency_offset_value },
7656 	{ 0x007F, "eMTC config - PRACH CE level #0 Number of repetitions per attempt", dissect_emtc_preach_ce_level_0_num_of_repeitions_per_attempt_value },
7657 	{ 0x0080, "eMTC config - CE level #0 Starting subframe periodicity", dissect_emtc_ce_level_0_starting_subframe_periodicity_value },
7658 	{ 0x0081, "eMTC config - PRACH CE level #0 Hopping Enable", dissect_emtc_preach_ce_level_0_hopping_enabled_value },
7659 	{ 0x0082, "eMTC config - PRACH CE level #0 Hopping Offset", dissect_emtc_preach_ce_level_0_hopping_offset_value },
7660 	{ 0x0083, "eMTC config - PRACH CE level #1 Enable", dissect_emtc_prach_ce_level_1_enabled_value },
7661 	{ 0x0084, "eMTC config - PRACH CE level #1 Configuration Index", dissect_emtc_prach_ce_level_1_configuration_offset_value },
7662 	{ 0x0085, "eMTC config - PRACH CE level #1 Frequency offset", dissect_emtc_prach_ce_level_1_frequency_offset_value },
7663 	{ 0x0086, "eMTC config - PRACH CE level #1 Number of repetitions per attempt", dissect_emtc_preach_ce_level_1_num_of_repeitions_per_attempt_value },
7664 	{ 0x0087, "eMTC config - CE level #1 Starting subframe periodicity", dissect_emtc_ce_level_1_starting_subframe_periodicity_value },
7665 	{ 0x0088, "eMTC config - PRACH CE level #1 Hopping Enable", dissect_emtc_preach_ce_level_1_hopping_enabled_value },
7666 	{ 0x0089, "eMTC config - PRACH CE level #1 Hopping Offset", dissect_emtc_preach_ce_level_1_hopping_offset_value },
7667 	{ 0x008A, "eMTC config - PRACH CE level #2 Enable", dissect_emtc_prach_ce_level_2_enabled_value },
7668 	{ 0x008B, "eMTC config - PRACH CE level #2 Configuration Index", dissect_emtc_prach_ce_level_2_configuration_offset_value },
7669 	{ 0x008C, "eMTC config - PRACH CE level #2 Frequency offset", dissect_emtc_prach_ce_level_2_frequency_offset_value },
7670 	{ 0x008D, "eMTC config - PRACH CE level #2 Number of repetitions per attempt", dissect_emtc_preach_ce_level_2_num_of_repeitions_per_attempt_value },
7671 	{ 0x008E, "eMTC config - CE level #2 Starting subframe periodicity", dissect_emtc_ce_level_2_starting_subframe_periodicity_value },
7672 	{ 0x008F, "eMTC config - PRACH CE level #2 Hopping Enable", dissect_emtc_preach_ce_level_2_hopping_enabled_value },
7673 	{ 0x0090, "eMTC config - PRACH CE level #2 Hopping Offset", dissect_emtc_preach_ce_level_2_hopping_offset_value },
7674 	{ 0x0091, "eMTC config - PRACH CE level #3 Enable", dissect_emtc_prach_ce_level_3_enabled_value },
7675 	{ 0x0092, "eMTC config - PRACH CE level #3 Configuration Index", dissect_emtc_prach_ce_level_3_configuration_offset_value },
7676 	{ 0x0093, "eMTC config - PRACH CE level #3 Frequency offset", dissect_emtc_prach_ce_level_3_frequency_offset_value },
7677 	{ 0x0094, "eMTC config - PRACH CE level #3 Number of repetitions per attempt", dissect_emtc_preach_ce_level_3_num_of_repeitions_per_attempt_value },
7678 	{ 0x0095, "eMTC config - CE level #3 Starting subframe periodicity", dissect_emtc_ce_level_3_starting_subframe_periodicity_value },
7679 	{ 0x0096, "eMTC config - PRACH CE level #3 Hopping Enable", dissect_emtc_preach_ce_level_3_hopping_enabled_value },
7680 	{ 0x0097, "eMTC config - PRACH CE level #3 Hopping Offset", dissect_emtc_preach_ce_level_3_hopping_offset_value },
7681 	{ 0x0098, "eMTC config - PUCCH Interval - ULHoppingConfigCommonModeA", dissect_emtc_pucch_interval_ul_hopping_config_common_mode_a_value },
7682 	{ 0x0099, "eMTC config - PUCCH Interval - ULHoppingConfigCommonModeB", dissect_emtc_pucch_interval_ul_hopping_config_common_mode_b_value },
7683 	{ 0x009A, NULL, NULL },
7684 	{ 0x009B, NULL, NULL },
7685 	{ 0x009C, NULL, NULL },
7686 	{ 0x009D, NULL, NULL },
7687 	{ 0x009E, NULL, NULL },
7688 	{ 0x009F, NULL, NULL },
7689 	{ 0x00A0, NULL, NULL },
7690 	{ 0x00A1, NULL, NULL },
7691 	{ 0x00A2, NULL, NULL },
7692 	{ 0x00A3, NULL, NULL },
7693 	{ 0x00A4, NULL, NULL },
7694 	{ 0x00A5, NULL, NULL },
7695 	{ 0x00A6, NULL, NULL },
7696 	{ 0x00A7, NULL, NULL },
7697 	{ 0x00A8, NULL, NULL },
7698 	{ 0x00A9, NULL, NULL },
7699 	{ 0x00AA, NULL, NULL },
7700 	{ 0x00AB, NULL, NULL },
7701 	{ 0x00AC, NULL, NULL },
7702 	{ 0x00AD, NULL, NULL },
7703 	{ 0x00AE, NULL, NULL },
7704 	{ 0x00AF, NULL, NULL },
7705 	{ 0x00B0, NULL, NULL },
7706 	{ 0x00B1, NULL, NULL },
7707 	{ 0x00B2, NULL, NULL },
7708 	{ 0x00B3, NULL, NULL },
7709 	{ 0x00B4, NULL, NULL },
7710 	{ 0x00B5, NULL, NULL },
7711 	{ 0x00B6, NULL, NULL },
7712 	{ 0x00B7, NULL, NULL },
7713 	{ 0x00B8, NULL, NULL },
7714 	{ 0x00B9, NULL, NULL },
7715 	{ 0x00BA, NULL, NULL },
7716 	{ 0x00BB, NULL, NULL },
7717 	{ 0x00BC, NULL, NULL },
7718 	{ 0x00BD, NULL, NULL },
7719 	{ 0x00BE, NULL, NULL },
7720 	{ 0x00BF, NULL, NULL },
7721 	{ 0x00C0, NULL, NULL },
7722 	{ 0x00C1, NULL, NULL },
7723 	{ 0x00C2, NULL, NULL },
7724 	{ 0x00C3, NULL, NULL },
7725 	{ 0x00C4, NULL, NULL },
7726 	{ 0x00C5, NULL, NULL },
7727 	{ 0x00C6, NULL, NULL },
7728 	{ 0x00C7, NULL, NULL },
7729 	{ 0x00C8, "Layer 2/3 - Downlink Bandwidth Support", dissect_dl_bandwidth_support_value },
7730 	{ 0x00C9, "Layer 2/3 - Uplink Bandwidth Support", dissect_ul_bandwidth_support_value },
7731 	{ 0x00CA, "Layer 2/3 - Downlink modulation support", dissect_dl_modulation_value },
7732 	{ 0x00CB, "Layer 2/3 - Uplink modulation support", dissect_ul_modulation_value },
7733 	{ 0x00CC, "Layer 2/3 - PHY antenna capability", dissect_phy_antenna_capability_value },
7734 	{ 0x00CD, "Layer 2/3 - Release capability", dissect_release_capability_value },
7735 	{ 0x00CE, "Layer 2/3 - MBSFN capability", dissect_mbsfn_value },
7736 	{ 0x00CF, NULL, NULL },
7737 	{ 0x00D0, NULL, NULL },
7738 	{ 0x00D1, "LAA Capability - LAA support", dissect_laa_support_value },
7739 	{ 0x00D2, "LAA Capability - PD sensing LBT support", dissect_laa_pd_sensing_lbt_support_value },
7740 	{ 0x00D3, "LAA Capability - Multi carrier LBT support", dissect_laa_multi_carrier_lbt_support_value },
7741 	{ 0x00D4, "LAA Capability - Partial SF support", dissect_laa_partial_sf_support_value },
7742 	{ 0x00D5, NULL, NULL },
7743 	{ 0x00D6, NULL, NULL },
7744 	{ 0x00D7, NULL, NULL },
7745 	{ 0x00D8, NULL, NULL },
7746 	{ 0x00D9, NULL, NULL },
7747 	{ 0x00DA, NULL, NULL },
7748 	{ 0x00DB, NULL, NULL },
7749 	{ 0x00DC, NULL, NULL },
7750 	{ 0x00DD, NULL, NULL },
7751 	{ 0x00DE, NULL, NULL },
7752 	{ 0x00DF, NULL, NULL },
7753 	{ 0x00E0, NULL, NULL },
7754 	{ 0x00E1, NULL, NULL },
7755 	{ 0x00E2, NULL, NULL },
7756 	{ 0x00E3, NULL, NULL },
7757 	{ 0x00E4, NULL, NULL },
7758 	{ 0x00E5, NULL, NULL },
7759 	{ 0x00E6, NULL, NULL },
7760 	{ 0x00E7, NULL, NULL },
7761 	{ 0x00E8, NULL, NULL },
7762 	{ 0x00E9, NULL, NULL },
7763 	{ 0x00EA, NULL, NULL },
7764 	{ 0x00EB, NULL, NULL },
7765 	{ 0x00EC, NULL, NULL },
7766 	{ 0x00ED, NULL, NULL },
7767 	{ 0x00EE, NULL, NULL },
7768 	{ 0x00EF, NULL, NULL },
7769 	{ 0x00F0, "Layer 2/3 - Data report mode", dissect_data_report_mode_value },
7770 	{ 0x00F1, "Layer 2/3 - SFN/SF", dissect_sfn_sf_value },
7771 	{ 0x00F2, NULL, NULL },
7772 	{ 0x00F3, NULL, NULL },
7773 	{ 0x00F4, NULL, NULL },
7774 	{ 0x00F5, NULL, NULL },
7775 	{ 0x00F6, NULL, NULL },
7776 	{ 0x00F7, NULL, NULL },
7777 	{ 0x00F8, NULL, NULL },
7778 	{ 0x00F9, NULL, NULL },
7779 	{ 0x00FA, "Layer 1 - PHY state", dissect_phy_state_value },
7780 	{ 0x00FB, NULL, NULL },
7781 	{ 0x00FC, NULL, NULL },
7782 	{ 0x00FD, NULL, NULL },
7783 	{ 0x00FE, NULL, NULL },
7784 	{ 0x00FF, NULL, NULL },
7785 	{ 0x0100, "NFAPI - P7 VNF Address IPv4", dissect_p7_vnf_address_ipv4_value },
7786 	{ 0x0101, "NFAPI - P7 VNF Address IPv4", dissect_p7_vnf_address_ipv6_value },
7787 	{ 0x0102, "NFAPI - P7 Port", dissect_p7_vnf_port_value },
7788 	{ 0x0103, "NFAPI - P7 PNF Address IPv4", dissect_p7_pnf_address_ipv4_value },
7789 	{ 0x0104, "NFAPI - P7 PNF Address IPv4", dissect_p7_pnf_address_ipv6_value },
7790 	{ 0x0105, "NFAPI - P7 Port", dissect_p7_pnf_port_value },
7791 	{ 0x0106, NULL, NULL },
7792 	{ 0x0107, NULL, NULL },
7793 	{ 0x0108, NULL, NULL },
7794 	{ 0x0109, NULL, NULL },
7795 	{ 0x010A, "NFAPI - Downlink UEs per Subframe", dissect_downlink_ues_per_subframe_value },
7796 	{ 0x010B, "NFAPI - Uplink UEs per Subframe", dissect_uplink_ues_per_subframe_value },
7797 	{ 0x010C, NULL, NULL },
7798 	{ 0x010D, NULL, NULL },
7799 	{ 0x010E, NULL, NULL },
7800 	{ 0x010F, NULL, NULL },
7801 	{ 0x0110, NULL, NULL },
7802 	{ 0x0111, NULL, NULL },
7803 	{ 0x0112, NULL, NULL },
7804 	{ 0x0113, NULL, NULL },
7805 	{ 0x0114, "NFAPI - nFAPI RF Bands", dissect_rf_bands_value },
7806 	{ 0x0115, NULL, NULL },
7807 	{ 0x0116, NULL, NULL },
7808 	{ 0x0117, NULL, NULL },
7809 	{ 0x0118, NULL, NULL },
7810 	{ 0x0119, NULL, NULL },
7811 	{ 0x011A, NULL, NULL },
7812 	{ 0x011B, NULL, NULL },
7813 	{ 0x011C, NULL, NULL },
7814 	{ 0x011D, NULL, NULL },
7815 	{ 0x011E, "NFAPI - Timing window", dissect_timing_window_value },
7816 	{ 0x011F, "NFAPI - Timing info mode", dissect_timing_info_mode_value },
7817 	{ 0x0120, "NFAPI - Timing info period", dissect_timing_info_period_value },
7818 	{ 0x0121, NULL, NULL },
7819 	{ 0x0122, NULL, NULL },
7820 	{ 0x0123, NULL, NULL },
7821 	{ 0x0124, NULL, NULL },
7822 	{ 0x0125, NULL, NULL },
7823 	{ 0x0126, NULL, NULL },
7824 	{ 0x0127, NULL, NULL },
7825 	{ 0x0128, "NFAPI - Maximum Transmit Power", dissect_maximum_transmit_power_value },
7826 	{ 0x0129, "NFAPI - EARFCN", dissect_earfcn_value },
7827 	{ 0x012A, NULL, NULL },
7828 	{ 0x012B, NULL, NULL },
7829 	{ 0x012C, NULL, NULL },
7830 	{ 0x012D, NULL, NULL },
7831 	{ 0x012E, NULL, NULL },
7832 	{ 0x012F, NULL, NULL },
7833 	{ 0x0130, "NFAPI - NMM GSM Frequency Bands", dissect_nmm_gsm_frequency_bands_value },
7834 	{ 0x0131, "NFAPI - NMM UMTS Frequency Bands", dissect_nmm_umts_frequency_bands_value },
7835 	{ 0x0132, "NFAPI - NMM LTE Frequency Bands", dissect_nmm_lte_frequency_bands_value },
7836 	{ 0x0133, "NFAPI - NMM Uplink RSSI supported", dissect_nmm_uplink_rssi_supported_value },
7837 };
7838 
7839 static const tlv_t p7_tags[] =
7840 {
7841 	{ 0x2000, "DL Config Request Body", dissect_dl_config_request_body_value },
7842 	{ 0x2001, "DL DCI PDU Release 8", dissect_dl_config_request_dl_dci_pdu_rel8_value },
7843 	{ 0x2002, "DL DCI PDU Release 9", dissect_dl_config_request_dl_dci_pdu_rel9_value },
7844 	{ 0x2003, "DL DCI PDU Release 10", dissect_dl_config_request_dl_dci_pdu_rel10_value },
7845 	{ 0x2004, "BCH PDU Release 8", dissect_dl_config_request_bch_pdu_rel8_value },
7846 	{ 0x2005, "MCH PDU Release 8", dissect_dl_config_request_mch_pdu_rel8_value },
7847 	{ 0x2006, "DLSCH PDU Release 8", dissect_dl_config_request_dlsch_pdu_rel8_value },
7848 	{ 0x2007, "DLSCH PDU Release 9", dissect_dl_config_request_dlsch_pdu_rel9_value },
7849 	{ 0x2008, "DLSCH PDU Release 10", dissect_dl_config_request_dlsch_pdu_rel10_value },
7850 	{ 0x2009, "PCH PDU Release 8", dissect_dl_config_request_pch_pdu_rel8_value },
7851 	{ 0x200A, "PRS PDU Release 9", dissect_dl_config_request_prs_pdu_rel9_value },
7852 	{ 0x200B, "CSI-RS PDU Release 10", dissect_dl_config_request_csi_rs_pdu_rel10_value },
7853 	{ 0x200C, "UL Config Request Body", dissect_ul_config_request_body_value },
7854 	{ 0x200D, "ULSCH PDU Release 8", dissect_ul_config_ulsch_pdu_rel8_value },
7855 	{ 0x200E, "ULSCH PDU Release 10", dissect_ul_config_ulsch_pdu_rel10_value },
7856 	{ 0x200F, "Initial Transmission Parameters Release 8", dissect_ul_config_init_tx_params_rel8_value },
7857 	{ 0x2010, "CQI RI Information Release 8", dissect_ul_config_cqi_ri_info_rel8_value },
7858 	{ 0x2011, "CQI RI Information Release 9 or later", dissect_ul_config_cqi_ri_info_rel9_later_value },
7859 	{ 0x2012, "HARQ Information (ULSCH) Release 10", dissect_ul_config_harq_info_ulsch_rel10_value },
7860 	{ 0x2013, "UE Information Release 8", dissect_ul_config_ue_info_rel8_value },
7861 	{ 0x2014, "CQI Information Release 8", dissect_ul_config_cqi_info_rel8_value },
7862 	{ 0x2015, "CQI Information Release 10", dissect_ul_config_cqi_info_rel10_value },
7863 	{ 0x2016, "SR Information Release 8", dissect_ul_config_sr_info_rel8_value },
7864 	{ 0x2017, "SR Information Release 10", dissect_ul_config_sr_info_rel10_value },
7865 	{ 0x2018, "HARQ Information (UCI) Release 10 TDD", dissect_ul_config_harq_info_uci_rel10_tdd_value },
7866 	{ 0x2019, "HARQ Information (UCI) Release 8 FDD", dissect_ul_config_harq_info_uci_rel8_fdd_value },
7867 	{ 0x201A, "HARQ Information (UCI) Release 9 or later FDD", dissect_ul_config_harq_info_uci_rel9_later_fdd_value },
7868 	{ 0x201B, "SRS Information Release 8", dissect_ul_config_srs_info_rel8_value },
7869 	{ 0x201C, "SRS Information Release 10", dissect_ul_config_srs_info_rel10_value },
7870 	{ 0x201D, "HI DCI0 Request Body", dissect_hi_dci0_request_body_value },
7871 	{ 0x201E, "HI PDU Release 8", dissect_hi_dci0_hi_rel8_value },
7872 	{ 0x201F, "HI PDU Release 10", dissect_hi_dci0_hi_rel10_value },
7873 	{ 0x2020, "DCI UL PDU Release 8", dissect_hi_dci0_dci_ul_rel8_value },
7874 	{ 0x2021, "DCI UL PDU Release 10", dissect_hi_dci0_dci_ul_rel10_value },
7875 	{ 0x2022, "Tx Request Body", dissect_tx_request_body_value },
7876 	{ 0x2023, "RX Indication Body", dissect_rx_indication_body_value },
7877 	{ 0x2024, "RX PDU Release 8", dissect_rx_indication_rel8_value },
7878 	{ 0x2025, "RX PDU Release 9", dissect_rx_indication_rel9_value },
7879 	{ 0x2026, "HARQ Indication Body", dissect_harq_indication_body_value },
7880 	{ 0x2027, "HARQ PDU Release 8 TDD", dissect_harq_indication_rel8_tdd_value },
7881 	{ 0x2028, "HARQ PDU Release 9 or later TDD", dissect_harq_indication_rel9_later_tdd_value },
7882 	{ 0x2029, "HARQ PDU Release 8 FDD", dissect_harq_indication_rel8_fdd_value },
7883 	{ 0x202A, "HARQ PDU Release 9 or later FDD", dissect_harq_indication_rel9_later_fdd_value },
7884 	{ 0x202B, "CRC Indication Body", dissect_crc_indication_body_value },
7885 	{ 0x202C, "CRC PDU Release 8", dissect_crc_indication_rel8_value },
7886 	{ 0x202D, "RX SR Indication Body", dissect_rx_sr_indication_body_value },
7887 	{ 0x202E, "RX CQI Indication Body", dissect_rx_cqi_indication_body_value },
7888 	{ 0x202F, "CQI PDU Release 8", dissect_rx_cqi_indication_rel8_value },
7889 	{ 0x2030, "CQI PDU Release 9", dissect_rx_cqi_indication_rel9_value },
7890 	{ 0x2031, "RACH Indication Body", dissect_rach_indication_body_value },
7891 	{ 0x2032, "Preamble PDU Release 8", dissect_rach_indication_rel8_value },
7892 	{ 0x2033, "Preamble PDU Release 9", dissect_rach_indication_rel9_value },
7893 	{ 0x2034, "SRS Indication Body", dissect_srs_indication_body_value },
7894 	{ 0x2035, "SRS PDU Release 8", dissect_srs_indication_rel8_value },
7895 	{ 0x2036, "SRS PDU Release 9", dissect_srs_indication_rel9_value },
7896 	{ 0x2037, "SRS PDU Release 10 TDD", dissect_srs_indication_rel10_tdd_value },
7897 	{ 0x2038, "RX UE Information", dissect_rx_ue_info_value },
7898 	{ 0x2039, "DL DCI PDU Release 11", dissect_dl_config_request_dl_dci_pdu_rel11_value },
7899 	{ 0x203A, "DL DCI PDU Release 12", dissect_dl_config_request_dl_dci_pdu_rel12_value },
7900 	{ 0x203B, "DL DCI PDU Release 13", dissect_dl_config_request_dl_dci_pdu_rel13_value },
7901 	{ 0x203C, "DLSCH PDU Release 11", dissect_dl_config_request_dlsch_pdu_rel11_value },
7902 	{ 0x203D, "DLSCH PDU Release 12", dissect_dl_config_request_dlsch_pdu_rel12_value },
7903 	{ 0x203E, "DLSCH PDU Release 13", dissect_dl_config_request_dlsch_pdu_rel13_value },
7904 	{ 0x203F, "PCH PDU Release 13", dissect_dl_config_request_pch_pdu_rel13_value },
7905 	{ 0x2040, "CSI-RS PDU Release 13", dissect_dl_config_request_csi_rs_pdu_rel13_value },
7906 	{ 0x2041, "depdcch PDU Release 11 Parameters", dissect_dl_config_request_depdcch_params_rel11_value },
7907 	{ 0x2042, "depdcch PDU Release 13 Parameters", dissect_dl_config_request_depdcch_params_rel13_value },
7908 	{ 0x2043, "ULSCH PDU Release 11", dissect_ul_config_ulsch_pdu_rel11_value },
7909 	{ 0x2044, "ULSCH PDU Release 13", dissect_ul_config_ulsch_pdu_rel13_value },
7910 	{ 0x2045, "CQI RI Information Release 13", dissect_ul_config_cqi_ri_info_rel13_value },
7911 	{ 0x2046, "HARQ Information (ULSCH) Release 13", dissect_ul_config_harq_info_ulsch_rel13_value },
7912 	{ 0x2047, "UE Information Release 11", dissect_ul_config_ue_info_rel11_value },
7913 	{ 0x2048, "UE Information Release 13", dissect_ul_config_ue_info_rel13_value },
7914 	{ 0x2049, "CQI Information Release 13", dissect_ul_config_cqi_info_rel13_value },
7915 	{ 0x204A, "HARQ Information (UCI) Release 11 FDD/TDD", dissect_ul_config_harq_info_uci_rel11_fdd_tdd_value },
7916 	{ 0x204B, "HARQ Information (UCI) Release 13 FDD/TDD", dissect_ul_config_harq_info_uci_rel13_fdd_tdd_value },
7917 	{ 0x204C, "SRS Information Release 13", dissect_ul_config_srs_info_rel13_value },
7918 	{ 0x204D, "DCI UL PDU Release 12", dissect_hi_dci0_dci_ul_rel12_value },
7919 	{ 0x204E, "MDPCCH DCI UL PDU Release 13", dissect_hi_dci0_mdpcch_dci_ul_rel13_value },
7920 	{ 0x204F, "HARQ PDU Release 13 or later TDD", dissect_harq_indication_rel13_later_tdd_value },
7921 	{ 0x2050, "HARQ PDU Release 13 or later FDD", dissect_harq_indication_rel13_later_fdd_value },
7922 	{ 0x2051, "Preamble PDU Release 13", dissect_rach_indication_rel13_value },
7923 	{ 0x2052, "UL CQI Information", dissect_ul_cqi_information_value },
7924 	{ 0x2053, "SRS PDU Release 11", dissect_srs_indication_rel11_value },
7925 	{ 0x2054, "TDD Channel Measurement", dissect_tdd_channel_measurement_value },
7926 	{ 0x2055, "LBT DL Config Request Body", dissect_lbt_dl_config_request_body_value },
7927 	{ 0x2056, "LBT PDSCH Req PDU Release 13", dissect_lbt_dl_config_request_pdsch_req_rel13_value },
7928 	{ 0x2057, "LBT DRS req PDU Release 13", dissect_lbt_dl_config_request_drs_req_rel13_value },
7929 	{ 0x2058, "LBT DL Indication Message Body", dissect_lbt_indication_message_body_value },
7930 	{ 0x2059, "LBT PDSCH Resp PDU Release 13", dissect_lbt_dl_config_request_pdsch_resp_rel13_value },
7931 	{ 0x205A, "LBT DRS Resp PDU Release 13", dissect_lbt_dl_config_request_drs_resp_rel13_value },
7932 	{ 0x205B, "MPDCCH PDU Release 13", dissect_dl_config_request_mpdpcch_pdu_rel13_value },
7933 };
7934 
7935 static const tlv_t p4_tags[] =
7936 {
7937 	{ 0x3000, "LTE RSSI Request", dissect_lte_rssi_request_value },
7938 	{ 0x3001, "UTRAN RSSI Request", dissect_utran_rssi_request_value },
7939 	{ 0x3002, "GERAN RSSI Request", dissect_geran_rssi_request_value },
7940 	{ 0x3003, "RSSI Indication", dissect_rssi_indication_value },
7941 	{ 0x3004, "LTE CELL SEARCH Request", dissect_lte_cell_search_value },
7942 	{ 0x3005, "UTRAN CELL SEARCH Request", dissect_utran_cell_search_value },
7943 	{ 0x3006, "GERAN CELL SEARCH Request", dissect_geran_cell_search_value },
7944 	{ 0x3007, "LTE CELL SEARCH Indication", dissect_lte_cell_search_indication_value },
7945 	{ 0x3008, "UTRAN CELL SEARCH Indication", dissect_utran_cell_search_indication_value },
7946 	{ 0x3009, "GERAN CELL SEARCH Indication", dissect_geran_cell_search_indication_value },
7947 	{ 0x300A, "PNF CELL SEARCH STATE", dissect_pnf_cell_search_state_value },
7948 	{ 0x300B, "LTE BROADCAST DETECT Request", dissect_lte_broadcast_detect_request_value },
7949 	{ 0x300C, "UTRAN BROADCAST DETECT Request", dissect_utran_broadcast_detect_request_value },
7950 	{ 0x300D, "PNF CELL SEARCH STATE", dissect_pnf_cell_search_state_value },
7951 	{ 0x300E, "LTE BROADCAST DETECT Indication", dissect_lte_broadcast_detect_indication_value },
7952 	{ 0x300F, "UTRAN BROADCAST DETECT Indication", dissect_utran_broadcast_detect_indication_value },
7953 	{ 0x3010, "PNF CELL BROADCAST STATE", dissect_pnf_cell_broadcast_state_value },
7954 	{ 0x3011, "LTE SYSTEM INFORMATION SCHEDULE Request", dissect_lte_system_information_schedule_request_value },
7955 	{ 0x3012, "PNF CELL BROADCAST STATE", dissect_pnf_cell_broadcast_state_value },
7956 	{ 0x3013, "LTE SYSTEM INFORMATION SCHEDULE Indication", dissect_lte_system_information_schedule_indication_value },
7957 	{ 0x3014, "LTE SYSTEM INFORMATION Request", dissect_lte_system_information_request_value },
7958 	{ 0x3015, "UTRAN SYSTEM INFORMATION Request", dissect_utran_system_information_request_value },
7959 	{ 0x3016, "GERAN SYSTEM INFORMATION Request", dissect_geran_system_information_request_value },
7960 	{ 0x3017, "PNF CELL BROADCAST STATE", dissect_pnf_cell_broadcast_state_value },
7961 	{ 0x3018, "LTE SYSTEM INFORMATION Indication", dissect_lte_system_information_indication_value },
7962 	{ 0x3019, "UTRAN SYSTEM INFORMATION Indication", dissect_utran_system_information_indication_value },
7963 	{ 0x301A, "GERAN SYSTEM INFORMATION Indication", dissect_geran_system_information_indication_value },
7964 };
7965 
7966 
look_up_tlv(int tag_id)7967 static const tlv_t* look_up_tlv(int tag_id)
7968 {
7969 	const tlv_t* tlv = NULL;
7970 
7971 	static const gint num_configuration_tags = sizeof(configuration_tags) / sizeof(tlv_t);
7972 	static const gint num_nfapi_tags = sizeof(nfapi_tags) / sizeof(tlv_t);
7973 	static const gint num_p7_tags = sizeof(p7_tags) / sizeof(tlv_t);
7974 	static const gint num_p4_tags = sizeof(p4_tags) / sizeof(tlv_t);
7975 
7976 	if (tag_id >= 0x0000 && tag_id <= (0x0000 + num_configuration_tags - 1)) // 0x0133)
7977 	{
7978 		tlv = &configuration_tags[tag_id];
7979 	}
7980 	else if (tag_id >= 0x1000 && tag_id <= (0x1000 + num_nfapi_tags - 1)) // 0x100D)
7981 	{
7982 		tlv = &nfapi_tags[tag_id - 0x1000];
7983 	}
7984 	else if (tag_id >= 0x2000 && tag_id <= (0x2000 + num_p7_tags - 1)) //0x205B)
7985 	{
7986 		tlv = &p7_tags[tag_id - 0x2000];
7987 	}
7988 	else if (tag_id >= 0x3000 && tag_id <= (0x3000 + num_p4_tags - 1)) // 0x301A)
7989 	{
7990 		tlv = &p4_tags[tag_id - 0x3000];
7991 	}
7992 	return tlv;
7993 }
7994 
7995 
dissect_tl_header(ptvcursor_t * ptvc,packet_info * pinfo _U_)7996 static proto_item* dissect_tl_header(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7997 {
7998 	ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tl, "TL");
7999 	ptvcursor_add(ptvc, hf_nfapi_tl_tag, 2, ENC_BIG_ENDIAN);
8000 	proto_item* item = ptvcursor_add(ptvc, hf_nfapi_tl_length, 2, ENC_BIG_ENDIAN);
8001 	ptvcursor_pop_subtree(ptvc);
8002 
8003 	return item;
8004 }
8005 
dissect_tlv_list(ptvcursor_t * ptvc,packet_info * pinfo,gint len)8006 static void dissect_tlv_list(ptvcursor_t* ptvc, packet_info* pinfo, gint len)
8007 {
8008 	while (ptvcursor_current_offset(ptvc) < len)
8009 	{
8010 		guint16 tlv_id = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
8011 		guint16 tlv_len = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc) + 2);
8012 
8013 		const tlv_t* tlv = look_up_tlv(tlv_id);
8014 
8015 		if (tlv != NULL && tlv->name != NULL && tlv->tag_id == tlv_id)
8016 		{
8017 			ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "%s", tlv->name);
8018 			proto_item* tlv_length_item = dissect_tl_header(ptvc, pinfo);
8019 
8020 			// There are rare cases where the len of the tlv is 0.
8021 			if (tlv_len > 0)
8022 			{
8023 
8024 				if (tlv->decode != NULL)
8025 				{
8026 					// Create a sub buff with the correct length, so we can detect reading off the end
8027 					tvbuff_t* sub_tvbuff = tvb_new_subset_length(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc), tlv_len);
8028 					ptvcursor_t* sub_ptvc = ptvcursor_new(pinfo->pool, ptvcursor_tree(ptvc), sub_tvbuff, 0);
8029 
8030 					tlv->decode(sub_ptvc, pinfo);
8031 
8032 					if (ptvcursor_current_offset(sub_ptvc) != tlv_len)
8033 					{
8034 						// error in the tlv length
8035 						expert_add_info_format(pinfo, tlv_length_item, &ei_invalid_tlv_length, "TLV length does not match decoded length");
8036 					}
8037 
8038 					ptvcursor_free(sub_ptvc);
8039 				}
8040 
8041 				ptvcursor_advance(ptvc, tlv_len);
8042 			}
8043 
8044 			ptvcursor_pop_subtree(ptvc);
8045 		}
8046 		else
8047 		{
8048 			if (tlv_id >= 0xF000 /* && tlv_id <= 0xFFFF*/)
8049 			{
8050 				ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "Unknown Vendor Extension Tag");
8051 			}
8052 			else
8053 			{
8054 				ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "Unknown");
8055 			}
8056 
8057 			dissect_tl_header(ptvc, pinfo);
8058 			ptvcursor_advance(ptvc, tlv_len);
8059 			ptvcursor_pop_subtree(ptvc);
8060 		}
8061 	}
8062 }
8063 
8064 
dissect_rx_indication_body_value(ptvcursor_t * ptvc,packet_info * pinfo)8065 static void dissect_rx_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
8066 {
8067 	guint32 i = 0, count;
8068 	guint number_of_pdu_addr = ptvcursor_current_offset(ptvc); // *offset;
8069 	wmem_array_t *lengths = wmem_array_new(pinfo->pool, sizeof(guint16));
8070 
8071 	ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 2, ENC_BIG_ENDIAN, &count);
8072 
8073 	if (count > 0)
8074 	{
8075 		ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_rx_indication_pdu_list, "RX PDU List");
8076 		gint pdu_end = tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc)) + ptvcursor_current_offset(ptvc);
8077 
8078 		while (tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc)) > 0 &&
8079 			   ptvcursor_current_offset(ptvc) < pdu_end )
8080 		{
8081 			guint16 tlv_id = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
8082 			//guint16 tlv_len = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc) + 2);
8083 
8084 			if (tlv_id == 0x2038)
8085 			{
8086 				if (i != 0)
8087 					ptvcursor_pop_subtree(ptvc);
8088 
8089 				ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_rx_indication_pdu_list, "[%u]", i);
8090 
8091 				i++;
8092 			}
8093 
8094 			char* tlv_name = "Unknown";
8095 			const tlv_t* tlv = look_up_tlv(tlv_id);
8096 
8097 			if (tlv != NULL && tlv->name != NULL && tlv->tag_id == tlv_id)
8098 			{
8099 				tlv_name = tlv->name;
8100 			}
8101 
8102 			ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_rx_indication_pdu_list, "%s", tlv_name);
8103 
8104 			dissect_tl_header(ptvc, pinfo);
8105 
8106 
8107 			if (tlv_id == 0x2038)
8108 			{
8109 				dissect_rx_ue_info_value(ptvc, pinfo);
8110 			}
8111 			else if ((tlv_id == 0x2024) && (i > 0))
8112 			{
8113 				guint16 val = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
8114 				wmem_array_append_one(lengths, val);
8115 				ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
8116 				int data_offset = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
8117 				ptvcursor_add(ptvc, hf_nfapi_data_offset, 2, ENC_BIG_ENDIAN);
8118 				ptvcursor_add(ptvc, hf_nfapi_ul_cqi, 1, ENC_BIG_ENDIAN);
8119 				ptvcursor_add(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN);
8120 
8121 				if ((data_offset > 0) && (pdu_end == (tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc)) + ptvcursor_current_offset(ptvc))))
8122 				{
8123 					pdu_end = number_of_pdu_addr + data_offset;
8124 				}
8125 
8126 			}
8127 			else if (tlv_id == 0x2025)
8128 			{
8129 				dissect_rx_indication_rel9_value(ptvc, pinfo);
8130 			}
8131 
8132 			ptvcursor_pop_subtree(ptvc);
8133 
8134 		}
8135 
8136 		// pop the last pdu index
8137 		ptvcursor_pop_subtree(ptvc);
8138 
8139 		ptvcursor_pop_subtree(ptvc);
8140 	}
8141 
8142 	for (i = 0; i < wmem_array_get_count(lengths); ++i)
8143 	{
8144 		ptvcursor_add(ptvc, hf_nfapi_pdu, *((guint16 *)wmem_array_index(lengths, i)), ENC_NA);
8145 	}
8146 }
8147 
8148 
8149 // ----------------------------------------------------------------------------|
8150 
dissect_p45_header(tvbuff_t * tvb,packet_info * pinfo _U_,proto_tree * tree,void * data _U_)8151 static int dissect_p45_header(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
8152 {
8153 	proto_tree* p45_tree;
8154 
8155 	p45_tree = proto_tree_add_subtree(tree, tvb, 0, 8, ett_nfapi_p4_p5_message_header, NULL, "P4 P5 Header");
8156 
8157 	proto_tree_add_item(p45_tree, hf_nfapi_p4_p5_message_header_phy_id, tvb, 0, 2, ENC_BIG_ENDIAN);
8158 	proto_tree_add_item(p45_tree, hf_nfapi_p4_p5_message_header_message_id, tvb, 2, 2, ENC_BIG_ENDIAN);
8159 	proto_tree_add_item(p45_tree, hf_nfapi_p4_p5_message_header_message_length, tvb, 4, 2, ENC_BIG_ENDIAN);
8160 	proto_tree_add_item(p45_tree, hf_nfapi_p4_p5_message_header_spare, tvb, 6, 2, ENC_BIG_ENDIAN);
8161 
8162 	return 8;
8163 }
8164 
dissect_p45_header_with_list(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data)8165 static int dissect_p45_header_with_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8166 {
8167 	int offset = dissect_p45_header(tvb, pinfo, tree, data);
8168 	ptvcursor_t *ptvc = ptvcursor_new(pinfo->pool, tree, tvb, offset);
8169 
8170 	dissect_tlv_list(ptvc, pinfo, tvb_reported_length(tvb));
8171 	ptvcursor_free(ptvc);
8172 	return tvb_captured_length(tvb);
8173 }
8174 
dissect_p45_header_with_error(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data)8175 static int dissect_p45_header_with_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8176 {
8177 	int offset = dissect_p45_header(tvb, pinfo, tree, data);
8178 
8179 	proto_tree_add_item(tree, hf_nfapi_error_code, tvb, offset, 4, ENC_BIG_ENDIAN);
8180 
8181 	return offset+4;
8182 }
8183 
dissect_p45_header_with_error_and_list(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data)8184 static int dissect_p45_header_with_error_and_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8185 {
8186 	int offset = dissect_p45_header(tvb, pinfo, tree, data);
8187 	ptvcursor_t *ptvc;
8188 
8189 	proto_tree_add_item(tree, hf_nfapi_error_code, tvb, offset, 4, ENC_BIG_ENDIAN);
8190 	offset += 4;
8191 
8192 	ptvc = ptvcursor_new(pinfo->pool, tree, tvb, offset);
8193 	dissect_tlv_list(ptvc, pinfo, tvb_reported_length(tvb));
8194 	ptvcursor_free(ptvc);
8195 
8196 	return tvb_captured_length(tvb);
8197 }
8198 
dissect_p45_header_with_p4_error(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data)8199 static int dissect_p45_header_with_p4_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8200 {
8201 	int offset = dissect_p45_header(tvb, pinfo, tree, data);
8202 
8203 	proto_tree_add_item(tree, hf_nfapi_p4_error_code, tvb, offset, 4, ENC_BIG_ENDIAN);
8204 
8205 	return offset+4;
8206 }
8207 
dissect_p45_header_with_p4_error_and_list(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data)8208 static int dissect_p45_header_with_p4_error_and_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8209 {
8210 	int offset = dissect_p45_header(tvb, pinfo, tree, data);
8211 	ptvcursor_t *ptvc;
8212 
8213 	proto_tree_add_item(tree, hf_nfapi_p4_error_code, tvb, offset, 4, ENC_BIG_ENDIAN);
8214 	offset += 4;
8215 
8216 	ptvc = ptvcursor_new(pinfo->pool, tree, tvb, offset);
8217 	dissect_tlv_list(ptvc, pinfo, tvb_reported_length(tvb));
8218 	ptvcursor_free(ptvc);
8219 
8220 	return tvb_captured_length(tvb);
8221 }
8222 
dissect_p45_header_with_rat_type_list(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data)8223 static int dissect_p45_header_with_rat_type_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8224 {
8225 	int offset = dissect_p45_header(tvb, pinfo, tree, data);
8226 	ptvcursor_t *ptvc;
8227 
8228 	proto_tree_add_item(tree, hf_nfapi_rat_type, tvb, offset, 1, ENC_BIG_ENDIAN);
8229 	offset += 1;
8230 
8231 	ptvc = ptvcursor_new(pinfo->pool, tree, tvb, offset);
8232 	dissect_tlv_list(ptvc, pinfo, tvb_reported_length(tvb));
8233 	ptvcursor_free(ptvc);
8234 
8235 	return tvb_captured_length(tvb);
8236 }
8237 
dissect_p45_param_response_msg_id(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data)8238 static int dissect_p45_param_response_msg_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8239 {
8240 	int offset = dissect_p45_header(tvb, pinfo, tree, data);
8241 	ptvcursor_t *ptvc;
8242 
8243 	proto_tree_add_item(tree, hf_nfapi_error_code, tvb, offset, 1, ENC_BIG_ENDIAN);
8244 	offset += 1;
8245 	proto_tree_add_item(tree, hf_nfapi_num_tlv, tvb, offset, 1, ENC_BIG_ENDIAN);
8246 	offset += 1;
8247 
8248 	ptvc = ptvcursor_new(pinfo->pool, tree, tvb, offset);
8249 	dissect_tlv_list(ptvc, pinfo, tvb_reported_length(tvb));
8250 	ptvcursor_free(ptvc);
8251 
8252 	return tvb_captured_length(tvb);
8253 }
8254 
dissect_p45_config_request_msg_id(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data)8255 static int dissect_p45_config_request_msg_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8256 {
8257 	int offset = dissect_p45_header(tvb, pinfo, tree, data);
8258 	ptvcursor_t *ptvc;
8259 
8260 	proto_tree_add_item(tree, hf_nfapi_num_tlv, tvb, offset, 1, ENC_BIG_ENDIAN);
8261 	offset += 1;
8262 
8263 	ptvc = ptvcursor_new(pinfo->pool, tree, tvb, offset);
8264 	dissect_tlv_list(ptvc, pinfo, tvb_reported_length(tvb));
8265 	ptvcursor_free(ptvc);
8266 
8267 	return tvb_captured_length(tvb);
8268 }
8269 
dissect_p7_header(tvbuff_t * tvb,packet_info * pinfo _U_,proto_tree * tree,guint8 * m,guint8 * seg,guint8 * seq)8270 static int dissect_p7_header(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint8* m, guint8* seg, guint8* seq)
8271 {
8272 	proto_tree *header_tree;
8273 	int offset = 0;
8274 	guint8 m_seg;
8275 	static int * const fields[] = {
8276 		&hf_nfapi_p7_message_header_m,
8277 		&hf_nfapi_p7_message_header_segment,
8278 		NULL
8279 	};
8280 
8281 	header_tree = proto_tree_add_subtree(tree, tvb, offset, 16, ett_nfapi_p7_message_header, NULL, "P7 Header");
8282 	proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_phy_id, tvb, offset, 2, ENC_BIG_ENDIAN);
8283 	offset += 2;
8284 	proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_message_id, tvb, offset, 2, ENC_BIG_ENDIAN);
8285 	offset += 2;
8286 	proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_message_length, tvb, offset, 2, ENC_BIG_ENDIAN);
8287 	offset += 2;
8288 
8289 	if ((m != NULL) && (seg != NULL))
8290 	{
8291 		m_seg = tvb_get_guint8(tvb, offset);
8292 		*m = (m_seg & 0x80) >> 7;
8293 		*seg = m_seg & 0x7F;
8294 	}
8295 	proto_tree_add_bitmask_list(header_tree, tvb, offset, 1, fields, ENC_BIG_ENDIAN);
8296 	offset += 1;
8297 
8298 	if (seq != NULL)
8299 	{
8300 		*seq = tvb_get_guint8(tvb, offset);
8301 	}
8302 	proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_sequence_number, tvb, offset, 1, ENC_BIG_ENDIAN);
8303 	offset += 1;
8304 	proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_checksum, tvb, offset, 4, ENC_BIG_ENDIAN);
8305 	offset += 4;
8306 	proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_transmit_timestamp, tvb, offset, 4, ENC_BIG_ENDIAN);
8307 	offset += 4;
8308 
8309 	return offset;
8310 }
8311 
dissect_p7_dl_node_sync_msg_id(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)8312 static int dissect_p7_dl_node_sync_msg_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8313 {
8314 	int offset = dissect_p7_header(tvb, pinfo, tree, NULL, NULL, NULL);
8315 
8316 	proto_tree_add_item(tree, hf_nfapi_ul_node_sync_t1, tvb, offset, 4, ENC_BIG_ENDIAN);
8317 	offset += 4;
8318 	proto_tree_add_item(tree, hf_nfapi_ul_node_sync_t2, tvb, offset, 4, ENC_BIG_ENDIAN);
8319 	offset += 4;
8320 	proto_tree_add_item(tree, hf_nfapi_ul_node_sync_t3, tvb, offset, 4, ENC_BIG_ENDIAN);
8321 	offset += 4;
8322 
8323 	return offset;
8324 }
8325 
dissect_p7_ul_node_sync_msg_id(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)8326 static int dissect_p7_ul_node_sync_msg_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8327 {
8328 	int offset = dissect_p7_header(tvb, pinfo, tree, NULL, NULL, NULL);
8329 
8330 	proto_tree_add_item(tree, hf_nfapi_dl_node_sync_t1, tvb, offset, 4, ENC_BIG_ENDIAN);
8331 	offset += 4;
8332 	proto_tree_add_item(tree, hf_nfapi_dl_node_sync_delta_sfn_sf, tvb, offset, 4, ENC_BIG_ENDIAN);
8333 	offset += 4;
8334 
8335 	return offset;
8336 }
8337 
dissect_p7_timing_info_msg_id(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)8338 static int dissect_p7_timing_info_msg_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8339 {
8340 	int offset = dissect_p7_header(tvb, pinfo, tree, NULL, NULL, NULL);
8341 	proto_tree_add_item(tree, hf_nfapi_timing_info_last_sfn_sf, tvb, offset, 4, ENC_BIG_ENDIAN);
8342 	offset += 4;
8343 	proto_tree_add_item(tree, hf_nfapi_timing_info_time_since_last_timing_info, tvb, offset, 4, ENC_BIG_ENDIAN);
8344 	offset += 4;
8345 	proto_tree_add_item(tree, hf_nfapi_timing_info_dl_config_jitter, tvb, offset, 4, ENC_BIG_ENDIAN);
8346 	offset += 4;
8347 	proto_tree_add_item(tree, hf_nfapi_timing_info_tx_request_jitter, tvb, offset, 4, ENC_BIG_ENDIAN);
8348 	offset += 4;
8349 	proto_tree_add_item(tree, hf_nfapi_timing_info_ul_config_jitter, tvb, offset, 4, ENC_BIG_ENDIAN);
8350 	offset += 4;
8351 	proto_tree_add_item(tree, hf_nfapi_timing_info_hi_dci0_jitter, tvb, offset, 4, ENC_BIG_ENDIAN);
8352 	offset += 4;
8353 	proto_tree_add_item(tree, hf_nfapi_timing_info_dl_config_latest_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
8354 	offset += 4;
8355 	proto_tree_add_item(tree, hf_nfapi_timing_info_tx_request_latest_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
8356 	offset += 4;
8357 	proto_tree_add_item(tree, hf_nfapi_timing_info_ul_config_latest_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
8358 	offset += 4;
8359 	proto_tree_add_item(tree, hf_nfapi_timing_info_hi_dci0_latest_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
8360 	offset += 4;
8361 	proto_tree_add_item(tree, hf_nfapi_timing_info_dl_config_earliest_arrival, tvb, offset, 4, ENC_BIG_ENDIAN);
8362 	offset += 4;
8363 	proto_tree_add_item(tree, hf_nfapi_timing_info_tx_request_earliest_arrival, tvb, offset, 4, ENC_BIG_ENDIAN);
8364 	offset += 4;
8365 	proto_tree_add_item(tree, hf_nfapi_timing_info_ul_config_earliest_arrival, tvb, offset, 4, ENC_BIG_ENDIAN);
8366 	offset += 4;
8367 	proto_tree_add_item(tree, hf_nfapi_timing_info_hi_dci0_earliest_arrival, tvb, offset, 4, ENC_BIG_ENDIAN);
8368 	offset += 4;
8369 
8370 	return offset;
8371 }
8372 
8373 static reassembly_table ul_p7_reassemble_table;
8374 static reassembly_table dl_p7_reassemble_table;
8375 
8376 static int hf_msg_fragments = -1;
8377 static int hf_msg_fragment = -1;
8378 static int hf_msg_fragment_overlap = -1;
8379 static int hf_msg_fragment_overlap_conflicts = -1;
8380 static int hf_msg_fragment_multiple_tails = -1;
8381 static int hf_msg_fragment_too_long_fragment = -1;
8382 static int hf_msg_fragment_error = -1;
8383 static int hf_msg_fragment_count = -1;
8384 static int hf_msg_reassembled_in = -1;
8385 static int hf_msg_reassembled_length = -1;
8386 static gint ett_msg_fragment = -1;
8387 static gint ett_msg_fragments = -1;
8388 
8389 static const fragment_items msg_frag_items = {
8390 	/* Fragment subtrees */
8391 	&ett_msg_fragment,
8392 	&ett_msg_fragments,
8393 	/* Fragment fields */
8394 	&hf_msg_fragments,
8395 	&hf_msg_fragment,
8396 	&hf_msg_fragment_overlap,
8397 	&hf_msg_fragment_overlap_conflicts,
8398 	&hf_msg_fragment_multiple_tails,
8399 	&hf_msg_fragment_too_long_fragment,
8400 	&hf_msg_fragment_error,
8401 	&hf_msg_fragment_count,
8402 	/* Reassembled in field */
8403 	&hf_msg_reassembled_in,
8404 	/* Reassembled length field */
8405 	&hf_msg_reassembled_length,
8406 	NULL,
8407 	/* Tag */
8408 	"Message fragments"
8409 };
8410 
dissect_nfapi_ul_p7(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)8411 static int dissect_nfapi_ul_p7(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8412 {
8413 	guint8 m, seg, seq;
8414 	int offset;
8415 
8416 	guint8 save_fragmented;
8417 
8418 	guint16 msg_id = tvb_get_ntohs(tvb, 2);
8419 	guint16 msg_len = tvb_get_ntohs(tvb, 4);
8420 
8421 	offset = dissect_p7_header(tvb, pinfo, tree, &m, &seg, &seq);
8422 	save_fragmented = pinfo->fragmented;
8423 
8424 	if (m == 1 || (m == 0 && seg > 0))
8425 	{
8426 		fragment_head *fd_head;
8427 		tvbuff_t *save_tvb = tvb;
8428 
8429 		if (offset >= msg_len) {
8430 			return tvb_captured_length(tvb);
8431 		}
8432 
8433 		pinfo->fragmented = TRUE;
8434 
8435 		fd_head = fragment_add_seq_check(&ul_p7_reassemble_table, tvb, offset, pinfo, seq, NULL, seg, msg_len - offset, (m == 1));
8436 
8437 		if (fd_head == NULL)
8438 		{
8439 			return tvb_captured_length(tvb);
8440 		}
8441 
8442 		tvb = process_reassembled_data(tvb, offset, pinfo, "Reassembled UL P7", fd_head, &msg_frag_items, NULL, tree);
8443 		if (tvb)
8444 		{
8445 			offset = 0;
8446 			col_append_fstr(pinfo->cinfo, COL_INFO, "[NFAPI P7 Reassembled %d]", seg);
8447 		}
8448 		else
8449 		{
8450 			col_append_fstr(pinfo->cinfo, COL_INFO, "[NFAPI P7 Segment %d]", seg);
8451 			return tvb_captured_length(save_tvb);
8452 		}
8453 	}
8454 
8455 	pinfo->fragmented = save_fragmented;
8456 
8457 	switch (msg_id)
8458 	{
8459 		case NFAPI_HARQ_INDICATION_MSG_ID:
8460 		case NFAPI_CRC_INDICATION_MSG_ID:
8461 		case NFAPI_RX_ULSCH_INDICATION_MSG_ID:
8462 		case NFAPI_RACH_INDICATION_MSG_ID:
8463 		case NFAPI_SRS_INDICATION_MSG_ID:
8464 		case NFAPI_RX_SR_INDICATION_MSG_ID:
8465 		case NFAPI_RX_CQI_INDICATION_MSG_ID:
8466 		{
8467 			ptvcursor_t *ptvc = ptvcursor_new(pinfo->pool, tree, tvb, offset);
8468 			ptvcursor_add(ptvc, hf_nfapi_sfn_sf, 2, ENC_BIG_ENDIAN);
8469 			dissect_tlv_list(ptvc, pinfo, msg_len);
8470 			ptvcursor_free(ptvc);
8471 		}
8472 		break;
8473 
8474 	};
8475 
8476 
8477 	return tvb_captured_length(tvb);
8478 }
8479 
dissect_nfapi_dl_p7(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)8480 static int dissect_nfapi_dl_p7(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8481 {
8482 	guint8 m, seg, seq;
8483 	int offset;
8484 
8485 	guint8 save_fragmented;
8486 
8487 	guint16 msg_id = tvb_get_ntohs(tvb, 2);
8488 	guint16 msg_len = tvb_get_ntohs(tvb, 4);
8489 
8490 	offset = dissect_p7_header(tvb, pinfo, tree, &m, &seg, &seq);
8491 	save_fragmented = pinfo->fragmented;
8492 
8493 	if (m == 1 || (m == 0 && seg > 0))
8494 	{
8495 		fragment_head *fd_head;
8496 		tvbuff_t *save_tvb = tvb;
8497 
8498 		if (offset >= msg_len) {
8499 			return tvb_captured_length(tvb);
8500 		}
8501 
8502 		pinfo->fragmented = TRUE;
8503 
8504 		fd_head = fragment_add_seq_check(&dl_p7_reassemble_table, tvb, offset, pinfo, seq, NULL, seg, msg_len - offset, (m == 1));
8505 
8506 		if (fd_head == NULL)
8507 		{
8508 			return tvb_captured_length(tvb);
8509 		}
8510 
8511 		tvb = process_reassembled_data(tvb, offset, pinfo, "Reassembled DL P7", fd_head, &msg_frag_items, NULL, tree);
8512 		if (tvb)
8513 		{
8514 			offset = 0;
8515 			col_append_fstr(pinfo->cinfo, COL_INFO, "[NFAPI P7 Reassembled %d]", seg);
8516 		}
8517 		else
8518 		{
8519 			col_append_fstr(pinfo->cinfo, COL_INFO, "[NFAPI P7 Segment %d]", seg);
8520 			return tvb_captured_length(save_tvb);
8521 		}
8522 	}
8523 
8524 	pinfo->fragmented = save_fragmented;
8525 
8526 	switch (msg_id)
8527 	{
8528 		case NFAPI_DL_CONFIG_REQUEST_MSG_ID:
8529 		case NFAPI_UL_CONFIG_REQUEST_MSG_ID:
8530 		case NFAPI_HI_DCI0_REQUEST_MSG_ID:
8531 		case NFAPI_TX_REQUEST_MSG_ID:
8532 		case NFAPI_LBT_DL_CONFIG_REQUEST_MSG_ID:
8533 		case NFAPI_LBT_DL_INDICATION_MSG_ID:
8534 		{
8535 			ptvcursor_t *ptvc = ptvcursor_new(pinfo->pool, tree, tvb, offset);
8536 			ptvcursor_add(ptvc, hf_nfapi_sfn_sf, 2, ENC_BIG_ENDIAN);
8537 			dissect_tlv_list(ptvc, pinfo, msg_len);
8538 			ptvcursor_free(ptvc);
8539 			break;
8540 		}
8541 	}
8542 
8543 	return tvb_captured_length(tvb);
8544 }
8545 
8546 
dissect_nfapi(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)8547 static int dissect_nfapi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8548 {
8549 	proto_tree* nfapi_tree;
8550 	proto_item* nfapi_item;
8551 	guint16 msg_id;
8552 	const gchar* message_str;
8553 
8554 	if (tvb_reported_length(tvb) < 4)
8555 		return 0;
8556 
8557 	col_set_str(pinfo->cinfo, COL_PROTOCOL, "NFAPI");
8558 	col_clear(pinfo->cinfo, COL_INFO);
8559 
8560 	nfapi_item = proto_tree_add_item(tree, proto_nfapi, tvb, 0, -1, ENC_NA);
8561 	nfapi_tree = proto_item_add_subtree(nfapi_item, ett_nfapi);
8562 
8563 	msg_id = tvb_get_ntohs(tvb, 2);
8564 	message_str = val_to_str_const(msg_id, message_id_vals, "Unknown");
8565 
8566 	// Flag if this is a vendor extention message, could do it for P4, 5, 7
8567 	if (msg_id >= 0x0300 && msg_id <= 0x03FF)
8568 	{
8569 		col_append_fstr(pinfo->cinfo, COL_INFO, "Vendor Extension");
8570 		proto_item_append_text(nfapi_item, ", Vendor Extension");
8571 	}
8572 	else
8573 	{
8574 		proto_item_append_text(nfapi_item, ", %s", message_str);
8575 		col_append_fstr(pinfo->cinfo, COL_INFO, " %s ", message_str);
8576 	}
8577 
8578 	if (!dissector_try_uint_new(message_table, msg_id, tvb, pinfo, nfapi_tree, FALSE, NULL))
8579 	{
8580 		call_data_dissector(tvb, pinfo, nfapi_tree);
8581 	}
8582 
8583 	return tvb_captured_length(tvb);
8584 }
8585 
nfapi_tag_vals_fn(gchar * s,guint32 v)8586 static void nfapi_tag_vals_fn(gchar* s, guint32 v)
8587 {
8588 	const tlv_t* tlv = look_up_tlv(v);
8589 	if (tlv != 0)
8590 	{
8591 		g_snprintf(s, ITEM_LABEL_LENGTH, "%s (0x%x)", tlv->name, v);
8592 	}
8593 	else
8594 	{
8595 		g_snprintf(s, ITEM_LABEL_LENGTH, "%s (0x%x)", "Unknown", v);
8596 	}
8597 }
neg_pow_conversion_fn(gchar * s,guint8 v)8598 static void neg_pow_conversion_fn(gchar* s, guint8 v)
8599 {
8600 	g_snprintf(s, ITEM_LABEL_LENGTH, "%d dB (%d)", ((gint16)v * (-1)), v);
8601 }
power_offset_conversion_fn(gchar * s,guint16 v)8602 static void power_offset_conversion_fn(gchar* s, guint16 v)
8603 {
8604 	g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (((float)v * 0.001) - 6.0), v);
8605 }
reference_signal_power_conversion_fn(gchar * s,guint16 v)8606 static void reference_signal_power_conversion_fn(gchar* s, guint16 v)
8607 {
8608 	g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (((float)v * 0.25) - 63.75), v);
8609 }
laa_threshold_conversion_fn(gchar * s,guint16 v)8610 static void laa_threshold_conversion_fn(gchar* s, guint16 v)
8611 {
8612 	g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (float)(v * -100.00), v);
8613 }
max_transmit_power_2_conversion_fn(gchar * s,guint16 v)8614 static void max_transmit_power_2_conversion_fn(gchar* s, guint16 v)
8615 {
8616 	g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1) - 10.0, v);
8617 }
max_transmit_power_conversion_fn(gchar * s,guint16 v)8618 static void max_transmit_power_conversion_fn(gchar* s, guint16 v)
8619 {
8620 	g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1), v);
8621 }
sfn_sf_conversion_fn(gchar * s,guint16 v)8622 static void sfn_sf_conversion_fn(gchar* s, guint16 v)
8623 {
8624 	g_snprintf(s, ITEM_LABEL_LENGTH, "%d/%d (%d)", v >> 0x4, v & 0x000F, v);
8625 }
rssi_conversion_fn(gchar * s,guint16 v)8626 static void rssi_conversion_fn(gchar* s, guint16 v)
8627 {
8628 	g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1), v);
8629 }
dl_rs_tx_pow_measment_conversion_fn(gchar * s,guint16 v)8630 static void dl_rs_tx_pow_measment_conversion_fn(gchar* s, guint16 v)
8631 {
8632 	g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1), v);
8633 }
8634 
ul_cqi_conversion_fn(gchar * s,guint16 v)8635 static void ul_cqi_conversion_fn(gchar* s, guint16 v)
8636 {
8637 	g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (((float)v / 2 ) - 64.0), v);
8638 }
8639 
8640 // ----------------------------------------------------------------------------|
8641 
proto_register_nfapi(void)8642 void proto_register_nfapi(void)
8643 {
8644 	static hf_register_info hf[] =
8645 	{
8646 		{ &hf_msg_fragments,
8647 			{ "Message fragments", "nfapi.fragments",
8648 			FT_NONE, BASE_NONE, NULL, 0x00,
8649 			NULL, HFILL }
8650 		},
8651 		{ &hf_msg_fragment,
8652 			{ "Message fragment", "nfapi.fragment",
8653 			FT_FRAMENUM, BASE_NONE, NULL, 0x00,
8654 			NULL, HFILL }
8655 		},
8656 		{ &hf_msg_fragment_overlap,
8657 			{ "Message fragment overlap", "nfapi.fragment.overlap",
8658 			FT_BOOLEAN, 0, NULL, 0x00,
8659 			NULL, HFILL }
8660 		},
8661 		{ &hf_msg_fragment_overlap_conflicts,
8662 			{ "Message fragment overlapping with conflicting data", "nfapi.fragment.overlap.conflicts",
8663 			FT_BOOLEAN, 0, NULL, 0x00,
8664 			NULL, HFILL }
8665 		},
8666 		{ &hf_msg_fragment_multiple_tails,
8667 			{ "Message has multiple tail fragments", "nfapi.fragment.multiple_tails",
8668 			FT_BOOLEAN, 0, NULL, 0x00,
8669 			NULL, HFILL }
8670 		},
8671 		{ &hf_msg_fragment_too_long_fragment,
8672 			{ "Message fragment too long", "nfapi.fragment.too_long_fragment",
8673 			FT_BOOLEAN, 0, NULL, 0x00,
8674 			NULL, HFILL }
8675 		},
8676 		{ &hf_msg_fragment_error,
8677 			{ "Message defragmentation error", "nfapi.fragment.error",
8678 			FT_FRAMENUM, BASE_NONE, NULL, 0x00,
8679 			NULL, HFILL }
8680 		},
8681 		{ &hf_msg_fragment_count,
8682 			{ "Message fragment count", "nfapi.fragment.count",
8683 			FT_UINT32, BASE_DEC, NULL, 0x00,
8684 			NULL, HFILL }
8685 		},
8686 		{ &hf_msg_reassembled_in,
8687 			{ "Reassembled in", "nfapi.reassembled.in",
8688 			FT_FRAMENUM, BASE_NONE, NULL, 0x00,
8689 			NULL, HFILL }
8690 		},
8691 		{ &hf_msg_reassembled_length,
8692 			{ "Reassembled length", "nfapi.reassembled.length",
8693 			FT_UINT32, BASE_DEC, NULL, 0x00,
8694 			NULL, HFILL }
8695 		},
8696 		{ &hf_nfapi_p4_p5_message_header_phy_id,
8697 			{ "PHY ID", "nfapi.p4_p5_message_header.phy_id",
8698 			FT_UINT16, BASE_DEC, NULL, 0x0,
8699 			"Within the PNF Device, the unique identity of the PHY instance as assigned through the PNF_CONFIG.request", HFILL }
8700 		},
8701 		{ &hf_nfapi_p4_p5_message_header_message_id,
8702 			{ "Message ID", "nfapi.p4_p5_message_header.message_id",
8703 			FT_UINT16, BASE_HEX_DEC, VALS(message_id_vals), 0x0,
8704 			"The nFAPI message identity", HFILL }
8705 		},
8706 		{ &hf_nfapi_p4_p5_message_header_message_length,
8707 			{ "Message Length", "nfapi.p4_p5_message_header.message_length",
8708 			FT_UINT16, BASE_DEC, NULL, 0x0,
8709 			"The length in bytes of the message including the header", HFILL }
8710 		},
8711 		{ &hf_nfapi_p4_p5_message_header_spare,
8712 			{ "Spare", "nfapi.p4_p5_message_header.spare",
8713 			FT_UINT16, BASE_DEC, NULL, 0x0,
8714 			"Reserved field to be populated with zeros on transmission and ignored on reception", HFILL }
8715 		},
8716 		{ &hf_nfapi_p7_message_header_phy_id,
8717 			{ "Phy ID", "nfapi.p7_message_header.phy_id",
8718 			FT_UINT16, BASE_DEC, NULL, 0x0,
8719 			"Within the PNF Device, the unique identity of the PHY instance as assigned through the PNF_CONFIG.request", HFILL }
8720 		},
8721 		{ &hf_nfapi_p7_message_header_message_id,
8722 			{ "Message ID", "nfapi.p7.message_header.message_id",
8723 			FT_UINT16, BASE_HEX_DEC, VALS(message_id_vals), 0x0,
8724 			"The nFAPI message identity", HFILL }
8725 		},
8726 		{ &hf_nfapi_p7_message_header_message_length,
8727 			{ "Message Length", "nfapi.p7_message_header.message_length",
8728 			FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &units_byte_bytes, 0x0,
8729 			"The length in bytes of the message segment including the header", HFILL }
8730 		},
8731 		{ &hf_nfapi_p7_message_header_m,
8732 			{ "More segments", "nfapi.p7_message_header.more_segments",
8733 			FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80,
8734 			"A More flag indicating there are more segments to follow to complete the entire message", HFILL }
8735 		},
8736 		{ &hf_nfapi_p7_message_header_segment,
8737 			{ "Segment Number", "nfapi.p7_message_header.segment_number",
8738 			FT_UINT8, BASE_DEC, NULL, 0x7F,
8739 			"The segment number starting at zero and incrementing by one between each segment", HFILL }
8740 		},
8741 		{ &hf_nfapi_p7_message_header_sequence_number,
8742 			{ "Sequence Number", "nfapi.p7_message_header.m_segment_sequence",
8743 			FT_UINT8, BASE_DEC, NULL, 0x0,
8744 			"The incrementing sequence number for all complete messages over the P7 nFAPI interface per PHY instance", HFILL }
8745 		},
8746 		{ &hf_nfapi_p7_message_header_checksum,
8747 			{ "Checksum", "nfapi.p7_message_header.checksum",
8748 			FT_UINT32, BASE_HEX_DEC, NULL, 0x0,
8749 			"The checksum of the whole message segment (including header) as calculated using "
8750 			"the CRC32c algorithm following the same method as the SCTP protocol defined in IETF RFC 4960 "
8751 			"The Checksum is optional to populate and must be filled with zero's when not used", HFILL }
8752 		},
8753 		{ &hf_nfapi_p7_message_header_transmit_timestamp,
8754 			{ "Transmit Timestamp", "nfapi.p7_message_header.timestamp",
8755 			FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
8756 			"The offset from VNF SFN/SF 0/0 time reference of the message transmission at the transport layer, in microseconds, with a range of 0 to 10239999", HFILL }
8757 		},
8758 		{ &hf_nfapi_tl_tag,
8759 			{ "TLV Tag", "nfapi.tl_tag",
8760 			FT_UINT16, BASE_CUSTOM, CF_FUNC(nfapi_tag_vals_fn), 0x0,
8761 			NULL, HFILL }
8762 		},
8763 		{ &hf_nfapi_tl_length,
8764 			{ "TLV Length", "nfapi.tl_length",
8765 			FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &units_byte_bytes, 0x0,
8766 			NULL, HFILL }
8767 		},
8768 		{ &hf_nfapi_error_code,
8769 			{ "Error Code", "nfapi.error.code",
8770 			FT_UINT32, BASE_DEC, VALS(nfapi_error_vals), 0x0,
8771 			NULL, HFILL }
8772 		},
8773 		{ &hf_nfapi_p4_error_code,
8774 			{ "Error Code", "nfapi.p4_error.code",
8775 			FT_UINT32, BASE_DEC, VALS(nfapi_p4_error_vals), 0x0,
8776 			NULL, HFILL }
8777 		},
8778 		{ &hf_nfapi_rat_type,
8779 			{ "RAT Type", "nfapi.rat_type",
8780 			FT_UINT8, BASE_DEC, VALS(nfapi_rat_type_vals), 0x0,
8781 			NULL, HFILL }
8782 		},
8783 		{ &hf_nfapi_num_tlv,
8784 			{ "Number of TLV", "nfapi.param.response.num_tlv",
8785 			FT_UINT8, BASE_DEC, NULL, 0x0,
8786 			NULL, HFILL }
8787 		},
8788 		{ &hf_nfapi_phy_state,
8789 			{ "Phy state value", "nfapi.phy.state",
8790 			FT_UINT16, BASE_DEC, VALS(nfapi_phy_state_vals), 0x0,
8791 			"Indicates the current operational state of the PHY", HFILL }
8792 		},
8793 		{ &hf_nfapi_dl_ue_per_sf,
8794 			{ "Downlink UEs per Subframe", "nfapi.dl.ue.per.sf",
8795 			FT_UINT8, BASE_DEC, NULL, 0x0,
8796 			"The maximum number of downlink UEs per subframe supported."
8797 			"This is the maximum number of downlink UEs that can be scheduled per "
8798 			"subframe, non-inclusive of broadcast, paging and common channels.", HFILL }
8799 		},
8800 		{ &hf_nfapi_ul_ue_per_sf,
8801 			{ "Uplink UEs per Subframe", "nfapi.ul.ue.per.sf",
8802 			FT_UINT8, BASE_DEC, NULL, 0x0,
8803 			"The maximum number of uplink UEs per subframe supported."
8804 			"This is the maximum number of uplink UEs that can be scheduled per "
8805 			"subframe, non-inclusive of common channels.", HFILL }
8806 		},
8807 		{ &hf_nfapi_duplex_mode,
8808 			{ "Duplex Mode", "nfapi.duplex.mode",
8809 			FT_UINT16, BASE_DEC, VALS(nfapi_duplex_mode_vals), 0x0,
8810 			NULL, HFILL }
8811 		},
8812 		{ &hf_nfapi_dl_bandwidth_support,
8813 			{ "Downlink bandwidth support", "nfapi.dl.bandwidth.support",
8814 			FT_UINT16, BASE_HEX, NULL, 0x0,
8815 			"The PHY downlink channel bandwidth capability (in resource blocks)", HFILL }
8816 		},
8817 		{ &hf_nfapi_dl_bandwidth_support_6,
8818 			{ "6Mhz", "nfapi.dl.bandwidth.support.6",
8819 			FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0001,
8820 			NULL, HFILL }
8821 		},
8822 		{ &hf_nfapi_dl_bandwidth_support_15,
8823 			{ "15Mhz", "nfapi.dl.bandwidth.support.15",
8824 			FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0002,
8825 			NULL, HFILL }
8826 		},
8827 		{ &hf_nfapi_dl_bandwidth_support_25,
8828 			{ "25Mhz", "nfapi.dl.bandwidth.support.25",
8829 			FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0004,
8830 			NULL, HFILL }
8831 		},
8832 		{ &hf_nfapi_dl_bandwidth_support_50,
8833 			{ "50Mhz", "nfapi.dl.bandwidth.support.50",
8834 			FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0008,
8835 			NULL, HFILL }
8836 		},
8837 		{ &hf_nfapi_dl_bandwidth_support_75,
8838 			{ "75Mhz", "nfapi.dl.bandwidth.support.75",
8839 			FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0010,
8840 			NULL, HFILL }
8841 		},
8842 		{ &hf_nfapi_dl_bandwidth_support_100,
8843 			{ "100Mhz", "nfapi.dl.bandwidth.support.100",
8844 			FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0020,
8845 			NULL, HFILL }
8846 		},
8847 		{ &hf_nfapi_ul_bandwidth_support,
8848 			{ "Uplink bandwidth support", "nfapi.ul.bandwidth.support",
8849 			FT_UINT16, BASE_HEX, NULL, 0x0,
8850 			"The PHY uplink channel bandwidth capability (in resource blocks)", HFILL }
8851 		},
8852 		{ &hf_nfapi_ul_bandwidth_support_6,
8853 			{ "6Mhz", "nfapi.ul.bandwidth.support.6",
8854 			FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0001,
8855 			NULL, HFILL }
8856 		},
8857 		{ &hf_nfapi_ul_bandwidth_support_15,
8858 			{ "15Mhz", "nfapi.ul.bandwidth.support.15",
8859 			FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0002,
8860 			NULL, HFILL }
8861 		},
8862 		{ &hf_nfapi_ul_bandwidth_support_25,
8863 			{ "25Mhz", "nfapi.ul.bandwidth.support.25",
8864 			FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0004,
8865 			NULL, HFILL }
8866 		},
8867 		{ &hf_nfapi_ul_bandwidth_support_50,
8868 			{ "50Mhz", "nfapi.ul.bandwidth.support.50",
8869 			FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0008,
8870 			NULL, HFILL }
8871 		},
8872 		{ &hf_nfapi_ul_bandwidth_support_75,
8873 			{ "75Mhz", "nfapi.ul.bandwidth.support.75",
8874 			FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0010,
8875 			NULL, HFILL }
8876 		},
8877 		{ &hf_nfapi_ul_bandwidth_support_100,
8878 			{ "100Mhz", "nfapi.ul.bandwidth.support.100",
8879 			FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0020,
8880 			NULL, HFILL }
8881 		},
8882 		{ &hf_nfapi_dl_modulation_support,
8883 			{ "Downlink modulation support", "nfapi.dl.modulation.support",
8884 			FT_UINT16, BASE_HEX, NULL, 0x0,
8885 			"The PHY downlink modulation capability", HFILL }
8886 		},
8887 		{ &hf_nfapi_dl_modulation_support_qpsk,
8888 			{ "QPSK", "nfapi.dl.modulation.support.qpsk",
8889 			FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0001,
8890 			NULL, HFILL }
8891 		},
8892 		{ &hf_nfapi_dl_modulation_support_16qam,
8893 			{ "16QAM", "nfapi.dl.modulation.support.16qam",
8894 			FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0002,
8895 			NULL, HFILL }
8896 		},
8897 		{ &hf_nfapi_dl_modulation_support_64qam,
8898 			{ "64QAM", "nfapi.dl.modulation.support.64qam",
8899 			FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0004,
8900 			NULL, HFILL }
8901 		},
8902 		{ &hf_nfapi_dl_modulation_support_256qam,
8903 			{ "256QAM", "nfapi.dl.modulation.support.256qam",
8904 			FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0008,
8905 			NULL, HFILL }
8906 		},
8907 		{ &hf_nfapi_ul_modulation_support,
8908 			{ "Uplink modulation support", "nfapi.ul.modulation.support",
8909 			FT_UINT16, BASE_HEX, NULL, 0x0,
8910 			"The PHY uplink modulation capability", HFILL }
8911 		},
8912 		{ &hf_nfapi_ul_modulation_support_qpsk,
8913 			{ "QPSK", "nfapi.ul.modulation.support.qpsk",
8914 			FT_BOOLEAN, 16, NULL, 0x0001,
8915 			NULL, HFILL }
8916 		},
8917 		{ &hf_nfapi_ul_modulation_support_16qam,
8918 			{ "16QAM", "nfapi.ul.modulation.support.16qam",
8919 			FT_BOOLEAN, 16, NULL, 0x0002,
8920 			NULL, HFILL }
8921 		},
8922 		{ &hf_nfapi_ul_modulation_support_64qam,
8923 			{ "64QAM", "nfapi.ul.modulation.support.64qam",
8924 			FT_BOOLEAN, 16, NULL, 0x0004,
8925 			NULL, HFILL }
8926 		},
8927 		{ &hf_nfapi_phy_antenna_capability,
8928 			{ "Phy Antenna capability", "nfapi.phy.antenna.capability",
8929 			FT_UINT16, BASE_DEC, NULL, 0x0,
8930 			"Number of antennas supported", HFILL }
8931 		},
8932 		{ &hf_nfapi_release_capability,
8933 			{ "Release capability", "nfapi.release.capability",
8934 			FT_UINT16, BASE_DEC, NULL, 0x0,
8935 			"Indicates which release the PHY supports", HFILL }
8936 		},
8937 		{ &hf_nfapi_mbsfn_capability,
8938 			{ "MBSFN capability", "nfapi.mbsfn.capability",
8939 			FT_BOOLEAN, 16, TFS(&support_strname), 0x0,
8940 			"Indicates support for MBSFN features", HFILL }
8941 		},
8942 		{ &hf_nfapi_laa_capability,
8943 			{ "LAA Support", "nfapi.laa.support",
8944 			FT_BOOLEAN, 16, TFS(&support_strname), 0x0,
8945 			"Indicates support for LAA features", HFILL }
8946 		},
8947 		{ &hf_nfapi_pd_sensing_lbt_support,
8948 			{ "PD sensing LBT support", "nfapi.pd.sensing.lbt.support",
8949 			FT_BOOLEAN, 16, TFS(&support_strname), 0x0,
8950 			"Indicates support for PD sensing in L1", HFILL }
8951 		},
8952 		{ &hf_nfapi_multi_carrier_lbt_support,
8953 			{ "Multi carrier LBT support", "nfapi.multi.carrier.lbt.support",
8954 			FT_UINT16, BASE_DEC, VALS(nfapi_multi_carrier_lbt_support_vals), 0x0,
8955 			NULL, HFILL }
8956 		},
8957 		{ &hf_nfapi_partial_sf_support,
8958 			{ "Partial SF support", "nfapi.partial.sf.support",
8959 			FT_BOOLEAN, 8, TFS(&partial_sf_support_strname), 0x0,
8960 			"Indicates support for Partial SF in L1", HFILL }
8961 		},
8962 		{ &hf_nfapi_reference_signal_power,
8963 			{ "Reference signal power", "nfapi.ref_sig_power",
8964 			FT_UINT16, BASE_CUSTOM, CF_FUNC(reference_signal_power_conversion_fn), 0x0,
8965 			"Normalized value levels (relative) to accommodate different absolute Tx Power used by eNb", HFILL }
8966 		},
8967 		{ &hf_nfapi_primary_synchronization_signal_epre_eprers,
8968 			{ "Primary synchronization signal EPRE/EPRERS", "nfapi.primary.sync.signal",
8969 			FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
8970 			"The power of synchronization signal with respect to the reference signal, (PSS for LTE cell, NPSS for NB-IOT cell)", HFILL }
8971 		},
8972 		{ &hf_nfapi_secondary_synchronization_signal_epre_eprers,
8973 			{ "Secondary synchronization signal EPRE/EPRERS", "nfapi.secondary.sync.signal",
8974 			FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
8975 			"The power of synchronization signal with respect to the reference signal, (SSS for LTE cell, NSSS for NB-IOT cell)", HFILL }
8976 		},
8977 		{ &hf_nfapi_physical_cell_id,
8978 			{ "Physical Cell ID", "nfapi.physical.cell.id",
8979 			FT_UINT16, BASE_DEC, NULL, 0x0,
8980 			"The Cell ID sent with the synchronization signal", HFILL }
8981 		},
8982 		{ &hf_nfapi_phich_resource,
8983 			{ "PHICH Resource", "nfapi.phich.resource",
8984 			FT_UINT16, BASE_DEC, VALS(nfapi_phich_resource_vals), 0x0,
8985 			"The number of resource element groups used for PHICH", HFILL }
8986 		},
8987 		{ &hf_nfapi_phich_duration,
8988 			{ "PHICH Duration", "nfapi.phich.duration",
8989 			FT_BOOLEAN, 8, TFS(&phich_duration_strname), 0x0,
8990 			"The PHICH duration for MBSFN and non-MBSFN sub-frames", HFILL }
8991 		},
8992 		{ &hf_nfapi_phich_power_offset,
8993 			{ "PHICH Power Offset", "nfapi.phich.power.offset",
8994 			FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
8995 			"The power per antenna of the PHICH with respect to the reference signal", HFILL }
8996 		},
8997 		{ &hf_nfapi_configuration_index,
8998 			{ "Configuration Index", "nfapi.configuration.index",
8999 			FT_UINT16, BASE_DEC, NULL, 0x0,
9000 			"Provides information about the location and format of the PRACH.", HFILL }
9001 		},
9002 		{ &hf_nfapi_root_sequence_index,
9003 			{ "Root sequence Index", "nfapi.root.sequence.index",
9004 			FT_UINT16, BASE_DEC, NULL, 0x0,
9005 			"PRACH Root sequence Index", HFILL }
9006 		},
9007 		{ &hf_nfapi_zero_correlation_zone_configuration,
9008 			{ "Zero correlation zone configuration", "nfapi.zero.correlation.zone.configuration",
9009 			FT_UINT16, BASE_DEC, NULL, 0x0,
9010 			"Equivalent to Ncs", HFILL }
9011 		},
9012 		{ &hf_nfapi_high_speed_flag,
9013 			{ "High Speed Flag", "nfapi.high.speed.flag",
9014 			FT_BOOLEAN, 8, TFS(&high_speed_flag_strname), 0x0,
9015 			"Indicates if unrestricted, or restricted, set of preambles is used", HFILL }
9016 		},
9017 		{ &hf_nfapi_frequency_offset,
9018 			{ "Frequency offset", "nfapi.frequency.offset",
9019 			FT_UINT16, BASE_DEC, NULL, 0x0,
9020 			"The first physical resource block available for PRACH", HFILL }
9021 		},
9022 		{ &hf_nfapi_hopping_mode,
9023 			{ "Hopping Mode", "nfapi.hopping.mode",
9024 			FT_BOOLEAN, 8, TFS(&hopping_mode_strname), 0x0,
9025 			"If hopping is enabled indicates the type of hopping used", HFILL }
9026 		},
9027 		{ &hf_nfapi_hopping_offset,
9028 			{ "Hopping offset", "nfapi.hopping.offset",
9029 			FT_UINT16, BASE_DEC, NULL, 0x0,
9030 			"The offset used if hopping is enabled", HFILL }
9031 		},
9032 		{ &hf_nfapi_delta_pucch_shift,
9033 			{ "Delta PUCCH Shift", "nfapi.delta.pucch.shift",
9034 			FT_UINT16, BASE_DEC, NULL, 0x0,
9035 			"The cyclic shift difference", HFILL }
9036 		},
9037 		{ &hf_nfapi_n_cqi_rb,
9038 			{ "N CQI RB", "nfapi.n.cqi.rb",
9039 			FT_UINT16, BASE_DEC, NULL, 0x0,
9040 			"The bandwidth, in units of resource blocks, that is available for use by PUCCH formats 2/2a/2b transmission in each slot", HFILL }
9041 		},
9042 		{ &hf_nfapi_n_an_cs,
9043 			{ "N AN CS", "nfapi.n.an.cs",
9044 			FT_UINT16, BASE_DEC, NULL, 0x0,
9045 			"The number of cyclic shifts used for PUCCH formats 1/1a/1b in a resource block with a mix of formats 1/a/1/ab and 2/2a/2b.", HFILL }
9046 		},
9047 		{ &hf_nfapi_n1_pucch_an,
9048 			{ "N1 PUCCH AN", "nfapi.n1.pucch.an",
9049 			FT_UINT16, BASE_DEC, NULL, 0x0,
9050 			"N1 PUCCH", HFILL }
9051 		},
9052 		{ &hf_nfapi_bandwidth_configuration,
9053 			{ "Bandwidth configuration", "nfapi.bw.configuration",
9054 			FT_UINT16, BASE_DEC, NULL, 0x0,
9055 			"The available SRS bandwidth of the cell", HFILL }
9056 		},
9057 		{ &hf_nfapi_srs_subframe_configuration,
9058 			{ "SRS subframe configuration", "nfapi.srs.subframe.configuration",
9059 			FT_UINT16, BASE_DEC, NULL, 0x0,
9060 			"The subframe configuration. Needed if semi-static configuration is held in PHY", HFILL }
9061 		},
9062 		{ &hf_nfapi_uplink_rs_hopping,
9063 			{ "Uplink RS hopping", "nfapi.uplink.rs.hopping",
9064 			FT_UINT16, BASE_DEC, VALS(nfapi_uplink_rs_hopping_vals), 0x0,
9065 			"Indicates the type of hopping to use", HFILL }
9066 		},
9067 		{ &hf_nfapi_group_assignment,
9068 			{ "Group assignment", "nfapi.group.assignment",
9069 			FT_UINT16, BASE_DEC, NULL, 0x0,
9070 			"The sequence shift pattern used if group hopping is enabled", HFILL }
9071 		},
9072 		{ &hf_nfapi_cyclic_shift_1_for_drms,
9073 			{ "Cyclic Shift 1 for DRMS", "nfapi.cyclic.shift.1.for.drms",
9074 			FT_UINT16, BASE_DEC, NULL, 0x0,
9075 			"Specifies the cyclic shift for the reference signal used in the cell.", HFILL }
9076 		},
9077 		{ &hf_nfapi_subframe_assignment,
9078 			{ "Subframe_assignment", "nfapi.subframe.assignment",
9079 			FT_UINT16, BASE_DEC, NULL, 0x0,
9080 			"For TDD mode only, indicates the DL/UL subframe structure", HFILL }
9081 		},
9082 		{ &hf_nfapi_special_subframe_patterns,
9083 			{ "Special Subframe patterns", "nfapi.special.subframe.patterns",
9084 			FT_UINT16, BASE_DEC, NULL, 0x0,
9085 			"For TDD mode only. Length of fields DwPTS, GP and UpPTS", HFILL }
9086 		},
9087 		{ &hf_nfapi_ed_threshold_for_lbt_for_pdsch,
9088 			{ "ED Threshold for LBT for PDSCH", "nfapi.ed.threshold.for.lbt.pdsch",
9089 			FT_UINT16, BASE_CUSTOM, CF_FUNC(laa_threshold_conversion_fn), 0x0,
9090 			"Indicates the energy detection threshold in dBm for LBT for PDSCH", HFILL }
9091 		},
9092 		{ &hf_nfapi_ed_threshold_for_lbt_for_drs,
9093 			{ "ED Threshold for LBT for DRS", "nfapi.ed.threshold.for.lbt.for.drs",
9094 			FT_UINT16, BASE_CUSTOM, CF_FUNC(laa_threshold_conversion_fn), 0x0,
9095 			"Indicates the energy detection threshold in dBm for LBT for DRS", HFILL }
9096 		},
9097 		{ &hf_nfapi_pd_threshold,
9098 			{ "PD Threshold", "nfapi.pd.threshold",
9099 			FT_UINT16, BASE_CUSTOM, CF_FUNC(laa_threshold_conversion_fn), 0x0,
9100 			"Indicates the preamble detection threshold in dBm, if the L1 capabilities support PD", HFILL }
9101 		},
9102 		{ &hf_nfapi_multi_carrier_type,
9103 			{ "Multi carrier type", "nfapi.multi.carrier.type",
9104 			FT_UINT16, BASE_DEC, VALS(nfapi_laa_carrier_type_vals), 0x0,
9105 			"Indicates multi carrier type configuration of L1 (according to L1 capabilities and L2 scheduler requirements", HFILL }
9106 		},
9107 		{ &hf_nfapi_multi_carrier_tx,
9108 			{ "Multi carrier TX", "nfapi.multi.carrier.tx",
9109 			FT_BOOLEAN, 8, TFS(&nfapi_multi_carrier_tx_strname), 0x0,
9110 			"Indicates multi carrier transmission configuration of L1 (according to type if supporting multi carrier)", HFILL }
9111 		},
9112 		{ &hf_nfapi_multi_carrier_freeze,
9113 			{ "Multi carrier freeze", "nfapi.multi.carrier.freeze",
9114 			FT_BOOLEAN, 8, TFS(&nfapi_multi_carrier_freeze_strname), 0x0,
9115 			"Indicates multi carrier freeze, configuration of L1 (applicable only to type A type if supporting multi carrier)", HFILL }
9116 		},
9117 		{ &hf_nfapi_tx_antenna_ports_for_drs,
9118 			{ "Tx antenna ports for DRS", "nfapi.tx.antenna.ports.for.drs",
9119 			FT_UINT16, BASE_DEC, NULL, 0x0,
9120 			"The number of cell specific transmit antenna ports within the DRS occasions", HFILL }
9121 		},
9122 		{ &hf_nfapi_transmission_power_for_drs,
9123 			{ "Transmission power for DRS", "nfapi.transmission.power.for.drs",
9124 			FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
9125 			"Offset of cell specific Reference signals power within DRS occasions to the reference signal power", HFILL }
9126 		},
9127 		{ &hf_nfapi_pbch_repetitions_enabled_r13,
9128 			{ "PBCH Repetitions enable R13", "nfapi.pbch.repetitions.enabled_r13",
9129 			FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9130 			"Enable / Disable PBCH repetitions", HFILL }
9131 		},
9132 		{ &hf_nfapi_prach_cat_m_root_sequence_index,
9133 			{ "PRACH CAT-M Root sequence Index", "nfapi.prach.cat_m.root.sequence.index",
9134 			FT_UINT16, BASE_DEC, NULL, 0x0,
9135 			"PRACH Root sequence Index", HFILL }
9136 		},
9137 		{ &hf_nfapi_prach_cat_m_zero_correlation_zone_configuration,
9138 			{ "PRACH CAT-M Zero correlation zone configuration", "nfapi.prach.cat_m.zero.correlation.zone.configuration",
9139 			FT_UINT16, BASE_DEC, NULL, 0x0,
9140 			"Equivalent to Ncs", HFILL }
9141 		},
9142 		{ &hf_nfapi_prach_cat_m_high_speed_flag,
9143 			{ "PRACH CAT-M High speed flag", "nfapi.prach.cat_m.high.speed.flag",
9144 			FT_BOOLEAN, 8, TFS(&high_speed_flag_strname), 0x0,
9145 			"Indicates if unrestricted, or restricted, set of preambles is used", HFILL }
9146 		},
9147 		{ &hf_nfapi_prach_ce_level_0_enable,
9148 			{ "PRACH CE level #0 Enable", "nfapi.prach.ce.level.0.enable",
9149 			FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9150 			"Enable \\ Disable CE level #0.", HFILL }
9151 		},
9152 		{ &hf_nfapi_prach_ce_level_0_configuration_index,
9153 			{ "PRACH CE level #0 Configuration Index", "nfapi.prach.ce.level.0.configuration.index",
9154 			FT_UINT16, BASE_DEC, NULL, 0x0,
9155 			"Provides information about the location and format of the PRACH", HFILL }
9156 		},
9157 		{ &hf_nfapi_prach_ce_level_0_frequency_offset,
9158 			{ "PRACH CE level #0 Frequency offset", "nfapi.prach.ce.level.0.frequency_offset",
9159 			FT_UINT16, BASE_DEC, NULL, 0x0,
9160 			"The first physical resource block available for PRACH for each CE", HFILL }
9161 		},
9162 		{ &hf_nfapi_prach_ce_level_0_number_of_repetitions_per_attempt,
9163 			{ "PRACH CE level #0 Number of repetitions per attempt", "nfapi.prach.ce.level.0.number.of.repetitions.per_attempt",
9164 			FT_UINT16, BASE_DEC, NULL, 0x0,
9165 			"Number of PRACH repetitions per attempt for each CE level", HFILL }
9166 		},
9167 		{ &hf_nfapi_prach_ce_level_0_starting_subframe_periodicity,
9168 			{ "CE level #0 Starting subframe periodicity", "nfapi.prach.ce.level.0.starting.subframe_periodicity",
9169 			FT_UINT16, BASE_DEC, NULL, 0x0,
9170 			"Optional. PRACH starting subframe periodicity, expressed in number of slots available for preamble transmission(PRACH opportunities)", HFILL }
9171 		},
9172 		{ &hf_nfapi_prach_ce_level_0_hopping_enabled,
9173 			{ "PRACH CE level #0 Hopping Enable", "nfapi.prach.ce.level.0.hopping_enable",
9174 			FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9175 			"Enable \\ Disable PRACH frequency hopping for each CE level", HFILL }
9176 		},
9177 		{ &hf_nfapi_prach_ce_level_0_hopping_offset,
9178 			{ "PRACH CE level #0 Hopping Offset", "nfapi.prach.ce.level.0.hopping.offset",
9179 			FT_UINT16, BASE_DEC, NULL, 0x0,
9180 			"Valid in case 'PRACH Hopping Enable' is enabled", HFILL }
9181 		},
9182 		{ &hf_nfapi_prach_ce_level_1_enable,
9183 			{ "PRACH CE level #1 Enable", "nfapi.prach.ce.level.0.enable",
9184 			FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9185 			"Enable \\ Disable CE level #1", HFILL }
9186 		},
9187 		{ &hf_nfapi_prach_ce_level_1_configuration_index,
9188 			{ "PRACH CE level #1 Configuration Index", "nfapi.prach.ce.level.1.configuration.index",
9189 			FT_UINT16, BASE_DEC, NULL, 0x0,
9190 			"Provides information about the location and format of the PRACH", HFILL }
9191 		},
9192 		{ &hf_nfapi_prach_ce_level_1_frequency_offset,
9193 			{ "PRACH CE level #1 Frequency offset", "nfapi.prach.ce.level.1.frequency_offset",
9194 			FT_UINT16, BASE_DEC, NULL, 0x0,
9195 			"The first physical resource block available for PRACH for each CE", HFILL }
9196 		},
9197 		{ &hf_nfapi_prach_ce_level_1_number_of_repetitions_per_attempt,
9198 			{ "PRACH CE level #1 Number of repetitions per attempt", "nfapi.prach.ce.level.1.number.of.repetitions.per_attempt",
9199 			FT_UINT16, BASE_DEC, NULL, 0x0,
9200 			"Number of PRACH repetitions per attempt for each CE level", HFILL }
9201 		},
9202 		{ &hf_nfapi_prach_ce_level_1_starting_subframe_periodicity,
9203 			{ "CE level #1 Starting subframe periodicity", "nfapi.prach.ce.level.1.starting.subframe_periodicity",
9204 			FT_UINT16, BASE_DEC, NULL, 0x0,
9205 			"Optional.PRACH starting subframe periodicity, expressed in number of slots available for preamble transmission(PRACH opportunities),", HFILL }
9206 		},
9207 		{ &hf_nfapi_prach_ce_level_1_hopping_enabled,
9208 			{ "PRACH CE level #1 Hopping Enable", "nfapi.prach.ce.level.1.hopping_enable",
9209 			FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9210 			"Enable \\ Disable PRACH frequency hopping for each CE level.", HFILL }
9211 		},
9212 		{ &hf_nfapi_prach_ce_level_1_hopping_offset,
9213 			{ "PRACH CE level #1 Hopping Offset", "nfapi.prach.ce.level.1.hopping.offset",
9214 			FT_UINT16, BASE_DEC, NULL, 0x0,
9215 			"Valid in case 'PRACH Hopping Enable' is enabled.", HFILL }
9216 		},
9217 		{ &hf_nfapi_prach_ce_level_2_enable,
9218 			{ "PRACH CE level #2 Enable", "nfapi.prach.ce.level.2.enable",
9219 			FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9220 			"Enable \\ Disable CE level #2", HFILL }
9221 		},
9222 		{ &hf_nfapi_prach_ce_level_2_configuration_index,
9223 			{ "PRACH CE level #2 Configuration Index", "nfapi.prach.ce.level.2.configuration.index",
9224 			FT_UINT16, BASE_DEC, NULL, 0x0,
9225 			"Provides information about the location and format of the PRACH", HFILL }
9226 		},
9227 		{ &hf_nfapi_prach_ce_level_2_frequency_offset,
9228 			{ "PRACH CE level #2 Frequency offset", "nfapi.prach.ce.level.2.frequency_offset",
9229 			FT_UINT16, BASE_DEC, NULL, 0x0,
9230 			"The first physical resource block available for PRACH for each CE", HFILL }
9231 		},
9232 		{ &hf_nfapi_prach_ce_level_2_number_of_repetitions_per_attempt,
9233 			{ "PRACH CE level #2 Number of repetitions per attempt", "nfapi.prach.ce.level.2.number.of.repetitions.per_attempt",
9234 			FT_UINT16, BASE_DEC, NULL, 0x0,
9235 			"Number of PRACH repetitions per attempt for each CE level", HFILL }
9236 		},
9237 		{ &hf_nfapi_prach_ce_level_2_starting_subframe_periodicity,
9238 			{ "CE level #2 Starting subframe periodicity", "nfapi.prach.ce.level.2.starting.subframe_periodicity",
9239 			FT_UINT16, BASE_DEC, NULL, 0x0,
9240 			"Optional. PRACH starting subframe periodicity, expressed in number of slots available for preamble transmission(PRACH opportunities)", HFILL }
9241 		},
9242 		{ &hf_nfapi_prach_ce_level_2_hopping_enabled,
9243 			{ "PRACH CE level #2 Hopping Enable", "nfapi.prach.ce.level.2.hopping_enable",
9244 			FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9245 			"Enable \\ Disable PRACH frequency hopping for each CE level", HFILL }
9246 		},
9247 		{ &hf_nfapi_prach_ce_level_2_hopping_offset,
9248 			{ "PRACH CE level #2 Hopping Offset", "nfapi.prach.ce.level.2.hopping.offset",
9249 			FT_UINT16, BASE_DEC, NULL, 0x0,
9250 			"Valid in case 'PRACH Hopping Enable' is enabled.", HFILL }
9251 		},
9252 		{ &hf_nfapi_prach_ce_level_3_enable,
9253 			{ "PRACH CE level #3 Enable", "nfapi.prach.ce.level.3.enable",
9254 			FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9255 			"Enable \\ Disable CE level #3.", HFILL }
9256 		},
9257 		{ &hf_nfapi_prach_ce_level_3_configuration_index,
9258 			{ "PRACH CE level #3 Configuration Index", "nfapi.prach.ce.level.3.configuration.index",
9259 			FT_UINT16, BASE_DEC, NULL, 0x0,
9260 			"Provides information about the location and format of the PRACH.", HFILL }
9261 		},
9262 		{ &hf_nfapi_prach_ce_level_3_frequency_offset,
9263 			{ "PRACH CE level #3 Frequency offset", "nfapi.prach.ce.level.3.frequency_offset",
9264 			FT_UINT16, BASE_DEC, NULL, 0x0,
9265 			"The first physical resource block available for PRACH for each CE", HFILL }
9266 		},
9267 		{ &hf_nfapi_prach_ce_level_3_number_of_repetitions_per_attempt,
9268 			{ "PRACH CE level #3 Number of repetitions per attempt", "nfapi.prach.ce.level.3.number.of.repetitions.per_attempt",
9269 			FT_UINT16, BASE_DEC, NULL, 0x0,
9270 			"Number of PRACH repetitions per attempt for each CE level", HFILL }
9271 		},
9272 		{ &hf_nfapi_prach_ce_level_3_starting_subframe_periodicity,
9273 			{ "CE level #3 Starting subframe periodicity", "nfapi.prach.ce.level.3.starting.subframe_periodicity",
9274 			FT_UINT16, BASE_DEC, NULL, 0x0,
9275 			"Optional. PRACH starting subframe periodicity, expressed in number of slots available for preamble transmission(PRACH opportunities)", HFILL }
9276 		},
9277 		{ &hf_nfapi_prach_ce_level_3_hopping_enabled,
9278 			{ "PRACH CE level #3 Hopping Enable", "nfapi.prach.ce.level.3.hopping_enable",
9279 			FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9280 			"Enable \\ Disable PRACH frequency hopping for each CE level.", HFILL }
9281 		},
9282 		{ &hf_nfapi_prach_ce_level_3_hopping_offset,
9283 			{ "PRACH CE level #3 Hopping Offset", "nfapi.prach.ce.level.3.hopping.offset",
9284 			FT_UINT16, BASE_DEC, NULL, 0x0,
9285 			"Valid in case 'PRACH Hopping Enable' is enabled.", HFILL }
9286 		},
9287 		{ &hf_nfapi_pucch_internal_ul_hopping_config_common_mode_a,
9288 			{ "PUCCH Interval-ULHoppingConfigCommonModeA", "nfapi.pucch.interval.ulhopping.config.common.mode.a",
9289 			FT_UINT16, BASE_DEC, NULL, 0x0,
9290 			"NthULNB for UEModeA", HFILL }
9291 		},
9292 		{ &hf_nfapi_pucch_internal_ul_hopping_config_common_mode_b,
9293 			{ "PUCCH Interval-ULHoppingConfigCommonModeB", "nfapi.pucch.interval.ulhopping.config.common.mode.b",
9294 			FT_UINT16, BASE_DEC, NULL, 0x0,
9295 			"NthULNB for UEModeB", HFILL }
9296 		},
9297 		{ &hf_nfapi_data_report_mode,
9298 			{ "Data Report Mode", "nfapi.data.report.mode",
9299 			FT_BOOLEAN, 8, TFS(&data_report_mode_vals), 0x0,
9300 			"The data report mode for the uplink data", HFILL }
9301 		},
9302 		{ &hf_nfapi_sfnsf,
9303 			{ "SFN/SF", "nfapi.sfn.sf",
9304 			FT_UINT16, BASE_CUSTOM, CF_FUNC(sfn_sf_conversion_fn), 0x0,
9305 			"The future SFN/SF subframe where the TLVs included in the message should be applied", HFILL }
9306 		},
9307 		{ &hf_nfapi_max_up_pts,
9308 			{ "Max UpPTS frames", "nfapi.max.uppts.frame",
9309 			FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9310 			"Used for TDD only and indicates how SRS operates in UpPTS subframes", HFILL }
9311 		},
9312 		{ &hf_nfapi_srs_acknack_srs_simultaneous_transmission,
9313 			{ "SRS AckNack Simultaneous transmission", "nfapi.srs.acknack.simult.tx",
9314 			FT_BOOLEAN, 8, TFS(&srs_simult_tx_strname), 0x0,
9315 			"Indicates if SRS and ACK/NACK can be received in the same subframe. Needed if semi-static configuration is held in PHY.", HFILL }
9316 		},
9317 		{ &hf_nfapi_pnf_address_ipv4,
9318 			{ "PNF IPV4", "nfapi.pnf.address.ipv4",
9319 			FT_IPv4, BASE_NONE, NULL, 0x0,
9320 			"The IPv4 address of the PNF PHY instance to be used by the VNF for this PNF PHY instance", HFILL }
9321 		},
9322 		{ &hf_nfapi_pnf_address_ipv6,
9323 			{ "PNF IPV6", "nfapi.pnf.address.ipv6",
9324 			FT_IPv6, BASE_NONE, NULL, 0x0,
9325 			"The IPv6 address of the PNF PHY instance to be used by the VNF for this PNF PHY instance", HFILL }
9326 		},
9327 		{ &hf_nfapi_vnf_address_ipv4,
9328 			{ "VNF IPV4 Address", "nfapi.vnf.address.ipv4",
9329 			FT_IPv4, BASE_NONE, NULL, 0x0,
9330 			"The IPv4 address of the VNF to be used by the PNF for this P7 PHY instance", HFILL }
9331 		},
9332 		{ &hf_nfapi_vnf_address_ipv6,
9333 			{ "VNF IPV6 Address", "nfapi.vnf.address.ipv6",
9334 			FT_IPv6, BASE_NONE, NULL, 0x0,
9335 			"The IPv6 address of the VNF to be used by the PNF for this P7 PHY instance", HFILL }
9336 		},
9337 		{ &hf_nfapi_pnf_port,
9338 			{ "PNF PORT value", "nfapi.config.pnf.port.value",
9339 			FT_UINT16, BASE_DEC, NULL, 0x0,
9340 			"The port of the PNF PHY instance to be used by the VNF for this PNF PHY instance", HFILL }
9341 		},
9342 		{ &hf_nfapi_vnf_port,
9343 			{ "VNF PORT value", "nfapi.config.vnf.port.value",
9344 			FT_UINT16, BASE_DEC, NULL, 0x0,
9345 			"The port of the VNF to be used by the PNF for this P7 PHY instance", HFILL } },
9346 		{ &hf_nfapi_sync_mode,
9347 			{ "Sync Mode", "nfapi.sync.mode",
9348 			FT_UINT8, BASE_DEC, VALS(nfapi_sync_mode_vals), 0x0,
9349 			"The method of nFAPI Synchronization supported by the PNF", HFILL }
9350 		},
9351 		{ &hf_nfapi_location_mode,
9352 			{ "Location Mode", "nfapi.location.mode",
9353 			FT_UINT8, BASE_DEC, VALS(location_mode_vals), 0x0,
9354 			"The method of location derivation supported by the PNF", HFILL }
9355 		},
9356 		{ &hf_nfapi_location_coordinates,
9357 			{ "Location Coordinates", "nfapi.location.coordinates",
9358 			FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
9359 			"The Location of the PNF. The value is formatted as the LocationCoordinates IE using BASIC-PER encoding as defined in "
9360 			"TS36.355 section 6.4.2. The first bit of the LocationCoordinates IE is in the LSB of the first byte of the array."
9361 			"The MSBs of the last element of the array may be padded with zeros if the ASN.1 element is not an integer number of bytes", HFILL }
9362 		},
9363 		{ &hf_nfapi_pdu,
9364 			{ "PDU", "nfapi.pdu",
9365 			FT_BYTES, BASE_NONE, NULL, 0x0,
9366 			NULL, HFILL }
9367 		},
9368 		{ &hf_nfapi_dl_config_timing,
9369 			{ "DL config Timing", "nfapi.dl.config.timing",
9370 			FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
9371 			"The timing offset before the air interface subframe start that the DL_Config.request must be received at the PNF.", HFILL }
9372 		},
9373 		{ &hf_nfapi_tx_timing,
9374 			{ "Tx Timing", "nfapi.general.tx.timing",
9375 			FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
9376 			"The timing offset before the air interface subframe start that the TX.request must be received at the PNF.", HFILL }
9377 		},
9378 		{ &hf_nfapi_ul_config_timing,
9379 			{ "UL Config Timing", "nfapi.ul.config.timing",
9380 			FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
9381 			"The timing offset before the air interface subframe start that the UL_CONFIG.request must be received at the PNF.", HFILL }
9382 		},
9383 		{ &hf_nfapi_hi_dci0_timing,
9384 			{ "HI DCi0 Timing", "nfapi.hi.dci0.timing",
9385 			FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
9386 			"The timing offset before the air interface subframe start that the HI_DCI0.request must be received at the PNF.", HFILL }
9387 		},
9388 		{ &hf_nfapi_maximum_number_phys,
9389 			{ "Maximum number of Phys", "nfapi.maximum.number.phys",
9390 			FT_UINT16, BASE_DEC, NULL, 0x0,
9391 			"The maximum number of operational PHYs supported by the PNF device.", HFILL }
9392 		},
9393 		{ &hf_nfapi_maximum_total_bandwidth,
9394 			{ "Maximum Total Bandwidth", "nfapi.maximum.total.bandwidth",
9395 			FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &khz_100_units_db, 0x0,
9396 			"The total maximum bandwidth (in units of 100kHz) supported by the PNF device.", HFILL }
9397 		},
9398 		{ &hf_nfapi_maximum_total_number_dl_layers,
9399 			{ "Maximum Total Number DL Layers", "nfapi.maximum.total.number.dl.layers",
9400 			FT_UINT16, BASE_DEC, NULL, 0x0,
9401 			"The maximum total number of downlink layers supported.", HFILL }
9402 		},
9403 		{ &hf_nfapi_maximum_total_number_ul_layers,
9404 			{ "Maximum Total Number UL Layers", "nfapi.maximum.total.number.ul.layers",
9405 			FT_UINT16, BASE_DEC, NULL, 0x0,
9406 			"The maximum total number of uplink layers supported across all available PHYs.", HFILL }
9407 		},
9408 		{ &hf_nfapi_shared_bands,
9409 			{ "Shared bands", "nfapi.shared.bands",
9410 			FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x0,
9411 			"Indication that the PNF device shares the list of RF band options available across all available PHYs, so each may only be used with a single PHY.", HFILL }
9412 		},
9413 		{ &hf_nfapi_shared_pa,
9414 			{ "Shared pa", "nfapi.shared.pa",
9415 			FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x0,
9416 			"Indication that the PNF device shares a single RF PA across all available PHYs, so that the maximum Total Power is shared across all available PHYs.", HFILL }
9417 		},
9418 		{ &hf_nfapi_maximum_total_power,
9419 			{ "Maximum total power", "nfapi.maximum.total.power",
9420 			FT_UINT16, BASE_CUSTOM, CF_FUNC(dl_rs_tx_pow_measment_conversion_fn), 0x0,
9421 			"The maximum transmit power of the PNF device summed across all PHYs.", HFILL }
9422 		},
9423 		{ &hf_nfapi_oui,
9424 			{ "OUI", "nfapi.oui",
9425 			FT_STRING, BASE_NONE, NULL, 0x0,
9426 			"The PNF OUI in the format as specified by IEEE", HFILL }
9427 		},
9428 		{ &hf_nfapi_pnf_phy_number_phy,
9429 			{ "PNF Phy Number of Phy", "nfapi.pnf.phy.number.phy",
9430 			FT_UINT16, BASE_DEC, NULL, 0x0,
9431 			"The number of PHY instances", HFILL }
9432 		},
9433 		{ &hf_nfapi_pnf_phy_config_index,
9434 			{ "PNF Phy Config Index", "nfapi.pnf.phy.config.index",
9435 			FT_UINT16, BASE_DEC, NULL, 0x0,
9436 			"The unique Index number of the PHY to permit the PNF to identify the PHY in the PNF_CONFIG.Request", HFILL }
9437 		},
9438 		{ &hf_nfapi_number_of_rfs,
9439 			{ "Number of RFs", "nfapi.pnf.rf.number.rf",
9440 			FT_UINT16, BASE_DEC, NULL, 0x0,
9441 			"The number of RF configurations", HFILL }
9442 		},
9443 		{ &hf_nfapi_phy_rf_config_info_phy_id,
9444 			{ "Phy ID", "nfapi.pnf.phy.rf.config.phy.id",
9445 			FT_UINT16, BASE_DEC, NULL, 0x0,
9446 			NULL, HFILL }
9447 		},
9448 		{ &hf_nfapi_rf_config_index,
9449 			{ "RF Config Index", "nfapi.rf_config_index",
9450 			FT_UINT16, BASE_DEC, NULL, 0x0,
9451 			"The Index number defined in the PNF RF struct that the PHY can support",
9452 			HFILL }
9453 		},
9454 		{ &hf_nfapi_number_of_rf_exclusions,
9455 			{ "Number of RF exclusions", "nfapi.hf_nfapi_number_of_rf_exclusions",
9456 			FT_UINT16, BASE_DEC, NULL, 0x0,
9457 			"The number of RF configurations excluded from use by this PHY", HFILL }
9458 		},
9459 		{ &hf_nfapi_maximum_3gpp_release_supported,
9460 			{ "Maximum 3gpp Release Supported", "nfapi.maximum_3gpp_release_supported",
9461 			FT_UINT16, BASE_HEX, NULL, 0x0,
9462 			"The major 3GPP releases supported", HFILL }
9463 		},
9464 		{ &hf_nfapi_maximum_3gpp_release_supported_rel8,
9465 			{ "Release 8", "nfapi.maximum_3gpp_release_supported.rel8",
9466 			FT_BOOLEAN, 16, NULL, 0x0001,
9467 			NULL, HFILL }
9468 		},
9469 		{ &hf_nfapi_maximum_3gpp_release_supported_rel9,
9470 			{ "Release 9", "nfapi.maximum_3gpp_release_supported.rel9",
9471 			FT_BOOLEAN, 16, NULL, 0x0002,
9472 			NULL, HFILL }
9473 		},
9474 		{ &hf_nfapi_maximum_3gpp_release_supported_rel10,
9475 			{ "Release 10", "nfapi.maximum_3gpp_release_supported.rel10",
9476 			FT_BOOLEAN, 16, NULL, 0x0004,
9477 			NULL, HFILL }
9478 		},
9479 		{ &hf_nfapi_maximum_3gpp_release_supported_rel11,
9480 			{ "Release 11", "nfapi.maximum_3gpp_release_supported.rel11",
9481 			FT_BOOLEAN, 16, NULL, 0x0008,
9482 			NULL, HFILL }
9483 		},
9484 		{ &hf_nfapi_maximum_3gpp_release_supported_rel12,
9485 			{ "Release 12", "nfapi.maximum_3gpp_release_supported.rel12",
9486 			FT_BOOLEAN, 16, NULL, 0x0010,
9487 			NULL, HFILL }
9488 		},
9489 		{ &hf_nfapi_maximum_3gpp_release_supported_rel13,
9490 			{ "Release 13", "nfapi.maximum_3gpp_release_supported.rel13",
9491 			FT_BOOLEAN, 16, NULL, 0x0020,
9492 			NULL, HFILL }
9493 		},
9494 		{ &hf_nfapi_downlink_channel_bandwidth_supported,
9495 			{ "Maximum Channel Downlink Bandwidth Supported", "nfapi.downlink_channel_bandwidth_supported",
9496 			FT_UINT16, BASE_DEC, NULL, 0x0,
9497 			"The downlink channel bandwidth supported in resource blocks as specified in 3GPP TS 36.104", HFILL }
9498 		},
9499 		{ &hf_nfapi_uplink_channel_bandwidth_supported,
9500 			{ "Maximum Channel Uplink Bandwidth Supported", "nfapi.uplink_channel_bandwidth_supported",
9501 			FT_UINT16, BASE_DEC, NULL, 0x0,
9502 			"The uplink channel bandwidth supported in resource blocks as specified in 3GPP TS 36.104.", HFILL }
9503 		},
9504 		{ &hf_nfapi_number_of_dl_layers_supported,
9505 			{ "Number of DL Layers Supported", "nfapi.number_of_dl_layer_supported",
9506 			FT_UINT16, BASE_DEC, NULL, 0x0,
9507 			"The maximum number of downlink layers supported", HFILL }
9508 		},
9509 		{ &hf_nfapi_number_of_ul_layers_supported,
9510 			{ "Number of UL Layers Supported", "nfapi.number_of_ul_layer_supported",
9511 			FT_UINT16, BASE_DEC, NULL, 0x0,
9512 			"The maximum number of uplink layers supported", HFILL }
9513 		},
9514 		{ &hf_nfapi_nmm_modes_supported,
9515 			{ "NMM modes supported", "nfapi.nmm_modes_supported",
9516 			FT_UINT8, BASE_DEC, VALS(nmm_modes_supported_vals), 0x0,
9517 			"Network Monitor Modes Supported.", HFILL }
9518 		},
9519 		{ &hf_nfapi_band,
9520 			{ "Band", "nfapi.band",
9521 			FT_UINT16, BASE_DEC, NULL, 0x0,
9522 			"Band number as specified in 3GPP TS36.101", HFILL }
9523 		},
9524 		{ &hf_nfapi_maximum_transmit_power_2,
9525 			{ "Maximum transmit power", "nfapi.maximum_transmit_power",
9526 			FT_UINT16, BASE_CUSTOM, CF_FUNC(max_transmit_power_2_conversion_fn), 0x0,
9527 			"The maximum transmit power for the PHY and RF operating at the configured bandwidth as defined in 3GPP TS 36.104.", HFILL }
9528 		},
9529 		{ &hf_nfapi_maximum_transmit_power,
9530 			{ "Maximum transmit power", "nfapi.maximum_transmit_power",
9531 			FT_UINT16, BASE_CUSTOM, CF_FUNC(max_transmit_power_conversion_fn), 0x0,
9532 			"The maximum transmit power for the RF chain operating at the maximum supported bandwidth as defined in 3GPP TS 36.104.", HFILL }
9533 		},
9534 		{ &hf_nfapi_earfcn,
9535 			{ "EARFCN", "nfapi.earfcn",
9536 			FT_UINT16, BASE_DEC, NULL, 0x0,
9537 			"The EARFCN to be measured.", HFILL }
9538 		},
9539 		{ &hf_nfapi_number_of_rf_bands,
9540 			{ "Number of RF Bands", "nfapi.num.rf_bands",
9541 			FT_UINT16, BASE_DEC, NULL, 0x0,
9542 			"The number of RF Band instances", HFILL }
9543 		},
9544 		{ &hf_nfapi_nmm_uplink_rssi_supported,
9545 			{ "NMM Uplink RSSI supported", "nfapi.nmm.uplink.rssi.supported",
9546 			FT_UINT8, BASE_DEC, VALS(ul_rssi_supported_vals), 0x0,
9547 			"Indicates if the uplink RSSI measurements are supported by NMM.", HFILL }
9548 		},
9549 		{ &hf_nfapi_minimum_transmit_power,
9550 			{ "Minimum transmit power", "nfapi.minimum_transmit_power",
9551 			FT_UINT16, BASE_CUSTOM, CF_FUNC(max_transmit_power_conversion_fn), 0x0,
9552 			"The minimum transmit power for the RF chain operating at the maximum supported bandwidth as defined in 3GPP TS 36.104.", HFILL }
9553 		},
9554 		{ &hf_nfapi_number_of_antennas_suppported,
9555 			{ "Number of Supported Antennas", "nfapi.number_of_antennas_suppported",
9556 			FT_UINT8, BASE_DEC, NULL, 0x0,
9557 			"The maximum number of antennas supported.", HFILL }
9558 		},
9559 		{ &hf_nfapi_minimum_downlink_frequency,
9560 			{ "Minimum downlink frequency", "nfapi.minimum_downlink_frequency",
9561 			FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &khz_100_units_db, 0x0,
9562 			"The minimum supported downlink frequency in 100kHz units", HFILL }
9563 		},
9564 		{ &hf_nfapi_maximum_downlink_frequency,
9565 			{ "Maximum downlink frequency", "nfapi.maximum_downlink_frequency",
9566 			FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &khz_100_units_db, 0x0,
9567 			"The maximum supported downlink frequency in 100kHz units", HFILL }
9568 		},
9569 		{ &hf_nfapi_minimum_uplink_frequency,
9570 			{ "Minimum uplink frequency", "nfapi.minimum_downlink_frequency",
9571 			FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &khz_100_units_db, 0x0,
9572 			"The minimum supported uplink frequency in 100kHz units", HFILL }
9573 		},
9574 		{ &hf_nfapi_maximum_uplink_frequency,
9575 			{ "Maximum uplink frequency", "nfapi.maximum_downlink_frequency",
9576 			FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &khz_100_units_db, 0x0,
9577 			"The maximum supported uplink frequency in 100kHz units", HFILL }
9578 		},
9579 		{ &hf_nfapi_transmission_mode7_supported,
9580 			{ "Transmission Mode 7 Supported", "nfapi.pnf.phy_rel10.tx_mode7_supported",
9581 			FT_UINT16, BASE_DEC, NULL, 0x0,
9582 			"Indicates if PHY supports TM7 for PDSCH", HFILL }
9583 		},
9584 		{ &hi_nfapi_transmission_mode8_supported,
9585 			{ "Transmission Mode 8 Supported", "nfapi.pnf.phy_rel10.tx_mode8_supported",
9586 			FT_UINT16, BASE_DEC, NULL, 0x0,
9587 			"Indicates if PHY supports TM8 for PDSCH", HFILL }
9588 		},
9589 		{ &hi_nfapi_two_antennas_ports_for_pucch,
9590 			{ "Two antennas ports for PUCCH", "nfapi.pnf.phy_rel10.two_antennas_ports_for_pucch",
9591 			FT_UINT16, BASE_DEC, NULL, 0x0,
9592 			"Indicates if PHY supports PUCCH transmit diversity introduced in Release 10. Equivalent to two-AntennaPortsForPUCCH-r10 in TS36.306", HFILL }
9593 		},
9594 		{ &hi_nfapi_transmission_mode_9_supported,
9595 			{ "Transmission Mode 9 Supported", "nfapi.pnf.phy_rel10.tx_mode9_supported",
9596 			FT_UINT16, BASE_DEC, NULL, 0x0,
9597 			"Indicates if PHY supports TM9 for PDSCH with 8 antennas and 8 CSI. Equivalent to tm9-With-8Tx-FDD-r10 in TS36.306", HFILL }
9598 		},
9599 		{ &hi_nfapi_simultaneous_pucch_pusch,
9600 			{ "Simultaneous PUCCH PUSCH", "nfapi.pnf.simultaneous_pucch_pusch",
9601 			FT_UINT16, BASE_DEC, NULL, 0x0,
9602 			"Indicates if PHY supports UE sending simultaneous PUCCH and PUSCH introduced in Release 10. Equivalent to simultaneousPUCCH-PUSCH-r10 in TS36.306", HFILL }
9603 		},
9604 		{ &hi_nfapi_four_layer_tx_with_tm3_and_tm4,
9605 			{ "Four layer Tx with TM3 and TM4", "nfapi.pnf.phy_rel10.layer_tx_with_tm3_and_tm4",
9606 			FT_UINT16, BASE_DEC, NULL, 0x0,
9607 			"Indicates if PHY supports four layer transmission for TM3 and TM4. Equivalent to fourLayerTM3-TM4-r10 in TS36.306", HFILL }
9608 		},
9609 		{ &hf_nfapi_epdcch_supported,
9610 			{ "ePDCCH supported", "nfapi.pnf.phy_rel11.epdcch_supported",
9611 			FT_UINT16, BASE_DEC, NULL, 0x0,
9612 			"Indicates if PHY supports Enhanced PDCCH", HFILL }
9613 		},
9614 		{ &hi_nfapi_multi_ack_csi_reporting,
9615 			{ "Multi ACK CSI reporting", "nfapi.pnf.phy_rel11.multi_ack_csi_reporting",
9616 			FT_UINT16, BASE_DEC, NULL, 0x0,
9617 			"Indicates if PHY supports the multi ACK and CSI reporting required with CA and mixed FDD/TDD carriers. Equivalent to multiACK-CSI-Reporting-r11 in TS36.306", HFILL }
9618 		},
9619 		{ &hi_nfapi_pucch_tx_diversity_with_channel_selection,
9620 			{ "PUCCH Tx diversity with channel selection", "nfapi.pnf.phy_rel11.tx_div_with_channel_selection",
9621 			FT_UINT16, BASE_DEC, NULL, 0x0,
9622 			"Indicates if PHY supports transmit diversity for PUCCH format 1b with channel selection. Equivalent to txDiv-PUCCH1b-ChSelect in TS36.306", HFILL }
9623 		},
9624 		{ &hi_nfapi_ul_comp_supported,
9625 			{ "UL CoMP supported", "nfapi.pnf.phy_rel11.ul_comp_supported",
9626 			FT_UINT16, BASE_DEC, NULL, 0x0,
9627 			"Indicates if PHY supports UL CoMP", HFILL }
9628 		},
9629 		{ &hi_nfapi_transmission_mode_5_supported,
9630 			{ "Transmission mode 5 supported", "nfapi.pnf.phy_rel11.tx_mode5_supported",
9631 			FT_UINT16, BASE_DEC, NULL, 0x0,
9632 			"Indicates if PHY supports TM5 for PDSCH", HFILL }
9633 		},
9634 		{ &hf_nfapi_csi_subframe_set,
9635 			{ "CSI subframe set", "nfapi.pnf.phy_rel12.csi_subframe_set",
9636 			FT_UINT16, BASE_DEC, NULL, 0x0,
9637 			"Equivalent to csi-SubframeSet-r12 in TS36.306", HFILL }
9638 		},
9639 		{ &hi_nfapi_enhanced_4tx_codebook,
9640 			{ "Enhanced 4TX codebook", "nfapi.pnf.phy_rel12.enhanced_t4x_codebook",
9641 			FT_UINT16, BASE_DEC, NULL, 0x0,
9642 			"Indicates if PHY supports the enhanced 4TX codebook. Equivalent to enhanced-4TxCodebook-r12 in TS36.306", HFILL }
9643 		},
9644 		{ &hi_nfapi_drs_supported,
9645 			{ "DRS supported", "nfapi.pnf.phy_rel12.drs_supported",
9646 			FT_UINT16, BASE_DEC, NULL, 0x0,
9647 			"Indicates if PHY supports the Discovery Reference Signal", HFILL }
9648 		},
9649 		{ &hi_nfapi_ul_64qam_supported,
9650 			{ "UL 64QAM supported", "nfapi.pnf.phy_rel12.ul_64qam_supported",
9651 			FT_UINT16, BASE_DEC, NULL, 0x0,
9652 			"Indicates if PHY support 64 QAM in the uplink", HFILL }
9653 		},
9654 		{ &hi_nfapi_transmission_mode_10_supported,
9655 			{ "Transmission mode 10 supported", "nfapi.pnf.phy_rel12.tx_mode10_supported",
9656 			FT_UINT16, BASE_DEC, NULL, 0x0,
9657 			"Indicates if PHY supports TM10 for PDSCH (DL CoMP)", HFILL }
9658 		},
9659 		{ &hi_nfapi_alternative_tbs_indices,
9660 			{ "Alternative TBS indices", "nfapi.pnf.phy_rel12.alternative_tbs_indices",
9661 			FT_UINT16, BASE_DEC, NULL, 0x0,
9662 			"Indicates if PHY supports the alternate TBS indices (256 QAM).  Equivalent to alternativeTBS-Indices-r12 in TS36.306", HFILL }
9663 		},
9664 		{ &hf_nfapi_pucch_format_4_supported,
9665 			{ "PUCCH format 4 supported", "nfapi.pnf.phy_rel13.pucch_format4_supported",
9666 			FT_UINT16, BASE_DEC, NULL, 0x0,
9667 			"Indicates if PHY supports PUCCH format 4", HFILL }
9668 		},
9669 		{ &hf_nfapi_pucch_format_5_supported,
9670 			{ "PUCCH format 5 supported", "nfapi.pnf.phy_rel13.pucch_format5_supported",
9671 			FT_UINT16, BASE_DEC, NULL, 0x0,
9672 			"Indicates if PHY supports PUCCH format 5", HFILL }
9673 		},
9674 		{ &hf_nfapi_more_than_5_ca_supported,
9675 			{ "More than 5 CA support", "nfapi.pnf.phy_rel13.mode_than_5_ca_supported",
9676 			FT_UINT16, BASE_DEC, NULL, 0x0,
9677 			"Indicates if PHY supports features required for more than 5 CA support on PUSCH. Equivalent to uci-PUSCH-Ext-r13 in TS36.306", HFILL }
9678 		},
9679 		{ &hf_nfapi_laa_supported,
9680 			{ "LAA supported", "nfapi.pnf.phy_rel13.laa_supported",
9681 			FT_UINT16, BASE_DEC, NULL, 0x0,
9682 			"Indicates if PHY supports DL LAA (subframe format 3)", HFILL }
9683 		},
9684 		{ &hf_nfapi_laa_ending_in_dwpts_supported,
9685 			{ "LAA ending in DwPTS supported", "nfapi.pnf.phy_rel13.laa_ending_in_dwpts_supported",
9686 			FT_UINT16, BASE_DEC, NULL, 0x0,
9687 			"Indicates if PHY supports DL LAA ending in a DwPTS subframe. Equivalent to endingDwPTS-r13i n TS36.306", HFILL }
9688 		},
9689 		{ &hf_nfapi_laa_starting_in_second_slot_supported,
9690 			{ "LAA starting in second slot Supported", "nfapi.pnf.phy_rel13.laa_starting_in_second_slot_supported",
9691 			FT_UINT16, BASE_DEC, NULL, 0x0,
9692 			"Indicates if PHY supports DL LAA starting in the second slot in a subframe. Equivalent to secondSlotStartingPosition-r13 in TS36.306", HFILL }
9693 		},
9694 		{ &hf_nfapi_beamforming_supported,
9695 			{ "Beamforming Supported", "nfapi.pnf.phy_rel13.beamforming_supported",
9696 			FT_UINT16, BASE_DEC, NULL, 0x0,
9697 			"Indicates if PHY supports beamforming (FD-MIMO Class B). Equivalent to beamformed-r13 in TS36.306", HFILL }
9698 		},
9699 		{ &hf_nfapi_csi_rs_enhancements_supported,
9700 			{ "CSI-RS enhancements supported", "nfapi.pnf.phy_rel13.csi_rs_enhancements_supported",
9701 			FT_UINT16, BASE_DEC, NULL, 0x0,
9702 			"Indicates if PHY supports CSI-RS enhancements (FD-MIMO Class A). Equivalent to csi-RS-EnhancementsTDD-r13 in TS36.306", HFILL }
9703 		},
9704 		{ &hf_nfapi_drms_enhancements_supported,
9705 			{ "DMRS enhancements supported", "nfapi.pnf.phy_rel13.drms_enhancements_supported",
9706 			FT_UINT16, BASE_DEC, NULL, 0x0,
9707 			"Indicates if PHY supports DMRS enhancements added in Release 13. Equivalent to dmrs-Enhancements-r13 in TS36.306", HFILL }
9708 		},
9709 		{ &hf_nfapi_srs_enhancements_supported,
9710 			{ "SRS enhancements supported", "nfapi.pnf.phy_rel13.srs_enhancements_supported",
9711 			FT_UINT16, BASE_DEC, NULL, 0x0,
9712 			"Indicates if PHY supports SRS enhancements added in Release 13. Equivalent to srs-Enhancements-r13in TS36.306", HFILL }
9713 		},
9714 		{ &hf_nfapi_sfn_sf,
9715 			{ "SFN_SF", "nfapi.sfn_sf",
9716 			FT_UINT16, BASE_CUSTOM, CF_FUNC(sfn_sf_conversion_fn), 0x0,
9717 			NULL, HFILL }
9718 		},
9719 		{ &hf_nfapi_number_pdcch_ofdm_symbols,
9720 			{ "Number of PDCCH OFDM Symbols", "nfapi.number_pdcch_ofdm_symbols",
9721 			FT_UINT8, BASE_DEC, NULL, 0x0,
9722 			"The number of OFDM symbols for the PDCCH", HFILL }
9723 		},
9724 		{ &hf_nfapi_number_dci,
9725 			{ "Number of DCI", "nfapi.number_dci",
9726 			FT_UINT8, BASE_DEC, NULL, 0x0,
9727 			"The number of DCI PDUs included in this message", HFILL }
9728 		},
9729 		{ &hf_nfapi_number_pdus,
9730 			{ "Number of PDUs", "nfapi.number_pdu",
9731 			FT_UINT16, BASE_DEC, NULL, 0x0,
9732 			"Number of PDUs that are included in this message", HFILL }
9733 		},
9734 		{ &hf_nfapi_number_of_harqs,
9735 			{ "Number of HARQs", "nfapi.number_harqs",
9736 			FT_UINT16, BASE_DEC, NULL, 0x0,
9737 			"Number of HARQs included in this message", HFILL }
9738 		},
9739 		{ &hf_nfapi_number_of_crcs,
9740 			{ "Number of CRCs", "nfapi.number_crcs",
9741 			FT_UINT16, BASE_DEC, NULL, 0x0,
9742 			"Number of CRCs included in this message", HFILL }
9743 		},
9744 		{ &hf_nfapi_number_of_srs,
9745 			{ "Number of SRs", "nfapi.number_srs",
9746 			FT_UINT16, BASE_DEC, NULL, 0x0,
9747 			"Number of SRs included in this message", HFILL }
9748 		},
9749 		{ &hf_nfapi_number_of_cqi,
9750 			{ "Number of CQIs", "nfapi.number_cqi",
9751 			FT_UINT16, BASE_DEC, NULL, 0x0,
9752 			"Number of CQIs included in this message", HFILL }
9753 		},
9754 		{ &hf_nfapi_number_of_preambles,
9755 			{ "Number of Preambles", "nfapi.number_preambles",
9756 			FT_UINT16, BASE_DEC, NULL, 0x0,
9757 			"Number of RACH preambles", HFILL }
9758 		},
9759 		{ &hf_nfapi_number_of_srss,
9760 			{ "Number of SRSs", "nfapi.number_srss",
9761 			FT_UINT16, BASE_DEC, NULL, 0x0,
9762 			"Number of UEs contributing to the uplink SRS", HFILL }
9763 		},
9764 		{ &hf_nfapi_lbt_dl_req_pdu_type,
9765 			{ "LBT DL Request PDU Type", "nfapi.lbt_dl_req_pdu_type",
9766 			FT_UINT16, BASE_DEC, VALS(nfapi_lbt_dl_req_pdu_type), 0x0,
9767 			NULL, HFILL }
9768 		},
9769 		{ &hf_nfapi_lbt_dl_ind_pdu_type,
9770 			{ "LBT DL Indication PDU Type", "nfapi.lbt_dl_ind_pdu_type",
9771 			FT_UINT16, BASE_DEC, VALS(nfapi_lbt_dl_ind_pdu_type), 0x0,
9772 			NULL, HFILL }
9773 		},
9774 		{ &hf_nfapi_number_pdsch_rnti,
9775 			{ "Number of PDSCH RNTI", "nfapi.number_pdsch_rnti",
9776 			FT_UINT8, BASE_DEC, NULL, 0x0,
9777 			"Number of unique RNTIs sent on the PDSCH", HFILL }
9778 		},
9779 		{ &hf_nfapi_transmission_power_pcfich,
9780 			{ "Transmission Power PCFICH", "nfapi.transmission_power_pcfich",
9781 			FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
9782 			"Offset to the reference signal power.", HFILL }
9783 		},
9784 		{ &hf_nfapi_dl_config_pdu_type,
9785 			{ "PDU Type", "nfapi.pdu.type",
9786 			FT_UINT8, BASE_DEC, VALS(nfapi_dl_config_pdu_type_vals), 0x0,
9787 			"DL_CONFIG.request PDU Type", HFILL }
9788 		},
9789 		{ &hf_nfapi_pdu_size,
9790 			{ "PDU size", "nfapi.pdu.size",
9791 			FT_UINT8, BASE_DEC, NULL, 0x0,
9792 			"Size of the PDU control information (in bytes). This length value includes the 2 bytes required for the PDU type and PDU size parameters", HFILL }
9793 		},
9794 		{ &hf_nfapi_instance_length,
9795 			{ "Instance length", "nfapi.instance.length",
9796 			FT_UINT16, BASE_DEC, NULL, 0x0,
9797 			"The Length in bytes of all TLVs within this instance", HFILL }
9798 		},
9799 		{ &hf_nfapi_length,
9800 			{ "PDU length", "nfapi.pdu.length",
9801 			FT_UINT16, BASE_DEC, NULL, 0x0,
9802 			"Length of PDU in bytes.", HFILL }
9803 		},
9804 		{ &hf_nfapi_pdu_index,
9805 			{ "PDU Index", "nfapi.pdu.index",
9806 			FT_UINT16, BASE_DEC, NULL, 0x0,
9807 			"The PDU Index parameter specified for each PDU", HFILL }
9808 		},
9809 		{ &hf_nfapi_rnti,
9810 			{ "RNTI", "nfapi.rnti",
9811 			FT_UINT16, BASE_DEC, NULL, 0x0,
9812 			"The RNTI used for identifying the UE when receiving the PDU", HFILL }
9813 		},
9814 		{ &hf_nfapi_resource_allocation_type,
9815 			{ "Resource Allocation Type", "nfapi.resource.allocation.type",
9816 			FT_UINT8, BASE_DEC, VALS(resource_allocation_type_vals), 0x0,
9817 			"Resource allocation type/header Valid for DCI formats : 1, 2, 2A, 2B, 2C, 2D", HFILL }
9818 		},
9819 		{ &hf_nfapi_virtual_resource_block_assignment_flag,
9820 			{ "Virtual resource block assignment flag", "nfapi.resource.block.assignment.flag",
9821 			FT_UINT8, BASE_DEC, VALS(local_distributed_vals), 0x0,
9822 			"Type of virtual resource block used Valid for DCI formats : 1A, 1B, 1D", HFILL }
9823 		},
9824 		{ &hf_nfapi_resource_block_coding,
9825 			{ "Resource block coding", "nfapi.resource.block.coding",
9826 			FT_UINT32, BASE_DEC, NULL, 0x0,
9827 			"The encoding for the resource blocks. The coding is dependent on whether resource allocation type 0, 1, 2 is in use", HFILL }
9828 		},
9829 		{ &hf_nfapi_modulation,
9830 			{ "Modulation", "nfapi.modulation",
9831 			FT_UINT8, BASE_DEC, VALS(modulation_vals), 0x0,
9832 			NULL, HFILL }
9833 		},
9834 		{ &hf_nfapi_redundancy_version,
9835 			{ "Redundancy version", "nfapi.redundancy.version",
9836 			FT_UINT8, BASE_DEC, NULL, 0x0,
9837 			"HARQ redundancy version", HFILL }
9838 		},
9839 		{ &hf_nfapi_transport_blocks,
9840 			{ "Transport blocks", "nfapi.transport.blocks",
9841 			FT_UINT8, BASE_DEC, NULL, 0x0,
9842 			"The transport block transmitted to this RNTI", HFILL }
9843 		},
9844 		{ &hf_nfapi_transport_block_to_codeword_swap_flag,
9845 			{ "Transport block to codeword swap flag", "nfapi.transport.block.to.codeword.swap.flag",
9846 			FT_UINT8, BASE_DEC, VALS(transport_block_to_codeword_swap_flag_vals), 0x0,
9847 			"Indicates the mapping of transport block to codewords.", HFILL }
9848 		},
9849 		{ &hf_nfapi_transmission_scheme,
9850 			{ "Transmission scheme", "nfapi.transmission.scheme",
9851 			FT_UINT8, BASE_DEC, VALS(transmission_scheme_vals), 0x0,
9852 			"The MIMO mode used in the PDU", HFILL }
9853 		},
9854 		{ &hf_nfapi_ul_transmission_scheme,
9855 			{ "Transmission scheme", "nfapi.transmission.scheme",
9856 			FT_UINT8, BASE_DEC, VALS(ul_transmission_scheme_vals), 0x0,
9857 			"The MIMO mode used in the PDU", HFILL }
9858 		},
9859 		{ &hf_nfapi_number_of_layers,
9860 			{ "Number of layers", "nfapi.number.of.layers",
9861 			FT_UINT8, BASE_DEC, NULL, 0x0,
9862 			"The number of layers used in transmission", HFILL }
9863 		},
9864 		{ &hf_nfapi_number_of_subbands,
9865 			{ "Number of subbands", "nfapi.number.of.subbands",
9866 			FT_UINT8, BASE_DEC, NULL, 0x0,
9867 			"Only valid when transmission scheme = 3, 4, 5. Defines the number of subbands and "
9868 			"codebooks used for PMI.If value = 1 then a single PMI value is supplied which should be used over all RB", HFILL }
9869 		},
9870 		{ &hf_nfapi_codebook_index,
9871 			{ "Codebook Index", "nfapi.number.of.codebook.index",
9872 			FT_UINT8, BASE_DEC, NULL, 0x0,
9873 			"Only valid when transmission scheme = 3, 4, 5. Defines the codebook used.", HFILL }
9874 		},
9875 		{ &hf_nfapi_ue_category_capacity,
9876 			{ "UE category capacity", "nfapi.ue.category.capacity",
9877 			FT_UINT8, BASE_DEC, NULL, 0x0,
9878 			"The UE capabilities category", HFILL }
9879 		},
9880 		{ &hf_nfapi_pa,
9881 			{ "P-A", "nfapi.pa",
9882 			FT_UINT8, BASE_DEC, VALS(pa_vals), 0x0,
9883 			"The ratio of PDSCH EPRE to cell-specific RS EPRE among PDSCH REs in all the OFDM symbols not containing cell-specific RS in dB.", HFILL }
9884 		},
9885 		{ &hf_nfapi_delta_power_offset_index,
9886 			{ "Delta Power offset Index", "nfapi.delta.power.offset.index",
9887 			FT_UINT8, BASE_DEC, NULL, 0x0,
9888 			"Delta power offset, value: 0..1", HFILL }
9889 		},
9890 		{ &hf_nfapi_nprb,
9891 			{ "Nprb", "nfapi.nprb",
9892 			FT_UINT8, BASE_DEC, VALS(nprb_vals), 0x0,
9893 			"Used with DCI format 1A and RNTI=SI-RNTI or RA-RNTI. This should match the value sent in the TPC field of the DCI 1A PDU which allocated this grant.", HFILL }
9894 		},
9895 		{ &hf_nfapi_transmission_mode,
9896 			{ "Transmission Mode", "nfapi.transmission_nprb",
9897 			FT_UINT8, BASE_DEC, VALS(transmission_mode_vals), 0x0,
9898 			"Transmission mode associated with the UE", HFILL }
9899 		},
9900 		{ &hf_nfapi_prnti,
9901 			{ "P-RNTI", "nfapi.prnti",
9902 			FT_UINT16, BASE_DEC, NULL, 0x0,
9903 			"The P-RNTI associated with the paging", HFILL }
9904 		},
9905 		{ &hf_nfapi_mcs,
9906 			{ "MCS", "nfapi.mcs",
9907 			FT_UINT8, BASE_DEC, VALS(pch_modulation_vals), 0x0,
9908 			"The modulation and coding scheme for the transport block", HFILL }
9909 		},
9910 		{ &hf_nfapi_number_of_transport_blocks,
9911 			{ "Number of transport blocks", "nfapi.number_of_transport_blocks",
9912 			FT_UINT8, BASE_DEC, NULL, 0x0,
9913 			"The number of transport blocks transmitted to this RNTI", HFILL }
9914 		},
9915 		{ &hf_nfapi_ue_mode,
9916 			{ "UE Mode", "nfapi.ue.mode",
9917 			FT_UINT8, BASE_DEC, VALS(ue_mode_vals), 0x0,
9918 			NULL, HFILL }
9919 		},
9920 		{ &hf_prs_bandwidth,
9921 			{ "PRS bandwidth", "nfapi.prs.bandwidth",
9922 			FT_UINT8, BASE_DEC, NULL, 0x0,
9923 			"PRS bandwidth in resource blocks.", HFILL }
9924 		},
9925 		{ &hf_prs_cyclic_prefix_type,
9926 			{ "PRS cyclic prefix type", "nfapi.prs.cyclic.prefix.type",
9927 			FT_BOOLEAN, 8, TFS(&prs_cyclic_prefix_type_strname), 0x0,
9928 			"The cyclic prefix used for PRS transmission", HFILL }
9929 		},
9930 		{ &hf_prs_muting,
9931 			{ "PRS muting", "nfapi.prs.muting",
9932 			FT_BOOLEAN, 8, TFS(&prs_muting_strname), 0x0,
9933 			"PRS muting dictates if PRS REs are vacant (prsMutingInfo-r9 indicates the SF occasions)", HFILL }
9934 		},
9935 		{ &hf_nfapi_num_bf_prb_per_subband,
9936 			{ "Num of BF PRB per Subband", "nfapi.num.bf.prb.per.subband",
9937 			FT_UINT8, BASE_DEC, NULL, 0x0,
9938 			"Number of PRBs that are treated as one subband", HFILL }
9939 		},
9940 		{ &hf_nfapi_num_bf_vector,
9941 			{ "Num of BF Vector", "nfapi.num.bf.vector",
9942 			FT_UINT8, BASE_DEC, NULL, 0x0,
9943 			"Number of beam forming vectors. One beam forming vector is specified for each subband", HFILL }
9944 		},
9945 		{ &hf_nfapi_csi_rs_resource_config,
9946 			{ "CSI-RS resource config", "nfapi.csi.rs.resource.config",
9947 			FT_UINT8, BASE_DEC, NULL, 0x0,
9948 			"Indicates reference signal configuration for CSI-RS", HFILL }
9949 		},
9950 		{ &hf_nfapi_bf_vector_subband_index,
9951 			{ "BF Subband Index", "nfapi.num.bf.vector.subband.index",
9952 			FT_UINT8, BASE_DEC, NULL, 0x0,
9953 			"Index of subband for which the following beam forming vector is applied", HFILL }
9954 		},
9955 		{ &hf_nfapi_bf_vector_num_antennas,
9956 			{ "BF Num of Antennas", "nfapi.num.bf.vector.bf.value",
9957 			FT_UINT8, BASE_DEC, NULL, 0x0,
9958 			"Number of physical antennas", HFILL }
9959 		},
9960 		{ &hf_nfapi_bf_vector_bf_value,
9961 			{ "BF Value per Antenna", "nfapi.num.bf.vector.bf.value",
9962 			FT_UINT16, BASE_DEC, NULL, 0x0,
9963 			"Beam forming vector element for physical antenna #i real 8 bits followed by imaginary 8 bits", HFILL }
9964 		},
9965 		{ &hf_nfapi_nscid,
9966 			{ "NSC id", "nfapi.nscid",
9967 			FT_UINT8, BASE_DEC, NULL, 0x0,
9968 			"Used with DCI format 2B and 2C.", HFILL }
9969 		},
9970 		{ &hf_nfapi_csi_rs_flag,
9971 			{ "CSI RS Flag", "nfapi.csi.rs.flag",
9972 			FT_BOOLEAN, 8, TFS(&tfs_valid_not_valid), 0x0,
9973 			"Indicates if parameters related to CSI-RS are valid or not.", HFILL }
9974 		},
9975 		{ &hf_nfapi_csi_rs_resource_config_r10,
9976 			{ "CSI RS resource config R10", "nfapi.csi.rs.resource_config_r10",
9977 			FT_UINT8, BASE_DEC, NULL, 0x0,
9978 			"This value is deprecated", HFILL }
9979 		},
9980 		{ &hf_nfapi_csi_rs_zero_tx_power_resource_config_bitmap_r10,
9981 			{ "CSI-RS Number of NZP configuration", "nfapi.csi.rs.num.of.nzp.configurations",
9982 			FT_UINT16, BASE_DEC, NULL, 0x0,
9983 			"Bitmap of 16 bits. Encoding format of bitmap follows section 6.10.5.2 of 36.211", HFILL }
9984 		},
9985 		{ &hf_nfapi_csi_rs_number_of_nzp_configurations,
9986 			{ "CSI RS zero Tx Power Resource config bitmap R10", "nfapi.csi.rs.zero.tx.power.resource.config.bitmap.r10",
9987 			FT_UINT8, BASE_DEC, NULL, 0x0,
9988 			"Indicates the number of Non-Zero power CSI-RS configurations.", HFILL }
9989 		},
9990 		{ &hf_nfapi_pdsch_start,
9991 			{ "PDSCH_start", "nfapi.pdsch.start",
9992 			FT_UINT8, BASE_DEC, NULL, 0x0,
9993 			"Per UE starting OFDM symbol for the PDSCH, impacts the mapping of PDSCH to REs", HFILL }
9994 		},
9995 		{ &hf_nfapi_drms_config_flag,
9996 			{ "DMRS Config flag", "nfapi.drms.config.flag",
9997 			FT_UINT8, BASE_DEC, VALS(not_used_enabled_vals), 0x0,
9998 			"Indicates if the DMRS Config parameter is valid", HFILL }
9999 		},
10000 		{ &hf_nfapi_drms_scrambling,
10001 			{ "DMRS Scrambling", "nfapi.drms.scrambling",
10002 			FT_UINT16, BASE_DEC, NULL, 0x0,
10003 			"The scrambling identity for UE specific reference signals.", HFILL }
10004 		},
10005 		{ &hf_nfapi_csi_config_flag,
10006 			{ "CSI Config flag", "nfapi.csi.config.flag",
10007 			FT_UINT8, BASE_DEC, VALS(not_used_enabled_vals), 0x0,
10008 			"Indicates if the CSI Config parameter is valid", HFILL }
10009 		},
10010 		{ &hf_nfapi_csi_scrambling,
10011 			{ "CSI Scrambling", "nfapi.csi.scrambling",
10012 			FT_UINT16, BASE_DEC, NULL, 0x0,
10013 			"The scrambling identity for CSI.", HFILL }
10014 		},
10015 		{ &hf_nfapi_pdsch_re_mapping_flag,
10016 			{ "PDSCH RE mapping flag", "nfapi.pdsch.remapping.flag",
10017 			FT_UINT8, BASE_DEC, VALS(not_used_enabled_vals), 0x0,
10018 			"Indicates if the PDSCH RE parameters are valid.", HFILL }
10019 		},
10020 		{ &hf_nfapi_pdsch_re_mapping_antenna_ports,
10021 			{ "PDSCH RE mapping antenna ports", "nfapi.pdsch.remapping.antenna.ports",
10022 			FT_UINT8, BASE_DEC, NULL, 0x0,
10023 			"Indicates number of antennas used for PDSCH RE mapping", HFILL }
10024 		},
10025 		{ &hf_nfapi_pdsch_re_mapping_freq_shift,
10026 			{ "PDSCH RE mapping freq shift", "nfapi.pdsch.remapping.freq.shift",
10027 			FT_UINT8, BASE_DEC, NULL, 0x0,
10028 			"Indicates the frequency shift used for PDSCH RE mapping.", HFILL }
10029 		},
10030 		{ &hf_nfapi_alt_cqi_table_r12,
10031 			{ "altCQI-Table-r12", "nfapi.alt.cqi.table.r12",
10032 			FT_UINT8, BASE_DEC, NULL, 0x0,
10033 			"altCQI-Table-r12 is indicative of using an alternative MCS table for UEs supporting 256QAM."
10034 			"This is taken into account for calculation of soft buffer size for the transport block", HFILL }
10035 		},
10036 		{ &hf_nfapi_max_layers,
10037 			{ "MaxLayers", "nfapi.max.layers",
10038 			FT_UINT16, BASE_DEC, NULL, 0x0,
10039 			"Maximal number of negotiated / configured layers for a UE, used for the calculation of soft buffer size for the transport block", HFILL }
10040 		},
10041 		{ &hf_nfapi_n_dl_harq,
10042 			{ "N_DL_HARQ", "nfapi.n.dl.harq",
10043 			FT_UINT8, BASE_DEC, NULL, 0x0,
10044 			NULL, HFILL }
10045 		},
10046 		{ &hf_nfapi_dwpts_symbols,
10047 			{ "DwPTS Symbols", "nfapi.dwpts.symbols",
10048 			FT_UINT8, BASE_DEC, NULL, 0x0,
10049 			"Valid if DCI format 1C is being used to signal LAA end partial SF. Indicates the number of starting symbols according to 36.213 Table 13-A-1", HFILL }
10050 		},
10051 		{ &hf_nfapi_initial_lbt_sf,
10052 			{ "Initial LBT SF", "nfapi.initial.lbt.sf",
10053 			FT_UINT8, BASE_DEC, NULL, 0x0,
10054 			"Indicates if the DCI PDU is prepared for full SF (regular) or for initial partial SF (2nd slot) according to [11] section 6.2.4 (if PDCCH) or 6.2.4A (if ePDCCH)", HFILL }
10055 		},
10056 		{ &hf_nfapi_ue_type,
10057 			{ "UE Type", "nfapi.ue.type",
10058 			FT_UINT8, BASE_DEC, VALS(dlsch_re13_ue_type_vals), 0x0,
10059 			NULL, HFILL }
10060 		},
10061 		{ &hf_nfapi_pdsch_payload_type,
10062 			{ "PDSCH Payload Type", "nfapi.pdsch.payload.type",
10063 			FT_UINT8, BASE_DEC, VALS(dlsch_re13_pdsch_payload_type_vals), 0x0,
10064 			NULL, HFILL }
10065 		},
10066 		{ &hf_nfapi_initial_transmission_sf,
10067 			{ "Initial transmission SF (io)", "nfapi.init.tx.sf.io",
10068 			FT_UINT16, BASE_DEC, NULL, 0x0,
10069 			"Absolute Sub-Frame of the initial transmission", HFILL }
10070 		},
10071 		{ &hf_nfapi_req13_drms_table_flag,
10072 			{ "Rel-13-DMRS-tabe flag", "nfapi.r13.drms.table.flag",
10073 			FT_UINT8, BASE_DEC, NULL, 0x0,
10074 			"Indicates if Release 13 DMRS table is used.", HFILL }
10075 		},
10076 		{ &hf_nfapi_csi_rs_resource_index,
10077 			{ "CSI-RS resource Index", "nfapi.csi.rs.resource.index",
10078 			FT_UINT8, BASE_DEC, NULL, 0x0,
10079 			"Index of the CSI-RS resource. This is included to link bfValues to CSI-RS resources included in Release 10 parameters.", HFILL }
10080 		},
10081 		{ &hf_nfapi_csi_rs_class,
10082 			{ "Class", "nfapi.csi.rs.class",
10083 			FT_UINT8, BASE_DEC, VALS(csi_rs_class_vals), 0x0,
10084 			"Indicates CSI-RS class", HFILL }
10085 		},
10086 		{ &hf_nfapi_cdm_type,
10087 			{ "CDM Type", "nfapi.cdm.type",
10088 			FT_UINT8, BASE_DEC, VALS(csi_rs_cdm_type_vals), 0x0,
10089 			"Indicates CDM type for CSI-RS. See [36.211] section 6.10.5.2. Valid for Class A", HFILL }
10090 		},
10091 		{ &hf_nfapi_epdcch_prb_index,
10092 			{ "EPDCCH PRB Index", "nfapi.epdcch.prb.index",
10093 			FT_UINT8, BASE_DEC, NULL, 0x0,
10094 			"PRB Index", HFILL }
10095 		},
10096 		{ &hf_nfapi_epdcch_resource_assignment_flag,
10097 			{ "EPDCCH Resource assignment flag", "nfapi.epdcch.resource.assignment.flag",
10098 			FT_UINT8, BASE_DEC, VALS(local_distributed_vals), 0x0,
10099 			"Type of virtual resource block used", HFILL }
10100 		},
10101 		{ &hf_nfapi_epdcch_id,
10102 			{ "EPDCCH ID", "nfapi.epdcch.id",
10103 			FT_UINT8, BASE_DEC, NULL, 0x0,
10104 			"EPDCCH Index- used for the scrambler initiation The DMRS scrambling sequence initialization parameter defined in[11] section 6.10.3A.1", HFILL }
10105 		},
10106 		{ &hf_nfapi_epdcch_start_symbol,
10107 			{ "EPDCCH Start Symbol", "nfapi.epdcch.start.symbol",
10108 			FT_UINT8, BASE_DEC, NULL, 0x0,
10109 			"Indicates the OFDM starting symbol for any EPDCCH and PDSCH", HFILL }
10110 		},
10111 		{ &hf_nfapi_epdcch_num_prb,
10112 			{ "EPDCCH NumPRB", "nfapi.epdcch.num.prb",
10113 			FT_UINT8, BASE_DEC, NULL, 0x0,
10114 			"Number of PRBs allocated for EPDCCH", HFILL }
10115 		},
10116 		{ &hf_nfapi_precoding_value,
10117 			{ "Precoding value", "nfapi.precoding.value",
10118 			FT_UINT16, BASE_DEC, NULL, 0x0,
10119 			"Precoding element for physical antenna #i real 8 bits followed by imaginary 8 bits", HFILL }
10120 		},
10121 		{ &hf_nfapi_mpdcch_narrowband,
10122 			{ "MPDCCH Narrowband", "nfapi.mpdcch.narrowband",
10123 			FT_UINT8, BASE_DEC, NULL, 0x0,
10124 			"Narrowband for MPDCCH", HFILL }
10125 		},
10126 		{ &hf_nfapi_number_of_prb_pairs,
10127 			{ "Number of PRB pairs", "nfapi.number.prb.pairs",
10128 			FT_UINT8, BASE_DEC, NULL, 0x0,
10129 			"Number of PRB-pairs constituting the MPDCCH-PRB-pair set", HFILL }
10130 		},
10131 		{ &hf_nfapi_resource_block_assignment,
10132 			{ "Resource Block Assignment", "nfapi.resource.block.assignment",
10133 			FT_UINT8, BASE_DEC, NULL, 0x0,
10134 			"Combinational Index r", HFILL }
10135 		},
10136 		{ &hf_nfapi_start_symbol,
10137 			{ "Start symbol", "nfapi.start.symbol",
10138 			FT_UINT8, BASE_DEC, NULL, 0x0,
10139 			NULL, HFILL }
10140 		},
10141 		{ &hf_nfapi_ecce_index,
10142 			{ "ECCE Index", "nfapi.ecce.index",
10143 			FT_UINT8, BASE_DEC, NULL, 0x0,
10144 			"ECCE Index used to send the DCI", HFILL }
10145 		},
10146 		{ &hf_nfapi_ce_mode,
10147 			{ "CE Mode", "nfapi.ce.mode",
10148 			FT_UINT8, BASE_DEC, VALS(ce_mode_vals), 0x0,
10149 			NULL, HFILL }
10150 		},
10151 		{ &hf_nfapi_drms_scrabmling_init,
10152 			{ "DMRS scrambling init", "nfapi.drms.scrambling.init",
10153 			FT_UINT16, BASE_DEC, NULL, 0x0,
10154 			"The DMRS scrambling sequence initialization parameter defined in [11] section 6.10.3A.1", HFILL }
10155 		},
10156 		{ &hf_nfapi_pdsch_reception_levels,
10157 			{ "PDSCH repetition levels", "nfapi.pdsch.repetition.levels",
10158 			FT_UINT8, BASE_DEC, NULL, 0x0,
10159 			"Valid for DCI formats: 6-0A, 6-0B", HFILL }
10160 		},
10161 		{ &hf_nfapi_new_data_indicator,
10162 			{ "New data indicator", "nfapi.new.data.indicator",
10163 			FT_UINT8, BASE_DEC, NULL, 0x0,
10164 			"The new data indicator for the transport block", HFILL }
10165 		},
10166 		{ &hf_nfapi_tpmi_length,
10167 			{ "TPMI length", "nfapi.tpmi.length",
10168 			FT_UINT8, BASE_DEC, NULL, 0x0,
10169 			"Length of 'TPMI' field in units of bits", HFILL }
10170 		},
10171 		{ &hf_nfapi_pmi_flag,
10172 			{ "PMI flag", "nfapi.pmi.flag",
10173 			FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
10174 			"Indicates if 'PMI' field is present", HFILL }
10175 		},
10176 		{ &hf_nfapi_harq_resource_offset,
10177 			{ "HARQ resource offset", "nfapi.harq.resource.offset",
10178 			FT_UINT8, BASE_DEC, NULL, 0x0,
10179 			"HARQ-ACK resource offset used", HFILL }
10180 		},
10181 		{ &hf_nfapi_dci_subframe_repetition_number,
10182 			{ "DCI subframe repetition number", "nfapi.dci.subframe.repetition.number",
10183 			FT_UINT8, BASE_DEC, NULL, 0x0,
10184 			"Indicates the number of MPDCCH repetitions", HFILL }
10185 		},
10186 		{ &hf_nfapi_downlink_assignment_index_length,
10187 			{ "Downlink assignment Index Length", "nfapi.dl.assignment.index.length",
10188 			FT_UINT8, BASE_DEC, NULL, 0x0,
10189 			"Length of Downlink assignment Index field in units of bits.", HFILL }
10190 		},
10191 		{ &hf_nfapi_starting_ce_level,
10192 			{ "Starting CE Level", "nfapi.starting.ce.level",
10193 			FT_UINT8, BASE_DEC, NULL, 0x0,
10194 			"2 bits provide the PRACH starting CE level", HFILL }
10195 		},
10196 		{ &hf_nfapi_antenna_ports_and_scrambling_identity_flag,
10197 			{ "Antenna ports and scrambling identity flag", "nfapi.antenna.ports.and.scrambling.identity.flag",
10198 			FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
10199 			"Indicates if 'Antenna ports and scrambling identity' field is present.", HFILL }
10200 		},
10201 		{ &hf_nfapi_antenna_ports_and_scrambling_identity,
10202 			{ "Antenna ports and scrambling identity", "nfapi.antenna.ports.and.scrambling.identity",
10203 			FT_UINT8, BASE_DEC, NULL, 0x0,
10204 			"Indicates the Antenna port and, scrambling identity value", HFILL }
10205 		},
10206 		{ &hf_nfapi_paging_direct_indication_differentiation_flag,
10207 			{ "Paging/Direct indication differentiation flag", "nfapi.paging.direct.indication.differentiation.flag",
10208 			FT_UINT8, BASE_DEC, VALS(paging_direct_indication_differtiation_flag_vals), 0x0,
10209 			"Valid for DCI format 6-2", HFILL }
10210 		},
10211 		{ &hf_nfapi_direct_indication,
10212 			{ "Direct indication", "nfapi.direct.indication",
10213 			FT_UINT8, BASE_DEC, NULL, 0x0,
10214 			"Valid for DCI format 6-2", HFILL }
10215 		},
10216 		{ &hf_nfapi_number_of_tx_antenna_ports,
10217 			{ "Number of TX Antenna ports", "nfapi.num.of.tx.antenna.ports",
10218 			FT_UINT8, BASE_DEC, NULL, 0x0,
10219 			"Number of TX physical antenna ports", HFILL }
10220 		},
10221 		{ &hf_nfapi_transmission_power,
10222 			{ "Transmission Power", "nfapi.transmission_power",
10223 			FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
10224 			"Offset to the reference signal power.", HFILL }
10225 		},
10226 		{ &hf_nfapi_mbsfn_area_id,
10227 			{ "MBSFN Area id", "nfapi.mbsfn.area.id",
10228 			FT_UINT16, BASE_DEC, NULL, 0x0,
10229 			"Indicates MBSFN area ID", HFILL }
10230 		},
10231 		{ &hf_nfapi_dl_dci_format,
10232 			{ "DL DCI format", "nfapi.dl.dci.format",
10233 			FT_UINT8, BASE_DEC, VALS(dl_dci_format_vals), 0x0,
10234 			"Format of the DL DCI", HFILL }
10235 		},
10236 		{ &hf_nfapi_ul_dci_format,
10237 			{ "UL DCI format", "nfapi.ul_dci.format",
10238 			FT_UINT8, BASE_DEC, VALS(ul_dci_format_vals), 0x0,
10239 			"Format of the UL DCI", HFILL }
10240 		},
10241 		{ &hf_nfapi_mpdcch_ul_dci_format,
10242 			{ "UL DCI format", "nfapi.mpdcch.ul_dci.format",
10243 			FT_UINT8, BASE_DEC, VALS(mpdcch_ul_dci_format_vals), 0x0,
10244 			"Format of the UL DCI", HFILL }
10245 		},
10246 		{ &hf_nfapi_cce_idx,
10247 			{ "CCE Index", "nfapi.cce.index",
10248 			FT_UINT8, BASE_DEC, NULL, 0x0,
10249 			"CCE Index used to send the DCI", HFILL }
10250 		},
10251 		{ &hf_nfapi_aggregation_level,
10252 			{ "Aggregation level", "nfapi.aggregation.level",
10253 			FT_UINT8, BASE_DEC, NULL, 0x0,
10254 			"The aggregation level used", HFILL }
10255 		},
10256 		{ &hf_nfapi_mcs_1,
10257 			{ "MCS_1", "nfapi.mcs_1",
10258 			FT_UINT8, BASE_DEC, NULL, 0x0,
10259 			"The modulation and coding scheme for 1st transport block", HFILL }
10260 		},
10261 		{ &hf_nfapi_mcs_2,
10262 			{ "MCS_2", "nfapi.mcs_2",
10263 			FT_UINT8, BASE_DEC, NULL, 0x0,
10264 			"The modulation and coding scheme for 2nd transport block", HFILL }
10265 		},
10266 		{ &hf_nfapi_redundancy_version_1,
10267 			{ "Redundancy version_1", "nfapi.redundancy.version.1",
10268 			FT_UINT8, BASE_DEC, NULL, 0x0,
10269 			"The redundancy version for 1st transport block.", HFILL }
10270 		},
10271 		{ &hf_nfapi_redundancy_version_2,
10272 			{ "Redundancy version_2", "nfapi.redundancy.version.2",
10273 			FT_UINT8, BASE_DEC, NULL, 0x0,
10274 			"The redundancy version for 2nd transport block", HFILL }
10275 		},
10276 		{ &hf_nfapi_new_data_indicator_1,
10277 			{ "New data indicator_1", "nfapi.new.data.indicator.1",
10278 			FT_UINT8, BASE_DEC, NULL, 0x0,
10279 			"The new data indicator for 1st transport block.", HFILL }
10280 		},
10281 		{ &hf_nfapi_new_data_indicator_2,
10282 			{ "New data indicator_2", "nfapi.new.data.indicator.2",
10283 			FT_UINT8, BASE_DEC, NULL, 0x0,
10284 			"The new data indicator for 2nd transport block.", HFILL }
10285 		},
10286 		{ &hf_nfapi_harq_process,
10287 			{ "HARQ process", "nfapi.harq.process",
10288 			FT_UINT8, BASE_DEC, NULL, 0x0,
10289 			"HARQ process number", HFILL }
10290 		},
10291 		{ &hf_nfapi_tpmi,
10292 			{ "TPMI", "nfapi.tpmi",
10293 			FT_UINT8, BASE_DEC, NULL, 0x0,
10294 			"The codebook Index to be used for precoding", HFILL }
10295 		},
10296 		{ &hf_nfapi_pmi,
10297 			{ "PMI", "nfapi.pmi",
10298 			FT_UINT8, BASE_DEC, VALS(pmi_vals), 0x0,
10299 			"Confirmation for precoding", HFILL }
10300 		},
10301 		{ &hf_nfapi_precoding_information,
10302 			{ "Precoding information", "nfapi.precoding.information",
10303 			FT_UINT8, BASE_DEC, NULL, 0x0,
10304 			NULL, HFILL }
10305 		},
10306 		{ &hf_nfapi_tpc,
10307 			{ "TPC", "nfapi.tpc",
10308 			FT_UINT8, BASE_DEC, NULL, 0x0,
10309 			"Tx power control command for PUCCH", HFILL }
10310 		},
10311 		{ &hf_nfapi_downlink_assignment_index,
10312 			{ "Downlink assignment Index", "nfapi.downlink.assignment.index",
10313 			FT_UINT8, BASE_DEC, NULL, 0x0,
10314 			"The downlink assignment Index. In release 8-11 this is only used in TDD mode, "
10315 			"value ignored for FDD. In release 12 or later a field indicating the structure "
10316 			"type of the primary cell is used to determine if this is valid with size 2 bits."
10317 			"In release 13 or later a field indicating codebooksizeDetermination - r13 = 0 is "
10318 			"used to determine is this field is valid with size 4 bits", HFILL }
10319 		},
10320 		{ &hf_nfapi_ngap,
10321 			{ "Ngap", "nfapi.ngap",
10322 			FT_UINT8, BASE_DEC, VALS(ngap_vals), 0x0,
10323 			"Used in virtual resource block distribution", HFILL }
10324 		},
10325 		{ &hf_nfapi_transport_block_size_index,
10326 			{ "Transport block size Index", "nfapi.transport.block.size.index",
10327 			FT_UINT8, BASE_DEC, NULL, 0x0,
10328 			"The transport block size", HFILL }
10329 		},
10330 		{ &hf_nfapi_downlink_power_offset,
10331 			{ "Downlink power offset", "nfapi.downlink.power.offset",
10332 			FT_UINT8, BASE_DEC, NULL, 0x0,
10333 			"Indicates the DL power offset type for multi-user MIMO transmission", HFILL }
10334 		},
10335 		{ &hf_nfapi_allocate_prach_flag,
10336 			{ "Allocation PRACH flag", "nfapi.allocation.prach.flag",
10337 			FT_UINT8, BASE_DEC, VALS(true_false_vals), 0x0,
10338 			"Indicates that PRACH procedure is initiated", HFILL }
10339 		},
10340 		{ &hf_nfapi_preamble_index,
10341 			{ "Preamble Index", "nfapi.preamble.index",
10342 			FT_UINT8, BASE_DEC, NULL, 0x0,
10343 			"The preamble Index to be used on the PRACH", HFILL }
10344 		},
10345 		{ &hf_nfapi_prach_mask_index,
10346 			{ "PRACH mask Index", "nfapi.prach.mask.index",
10347 			FT_UINT8, BASE_DEC, NULL, 0x0,
10348 			"The mask Index to be used on the PRACH", HFILL }
10349 		},
10350 		{ &hf_nfapi_rnti_type,
10351 			{ "RNTI type", "nfapi.rnti.type",
10352 			FT_UINT8, BASE_DEC, VALS(rnti_type_vals), 0x0,
10353 			NULL, HFILL }
10354 		},
10355 		{ &hf_nfapi_mpdcch_rnti_type,
10356 			{ "RNTI type", "nfapi.mpdcch.rnti.type",
10357 			FT_UINT8, BASE_DEC, VALS(mpdcch_rnti_type_vals), 0x0,
10358 			NULL, HFILL }
10359 		},
10360 		{ &hf_nfapi_mcch_flag,
10361 			{ "MCCH flag", "nfapi.mcch.flag",
10362 			FT_BOOLEAN, BASE_NONE, TFS(&mcch_flag_string_name), 0x0,
10363 			"Indicates if format 1C is being used to signal a MCCH or SC-MCCH change notification", HFILL }
10364 		},
10365 		{ &hf_nfapi_mcch_change_notification,
10366 			{ "MCCH change notification", "nfapi.mcch.change.notification",
10367 			FT_UINT8, BASE_DEC, NULL, 0x0,
10368 			"MCCH or SC-MCCH Change Notification", HFILL }
10369 		},
10370 		{ &hf_nfapi_scrambling_identity,
10371 			{ "Scrambling identity", "nfapi.scrambling.identity",
10372 			FT_UINT8, BASE_DEC, NULL, 0x0,
10373 			"Indicates the scrambling identity value NSCID", HFILL }
10374 		},
10375 		{ &hf_nfapi_cross_carrier_scheduling_flag,
10376 			{ "Cross Carrier scheduling flag", "nfapi.cross.carrier.scheduling.flag",
10377 			FT_BOOLEAN, 8, TFS(&cross_carrier_scheduling_flag_strname), 0x0,
10378 			"Indicates if cross carrier scheduling has been enabled for the UE receiving this DCI", HFILL }
10379 		},
10380 		{ &hf_nfapi_carrier_indicator,
10381 			{ "Carrier Indicator", "nfapi.carrier.indicator",
10382 			FT_UINT8, BASE_DEC, NULL, 0x0,
10383 			"Serving Cell Index", HFILL }
10384 		},
10385 		{ &hf_nfapi_srs_flag,
10386 			{ "SRS flag", "nfapi.srs.flag",
10387 			FT_BOOLEAN, 8, TFS(&srs_flag_strname), 0x0,
10388 			"Indicates if the SRS request parameter is valid", HFILL }
10389 		},
10390 		{ &hf_nfapi_srs_request,
10391 			{ "SRS request", "nfapi.srs.request",
10392 			FT_BOOLEAN, 8, TFS(&srs_request_strname), 0x0,
10393 			"SRS request flag", HFILL }
10394 		},
10395 		{ &hf_nfapi_antenna_ports_scrambling_and_layers,
10396 			{ "Antenna ports scrambling and layers", "nfapi.antenna.ports.scrambling.and.layers",
10397 			FT_UINT8, BASE_DEC, NULL, 0x0,
10398 			"Indicates the Antenna port, scrambling identity value NSCID and number of layers", HFILL }
10399 		},
10400 		{ &hf_nfapi_total_dci_length_including_padding,
10401 			{ "Total DCI length including padding", "nfapi.total.dci.length.including.padding",
10402 			FT_UINT8, BASE_DEC, NULL, 0x0,
10403 			"The total DCI length including padding bits", HFILL }
10404 		},
10405 		{ &hf_nfapi_n_ul_rb,
10406 			{ "N_UL_RB", "nfapi.n.dl.rb",
10407 			FT_UINT8, BASE_DEC, NULL, 0x0,
10408 			"BW of serving cell for which the DCI was scheduled for.  This is valid for "
10409 			"the case of cross carrier scheduling, for the case of a self - "
10410 			"scheduling(cross carrier scheduling is not valid or Carrier indicator has value '0', "
10411 			"the BW is the 'DL BW support' as configured in configuration phase(params) "
10412 			"Uplink channel bandwidth in resource blocks", HFILL }
10413 		},
10414 		{ &hf_nfapi_harq_ack_resource_offset,
10415 			{ "HARQ-ACK resource offset", "nfapi.harq.ack.resource.offset",
10416 			FT_UINT8, BASE_DEC, NULL, 0x0,
10417 			"HARQ-ACK resource offset field is present only when this format is carried by EPDCCH.", HFILL }
10418 		},
10419 		{ &hf_nfapi_pdsch_re_mapping_and_quasi_co_location_indicator,
10420 			{ "PDSCH RE Mapping and Quasi-Co-Location Indicator", "nfapi.pdsch.re.mapping",
10421 			FT_UINT8, BASE_DEC, NULL, 0x0,
10422 			"Indicates the parameter set configured by the higher layers which the UE should use.", HFILL }
10423 		},
10424 		{ &hf_nfapi_primary_cell_type,
10425 			{ "Primary cell type", "nfapi.primary.cell.type",
10426 			FT_UINT8, BASE_DEC, VALS(primary_cells_type_vals), 0x0,
10427 			"Indicates the type of the primary cell.", HFILL }
10428 		},
10429 		{ &hf_nfapi_ul_dl_configuration_flag,
10430 			{ "UL/DL configuration flag", "nfapi.ul.dl.configuration.flag",
10431 			FT_BOOLEAN, 8, TFS(&ul_dl_configuration_flag_strname), 0x0,
10432 			"Indicates if format 1C is being used to signal UL/DL configuration", HFILL }
10433 		},
10434 		{ &hf_nfapi_number_of_ul_dl_configurations,
10435 			{ "Number of UL/DL configurations", "nfapi.number.ul.dl.configurations",
10436 			FT_UINT8, BASE_DEC, NULL, 0x0,
10437 			NULL, HFILL }
10438 		},
10439 		{ &hf_nfapi_ul_dl_configuration_index,
10440 			{ "UL/DL configuration indication", "nfapi.ul.dl.configuration.indication",
10441 			FT_UINT8, BASE_DEC, NULL, 0x0,
10442 			"UL/DL configuration Index", HFILL }
10443 		},
10444 		{ &hf_nfapi_laa_end_partial_sf_flag,
10445 			{ "LAA end partial SF flag", "nfapi.laa.end.partial.sf.flag",
10446 			FT_UINT8, BASE_DEC, NULL, 0x0,
10447 			"Indicates if DCI format 1C is being used to signal LAA end partial SF (valid if end partial SF support configuration is set)", HFILL }
10448 		},
10449 		{ &hf_nfapi_laa_end_partial_sf_configuration,
10450 			{ "LAA end partial SF configuration", "nfapi.laa.end.partial.sf.configuration",
10451 			FT_UINT8, BASE_DEC, NULL, 0x0,
10452 			"If DCI format 1C scrambled by CC - RNTI is used to signal end partial SF, this field "
10453 			"contains LAA common information (4 bits used in [9] Table 13A-1 for configuration of "
10454 			"occupied OFDM symbols for current and next SF)", HFILL }
10455 		},
10456 		{ &hf_nfapi_codebooksize_determination_r13,
10457 			{ "Codebook Size Determination R13", "nfapi.codebook.size.determination.r13",
10458 			FT_UINT8, BASE_DEC, NULL, 0x0,
10459 			"Indicates if the downlink assignment Index parameter (DAI) is 4 bits", HFILL }
10460 		},
10461 		{ &hf_nfapi_rel13_drms_table_flag,
10462 			{ "Rel-13-DMRS-tabe flag", "nfapi.drms.table.flag.r13",
10463 			FT_UINT8, BASE_DEC, NULL, 0x0,
10464 			"Indicates if Release 13 DMRS table for be used", HFILL }
10465 		},
10466 		{ &hf_nfapi_pscch_resource,
10467 			{ "PSCCH Resource", "nfapi.pscch.resource",
10468 			FT_UINT8, BASE_DEC, NULL, 0x0,
10469 			"6-bits describing the resource blocks for transmitting PSCCH", HFILL }
10470 		},
10471 		{ &hf_nfapi_time_resource_pattern,
10472 			{ "Time resource pattern", "nfapi.time.resource.pattern",
10473 			FT_UINT8, BASE_DEC, NULL, 0x0,
10474 			"7-bits describing the time resource pattern Index", HFILL }
10475 		},
10476 		{ &hf_nfapi_mpdcch_transmission_type,
10477 			{ "MPDCCH transmission type", "nfapi.mpdcch.transmission.type",
10478 			FT_UINT8, BASE_DEC, VALS(local_distributed_vals), 0x0,
10479 			NULL, HFILL }
10480 		},
10481 		{ &hf_nfapi_drms_scrambling_init,
10482 			{ "DMRS scrambling init", "nfapi.drms.scrambling.init",
10483 			FT_UINT8, BASE_DEC, NULL, 0x0,
10484 			"The DMRS scrambling sequence initialization", HFILL }
10485 		},
10486 		{ &hf_nfapi_pusch_repetition_levels,
10487 			{ "PUSCH repetition levels", "nfapi.pusch.repetition.levels",
10488 			FT_UINT8, BASE_DEC, NULL, 0x0,
10489 			"Valid for DCI formats: 6-0A, 6-0B", HFILL }
10490 		},
10491 		{ &hf_nfapi_frequency_hopping_flag,
10492 			{ "Frequency hopping flag", "nfapi.frequency.hopping.flag",
10493 			FT_UINT8, BASE_DEC, NULL, 0x0,
10494 			"Indicates if hopping is being used.", HFILL }
10495 		},
10496 		{ &hf_nfapi_csi_request,
10497 			{ "CSI request", "nfapi.csi.request",
10498 			FT_UINT8, BASE_DEC, VALS(csi_request_vals), 0x0,
10499 			"Aperiodic CSI request flag", HFILL }
10500 		},
10501 		{ &hf_nfapi_dai_presence_flag,
10502 			{ "DAI presence flag", "nfapi.dia.presence.flag",
10503 			FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
10504 			"Indicates if DL assignment Index field is present in the DCI", HFILL }
10505 		},
10506 		{ &hf_nfapi_total_dci_length_include_padding,
10507 			{ "Total DCI length including padding", "nfapi.total.dci.length.including.padding",
10508 			FT_UINT8, BASE_DEC, NULL, 0x0,
10509 			"The total DCI length including padding bits", HFILL }
10510 		},
10511 		{ &hf_nfapi_csi_rs_antenna_port_count_r10,
10512 			{ "CSI-RS antenna port count r10", "nfapi.csi.rs.antenna.port.count.r10",
10513 			FT_UINT8, BASE_DEC, NULL, 0x0,
10514 			"Indicates number of antennas used for transmission of CSI reference signal.", HFILL }
10515 		},
10516 		{ &hf_nfapi_ul_config_pdu_type,
10517 			{ "UL Config PDU Type", "nfapi.ul.config.pdu.type",
10518 			FT_UINT8, BASE_DEC, VALS(nfapi_ul_config_pdu_type_vals), 0x0,
10519 			NULL, HFILL }
10520 		},
10521 		{ &hf_nfapi_rach_prach_frequency_resources,
10522 			{ "RACH PRACH Frequency resources", "nfapi.rach.prach.frequency.resources",
10523 			FT_UINT8, BASE_DEC, NULL, 0x0,
10524 			"If semi-static information is held in the MAC", HFILL }
10525 		},
10526 		{ &hf_nfapi_srs_present,
10527 			{ "SRS present", "nfapi.srs.present",
10528 			FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
10529 			"If semi-static information is held in the MAC", HFILL }
10530 		},
10531 		{ &hf_nfapi_handle,
10532 			{ "Handle", "nfapi.handle",
10533 			FT_UINT32, BASE_DEC, NULL, 0x0,
10534 			"An opaque handle", HFILL }
10535 		},
10536 		{ &hf_nfapi_pucch_index,
10537 			{ "PUCCH Index", "nfapi.pucch.index",
10538 			FT_UINT16, BASE_DEC, NULL, 0x0,
10539 			"The PUCCH Index value", HFILL }
10540 		},
10541 		{ &hf_nfapi_size,
10542 			{ "Size", "nfapi.size",
10543 			FT_UINT16, BASE_DEC, NULL, 0x0,
10544 			"The size of the ULSCH PDU in bytes as defined by the relevant UL grant", HFILL }
10545 		},
10546 		{ &hf_nfapi_resource_block_start,
10547 			{ "Resource block start", "nfapi.resource.block.start",
10548 			FT_UINT8, BASE_DEC, NULL, 0x0,
10549 			"The starting resource block for this ULSCH allocation", HFILL }
10550 		},
10551 		{ &hf_nfapi_number_of_resource_blocks,
10552 			{ "Number of resource blocks", "nfapi.resource.blocks",
10553 			FT_UINT8, BASE_DEC, NULL, 0x0,
10554 			"The number of resource blocks allocated to this ULSCH grant", HFILL }
10555 		},
10556 		{ &hf_nfapi_cyclic_shift_2_for_drms,
10557 			{ "Cyclic Shift 2 for DRMS", "nfapi.cyclic.shift.2.for.drms",
10558 			FT_UINT8, BASE_DEC, NULL, 0x0,
10559 			"The 2nd cyclic shift for DMRS assigned to the UE in the ULSCH grant", HFILL }
10560 		},
10561 		{ &hf_nfapi_frequency_hopping_enabled_flag,
10562 			{ "Frequency hopping enabled flag", "nfapi.frequency.hopping.enabled.flag",
10563 			FT_UINT8, BASE_DEC, VALS(hopping_vals), 0x0,
10564 			"Indicates if hopping is being used", HFILL }
10565 		},
10566 		{ &hf_nfapi_frequency_hopping_bits,
10567 			{ "Frequency hopping bits", "nfapi.frequency.hopping.bits",
10568 			FT_UINT8, BASE_DEC, NULL, 0x0,
10569 			NULL, HFILL }
10570 		},
10571 		{ &hf_nfapi_new_data_indication,
10572 			{ "New Data indication", "nfapi.new.data.indication",
10573 			FT_UINT8, BASE_DEC, NULL, 0x0,
10574 			"Specify whether this received transport block is a new transmission from UE", HFILL }
10575 		},
10576 		{ &hf_nfapi_harq_process_number,
10577 			{ "HARQ Process number", "nfapi.harq.process.number",
10578 			FT_UINT8, BASE_DEC, NULL, 0x0,
10579 			NULL, HFILL }
10580 		},
10581 		{ &hf_nfapi_ul_tx_mode,
10582 			{ "UL Tx Mode", "nfapi.ul.tx.mode",
10583 			FT_UINT8, BASE_DEC, VALS(ul_tx_mode_vals), 0x0,
10584 			NULL, HFILL }
10585 		},
10586 		{ &hf_nfapi_current_tx_nb,
10587 			{ "Current Tx nb", "nfapi.current.tx.nb",
10588 			FT_UINT8, BASE_DEC, NULL, 0x0,
10589 			"The current HARQ transmission count of this transport block. Valid if frequency hopping enabled.", HFILL }
10590 		},
10591 		{ &hf_nfapi_n_srs,
10592 			{ "N SRS", "nfapi.n.srs",
10593 			FT_UINT8, BASE_DEC, VALS(n_srs_vals), 0x0,
10594 			"Indicates if the resource blocks allocated for this grant overlap with the SRS configuration.", HFILL }
10595 		},
10596 		{ &hf_nfapi_disable_sequence_hopping_flag,
10597 			{ "Disable sequence hopping flag", "nfapi.disable.sequence.hopping.flag",
10598 			FT_UINT8, BASE_DEC, NULL, 0x0,
10599 			"Indicates if any configured group hopping should be disabled for this UE.", HFILL }
10600 		},
10601 		{ &hf_nfapi_virtual_cell_id_enabled_flag,
10602 			{ "Virtual cell ID enabled flag", "nfapi.virtual.cell.id.enabled.flag",
10603 			FT_UINT8, BASE_DEC, VALS(not_used_enabled_vals), 0x0,
10604 			"Indicates if virtual cell is being used and nPUSCH identity is valid.", HFILL }
10605 		},
10606 		{ &hf_nfapi_npusch_identity,
10607 			{ "nPUSCH Identity", "nfapi.npusch.identity",
10608 			FT_UINT16, BASE_DEC, NULL, 0x0,
10609 			"Virtual cell ID for initialization of group hopping, sequence hopping and sequence shift pattern of PUSCH DMRS.", HFILL }
10610 		},
10611 		{ &hf_nfapi_ndrms_csh_identity,
10612 			{ "nDMRS-CSH Identity", "nfapi.ndrms.csh.identity",
10613 			FT_UINT16, BASE_DEC, NULL, 0x0,
10614 			"Virtual cell ID for initialization of cyclic shift hopping of PUSCH DMRS.", HFILL }
10615 		},
10616 		{ &hf_nfapi_total_number_of_repetitions,
10617 			{ "Total Number of repetitions", "nfapi.total.number.of.repetitions",
10618 			FT_UINT16, BASE_DEC, NULL, 0x0,
10619 			NULL, HFILL }
10620 		},
10621 		{ &hf_nfapi_repetition_number,
10622 			{ "Repetition Number", "nfapi.repetition.number",
10623 			FT_UINT16, BASE_DEC, NULL, 0x0,
10624 			"Current transmission number", HFILL }
10625 		},
10626 		{ &hf_nfapi_initial_sf_io,
10627 			{ "Initial transmission SF (io)", "nfapi.initial.sf.io",
10628 			FT_UINT16, BASE_DEC, NULL, 0x0,
10629 			"Absolute Sub-Frame of the initial transmission", HFILL }
10630 		},
10631 		{ &hf_nfapi_empty_symbols_due_to_retunning,
10632 			{ "Empty symbols due to re-tunning", "nfapi.empty.symbols.due.to.retunning",
10633 			FT_UINT8, BASE_DEC, NULL, 0x0,
10634 			"Indicates the symbols that are left empty due to eMTC retuning.", HFILL }
10635 		},
10636 		{ &hf_nfapi_dl_cqi_ri_pmi_size_2,
10637 			{ "DL CQI/PMI/RI size 2", "nfapi.dl.cqi.ri.pmi.size.2",
10638 			FT_UINT16, BASE_DEC, NULL, 0x0,
10639 			"The size of the DL CQI/PMI/RI in bits. If the CQI/PMI/RI size exceeds 255 (8-bits) then the Release 9 size value = 0, and this field is used instead.", HFILL }
10640 		},
10641 		{ &hf_nfapi_harq_size_2,
10642 			{ "HARQ Size 2", "nfapi.harq.size2",
10643 			FT_UINT16, BASE_DEC, NULL, 0x0,
10644 			"The size of the ACK/NACK in bits.", HFILL }
10645 		},
10646 		{ &hf_nfapi_delta_offset_harq_2,
10647 			{ "Delta Offset HARQ 2", "nfapi.delta.offset.harq.2",
10648 			FT_UINT8, BASE_DEC, NULL, 0x0,
10649 			"Delta offset 2 for HARQ. This value is fixed for a UE, allocated in RRC connection setup and used for ACK_NACK mode = 4 or 5", HFILL }
10650 		},
10651 		{ &hf_nfapi_starting_prb,
10652 			{ "Starting PRB", "nfapi.starting.prb",
10653 			FT_UINT8, BASE_DEC, NULL, 0x0,
10654 			"The starting PRB for the PUCCH", HFILL }
10655 		},
10656 		{ &hf_nfapi_antenna_port,
10657 			{ "Antenna Port", "nfapi.antenna.port",
10658 			FT_UINT8, BASE_DEC, VALS(antenna_ports_vals), 0x0,
10659 			"Defines the number of antenna ports used by the UE for the SRS. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10660 		},
10661 		{ &hf_nfapi_number_of_combs,
10662 			{ "Number of Combs", "nfapi.num.of.combs",
10663 			FT_UINT8, BASE_DEC, VALS(combs_vals), 0x0,
10664 			"Defines the maximum number of transmission combs (TC).", HFILL }
10665 		},
10666 		{ &hf_nfapi_npucch_identity,
10667 			{ "nPUCCH Identity", "nfapi.npucch.identity",
10668 			FT_UINT16, BASE_DEC, NULL, 0x0,
10669 			"Virtual cell ID for initialization of base sequence and cyclic shift hopping of PUCCH.", HFILL }
10670 		},
10671 		{ &hf_nfapi_empty_symbols,
10672 			{ "Empty symbols", "nfapi.empty.symbols",
10673 			FT_UINT8, BASE_DEC, NULL, 0x0,
10674 			"Indicates the symbols that are left empty due to eMTC retuning.", HFILL }
10675 		},
10676 		{ &hf_nfapi_csi_mode,
10677 			{ "CSI_mode", "nfapi.csi.mode",
10678 			FT_UINT8, BASE_DEC, VALS(csi_mode_vals), 0x0,
10679 			NULL, HFILL }
10680 		},
10681 		{ &hf_nfapi_dl_cqi_pmi_size_2,
10682 			{ "DL CQI/PMI Size 2", "nfapi.dl.cqi.pmi.size.2",
10683 			FT_UINT16, BASE_DEC, NULL, 0x0,
10684 			"The size of the DL CQI/PMI in bits", HFILL }
10685 		},
10686 		{ &hf_nfapi_statring_prb,
10687 			{ "Starting PRB", "nfapi.starting.prb",
10688 			FT_UINT8, BASE_DEC, NULL, 0x0,
10689 			"The starting PRB for the PUCCH", HFILL }
10690 		},
10691 		{ &hf_nfapi_cdm_index,
10692 			{ "cdm_Index", "nfapi.cdm.index",
10693 			FT_UINT8, BASE_DEC, NULL, 0x0,
10694 			"Selected CDM option", HFILL }
10695 		},
10696 		{ &hf_nfapi_nsrs,
10697 			{ "N srs", "nfapi.n.srs",
10698 			FT_UINT8, BASE_DEC, NULL, 0x0,
10699 			"Indicates if the resource blocks allocated for this grant overlap with the SRS configuration.", HFILL }
10700 		},
10701 		{ &hf_nfapi_num_ant_ports,
10702 			{ "Num_ant_ports", "nfapi.num.ant.port",
10703 			FT_UINT8, BASE_DEC, NULL, 0x0,
10704 			"The number of antenna ports used by the UE transmit", HFILL }
10705 		},
10706 		{ &hf_nfapi_n_pucch_2_0,
10707 			{ "n_PUCCH_2_0", "nfapi.n.pucch.2.0",
10708 			FT_UINT16, BASE_DEC, NULL, 0x0,
10709 			"The PUCCH Index value for ACK/NACK HARQ resource 4 on antenna port", HFILL }
10710 		},
10711 		{ &hf_nfapi_n_pucch_2_1,
10712 			{ "n_PUCCH_2_1", "nfapi.n.pucch.2.1",
10713 			FT_UINT16, BASE_DEC, NULL, 0x0,
10714 			"HARQ resource 5", HFILL }
10715 		},
10716 		{ &hf_nfapi_n_pucch_2_2,
10717 			{ "n_PUCCH_2_2", "nfapi.n.pucch.2.2",
10718 			FT_UINT16, BASE_DEC, NULL, 0x0,
10719 			"HARQ resource 6", HFILL }
10720 		},
10721 		{ &hf_nfapi_n_pucch_2_3,
10722 			{ "n_PUCCH_2_3", "nfapi.n.pucch.2.3",
10723 			FT_UINT16, BASE_DEC, NULL, 0x0,
10724 			"HARQ resource 7", HFILL }
10725 		},
10726 		{ &hf_nfapi_dl_cqi_pmi_size_rank_1,
10727 			{ "DL CQI PMI size rank 1", "nfapi.dl.cqi.pmi.size.rank.1",
10728 			FT_UINT8, BASE_DEC, NULL, 0x0,
10729 			"The size of the DL CQI/PMI in bits in case of rank 1 report.", HFILL }
10730 		},
10731 		{ &hf_nfapi_dl_cqi_pmi_size_rank_greater_1,
10732 			{ "DL CQI PMI size rank greater 1", "nfapi.dl.cqi.pmi.size.rank.1",
10733 			FT_UINT8, BASE_DEC, NULL, 0x0,
10734 			"The size of the DL CQI/PMI in bits in case of rank>1 report.", HFILL }
10735 		},
10736 		{ &hf_nfapi_ri_size,
10737 			{ "RI size", "nfapi.ri.size",
10738 			FT_UINT8, BASE_DEC, NULL, 0x0,
10739 			"The size of RI in bits", HFILL }
10740 		},
10741 		{ &hf_nfapi_delta_offset_cqi,
10742 			{ "Delta offset cqi", "nfapi.delta.offset.cqi",
10743 			FT_UINT8, BASE_DEC, NULL, 0x0,
10744 			"Delta offset for CQI. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10745 		},
10746 		{ &hf_nfapi_delta_offset_ri,
10747 			{ "Delta offset ri", "nfapi.delta.offset.ri",
10748 			FT_UINT8, BASE_DEC, NULL, 0x0,
10749 			"Delta offset for RI. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10750 		},
10751 		{ &hf_nfapi_harq_size,
10752 			{ "HARQ size", "nfapi.harq_size",
10753 			FT_UINT8, BASE_DEC, NULL, 0x0,
10754 			"The size of the ACK/NACK in bits", HFILL }
10755 		},
10756 		{ &hf_nfapi_delta_offset_harq,
10757 			{ "Delta offset HARQ", "nfapi.delta.offset.harq",
10758 			FT_UINT8, BASE_DEC, NULL, 0x0,
10759 			"Delta offset for HARQ. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10760 		},
10761 		{ &hf_nfapi_tdd_ack_nack_mode,
10762 			{ "ACK NACK mode", "nfapi.tdd.ack.nack.mode",
10763 			FT_UINT8, BASE_DEC, VALS(nfapi_tdd_ack_nack_mode_vals), 0x0,
10764 			"The format of the ACK/NACK response expected. For TDD only.", HFILL }
10765 		},
10766 		{ &hf_nfapi_fdd_ack_nack_mode,
10767 			{ "ACK NACK mode", "nfapi.fdd.ack.nack.mode",
10768 			FT_UINT8, BASE_DEC, VALS(nfapi_fdd_ack_nack_mode_vals), 0x0,
10769 			"The format of the ACK/NACK response expected. For TDD only.", HFILL }
10770 		},
10771 		{ &hf_nfapi_n_srs_initial,
10772 			{ "N srs initial", "nfapi.n.srs.initial",
10773 			FT_UINT8, BASE_DEC, VALS(n_srs_initial_vals), 0x0,
10774 			NULL, HFILL }
10775 		},
10776 		{ &hf_nfapi_initial_number_of_resource_blocks,
10777 			{ "Initial number of resource blocks", "nfapi.initial.number.of.resource.blocks",
10778 			FT_UINT8, BASE_DEC, NULL, 0x0,
10779 			"The number of resource blocks used in the initial transmission of this transport block.", HFILL }
10780 		},
10781 		{ &hf_nfapi_dl_cqi_pmi_size,
10782 			{ "DL cqi pmi size", "nfapi.dl.cqi.pmi.size",
10783 			FT_UINT8, BASE_DEC, NULL, 0x0,
10784 			"The size of the DL CQI/PMI in bits in case of this RI value. The size of the DL CQI / PMI / RI in bits in case of this CRI value", HFILL }
10785 		},
10786 		{ &hf_nfapi_report_type,
10787 			{ "Report type", "nfapi.report.type",
10788 			FT_BOOLEAN, 8, TFS(&nfapi_csi_report_type_strname), 0x0,
10789 			"Type of CSI report", HFILL }
10790 		},
10791 		{ &hf_nfapi_dl_cqi_ri_pmi_size,
10792 			{ "DL CQI/PMI/RI size", "nfapi.dl.cqi.ri.pmi.size",
10793 			FT_UINT8, BASE_DEC, NULL, 0x0,
10794 			"The size of the DL CQI/PMI/RI/CRI in bits", HFILL }
10795 		},
10796 		{ &hf_nfapi_control_type,
10797 			{ "Control type", "nfapi.control.type",
10798 			FT_BOOLEAN, 8, TFS(&nfapi_control_type_string_name), 0x0,
10799 			NULL, HFILL }
10800 		},
10801 		{ &hf_nfapi_number_of_cc,
10802 			{ "Number of cc", "nfapi.number.of.cc",
10803 			FT_UINT8, BASE_DEC, NULL, 0x0,
10804 			"The number of CC in the aperiodic report", HFILL }
10805 		},
10806 		{ &hf_nfapi_number_of_pucch_resource,
10807 			{ "Number of PUCCH Resource", "nfapi.number.of.pucch.resource",
10808 			FT_UINT8, BASE_DEC, NULL, 0x0,
10809 			"A value of 2 indicates that the UE is configured to transmit on two antenna ports", HFILL }
10810 		},
10811 		{ &hf_nfapi_pucch_index_p1,
10812 			{ "PUCCH Index P1", "nfapi.pucch.index.p1",
10813 			FT_UINT16, BASE_DEC, NULL, 0x0,
10814 			"The PUCCH Index value for antenna port P1", HFILL }
10815 		},
10816 		{ &hf_nfapi_n_pucch_1_0,
10817 			{ "N PUCCH 1 0", "nfapi.n.pucch.1.0",
10818 			FT_UINT8, BASE_DEC, NULL, 0x0,
10819 			"HARQ resource 0", HFILL }
10820 		},
10821 		{ &hf_nfapi_n_pucch_1_1,
10822 			{ "N PUCCH 1 1", "nfapi.n.pucch.1.1",
10823 			FT_UINT8, BASE_DEC, NULL, 0x0,
10824 			"HARQ resource 1", HFILL }
10825 		},
10826 		{ &hf_nfapi_n_pucch_1_2,
10827 			{ "N PUCCH 1 2", "nfapi.n.pucch.1.2",
10828 			FT_UINT8, BASE_DEC, NULL, 0x0,
10829 			"HARQ resource 2", HFILL }
10830 		},
10831 		{ &hf_nfapi_n_pucch_1_3,
10832 			{ "N PUCCH 1 3", "nfapi.n.pucch.1.3",
10833 			FT_UINT8, BASE_DEC, NULL, 0x0,
10834 			"HARQ resource 3", HFILL }
10835 		},
10836 		{ &hf_nfapi_srs_bandwidth,
10837 			{ "SRS Bandwidth", "nfapi.srs.bandwidth",
10838 			FT_UINT8, BASE_DEC, NULL, 0x0,
10839 			"SRS Bandwidth. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10840 		},
10841 		{ &hf_nfapi_frequency_domain_position,
10842 			{ "Frequency Domain position", "nfapi.frequency.domain.position",
10843 			FT_UINT8, BASE_DEC, NULL, 0x0,
10844 			"Frequency-domain position, NRRC This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10845 		},
10846 		{ &hf_nfapi_srs_hopping_bandwidth,
10847 			{ "SRS hopping bandwidth", "nfapi.srs.hopping.bandwidth",
10848 			FT_UINT8, BASE_DEC, NULL, 0x0,
10849 			"Configures the frequency hopping on the SRS. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10850 		},
10851 		{ &hf_nfapi_transmission_comb,
10852 			{ "Transmission comb", "nfapi.transmission.comb",
10853 			FT_UINT8, BASE_DEC, NULL, 0x0,
10854 			"Configures the frequency location of the SRS. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10855 		},
10856 		{ &hf_nfapi_i_srs,
10857 			{ "I SRS", "nfapi.i.srs",
10858 			FT_UINT8, BASE_DEC, NULL, 0x0,
10859 			"Defines the periodicity and subframe location of the SRS. SRS Configuration Index. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10860 		},
10861 		{ &hf_nfapi_sounding_reference_cyclic_shift,
10862 			{ "Sounding reference cyclic shift", "nfapi.sounding.reference.cyclic.shift",
10863 			FT_UINT8, BASE_DEC, NULL, 0x0,
10864 			"Configures the SRS sequence generation. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10865 		},
10866 		{ &hf_nfapi_pdu_length,
10867 			{ "PDU length", "nfapi.pdu.length",
10868 			FT_UINT16, BASE_DEC, NULL, 0x0,
10869 			"The total length (in bytes) of the PDU description and PDU data, without the padding bytes", HFILL }
10870 		},
10871 		{ &hf_nfapi_crc_flag,
10872 			{ "CRC flag", "nfapi.crc.flag",
10873 			FT_BOOLEAN, 8, TFS(&crc_flag_strname), 0x0,
10874 			"A flag indicating if a CRC error was detected", HFILL }
10875 		},
10876 		{ &hf_nfapi_number_of_hi_pdus,
10877 			{ "Number of HI Pdu's", "nfapi.number_of_hi_pdus",
10878 			FT_UINT8, BASE_DEC, NULL, 0x0,
10879 			"Number of HI PDUs included in this message", HFILL }
10880 		},
10881 		{ &hf_nfapi_number_of_dci_pdus,
10882 			{ "Number of DCI Pdu's", "nfapi.number_of_dci_pdus",
10883 			FT_UINT8, BASE_DEC, NULL, 0x0,
10884 			"Number of DCI PDUs included in this message", HFILL }
10885 		},
10886 		{ &hf_nfapi_hi_dci0_pdu_type,
10887 			{ "PDU Type", "nfapi.pdu_type",
10888 			FT_UINT8, BASE_DEC, VALS(hi_dci0_pdu_type_vals), 0x0,
10889 			NULL, HFILL }
10890 		},
10891 		{ &hf_nfapi_hi_value,
10892 			{ "HI Value", "nfapi.hi_value",
10893 			FT_BOOLEAN, 8, TFS(&hi_value_strname), 0x0,
10894 			"The PHICH value which is sent on the resource", HFILL }
10895 		},
10896 		{ &hf_nfapi_i_phich,
10897 			{ "i phich", "nfapi.i_phich",
10898 			FT_UINT8, BASE_DEC, NULL, 0x0,
10899 			"Is used in the calculation of the PHICH location. For TDD only", HFILL }
10900 		},
10901 		{ &hf_nfapi_flag_tb2,
10902 			{ "Flag TB2", "nfapi.flag_tb2",
10903 			FT_BOOLEAN, BASE_NONE, TFS(&flag_tb2_strname), 0x0,
10904 			"Indicates is HI is present for a second transport block", HFILL }
10905 		},
10906 		{ &hf_nfapi_hi_value_2,
10907 			{ "HI Value 2", "nfapi.hi_value_2",
10908 			FT_BOOLEAN, BASE_NONE, TFS(&hi_value_strname), 0x0,
10909 			"The PHICH value for a second transport block.", HFILL }
10910 		},
10911 		{ &hf_nfapi_ue_tx_antenna_selection,
10912 			{ "UE Tx Antenna selection", "nfapi.ue_tx_antenna_selection",
10913 			FT_UINT8, BASE_DEC, VALS(ue_tx_antenna_selection_vals), 0x0,
10914 			"Indicates how the CRC is calculated on the PDCCH.", HFILL }
10915 		},
10916 		{ &hf_nfapi_cqi_csi_request,
10917 			{ "cqi csi request", "nfapi.cqi_csi_request",
10918 			FT_UINT8, BASE_DEC, NULL, 0x0,
10919 			"Aperiodic CQI request flag", HFILL }
10920 		},
10921 		{ &hf_nfapi_ul_index,
10922 			{ "UL Index", "nfapi.ul_index",
10923 			FT_UINT8, BASE_DEC, NULL, 0x0,
10924 			"Valid for TDD mode only", HFILL }
10925 		},
10926 		{ &hf_nfapi_dl_assignment_index,
10927 			{ "DL Assignment Index", "nfapi.dl_assignment_index",
10928 			FT_UINT8, BASE_DEC, NULL, 0x0,
10929 			"Valid for TDD mode only.", HFILL }
10930 		},
10931 		{ &hf_nfapi_tpc_bitmap,
10932 			{ "TPC bitmap", "nfapi.tpc_bitmap",
10933 			FT_UINT32, BASE_DEC, NULL, 0x0,
10934 			"TPC commands for PUCCH and PUSCH", HFILL }
10935 		},
10936 		{ &hf_nfapi_number_of_antenna_ports,
10937 			{ "Number of antenna ports", "nfapi.number.of.antenna.ports",
10938 			FT_UINT8, BASE_DEC, VALS(number_of_antenna_port_vals), 0x0,
10939 			"Defines number of antenna ports for this ULSCH allocation", HFILL }
10940 		},
10941 		{ &hf_nfapi_size_of_cqi_csi_field,
10942 			{ "Size of cqi csi field", "nfapi.size.of.cqi.csi.field",
10943 			FT_UINT8, BASE_DEC, VALS(size_of_cqi_csi_field_vals), 0x0,
10944 			"Indicates the size of the CQI/CSI request field", HFILL }
10945 		},
10946 		{ &hf_nfapi_new_data_indication_two,
10947 			{ "New data indication 2", "nfapi.new.data.indication.two",
10948 			FT_UINT8, BASE_DEC, NULL, 0x0,
10949 			"The new data indicator for the second transport block", HFILL }
10950 		},
10951 		{ &hf_nfapi_resource_allocation_flag,
10952 			{ "Resource allocation flag", "nfapi.resource.allocation.flag",
10953 			FT_UINT8, BASE_DEC, NULL, 0x0,
10954 			"Indicates if the Resource Allocation Type parameter is valid.", HFILL }
10955 		},
10956 		{ &hf_nfapi_dl_node_sync_t1,
10957 			{ "DL Node Sync t1", "nfapi.dl.node.sync.t1",
10958 			FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
10959 			"Offset from VNF SFN/SF 0/0 time reference of the DL Node Sync message transmission at the transport layer, in microseconds.", HFILL }
10960 		},
10961 		{ &hf_nfapi_dl_node_sync_delta_sfn_sf,
10962 			{ "DL Node Sync Delta SFN SF", "nfapi.dl.node.sync.delta_sfn_sf",
10963 			FT_INT32, BASE_DEC, NULL, 0x0,
10964 			"The delta shift in subframes that the PNF PHY instance must update to on the next subframe boundary", HFILL }
10965 		},
10966 		{ &hf_nfapi_dl_cyclic_prefix_type,
10967 			{ "DL Cyclic Prefix type", "nfapi.dl.cyclic.prefix.type",
10968 			FT_BOOLEAN, 8, TFS(&cyclic_prefix_type_strname), 0x0,
10969 			"Cyclic prefix type, used for DL", HFILL }
10970 		},
10971 		{ &hf_nfapi_ul_cyclic_prefix_type,
10972 			{ "UL Cyclic Prefix type", "nfapi.ul.cyclic.prefix.type",
10973 			FT_BOOLEAN, 8, TFS(&cyclic_prefix_type_strname), 0x0,
10974 			"Cyclic prefix type, used for UL", HFILL }
10975 		},
10976 		{ &hf_nfapi_downlink_channel_bandwidth,
10977 			{ "Downlink Channel Bandwidth", "nfapi.dl.channel.bandwidth",
10978 			FT_UINT16, BASE_DEC, NULL, 0x0,
10979 			"Downlink channel bandwidth in resource blocks.", HFILL }
10980 		},
10981 		{ &hf_nfapi_uplink_channel_bandwidth,
10982 			{ "Uplink Channel Bandwidth", "nfapi.ul.channel_bandwidth",
10983 			FT_UINT16, BASE_DEC, NULL, 0x0,
10984 			"Uplink channel bandwidth in resource blocks.", HFILL }
10985 		},
10986 		{ &hf_nfapi_tx_antenna_ports,
10987 			{ "Tx Antenna Ports", "nfapi.tx.antenna.ports",
10988 			FT_UINT16, BASE_DEC, NULL, 0x0,
10989 			"The number of cell specific or NB transmit antenna ports.", HFILL }
10990 		},
10991 		{ &hf_nfapi_rx_antenna_ports,
10992 			{ "Tx Antenna Ports", "nfapi.rx.antenna.ports",
10993 			FT_UINT16, BASE_DEC, NULL, 0x0,
10994 			"The number of cell specific or NB receive antenna ports.", HFILL }
10995 		},
10996 		{ &hf_nfapi_ul_node_sync_t1,
10997 			{ "UL Node Sync t1", "nfapi.ul.node.sync.t1",
10998 			FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
10999 			"The supplied t1 field in the DL Node Sync", HFILL }
11000 		},
11001 		{ &hf_nfapi_ul_node_sync_t2,
11002 			{ "UL Node Sync t2", "nfapi.ul.node.sync.t2",
11003 			FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11004 			"Offset from PNF SFN/SF 0/0 time reference of the DL Node Sync message reception at the transport layer, in microseconds.", HFILL }
11005 		},
11006 		{ &hf_nfapi_ul_node_sync_t3,
11007 			{ "UL Node Sync t3", "nfapi.ul.node.sync.t3",
11008 			FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11009 			"Offset from PNF SFN/SF 0/0 time reference of the UL Node Sync message transmission at the transport layer, in microseconds.", HFILL }
11010 		},
11011 		{ &hf_nfapi_pb,
11012 			{ "P-B", "nfapi.pb.allocation",
11013 			FT_UINT16, BASE_DEC, NULL, 0x0,
11014 			"Refers to downlink power allocation. Value is an Index into the referenced table.", HFILL }
11015 		},
11016 		{ &hf_nfapi_timing_info_last_sfn_sf,
11017 			{ "Last SFN/SF", "nfapi.timing.info.last.sfn.sf",
11018 			FT_UINT32, BASE_DEC, NULL, 0x0,
11019 			"The completed SFN/SF at the PNF PHY instance that triggered the Timing Info message", HFILL }
11020 		},
11021 		{ &hf_nfapi_timing_info_time_since_last_timing_info,
11022 			{ "Time since last Timing Info", "nfapi.timing.info.time.since.last.timing.info",
11023 			FT_UINT32, BASE_DEC, NULL, 0x0,
11024 			"The number of ms since the last Timing Info was sent from this PNF PHY instance.", HFILL }
11025 		},
11026 		{ &hf_nfapi_timing_info_dl_config_jitter,
11027 			{ "DL Config Jitter", "nfapi.timing.info.dl.config.jitter",
11028 			FT_UINT32, BASE_DEC, NULL, 0x0,
11029 			"The inter message jitter of the DL Config message reception in microseconds", HFILL }
11030 		},
11031 		{ &hf_nfapi_timing_info_tx_request_jitter,
11032 			{ "Tx Request Jitter", "nfapi.timing.info.tx.req.jitter",
11033 			FT_UINT32, BASE_DEC, NULL, 0x0,
11034 			"The inter message jitter of the Tx Request message reception in microseconds", HFILL }
11035 		},
11036 		{ &hf_nfapi_timing_info_ul_config_jitter,
11037 			{ "UL Config Jitter", "nfapi.timing.info.ul.config.jitter",
11038 			FT_UINT32, BASE_DEC, NULL, 0x0,
11039 			"The inter message jitter of the UL Config message reception in microseconds", HFILL }
11040 		},
11041 		{ &hf_nfapi_timing_info_hi_dci0_jitter,
11042 			{ "HI_DCI0 Jitter", "nfapi.timing.info.hi.dci0.jitter",
11043 			FT_UINT32, BASE_DEC, NULL, 0x0,
11044 			"The inter message jitter of the HI_DCI0 message reception in microseconds", HFILL }
11045 		},
11046 		{ &hf_nfapi_timing_info_dl_config_latest_delay,
11047 			{ "DL Config Latest Delay", "nfapi.timing.info.dl.config.latest.delay",
11048 			FT_INT32, BASE_DEC, NULL, 0x0,
11049 			"The latest delay offset in microseconds from the latest acceptable time for the DL Config as defined in the DL Config Timing in the PNF_PARAM.Response since the last transmission of the Timing Info Message.", HFILL }
11050 		},
11051 		{ &hf_nfapi_timing_info_tx_request_latest_delay,
11052 			{ "Tx Request Latest Delay", "nfapi.timing.info.tx.request.latest.delay",
11053 			FT_INT32, BASE_DEC, NULL, 0x0,
11054 			"The latest delay offset in microseconds from the latest acceptable time for the Tx Request as defined in the Tx Config Timing in the PNF_PARAM.Response since the last transmission of the Timing Info Message.", HFILL }
11055 		},
11056 		{ &hf_nfapi_timing_info_ul_config_latest_delay,
11057 			{ "UL Config Latest Delay", "nfapi.timing.info.ul.config.latest.delay",
11058 			FT_INT32, BASE_DEC, NULL, 0x0,
11059 			"The latest delay offset in microseconds from the latest acceptable time for the UL Config as defined in the UL Config Timing in the PNF_PARAM.Response since the last transmission of the Timing Info Message.", HFILL }
11060 		},
11061 		{ &hf_nfapi_timing_info_hi_dci0_latest_delay,
11062 			{ "HI_DCI0 Latest Delay", "nfapi.timing.info.hi.dci0.latest.delay",
11063 			FT_INT32, BASE_DEC, NULL, 0x0,
11064 			"The latest delay offset in microseconds from the latest acceptable time for the HI_DCI0 as defined in the HI_DCI0 Timing in the PNF_PARAM.Response since the last transmission of the Timing Info Message.", HFILL }
11065 		},
11066 		{ &hf_nfapi_timing_info_dl_config_earliest_arrival,
11067 			{ "DL Config Earliest Arrival", "nfapi.timing.info.dl.config.earliest.arrival",
11068 			FT_INT32, BASE_DEC, NULL, 0x0,
11069 			"The earliest arrival offset in microseconds from the latest time acceptable for the DL Config as defined in the Timing Window in the PARAM.Response since the last transmission of the Timing Info Message.", HFILL }
11070 		},
11071 		{ &hf_nfapi_timing_info_tx_request_earliest_arrival,
11072 			{ "Tx Request Earliest Arrival", "nfapi.timing.info.tx.request.earliest.arrival",
11073 			FT_INT32, BASE_DEC, NULL, 0x0,
11074 			"The earliest arrival offset in microseconds from the latest time acceptable for the Tx Request as defined in the Timing Window in the PARAM.Response since the last transmission of the Timing Info Message.", HFILL }
11075 		},
11076 		{ &hf_nfapi_timing_info_ul_config_earliest_arrival,
11077 			{ "UL Config Earliest Arrival", "nfapi.timing.info.ul.config.earliest.arrival",
11078 			FT_INT32, BASE_DEC, NULL, 0x0,
11079 			"The earliest arrival offset in microseconds from the latest time acceptable for the UL Config as defined in the Timing Window in the PARAM.Response since the last transmission of the Timing Info Message.", HFILL }
11080 		},
11081 		{ &hf_nfapi_timing_info_hi_dci0_earliest_arrival,
11082 			{ "HI_DCI0 Earliest Arrival", "nfapi.timing.info.hi.dci0.earliest.arrival",
11083 			FT_INT32, BASE_DEC, NULL, 0x0,
11084 			"The earliest arrival offset in microseconds from the latest time acceptable for the HI_DCI0 as defined in the Timing Window in the PARAM.Response since the last transmission of the Timing Info Message.", HFILL }
11085 		},
11086 		{ &hf_nfapi_pcfich_power_offset,
11087 			{ "PCFICH Power Offset", "nfapi.pcfich.power.offset",
11088 			FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
11089 			"The power per antenna of the PCFICH with respect to the reference signal.", HFILL }
11090 		},
11091 		{ &hf_nfapi_timing_window,
11092 			{ "NFAPI Timing window", "nfapi.timing.window",
11093 			FT_UINT8, BASE_DEC, NULL, 0x0,
11094 			"The window in milliseconds that the PHY must receive and queue the P7 messages.", HFILL }
11095 		},
11096 		{ &hf_nfapi_timing_info_mode,
11097 			{ "Timing Info mode", "nfapi.timing.info.mode",
11098 			FT_UINT8, BASE_DEC, NULL, 0x0,
11099 			"The configured mode of operation for the timing info message to be sent to the VNF from the PHY", HFILL }
11100 		},
11101 		{ &hf_nfapi_timing_info_period,
11102 			{ "Timing info period", "nfapi.timing.info.period",
11103 			FT_UINT8, BASE_DEC, NULL, 0x0,
11104 			"If Periodic timing mode is enabled, this defines the periodicity in subframes. This field is ignored if periodic timing mode is disabled.", HFILL }
11105 		},
11106 		{ &hf_nfapi_tdd_harq_mode,
11107 			{ "Mode", "nfapi.tdd.harq.mode",
11108 			FT_UINT8, BASE_DEC, VALS(tdd_harq_mode_vals), 0x0,
11109 			"The format of the ACK/NACK response expected", HFILL }
11110 		},
11111 		{ &hf_nfapi_fdd_harq_mode,
11112 			{ "Mode", "nfapi.fdd.harq.mode",
11113 			FT_UINT8, BASE_DEC, VALS(fdd_harq_mode_vals), 0x0,
11114 			"The format of the ACK/NACK response expected", HFILL }
11115 		},
11116 		{ &hf_nfapi_number_of_ack_nack,
11117 			{ "Number of ACK/NACK", "nfapi.uint16.tag",
11118 			FT_UINT16, BASE_DEC, NULL, 0x0,
11119 			"The number of ACK/NACK results reported for this UE", HFILL }
11120 		},
11121 		{ &hf_nfapi_harq_data_value_0,
11122 			{ "Value 0", "nfapi.harq.value.0",
11123 			FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11124 			"Indicates HARQ results", HFILL }
11125 		},
11126 		{ &hf_nfapi_harq_data_value_0_special,
11127 			{ "Value 0", "nfapi.harq.value.0.special",
11128 			FT_UINT8, BASE_DEC, VALS(harq_special_value_vals), 0x0,
11129 			"Indicates HARQ results", HFILL }
11130 		},
11131 		{ &hf_nfapi_harq_data_value_1,
11132 			{ "Value 1", "nfapi.harq.value.1",
11133 			FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11134 			"Indicates HARQ results", HFILL }
11135 		},
11136 		{ &hf_nfapi_harq_data_value_2,
11137 			{ "Value 2", "nfapi.harq.value.2",
11138 			FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11139 			"Indicates HARQ results", HFILL }
11140 		},
11141 		{ &hf_nfapi_harq_data_value_3,
11142 			{ "Value 3", "nfapi.harq.value.3",
11143 			FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11144 			"Indicates HARQ results", HFILL }
11145 		},
11146 		{ &hf_nfapi_harq_tb_1,
11147 			{ "HARQ TB1", "nfapi.harq.tb.1",
11148 			FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11149 			"HARQ feedback of 1st TB.", HFILL }
11150 		},
11151 		{ &hf_nfapi_harq_tb_2,
11152 			{ "HARQ TB2", "nfapi.harq.tb.2",
11153 			FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11154 			"HARQ feedback of 2nd TB.", HFILL }
11155 		},
11156 		{ &hf_nfapi_harq_tb_n,
11157 			{ "HARQ TB_N", "nfapi.harq.tb.n",
11158 			FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11159 			"HARQ feedback of Nth TB.", HFILL }
11160 		},
11161 		{ &hf_nfapi_ul_cqi,
11162 			{ "UL_CQI", "nfapi.ul.cqi",
11163 			FT_UINT8, BASE_CUSTOM, CF_FUNC(ul_cqi_conversion_fn), 0x0,
11164 			"SNR", HFILL }
11165 		},
11166 		{ &hf_nfapi_channel,
11167 			{ "Channel", "nfapi.channel",
11168 			FT_UINT8, BASE_DEC, VALS(channel_vals), 0x0,
11169 			"The channel to which this measurement refers", HFILL }
11170 		},
11171 		{ &hf_nfapi_data_offset,
11172 			{ "Data Offset", "nfapi.data.offset",
11173 			FT_UINT16, BASE_DEC, NULL, 0x0,
11174 			"Gives the PDU#i data address offset from the beginning of the 'Number of PDUs' field. An offset of 0 indicates a CRC or decoding error", HFILL }
11175 		},
11176 		{ &hf_nfapi_ri,
11177 			{ "RI", "nfapi.ri",
11178 			FT_UINT8, BASE_DEC, NULL, 0x0,
11179 			"The rank indication reported by the UE on PUSCH for aperiodic CSI.", HFILL }
11180 		},
11181 		{ &hf_nfapi_timing_advance,
11182 			{ "Timing Advance", "nfapi.timing.advance",
11183 			FT_UINT16, BASE_DEC, NULL, 0x0,
11184 			"The timing advance measured for this PDU and UE.", HFILL }
11185 		},
11186 		{ &hf_nfapi_timing_advance_r9,
11187 			{ "Timing Advance R9", "nfapi.timing.advance.r9",
11188 			FT_UINT16, BASE_DEC, NULL, 0x0,
11189 			"Timing advance used for positioning", HFILL }
11190 		},
11191 		{ &hf_nfapi_number_of_cc_reported,
11192 			{ "Number of CC reported", "nfapi.number.of.cc.reported",
11193 			FT_UINT8, BASE_DEC, NULL, 0x0,
11194 			NULL, HFILL }
11195 		},
11196 		{ &hf_nfapi_preamble,
11197 			{ "Preamble", "nfapi.preamble",
11198 			FT_UINT8, BASE_DEC, NULL, 0x0,
11199 			"The detected preamble", HFILL }
11200 		},
11201 		{ &hf_nfapi_rach_resource_type,
11202 			{ "RACH resource type", "nfapi.rach.resource.type",
11203 			FT_UINT8, BASE_DEC, VALS(rach_resource_type_vals), 0x0,
11204 			"Indicates if this indication is related to Cat-M UE and in which CE level", HFILL }
11205 		},
11206 		{ &hf_nfapi_doppler_estimation,
11207 			{ "Doppler estimation", "nfapi.doppler.estimation",
11208 			FT_UINT16, BASE_DEC, NULL, 0x0,
11209 			"FFS", HFILL }
11210 		},
11211 		{ &hf_nfapi_rb_start,
11212 			{ "RB Start", "nfapi.rb.start",
11213 			FT_UINT8, BASE_DEC, NULL, 0x0,
11214 			"The starting point of the RBs to be reported", HFILL }
11215 		},
11216 		{ &hf_nfapi_snr,
11217 			{ "SNR", "nfapi.snr",
11218 			FT_UINT8, BASE_CUSTOM, CF_FUNC(ul_cqi_conversion_fn), 0x0,
11219 			"Field size dependent on configured bandwidth SNR for RBs, each RBs report one SNR.", HFILL }
11220 		},
11221 		{ &hf_nfapi_up_pts_symbol,
11222 			{ "UpPTS Symbol", "nfapi.uppts.symbol",
11223 			FT_UINT8, BASE_DEC, VALS(up_pts_symbol_vals), 0x0,
11224 			"Indicates symbol where SRS was received. Only valid if the SRS was received in subframe 1 or 6.", HFILL }
11225 		},
11226 		{ &hf_nfapi_number_prb_per_subband,
11227 			{ "numPRBperSubband", "nfapi.num.prb.per.subband",
11228 			FT_UINT8, BASE_DEC, NULL, 0x0,
11229 			"Number of PRBs that are treated as one subband", HFILL }
11230 		},
11231 		{ &hf_nfapi_number_antennas,
11232 			{ "numAntennas", "nfapi.num.antennas",
11233 			FT_UINT8, BASE_DEC, NULL, 0x0,
11234 			"Number of physical antennas", HFILL }
11235 		},
11236 		{ &hf_nfapi_subband_index,
11237 			{ "subbandIndex", "nfapi.subband.index",
11238 			FT_UINT8, BASE_DEC, NULL, 0x0,
11239 			"Index of subband for which the following channel coefficient is applied", HFILL }
11240 		},
11241 		{ &hf_nfapi_channel_coefficient,
11242 			{ "Channel", "nfapi.channel.coefficient",
11243 			FT_UINT16, BASE_DEC, NULL, 0x0,
11244 			"Averaged channel coefficient in a subband for physical antenna #i, real 8 bits followed by imaginary 8 bits", HFILL }
11245 		},
11246 		{ &hf_nfapi_ul_rtoa,
11247 			{ "UL_RTOA", "nfapi.ul.rtoa",
11248 			FT_UINT16, BASE_DEC, NULL, 0x0,
11249 			"UL relative time of arrival used for network based positioning", HFILL }
11250 		},
11251 		{ &hf_nfapi_frequency_band_indicator,
11252 			{ "Frequency Band Indicator", "nfapi.frequency.band.indicator",
11253 			FT_UINT16, BASE_DEC, NULL, 0x0,
11254 			"The E-UTRA band for which the carrierList applies.", HFILL }
11255 		},
11256 		{ &hf_nfapi_measurement_period,
11257 			{ "Measurement Period", "nfapi.measurement.period",
11258 			FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11259 			"The length of time to measure RSSI over, in units of 1ms.", HFILL }
11260 		},
11261 		{ &hf_nfapi_bandwidth,
11262 			{ "Bandwidth", "nfapi.bandwidth",
11263 			FT_UINT8, BASE_DEC, NULL, 0x0,
11264 			"The bandwidth (in resource blocks) over which the RSSI is measured.", HFILL }
11265 		},
11266 		{ &hf_nfapi_timeout,
11267 			{ "Timeout", "nfapi.timeout",
11268 			FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11269 			"The timeout value after which the PNF should abort the procedure in units of 1ms. The value of 0 indicates that the PNF should attempt to complete the procedure without any VNF-imposed timeout.", HFILL }
11270 		},
11271 		{ &hf_nfapi_number_of_earfcns,
11272 			{ "Number of EARFCNs", "nfapi.number.of.earfcns",
11273 			FT_UINT8, BASE_DEC, NULL, 0x0,
11274 			"The number of EARFCNs which should be measured. In the case that no EARFCN (value 0) is specified, all valid EARFCNs for the specified bandwidth in the band shall be measured, in order of ascending EARCFN.", HFILL }
11275 		},
11276 		{ &hf_nfapi_uarfcn,
11277 			{ "UARFCN", "nfapi.uarfcn",
11278 			FT_UINT16, BASE_DEC, NULL, 0x0,
11279 			"UARFCN to be measured.", HFILL }
11280 		},
11281 		{ &hf_nfapi_number_of_uarfcns,
11282 			{ "Number of UARFCNs", "nfapi.number.of.uarfcn",
11283 			FT_UINT8, BASE_DEC, NULL, 0x0,
11284 			"The number of UARFCNs which should be measured. In the case that no UARFCN (value 0) is specified, all UARFCNs in the band shall be measured, in order of ascending UARCFN.", HFILL }
11285 		},
11286 		{ &hf_nfapi_arfcn,
11287 			{ "ARFCN", "nfapi.arfcn",
11288 			FT_UINT16, BASE_DEC, NULL, 0x0,
11289 			"The ARFCN to be measured", HFILL }
11290 		},
11291 		{ &hf_nfapi_arfcn_direction,
11292 			{ "Direction", "nfapi.arfcn.direction",
11293 			FT_UINT8, BASE_DEC, VALS(arfcn_direction_vals), 0x0,
11294 			"The link direction to be measured", HFILL }
11295 		},
11296 		{ &hf_nfapi_number_of_arfcns,
11297 			{ "Number of ARFCNs", "nfapi.number.of.arfcn",
11298 			FT_UINT8, BASE_DEC, NULL, 0x0,
11299 			"The number of ARFCNs which should be measured. In the case that no ARFCN (value 0) is specified, all ARFCNs in the band shall be measured, in order of ascending ARCFN.", HFILL }
11300 		},
11301 		{ &hf_nfapi_rssi,
11302 			{ "RSSI", "nfapi.rssi",
11303 			FT_INT16, BASE_CUSTOM, CF_FUNC(rssi_conversion_fn), 0x0,
11304 			"The list of RSSI values of the carriers measured, in the order of the list of the original request.", HFILL }
11305 		},
11306 		{ &hf_nfapi_number_of_rssi,
11307 			{ "Number of RSSI", "nfapi.number.of.rssi",
11308 			FT_UINT16, BASE_DEC, NULL, 0x0,
11309 			"The number of RSSI results returned in the following array.", HFILL }
11310 		},
11311 		{ &hf_nfapi_pci,
11312 			{ "PCI", "nfapi.pci",
11313 			FT_UINT16, BASE_DEC, NULL, 0x0,
11314 			"The PCI for cell which should be searched", HFILL }
11315 		},
11316 		{ &hf_nfapi_measurement_bandwidth,
11317 			{ "Measurement Bandwidth", "nfapi.measurement.bandwidth",
11318 			FT_UINT8, BASE_DEC, NULL, 0x0,
11319 			"The number of resource blocks which should be used for measuring RSRP", HFILL }
11320 		},
11321 		{ &hf_nfapi_exhaustive_search,
11322 			{ "Exhaustive Search", "nfapi.exhaustive.search",
11323 			FT_UINT8, BASE_DEC, VALS(exhustive_search_vals), 0x0,
11324 			"NMM should try to find all cells on the carrier", HFILL }
11325 		},
11326 		{ &hf_nfapi_number_of_pci,
11327 			{ "Number of PCI", "nfapi.number.of.pci",
11328 			FT_UINT8, BASE_DEC, NULL, 0x0,
11329 			"The number of cells in the PCI list. If 0 all cells on the carrier should be found. Otherwise, depending on exhaustiveSearch flag, only the given pciList is searched or the pciList is used for indicating a priority list. Range: 0 to MAX_PCI_LIST.", HFILL }
11330 		},
11331 		{ &hf_nfapi_psc,
11332 			{ "PSC", "nfapi.psc",
11333 			FT_UINT16, BASE_DEC, NULL, 0x0,
11334 			"The PSC for cells which should be searched.", HFILL }
11335 		},
11336 		{ &hf_nfapi_number_of_psc,
11337 			{ "Number of PSC", "nfapi.number.of.psc",
11338 			FT_UINT8, BASE_DEC, NULL, 0x0,
11339 			"The number of cells in the PSC list. If 0 all cells on the carrier should be found. Otherwise, depending on Exhaustive Search flag, only the given PSC list is searched or the PSC list is used for indicating a priority list. Range: 0 to MAX_PSC_LIST.", HFILL }
11340 		},
11341 		{ &hf_nfapi_rsrp,
11342 			{ "RSRP", "nfapi.rsrp",
11343 			FT_UINT8, BASE_CUSTOM, CF_FUNC(neg_pow_conversion_fn), 0x0,
11344 			"The measured RSRP value in units of -1dB", HFILL }
11345 		},
11346 		{ &hf_nfapi_rsrq,
11347 			{ "RSRQ", "nfapi.rsrq",
11348 			FT_UINT8, BASE_CUSTOM, CF_FUNC(neg_pow_conversion_fn), 0x0,
11349 			"The measured RSRQ value in units of -1dB", HFILL }
11350 		},
11351 		{ &hf_nfapi_number_of_lte_cells_found,
11352 			{ "Number of LTE Cells Found", "nfapi.number.of.lte.cells.found",
11353 			FT_UINT16, BASE_DEC, NULL, 0x0,
11354 			"The number of LTE cells indicated in this message.", HFILL }
11355 		},
11356 		{ &hf_nfapi_rscp,
11357 			{ "RSCP", "nfapi.rscp",
11358 			FT_UINT8, BASE_CUSTOM, CF_FUNC(neg_pow_conversion_fn), 0x0,
11359 			"The measured RSCP value in units of -1dB", HFILL }
11360 		},
11361 		{ &hf_nfapi_enco,
11362 			{ "EcNo", "nfapi.ecno",
11363 			FT_UINT8, BASE_CUSTOM, CF_FUNC(neg_pow_conversion_fn), 0x0,
11364 			"The measured RSCP value in units of -1dB", HFILL }
11365 		},
11366 		{ &hf_nfapi_number_of_utran_cells_found,
11367 			{ "Number of UTRAN Cells Found", "nfapi.number.of.utran.cells.found",
11368 			FT_UINT16, BASE_DEC, NULL, 0x0,
11369 			"The number of LTE cells indicated in this message", HFILL }
11370 		},
11371 		{ &hf_nfapi_bsic,
11372 			{ "BSIC", "nfapi.bsic",
11373 			FT_UINT8, BASE_DEC, NULL, 0x0,
11374 			"The BSIC of the cell which the NMM synchronized to", HFILL }
11375 		},
11376 		{ &hf_nfapi_rxlev,
11377 			{ "RxLev", "nfapi.rxlev",
11378 			FT_UINT8, BASE_DEC, NULL, 0x0,
11379 			"The measured RxLev value", HFILL }
11380 		},
11381 		{ &hf_nfapi_rxqual,
11382 			{ "RxQual", "nfapi.rxqual",
11383 			FT_UINT8, BASE_DEC, NULL, 0x0,
11384 			"The measured RxQual value", HFILL }
11385 		},
11386 		{ &hf_nfapi_sfn_offset,
11387 			{ "SFN Offset", "nfapi.sfn.offset",
11388 			FT_UINT32, BASE_DEC, NULL, 0x0,
11389 			"The offset in us of the start of the current GSM Radio HyperFrame (i.e. FN=0) from the start of the preceding LTE Radio Frame of the PNF for SFN=0", HFILL }
11390 		},
11391 		{ &hf_nfapi_number_of_geran_cells_found,
11392 			{ "Number of GSM Cells Found", "nfapi.number.of.geran.cells.found",
11393 			FT_UINT16, BASE_DEC, NULL, 0x0,
11394 			"The number of GSM cells indicated in this message", HFILL }
11395 		},
11396 		{ &hf_nfapi_number_of_tx_antenna,
11397 			{ "Number of Tx Antenna", "nfapi.number.of.tx.antenna",
11398 			FT_UINT8, BASE_DEC, NULL, 0x0,
11399 			"The number of Tx Antenna detected for the cell", HFILL }
11400 		},
11401 		{ &hf_nfapi_mib,
11402 			{ "MIB", "nfapi.mib",
11403 			FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
11404 			"The MIB read from the specified cell.", HFILL }
11405 		},
11406 		{ &hf_nfapi_phich_configuration,
11407 			{ "PHICH Configuration", "nfapi.phich.configuration",
11408 			FT_UINT8, BASE_DEC, NULL, 0x0,
11409 			"The PHICH-Config of the cell", HFILL }
11410 		},
11411 		{ &hf_nfapi_retry_count,
11412 			{ "retryCount", "nfapi.retry.count",
11413 			FT_UINT8, BASE_DEC, NULL, 0x0,
11414 			"The number of SIB1 repetition periods for which decoding of SIB1 should be retried.", HFILL }
11415 		},
11416 		{ &hf_nfapi_sib1,
11417 			{ "SIB1", "nfapi.sib1",
11418 			FT_BYTES, BASE_NONE, NULL, 0x0,
11419 			NULL, HFILL }
11420 		},
11421 		{ &hf_nfapi_si_periodicity,
11422 			{ "SI Periodicity", "nfapi.si.periodicity",
11423 			FT_UINT8, BASE_DEC, NULL, 0x0,
11424 			"The SI Periodicity of the requested SIBs, with the first element being for SIB2, the next for SIB3, etc, encoded as follows", HFILL }
11425 		},
11426 		{ &hf_nfapi_si_index,
11427 			{ "SI Index", "nfapi.si.index",
11428 			FT_UINT8, BASE_DEC, NULL, 0x0,
11429 			"The Index of this SIB in the SIB1 SchedulingInfoList:", HFILL }
11430 		},
11431 		{ &hf_nfapi_number_of_si_periodicity,
11432 			{ "Number of SI Periodicity", "nfapi.number.of.si.periodicity",
11433 			FT_UINT8, BASE_DEC, NULL, 0x0,
11434 			"The number of System Information periodicity values in the following array", HFILL }
11435 		},
11436 		{ &hf_nfapi_si_window_length,
11437 			{ "SI Window Length", "nfapi.si.window.length",
11438 			FT_UINT8, BASE_DEC, NULL, 0x0,
11439 			"The SI window in units of 1ms", HFILL }
11440 		},
11441 		{ &hf_nfapi_sib_type,
11442 			{ "SIB Type", "nfapi.sib.type",
11443 			FT_UINT8, BASE_DEC, NULL, 0x0,
11444 			"The SIB type", HFILL }
11445 		},
11446 		{ &hf_nfapi_sib,
11447 			{ "SIB", "nfapi.sib",
11448 			FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
11449 			"The SIB element read from the specified cell.", HFILL }
11450 		},
11451 		{ &hf_nfapi_si,
11452 			{ "SI", "nfapi.si",
11453 			FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
11454 			"The SI element read from the specified cell.", HFILL }
11455 		},
11456 		{ &hf_nfapi_pnf_search_state,
11457 			{ "State", "nfapi.state",
11458 			FT_BYTES, BASE_NONE, NULL, 0x0,
11459 			"A structure of opaque data optionally sent by the PNF to the VNF", HFILL }
11460 		},
11461 		{ &hf_nfapi_pnf_broadcast_state,
11462 			{ "State", "nfapi.state",
11463 			FT_BYTES, BASE_NONE, NULL, 0x0,
11464 			"A structure of opaque data optionally sent by the PNF to the VNF", HFILL }
11465 		},
11466 		{ &hf_nfapi_dl_rs_tx_power,
11467 			{ "DL RS Tx power", "nfapi.dl.rs.tx.power",
11468 			FT_UINT16, BASE_DEC, NULL, 0x0,
11469 			"The DL RS Tx power measurement", HFILL }
11470 		},
11471 		{ &hf_nfapi_received_interference_power,
11472 			{ "Received interference power", "nfapi.received.interference.power",
11473 			FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11474 			"The Received interference power measurement", HFILL }
11475 		},
11476 		{ &hf_nfapi_thermal_noise_power,
11477 			{ "Thermal noise power", "nfapi.thermal.noise.power",
11478 			FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11479 			"The Thermal noise power measurement", HFILL }
11480 		},
11481 		{ &hf_nfapi_dl_rs_tx_power_measurement,
11482 			{ "DL RS TX Power measurement", "nfapi.dl.rs.tx.power.measurement",
11483 			FT_INT16, BASE_CUSTOM, CF_FUNC(dl_rs_tx_pow_measment_conversion_fn), 0x0,
11484 			"The DL RS Tx power measurement defined", HFILL }
11485 		},
11486 		{ &hf_nfapi_received_interference_power_measurement,
11487 			{ "Received interference power measurement", "nfapi.received.interference.power.measurement",
11488 			FT_INT16, BASE_CUSTOM, CF_FUNC(dl_rs_tx_pow_measment_conversion_fn), 0x0,
11489 			NULL, HFILL }
11490 		},
11491 		{ &hf_nfapi_thermal_noise_power_measurement,
11492 			{ "Thermal noise power measurement", "nfapi.thermal.noise.power.measurement",
11493 			FT_INT16, BASE_CUSTOM, CF_FUNC(dl_rs_tx_pow_measment_conversion_fn), 0x0,
11494 			"The Thermal noise power measurement", HFILL }
11495 		},
11496 		{ &hf_nfapi_initial_partial_sf,
11497 			{ "Initial Partial SF", "nfapi.initial.partial.sf",
11498 			FT_BOOLEAN, 32, TFS(&initial_partial_sf_strname), 0x0,
11499 			"Indicates whether the initial SF in the LBT process is full or partial", HFILL }
11500 		},
11501 		{ &hf_nfapi_lbt_mode,
11502 			{ "LBT Mode", "nfapi.lbt.mode",
11503 			FT_BOOLEAN, 32, TFS(&lbt_mode_strname), 0x0,
11504 			"Part of multi-carrier support. Indicates whether full LBT process is carried or partial LBT process is carried (multi carrier mode B according to [9] section 15.1.5.2)", HFILL }
11505 		},
11506 		{ &hf_nfapi_lte_txop_sf,
11507 			{ "LTE TXOP SF", "nfapi.txop.sf",
11508 			FT_UINT32, BASE_DEC, NULL, 0x0,
11509 			"Indicates the LTE TXOP (TMCOT,P in [9] section 15.1.1) duration in subframes.", HFILL }
11510 		},
11511 		{ &hf_nfapi_mp_cca,
11512 			{ "mp cca", "nfapi.mp.cca",
11513 			FT_UINT32, BASE_DEC, NULL, 0x0,
11514 			"Indicates the value of the defer factor", HFILL }
11515 		},
11516 		{ &hf_nfapi_n_cca,
11517 			{ "n cca", "nfapi.n.cca",
11518 			FT_UINT32, BASE_DEC, NULL, 0x0,
11519 			"Indicates the value of LBT backoff counter", HFILL }
11520 		},
11521 		{ &hf_nfapi_offset,
11522 			{ "offset", "nfapi.offset",
11523 			FT_UINT32, BASE_DEC, NULL, 0x0,
11524 			"Indicates the LBT start time in microseconds from the beginning of the subframe scheduled by this message.", HFILL }
11525 		},
11526 		{ &hf_nfapi_result,
11527 			{ "result", "nfapi.result",
11528 			FT_BOOLEAN, 32, TFS(&tfs_fail_success), 0x0,
11529 			"Indicates the LBT procedure result of SFN/SF:", HFILL }
11530 		},
11531 		{ &hf_nfapi_sfn_sf_end,
11532 			{ "SFN/SF End", "nfapi.sfn.sf.end",
11533 			FT_UINT16, BASE_DEC, NULL, 0x0,
11534 			"Indicates the SFN/SF by which the DRS window (Discovery signal occasion as described in [9] section 6.11A) must end. In worst case, this would be the last TXOP subframe.", HFILL }
11535 		},
11536 		{ &hf_nfapi_txop_sfn_sf_end,
11537 			{ "TXOP SFN/SF End", "nfapi.txop.sfn.sf.end",
11538 			FT_UINT16, BASE_DEC, NULL, 0x0,
11539 			"Indicates the SFN/SF by which the TXOP must end. In worst case, this would be the last TXOP subframe.", HFILL }
11540 		},
11541 		{ &hf_nfapi_txop_symbols,
11542 			{ "LTE TXOP symbols", "nfapi.lte.txop.symbols",
11543 			FT_UINT32, BASE_DEC, NULL, 0x0,
11544 			"Actual LTE TXOP in symbols", HFILL }
11545 		},
11546 	};
11547 
11548 	/* Setup protocol subtree array */
11549 	static gint *ett[] =
11550 	{
11551 		&ett_nfapi,
11552 		&ett_nfapi_p4_p5_message_header,
11553 		&ett_nfapi_p7_message_header,
11554 		&ett_nfapi_tlv_tree,
11555 		&ett_nfapi_tl,
11556 		&ett_nfapi_pnf_phy_rf_config,
11557 		&ett_nfapi_pnf_phy,
11558 		&ett_nfapi_pnf_phy_rel10,
11559 		&ett_nfapi_pnf_phy_rel11,
11560 		&ett_nfapi_pnf_phy_rel12,
11561 		&ett_nfapi_pnf_phy_rel13,
11562 		&ett_nfapi_rf_bands,
11563 		&ett_nfapi_bf_vectors,
11564 		&ett_nfapi_csi_rs_bf_vector,
11565 		&ett_nfapi_csi_rs_resource_configs,
11566 		&ett_nfapi_tx_antenna_ports,
11567 		&ett_nfapi_harq_ack_nack_data,
11568 		&ett_nfapi_harq_data,
11569 		&ett_nfapi_cc,
11570 		&ett_nfapi_rbs,
11571 		&ett_nfapi_antennas,
11572 		&ett_nfapi_epdcch_prbs,
11573 		&ett_nfapi_dl_config_request_pdu_list,
11574 		&ett_nfapi_ul_config_request_pdu_list,
11575 		&ett_nfapi_hi_dci0_request_pdu_list,
11576 		&ett_nfapi_tx_request_pdu_list,
11577 		&ett_nfapi_rx_indication_pdu_list,
11578 		&ett_nfapi_harq_indication_pdu_list,
11579 		&ett_nfapi_crc_indication_pdu_list,
11580 		&ett_nfapi_sr_indication_pdu_list,
11581 		&ett_nfapi_cqi_indication_pdu_list,
11582 		&ett_nfapi_preamble_indication_pdu_list,
11583 		&ett_nfapi_srs_indication_pdu_list,
11584 		&ett_nfapi_lbt_dl_config_pdu_list,
11585 		&ett_nfapi_lbt_dl_indication_pdu_list,
11586 		&ett_nfapi_subbands,
11587 		&ett_nfapi_precoding,
11588 		&ett_nfapi_bf_vector_antennas,
11589 		&ett_nfapi_received_interference_power_mesurement_results,
11590 		&ett_nfapi_downlink_bandwidth_support,
11591 		&ett_nfapi_uplink_bandwidth_support,
11592 		&ett_nfapi_release_support,
11593 		&ett_nfapi_downlink_modulation_support,
11594 		&ett_nfapi_uplink_modulation_support,
11595 
11596 		&ett_nfapi_earfcn_list,
11597 		&ett_nfapi_uarfcn_list,
11598 		&ett_nfapi_arfcn_list,
11599 		&ett_nfapi_rssi_list,
11600 		&ett_nfapi_pci_list,
11601 		&ett_nfapi_psc_list,
11602 		&ett_nfapi_lte_cells_found_list,
11603 		&ett_nfapi_utran_cells_found_list,
11604 		&ett_nfapi_geran_cells_found_list,
11605 		&ett_nfapi_si_periodicity_list,
11606 
11607 		/* for fragmentation support*/
11608 		&ett_msg_fragment,
11609 		&ett_msg_fragments
11610 	};
11611 
11612 	static ei_register_info ei[] =
11613 	{
11614 		{ &ei_invalid_range, { "nfapi.invalid.range", PI_PROTOCOL, PI_WARN, "Invalid range", EXPFILL } },
11615 		{ &ei_invalid_tlv_length, { "nfapi.invalid.tlv.length", PI_PROTOCOL, PI_ERROR, "Invalid TLV length", EXPFILL } },
11616 	};
11617 
11618 	expert_module_t* expert_nfapi;
11619 	/* Register protocol */
11620 	proto_nfapi = proto_register_protocol("Nfapi", "NFAPI", "nfapi");
11621 
11622 	expert_nfapi = expert_register_protocol(proto_nfapi);
11623 	expert_register_field_array(expert_nfapi, ei, array_length(ei));
11624 
11625 
11626 	proto_register_field_array(proto_nfapi, hf, array_length(hf));
11627 	proto_register_subtree_array(ett, array_length(ett));
11628 
11629 	message_table = register_dissector_table("nfapi.msg_id", "NFAPI Message ID", proto_nfapi, FT_UINT16, BASE_DEC);
11630 
11631 	reassembly_table_register(&ul_p7_reassemble_table, &addresses_ports_reassembly_table_functions);
11632 	reassembly_table_register(&dl_p7_reassemble_table, &addresses_ports_reassembly_table_functions);
11633 
11634 	nfapi_handle = register_dissector("nfapi", dissect_nfapi, proto_nfapi);
11635 
11636 }
11637 
11638 // ----------------------------------------------------------------------------|
11639 
proto_reg_handoff_nfapi(void)11640 void proto_reg_handoff_nfapi(void)
11641 {
11642 	dissector_handle_t handle;
11643 
11644 	handle = create_dissector_handle( dissect_nfapi_ul_p7, -1 );
11645 	dissector_add_uint("nfapi.msg_id", NFAPI_HARQ_INDICATION_MSG_ID, handle);
11646 	dissector_add_uint("nfapi.msg_id", NFAPI_CRC_INDICATION_MSG_ID, handle);
11647 	dissector_add_uint("nfapi.msg_id", NFAPI_RX_ULSCH_INDICATION_MSG_ID, handle);
11648 	dissector_add_uint("nfapi.msg_id", NFAPI_RACH_INDICATION_MSG_ID, handle);
11649 	dissector_add_uint("nfapi.msg_id", NFAPI_SRS_INDICATION_MSG_ID, handle);
11650 	dissector_add_uint("nfapi.msg_id", NFAPI_RX_SR_INDICATION_MSG_ID, handle);
11651 	dissector_add_uint("nfapi.msg_id", NFAPI_RX_CQI_INDICATION_MSG_ID, handle);
11652 
11653 	handle = create_dissector_handle( dissect_nfapi_dl_p7, -1 );
11654 	dissector_add_uint("nfapi.msg_id", NFAPI_DL_CONFIG_REQUEST_MSG_ID, handle);
11655 	dissector_add_uint("nfapi.msg_id", NFAPI_UL_CONFIG_REQUEST_MSG_ID, handle);
11656 	dissector_add_uint("nfapi.msg_id", NFAPI_HI_DCI0_REQUEST_MSG_ID, handle);
11657 	dissector_add_uint("nfapi.msg_id", NFAPI_TX_REQUEST_MSG_ID, handle);
11658 	dissector_add_uint("nfapi.msg_id", NFAPI_LBT_DL_CONFIG_REQUEST_MSG_ID, handle);
11659 	dissector_add_uint("nfapi.msg_id", NFAPI_LBT_DL_INDICATION_MSG_ID, handle);
11660 
11661 	handle = create_dissector_handle( dissect_p45_header, -1 );
11662 	dissector_add_uint("nfapi.msg_id", NFAPI_PNF_START_REQUEST_MSG_ID, handle);
11663 	dissector_add_uint("nfapi.msg_id", NFAPI_PNF_STOP_REQUEST_MSG_ID, handle);
11664 	dissector_add_uint("nfapi.msg_id", NFAPI_PARAM_REQUEST_MSG_ID, handle);
11665 	dissector_add_uint("nfapi.msg_id", NFAPI_START_REQUEST_MSG_ID, handle);
11666 	dissector_add_uint("nfapi.msg_id", NFAPI_STOP_REQUEST_MSG_ID, handle);
11667 	dissector_add_uint("nfapi.msg_id", NFAPI_NMM_STOP_REQUEST_MSG_ID, handle);
11668 
11669 	handle = create_dissector_handle( dissect_p45_header_with_list, -1 );
11670 	dissector_add_uint("nfapi.msg_id", NFAPI_PNF_PARAM_REQUEST_MSG_ID, handle);
11671 	dissector_add_uint("nfapi.msg_id", NFAPI_PNF_CONFIG_REQUEST_MSG_ID, handle);
11672 	dissector_add_uint("nfapi.msg_id", NFAPI_MEASUREMENT_REQUEST_MSG_ID, handle);
11673 
11674 	handle = create_dissector_handle( dissect_p45_header_with_error, -1 );
11675 	dissector_add_uint("nfapi.msg_id", NFAPI_PNF_CONFIG_RESPONSE_MSG_ID, handle);
11676 	dissector_add_uint("nfapi.msg_id", NFAPI_PNF_START_RESPONSE_MSG_ID, handle);
11677 	dissector_add_uint("nfapi.msg_id", NFAPI_PNF_STOP_RESPONSE_MSG_ID, handle);
11678 	dissector_add_uint("nfapi.msg_id", NFAPI_CONFIG_RESPONSE_MSG_ID, handle);
11679 	dissector_add_uint("nfapi.msg_id", NFAPI_START_RESPONSE_MSG_ID, handle);
11680 	dissector_add_uint("nfapi.msg_id", NFAPI_STOP_RESPONSE_MSG_ID, handle);
11681 
11682 	handle = create_dissector_handle( dissect_p45_header_with_p4_error, -1 );
11683 	dissector_add_uint("nfapi.msg_id", NFAPI_RSSI_RESPONSE_MSG_ID, handle);
11684 	dissector_add_uint("nfapi.msg_id", NFAPI_CELL_SEARCH_RESPONSE_MSG_ID, handle);
11685 	dissector_add_uint("nfapi.msg_id", NFAPI_BROADCAST_DETECT_RESPONSE_MSG_ID, handle);
11686 	dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_SCHEDULE_RESPONSE_MSG_ID, handle);
11687 	dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_RESPONSE_MSG_ID, handle);
11688 	dissector_add_uint("nfapi.msg_id", NFAPI_NMM_STOP_RESPONSE_MSG_ID, handle);
11689 
11690 	handle = create_dissector_handle( dissect_p45_header_with_error_and_list, -1 );
11691 	dissector_add_uint("nfapi.msg_id", NFAPI_PNF_PARAM_RESPONSE_MSG_ID, handle);
11692 	dissector_add_uint("nfapi.msg_id", NFAPI_MEASUREMENT_RESPONSE_MSG_ID, handle);
11693 
11694 	handle = create_dissector_handle( dissect_p45_header_with_p4_error_and_list, -1 );
11695 	dissector_add_uint("nfapi.msg_id", NFAPI_RSSI_INDICATION_MSG_ID, handle);
11696 	dissector_add_uint("nfapi.msg_id", NFAPI_CELL_SEARCH_INDICATION_MSG_ID, handle);
11697 	dissector_add_uint("nfapi.msg_id", NFAPI_BROADCAST_DETECT_INDICATION_MSG_ID, handle);
11698 	dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_SCHEDULE_INDICATION_MSG_ID, handle);
11699 	dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_INDICATION_MSG_ID, handle);
11700 
11701 	handle = create_dissector_handle( dissect_p45_header_with_rat_type_list, -1 );
11702 	dissector_add_uint("nfapi.msg_id", NFAPI_RSSI_REQUEST_MSG_ID, handle);
11703 	dissector_add_uint("nfapi.msg_id", NFAPI_CELL_SEARCH_REQUEST_MSG_ID, handle);
11704 	dissector_add_uint("nfapi.msg_id", NFAPI_BROADCAST_DETECT_REQUEST_MSG_ID, handle);
11705 	dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_SCHEDULE_REQUEST_MSG_ID, handle);
11706 	dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_REQUEST_MSG_ID, handle);
11707 
11708 	dissector_add_uint("nfapi.msg_id", NFAPI_CONFIG_REQUEST_MSG_ID, create_dissector_handle( dissect_p45_config_request_msg_id, -1 ));
11709 	dissector_add_uint("nfapi.msg_id", NFAPI_PARAM_RESPONSE_MSG_ID, create_dissector_handle( dissect_p45_param_response_msg_id, -1 ));
11710 	dissector_add_uint("nfapi.msg_id", NFAPI_DL_NODE_SYNC_MSG_ID, create_dissector_handle( dissect_p7_dl_node_sync_msg_id, -1 ));
11711 	dissector_add_uint("nfapi.msg_id", NFAPI_UL_NODE_SYNC_MSG_ID, create_dissector_handle( dissect_p7_ul_node_sync_msg_id, -1 ));
11712 	dissector_add_uint("nfapi.msg_id", NFAPI_TIMING_INFO_MSG_ID, create_dissector_handle( dissect_p7_timing_info_msg_id, -1 ));
11713 
11714 	dissector_add_for_decode_as("sctp.port", nfapi_handle);
11715 	dissector_add_for_decode_as("udp.port", nfapi_handle);
11716 }
11717 
11718 
11719 /*
11720 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
11721 *
11722 * Local variables:
11723 * c-basic-offset: 8
11724 * tab-width: 8
11725 * indent-tabs-mode: t
11726 * End:
11727 *
11728 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
11729 * :indentSize=8:tabSize=8:noTabs=false:
11730 */
11731