Use common indenting space in heading
[metze/wireshark/wip.git] / epan / dissectors / packet-nfapi.c
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/wmem.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_BCH_MISSING" },
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_mutli_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_CONFIG_EPDCCH_DL_PDU" },
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 static const value_string csi_rs_flags_strname[] = {
638         { 0, "CSI - RS parameters are not valid" },
639         { 1, "CSI - RS parameters are valid" },
640         { 0, NULL}
641 };
642
643
644 static const value_string paging_direct_indication_differtiation_flag_vals[] = {
645         { 0, "Direct Information" },
646         { 1, "Paging" },
647         { 0, NULL }
648 };
649
650 static const value_string ul_tx_mode_vals[] = {
651         { 0, "SISO/MIMO" },
652         { 1, "MIMO" },
653         { 0, NULL }
654 };
655
656 static const value_string n_srs_vals[] = {
657         { 0, "No overlap" },
658         { 1, "Overlap" },
659         { 0, NULL }
660 };
661
662 static const value_string n_srs_initial_vals[] = {
663         { 0, "Last OFDM symbol is not punctured" },
664         { 1, "Last OFDM symbol is punctured." },
665         { 0, NULL }
666 };
667
668
669 static const value_string csi_mode_vals[] = {
670         { 0, "PUCCH format 2/2a/2b/3" },
671         { 1, "PUCCH format 4" },
672         { 2, "PUCCH format 5" },
673         { 0, NULL }
674 };
675
676 static const value_string hi_dci0_pdu_type_vals[] = {
677         { 0, "HI" },
678         { 1, "DCI UL" },
679         { 2, "EDPCCH DCI UL" },
680         { 3, "MDPCCH DCI UL" },
681         { 0, NULL }
682 };
683
684 static const value_string ue_tx_antenna_selection_vals[] = {
685         { 0, "Not Configured" },
686         { 1, "Configured and using UE port 0" },
687         { 2, "Configured and using UE port 1" },
688         { 0, NULL }
689 };
690
691 static const value_string size_of_cqi_csi_feild_vals[] = {
692         { 0, "1 bit" },
693         { 1, "2 bits" },
694         { 2, "3 bits" },
695         { 0, NULL }
696 };
697
698 static const value_string number_of_antenna_port_vals[] = {
699         { 0, "1 antenna port" },
700         { 1, "2 antenna ports" },
701         { 2, "4 antenna ports" },
702         { 0, NULL }
703 };
704
705 static const value_string ce_mode_vals[] = {
706         { 1, "CEModeA" },
707         { 2, "CEModeB" },
708         { 0, NULL }
709 };
710
711
712 static const value_string csi_request_vals[] = {
713         { 0, "Aperiodic CSI not requested" },
714         { 1, "Aperiodic CSI requested" },
715         { 0, NULL }
716 };
717
718 static const value_string tdd_harq_mode_vals[] = {
719         { 0, "Format 1a/1b BUNDLING" },
720         { 1, "Format 1a/1b MULTIPLEXING" },
721         { 2, "Format 1a/1b SPECIAL BUNDLING" },
722         { 3, "Channel Selection" },
723         { 4, "Format 3" },
724         { 5, "Format 4" },
725         { 6, "Format 5" },
726         { 0, NULL }
727 };
728
729 static const value_string fdd_harq_mode_vals[] = {
730         { 0, "Format 1a/1b" },
731         { 1, "Channel Selection" },
732         { 2, "Format 3" },
733         { 3, "Format 4" },
734         { 4, "Format 5" },
735         { 0, NULL }
736 };
737
738 static const value_string harq_value_vals[] = {
739         { 1, "ACK" },
740         { 2, "NACK" },
741         { 3, "ACK or NACK" },
742         { 4, "DTX" },
743         { 5, "ACK or DTX" },
744         { 6, "NACK or DTX" },
745         { 7, "ACK or NACK or DTX" },
746         { 0, NULL }
747 };
748
749
750 static const value_string harq_special_value_vals[] = {
751         { 0, "0 or None" },
752         { 1, "1 or 4 or 7 ACKs reported" },
753         { 2, "2 or 5 or 8 ACKs reported" },
754         { 3, "3 or 6 or 9 ACKs reported" },
755         { 4, "DTX (UE did not transmit anything)" },
756         { 0, NULL }
757 };
758
759 static const value_string channel_vals[] = {
760         { 0, "PUCCH" },
761         { 1, "PUSCH" },
762         { 0, NULL }
763 };
764
765 static const value_string rach_resource_type_vals[] = {
766         { 0, "Non LC / CE RACH" },
767         { 1, "LC / CE RACH CE level 0" },
768         { 2, "LC / CE RACH CE level 1" },
769         { 3, "LC / CE RACH CE level 2" },
770         { 4, "LC / CE RACH CE level 3" },
771         { 0, NULL }
772 };
773
774 static const value_string up_pts_symbol_vals[] = {
775         { 0, "Symbol 0" },
776         { 1, "Symbol 1" },
777         { 0, NULL }
778 };
779
780 static const value_string arfcn_direction_vals[] = {
781         { 0, "DL" },
782         { 1, "UL" },
783         { 0, NULL }
784 };
785
786 static int proto_nfapi = -1;
787
788 /* These are for the subtrees */
789 static gint ett_nfapi = -1;
790 static gint ett_nfapi_p4_p5_message_header = -1;
791 static gint ett_nfapi_p7_message_header = -1;
792 static gint ett_nfapi_tlv_tree = -1;
793 static gint ett_nfapi_tl = -1;
794 static gint ett_nfapi_pnf_phy = -1;
795 static gint ett_nfapi_pnf_phy_rel10 = -1;
796 static gint ett_nfapi_pnf_phy_rel11 = -1;
797 static gint ett_nfapi_pnf_phy_rel12 = -1;
798 static gint ett_nfapi_pnf_phy_rel13 = -1;
799 static gint ett_nfapi_pnf_phy_rf_config = -1;
800 static gint ett_nfapi_rf_bands = -1;
801 static gint ett_nfapi_tx_antenna_ports = -1;
802 static gint ett_nfapi_harq_ack_nack_data = -1;
803 static gint ett_nfapi_harq_data = -1;
804 static gint ett_nfapi_cc = -1;
805 static gint ett_nfapi_rbs = -1;
806 static gint ett_nfapi_antennas = -1;
807 static gint ett_nfapi_dl_config_request_pdu_list = -1;
808 static gint ett_nfapi_ul_config_request_pdu_list = -1;
809 static gint ett_nfapi_hi_dci0_request_pdu_list = -1;
810 static gint ett_nfapi_tx_request_pdu_list = -1;
811 static gint ett_nfapi_rx_indication_pdu_list = -1;
812 static gint ett_nfapi_harq_indication_pdu_list = -1;
813 static gint ett_nfapi_crc_indication_pdu_list = -1;
814 static gint ett_nfapi_sr_indication_pdu_list = -1;
815 static gint ett_nfapi_cqi_indication_pdu_list = -1;
816 static gint ett_nfapi_preamble_indication_pdu_list = -1;
817 static gint ett_nfapi_srs_indication_pdu_list = -1;
818 static gint ett_nfapi_lbt_dl_config_pdu_list = -1;
819 static gint ett_nfapi_lbt_dl_indication_pdu_list = -1;
820 static gint ett_nfapi_subbands = -1;
821 static gint ett_nfapi_bf_vector_antennas = -1;
822 static gint ett_nfapi_bf_vectors = -1;
823 static gint ett_nfapi_csi_rs_resource_configs = -1;
824 static gint ett_nfapi_csi_rs_bf_vector = -1;
825 static gint ett_nfapi_epdcch_prbs = -1;
826 static gint ett_nfapi_precoding = -1;
827 static gint ett_nfapi_earfcn_list = -1;
828 static gint ett_nfapi_uarfcn_list = -1;
829 static gint ett_nfapi_arfcn_list = -1;
830 static gint ett_nfapi_rssi_list = -1;
831 static gint ett_nfapi_pci_list = -1;
832 static gint ett_nfapi_psc_list = -1;
833 static gint ett_nfapi_lte_cells_found_list = -1;
834 static gint ett_nfapi_utran_cells_found_list = -1;
835 static gint ett_nfapi_geran_cells_found_list = -1;
836 static gint ett_nfapi_si_periodicity_list = -1;
837 static gint ett_nfapi_downlink_bandwidth_support = -1;
838 static gint ett_nfapi_uplink_bandwidth_support = -1;
839 static gint ett_nfapi_downlink_modulation_support = -1;
840 static gint ett_nfapi_uplink_modulation_support = -1;
841 static gint ett_nfapi_received_interference_power_mesurement_results = -1;
842 static gint ett_nfapi_release_support = -1;
843 static expert_field ei_invalid_range = EI_INIT;
844 static expert_field ei_invalid_tlv_length = EI_INIT;
845
846 static int hf_nfapi_p4_p5_message_header_phy_id = -1;
847 static int hf_nfapi_p4_p5_message_header_message_id = -1;
848 static int hf_nfapi_p4_p5_message_header_message_length = -1;
849 static int hf_nfapi_p4_p5_message_header_spare = -1;
850 static int hf_nfapi_p7_message_header_phy_id = -1;
851 static int hf_nfapi_p7_message_header_message_id = -1;
852 static int hf_nfapi_p7_message_header_message_length = -1;
853 static int hf_nfapi_p7_message_header_m = -1;
854 static int hf_nfapi_p7_message_header_segment = -1;
855 static int hf_nfapi_p7_message_header_sequence_number = -1;
856 static int hf_nfapi_p7_message_header_checksum = -1;
857 static int hf_nfapi_p7_message_header_transmit_timestamp = -1;
858 static int hf_nfapi_tl_tag = -1;
859 static int hf_nfapi_tl_length = -1;
860 static int hf_nfapi_sync_mode = -1;
861 static int hf_nfapi_location_mode = -1;
862 static int hf_nfapi_location_coordinates = -1;
863 static int hf_nfapi_dl_config_timing = -1;
864 static int hf_nfapi_tx_timing = -1;
865 static int hf_nfapi_ul_config_timing = -1;
866 static int hf_nfapi_hi_dci0_timing = -1;
867 static int hf_nfapi_maximum_number_phys = -1;
868 static int hf_nfapi_maximum_total_bandwidth = -1;
869 static int hf_nfapi_maximum_total_number_dl_layers = -1;
870 static int hf_nfapi_maximum_total_number_ul_layers = -1;
871 static int hf_nfapi_shared_bands = -1;
872 static int hf_nfapi_shared_pa = -1;
873 static int hf_nfapi_maximum_total_power = -1;
874 static int hf_nfapi_oui = -1;
875 static int hf_nfapi_pdu = -1;
876 static int hf_nfapi_pnf_phy_number_phy = -1;
877 static int hf_nfapi_pnf_phy_config_index = -1;
878 static int hf_nfapi_number_of_rf_exclusions = -1;
879 static int hf_nfapi_dl_bandwidth_support = -1;
880 static int hf_nfapi_dl_bandwidth_support_6 = -1;
881 static int hf_nfapi_dl_bandwidth_support_15 = -1;
882 static int hf_nfapi_dl_bandwidth_support_25 = -1;
883 static int hf_nfapi_dl_bandwidth_support_50 = -1;
884 static int hf_nfapi_dl_bandwidth_support_75 = -1;
885 static int hf_nfapi_dl_bandwidth_support_100 = -1;
886 static int hf_nfapi_ul_bandwidth_support = -1;
887 static int hf_nfapi_ul_bandwidth_support_6 = -1;
888 static int hf_nfapi_ul_bandwidth_support_15= -1;
889 static int hf_nfapi_ul_bandwidth_support_25 = -1;
890 static int hf_nfapi_ul_bandwidth_support_50 = -1;
891 static int hf_nfapi_ul_bandwidth_support_75 = -1;
892 static int hf_nfapi_ul_bandwidth_support_100 = -1;
893 static int hf_nfapi_downlink_channel_bandwidth_supported = -1;
894 static int hf_nfapi_uplink_channel_bandwidth_supported = -1;
895 static int hf_nfapi_number_of_dl_layers_supported = -1;
896 static int hf_nfapi_number_of_ul_layers_supported = -1;
897 static int hf_nfapi_maximum_3gpp_release_supported = -1;
898 static int hf_nfapi_maximum_3gpp_release_supported_rel8 = -1;
899 static int hf_nfapi_maximum_3gpp_release_supported_rel9 = -1;
900 static int hf_nfapi_maximum_3gpp_release_supported_rel10 = -1;
901 static int hf_nfapi_maximum_3gpp_release_supported_rel11 = -1;
902 static int hf_nfapi_maximum_3gpp_release_supported_rel12 = -1;
903 static int hf_nfapi_maximum_3gpp_release_supported_rel13 = -1;
904 static int hf_nfapi_nmm_modes_supported = -1;
905 static int hf_nfapi_number_of_rfs = -1;
906 static int hf_nfapi_rf_config_index = -1;
907 static int hf_nfapi_band = -1;
908 static int hf_nfapi_maximum_transmit_power = -1;
909 static int hf_nfapi_maximum_transmit_power_2 = -1;
910 static int hf_nfapi_earfcn = -1;
911 static int hf_nfapi_minimum_transmit_power = -1;
912 static int hf_nfapi_number_of_antennas_suppported = -1;
913 static int hf_nfapi_minimum_downlink_frequency = -1;
914 static int hf_nfapi_maximum_downlink_frequency = -1;
915 static int hf_nfapi_minimum_uplink_frequency = -1;
916 static int hf_nfapi_maximum_uplink_frequency = -1;
917 static int hf_nfapi_number_of_rf_bands = -1;
918 static int hf_nfapi_nmm_uplink_rssi_supported = -1;
919 static int hf_nfapi_phy_rf_config_info_phy_id = -1;
920 static int hf_nfapi_transmission_mode7_supported = -1;
921 static int hi_nfapi_transmission_mode8_supported = -1;
922 static int hi_nfapi_two_antennas_ports_for_pucch = -1;
923 static int hi_nfapi_transmission_mode_9_supported = -1;
924 static int hi_nfapi_simultaneous_pucch_pusch = -1;
925 static int hi_nfapi_four_layer_tx_with_tm3_and_tm4 = -1;
926 static int hf_nfapi_epdcch_supported = -1;
927 static int hi_nfapi_multi_ack_csi_reporting = -1;
928 static int hi_nfapi_pucch_tx_diversity_with_channel_selection = -1;
929 static int hi_nfapi_ul_comp_supported = -1;
930 static int hi_nfapi_transmission_mode_5_supported = -1;
931 static int hf_nfapi_csi_subframe_set = -1;
932 static int hi_nfapi_enhanced_4tx_codebook = -1;
933 static int hi_nfapi_drs_supported = -1;
934 static int hi_nfapi_ul_64qam_supported = -1;
935 static int hi_nfapi_transmission_mode_10_supported = -1;
936 static int hi_nfapi_alternative_tbs_indices = -1;
937 static int hf_nfapi_pucch_format_4_supported = -1;
938 static int hf_nfapi_pucch_format_5_supported = -1;
939 static int hf_nfapi_more_than_5_ca_supported = -1;
940 static int hf_nfapi_laa_supported = -1;
941 static int hf_nfapi_laa_ending_in_dwpts_supported = -1;
942 static int hf_nfapi_laa_starting_in_second_slot_supported = -1;
943 static int hf_nfapi_beamforming_supported = -1;
944 static int hf_nfapi_csi_rs_enhancements_supported = -1;
945 static int hf_nfapi_drms_enhancements_supported = -1;
946 static int hf_nfapi_srs_enhancements_supported = -1;
947 static int hf_nfapi_dl_rs_tx_power = -1;
948 static int hf_nfapi_received_interference_power = -1;
949 static int hf_nfapi_thermal_noise_power = -1;
950 static int hf_nfapi_dl_rs_tx_power_measurement = -1;
951 static int hf_nfapi_received_interference_power_measurement = -1;
952 static int hf_nfapi_thermal_noise_power_measurement = -1;
953
954 // P5 Message Structures
955 static int hf_nfapi_error_code = -1;
956 static int hf_nfapi_p4_error_code = -1;
957 static int hf_nfapi_rat_type = -1;
958 static int hf_nfapi_num_tlv = -1;
959 static int hf_nfapi_phy_state = -1;
960 static int hf_nfapi_phy_antenna_capability = -1;
961 static int hf_nfapi_release_capability = -1;
962 static int hf_nfapi_mbsfn_capability = -1;
963 static int hf_nfapi_laa_capability = -1;
964 static int hf_nfapi_pd_sensing_lbt_support = -1;
965 static int hf_nfapi_multi_carrier_lbt_support = -1;
966 static int hf_nfapi_partial_sf_support = -1;
967
968 static int hf_nfapi_pnf_address_ipv4 = -1;
969 static int hf_nfapi_pnf_address_ipv6 = -1;
970 static int hf_nfapi_vnf_address_ipv4 = -1;
971 static int hf_nfapi_vnf_address_ipv6 = -1;
972 static int hf_nfapi_pnf_port = -1;
973 static int hf_nfapi_vnf_port = -1;
974 static int hf_nfapi_dl_ue_per_sf = -1;
975 static int hf_nfapi_ul_ue_per_sf = -1;
976 static int hf_nfapi_timing_window = -1;
977 static int hf_nfapi_timing_info_mode = -1;
978 static int hf_nfapi_timing_info_period = -1;
979 static int hf_nfapi_duplex_mode = -1;
980 static int hf_nfapi_pcfich_power_offset = -1;
981 static int hf_nfapi_pb = -1;
982 static int hf_nfapi_dl_cyclic_prefix_type = -1;
983 static int hf_nfapi_ul_cyclic_prefix_type = -1;
984 static int hf_nfapi_tx_antenna_ports = -1;
985 static int hf_nfapi_rx_antenna_ports = -1;
986 static int hf_nfapi_downlink_channel_bandwidth = -1;
987 static int hf_nfapi_uplink_channel_bandwidth = -1;
988 static int hf_nfapi_reference_signal_power = -1;
989 static int hf_nfapi_phich_resource = -1;
990 static int hf_nfapi_phich_duration = -1;
991 static int hf_nfapi_phich_power_offset = -1;
992 static int hf_nfapi_primary_synchronization_signal_epre_eprers = -1;
993 static int hf_nfapi_secondary_synchronization_signal_epre_eprers = -1;
994 static int hf_nfapi_physical_cell_id = -1;
995 static int hf_nfapi_configuration_index = -1;
996 static int hf_nfapi_root_sequence_index = -1;
997 static int hf_nfapi_zero_correlation_zone_configuration = -1;
998 static int hf_nfapi_high_speed_flag = -1;
999 static int hf_nfapi_frequency_offset = -1;
1000 static int hf_nfapi_hopping_mode = -1;
1001 static int hf_nfapi_hopping_offset = -1;
1002 static int hf_nfapi_delta_pucch_shift = -1;
1003 static int hf_nfapi_n_cqi_rb = -1;
1004 static int hf_nfapi_n_an_cs = -1;
1005 static int hf_nfapi_n1_pucch_an = -1;
1006 static int hf_nfapi_bandwidth_configuration = -1;
1007 static int hf_nfapi_max_up_pts = -1;
1008 static int hf_nfapi_srs_subframe_configuration = -1;
1009 static int hf_nfapi_srs_acknack_srs_simultaneous_transmission = -1;
1010 static int hf_nfapi_uplink_rs_hopping = -1;
1011 static int hf_nfapi_group_assignment = -1;
1012 static int hf_nfapi_cyclic_shift_1_for_drms = -1;
1013 static int hf_nfapi_subframe_assignment = -1;
1014 static int hf_nfapi_special_subframe_patterns = -1;
1015 static int hf_nfapi_ed_threshold_for_lbt_for_pdsch = -1;
1016 static int hf_nfapi_ed_threshold_for_lbt_for_drs = -1;
1017 static int hf_nfapi_pd_threshold = -1;
1018 static int hf_nfapi_multi_carrier_type = -1;
1019 static int hf_nfapi_multi_carrier_tx = -1;
1020 static int hf_nfapi_multi_carrier_freeze = -1;
1021 static int hf_nfapi_tx_antenna_ports_for_drs = -1;
1022 static int hf_nfapi_transmission_power_for_drs = -1;
1023 static int hf_nfapi_pbch_repetitions_enabled_r13 = -1;
1024 static int hf_nfapi_prach_cat_m_root_sequence_index = -1;
1025 static int hf_nfapi_prach_cat_m_zero_correlation_zone_configuration = -1;
1026 static int hf_nfapi_prach_cat_m_high_speed_flag = -1;
1027 static int hf_nfapi_prach_ce_level_0_enable = -1;
1028 static int hf_nfapi_prach_ce_level_0_configuration_index = -1;
1029 static int hf_nfapi_prach_ce_level_0_frequency_offset = -1;
1030 static int hf_nfapi_prach_ce_level_0_number_of_repetitions_per_attempt = -1;
1031 static int hf_nfapi_prach_ce_level_0_starting_subframe_periodicity = -1;
1032 static int hf_nfapi_prach_ce_level_0_hopping_enabled = -1;
1033 static int hf_nfapi_prach_ce_level_0_hopping_offset = -1;
1034 static int hf_nfapi_prach_ce_level_1_enable = -1;
1035 static int hf_nfapi_prach_ce_level_1_configuration_index = -1;
1036 static int hf_nfapi_prach_ce_level_1_frequency_offset = -1;
1037 static int hf_nfapi_prach_ce_level_1_number_of_repetitions_per_attempt = -1;
1038 static int hf_nfapi_prach_ce_level_1_starting_subframe_periodicity = -1;
1039 static int hf_nfapi_prach_ce_level_1_hopping_enabled = -1;
1040 static int hf_nfapi_prach_ce_level_1_hopping_offset = -1;
1041 static int hf_nfapi_prach_ce_level_2_enable = -1;
1042 static int hf_nfapi_prach_ce_level_2_configuration_index = -1;
1043 static int hf_nfapi_prach_ce_level_2_frequency_offset = -1;
1044 static int hf_nfapi_prach_ce_level_2_number_of_repetitions_per_attempt = -1;
1045 static int hf_nfapi_prach_ce_level_2_starting_subframe_periodicity = -1;
1046 static int hf_nfapi_prach_ce_level_2_hopping_enabled = -1;
1047 static int hf_nfapi_prach_ce_level_2_hopping_offset = -1;
1048 static int hf_nfapi_prach_ce_level_3_enable = -1;
1049 static int hf_nfapi_prach_ce_level_3_configuration_index = -1;
1050 static int hf_nfapi_prach_ce_level_3_frequency_offset = -1;
1051 static int hf_nfapi_prach_ce_level_3_number_of_repetitions_per_attempt = -1;
1052 static int hf_nfapi_prach_ce_level_3_starting_subframe_periodicity = -1;
1053 static int hf_nfapi_prach_ce_level_3_hopping_enabled = -1;
1054 static int hf_nfapi_prach_ce_level_3_hopping_offset = -1;
1055 static int hf_nfapi_pucch_internal_ul_hopping_config_common_mode_b = -1;
1056 static int hf_nfapi_pucch_internal_ul_hopping_config_common_mode_a = -1;
1057 static int hf_nfapi_dl_modulation_support = -1;
1058 static int hf_nfapi_dl_modulation_support_qpsk = -1;
1059 static int hf_nfapi_dl_modulation_support_16qam = -1;
1060 static int hf_nfapi_dl_modulation_support_64qam = -1;
1061 static int hf_nfapi_dl_modulation_support_256qam = -1;
1062 static int hf_nfapi_ul_modulation_support = -1;
1063 static int hf_nfapi_ul_modulation_support_qpsk = -1;
1064 static int hf_nfapi_ul_modulation_support_16qam = -1;
1065 static int hf_nfapi_ul_modulation_support_64qam = -1;
1066 static int hf_nfapi_data_report_mode = -1;
1067 static int hf_nfapi_sfnsf = -1;
1068
1069 // P7 Sub Structures
1070 static int hf_nfapi_dl_dci_format = -1;
1071 static int hf_nfapi_ul_dci_format = -1;
1072 static int hf_nfapi_mpdcch_ul_dci_format = -1;
1073 static int hf_nfapi_cce_idx = -1;
1074 static int hf_nfapi_aggregation_level = -1;
1075 static int hf_nfapi_mcs_1 = -1;
1076 static int hf_nfapi_redundancy_version_1 = -1;
1077 static int hf_nfapi_new_data_indicator_1 = -1;
1078 static int hf_nfapi_mcs_2 = -1;
1079 static int hf_nfapi_redundancy_version_2 = -1;
1080 static int hf_nfapi_new_data_indicator_2 = -1;
1081 static int hf_nfapi_harq_process = -1;
1082 static int hf_nfapi_tpmi = -1;
1083 static int hf_nfapi_pmi = -1;
1084 static int hf_nfapi_precoding_information = -1;
1085 static int hf_nfapi_tpc = -1;
1086 static int hf_nfapi_downlink_assignment_index = -1;
1087 static int hf_nfapi_transport_block_size_index = -1;
1088 static int hf_nfapi_downlink_power_offset = -1;
1089 static int hf_nfapi_allocate_prach_flag = -1;
1090 static int hf_nfapi_preamble_index = -1;
1091 static int hf_nfapi_prach_mask_index = -1;
1092 static int hf_nfapi_rnti_type = -1;
1093 static int hf_nfapi_mpdcch_rnti_type = -1;
1094 static int hf_nfapi_mcch_flag = -1;
1095 static int hf_nfapi_mcch_change_notification = -1;
1096 static int hf_nfapi_scrambling_identity = -1;
1097 static int hf_nfapi_cross_carrier_scheduling_flag = -1;
1098 static int hf_nfapi_carrier_indicator = -1;
1099 static int hf_nfapi_srs_flag = -1;
1100 static int hf_nfapi_srs_request = -1;
1101 static int hf_nfapi_antenna_ports_scrambling_and_layers = -1;
1102 static int hf_nfapi_total_dci_length_including_padding = -1;
1103 static int hf_nfapi_harq_ack_resource_offset = -1;
1104 static int hf_nfapi_pdsch_re_mapping_and_quasi_co_location_indicator = -1;
1105 static int hf_nfapi_primary_cell_type = -1;
1106 static int hf_nfapi_ul_dl_configuration_flag = -1;
1107 static int hf_nfapi_number_of_ul_dl_configurations = -1;
1108 static int hf_nfapi_ul_dl_configuration_index = -1;
1109 static int hf_nfapi_laa_end_partial_sf_flag = -1;
1110 static int hf_nfapi_laa_end_partial_sf_configuration = -1;
1111 static int hf_nfapi_initial_lbt_sf = -1;
1112 static int hf_nfapi_codebooksize_determination_r13 = -1;
1113 static int hf_nfapi_rel13_drms_table_flag = -1;
1114 static int hf_nfapi_csi_rs_resource_config = -1;
1115 static int hf_nfapi_csi_rs_number_of_nzp_configurations = -1;
1116 static int hf_nfapi_pdsch_start = -1;
1117 static int hf_nfapi_drms_config_flag = -1;
1118 static int hf_nfapi_drms_scrambling = -1;
1119 static int hf_nfapi_csi_config_flag = -1;
1120 static int hf_nfapi_csi_scrambling = -1;
1121 static int hf_nfapi_pdsch_re_mapping_flag = -1;
1122 static int hf_nfapi_pdsch_re_mapping_antenna_ports = -1;
1123 static int hf_nfapi_pdsch_re_mapping_freq_shift = -1;
1124 static int hf_nfapi_alt_cqi_table_r12 = -1;
1125 static int hf_nfapi_max_layers = -1;
1126 static int hf_nfapi_n_dl_harq = -1;
1127 static int hf_nfapi_dwpts_symbols = -1;
1128 static int hf_nfapi_ue_type = -1;
1129 static int hf_nfapi_pdsch_payload_type = -1;
1130 static int hf_nfapi_initial_transmission_sf = -1;
1131 static int hf_nfapi_req13_drms_table_flag = -1;
1132 static int hf_nfapi_prnti = -1;
1133 static int hf_nfapi_mcs = -1;
1134 static int hf_nfapi_number_of_transport_blocks = -1;
1135 static int hf_nfapi_ue_mode = -1;
1136 static int hf_prs_bandwidth = -1;
1137 static int hf_prs_cyclic_prefix_type = -1;
1138 static int hf_prs_muting = -1;
1139 static int hf_nfapi_csi_rs_resource_index = -1;
1140 static int hf_nfapi_csi_rs_class = -1;
1141 static int hf_nfapi_cdm_type = -1;
1142 static int hf_nfapi_edpcch_prb_index = -1;
1143 static int hf_nfapi_epdcch_resource_assignment_flag = -1;
1144 static int hf_nfapi_epdcch_id = -1;
1145 static int hf_nfapi_epdcch_start_symbol = -1;
1146 static int hf_nfapi_epdcch_num_prb = -1;
1147 static int hf_nfapi_precoding_value = -1;
1148 static int hf_nfapi_mpdcch_narrowband = -1;
1149 static int hf_nfapi_number_of_prb_pairs = -1;
1150 static int hf_nfapi_resource_block_assignment = -1;
1151 static int hf_nfapi_start_symbol = -1;
1152 static int hf_nfapi_ecce_index = -1;
1153 static int hf_nfapi_ce_mode = -1;
1154 static int hf_nfapi_drms_scrabmling_init = -1;
1155 static int hf_nfapi_pdsch_reception_levels = -1;
1156 static int hf_nfapi_new_data_indicator = -1;
1157 static int hf_nfapi_tpmi_length = -1;
1158 static int hf_nfapi_pmi_flag = -1;
1159 static int hf_nfapi_harq_resource_offset = -1;
1160 static int hf_nfapi_dci_subframe_repetition_number = -1;
1161 static int hf_nfapi_downlink_assignment_index_length = -1;
1162 static int hf_nfapi_starting_ce_level = -1;
1163 static int hf_nfapi_antenna_ports_and_scrambling_identity_flag = -1;
1164 static int hf_nfapi_antenna_ports_and_scrambling_identity = -1;
1165 static int hf_nfapi_paging_direct_indication_differentiation_flag = -1;
1166 static int hf_nfapi_direct_indication = -1;
1167 static int hf_nfapi_number_of_tx_antenna_ports = -1;
1168
1169 // P7 Message Structures
1170 static int hf_nfapi_dl_node_sync_t1 = -1;
1171 static int hf_nfapi_dl_node_sync_delta_sfn_sf = -1;
1172 static int hf_nfapi_ul_node_sync_t1 = -1;
1173 static int hf_nfapi_ul_node_sync_t2 = -1;
1174 static int hf_nfapi_ul_node_sync_t3 = -1;
1175 static int hf_nfapi_timing_info_last_sfn_sf = -1;
1176 static int hf_nfapi_timing_info_time_since_last_timing_info = -1;
1177 static int hf_nfapi_timing_info_dl_config_jitter = -1;
1178 static int hf_nfapi_timing_info_tx_request_jitter = -1;
1179 static int hf_nfapi_timing_info_ul_config_jitter = -1;
1180 static int hf_nfapi_timing_info_hi_dci0_jitter = -1;
1181 static int hf_nfapi_timing_info_dl_config_latest_delay = -1;
1182 static int hf_nfapi_timing_info_tx_request_latest_delay = -1;
1183 static int hf_nfapi_timing_info_ul_config_latest_delay = -1;
1184 static int hf_nfapi_timing_info_hi_dci0_latest_delay = -1;
1185 static int hf_nfapi_timing_info_dl_config_earliest_arrival = -1;
1186 static int hf_nfapi_timing_info_tx_request_earliest_arrival = -1;
1187 static int hf_nfapi_timing_info_ul_config_earliest_arrival = -1;
1188 static int hf_nfapi_timing_info_hi_dci0_earliest_arrival = -1;
1189 static int hf_nfapi_sfn_sf = -1;
1190 static int hf_nfapi_number_pdcch_ofdm_symbols = -1;
1191 static int hf_nfapi_number_dci = -1;
1192 static int hf_nfapi_number_pdus = -1;
1193 static int hf_nfapi_number_pdsch_rnti = -1;
1194 static int hf_nfapi_transmission_power_pcfich = -1;
1195 static int hf_nfapi_number_of_harqs = -1;
1196 static int hf_nfapi_number_of_crcs = -1;
1197 static int hf_nfapi_number_of_srs = -1;
1198 static int hf_nfapi_number_of_cqi = -1;
1199 static int hf_nfapi_number_of_preambles = -1;
1200 static int hf_nfapi_number_of_srss = -1;
1201 static int hf_nfapi_lbt_dl_req_pdu_type = -1;
1202 static int hf_nfapi_lbt_dl_ind_pdu_type = -1;
1203 static int hf_nfapi_dl_config_pdu_type = -1;
1204 static int hf_nfapi_pdu_size = -1;
1205 static int hf_nfapi_instance_length = -1;
1206 static int hf_nfapi_length;
1207 static int hf_nfapi_pdu_index = -1;
1208 static int hf_nfapi_rnti = -1;
1209 static int hf_nfapi_resource_allocation_type = -1;
1210 static int hf_nfapi_virtual_resource_block_assignment_flag = -1;
1211 static int hf_nfapi_resource_block_coding = -1;
1212 static int hf_nfapi_modulation = -1;
1213 static int hf_nfapi_redundancy_version = -1;
1214 static int hf_nfapi_transport_blocks = -1;
1215 static int hf_nfapi_transport_block_to_codeword_swap_flag = -1;
1216 static int hf_nfapi_transmission_scheme = -1;
1217 static int hf_nfapi_ul_transmission_scheme = -1;
1218 static int hf_nfapi_number_of_layers = -1;
1219 static int hf_nfapi_number_of_subbands = -1;
1220 static int hf_nfapi_codebook_index = -1;
1221 static int hf_nfapi_ue_category_capacity = -1;
1222 static int hf_nfapi_pa = -1;
1223 static int hf_nfapi_delta_power_offset_index = -1;
1224 static int hf_nfapi_ngap = -1;
1225 static int hf_nfapi_nprb = -1;
1226 static int hf_nfapi_transmission_mode = -1;
1227 static int hf_nfapi_num_bf_prb_per_subband = -1;
1228 static int hf_nfapi_num_bf_vector = -1;
1229 static int hf_nfapi_bf_vector_subband_index = -1;
1230 static int hf_nfapi_bf_vector_num_antennas = -1;
1231 static int hf_nfapi_bf_vector_bf_value = -1;
1232 static int hf_nfapi_nscid = -1;
1233 static int hf_nfapi_csi_rs_flag = -1;
1234 static int hf_nfapi_csi_rs_resource_config_r10 = -1;
1235 static int hf_nfapi_csi_rs_zero_tx_power_resource_config_bitmap_r10 = -1;
1236 static int hf_nfapi_transmission_power = -1;
1237 static int hf_nfapi_mbsfn_area_id = -1;
1238 static int hf_nfapi_csi_rs_antenna_port_count_r10 = -1;
1239 static int hf_nfapi_ul_config_pdu_type = -1;
1240 static int hf_nfapi_rach_prach_frequency_resources = -1;
1241 static int hf_nfapi_srs_present = -1;
1242 static int hf_nfapi_handle = -1;
1243 static int hf_nfapi_pucch_index = -1;
1244 static int hf_nfapi_size = -1;
1245 static int hf_nfapi_resource_block_start = -1;
1246 static int hf_nfapi_number_of_resource_blocks = -1;
1247 static int hf_nfapi_cyclic_shift_2_for_drms = -1;
1248 static int hf_nfapi_frequency_hopping_enabled_flag = -1;
1249 static int hf_nfapi_frequency_hopping_bits = -1;
1250 static int hf_nfapi_new_data_indication = -1;
1251 static int hf_nfapi_harq_process_number = -1;
1252 static int hf_nfapi_ul_tx_mode = -1;
1253 static int hf_nfapi_current_tx_nb = -1;
1254 static int hf_nfapi_n_srs = -1;
1255 static int hf_nfapi_disable_sequence_hopping_flag = -1;
1256 static int hf_nfapi_dl_cqi_pmi_size_rank_1 = -1;
1257 static int hf_nfapi_dl_cqi_pmi_size_rank_greater_1 = -1;
1258 static int hf_nfapi_ri_size = -1;
1259 static int hf_nfapi_delta_offset_cqi = -1;
1260 static int hf_nfapi_delta_offset_ri = -1;
1261 static int hf_nfapi_harq_size = -1;
1262 static int hf_nfapi_delta_offset_harq = -1;
1263 static int hf_nfapi_tdd_ack_nack_mode = -1;
1264 static int hf_nfapi_fdd_ack_nack_mode = -1;
1265 static int hf_nfapi_n_srs_initial = -1;
1266 static int hf_nfapi_initial_number_of_resource_blocks = -1;
1267 static int hf_nfapi_dl_cqi_pmi_size = -1;
1268 static int hf_nfapi_report_type = -1;
1269 static int hf_nfapi_dl_cqi_ri_pmi_size = -1;
1270 static int hf_nfapi_control_type = -1;
1271 static int hf_nfapi_number_of_cc = -1;
1272 static int hf_nfapi_virtual_cell_id_enabled_flag = -1;
1273 static int hf_nfapi_npusch_identity = -1;
1274 static int hf_nfapi_ndrms_csh_identity = -1;
1275 static int hf_nfapi_total_number_of_repetitions = -1;
1276 static int hf_nfapi_repetition_number = -1;
1277 static int hf_nfapi_initial_sf_io = -1;
1278 static int hf_nfapi_empty_symbols_due_to_retunning = -1;
1279 static int hf_nfapi_dl_cqi_ri_pmi_size_2 = -1;
1280 static int hf_nfapi_npucch_identity = -1;
1281 static int hf_nfapi_harq_size_2 = -1;
1282 static int hf_nfapi_delta_offset_harq_2 = -1;
1283 static int hf_nfapi_empty_symbols = -1;
1284 static int hf_nfapi_csi_mode = -1;
1285 static int hf_nfapi_dl_cqi_pmi_size_2 = -1;
1286 static int hf_nfapi_statring_prb = -1;
1287 static int hf_nfapi_cdm_index = -1;
1288 static int hf_nfapi_nsrs = -1;
1289 static int hf_nfapi_num_ant_ports = -1;
1290 static int hf_nfapi_n_pucch_2_0 = -1;
1291 static int hf_nfapi_n_pucch_2_1 = -1;
1292 static int hf_nfapi_n_pucch_2_2 = -1;
1293 static int hf_nfapi_n_pucch_2_3 = -1;
1294 static int hf_nfapi_starting_prb = -1;
1295 static int hf_nfapi_antenna_port = -1;
1296 static int hf_nfapi_number_of_combs = -1;
1297 static int hf_nfapi_number_of_pucch_resource = -1;
1298 static int hf_nfapi_pucch_index_p1 = -1;
1299 static int hf_nfapi_n_pucch_1_0 = -1;
1300 static int hf_nfapi_n_pucch_1_1 = -1;
1301 static int hf_nfapi_n_pucch_1_2 = -1;
1302 static int hf_nfapi_n_pucch_1_3 = -1;
1303 static int hf_nfapi_srs_bandwidth = -1;
1304 static int hf_nfapi_frequency_domain_position = -1;
1305 static int hf_nfapi_srs_hopping_bandwidth = -1;
1306 static int hf_nfapi_transmission_comb = -1;
1307 static int hf_nfapi_i_srs = -1;
1308 static int hf_nfapi_sounding_reference_cyclic_shift = -1;
1309 static int hf_nfapi_pdu_length = -1;
1310 static int hf_nfapi_crc_flag = -1;
1311 static int hf_nfapi_number_of_hi_pdus = -1;
1312 static int hf_nfapi_number_of_dci_pdus = -1;
1313 static int hf_nfapi_hi_dci0_pdu_type = -1;
1314 static int hf_nfapi_hi_value = -1;
1315 static int hf_nfapi_i_phich = -1;
1316 static int hf_nfapi_flag_tb2 = -1;
1317 static int hf_nfapi_hi_value_2 = -1;
1318 static int hf_nfapi_ue_tx_antenna_selection = -1;
1319 static int hf_nfapi_cqi_csi_request = -1;
1320 static int hf_nfapi_ul_index = -1;
1321 static int hf_nfapi_dl_assignment_index = -1;
1322 static int hf_nfapi_tpc_bitmap = -1;
1323 static int hf_nfapi_new_data_indication_two = -1;
1324 static int hf_nfapi_size_of_cqi_csi_feild = -1;
1325 static int hf_nfapi_resource_allocation_flag = -1;
1326 static int hf_nfapi_number_of_antenna_ports = -1;
1327 static int hf_nfapi_n_ul_rb = -1;
1328 static int hf_nfapi_pscch_resource = -1;
1329 static int hf_nfapi_time_resource_pattern = -1;
1330 static int hf_nfapi_mpdcch_transmission_type = -1;
1331 static int hf_nfapi_drms_scrambling_init = -1;
1332 static int hf_nfapi_pusch_repetition_levels = -1;
1333 static int hf_nfapi_frequency_hopping_flag = -1;
1334 static int hf_nfapi_csi_request = -1;
1335 static int hf_nfapi_dai_presence_flag = -1;
1336 static int hf_nfapi_total_dci_length_include_padding = -1;
1337 static int hf_nfapi_data_offset = -1;
1338 static int hf_nfapi_ul_cqi = -1;
1339 static int hf_nfapi_timing_advance_r9 = -1;
1340 static int hf_nfapi_timing_advance = -1;
1341 static int hf_nfapi_harq_data_value_0 = -1;
1342 static int hf_nfapi_harq_data_value_0_special = -1;
1343 static int hf_nfapi_harq_data_value_1 = -1;
1344 static int hf_nfapi_harq_data_value_2 = -1;
1345 static int hf_nfapi_harq_data_value_3 = -1;
1346 static int hf_nfapi_tdd_harq_mode = -1;
1347 static int hf_nfapi_fdd_harq_mode = -1;
1348 static int hf_nfapi_number_of_ack_nack = -1;
1349 static int hf_nfapi_harq_tb_1 = -1;
1350 static int hf_nfapi_harq_tb_2 = -1;
1351 static int hf_nfapi_harq_tb_n = -1;
1352 static int hf_nfapi_channel = -1;
1353 static int hf_nfapi_ri = -1;
1354 static int hf_nfapi_number_of_cc_reported = -1;
1355 static int hf_nfapi_preamble = -1;
1356 static int hf_nfapi_rach_resource_type = -1;
1357 static int hf_nfapi_snr = -1;
1358 static int hf_nfapi_doppler_estimation = -1;
1359 static int hf_nfapi_rb_start = -1;
1360 static int hf_nfapi_up_pts_symbol = -1;
1361 static int hf_nfapi_number_prb_per_subband = -1;
1362 static int hf_nfapi_number_antennas = -1;
1363 static int hf_nfapi_subband_index = -1;
1364 static int hf_nfapi_channel_coefficient = -1;
1365 static int hf_nfapi_ul_rtoa = -1;
1366 static int hf_nfapi_mp_cca = -1;
1367 static int hf_nfapi_n_cca = -1;
1368 static int hf_nfapi_offset = -1;
1369 static int hf_nfapi_lte_txop_sf = -1;
1370 static int hf_nfapi_txop_sfn_sf_end = -1;
1371 static int hf_nfapi_lbt_mode = -1;
1372 static int hf_nfapi_sfn_sf_end = -1;
1373 static int hf_nfapi_result = -1;
1374 static int hf_nfapi_txop_symbols = -1;
1375 static int hf_nfapi_initial_partial_sf = -1;
1376 static int hf_nfapi_frequency_band_indicator = -1;
1377 static int hf_nfapi_measurement_period = -1;
1378 static int hf_nfapi_bandwidth = -1;
1379 static int hf_nfapi_timeout = -1;
1380 static int hf_nfapi_number_of_earfcns = -1;
1381 static int hf_nfapi_uarfcn = -1;
1382 static int hf_nfapi_number_of_uarfcns = -1;
1383 static int hf_nfapi_arfcn = -1;
1384 static int hf_nfapi_arfcn_direction = -1;
1385 static int hf_nfapi_number_of_arfcns = -1;
1386 static int hf_nfapi_rssi = -1;
1387 static int hf_nfapi_number_of_rssi = -1;
1388 static int hf_nfapi_pci = -1;
1389 static int hf_nfapi_measurement_bandwidth = -1;
1390 static int hf_nfapi_exhaustive_search = -1;
1391 static int hf_nfapi_number_of_pci = -1;
1392 static int hf_nfapi_psc = -1;
1393 static int hf_nfapi_number_of_psc = -1;
1394 static int hf_nfapi_rsrp = -1;
1395 static int hf_nfapi_rsrq = -1;
1396 static int hf_nfapi_number_of_lte_cells_found = -1;
1397 static int hf_nfapi_rscp = -1;
1398 static int hf_nfapi_enco = -1;
1399 static int hf_nfapi_number_of_utran_cells_found = -1;
1400 static int hf_nfapi_bsic = -1;
1401 static int hf_nfapi_rxlev = -1;
1402 static int hf_nfapi_rxqual = -1;
1403 static int hf_nfapi_sfn_offset = -1;
1404 static int hf_nfapi_number_of_geran_cells_found = -1;
1405 static int hf_nfapi_number_of_tx_antenna = -1;
1406 static int hf_nfapi_mib = -1;
1407 static int hf_nfapi_phich_configuration = -1;
1408 static int hf_nfapi_retry_count = -1;
1409 static int hf_nfapi_sib1 = -1;
1410 static int hf_nfapi_si_periodicity = -1;
1411 static int hf_nfapi_si_index = -1;
1412 static int hf_nfapi_number_of_si_periodicity = -1;
1413 static int hf_nfapi_si_window_length = -1;
1414 static int hf_nfapi_sib_type = -1;
1415 static int hf_nfapi_sib = -1;
1416 static int hf_nfapi_si = -1;
1417 static int hf_nfapi_pnf_search_state = -1;
1418 static int hf_nfapi_pnf_broadcast_state = -1;
1419
1420 static const value_string message_id_vals[] =
1421 {
1422         { NFAPI_DL_CONFIG_REQUEST_MSG_ID, "DL_CONFIG.request" },
1423         { NFAPI_UL_CONFIG_REQUEST_MSG_ID, "UL_CONFIG.request" },
1424         { NFAPI_SUBFRAME_INDICATION_MSG_ID, "SUBFRAME_INDICATION" },
1425         { NFAPI_HI_DCI0_REQUEST_MSG_ID, "HI_DCI0.request" },
1426         { NFAPI_TX_REQUEST_MSG_ID, "TX.request" },
1427         { NFAPI_HARQ_INDICATION_MSG_ID, "HARQ.indication" },
1428         { NFAPI_CRC_INDICATION_MSG_ID, "CRC.indication" },
1429         { NFAPI_RX_ULSCH_INDICATION_MSG_ID, "RX_ULSCH.indication" },
1430         { NFAPI_RACH_INDICATION_MSG_ID, "RACH.indication" },
1431         { NFAPI_SRS_INDICATION_MSG_ID, "SRS.indication" },
1432         { NFAPI_RX_SR_INDICATION_MSG_ID, "RX_SR.indication" },
1433         { NFAPI_RX_CQI_INDICATION_MSG_ID, "RX_CQI.indication" },
1434         { NFAPI_LBT_DL_CONFIG_REQUEST_MSG_ID, "LBT_DL_CONFIG.request" },
1435         { NFAPI_LBT_DL_INDICATION_MSG_ID, "LBT_DL.indication" },
1436
1437         { NFAPI_PNF_PARAM_REQUEST_MSG_ID, "PNF_PARAM.request" },
1438         { NFAPI_PNF_PARAM_RESPONSE_MSG_ID, "PNF_PARAM.response" },
1439         { NFAPI_PNF_CONFIG_REQUEST_MSG_ID, "PNF_CONFIG.request" },
1440         { NFAPI_PNF_CONFIG_RESPONSE_MSG_ID, "PNF_CONFIG.response" },
1441         { NFAPI_PNF_START_REQUEST_MSG_ID, "PNF_START.request" },
1442         { NFAPI_PNF_START_RESPONSE_MSG_ID, "PNF_START.response" },
1443         { NFAPI_PNF_STOP_REQUEST_MSG_ID, "PNF_STOP.request" },
1444         { NFAPI_PNF_STOP_RESPONSE_MSG_ID, "PNF_STOP.response" },
1445         { NFAPI_PARAM_REQUEST_MSG_ID, "PARAM.request" },
1446         { NFAPI_PARAM_RESPONSE_MSG_ID, "PARAM.response" },
1447         { NFAPI_CONFIG_REQUEST_MSG_ID, "CONFIG.request" },
1448         { NFAPI_CONFIG_RESPONSE_MSG_ID, "CONFIG.response" },
1449         { NFAPI_START_REQUEST_MSG_ID, "START.request" },
1450         { NFAPI_START_RESPONSE_MSG_ID, "START.response" },
1451         { NFAPI_STOP_REQUEST_MSG_ID, "STOP.request" },
1452         { NFAPI_STOP_RESPONSE_MSG_ID, "STOP.response" },
1453         { NFAPI_MEASUREMENT_REQUEST_MSG_ID, "MEASUREMENT.request" },
1454         { NFAPI_MEASUREMENT_RESPONSE_MSG_ID, "MEASUREMENT.response" },
1455
1456         { NFAPI_DL_NODE_SYNC_MSG_ID, "UL_NODE_SYNC" },
1457         { NFAPI_UL_NODE_SYNC_MSG_ID, "DL_NODE_SYNC" },
1458         { NFAPI_TIMING_INFO_MSG_ID, "TIMING_INFO" },
1459
1460         { NFAPI_RSSI_REQUEST_MSG_ID, "RSSI.request" },
1461         { NFAPI_RSSI_RESPONSE_MSG_ID, "RSSI.response" },
1462         { NFAPI_RSSI_INDICATION_MSG_ID, "RSSI.indication" },
1463         { NFAPI_CELL_SEARCH_REQUEST_MSG_ID, "CELL_SEARCH.request" },
1464         { NFAPI_CELL_SEARCH_RESPONSE_MSG_ID, "CELL_SEARCH.response" },
1465         { NFAPI_CELL_SEARCH_INDICATION_MSG_ID, "CELL_SEARCH.indication" },
1466         { NFAPI_BROADCAST_DETECT_REQUEST_MSG_ID, "BROADCAST_DETECT.request" },
1467         { NFAPI_BROADCAST_DETECT_RESPONSE_MSG_ID, "BROADCAST_DETECT.response" },
1468         { NFAPI_BROADCAST_DETECT_INDICATION_MSG_ID, "BROADCAST_DETECT.indication" },
1469         { NFAPI_SYSTEM_INFORMATION_SCHEDULE_REQUEST_MSG_ID, "SYSTEM_INFORMATION_SCHEDULE.request" },
1470         { NFAPI_SYSTEM_INFORMATION_SCHEDULE_RESPONSE_MSG_ID, "SYSTEM_INFORMATION_SCHEDULE.response" },
1471         { NFAPI_SYSTEM_INFORMATION_SCHEDULE_INDICATION_MSG_ID, "SYSTEM_INFORMATION_SCHEDULE.indication" },
1472         { NFAPI_SYSTEM_INFORMATION_REQUEST_MSG_ID, "SYSTEM_INFORMATION.request" },
1473         { NFAPI_SYSTEM_INFORMATION_RESPONSE_MSG_ID, "SYSTEM_INFORMATION.response" },
1474         { NFAPI_SYSTEM_INFORMATION_INDICATION_MSG_ID, "SYSTEM_INFORMATION.indication" },
1475         { NFAPI_NMM_STOP_REQUEST_MSG_ID, "NMM_STOP.request" },
1476         { NFAPI_NMM_STOP_RESPONSE_MSG_ID, "NMM_STOP.response" },
1477
1478         { 0, NULL },
1479 };
1480
1481 static dissector_handle_t nfapi_handle;
1482 static dissector_table_t message_table;
1483
1484 static const int * dl_bandwidth_support_fields[] = {
1485         &hf_nfapi_dl_bandwidth_support_6,
1486         &hf_nfapi_dl_bandwidth_support_15,
1487         &hf_nfapi_dl_bandwidth_support_25,
1488         &hf_nfapi_dl_bandwidth_support_50,
1489         &hf_nfapi_dl_bandwidth_support_75,
1490         &hf_nfapi_dl_bandwidth_support_100,
1491         NULL
1492 };
1493
1494 static const int * ul_bandwidth_support_fields[] = {
1495         &hf_nfapi_ul_bandwidth_support_6,
1496         &hf_nfapi_ul_bandwidth_support_15,
1497         &hf_nfapi_ul_bandwidth_support_25,
1498         &hf_nfapi_ul_bandwidth_support_50,
1499         &hf_nfapi_ul_bandwidth_support_75,
1500         &hf_nfapi_ul_bandwidth_support_100,
1501         NULL
1502 };
1503
1504 static const int * maximum_3gpp_release_supported_fields[] = {
1505         &hf_nfapi_maximum_3gpp_release_supported_rel8,
1506         &hf_nfapi_maximum_3gpp_release_supported_rel9,
1507         &hf_nfapi_maximum_3gpp_release_supported_rel10,
1508         &hf_nfapi_maximum_3gpp_release_supported_rel11,
1509         &hf_nfapi_maximum_3gpp_release_supported_rel12,
1510         &hf_nfapi_maximum_3gpp_release_supported_rel13,
1511         &hf_nfapi_dl_bandwidth_support_100,
1512         NULL
1513 };
1514
1515 typedef void(*tlv_decode)(ptvcursor_t * ptvc, packet_info* pinfo);
1516
1517 typedef struct
1518 {
1519         guint16 tag_id;
1520         char* name;
1521         tlv_decode decode;
1522 } tlv_t;
1523
1524 static void dissect_tlv_list(ptvcursor_t * ptvc, packet_info* pinfo, gint len);
1525
1526 static void dissect_array_value(ptvcursor_t * ptvc, packet_info* pinfo, const char* name, guint32 ett_idx, guint32 count, tlv_decode decode)
1527 {
1528         guint16 i = 0;
1529
1530         if (count > 0)
1531         {
1532                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_idx, "%s", name);
1533
1534                 for (i = 0; i < count; ++i)
1535                 {
1536                         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_idx, "[%d]", i);
1537                         decode(ptvc, pinfo);
1538                         ptvcursor_pop_subtree(ptvc);
1539                 }
1540
1541                 ptvcursor_pop_subtree(ptvc);
1542         }
1543 }
1544
1545 static void dissect_pnf_param_general_value(ptvcursor_t * ptvc, packet_info* pinfo)
1546 {
1547         proto_item* item;
1548         guint32 test_value;
1549
1550         // nFAPI Sync Mode
1551         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_sync_mode, 1, ENC_BIG_ENDIAN, &test_value);
1552         if (test_value > 2)
1553         {
1554                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nfapi sync mode value [0..2]");
1555         }
1556
1557         // Location Mode
1558         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_location_mode, 1, ENC_BIG_ENDIAN, &test_value);
1559         if (test_value > 3)
1560         {
1561                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid location mode value [0..3]");
1562         }
1563
1564         ptvcursor_add(ptvc, hf_nfapi_location_coordinates, 2, ENC_BIG_ENDIAN|ENC_NA);
1565         ptvcursor_add(ptvc, hf_nfapi_dl_config_timing, 4, ENC_BIG_ENDIAN);
1566         ptvcursor_add(ptvc, hf_nfapi_tx_timing, 4, ENC_BIG_ENDIAN);
1567         ptvcursor_add(ptvc, hf_nfapi_ul_config_timing, 4, ENC_BIG_ENDIAN);
1568         ptvcursor_add(ptvc, hf_nfapi_hi_dci0_timing, 4, ENC_BIG_ENDIAN);
1569         ptvcursor_add(ptvc, hf_nfapi_maximum_number_phys, 2, ENC_BIG_ENDIAN);
1570         ptvcursor_add(ptvc, hf_nfapi_maximum_total_bandwidth, 2, ENC_BIG_ENDIAN);
1571         ptvcursor_add(ptvc, hf_nfapi_maximum_total_number_dl_layers, 1, ENC_BIG_ENDIAN);
1572         ptvcursor_add(ptvc, hf_nfapi_maximum_total_number_ul_layers, 1, ENC_BIG_ENDIAN);
1573
1574         // Shared Bands
1575         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_shared_bands, 1, ENC_BIG_ENDIAN, &test_value);
1576         if (test_value > 1)
1577         {
1578                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid shared bands value [0..1]");
1579         }
1580
1581         // Shared PA
1582         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_shared_pa, 1, ENC_BIG_ENDIAN, &test_value);
1583         if (test_value > 1)
1584         {
1585                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid shared pa value [0..1]");
1586         }
1587
1588         ptvcursor_add(ptvc, hf_nfapi_maximum_total_power, 2, ENC_BIG_ENDIAN);
1589         ptvcursor_add(ptvc, hf_nfapi_oui, 3, ENC_HOST_ENDIAN);
1590 }
1591 static void dissect_pnf_rf_config_instance_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
1592 {
1593         ptvcursor_add(ptvc, hf_nfapi_rf_config_index, 2, ENC_BIG_ENDIAN);
1594 }
1595
1596 static void dissect_pnf_phy_instance_value(ptvcursor_t * ptvc, packet_info* pinfo)
1597 {
1598         proto_item* item;
1599         guint32 array_size, test_value;
1600         guint64 test_value64;
1601
1602         ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1603
1604         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rfs, 2, ENC_BIG_ENDIAN, &array_size);
1605         dissect_array_value(ptvc, pinfo, "RF Config List", ett_nfapi_pnf_phy, array_size, dissect_pnf_rf_config_instance_value);
1606
1607         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rf_exclusions, 2, ENC_BIG_ENDIAN, &array_size);
1608         dissect_array_value(ptvc, pinfo, "RF Exclustion List", ett_nfapi_pnf_phy, array_size, dissect_pnf_rf_config_instance_value);
1609
1610         // Downlink Channel Bandwidth Supported
1611         item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
1612                                                                                         hf_nfapi_downlink_channel_bandwidth_supported, ett_nfapi_downlink_bandwidth_support, dl_bandwidth_support_fields, ENC_BIG_ENDIAN, &test_value64);
1613         if (test_value64 > 0x3F)
1614         {
1615                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink channel bandwidth supported bits [0..0x3F]");
1616         }
1617         ptvcursor_advance(ptvc, 2);
1618
1619         // Uplink Channel Bandwidth Supported
1620         item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
1621                                                                                         hf_nfapi_uplink_channel_bandwidth_supported, ett_nfapi_uplink_bandwidth_support, ul_bandwidth_support_fields, ENC_BIG_ENDIAN, &test_value64);
1622         if (test_value64 > 0x3F)
1623         {
1624                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid uplink channel bandwidht supported bits [0..0x3F]");
1625         }
1626         ptvcursor_advance(ptvc, 2);
1627
1628         // Number of DL layers supported
1629         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_dl_layers_supported, 1, ENC_BIG_ENDIAN, &test_value);
1630         switch (test_value)
1631         {
1632         case 1:
1633         case 2:
1634         case 4:
1635         case 8:
1636                 break;
1637         default:
1638                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of dl layers supported value [1, 2, 4, 8]");
1639                 break;
1640         }
1641
1642         // Number of DL layers supported
1643         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ul_layers_supported, 1, ENC_BIG_ENDIAN, &test_value);
1644         switch (test_value)
1645         {
1646         case 1:
1647         case 2:
1648         case 4:
1649         case 8:
1650                 break;
1651         default:
1652                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ul layers supported value [1, 2, 4, 8]");
1653                 break;
1654         }
1655
1656         // Maximum 3GPP Release Supported
1657         item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
1658                                                                                         hf_nfapi_maximum_3gpp_release_supported, ett_nfapi_release_support, maximum_3gpp_release_supported_fields, ENC_BIG_ENDIAN, &test_value64);
1659         if (test_value64 > 0x3F)
1660         {
1661                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid maximum 3GPP release supported value [0..0x3F]");
1662         }
1663         ptvcursor_advance(ptvc, 2);
1664
1665         // NMM Modes Supported
1666         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nmm_modes_supported, 1, ENC_BIG_ENDIAN, &test_value);
1667         if (test_value > 3)
1668         {
1669                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nmm modes supported value [0..3]");
1670         }
1671 }
1672
1673 static void dissect_pnf_phy_value(ptvcursor_t * ptvc, packet_info* pinfo)
1674 {
1675         guint32 num_phy;
1676         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_phy);
1677         dissect_array_value(ptvc, pinfo, "PHY List", ett_nfapi_pnf_phy, num_phy, dissect_pnf_phy_instance_value);
1678 }
1679
1680 static void dissect_pnf_rf_config_value(ptvcursor_t * ptvc, packet_info* pinfo)
1681 {
1682         proto_item* item;
1683         guint32 test_value;
1684
1685         ptvcursor_add(ptvc, hf_nfapi_rf_config_index, 2, ENC_BIG_ENDIAN);
1686         ptvcursor_add(ptvc, hf_nfapi_band, 2, ENC_BIG_ENDIAN);
1687         ptvcursor_add(ptvc, hf_nfapi_maximum_transmit_power, 2, ENC_BIG_ENDIAN);
1688         ptvcursor_add(ptvc, hf_nfapi_minimum_transmit_power, 2, ENC_BIG_ENDIAN);
1689
1690         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_antennas_suppported, 1, ENC_BIG_ENDIAN, &test_value);
1691         switch (test_value)
1692         {
1693         case 1:
1694         case 2:
1695         case 4:
1696         case 8:
1697                 break;
1698         default:
1699                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of supported antennas [1, 2, 4, 8]");
1700                 break;
1701         }
1702
1703         ptvcursor_add(ptvc, hf_nfapi_minimum_downlink_frequency, 4, ENC_BIG_ENDIAN);
1704         ptvcursor_add(ptvc, hf_nfapi_maximum_downlink_frequency, 4, ENC_BIG_ENDIAN);
1705         ptvcursor_add(ptvc, hf_nfapi_minimum_uplink_frequency, 4, ENC_BIG_ENDIAN);
1706         ptvcursor_add(ptvc, hf_nfapi_maximum_uplink_frequency, 4, ENC_BIG_ENDIAN);
1707 }
1708
1709
1710 static void dissect_pnf_rf_value(ptvcursor_t * ptvc, packet_info* pinfo)
1711 {
1712         guint32 num_rf;
1713         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rfs, 2, ENC_BIG_ENDIAN, &num_rf);
1714         dissect_array_value(ptvc, pinfo, "RF List", ett_nfapi_pnf_phy_rf_config, num_rf, dissect_pnf_rf_config_value);
1715 }
1716
1717 static void dissect_pnf_phy_rel10_instance_value(ptvcursor_t * ptvc, packet_info* pinfo)
1718 {
1719         proto_item* item;
1720         guint32 test_value;
1721
1722         // PHY Config Index
1723         ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1724
1725         // Transmission mode 7 supported
1726         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_mode7_supported, 2, ENC_BIG_ENDIAN, &test_value);
1727         if (test_value > 1)
1728         {
1729                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode 7 supported value [0..1]");
1730         }
1731
1732         // Two antennas ports for PUCCH
1733         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_transmission_mode8_supported, 2, ENC_BIG_ENDIAN, &test_value);
1734         if (test_value > 1)
1735         {
1736                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode 8 supported value [0..1]");
1737         }
1738
1739         // Transmission mode 8 supported
1740         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_two_antennas_ports_for_pucch, 2, ENC_BIG_ENDIAN, &test_value);
1741         if (test_value > 1)
1742         {
1743                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid two antennas ports for pucch value [0..1]");
1744         }
1745
1746         // Transmission mode 9 supported
1747         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_transmission_mode_9_supported, 2, ENC_BIG_ENDIAN, &test_value);
1748         if (test_value > 1)
1749         {
1750                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode 9 supported value [0..1]");
1751         }
1752
1753         // Simultaneous PUCCH PUSCH
1754         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_simultaneous_pucch_pusch, 2, ENC_BIG_ENDIAN, &test_value);
1755         if (test_value > 1)
1756         {
1757                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid simultaneous pucch pusch supported value [0..1]");
1758         }
1759
1760         // Four layer Tx with TM3 and TM4
1761         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_four_layer_tx_with_tm3_and_tm4, 2, ENC_BIG_ENDIAN, &test_value);
1762         if (test_value > 1)
1763         {
1764                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid four layer tx with tm3 and tm4 value [0..1]");
1765         }
1766 }
1767
1768 static void dissect_pnf_phy_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
1769 {
1770         guint32 num_phy;
1771         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_phy);
1772         dissect_array_value(ptvc, pinfo, "PHY Rel 10 List", ett_nfapi_pnf_phy_rel10, num_phy, dissect_pnf_phy_rel10_instance_value);
1773 }
1774
1775 static void dissect_pnf_phy_rel11_instance_value(ptvcursor_t * ptvc, packet_info* pinfo)
1776 {
1777         proto_item* item;
1778         guint32 test_value;
1779
1780         // PHY Config Index
1781         ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1782
1783         // ePDCCH supported
1784         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_epdcch_supported, 2, ENC_BIG_ENDIAN, &test_value);
1785         if (test_value > 1)
1786         {
1787                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid edpcch supported value [0..1]");
1788         }
1789
1790         // Multi ACK CSI reporting
1791         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_multi_ack_csi_reporting, 2, ENC_BIG_ENDIAN, &test_value);
1792         if (test_value > 1)
1793         {
1794                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid multi ack csi reporting value [0..1]");
1795         }
1796
1797         // PUCCH Tx diversity with channel selection
1798         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_pucch_tx_diversity_with_channel_selection, 2, ENC_BIG_ENDIAN, &test_value);
1799         if (test_value > 1)
1800         {
1801                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch tx diversity with channel selection value [0..1]");
1802         }
1803
1804         // UL CoMP supported
1805         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_ul_comp_supported, 2, ENC_BIG_ENDIAN, &test_value);
1806         if (test_value > 1)
1807         {
1808                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul comp supported value [0..1]");
1809         }
1810
1811         // Transmission mode 5 supported
1812         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_transmission_mode_5_supported, 2, ENC_BIG_ENDIAN, &test_value);
1813         if (test_value > 1)
1814         {
1815                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode 5 supported value [0..1]");
1816         }
1817 }
1818
1819 static void dissect_pnf_phy_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
1820 {
1821         guint32 num_phy;
1822         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_phy);
1823         dissect_array_value(ptvc, pinfo, "PHY Rel 11 List", ett_nfapi_pnf_phy_rel11, num_phy, dissect_pnf_phy_rel11_instance_value);
1824 }
1825
1826 static void dissect_pnf_phy_rel12_instance_value(ptvcursor_t * ptvc, packet_info* pinfo)
1827 {
1828         proto_item* item;
1829         guint32 test_value;
1830
1831         // PHY Config Index
1832         ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1833
1834         // CSI subframe set
1835         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_subframe_set, 2, ENC_BIG_ENDIAN, &test_value);
1836         if (test_value > 1)
1837         {
1838                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi subframe set value [0..1]");
1839         }
1840
1841         // Enhanced 4TX codebook
1842         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_enhanced_4tx_codebook, 2, ENC_BIG_ENDIAN, &test_value);
1843         if (test_value > 1)
1844         {
1845                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid enhanced 4TX codebook value [0..1]");
1846         }
1847
1848         // DRS supported
1849         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_drs_supported, 2, ENC_BIG_ENDIAN, &test_value);
1850         if (test_value > 1)
1851         {
1852                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drs supported value [0..1]");
1853         }
1854
1855         // UL 64QAM supported
1856         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_ul_64qam_supported, 2, ENC_BIG_ENDIAN, &test_value);
1857         if (test_value > 1)
1858         {
1859                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul 64 QAM supported value [0..1]");
1860         }
1861
1862         // Transmission mode 10 supported
1863         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_transmission_mode_10_supported, 2, ENC_BIG_ENDIAN, &test_value);
1864         if (test_value > 1)
1865         {
1866                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode 10 supported value [0..1]");
1867         }
1868
1869         // Alternative TBS indices
1870         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_alternative_tbs_indices, 2, ENC_BIG_ENDIAN, &test_value);
1871         if (test_value > 1)
1872         {
1873                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid alternative tbs indicies supported value [0..1]");
1874         }
1875 }
1876
1877 static void dissect_pnf_phy_rel12_value(ptvcursor_t * ptvc, packet_info* pinfo)
1878 {
1879         guint32 num_phy;
1880         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_phy);
1881         dissect_array_value(ptvc, pinfo, "PHY Rel 12 List", ett_nfapi_pnf_phy_rel12, num_phy, dissect_pnf_phy_rel12_instance_value);
1882 }
1883
1884 static void dissect_pnf_phy_rel13_instance_value(ptvcursor_t * ptvc, packet_info* pinfo)
1885 {
1886         proto_item* item;
1887         guint32 test_value;
1888
1889         // PHY Config Index
1890         ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1891
1892         // PUCCH format 4 supported
1893         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_format_4_supported, 2, ENC_BIG_ENDIAN, &test_value);
1894         if (test_value > 1)
1895         {
1896                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch format 4 supported value [0..1]");
1897         }
1898
1899         // PUCCH format 5 supported
1900         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_format_5_supported, 2, ENC_BIG_ENDIAN, &test_value);
1901         if (test_value > 1)
1902         {
1903                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch format 5 supported value [0..1]");
1904         }
1905
1906         // More than 5 CA support
1907         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_more_than_5_ca_supported, 2, ENC_BIG_ENDIAN, &test_value);
1908         if (test_value > 1)
1909         {
1910                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid more than 5 ca supported value [0..1]");
1911         }
1912
1913         // LAA supported
1914         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_laa_supported, 2, ENC_BIG_ENDIAN, &test_value);
1915         if (test_value > 1)
1916         {
1917                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid laa supported value [0..1]");
1918         }
1919
1920         // LAA ending in DwPTS supported
1921         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_laa_ending_in_dwpts_supported, 2, ENC_BIG_ENDIAN, &test_value);
1922         if (test_value > 1)
1923         {
1924                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid laa ending in dwpts supported value [0..1]");
1925         }
1926
1927         // LAA starting in second slot Supported
1928         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_laa_starting_in_second_slot_supported, 2, ENC_BIG_ENDIAN, &test_value);
1929         if (test_value > 1)
1930         {
1931                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid laa starting in second slot supported value [0..1]");
1932         }
1933
1934         // Beamforming Supported
1935         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_beamforming_supported, 2, ENC_BIG_ENDIAN, &test_value);
1936         if (test_value > 1)
1937         {
1938                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid beamforming supported value [0..1]");
1939         }
1940
1941         // CSI-RS enhancements supported
1942         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_enhancements_supported, 2, ENC_BIG_ENDIAN, &test_value);
1943         if (test_value > 1)
1944         {
1945                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi rs enhancements supported value [0..1]");
1946         }
1947
1948         // DMRS enhancements supported
1949         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_enhancements_supported, 2, ENC_BIG_ENDIAN, &test_value);
1950         if (test_value > 1)
1951         {
1952                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms enhancements supported value [0..1]");
1953         }
1954
1955         // SRS enhancements supported
1956         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_srs_enhancements_supported, 2, ENC_BIG_ENDIAN, &test_value);
1957         if (test_value > 1)
1958         {
1959                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs enhancements supported value [0..1]");
1960         }
1961
1962 }
1963
1964 static void dissect_pnf_phy_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
1965 {
1966         guint32 num_phy;
1967         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_phy);
1968         dissect_array_value(ptvc, pinfo, "PHY Rel 13 List", ett_nfapi_pnf_phy_rel13, num_phy, dissect_pnf_phy_rel13_instance_value);
1969 }
1970
1971 static void dissect_pnf_phy_rf_config_instance_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
1972 {
1973         ptvcursor_add(ptvc, hf_nfapi_phy_rf_config_info_phy_id, 2, ENC_BIG_ENDIAN);
1974         ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1975         ptvcursor_add(ptvc, hf_nfapi_rf_config_index, 2, ENC_BIG_ENDIAN);
1976 }
1977 static void dissect_pnf_phy_rf_config_value(ptvcursor_t * ptvc, packet_info* pinfo)
1978 {
1979         guint32 num_configs;
1980         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_configs);
1981         dissect_array_value(ptvc, pinfo, "PHY RF Config List", ett_nfapi_pnf_phy_rf_config, num_configs, dissect_pnf_phy_rf_config_instance_value);
1982 }
1983
1984 static void dissect_dl_rs_tx_power_value(ptvcursor_t * ptvc, packet_info* pinfo)
1985 {
1986         guint32 test_value;
1987         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_rs_tx_power, 2, ENC_BIG_ENDIAN, &test_value);
1988
1989         if (!(test_value >= 1 && test_value <= 255))
1990         {
1991                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value [1..255]");
1992         }
1993 }
1994 static void dissect_received_interference_power_value(ptvcursor_t * ptvc, packet_info* pinfo)
1995 {
1996         guint32 test_value;
1997         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_received_interference_power, 2, ENC_BIG_ENDIAN, &test_value);
1998
1999         if (!(test_value >= 1 && test_value <= 255))
2000         {
2001                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value [1..255]");
2002         }
2003 }
2004 static void dissect_thermal_noise_power_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
2005 {
2006         ptvcursor_add(ptvc, hf_nfapi_thermal_noise_power, 2, ENC_BIG_ENDIAN);
2007 }
2008 static void dissect_dl_rs_tx_power_measurement_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
2009 {
2010         ptvcursor_add(ptvc, hf_nfapi_dl_rs_tx_power_measurement, 2, ENC_BIG_ENDIAN);
2011 }
2012
2013 static void dissect_received_interference_power_result_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
2014 {
2015         ptvcursor_add(ptvc, hf_nfapi_received_interference_power_measurement, 2, ENC_BIG_ENDIAN);
2016 }
2017 static void dissect_received_interference_power_measurement_value(ptvcursor_t * ptvc, packet_info* pinfo)
2018 {
2019         guint32 num_resource_block;
2020         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_resource_blocks, 2, ENC_BIG_ENDIAN, &num_resource_block);
2021         dissect_array_value(ptvc, pinfo, "Results", ett_nfapi_received_interference_power_mesurement_results, num_resource_block, dissect_received_interference_power_result_value);
2022 }
2023 static void dissect_thermal_noise_power_measurement_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
2024 {
2025         ptvcursor_add(ptvc, hf_nfapi_thermal_noise_power_measurement, 2, ENC_BIG_ENDIAN);
2026 }
2027 static void dissect_duplex_mode_value(ptvcursor_t * ptvc, packet_info* pinfo)
2028 {
2029         guint32 test_value;
2030         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_duplex_mode, 2, ENC_BIG_ENDIAN, &test_value);
2031
2032         if (test_value > 2)
2033         {
2034                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid duplex mode [0..2]");
2035         }
2036 }
2037 static void dissect_pcfich_power_offset_value(ptvcursor_t* ptvc, packet_info *pinfo)
2038 {
2039         guint32 test_value;
2040         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pcfich_power_offset, 2, ENC_BIG_ENDIAN, &test_value);
2041
2042         if (test_value > 10000)
2043         {
2044                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid power level [0..10000]");
2045         }
2046 }
2047 static void dissect_pb_value(ptvcursor_t * ptvc, packet_info* pinfo)
2048 {
2049         guint32 test_value;
2050         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pb, 2, ENC_BIG_ENDIAN, &test_value);
2051
2052         if (test_value > 3)
2053         {
2054                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink power allocation Index [0..3]");
2055         }
2056 }
2057
2058 static void dissect_dl_cyclic_prefix_value(ptvcursor_t * ptvc, packet_info* pinfo)
2059 {
2060         guint32 test_value;
2061         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_dl_cyclic_prefix_type, 2, ENC_BIG_ENDIAN, &test_value);
2062
2063         if (test_value > 1)
2064         {
2065                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dl cyclic prefix type [0..1]");
2066         }
2067 }
2068 static void dissect_ul_cyclic_prefix_value(ptvcursor_t * ptvc, packet_info* pinfo)
2069 {
2070         guint32 test_value;
2071         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_ul_cyclic_prefix_type, 2, ENC_BIG_ENDIAN, &test_value);
2072
2073         if (test_value > 1)
2074         {
2075                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul cyclic prefix type [0..1]");
2076         }
2077 }
2078 static void dissect_dl_channel_bandwidth_value(ptvcursor_t * ptvc, packet_info* pinfo)
2079 {
2080         guint32 test_value;
2081         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_channel_bandwidth, 2, ENC_BIG_ENDIAN, &test_value);
2082
2083         if (!(test_value == 6 || test_value == 15 || test_value == 25 || test_value == 50 || test_value == 75 || test_value == 100))
2084         {
2085                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink bandwidth value [6, 15, 25, 50, 75, 100]");
2086         }
2087 }
2088 static void dissect_ul_channel_bandwidth_value(ptvcursor_t * ptvc, packet_info* pinfo)
2089 {
2090         guint32 test_value;
2091         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_uplink_channel_bandwidth, 2, ENC_BIG_ENDIAN, &test_value);
2092
2093         if (!(test_value == 6 || test_value == 15 || test_value == 25 || test_value == 50 || test_value == 75 || test_value == 100))
2094         {
2095                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid uplink bandwidth value [6, 15, 25, 50, 75, 100]");
2096         }
2097 }
2098 static void dissect_reference_signal_power_value(ptvcursor_t * ptvc, packet_info* pinfo)
2099 {
2100         guint32 test_value;
2101         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_reference_signal_power, 2, ENC_BIG_ENDIAN, &test_value);
2102
2103         if (test_value > 255)
2104         {
2105                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid reference signal power [0..255]");
2106         }
2107
2108 }
2109 static void dissect_tx_antenna_ports_value(ptvcursor_t * ptvc, packet_info* pinfo)
2110 {
2111         guint32 test_value;
2112         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tx_antenna_ports, 2, ENC_BIG_ENDIAN, &test_value);
2113
2114         if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16))
2115         {
2116                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tx antenna ports value [1, 2, 4, 8, 16]");
2117         }
2118 }
2119 static void dissect_rx_antenna_ports_value(ptvcursor_t * ptvc, packet_info* pinfo)
2120 {
2121         guint32 test_value;
2122         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rx_antenna_ports, 2, ENC_BIG_ENDIAN, &test_value);
2123
2124         if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16))
2125         {
2126                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rx antenna ports value [1, 2, 4, 8, 16]");
2127         }
2128 }
2129 static void dissect_phich_resource_value(ptvcursor_t * ptvc, packet_info* pinfo)
2130 {
2131         guint32 test_value;
2132         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_phich_resource, 2, ENC_BIG_ENDIAN, &test_value);
2133
2134         if (test_value > 3)
2135         {
2136                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid phich resource value [0..3]");
2137         }
2138 }
2139 static void dissect_phich_duration_value(ptvcursor_t * ptvc, packet_info* pinfo)
2140 {
2141         guint32 test_value;
2142         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_phich_duration, 2, ENC_BIG_ENDIAN, &test_value);
2143
2144         if (test_value > 1)
2145         {
2146                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid phich duration value [0..1]");
2147         }
2148 }
2149 static void dissect_phich_power_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2150 {
2151         guint32 test_value;
2152         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_phich_power_offset, 2, ENC_BIG_ENDIAN, &test_value);
2153
2154         if (test_value > 10000)
2155         {
2156                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid phich power offset value [0..10000]");
2157         }
2158 }
2159 static void dissect_psch_synch_signal_epre_eprers_value(ptvcursor_t * ptvc, packet_info* pinfo)
2160 {
2161         guint32 test_value;
2162         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_primary_synchronization_signal_epre_eprers, 2, ENC_BIG_ENDIAN, &test_value);
2163
2164         if (test_value > 10000)
2165         {
2166                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid primary synchronization signal epre/eprers value [0..10000]");
2167         }
2168 }
2169 static void dissect_physical_cell_id_value(ptvcursor_t * ptvc, packet_info* pinfo)
2170 {
2171         guint32 test_value;
2172         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_physical_cell_id, 2, ENC_BIG_ENDIAN, &test_value);
2173
2174         if (test_value > 503)
2175         {
2176                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid physical cell id [0..503]");
2177         }
2178 }
2179 static void dissect_ssch_synch_signal_epre_eprers_value(ptvcursor_t * ptvc, packet_info* pinfo)
2180 {
2181         guint32 test_value;
2182         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_secondary_synchronization_signal_epre_eprers, 2, ENC_BIG_ENDIAN, &test_value);
2183
2184         if (test_value > 10000)
2185         {
2186                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid secondary synchronization signal epre/eprers value [0..10000]");
2187         }
2188 }
2189 static void dissect_prach_configuration_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
2190 {
2191         guint32 test_value;
2192         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_configuration_index, 2, ENC_BIG_ENDIAN, &test_value);
2193
2194         if (test_value > 63)
2195         {
2196                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach configuration Index [0..63]");
2197         }
2198 }
2199 static void dissect_prach_root_sequence_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
2200 {
2201         guint32 test_value;
2202         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_root_sequence_index, 2, ENC_BIG_ENDIAN, &test_value);
2203
2204         if (test_value > 837)
2205         {
2206                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach root sequency Index [0..837]");
2207         }
2208 }
2209 static void dissect_prach_zero_correlation_zone_configuration_value(ptvcursor_t * ptvc, packet_info* pinfo)
2210 {
2211         guint32 test_value;
2212         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_zero_correlation_zone_configuration, 2, ENC_BIG_ENDIAN, &test_value);
2213
2214         // How do differentiate between fdd 0..6 and tdd 0..15 ranges?
2215         if (test_value > 15)
2216         {
2217                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid zero correlation zone configuration [0..15]");
2218         }
2219 }
2220 static void dissect_prach_high_speed_flag_value(ptvcursor_t * ptvc, packet_info* pinfo)
2221 {
2222         guint32 test_value;
2223         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_high_speed_flag, 2, ENC_BIG_ENDIAN, &test_value);
2224
2225         if (test_value > 1)
2226         {
2227                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid high speed flag value [0..1]");
2228         }
2229 }
2230 static void dissect_prach_frequency_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2231 {
2232         guint32 test_value;
2233         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_offset, 2, ENC_BIG_ENDIAN, &test_value);
2234
2235         // How to determine the ul channel bandwidth?
2236         if (test_value > (100 -6))
2237         {
2238                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach frequency offset value [0..94]");
2239         }
2240 }
2241 static void dissect_pusch_hopping_mode_value(ptvcursor_t * ptvc, packet_info* pinfo)
2242 {
2243         guint32 test_value;
2244         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_hopping_mode, 2, ENC_BIG_ENDIAN, &test_value);
2245
2246         if (test_value > 1)
2247         {
2248                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pusch hopping mode value [0..1]");
2249         }
2250 }
2251 static void dissect_pusch_hopping_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2252 {
2253         guint32 test_value;
2254         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_hopping_offset, 2, ENC_BIG_ENDIAN, &test_value);
2255
2256         if (test_value > 98)
2257         {
2258                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pusch hopping offset value [0..98]");
2259         }
2260 }
2261 static void dissect_pusch_number_of_subbands_value(ptvcursor_t * ptvc, packet_info* pinfo)
2262 {
2263         guint32 test_value;
2264         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_subbands, 2, ENC_BIG_ENDIAN, &test_value);
2265
2266         if (!(test_value >= 1 && test_value <= 4))
2267         {
2268                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of sub-bands [1..4]");
2269         }
2270 }
2271 static void dissect_pucch_delta_pucch_shift_value(ptvcursor_t * ptvc, packet_info* pinfo)
2272 {
2273         guint32 test_value;
2274         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_pucch_shift, 2, ENC_BIG_ENDIAN, &test_value);
2275
2276         if (!(test_value >= 1 && test_value <= 3))
2277         {
2278                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta pucch shift [1..3]");
2279         }
2280 }
2281 static void dissect_pucch_n_cqi_rb_value(ptvcursor_t * ptvc, packet_info* pinfo)
2282 {
2283         guint32 test_value;
2284         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_cqi_rb, 2, ENC_BIG_ENDIAN, &test_value);
2285
2286         if (test_value > 98)
2287         {
2288                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n cqi rb value [0..98]");
2289         }
2290 }
2291 static void dissect_pucch_n_an_cs_value(ptvcursor_t * ptvc, packet_info* pinfo)
2292 {
2293         guint32 test_value;
2294         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_an_cs, 2, ENC_BIG_ENDIAN, &test_value);
2295
2296         if (test_value > 7)
2297         {
2298                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n an cs value [0..7]");
2299         }
2300 }
2301 static void dissect_pucch_n1_pucch_an_value(ptvcursor_t * ptvc, packet_info* pinfo)
2302 {
2303         guint32 test_value;
2304         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n1_pucch_an, 2, ENC_BIG_ENDIAN, &test_value);
2305
2306         if (test_value > 2047)
2307         {
2308                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n1pucch an value [0..2047]");
2309         }
2310 }
2311 static void dissect_srs_bandwidth_configuration_value(ptvcursor_t * ptvc, packet_info* pinfo)
2312 {
2313         guint32 test_value;
2314         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_bandwidth_configuration, 2, ENC_BIG_ENDIAN, &test_value);
2315
2316         if (test_value > 7)
2317         {
2318                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs bandwidth configuration value [0..7]");
2319         }
2320 }
2321 static void dissect_srs_max_uppts_value(ptvcursor_t * ptvc, packet_info* pinfo)
2322 {
2323         guint32 test_value;
2324         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_max_up_pts, 2, ENC_BIG_ENDIAN, &test_value);
2325
2326         if (test_value > 1)
2327         {
2328                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid max up pts value [0..1]");
2329         }
2330 }
2331 static void dissect_srs_subframe_configuration_value(ptvcursor_t * ptvc, packet_info* pinfo)
2332 {
2333         guint32 test_value;
2334         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_srs_subframe_configuration, 2, ENC_BIG_ENDIAN, &test_value);
2335
2336         if (test_value > 15)
2337         {
2338                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs subframe configuration value [0..15]");
2339         }
2340 }
2341 static void dissect_srs_acknack_srs_sim_tx_value(ptvcursor_t * ptvc, packet_info* pinfo)
2342 {
2343         guint32 test_value;
2344         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_acknack_srs_simultaneous_transmission, 2, ENC_BIG_ENDIAN, &test_value);
2345
2346         if (test_value > 1)
2347         {
2348                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs ack nack srs simultaneous transmission value [0..1]");
2349         }
2350 }
2351 static void dissect_uplink_rs_hopping_value(ptvcursor_t * ptvc, packet_info* pinfo)
2352 {
2353         guint32 test_value;
2354         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_uplink_rs_hopping, 2, ENC_BIG_ENDIAN, &test_value);
2355
2356         if (test_value > 2)
2357         {
2358                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid uplink rs hopping value [0..2]");
2359         }
2360 }
2361 static void dissect_group_assignment_value(ptvcursor_t * ptvc, packet_info* pinfo)
2362 {
2363         guint32 test_value;
2364         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_group_assignment, 2, ENC_BIG_ENDIAN, &test_value);
2365
2366         if (test_value > 29)
2367         {
2368                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid group assignment value [0..29]");
2369         }
2370 }
2371 static void dissect_cyclic_shift_1_for_drms_value(ptvcursor_t * ptvc, packet_info* pinfo)
2372 {
2373         guint32 test_value;
2374         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cyclic_shift_1_for_drms, 2, ENC_BIG_ENDIAN, &test_value);
2375
2376         if (test_value > 7)
2377         {
2378                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cyclic shift 1 for drms value [0..7]");
2379         }
2380 }
2381 static void dissect_tdd_subframe_assignement_value(ptvcursor_t * ptvc, packet_info* pinfo)
2382 {
2383         guint32 test_value;
2384         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_subframe_assignment, 2, ENC_BIG_ENDIAN, &test_value);
2385
2386         if (test_value > 6)
2387         {
2388                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tdd subframe assignment value [0..6]");
2389         }
2390 }
2391 static void dissect_tdd_subframe_patterns_value(ptvcursor_t * ptvc, packet_info* pinfo)
2392 {
2393         guint32 test_value;
2394         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_special_subframe_patterns, 2, ENC_BIG_ENDIAN, &test_value);
2395
2396         if (test_value > 9)
2397         {
2398                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid special subframe pattern value [0..9]");
2399         }
2400 }
2401 static void dissect_laa_ed_threashold_for_lbt_for_pdsch_value(ptvcursor_t * ptvc, packet_info* pinfo)
2402 {
2403         guint32 test_value;
2404         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ed_threshold_for_lbt_for_pdsch, 2, ENC_BIG_ENDIAN, &test_value);
2405
2406         if (test_value > 70)
2407         {
2408                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ed threshold for ltb for pdsch value [0..70]");
2409         }
2410 }
2411 static void dissect_laa_ed_threashold_for_lbt_for_drs_value(ptvcursor_t * ptvc, packet_info* pinfo)
2412 {
2413         guint32 test_value;
2414         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ed_threshold_for_lbt_for_drs, 2, ENC_BIG_ENDIAN, &test_value);
2415
2416         if (test_value > 70)
2417         {
2418                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ed threshold for ltb for drs value [0..70]");
2419         }
2420 }
2421 static void dissect_laa_pd_threshold_value(ptvcursor_t * ptvc, packet_info* pinfo)
2422 {
2423         guint32 test_value;
2424         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pd_threshold, 2, ENC_BIG_ENDIAN, &test_value);
2425
2426         if (test_value > 70 && test_value != 65535)
2427         {
2428                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pd threshold value [0..70, 65536]");
2429         }
2430 }
2431 static void dissect_laa_multi_carrier_type_value(ptvcursor_t * ptvc, packet_info* pinfo)
2432 {
2433         guint32 test_value;
2434         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_multi_carrier_type, 2, ENC_BIG_ENDIAN, &test_value);
2435
2436         if (test_value > 4)
2437         {
2438                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mutli carrier type [0..4]");
2439         }
2440 }
2441 static void dissect_laa_multi_carrier_tx_value(ptvcursor_t * ptvc, packet_info* pinfo)
2442 {
2443         guint32 test_value;
2444         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_multi_carrier_tx, 2, ENC_BIG_ENDIAN, &test_value);
2445
2446         if (test_value > 1)
2447         {
2448                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mutli carrier tx value [0..1]");
2449         }
2450 }
2451 static void dissect_laa_multi_carrier_freeze_value(ptvcursor_t * ptvc, packet_info* pinfo)
2452 {
2453         guint32 test_value;
2454         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_multi_carrier_freeze, 2, ENC_BIG_ENDIAN, &test_value);
2455
2456         if (test_value > 1)
2457         {
2458                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mutli carrier freeze value [0..1]");
2459         }
2460 }
2461 static void dissect_laa_tx_antenna_port_for_drs_value(ptvcursor_t * ptvc, packet_info* pinfo)
2462 {
2463         guint32 test_value;
2464         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tx_antenna_ports_for_drs, 2, ENC_BIG_ENDIAN, &test_value);
2465
2466         if (!(test_value == 1 || test_value == 2 || test_value == 4))
2467         {
2468                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tx antenna ports for drs value [1, 2, 4]");
2469         }
2470 }
2471 static void dissect_laa_transmission_power_for_drs_value(ptvcursor_t * ptvc, packet_info* pinfo)
2472 {
2473         guint32 test_value;
2474         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power_for_drs, 2, ENC_BIG_ENDIAN, &test_value);
2475
2476         if (test_value > 10000)
2477         {
2478                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power for drs [0..10000]");
2479         }
2480 }
2481 static void dissect_emtc_pbch_repeitions_enabled_r13_value(ptvcursor_t * ptvc, packet_info* pinfo)
2482 {
2483         guint32 test_value;
2484         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_pbch_repetitions_enabled_r13, 2, ENC_BIG_ENDIAN, &test_value);
2485
2486         if (test_value > 1)
2487         {
2488                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pbch repetitions enabled r13 value [0..1]");
2489         }
2490 }
2491 static void dissect_emtc_prach_cat_m_root_sequence_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
2492 {
2493         guint32 test_value;
2494         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_cat_m_root_sequence_index, 2, ENC_BIG_ENDIAN, &test_value);
2495
2496         if (test_value > 837)
2497         {
2498                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach cat-m root sequence Index value [0..837]");
2499         }
2500 }
2501 static void dissect_emtc_prach_cat_m_zero_correlation_zone_configuration_value(ptvcursor_t * ptvc, packet_info* pinfo)
2502 {
2503         guint32 test_value;
2504         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_cat_m_zero_correlation_zone_configuration, 2, ENC_BIG_ENDIAN, &test_value);
2505
2506         if (test_value > 15)
2507         {
2508                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach cat-m zero correlation zone configuration value [0..15]");
2509         }
2510 }
2511 static void dissect_emtc_prach_cat_m_high_speed_flag_value(ptvcursor_t * ptvc, packet_info* pinfo)
2512 {
2513         guint32 test_value;
2514         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_cat_m_high_speed_flag, 2, ENC_BIG_ENDIAN, &test_value);
2515
2516         if (test_value > 1)
2517         {
2518                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach cat-m high speed flag value [0..1]");
2519         }
2520 }
2521 static void dissect_emtc_prach_ce_level_0_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2522 {
2523         guint32 test_value;
2524         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_0_enable, 2, ENC_BIG_ENDIAN, &test_value);
2525
2526         if (test_value > 1)
2527         {
2528                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #0 enable value [0..1]");
2529         }
2530 }
2531 static void dissect_emtc_prach_ce_level_0_configuration_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2532 {
2533         guint32 test_value;
2534         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_0_configuration_index, 2, ENC_BIG_ENDIAN, &test_value);
2535
2536         if (test_value > 63)
2537         {
2538                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #0 configuration Index value [0..63]");
2539         }
2540 }
2541 static void dissect_emtc_prach_ce_level_0_frequency_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2542 {
2543         guint32 test_value;
2544         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_0_frequency_offset, 2, ENC_BIG_ENDIAN, &test_value);
2545
2546         if (test_value > (100 - 6))
2547         {
2548                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #0 frequency offset value [0..94]");
2549         }
2550 }
2551 static void dissect_emtc_preach_ce_level_0_num_of_repeitions_per_attempt_value(ptvcursor_t * ptvc, packet_info* pinfo)
2552 {
2553         guint32 test_value;
2554         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);
2555
2556         if (!( test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2557                    test_value == 64 || test_value == 128))
2558         {
2559                 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]");
2560         }
2561 }
2562 static void dissect_emtc_ce_level_0_starting_subframe_periodicity_value(ptvcursor_t * ptvc, packet_info* pinfo)
2563 {
2564         guint32 test_value;
2565         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_0_starting_subframe_periodicity, 2, ENC_BIG_ENDIAN, &test_value);
2566
2567         if (!(test_value == 0xFFF || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2568                   test_value == 64 || test_value == 128 || test_value == 256))
2569         {
2570                 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]");
2571         }
2572 }
2573 static void dissect_emtc_preach_ce_level_0_hopping_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2574 {
2575         guint32 test_value;
2576         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_0_hopping_enabled, 2, ENC_BIG_ENDIAN, &test_value);
2577
2578         if (test_value > 1)
2579         {
2580                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #0 hopping enabled value [0..1]");
2581         }
2582 }
2583 static void dissect_emtc_preach_ce_level_0_hopping_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2584 {
2585         guint32 test_value;
2586         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_0_hopping_offset, 2, ENC_BIG_ENDIAN, &test_value);
2587
2588         if (test_value > 94)
2589         {
2590                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #0 hopping offset value [0..94]");
2591         }
2592 }
2593 static void dissect_emtc_prach_ce_level_1_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2594 {
2595         guint32 test_value;
2596         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_1_enable, 2, ENC_BIG_ENDIAN, &test_value);
2597
2598         if (test_value > 1)
2599         {
2600                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #1 enable value [0..1]");
2601         }
2602 }
2603 static void dissect_emtc_prach_ce_level_1_configuration_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2604 {
2605         guint32 test_value;
2606         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_1_configuration_index, 2, ENC_BIG_ENDIAN, &test_value);
2607
2608         if (test_value > 63)
2609         {
2610                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #1 configuration Index value [0..63]");
2611         }
2612 }
2613 static void dissect_emtc_prach_ce_level_1_frequency_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2614 {
2615         guint32 test_value;
2616         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_1_frequency_offset, 2, ENC_BIG_ENDIAN, &test_value);
2617
2618         if (test_value > (100 - 6))
2619         {
2620                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #1 frequency offset value [0..94]");
2621         }
2622 }
2623 static void dissect_emtc_preach_ce_level_1_num_of_repeitions_per_attempt_value(ptvcursor_t * ptvc, packet_info* pinfo)
2624 {
2625         guint32 test_value;
2626         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);
2627
2628         if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2629                 test_value == 64 || test_value == 128))
2630         {
2631                 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]");
2632         }
2633 }
2634 static void dissect_emtc_ce_level_1_starting_subframe_periodicity_value(ptvcursor_t * ptvc, packet_info* pinfo)
2635 {
2636         guint32 test_value;
2637         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_1_starting_subframe_periodicity, 2, ENC_BIG_ENDIAN, &test_value);
2638
2639         if (!(test_value == 0xFFF || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2640                 test_value == 64 || test_value == 128 || test_value == 256))
2641         {
2642                 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]");
2643         }
2644 }
2645 static void dissect_emtc_preach_ce_level_1_hopping_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2646 {
2647         guint32 test_value;
2648         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_1_hopping_enabled, 2, ENC_BIG_ENDIAN, &test_value);
2649
2650         if (test_value > 1)
2651         {
2652                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #1 hopping enabled value [0..1]");
2653         }
2654 }
2655 static void dissect_emtc_preach_ce_level_1_hopping_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2656 {
2657         guint32 test_value;
2658         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_1_hopping_offset, 2, ENC_BIG_ENDIAN, &test_value);
2659
2660         if (test_value > 94)
2661         {
2662                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #1 hopping offset value [0..94]");
2663         }
2664 }
2665 static void dissect_emtc_prach_ce_level_2_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2666 {
2667         guint32 test_value;
2668         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_2_enable, 2, ENC_BIG_ENDIAN, &test_value);
2669
2670         if (test_value > 1)
2671         {
2672                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 enable value [0..1]");
2673         }
2674 }
2675 static void dissect_emtc_prach_ce_level_2_configuration_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2676 {
2677         guint32 test_value;
2678         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_2_configuration_index, 2, ENC_BIG_ENDIAN, &test_value);
2679
2680         if (test_value > 63)
2681         {
2682                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 configuration Index value [0..63]");
2683         }
2684 }
2685 static void dissect_emtc_prach_ce_level_2_frequency_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2686 {
2687         guint32 test_value;
2688         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_2_frequency_offset, 2, ENC_BIG_ENDIAN, &test_value);
2689
2690         if (test_value > (100 - 6))
2691         {
2692                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 frequency offset value [0..94]");
2693         }
2694 }
2695 static void dissect_emtc_preach_ce_level_2_num_of_repeitions_per_attempt_value(ptvcursor_t * ptvc, packet_info* pinfo)
2696 {
2697         guint32 test_value;
2698         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);
2699
2700         if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2701                 test_value == 64 || test_value == 128))
2702         {
2703                 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]");
2704         }
2705 }
2706 static void dissect_emtc_ce_level_2_starting_subframe_periodicity_value(ptvcursor_t * ptvc, packet_info* pinfo)
2707 {
2708         guint32 test_value;
2709         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_2_starting_subframe_periodicity, 2, ENC_BIG_ENDIAN, &test_value);
2710
2711         if (!(test_value == 0xFFF || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2712                 test_value == 64 || test_value == 128 || test_value == 256))
2713         {
2714                 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]");
2715         }
2716 }
2717 static void dissect_emtc_preach_ce_level_2_hopping_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2718 {
2719         guint32 test_value;
2720         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_2_hopping_enabled, 2, ENC_BIG_ENDIAN, &test_value);
2721
2722         if (test_value > 1)
2723         {
2724                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 hopping enabled value [0..1]");
2725         }
2726 }
2727 static void dissect_emtc_preach_ce_level_2_hopping_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2728 {
2729         guint32 test_value;
2730         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_2_hopping_offset, 2, ENC_BIG_ENDIAN, &test_value);
2731
2732         if (test_value > 94)
2733         {
2734                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 hopping offset value [0..94]");
2735         }
2736 }
2737 static void dissect_emtc_prach_ce_level_3_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2738 {
2739         guint32 test_value;
2740         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_3_enable, 2, ENC_BIG_ENDIAN, &test_value);
2741
2742         if (test_value > 1)
2743         {
2744                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #3 enable value [0..1]");
2745         }
2746 }
2747 static void dissect_emtc_prach_ce_level_3_configuration_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2748 {
2749         guint32 test_value;
2750         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_3_configuration_index, 2, ENC_BIG_ENDIAN, &test_value);
2751
2752         if (test_value > 63)
2753         {
2754                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 configuration Index value [0..63]");
2755         }
2756 }
2757 static void dissect_emtc_prach_ce_level_3_frequency_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2758 {
2759         guint32 test_value;
2760         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_3_frequency_offset, 2, ENC_BIG_ENDIAN, &test_value);
2761
2762         if (test_value > (100 - 6))
2763         {
2764                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #3 frequency offset value [0..94]");
2765         }
2766 }
2767 static void dissect_emtc_preach_ce_level_3_num_of_repeitions_per_attempt_value(ptvcursor_t * ptvc, packet_info* pinfo)
2768 {
2769         guint32 test_value;
2770         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);
2771
2772         if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2773                 test_value == 64 || test_value == 128))
2774         {
2775                 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]");
2776         }
2777 }
2778 static void dissect_emtc_ce_level_3_starting_subframe_periodicity_value(ptvcursor_t * ptvc, packet_info* pinfo)
2779 {
2780         guint32 test_value;
2781         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_3_starting_subframe_periodicity, 2, ENC_BIG_ENDIAN, &test_value);
2782
2783         if (!(test_value == 0xFFF || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2784                 test_value == 64 || test_value == 128 || test_value == 256))
2785         {
2786                 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]");
2787         }
2788 }
2789 static void dissect_emtc_preach_ce_level_3_hopping_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2790 {
2791         guint32 test_value;
2792         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_3_hopping_enabled, 2, ENC_BIG_ENDIAN, &test_value);
2793
2794         if (test_value > 1)
2795         {
2796                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #3 hopping enabled value [0..1]");
2797         }
2798 }
2799 static void dissect_emtc_preach_ce_level_3_hopping_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2800 {
2801         guint32 test_value;
2802         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_3_hopping_offset, 2, ENC_BIG_ENDIAN, &test_value);
2803
2804         if (test_value > 94)
2805         {
2806                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #3 hopping offset value [0..94]");
2807         }
2808 }
2809 static void dissect_emtc_pucch_interval_ul_hopping_config_common_mode_a_value(ptvcursor_t * ptvc, packet_info* pinfo)
2810 {
2811         guint32 test_value;
2812         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_internal_ul_hopping_config_common_mode_a, 2, ENC_BIG_ENDIAN, &test_value);
2813
2814         if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 5 || test_value == 10 || test_value == 20))
2815         {
2816                 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]");
2817         }
2818 }
2819 static void dissect_emtc_pucch_interval_ul_hopping_config_common_mode_b_value(ptvcursor_t * ptvc, packet_info* pinfo)
2820 {
2821         guint32 test_value;
2822         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_internal_ul_hopping_config_common_mode_b, 2, ENC_BIG_ENDIAN, &test_value);
2823
2824         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))
2825         {
2826                 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]");
2827         }
2828 }
2829 static void dissect_dl_bandwidth_support_value(ptvcursor_t * ptvc, packet_info* pinfo)
2830 {
2831         guint64 test_value64;
2832         proto_item* item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
2833                                         hf_nfapi_dl_bandwidth_support, ett_nfapi_downlink_bandwidth_support, dl_bandwidth_support_fields, ENC_BIG_ENDIAN, &test_value64);
2834         if (test_value64 > 0x3F)
2835         {
2836                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink bandwidth supported bits [0..0x3F]");
2837         }
2838
2839         ptvcursor_advance(ptvc, 2);
2840 }
2841 static void dissect_ul_bandwidth_support_value(ptvcursor_t * ptvc, packet_info* pinfo)
2842 {
2843         guint64 test_value64;
2844         proto_item* item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
2845                                         hf_nfapi_ul_bandwidth_support, ett_nfapi_uplink_bandwidth_support, ul_bandwidth_support_fields, ENC_BIG_ENDIAN, &test_value64);
2846         if (test_value64 > 0x3F)
2847         {
2848                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid uplink bandwidth supported bits [0..0x3F]");
2849         }
2850
2851         ptvcursor_advance(ptvc, 2);
2852
2853 }
2854 static void dissect_dl_modulation_value(ptvcursor_t * ptvc, packet_info* pinfo)
2855 {
2856         static const int * dl_modulation_support_fields[] = {
2857                 &hf_nfapi_dl_modulation_support_qpsk,
2858                 &hf_nfapi_dl_modulation_support_16qam,
2859                 &hf_nfapi_dl_modulation_support_64qam,
2860                 &hf_nfapi_dl_modulation_support_256qam,
2861                 NULL
2862         };
2863
2864         guint64 test_value64;
2865         proto_item* item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
2866                                         hf_nfapi_dl_modulation_support, ett_nfapi_downlink_modulation_support, dl_modulation_support_fields, ENC_BIG_ENDIAN, &test_value64);
2867
2868         if (test_value64 > 0xF)
2869         {
2870                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink modulation support bit [0..0xF]");
2871         }
2872
2873         ptvcursor_advance(ptvc, 2);
2874 }
2875 static void dissect_ul_modulation_value(ptvcursor_t * ptvc, packet_info* pinfo)
2876 {
2877         static const int * ul_modulation_support_fields[] = {
2878                 &hf_nfapi_ul_modulation_support_qpsk,
2879                 &hf_nfapi_ul_modulation_support_16qam,
2880                 &hf_nfapi_ul_modulation_support_64qam,
2881                 NULL
2882         };
2883
2884         guint64 test_value64;
2885         proto_item* item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
2886                                         hf_nfapi_ul_modulation_support, ett_nfapi_uplink_modulation_support, ul_modulation_support_fields, ENC_BIG_ENDIAN, &test_value64);
2887
2888         if (test_value64 > 0x7)
2889         {
2890                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid uplink modulation support bit [0..0x7]");
2891         }
2892
2893         ptvcursor_advance(ptvc, 2);
2894 }
2895 static void dissect_phy_antenna_capability_value(ptvcursor_t * ptvc, packet_info* pinfo)
2896 {
2897         guint32 test_value;
2898         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_phy_antenna_capability, 2, ENC_BIG_ENDIAN, &test_value);
2899
2900         if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16))
2901         {
2902                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid phy antenna capability [1, 2, 4, 8, 16]");
2903         }
2904 }
2905 static void dissect_release_capability_value(ptvcursor_t * ptvc, packet_info* pinfo)
2906 {
2907         guint64 test_value64;
2908         proto_item* item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
2909                                                                                         hf_nfapi_release_capability, ett_nfapi_release_support, maximum_3gpp_release_supported_fields, ENC_BIG_ENDIAN, &test_value64);
2910         if (test_value64 > 0x3F)
2911         {
2912                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid release capability value [0..0x3F]");
2913         }
2914
2915         ptvcursor_advance(ptvc, 2);
2916 }
2917 static void dissect_mbsfn_value(ptvcursor_t * ptvc, packet_info* pinfo)
2918 {
2919         guint32 test_value;
2920         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_mbsfn_capability, 2, ENC_BIG_ENDIAN, &test_value);
2921
2922         if (test_value > 1)
2923         {
2924                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mbsfn capability bit [0..0x1]");
2925         }
2926 }
2927 static void dissect_laa_support_value(ptvcursor_t * ptvc, packet_info* pinfo)
2928 {
2929         guint32 test_value;
2930         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_laa_capability, 2, ENC_BIG_ENDIAN, &test_value);
2931
2932         if (test_value > 1)
2933         {
2934                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid laa support bit [0..0x1]");
2935         }
2936 }
2937 static void dissect_laa_pd_sensing_lbt_support_value(ptvcursor_t * ptvc, packet_info* pinfo)
2938 {
2939         guint32 test_value;
2940         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_pd_sensing_lbt_support, 2, ENC_BIG_ENDIAN, &test_value);
2941
2942         if (test_value > 1)
2943         {
2944                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pd sensing lbt support bit [0..0x1]");
2945         }
2946 }
2947 static void dissect_laa_multi_carrier_lbt_support_value(ptvcursor_t * ptvc, packet_info* pinfo)
2948 {
2949         guint32 test_value;
2950         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_multi_carrier_lbt_support, 2, ENC_BIG_ENDIAN, &test_value);
2951
2952         if (test_value > 0xF)
2953         {
2954                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid multi carrier LBT support bit [0..0xF]");
2955         }
2956 }
2957 static void dissect_laa_partial_sf_support_value(ptvcursor_t * ptvc, packet_info* pinfo)
2958 {
2959         guint32 test_value;
2960         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_partial_sf_support, 2, ENC_BIG_ENDIAN, &test_value);
2961
2962         if (test_value > 0x1)
2963         {
2964                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid partial SF support bit [0..0x1]");
2965         }
2966 }
2967 static void dissect_data_report_mode_value(ptvcursor_t * ptvc, packet_info* pinfo)
2968 {
2969         gboolean test_value;
2970         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_data_report_mode, 2, ENC_BIG_ENDIAN, &test_value);
2971
2972         if (test_value > 1)
2973         {
2974                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid data report mode value [0..1]");
2975         }
2976 }
2977 static void dissect_sfn_sf_value(ptvcursor_t * ptvc, packet_info* pinfo)
2978 {
2979         guint32 test_value;
2980         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_sfnsf, 2, ENC_BIG_ENDIAN, &test_value);
2981
2982         guint32 sfn = test_value >> 0x4;
2983         guint32 sf = test_value & 0x000F;
2984         if (sfn > 1023 || sf > 9)
2985         {
2986                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid sfn/sf value sfn:%d [0..1023] sf:%d [0..9]", sfn, sf);
2987         }
2988 }
2989 static void dissect_phy_state_value(ptvcursor_t * ptvc, packet_info* pinfo)
2990 {
2991         guint32 test_value;
2992         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_phy_state, 2, ENC_BIG_ENDIAN, &test_value);
2993
2994         if (test_value > 2)
2995         {
2996                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid phy state [0..2]");
2997         }
2998 }
2999 static void dissect_p7_vnf_address_ipv4_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3000 {
3001         ptvcursor_add(ptvc, hf_nfapi_vnf_address_ipv4, 4, ENC_NA);
3002 }
3003 static void dissect_p7_vnf_address_ipv6_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3004 {
3005         ptvcursor_add(ptvc, hf_nfapi_vnf_address_ipv6, 16, ENC_NA);
3006 }
3007 static void dissect_p7_vnf_port_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3008 {
3009         ptvcursor_add(ptvc, hf_nfapi_vnf_port, 2, ENC_BIG_ENDIAN);
3010 }
3011 static void dissect_p7_pnf_address_ipv4_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3012 {
3013         ptvcursor_add(ptvc, hf_nfapi_pnf_address_ipv4, 4, ENC_NA);
3014 }
3015 static void dissect_p7_pnf_address_ipv6_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3016 {
3017         ptvcursor_add(ptvc, hf_nfapi_pnf_address_ipv6, 16, ENC_NA);
3018 }
3019 static void dissect_p7_pnf_port_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3020 {
3021         ptvcursor_add(ptvc, hf_nfapi_pnf_port, 2, ENC_BIG_ENDIAN);
3022 }
3023 static void dissect_downlink_ues_per_subframe_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3024 {
3025         ptvcursor_add(ptvc, hf_nfapi_dl_ue_per_sf, 1, ENC_BIG_ENDIAN);
3026 }
3027 static void dissect_uplink_ues_per_subframe_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3028 {
3029         ptvcursor_add(ptvc, hf_nfapi_ul_ue_per_sf, 1, ENC_BIG_ENDIAN);
3030 }
3031 static void dissect_rf_band_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3032 {
3033         ptvcursor_add(ptvc, hf_nfapi_band, 2, ENC_BIG_ENDIAN);
3034 }
3035 static void dissect_rf_bands_value(ptvcursor_t * ptvc, packet_info* pinfo)
3036 {
3037         guint32 count;
3038         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rf_bands, 2, ENC_BIG_ENDIAN, &count);
3039         dissect_array_value(ptvc, pinfo, "RF Band List", ett_nfapi_rf_bands, count, dissect_rf_band_value);
3040 }
3041 static void dissect_timing_window_value(ptvcursor_t * ptvc, packet_info* pinfo)
3042 {
3043         guint32 test_value;
3044         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_window, 1, ENC_BIG_ENDIAN, &test_value);
3045
3046         if (test_value > 30)
3047         {
3048                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing window value [0..30]");
3049         }
3050 }
3051 static void dissect_timing_info_mode_value(ptvcursor_t * ptvc, packet_info* pinfo)
3052 {
3053         guint32 test_value;
3054         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_info_mode, 1, ENC_BIG_ENDIAN, &test_value);
3055
3056         if (test_value > 0x3)
3057         {
3058                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing info mode [0..0x3]");
3059         }
3060 }
3061 static void dissect_timing_info_period_value(ptvcursor_t * ptvc, packet_info* pinfo)
3062 {
3063         guint32 test_value;
3064         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_info_period, 1, ENC_BIG_ENDIAN, &test_value);
3065
3066         if (!(test_value >= 1 && test_value <= 255))
3067         {
3068                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing info period [1..255]");
3069         }
3070 }
3071 static void dissect_maximum_transmit_power_value(ptvcursor_t * ptvc, packet_info* pinfo)
3072 {
3073         guint32 test_value;
3074         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_maximum_transmit_power_2, 2, ENC_BIG_ENDIAN, &test_value);
3075
3076         if (test_value > 700)
3077         {
3078                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid maxiumum transmit power [0..700]");
3079         }
3080 }
3081 static void dissect_earfcn_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3082 {
3083         ptvcursor_add(ptvc, hf_nfapi_earfcn, 2, ENC_BIG_ENDIAN);
3084 }
3085 static void dissect_nmm_gsm_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 }
3091 static void dissect_nmm_umts_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 }
3097 static void dissect_nmm_lte_frequency_bands_value(ptvcursor_t * ptvc, packet_info* pinfo)
3098 {
3099         guint32 count;
3100         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rf_bands, 2, ENC_BIG_ENDIAN, &count);
3101         dissect_array_value(ptvc, pinfo, "RF Band List", ett_nfapi_rf_bands, count, dissect_rf_band_value);
3102 }
3103 static void dissect_nmm_uplink_rssi_supported_value(ptvcursor_t * ptvc, packet_info* pinfo)
3104 {
3105         guint32 test_value;
3106         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nmm_uplink_rssi_supported, 1, ENC_BIG_ENDIAN, &test_value);
3107
3108         if (test_value > 1)
3109         {
3110                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nmm uplink rssi supported value [0..1]");
3111         }
3112 }
3113 static void dissect_dl_config_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
3114 {
3115         guint32 size;
3116         ptvcursor_add(ptvc, hf_nfapi_dl_config_pdu_type, 1, ENC_BIG_ENDIAN);
3117         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_size, 1, ENC_BIG_ENDIAN, &size);
3118
3119         guint pdu_end = (ptvcursor_current_offset(ptvc) + size - 2);
3120         dissect_tlv_list(ptvc, pinfo, pdu_end);
3121 }
3122 static void dissect_dl_config_request_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
3123 {
3124         proto_item* item;
3125         guint32 test_value, number_of_dcis_value, number_of_pdus_value;
3126
3127         // Number of PDCCH OFDM symbols
3128         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdcch_ofdm_symbols, 1, ENC_BIG_ENDIAN, &test_value);
3129         if (test_value > 4)
3130         {
3131                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pdcch ofdm symbols value [0..4]");
3132         }
3133
3134         // Number of DCIs
3135         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_dci, 1, ENC_BIG_ENDIAN, &number_of_dcis_value);
3136
3137         // Number of PDUs
3138         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 2, ENC_BIG_ENDIAN, &number_of_pdus_value);
3139         if (number_of_pdus_value > 514)
3140         {
3141                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pdus value [0..514]");
3142         }
3143
3144         // Number of PDSCH RNTIs
3145         ptvcursor_add(ptvc, hf_nfapi_number_pdsch_rnti, 1, ENC_BIG_ENDIAN);
3146
3147         // Transmission power for PCFICH
3148         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power_pcfich, 2, ENC_BIG_ENDIAN, &test_value);
3149         if (test_value > 10000)
3150         {
3151                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power for pcfich value [0..10000]");
3152         }
3153
3154         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);
3155 }
3156 static void dissect_dl_config_request_bch_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
3157 {
3158         proto_item* item;
3159         guint32 test_value;
3160
3161         // Length
3162         ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
3163
3164         // PDU index
3165         ptvcursor_add(ptvc, hf_nfapi_pdu_index, 2, ENC_BIG_ENDIAN);
3166
3167         // Transmission power
3168         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
3169         if (test_value > 10000)
3170         {
3171                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
3172         }
3173
3174 }
3175 static void dissect_dl_config_request_dl_dci_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
3176 {
3177         proto_item* item;
3178         guint32 test_value;
3179
3180         // DCI format
3181         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_dci_format, 1, ENC_BIG_ENDIAN, &test_value);
3182         if (test_value > 9)
3183         {
3184                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci format value [0..9]");
3185         }
3186
3187         // CCE index
3188         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cce_idx, 1, ENC_BIG_ENDIAN, &test_value);
3189         if (test_value > 88)
3190         {
3191                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cce Index value [0..88]");
3192         }
3193
3194         // Aggregation level
3195         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_aggregation_level, 1, ENC_BIG_ENDIAN, &test_value);
3196         if (!(test_value == 1 || test_value == 2 || test_value == 4 ||
3197                   test_value == 8 || test_value == 16 || test_value == 32))
3198         {
3199                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid aggregation level value [1, 2, 4, 8, 16, 32]");
3200         }
3201
3202         // RNTI
3203         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
3204         if (test_value < 1)
3205         {
3206                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
3207         }
3208
3209         // Resource allocation type
3210         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN, &test_value);
3211         if (test_value > 1)
3212         {
3213                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocation type value [0..1]");
3214         }
3215
3216         // Virtual resource block assignment flag
3217         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_virtual_resource_block_assignment_flag, 1, ENC_BIG_ENDIAN, &test_value);
3218         if (test_value > 1)
3219         {
3220                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid virtual resource block assignment flag value [0..1]");
3221         }
3222
3223         // Resource block coding
3224         ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
3225
3226         // MCS_1
3227         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs_1, 1, ENC_BIG_ENDIAN, &test_value);
3228         if (test_value > 31)
3229         {
3230                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs 1 value [0..31]");
3231         }
3232
3233         // Redundancy version_1
3234         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version_1, 1, ENC_BIG_ENDIAN, &test_value);
3235         if (test_value > 3)
3236         {
3237                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy version 1 value [0..3]");
3238         }
3239
3240         // New data indicator_1
3241         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indicator_1, 1, ENC_BIG_ENDIAN, &test_value);
3242         if (test_value > 3)
3243         {
3244                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indicator 1 value [0..1]");
3245         }
3246
3247         // Transport block to codeword swap flag
3248         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transport_block_to_codeword_swap_flag, 1, ENC_BIG_ENDIAN, &test_value);
3249         if (test_value > 3)
3250         {
3251                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport block to codeword swap flag value [0..1]");
3252         }
3253
3254         // MCS_2
3255         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs_2, 1, ENC_BIG_ENDIAN, &test_value);
3256         if (test_value > 31)
3257         {
3258                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs 2 value [0..31]");
3259         }
3260
3261         // Redundancy version_2
3262         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version_2, 1, ENC_BIG_ENDIAN, &test_value);
3263         if (test_value > 3)
3264         {
3265                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy version 2 value [0..3]");
3266         }
3267
3268         // New Data indicator_2
3269         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indicator_2, 1, ENC_BIG_ENDIAN, &test_value);
3270         if (test_value > 3)
3271         {
3272                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indicator 2 value [0..1]");
3273         }
3274
3275         // HARQ process
3276         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_process, 1, ENC_BIG_ENDIAN, &test_value);
3277         if (test_value > 3)
3278         {
3279                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq process value [0..15]");
3280         }
3281
3282         // TPMI
3283         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpmi, 1, ENC_BIG_ENDIAN, &test_value);
3284         if (test_value > 3)
3285         {
3286                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi value [0..3]");
3287         }
3288
3289         // PMI
3290         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pmi, 1, ENC_BIG_ENDIAN, &test_value);
3291         if (test_value > 2)
3292         {
3293                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi value [0..2]");
3294         }
3295
3296         // Precoding information
3297         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_precoding_information, 1, ENC_BIG_ENDIAN, &test_value);
3298         if (test_value > 2)
3299         {
3300                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid precoding information value [0..15]");
3301         }
3302
3303         // TPC
3304         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpc, 1, ENC_BIG_ENDIAN, &test_value);
3305         if (test_value > 3)
3306         {
3307                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpc value [0..3]");
3308         }
3309
3310         // Downlink assignment index
3311         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_assignment_index, 1, ENC_BIG_ENDIAN, &test_value);
3312         if (test_value > 15)
3313         {
3314                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink assignment value [0..15]");
3315         }
3316
3317         // NGAP
3318         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ngap, 1, ENC_BIG_ENDIAN, &test_value);
3319         if (test_value > 1)
3320         {
3321                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ngap value [0..1]");
3322         }
3323
3324         // Transport block size index
3325         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transport_block_size_index, 1, ENC_BIG_ENDIAN, &test_value);
3326         if (test_value > 31)
3327         {
3328                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport block size Index value [0..31]");
3329         }
3330
3331         // Downlink power offset
3332         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_power_offset, 1, ENC_BIG_ENDIAN, &test_value);
3333         if (test_value > 1)
3334         {
3335                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink power offset value [0..1]");
3336         }
3337
3338         // Allocate PRACH flag
3339         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_allocate_prach_flag, 1, ENC_BIG_ENDIAN, &test_value);
3340         if (test_value > 1)
3341         {
3342                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid allocate prach flag value [0..1]");
3343         }
3344
3345         // Preamble index
3346         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_preamble_index, 1, ENC_BIG_ENDIAN, &test_value);
3347         if (test_value > 63)
3348         {
3349                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid preamble Index value [0..63]");
3350         }
3351
3352         // PRACH mask index
3353         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_mask_index, 1, ENC_BIG_ENDIAN, &test_value);
3354         if (test_value > 15)
3355         {
3356                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach mask Index value [0..15]");
3357         }
3358
3359         // RNTI type
3360         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti_type, 1, ENC_BIG_ENDIAN, &test_value);
3361         if (!(test_value >= 1 && test_value <= 3))
3362         {
3363                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti type value [1..3]");
3364         }
3365
3366         // Transmission power
3367         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
3368         if (test_value > 10000)
3369         {
3370                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value value [0..10000]");
3371         }
3372
3373 }
3374 static void dissect_dl_config_request_dl_dci_pdu_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
3375 {
3376         proto_item* item;
3377         guint32 test_value;
3378         gboolean test_boolean;
3379
3380         // MCCH flag
3381         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_mcch_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
3382         if (test_boolean > 1)
3383         {
3384                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcch flag value [0..1]");
3385         }
3386
3387         // MCCH change notification
3388         ptvcursor_add(ptvc, hf_nfapi_mcch_change_notification, 1, ENC_BIG_ENDIAN);
3389
3390         // Scrambling identity
3391         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_scrambling_identity, 1, ENC_BIG_ENDIAN, &test_value);
3392         if (test_value > 1)
3393         {
3394                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid scrambling identity value [0..1]");
3395         }
3396
3397 }
3398 static void dissect_dl_config_request_dl_dci_pdu_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
3399 {
3400         proto_item* item;
3401         guint32 test_value;
3402         gboolean test_boolean;
3403
3404         // Cross carrier scheduling flag
3405         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_cross_carrier_scheduling_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
3406         if (test_boolean > 1)
3407         {
3408                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cross carrier scheduling flag value [0..1]");
3409         }
3410
3411         // Carrier indicator
3412         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_carrier_indicator, 1, ENC_BIG_ENDIAN, &test_value);
3413         if (test_value > 7)
3414         {
3415                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid carrier indicator value [0..7]");
3416         }
3417
3418         // SRS flag
3419         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
3420         if (test_boolean > 1)
3421         {
3422                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs flag value [0..1]");
3423         }
3424
3425         // SRS request
3426         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_request, 1, ENC_BIG_ENDIAN, &test_boolean);
3427         if (test_boolean > 1)
3428         {
3429                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs request value [0..1]");
3430         }
3431
3432         // Antenna ports, scrambling and layers
3433         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_antenna_ports_scrambling_and_layers, 1, ENC_BIG_ENDIAN, &test_value);
3434         if (test_value > 15)
3435         {
3436                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid antenna ports scrambling and layers value [0..15]");
3437         }
3438
3439         // Total DCI length including padding
3440         ptvcursor_add(ptvc, hf_nfapi_total_dci_length_including_padding, 1, ENC_BIG_ENDIAN);
3441
3442         // N_DL_RB
3443         // TODO : This is missing from the encoder....
3444         //ptvcursor_add(ptvc, hf_nfapi_n_dl_rb, 1, ENC_BIG_ENDIAN);
3445 }
3446 static void dissect_dl_config_request_dl_dci_pdu_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
3447 {
3448         proto_item* item;
3449         guint32 test_value;
3450
3451         // HARQ-ACK resource offset
3452         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_ack_resource_offset, 1, ENC_BIG_ENDIAN, &test_value);
3453         if (test_value > 3)
3454         {
3455                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid hack ack resource offset value [0..3]");
3456         }
3457
3458         // PDSCH RE Mapping and Quasi-Co-Location Indicator
3459         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_re_mapping_and_quasi_co_location_indicator, 1, ENC_BIG_ENDIAN, &test_value);
3460         if (test_value > 3)
3461         {
3462                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch re mapping value [0..3]");
3463         }
3464
3465 }
3466 static void dissect_ul_dl_configuration_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
3467 {
3468         guint32 test_value;
3469
3470         // UL/DL configuration indication
3471         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_dl_configuration_index, 1, ENC_BIG_ENDIAN, &test_value);
3472         if (!(test_value >= 1 && test_value <= 5))
3473         {
3474                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul/dl configuration indication value [1..5]");
3475         }
3476 }
3477 static void dissect_dl_config_request_dl_dci_pdu_rel12_value(ptvcursor_t * ptvc, packet_info* pinfo)
3478 {
3479         proto_item* item;
3480         guint32 test_value, count;
3481         gboolean test_boolean;
3482
3483         // Primary cell type
3484         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_primary_cell_type, 1, ENC_BIG_ENDIAN, &test_value);
3485         if (test_value > 2)
3486         {
3487                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid primary cell type value [0..2]");
3488         }
3489
3490         // UL/DL configuration flag
3491         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_ul_dl_configuration_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
3492         if (test_boolean > 1)
3493         {
3494                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul/dl configuration flag value [0..1]");
3495         }
3496
3497         // Number of UL / DL configurations
3498         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ul_dl_configurations, 1, ENC_BIG_ENDIAN, &count);
3499
3500         dissect_array_value(ptvc, pinfo, "UL/DL Configurations", ett_nfapi_pnf_phy, count, dissect_ul_dl_configuration_index_value);
3501 }
3502 static void dissect_dl_config_request_dl_dci_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3503 {
3504         ptvcursor_add(ptvc, hf_nfapi_laa_end_partial_sf_flag, 1, ENC_BIG_ENDIAN);
3505         ptvcursor_add(ptvc, hf_nfapi_laa_end_partial_sf_configuration, 1, ENC_BIG_ENDIAN);
3506         ptvcursor_add(ptvc, hf_nfapi_initial_lbt_sf, 1, ENC_BIG_ENDIAN);
3507         ptvcursor_add(ptvc, hf_nfapi_codebooksize_determination_r13, 1, ENC_BIG_ENDIAN);
3508         ptvcursor_add(ptvc, hf_nfapi_rel13_drms_table_flag, 1, ENC_BIG_ENDIAN);
3509 }
3510 static void dissect_dl_config_request_mch_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3511 {
3512         ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
3513         ptvcursor_add(ptvc, hf_nfapi_pdu_index, 2, ENC_BIG_ENDIAN);
3514         ptvcursor_add(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN);
3515         ptvcursor_add(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN);
3516         ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
3517         ptvcursor_add(ptvc, hf_nfapi_modulation, 1, ENC_BIG_ENDIAN);
3518         ptvcursor_add(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN);
3519         ptvcursor_add(ptvc, hf_nfapi_mbsfn_area_id, 2, ENC_BIG_ENDIAN);
3520 }
3521 static void dissect_codebook_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
3522 {
3523         guint32 test_value;
3524
3525         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_codebook_index, 1, ENC_BIG_ENDIAN, &test_value);
3526         if (test_value > 15)
3527         {
3528                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid codebook Index value [0..15]");
3529         }
3530 }
3531 static void dissect_bf_vector_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3532 {
3533         ptvcursor_add(ptvc, hf_nfapi_bf_vector_bf_value, 2, ENC_BIG_ENDIAN);
3534 }
3535 static void dissect_bf_vector_type_value(ptvcursor_t * ptvc, packet_info* pinfo)
3536 {
3537         guint32 count;
3538
3539         ptvcursor_add(ptvc, hf_nfapi_bf_vector_subband_index, 1, ENC_BIG_ENDIAN);
3540         ptvcursor_add_ret_uint(ptvc, hf_nfapi_bf_vector_num_antennas, 1, ENC_BIG_ENDIAN, &count);
3541         dissect_array_value(ptvc, pinfo, "Antennas", ett_nfapi_bf_vector_antennas, count, dissect_bf_vector_value);
3542 }
3543 static void dissect_dl_config_request_dlsch_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
3544 {
3545         proto_item* item;
3546         guint32 test_value, num_subbands, num_vectors;
3547
3548         // Length
3549         ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
3550
3551         // PDU index
3552         ptvcursor_add(ptvc, hf_nfapi_pdu_index, 2, ENC_BIG_ENDIAN);
3553
3554         // RNTI
3555         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
3556         if (!(test_value >= 1 /* && rnti_value <= 65535)*/))
3557         {
3558                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid codebook Index value [1..65535]");
3559         }
3560
3561         // Resource allocation type
3562         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN, &test_value);
3563         if (test_value > 5)
3564         {
3565                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocation type value [0..5]");
3566         }
3567
3568         // Virtual resource block assignment flag
3569         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_virtual_resource_block_assignment_flag, 1, ENC_BIG_ENDIAN, &test_value);
3570         if (test_value > 1)
3571         {
3572                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid virtual resource block allocation assignment value [0..1]");
3573         }
3574
3575         // Resource block coding
3576         ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
3577
3578         // Modulation
3579         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_modulation, 1, ENC_BIG_ENDIAN, &test_value);
3580         if (!(test_value == 2 || test_value == 4 || test_value == 6 || test_value == 8))
3581         {
3582                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid modulation value [2, 4, 6, 8]");
3583         }
3584
3585         // Redundancy version
3586         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version, 1, ENC_BIG_ENDIAN, &test_value);
3587         if (test_value > 3)
3588         {
3589                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy value [0..3]");
3590         }
3591
3592         // Transport blocks
3593         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transport_blocks, 1, ENC_BIG_ENDIAN, &test_value);
3594         if (!(test_value >= 1 && test_value <= 2))
3595         {
3596                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport blocks value [1..2]");
3597         }
3598
3599         // Transport block to codeword swap flag
3600         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transport_block_to_codeword_swap_flag, 1, ENC_BIG_ENDIAN, &test_value);
3601         if (test_value > 1)
3602         {
3603                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport block to codeword swap flag value [0..1]");
3604         }
3605
3606         // Transmission scheme
3607         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_scheme, 1, ENC_BIG_ENDIAN, &test_value);
3608         if (test_value > 13)
3609         {
3610                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission scheme value [0..13]");
3611         }
3612
3613         // Number of layers
3614         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_layers, 1, ENC_BIG_ENDIAN, &test_value);
3615         if (!(test_value >= 1 && test_value <= 8))
3616         {
3617                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of layers value [1..8]");
3618         }
3619
3620         // Number of subbands
3621         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_subbands, 1, ENC_BIG_ENDIAN, &num_subbands);
3622         if (num_subbands > 13)
3623         {
3624                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of subbands value [0..13]");
3625         }
3626
3627         dissect_array_value(ptvc, pinfo, "Subbands", ett_nfapi_subbands, num_subbands, dissect_codebook_index_value);
3628
3629         // UE category capacity
3630         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_category_capacity, 1, ENC_BIG_ENDIAN, &test_value);
3631         if (test_value > 14)
3632         {
3633                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue category capacity value [0..14]");
3634         }
3635
3636         // P-A
3637         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pa, 1, ENC_BIG_ENDIAN, &test_value);
3638         if (test_value > 7)
3639         {
3640                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid p-a value [0..7]");
3641         }
3642
3643         // Delta power offset index
3644         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_power_offset_index, 1, ENC_BIG_ENDIAN, &test_value);
3645         if (test_value > 1)
3646         {
3647                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta power offset value [0..1]");
3648         }
3649
3650         // NGAP
3651         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ngap, 1, ENC_BIG_ENDIAN, &test_value);
3652         if (test_value > 1)
3653         {
3654                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ngap value [0..1]");
3655         }
3656
3657         // NPRB
3658         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nprb, 1, ENC_BIG_ENDIAN, &test_value);
3659         if (test_value > 1)
3660         {
3661                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nprb value [0..1]");
3662         }
3663
3664         // Transmission mode
3665         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_mode, 1, ENC_BIG_ENDIAN, &test_value);
3666         if (!(test_value >= 1 && test_value <= 10))
3667         {
3668                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode value [1..10]");
3669         }
3670
3671         // numBfPRBperSubband
3672         ptvcursor_add(ptvc, hf_nfapi_num_bf_prb_per_subband, 1, ENC_BIG_ENDIAN);
3673
3674         // numBfVector
3675         ptvcursor_add_ret_uint(ptvc, hf_nfapi_num_bf_vector, 1, ENC_BIG_ENDIAN, &num_vectors);
3676
3677         dissect_array_value(ptvc, pinfo, "Beamforming Vectors", ett_nfapi_bf_vectors, num_vectors, dissect_bf_vector_type_value);
3678 }
3679 static void dissect_csi_rs_resource_config_value(ptvcursor_t * ptvc, packet_info* pinfo)
3680 {
3681         guint32 test_value;
3682
3683         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_resource_config, 1, ENC_BIG_ENDIAN, &test_value);
3684         if (test_value > 31)
3685         {
3686                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi-rs resource config value [0..31]");
3687         }
3688 }
3689 static void dissect_dl_config_request_dlsch_pdu_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
3690 {
3691         guint32 test_value;
3692
3693         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nscid, 1, ENC_BIG_ENDIAN, &test_value);
3694         if (test_value > 1)
3695         {
3696                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nscid value [0..1]");
3697         }
3698 }
3699 static void dissect_dl_config_request_dlsch_pdu_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
3700 {
3701         proto_item* item;
3702         guint32 test_value, count;
3703         gboolean test_boolean;
3704
3705         // CSI-RS flag
3706         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_csi_rs_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
3707         if (test_boolean > 1)
3708         {
3709                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi-rs flag value [0..1]");
3710         }
3711
3712         // CSI-RS resource config R10
3713         ptvcursor_add(ptvc, hf_nfapi_csi_rs_resource_config_r10, 1, ENC_BIG_ENDIAN);
3714
3715         // CSI-RS zero Tx power resource config bitmap R10
3716         ptvcursor_add(ptvc, hf_nfapi_csi_rs_zero_tx_power_resource_config_bitmap_r10, 2, ENC_BIG_ENDIAN);
3717
3718         // CSI-RS Number of NZP configuration
3719         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_number_of_nzp_configurations, 1, ENC_BIG_ENDIAN, &count);
3720         if (count > 3)
3721         {
3722                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi-rs number of nzp configuration value [0..3]");
3723         }
3724
3725         // CSI-RS configuration
3726         dissect_array_value(ptvc, pinfo, "CSI-RS Resource Configs", ett_nfapi_csi_rs_resource_configs, count, dissect_csi_rs_resource_config_value);
3727
3728         // PDSCH start
3729         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_start, 1, ENC_BIG_ENDIAN, &test_value);
3730         if (test_value > 4)
3731         {
3732                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch start value [0..4]");
3733         }
3734
3735 }
3736 static void dissect_dl_config_request_dlsch_pdu_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
3737 {
3738         proto_item* item;
3739         guint32 test_value;
3740
3741         // DMRS Config flag
3742         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_config_flag, 1, ENC_BIG_ENDIAN, &test_value);
3743         if (test_value > 1)
3744         {
3745                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms config flag value [0..1]");
3746         }
3747
3748         // DMRS-Scrambling
3749         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_scrambling, 2, ENC_BIG_ENDIAN, &test_value);
3750         if (test_value > 503)
3751         {
3752                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms scrambling value [0..503]");
3753         }
3754
3755         // CSI Config flag
3756         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_config_flag, 1, ENC_BIG_ENDIAN, &test_value);
3757         if (test_value > 1)
3758         {
3759                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi config flag value [0..1]");
3760         }
3761
3762         // CSI- Scrambling
3763         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_scrambling, 2, ENC_BIG_ENDIAN, &test_value);
3764         if (test_value > 503)
3765         {
3766                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi scrambling value [0..503]");
3767         }
3768
3769         // PDSCH RE mapping flag
3770         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_re_mapping_flag, 1, ENC_BIG_ENDIAN, &test_value);
3771         if (test_value > 1)
3772         {
3773                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch re mapping flag value [0..1]");
3774         }
3775
3776         // PDSCH RE mapping antenna ports
3777         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_re_mapping_antenna_ports, 1, ENC_BIG_ENDIAN, &test_value);
3778         if (!(test_value == 1 || test_value == 2 || test_value == 4))
3779         {
3780                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch re mapping antenna ports value [1, 2, 4]");
3781         }
3782
3783         // PDSCH RE mapping freq shift
3784         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_re_mapping_freq_shift, 1, ENC_BIG_ENDIAN, &test_value);
3785         if (test_value > 5)
3786         {
3787                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch re mapping freq shift value [0..5]");
3788         }
3789 }
3790 static void dissect_dl_config_request_dlsch_pdu_rel12_value(ptvcursor_t * ptvc, packet_info* pinfo)
3791 {
3792         proto_item* item;
3793         guint32 test_value;
3794
3795         // altCQI-Table-r12
3796         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_alt_cqi_table_r12, 1, ENC_BIG_ENDIAN, &test_value);
3797         if (test_value > 1)
3798         {
3799                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid alt cqi table r12 value [0..1]");
3800         }
3801
3802         // MaxLayers
3803         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_max_layers, 1, ENC_BIG_ENDIAN, &test_value);
3804         if (!(test_value >= 1 && test_value <= 8))
3805         {
3806                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid max layers value [1..8]");
3807         }
3808
3809         ptvcursor_add(ptvc, hf_nfapi_n_dl_harq, 1, ENC_BIG_ENDIAN);
3810 }
3811 static void dissect_dl_config_request_dlsch_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
3812 {
3813         proto_item* item;
3814         guint32 test_value;
3815
3816         // DwPTS Symbols
3817         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dwpts_symbols, 1, ENC_BIG_ENDIAN, &test_value);
3818         if (!(test_value == 3 || test_value == 6 || test_value == 9 ||
3819                 test_value == 10 || test_value == 11 || test_value == 12 ||
3820                 test_value == 14))
3821         {
3822                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dwpts symbols value [3, 6, 9, 10, 11, 12, 14]");
3823         }
3824
3825         // Initial LBT SF
3826         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_lbt_sf, 1, ENC_BIG_ENDIAN, &test_value);
3827         if (test_value > 1)
3828         {
3829                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial lbt sf value [0..1]");
3830         }
3831
3832         // UE Type
3833         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_type, 1, ENC_BIG_ENDIAN, &test_value);
3834         if (test_value > 2)
3835         {
3836                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue type value [0..2]");
3837         }
3838
3839         // PDSCH Payload Type
3840         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_payload_type, 1, ENC_BIG_ENDIAN, &test_value);
3841         if (test_value > 2)
3842         {
3843                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch payload type value [0..2]");
3844         }
3845
3846         // Initial transmission SF (io)
3847         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_transmission_sf, 2, ENC_BIG_ENDIAN, &test_value);
3848         if (!(test_value <= 10239 || test_value == 0xFFFF))
3849         {
3850                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial transmission sf io value [0..10239, 0xFFFF]");
3851         }
3852
3853         // Rel-13-DMRS-tabe flag
3854         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_req13_drms_table_flag, 1, ENC_BIG_ENDIAN, &test_value);
3855         if (test_value > 1)
3856         {
3857                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rel13 drms table flag value [0..1]");
3858         }
3859 }
3860 static void dissect_dl_config_request_pch_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
3861 {
3862         proto_item* item;
3863         guint32 test_value;
3864
3865         // Length
3866         ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
3867
3868         // PDU index
3869         ptvcursor_add(ptvc, hf_nfapi_pdu_index, 2, ENC_BIG_ENDIAN);
3870
3871         // P-RNTI
3872         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prnti, 2, ENC_BIG_ENDIAN, &test_value);
3873         if (test_value != 0xFFFE)
3874         {
3875                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prnti value [0xFFFE]");
3876         }
3877
3878         // Resource allocation type
3879         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN, &test_value);
3880         if (!(test_value == 2 || test_value == 3 || test_value == 6))
3881         {
3882                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocate type value [2, 3, 6]");
3883         }
3884
3885         // Virtual resource block assignment flag
3886         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_virtual_resource_block_assignment_flag, 1, ENC_BIG_ENDIAN, &test_value);
3887         if (test_value > 1)
3888         {
3889                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid virtual resource block assignment flag value [0..1]");
3890         }
3891
3892         // Resource block coding
3893         ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
3894
3895         // MCS
3896         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs, 1, ENC_BIG_ENDIAN, &test_value);
3897         if (test_value != 0)
3898         {
3899                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs value [0]");
3900         }
3901
3902         // Redundancy version
3903         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version, 1, ENC_BIG_ENDIAN, &test_value);
3904         if (test_value != 0)
3905         {
3906                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy value [0]");
3907         }
3908
3909         // Number of transport blocks
3910         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_transport_blocks, 1, ENC_BIG_ENDIAN, &test_value);
3911         if (test_value != 1)
3912         {
3913                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport blocks value [1]");
3914         }
3915
3916         // Transport block to codeword swap flag
3917         ptvcursor_add(ptvc, hf_nfapi_transport_block_to_codeword_swap_flag, 1, ENC_BIG_ENDIAN);
3918
3919         // Transmission scheme
3920         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_scheme, 1, ENC_BIG_ENDIAN, &test_value);
3921         if (!(test_value == 0 || test_value == 1 || test_value == 6))
3922         {
3923                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission schemes value [0, 1, 6]");
3924         }
3925
3926         // Number of layers
3927         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_layers, 1, ENC_BIG_ENDIAN, &test_value);
3928         if (!(test_value >= 1 && test_value <= 4))
3929         {
3930                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of layers value [1..4]");
3931         }
3932
3933         // Codebook index
3934         ptvcursor_add(ptvc, hf_nfapi_codebook_index, 1, ENC_BIG_ENDIAN);
3935
3936         // UE category capacity
3937         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_category_capacity, 1, ENC_BIG_ENDIAN, &test_value);
3938         if (test_value > 14)
3939         {
3940                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue category capacity value [0..14]");
3941         }
3942
3943         // P-A
3944         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pa, 1, ENC_BIG_ENDIAN, &test_value);
3945         if (test_value > 7)
3946         {
3947                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid p-a value value [0..7]");
3948         }
3949
3950         // Transmission power
3951         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
3952         if (test_value > 10000)
3953         {
3954                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
3955         }
3956
3957         // NPRB
3958         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nprb, 1, ENC_BIG_ENDIAN, &test_value);
3959         if (test_value > 1)
3960         {
3961                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nprb value [0..1]");
3962         }
3963
3964         // NGAP
3965         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ngap, 1, ENC_BIG_ENDIAN, &test_value);
3966         if (test_value > 1)
3967         {
3968                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ngap value [0..1]");
3969         }
3970
3971 }
3972 static void dissect_dl_config_request_pch_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
3973 {
3974         proto_item* item;
3975         guint32 test_value;
3976
3977         // UE mode
3978         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_mode, 1, ENC_BIG_ENDIAN, &test_value);
3979         if (test_value > 1)
3980         {
3981                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue mode value [0..1]");
3982         }
3983
3984         // Initial transmission SF (io)
3985         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_transmission_sf, 2, ENC_BIG_ENDIAN, &test_value);
3986         if (!(test_value <= 10239 || test_value == 0xFFFF))
3987         {
3988                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial transmission sf io value [0..10239, 0xFFFF]");
3989         }
3990 }
3991 static void dissect_dl_config_request_prs_pdu_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
3992 {
3993         proto_item* item;
3994         guint32 test_value;
3995         gboolean test_boolean;
3996
3997         // Transmission power
3998         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
3999         if (test_value > 10000)
4000         {
4001                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
4002         }
4003
4004         // PRS bandwidth
4005         item = ptvcursor_add_ret_uint(ptvc, hf_prs_bandwidth, 1, ENC_BIG_ENDIAN, &test_value);
4006         if (!(test_value == 6 || test_value == 15 || test_value == 25 ||
4007                   test_value == 50 || test_value == 75 || test_value == 100))
4008         {
4009                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prs bandwidth value [6, 15, 25, 50, 75, 100]");
4010         }
4011
4012         // PRS cyclic prefix type
4013         item = ptvcursor_add_ret_boolean(ptvc, hf_prs_cyclic_prefix_type, 1, ENC_BIG_ENDIAN, &test_boolean);
4014         if (test_boolean > 1)
4015         {
4016                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prs cyclic prefix value [0..1]");
4017         }
4018
4019         // PRS muting
4020         item = ptvcursor_add_ret_boolean(ptvc, hf_prs_muting, 1, ENC_BIG_ENDIAN, &test_boolean);
4021         if (test_boolean > 1)
4022         {
4023                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prs muting value [0..1]");
4024         }
4025 }
4026 static void dissect_dl_config_request_csi_rs_pdu_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
4027 {
4028         proto_item* item;
4029         guint32 test_value, count;
4030
4031         // CSI-RS antenna port count R10
4032         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_antenna_port_count_r10, 1, ENC_BIG_ENDIAN, &test_value);
4033         if (!(test_value == 1 || test_value == 2 ||
4034                   test_value == 4 || test_value == 8 ||
4035                   test_value == 12 || test_value == 16))
4036         {
4037                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi rs antenna port count r10 value [1, 2, 4, 6, 8, 10]");
4038         }
4039
4040         // CSI-RS resource config R10
4041         ptvcursor_add(ptvc, hf_nfapi_csi_rs_resource_config_r10, 1, ENC_BIG_ENDIAN);
4042
4043         // Transmission power
4044         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
4045         if (test_value > 10000)
4046         {
4047                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
4048         }
4049
4050         // CSI-RS zero Tx power resource config bitmap R10
4051         ptvcursor_add(ptvc, hf_nfapi_csi_rs_zero_tx_power_resource_config_bitmap_r10, 2, ENC_BIG_ENDIAN);
4052
4053         // CSI-RS Number of NZP configuration
4054         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_number_of_nzp_configurations, 1, ENC_BIG_ENDIAN, &count);
4055         if (count > 8)
4056         {
4057                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi-rs number of nzp configuration value [0..8]");
4058         }
4059
4060         // CSI-RS configuration
4061         dissect_array_value(ptvc, pinfo, "CSI-RS Resource Configs", ett_nfapi_csi_rs_resource_configs, count, dissect_csi_rs_resource_config_value);
4062 }
4063 static void dissect_csi_rs_bf_vector_value(ptvcursor_t * ptvc, packet_info* pinfo)
4064 {
4065         guint32 count;
4066         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_resource_index, 1, ENC_BIG_ENDIAN, &count);
4067         if (count > 7)
4068         {
4069                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi-rs resource Index value [0..7]");
4070         }
4071
4072         // todo : how to work out the antenna port count for the bfValue
4073 }
4074 static void dissect_dl_config_request_csi_rs_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4075 {
4076         proto_item* item;
4077         guint32 test_value, class_value, count;
4078
4079         // Class
4080         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_class, 1, ENC_BIG_ENDIAN, &class_value);
4081         if (class_value > 2)
4082         {
4083                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid class value [0..2]");
4084         }
4085
4086         // cdmType
4087         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cdm_type, 1, ENC_BIG_ENDIAN, &test_value);
4088         if (test_value > 1)
4089         {
4090                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cdm type value [0..1]");
4091         }
4092
4093         // numBfVector
4094         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_num_bf_vector, 1, ENC_BIG_ENDIAN, &count);
4095         if (!((class_value == 1 && count == 0) || (class_value == 2 && count <= 8)))
4096         {
4097                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid num bf vector value [0] or [0..8]");
4098         }
4099
4100         dissect_array_value(ptvc, pinfo, "Beamforming Vector", ett_nfapi_csi_rs_bf_vector, count, dissect_csi_rs_bf_vector_value);
4101 }
4102 static void dissect_epdcch_prb_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
4103 {
4104         guint32 test_value;
4105
4106         // EPDCCH PRB index
4107         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_edpcch_prb_index, 1, ENC_BIG_ENDIAN, &test_value);
4108         if (test_value > 99)
4109         {
4110                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid epdcch prb_index value [0..99]");
4111         }
4112 }
4113 static void dissect_dl_config_request_edpcch_params_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
4114 {
4115         proto_item* item;
4116         guint32 test_value, count;
4117
4118         // EPDCCH Resource assignment flag
4119         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_epdcch_resource_assignment_flag, 1, ENC_BIG_ENDIAN, &test_value);
4120         if (test_value > 1)
4121         {
4122                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid epdcch resource assignment flag value [0..1]");
4123         }
4124
4125         // EPDCCH ID
4126         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_epdcch_id, 2, ENC_BIG_ENDIAN, &test_value);
4127         if (test_value > 503)
4128         {
4129                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid epdcch id value [0..503]");
4130         }
4131
4132         // EPDCCH Start Symbol
4133         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_epdcch_start_symbol, 1, ENC_BIG_ENDIAN, &test_value);
4134         if (!(test_value >= 1 && test_value <= 4))
4135         {
4136                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid epdcch start symbol value [1..4]");
4137         }
4138
4139         // EPDCCH NumPRB
4140         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_epdcch_num_prb, 1, ENC_BIG_ENDIAN, &count);
4141         if (!(count == 2 || count == 4 || count == 8))
4142         {
4143                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid epdcch num prb value [2, 4, 8]");
4144         }
4145
4146         dissect_array_value(ptvc, pinfo, "PRBs", ett_nfapi_epdcch_prbs, count, dissect_epdcch_prb_index_value);
4147
4148         dissect_bf_vector_type_value(ptvc, pinfo);
4149 }
4150 static void dissect_dl_config_request_edpcch_params_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4151 {
4152         proto_item* item;
4153         guint32 test_value;
4154
4155         // DwPTS Symbols
4156         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_lbt_sf, 1, ENC_BIG_ENDIAN, &test_value);
4157         if (!(test_value == 3 || test_value == 6 || test_value == 9 ||
4158                 test_value == 10 || test_value == 11 || test_value == 12 ||
4159                 test_value == 14))
4160         {
4161                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dwpts symbols value [3, 6, 9, 10, 11, 12, 14]");
4162         }
4163
4164         // Initial LBT SF
4165         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dwpts_symbols, 1, ENC_BIG_ENDIAN, &test_value);
4166         if (test_value > 1)
4167         {
4168                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial lbt sf value [0..1]");
4169         }
4170
4171 }
4172 static void dissect_precoding_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
4173 {
4174         ptvcursor_add(ptvc, hf_nfapi_precoding_value, 2, ENC_BIG_ENDIAN);
4175 }
4176 static void dissect_dl_config_request_mpdpcch_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4177 {
4178         proto_item* item;
4179         guint32 test_value, count;
4180         gboolean test_boolean;
4181
4182         // MPDCCH Narrowband
4183         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_narrowband, 1, ENC_BIG_ENDIAN, &test_value);
4184         if (test_value > 15)
4185         {
4186                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mpdcch narrowband value [0..15]");
4187         }
4188
4189         // Number of PRB pairs
4190         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_prb_pairs, 1, ENC_BIG_ENDIAN, &test_value);
4191         if (!(test_value == 2 || test_value == 4 || test_value == 6))
4192         {
4193                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of prb pair value [2, 4, 6]");
4194         }
4195
4196         // Resource Block Assignment
4197         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_assignment, 1, ENC_BIG_ENDIAN, &test_value);
4198         if (test_value > 14)
4199         {
4200                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block assignment value [0..14]");
4201         }
4202
4203         // MPDCCH transmission type
4204         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_transmission_type, 1, ENC_BIG_ENDIAN, &test_value);
4205         if (test_value > 1)
4206         {
4207                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mpdcch transmission type value [0..1]");
4208         }
4209
4210         // Start symbol
4211         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_start_symbol, 1, ENC_BIG_ENDIAN, &test_value);
4212         if (!(test_value >= 1 && test_value <=4))
4213         {
4214                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid start symbol value [1..4]");
4215         }
4216
4217         // ECCE index
4218         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ecce_index, 1, ENC_BIG_ENDIAN, &test_value);
4219         if (test_value > 22)
4220         {
4221                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ecce Index value [0..22]");
4222         }
4223
4224         // Aggregation level
4225         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_aggregation_level, 1, ENC_BIG_ENDIAN, &test_value);
4226         if (!(test_value == 2 || test_value == 4 || test_value == 8 ||
4227                 test_value == 16 || test_value == 24))
4228         {
4229                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid aggregation level value [2, 4, 8, 16, 24]");
4230         }
4231
4232         // RNTI type
4233         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_rnti_type, 1, ENC_BIG_ENDIAN, &test_value);
4234         if (test_value > 4)
4235         {
4236                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti type value [0..4]");
4237         }
4238
4239         // RNTI
4240         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
4241         if (!(test_value >= 1))
4242         {
4243                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
4244         }
4245
4246         // CEMode
4247         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ce_mode, 1, ENC_BIG_ENDIAN, &test_value);
4248         if (!(test_value >= 1 && test_value <= 2))
4249         {
4250                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cemode value [1..2]");
4251         }
4252
4253         // DMRS scrambling init
4254         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_scrabmling_init, 2, ENC_BIG_ENDIAN, &test_value);
4255         if (test_value > 503)
4256         {
4257                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms scrambling init value [0..503]");
4258         }
4259
4260         // Initial transmission SF (io)
4261         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_transmission_sf, 2, ENC_BIG_ENDIAN, &test_value);
4262         if (!(test_value <= 10239 || test_value == 0xFFFF))
4263         {
4264                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial transmission sf io value [0..10239, 0xFFFF]");
4265         }
4266
4267         // Transmission power
4268         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
4269         if (test_value > 10000)
4270         {
4271                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
4272         }
4273
4274         // DCI format
4275         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_dci_format, 1, ENC_BIG_ENDIAN, &test_value);
4276         if (!(test_value == 10 || test_value == 11 || test_value == 12))
4277         {
4278                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci format value [10, 11, 12]");
4279         }
4280
4281         // Resource block coding
4282         ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 2, ENC_BIG_ENDIAN);
4283
4284         // MCS
4285         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs, 1, ENC_BIG_ENDIAN, &test_value);
4286         if (test_value > 15)
4287         {
4288                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..15]");
4289         }
4290
4291         // PDSCH repetition levels
4292         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_reception_levels, 1, ENC_BIG_ENDIAN, &test_value);
4293         if (!(test_value >= 1 && test_value <= 8))
4294         {
4295                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch repetition levels value [1..8]");
4296         }
4297
4298         // Redundancy version
4299         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version, 1, ENC_BIG_ENDIAN, &test_value);
4300         if (test_value > 3)
4301         {
4302                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy version value [0..3]");
4303         }
4304
4305         // New data indicator
4306         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indicator, 1, ENC_BIG_ENDIAN, &test_value);
4307         if (test_value > 1)
4308         {
4309                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indicator value [0..1]");
4310         }
4311
4312         // HARQ process
4313         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_process, 1, ENC_BIG_ENDIAN, &test_value);
4314         if (test_value > 15)
4315         {
4316                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq process value [0..15]");
4317         }
4318
4319         // TPMI length
4320         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpmi_length, 1, ENC_BIG_ENDIAN, &test_value);
4321         if (!(test_value == 0 || test_value == 2 || test_value == 4))
4322         {
4323                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi length value [0, 2, 4]");
4324         }
4325
4326         // TPMI
4327         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpmi, 1, ENC_BIG_ENDIAN, &test_value);
4328         if (test_value > 15)
4329         {
4330                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi value [0..15]");
4331         }
4332
4333         // PMI flag
4334         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_pmi_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
4335         if (test_boolean > 1)
4336         {
4337                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pmi flag value [0..1]");
4338         }
4339
4340         // PMI
4341         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pmi, 1, ENC_BIG_ENDIAN, &test_value);
4342         if (test_value > 1)
4343         {
4344                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pmi value [0..1]");
4345         }
4346
4347         // HARQ resource offset
4348         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_resource_offset, 1, ENC_BIG_ENDIAN, &test_value);
4349         if (test_value > 3)
4350         {
4351                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq resource offset value [0..3]");
4352         }
4353
4354         // DCI subframe repetition number
4355         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dci_subframe_repetition_number, 1, ENC_BIG_ENDIAN, &test_value);
4356         if (!(test_value >= 1 && test_value <= 4))
4357         {
4358                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci subframe repetition number value [1..4]");
4359         }
4360
4361         // TPC
4362         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpc, 1, ENC_BIG_ENDIAN, &test_value);
4363         if (test_value > 3)
4364         {
4365                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpc value [0..3]");
4366         }
4367
4368         // Downlink assignment Index Length
4369         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_assignment_index_length, 1, ENC_BIG_ENDIAN, &test_value);
4370         if (!(test_value == 0 || test_value == 2 || test_value == 4))
4371         {
4372                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink assignment Index length value [0, 2, 4]");
4373         }
4374
4375         // Downlink assignment index
4376         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_assignment_index, 1, ENC_BIG_ENDIAN, &test_value);
4377         if (test_value > 15)
4378         {
4379                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink assignment Index value [0..15]");
4380         }
4381
4382         // Allocate PRACH flag
4383         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_allocate_prach_flag, 1, ENC_BIG_ENDIAN, &test_value);
4384         if (test_value > 1)
4385         {
4386                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid allocate prach flag value [0..1]");
4387         }
4388
4389         // Preamble index
4390         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_preamble_index, 1, ENC_BIG_ENDIAN, &test_value);
4391         if (test_value > 63)
4392         {
4393                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid preamble Index value [0..63]");
4394         }
4395
4396         // PRACH mask index
4397         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_mask_index, 1, ENC_BIG_ENDIAN, &test_value);
4398         if (test_value > 15)
4399         {
4400                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach mask Index value [0..15]");
4401         }
4402
4403         // Starting CE Level
4404         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_starting_ce_level, 1, ENC_BIG_ENDIAN, &test_value);
4405         if (test_value > 3)
4406         {
4407                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid starting ce level value [0..3]");
4408         }
4409
4410         // SRS request
4411         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_request, 1, ENC_BIG_ENDIAN, &test_boolean);
4412         if (test_boolean > 1)
4413         {
4414                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs request value [0..1]");
4415         }
4416
4417         // Antenna ports and scrambling identity flag
4418         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_antenna_ports_and_scrambling_identity_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
4419         if (test_boolean > 1)
4420         {
4421                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid antenna ports and scrambling identity flag value [0..1]");
4422         }
4423
4424         // Antenna ports and scrambling identity
4425         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_antenna_ports_and_scrambling_identity, 1, ENC_BIG_ENDIAN, &test_value);
4426         if (test_value > 3)
4427         {
4428                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid antenna ports and scrambling identity value [0..3]");
4429         }
4430
4431         // Frequency hopping enabled flag
4432         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_enabled_flag, 1, ENC_BIG_ENDIAN, &test_value);
4433         if (test_value > 1)
4434         {
4435                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping enabled flag value [0..1]");
4436         }
4437
4438         // Paging/Direct indication differentiation flag
4439         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_paging_direct_indication_differentiation_flag, 1, ENC_BIG_ENDIAN, &test_value);
4440         if (test_value > 1)
4441         {
4442                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid paging/direct indication differentiation flag value [0..1]");
4443         }
4444
4445         // Direct indication
4446         ptvcursor_add(ptvc, hf_nfapi_direct_indication, 1, ENC_BIG_ENDIAN);
4447
4448         // Total DCI length including padding
4449         ptvcursor_add(ptvc, hf_nfapi_total_dci_length_including_padding, 1, ENC_BIG_ENDIAN);
4450
4451         // Number of TX Antenna ports
4452         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_tx_antenna_ports, 1, ENC_BIG_ENDIAN, &count);
4453
4454         dissect_array_value(ptvc, pinfo, "Precoding", ett_nfapi_precoding, count, dissect_precoding_value);
4455 }
4456 static void dissect_ul_config_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
4457 {
4458         proto_item* item;
4459         guint32 test_value, size;
4460
4461         // PDU Type
4462         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_config_pdu_type, 1, ENC_BIG_ENDIAN, &test_value);
4463         if (test_value > 15)
4464         {
4465                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul pdu type value [0..15]");
4466         }
4467
4468         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_size, 1, ENC_BIG_ENDIAN, &size);
4469
4470         guint pdu_end = (ptvcursor_current_offset(ptvc) + size - 2);
4471         dissect_tlv_list(ptvc, pinfo, pdu_end);
4472 }
4473 static void dissect_ul_config_request_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
4474 {
4475         proto_item* item;
4476         guint32 test_value, num_pdu;
4477         gboolean test_boolean;
4478
4479         // Number of PDUs
4480         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 1, ENC_BIG_ENDIAN, &num_pdu);
4481
4482         // RACH/PRACH frequency resources
4483         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rach_prach_frequency_resources, 1, ENC_BIG_ENDIAN, &test_value);
4484         if (test_value > 1)
4485         {
4486                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rach prach frequency resources value [0..1]");
4487         }
4488
4489         // SRS present
4490         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_present, 1, ENC_BIG_ENDIAN, &test_boolean);
4491         if (test_boolean > 1)
4492         {
4493                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs present value [0..1]");
4494         }
4495
4496         dissect_array_value(ptvc, pinfo, "UL Config PDU List", ett_nfapi_ul_config_request_pdu_list, num_pdu, dissect_ul_config_pdu);
4497 }
4498 static void dissect_ul_config_ulsch_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
4499 {
4500         proto_item* item;
4501         guint32 test_value;
4502
4503         // Handle
4504         ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
4505
4506         // Size
4507         ptvcursor_add(ptvc, hf_nfapi_size, 2, ENC_BIG_ENDIAN);
4508
4509         // RNTI
4510         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
4511         if (!(test_value >= 1))
4512         {
4513                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
4514         }
4515
4516         // Resource block start
4517         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_start, 1, ENC_BIG_ENDIAN, &test_value);
4518         if (test_value > 99)
4519         {
4520                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block start value [0..99]");
4521         }
4522
4523         // Number of resource blocks
4524         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_resource_blocks, 1, ENC_BIG_ENDIAN, &test_value);
4525         if (!(test_value >= 1 && test_value <= 100))
4526         {
4527                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of resource blocks value [1..100]");
4528         }
4529
4530         // Modulation type
4531         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_modulation, 1, ENC_BIG_ENDIAN, &test_value);
4532         if (!(test_value == 2 || test_value == 4 || test_value == 6))
4533         {
4534                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid modulation type value [2, 4, 6]");
4535         }
4536
4537         // Cyclic Shift 2 for DMRS
4538         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cyclic_shift_2_for_drms, 1, ENC_BIG_ENDIAN, &test_value);
4539         if (test_value > 99)
4540         {
4541                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cyclic shift 2 for drms value [0..7]");
4542         }
4543
4544         // Frequency hopping enabled flag
4545         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_enabled_flag, 1, ENC_BIG_ENDIAN, &test_value);
4546         if (test_value > 1)
4547         {
4548                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping enabled flag value [0..1]");
4549         }
4550
4551         // Frequency hopping bits
4552         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_bits, 1, ENC_BIG_ENDIAN, &test_value);
4553         if (test_value > 3)
4554         {
4555                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping bits value [0..3]");
4556         }
4557
4558         // New data indication
4559         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indication, 1, ENC_BIG_ENDIAN, &test_value);
4560         if (test_value > 1)
4561         {
4562                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indicator value [0..1]");
4563         }
4564
4565         // Redundancy version
4566         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version, 1, ENC_BIG_ENDIAN, &test_value);
4567         if (test_value > 3)
4568         {
4569                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy version value [0..3]");
4570         }
4571
4572         // HARQ process number
4573         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_process_number, 1, ENC_BIG_ENDIAN, &test_value);
4574         if (test_value > 15)
4575         {
4576                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq process number value [0..15]");
4577         }
4578
4579         // UL Tx mode
4580         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_tx_mode, 1, ENC_BIG_ENDIAN, &test_value);
4581         if (test_value > 1)
4582         {
4583                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul tx mode value [0..1]");
4584         }
4585
4586         // Current TX NB
4587         ptvcursor_add(ptvc, hf_nfapi_current_tx_nb, 1, ENC_BIG_ENDIAN);
4588
4589         // N srs
4590         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_srs, 1, ENC_BIG_ENDIAN, &test_value);
4591         if (test_value > 1)
4592         {
4593                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n_srs value [0..1]");
4594         }
4595 }
4596 static void dissect_ul_config_ulsch_pdu_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
4597 {
4598         proto_item* item;
4599         guint32 test_value;
4600
4601         // Resource allocation type
4602         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN, &test_value);
4603         if (test_value > 1)
4604         {
4605                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocation type value [0..1]");
4606         }
4607
4608         // Resource block coding
4609         ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
4610
4611         // Transport blocks
4612         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transport_blocks, 1, ENC_BIG_ENDIAN, &test_value);
4613         if (!(test_value >= 1 && test_value <= 2))
4614         {
4615                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport blocks value [1..2]");
4616         }
4617
4618         // Transmission scheme
4619         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_transmission_scheme, 1, ENC_BIG_ENDIAN, &test_value);
4620         if (test_value > 1)
4621         {
4622                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission scheme value [0..1]");
4623         }
4624
4625         // Number Of layers
4626         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_layers, 1, ENC_BIG_ENDIAN, &test_value);
4627         if (!(test_value >= 1 && test_value <=4 ))
4628         {
4629                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of layers value [1..4]");
4630         }
4631
4632         // Codebook Index
4633         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_codebook_index, 1, ENC_BIG_ENDIAN, &test_value);
4634         if (test_value > 23)
4635         {
4636                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid codebook Index value [0..23]");
4637         }
4638
4639         // Disable sequence hopping flag
4640         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_disable_sequence_hopping_flag, 1, ENC_BIG_ENDIAN, &test_value);
4641         if (test_value > 1)
4642         {
4643                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid disable sequence hopping flag value [0..1]");
4644         }
4645 }
4646 static void dissect_ul_config_ulsch_pdu_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
4647 {
4648         proto_item* item;
4649         guint32 test_value;
4650
4651         // Virtual cell ID enabled flag
4652         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_virtual_cell_id_enabled_flag, 1, ENC_BIG_ENDIAN, &test_value);
4653         if (test_value > 1)
4654         {
4655                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid virtual cell id enabled flag value [0..1]");
4656         }
4657
4658         // nPUSCH Identity
4659         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_npusch_identity, 2, ENC_BIG_ENDIAN, &test_value);
4660         if (test_value > 509)
4661         {
4662                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npusch identity value [0..509]");
4663         }
4664
4665         // DMRS Config flag
4666         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_config_flag, 1, ENC_BIG_ENDIAN, &test_value);
4667         if (test_value > 1)
4668         {
4669                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms config flag value [0..1]");
4670         }
4671
4672         // nDMRS-CSH Identity
4673         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ndrms_csh_identity, 2, ENC_BIG_ENDIAN, &test_value);
4674         if (test_value > 509)
4675         {
4676                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ndrms-csh identity value [0..509]");
4677         }
4678
4679 }
4680 static void dissect_ul_config_ulsch_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4681 {
4682         proto_item* item;
4683         guint32 test_value;
4684
4685         // UE Type
4686         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_type, 1, ENC_BIG_ENDIAN, &test_value);
4687         if (test_value > 2)
4688         {
4689                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue type value [0..2]");
4690         }
4691
4692         // Total Number of repetitions
4693         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_total_number_of_repetitions, 2, ENC_BIG_ENDIAN, &test_value);
4694         if (!(test_value >= 1 && test_value <= 2048))
4695         {
4696                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid total number of repetitions value [1..2048]");
4697         }
4698
4699         // Repetition Number
4700         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_repetition_number, 2, ENC_BIG_ENDIAN, &test_value);
4701         if (!(test_value >= 1 && test_value <= 2048))
4702         {
4703                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid repetition number value [1..2048]");
4704         }
4705
4706         // Initial transmission SF (io)
4707         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_sf_io, 2, ENC_BIG_ENDIAN, &test_value);
4708         if (!(test_value <= 10239 || test_value == 0xFFFF))
4709         {
4710                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid repetition number value [0..10239, 0xFFFF]");
4711         }
4712
4713         // Empy symbols due to re-tunning
4714         // todo : decode as a bitmap
4715         ptvcursor_add(ptvc, hf_nfapi_empty_symbols_due_to_retunning, 1, ENC_BIG_ENDIAN);
4716 }
4717 static void dissect_ul_config_init_tx_params_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
4718 {
4719         proto_item* item;
4720         guint32 test_value;
4721
4722         // N srs initial
4723         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_srs_initial, 1, ENC_BIG_ENDIAN, &test_value);
4724         if (test_value > 1)
4725         {
4726                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n srs initial value [0..1]");
4727         }
4728
4729         // Initial number of resource blocks
4730         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_number_of_resource_blocks, 1, ENC_BIG_ENDIAN, &test_value);
4731         if (!(test_value >= 1 && test_value <= 100))
4732         {
4733                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial number of resource blocks value [1..100]");
4734         }
4735
4736 }
4737 static void dissect_ul_config_cqi_ri_info_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
4738 {
4739         proto_item* item;
4740         guint32 test_value;
4741
4742         // DL CQI/PMI Size Rank = 1
4743         ptvcursor_add(ptvc, hf_nfapi_dl_cqi_pmi_size_rank_1, 1, ENC_BIG_ENDIAN);
4744
4745         // DL CQI/PMI Size Rank>1
4746         ptvcursor_add(ptvc, hf_nfapi_dl_cqi_pmi_size_rank_greater_1, 1, ENC_BIG_ENDIAN);
4747
4748         // RI Size
4749         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ri_size, 1, ENC_BIG_ENDIAN, &test_value);
4750         if (test_value > 3)
4751         {
4752                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ri size value [0..3]");
4753         }
4754
4755         // Delta Offset CQI
4756         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_cqi, 1, ENC_BIG_ENDIAN, &test_value);
4757         if (test_value > 15)
4758         {
4759                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset cqi value [0..15]");
4760         }
4761
4762         // Delta Offset RI
4763         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_ri, 1, ENC_BIG_ENDIAN, &test_value);
4764         if (test_value > 15)
4765         {
4766                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset ri value [0..15]");
4767         }
4768
4769 }
4770 static void dissect_ul_config_cqi_ri_info_rel9_later_value(ptvcursor_t * ptvc, packet_info* pinfo)
4771 {
4772         proto_item* item;
4773         guint32 test_value;
4774         gboolean type, test_boolean;
4775
4776         // Report type
4777         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_report_type, 1, ENC_BIG_ENDIAN, &type);
4778         if (type > 1)
4779         {
4780                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid report type value [0..1]");
4781         }
4782
4783         // Delta offset CQI
4784         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_cqi, 1, ENC_BIG_ENDIAN, &test_value);
4785         if (test_value > 15)
4786         {
4787                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset cqi value [0..15]");
4788         }
4789
4790         // Delta offset RI
4791         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_ri, 1, ENC_BIG_ENDIAN, &test_value);
4792         if (test_value > 15)
4793         {
4794                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset ri value [0..15]");
4795         }
4796
4797         switch (type)
4798         {
4799                 case 0:
4800                 {
4801                         // DL CQI/PMI/RI size
4802                         ptvcursor_add(ptvc, hf_nfapi_dl_cqi_ri_pmi_size, 1, ENC_BIG_ENDIAN);
4803
4804                         // Control Type
4805                         ptvcursor_add_ret_boolean(ptvc, hf_nfapi_control_type, 1, ENC_BIG_ENDIAN, &test_boolean);
4806                         if (test_boolean > 1)
4807                         {
4808                                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid control type value [0..1]");
4809                         }
4810                         break;
4811                 }
4812                 case 1:
4813                 {
4814                         // todo : encoder not right for this case.
4815                         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_cc, 1, ENC_BIG_ENDIAN, &test_value);
4816
4817                         if (!(test_value >= 1 && test_value <= 32))
4818                         {
4819                                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of cc value [1..32]");
4820                         }
4821
4822                         /*
4823                         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "CCs");
4824
4825                         for (int i = 0; i < num_cc; ++i)
4826                         {
4827                                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "[%d]", i);
4828
4829                                 guint8 ri_size = tvb_get_guint8(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
4830                                 ptvcursor_add(ptvc, hf_nfapi_ri_size, 1, ENC_BIG_ENDIAN);
4831
4832                                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "Rank");
4833
4834                                 for (int j = 0; j < ri_size; ++j)
4835                                 {
4836                                         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "[%d]", j);
4837                                         ptvcursor_add(ptvc, hf_nfapi_dl_cqi_pmi_size, 1, ENC_BIG_ENDIAN);
4838                                         ptvcursor_pop_subtree(ptvc);
4839                                 }
4840
4841                                 ptvcursor_pop_subtree(ptvc);
4842
4843                                 ptvcursor_pop_subtree(ptvc);
4844                         }
4845
4846                         ptvcursor_pop_subtree(ptvc);
4847                         */
4848
4849                         break;
4850                 }
4851         }
4852 }
4853 static void dissect_ul_config_cqi_ri_info_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4854 {
4855         guint32 test_value;
4856
4857         // DL CQI/PMI/RI size 2
4858         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_cqi_ri_pmi_size_2, 2, ENC_BIG_ENDIAN, &test_value);
4859         if (test_value < 255)
4860         {
4861                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dl cqi ri pmi size 2 value [>= 255]");
4862         }
4863 }
4864 static void dissect_ul_config_harq_info_ulsch_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
4865 {
4866         proto_item* item;
4867         guint32 test_value;
4868
4869         // HARQ Size
4870         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_size, 1, ENC_BIG_ENDIAN, &test_value);
4871         if (test_value > 21)
4872         {
4873                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq size value [0..21]");
4874         }
4875
4876         // Delta Offset HARQ
4877         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_harq, 1, ENC_BIG_ENDIAN, &test_value);
4878         if (test_value > 15)
4879         {
4880                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset harq value [0..15]");
4881         }
4882
4883         // ACK_NACK mode
4884         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tdd_ack_nack_mode, 1, ENC_BIG_ENDIAN, &test_value);
4885         if (test_value > 5)
4886         {
4887                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ack nack mode value [0..5]");
4888         }
4889 }
4890 static void dissect_ul_config_harq_info_ulsch_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4891 {
4892         proto_item* item;
4893         guint32 test_value;
4894
4895         // HARQ Size 2
4896         ptvcursor_add(ptvc, hf_nfapi_harq_size_2, 2, ENC_BIG_ENDIAN);
4897
4898         // Delta Offset HARQ 2
4899         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_harq_2, 1, ENC_BIG_ENDIAN, &test_value);
4900         if (test_value > 15)
4901         {
4902                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset harq 2 value [0..15]");
4903         }
4904 }
4905 static void dissect_ul_config_ue_info_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
4906 {
4907         proto_item* item;
4908         guint32 test_value;
4909
4910         // Handle
4911         ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
4912
4913         // RNTI
4914         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
4915         if (test_value < 1)
4916         {
4917                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
4918         }
4919 }
4920 static void dissect_ul_config_ue_info_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
4921 {
4922         proto_item* item;
4923         guint32 test_value;
4924
4925         // Virtual cell ID enabled flag
4926         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_virtual_cell_id_enabled_flag, 1, ENC_BIG_ENDIAN, &test_value);
4927         if (test_value > 1)
4928         {
4929                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid virtual cell id enabled flag value [0..1]");
4930         }
4931
4932         // nPUCCH Identity
4933         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_npucch_identity, 2, ENC_BIG_ENDIAN, &test_value);
4934         if (test_value > 503)
4935         {
4936                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch identity value [0..503]");
4937         }
4938
4939 }
4940 static void dissect_ul_config_ue_info_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4941 {
4942         proto_item* item;
4943         guint32 test_value;
4944
4945         // UE Type
4946         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_type, 1, ENC_BIG_ENDIAN, &test_value);
4947         if (test_value > 2)
4948         {
4949                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue type value [0..2]");
4950         }
4951
4952         // Empty symbols
4953         // todo : use bit map decoding
4954         ptvcursor_add(ptvc, hf_nfapi_empty_symbols, 1, ENC_BIG_ENDIAN);
4955
4956         // Total Number of repetitions
4957         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_total_number_of_repetitions, 2, ENC_BIG_ENDIAN, &test_value);
4958         if (!(test_value >= 1 && test_value <= 32))
4959         {
4960                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid total number of repetitions value [1..32]");
4961         }
4962
4963         // Repetition Number
4964         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_repetition_number, 2, ENC_BIG_ENDIAN, &test_value);
4965         if (!(test_value >= 1 && test_value <= 32))
4966         {
4967                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid repetition number value [1..32]");
4968         }
4969
4970 }
4971 static void dissect_ul_config_cqi_info_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
4972 {
4973         proto_item* item;
4974         guint32 test_value;
4975
4976         // PUCCH index
4977         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_index, 2, ENC_BIG_ENDIAN, &test_value);
4978         if (test_value > 1184)
4979         {
4980                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch Index value [0..1184]");
4981         }
4982
4983         // DL CQI/PMI Size
4984         ptvcursor_add(ptvc, hf_nfapi_dl_cqi_pmi_size, 1, ENC_BIG_ENDIAN);
4985 }
4986 static void dissect_ul_config_cqi_info_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
4987 {
4988         proto_item* item;
4989         guint32 test_value;
4990
4991         // Number of PUCCH Resources
4992         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_pucch_resource, 1, ENC_BIG_ENDIAN, &test_value);
4993         if (!(test_value >= 1 && test_value <= 2))
4994         {
4995                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pucch resources value [1..2]");
4996         }
4997
4998         //PUCCH Index P1
4999         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_index_p1, 2, ENC_BIG_ENDIAN, &test_value);
5000         if (test_value > 1184)
5001         {
5002                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch Index p1 value [0..1184]");
5003         }
5004 }
5005 static void dissect_ul_config_cqi_info_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
5006 {
5007         proto_item* item;
5008         guint32 test_value;
5009
5010         // CSI_mode
5011         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_mode, 1, ENC_BIG_ENDIAN, &test_value);
5012         if (test_value > 2)
5013         {
5014                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi mode value [0..2]");
5015         }
5016
5017         // DL CQI/PMI Size 2
5018         ptvcursor_add(ptvc, hf_nfapi_dl_cqi_pmi_size_2, 2, ENC_BIG_ENDIAN);
5019
5020         // Starting PRB
5021         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_statring_prb, 1, ENC_BIG_ENDIAN, &test_value);
5022         if (test_value > 109)
5023         {
5024                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid starting prb value [0..109]");
5025         }
5026
5027         // n_PRB
5028         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nprb, 1, ENC_BIG_ENDIAN, &test_value);
5029         if (test_value > 7)
5030         {
5031                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n prb value [0..7]");
5032         }
5033
5034         // cdm_Index
5035         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cdm_index, 1, ENC_BIG_ENDIAN, &test_value);
5036         if (test_value > 1)
5037         {
5038                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cdm Index value [0..1]");
5039         }
5040
5041         // N srs
5042         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nsrs, 1, ENC_BIG_ENDIAN, &test_value);
5043         if (test_value > 1)
5044         {
5045                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n srs value [0..1]");
5046         }
5047
5048 }
5049 static void dissect_ul_config_sr_info_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
5050 {
5051         guint32 test_value;
5052         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_index, 1, ENC_BIG_ENDIAN, &test_value);
5053         if (test_value > 2047)
5054         {
5055                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch Index value [0..2047]");
5056         }
5057 }
5058 static void dissect_ul_config_sr_info_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
5059 {
5060         proto_item* item;
5061         guint32 test_value;
5062
5063         // Number of PUCCH Resources
5064         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_pucch_resource, 1, ENC_BIG_ENDIAN, &test_value);
5065         if (!(test_value >= 1 && test_value <= 2))
5066         {
5067                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pucch resources value [1..2]");
5068         }
5069
5070         // PUCCH Index P1
5071         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_index_p1, 2, ENC_BIG_ENDIAN, &test_value);
5072         if (test_value > 2047)
5073         {
5074                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch Index p1 value [0..2047]");
5075         }
5076 }
5077 static void dissect_ul_config_harq_info_uci_rel10_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
5078 {
5079         proto_item* item;
5080         guint32 test_value, ack_nack_mode_value;
5081
5082         // HARQ size
5083         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_size, 1, ENC_BIG_ENDIAN, &test_value);
5084         if (test_value > 21)
5085         {
5086                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq size value [0..21]");
5087         }
5088
5089         // ACK_NACK mode
5090         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tdd_ack_nack_mode, 1, ENC_BIG_ENDIAN, &ack_nack_mode_value);
5091         if (ack_nack_mode_value > 5)
5092         {
5093                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ack nack mode value [0..5]");
5094         }
5095
5096         // Number of PUCCH resources
5097         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_pucch_resource, 1, ENC_BIG_ENDIAN, &test_value);
5098         if (test_value > 4)
5099         {
5100                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pucch resources value [0..4]");
5101         }
5102
5103         // n_PUCCH_1_0
5104         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_0, 2, ENC_BIG_ENDIAN, &test_value);
5105         if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1 || ack_nack_mode_value == 2)
5106         {
5107                 if (test_value > 2047)
5108                 {
5109                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 0 value [0..2047] (All Format 1a/1b)");
5110                 }
5111         }
5112         else if (ack_nack_mode_value == 3)
5113         {
5114                 if (test_value > 549)
5115                 {
5116                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 0 value [0..549] (Format 3)");
5117                 }
5118         }
5119
5120         // n_PUCCH_1_1
5121         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_1, 2, ENC_BIG_ENDIAN, &test_value);
5122         if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1 || ack_nack_mode_value == 2)
5123         {
5124                 if (test_value > 2047)
5125                 {
5126                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 1 value [0..2047] (All Format 1a/1b)");
5127                 }
5128         }
5129
5130         // n_PUCCH_1_2
5131         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_2, 2, ENC_BIG_ENDIAN, &test_value);
5132         if (ack_nack_mode_value == 2)
5133         {
5134                 if (test_value > 2047)
5135                 {
5136                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 2 value [0..2047] (All Format 1a/1b)");
5137                 }
5138         }
5139
5140         // n_PUCCH_1_3
5141         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_3, 2, ENC_BIG_ENDIAN, &test_value);
5142         if (ack_nack_mode_value == 2)
5143         {
5144                 if (test_value > 2047)
5145                 {
5146                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 3 value [0..2047] (All Format 1a/1b)");
5147                 }
5148         }
5149 }
5150 static void dissect_ul_config_harq_info_uci_rel8_fdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
5151 {
5152         proto_item* item;
5153         guint32 test_value;
5154
5155         // n_PUCCH_1_0
5156         // todo : how to work out the ack_nack mode?
5157         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_0, 2, ENC_BIG_ENDIAN, &test_value);
5158         if (test_value > 2047)
5159         {
5160                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 0 value [0..2047]");
5161         }
5162
5163         // HARQ Size
5164         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_size, 1, ENC_BIG_ENDIAN, &test_value);
5165         if (!(test_value >= 1 && test_value <= 2))
5166         {
5167                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq size value [1..2]");
5168         }
5169 }
5170 static void dissect_ul_config_harq_info_uci_rel9_later_fdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
5171 {
5172         proto_item *item, *harq_size_item;
5173         guint32 test_value, harq_size_value, ack_nack_mode_value;
5174
5175         // HARQ Size
5176         harq_size_item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_size, 1, ENC_BIG_ENDIAN, &harq_size_value);
5177
5178         // ACK_NAK mode
5179         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_fdd_ack_nack_mode, 1, ENC_BIG_ENDIAN, &ack_nack_mode_value);
5180         if (ack_nack_mode_value > 4)
5181         {
5182                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ack nack mode value [0..4]");
5183         }
5184
5185         if (ack_nack_mode_value == 0 || ack_nack_mode_value == 2)
5186         {
5187                 if (!(harq_size_value >= 1 && harq_size_value <= 10))
5188                 {
5189                         expert_add_info_format(pinfo, harq_size_item, &ei_invalid_range, "Invalid harq size value [1..10] (Format 1a/1b/3)");
5190                 }
5191         }
5192         else if (ack_nack_mode_value == 3 || ack_nack_mode_value == 4)
5193         {
5194                 if (harq_size_value != 0)
5195                 {
5196                         expert_add_info_format(pinfo, harq_size_item, &ei_invalid_range, "Invalid harq size value [0] (Format 4/5)");
5197                 }
5198         }
5199
5200         // Number of PUCCH Resources
5201         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_pucch_resource, 1, ENC_BIG_ENDIAN, &test_value);
5202         if (test_value == 0 || test_value == 2)
5203         {
5204                 if (!(harq_size_value >= 1 && harq_size_value <= 4))
5205                 {
5206                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq size value [1..4] (Format 1a/1b/3)");
5207                 }
5208         }
5209         else if (test_value == 3 || test_value == 4)
5210         {
5211                 if (harq_size_value != 0)
5212                 {
5213                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq size value [0] (Format 4/5)");
5214                 }
5215         }
5216
5217         // n_PUCCH_1_0
5218         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_0, 2, ENC_BIG_ENDIAN, &test_value);
5219         if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1)
5220         {
5221                 if (test_value > 2047)
5222                 {
5223                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 1 0 value [0..2047] (Format 1a/1b/channel selection)");
5224                 }
5225         }
5226         else if (ack_nack_mode_value == 2)
5227         {
5228                 if (test_value > 549)
5229                 {
5230                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 1 0 value [0..549] (Format 3)");
5231                 }
5232         }
5233
5234         // n_PUCCH_1_1
5235         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_1, 2, ENC_BIG_ENDIAN, &test_value);
5236         if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1)
5237         {
5238                 if (test_value > 2047)
5239                 {
5240                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 1 1 value [0..2047] (Format 1a/1b/channel selection)");
5241                 }
5242         }
5243
5244         // n_PUCCH_1_2
5245         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_2, 2, ENC_BIG_ENDIAN, &test_value);
5246         if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1)
5247         {
5248                 if (test_value > 2047)
5249                 {
5250                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 1 2 value [0..2047] (Format 1a/1b/channel selection)");
5251                 }
5252         }
5253
5254         // n_PUCCH_1_3
5255         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_3, 2, ENC_BIG_ENDIAN, &test_value);
5256         if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1)
5257         {
5258                 if (test_value > 2047)
5259                 {
5260                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 1 3 value [0..2047] (Format 1a/1b/channel selection)");
5261                 }
5262         }
5263 }
5264 static void dissect_ul_config_harq_info_uci_rel11_fdd_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
5265 {
5266         proto_item* item;
5267         guint32 test_value;
5268
5269         // Num_ant_ports
5270         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_num_ant_ports, 1, ENC_BIG_ENDIAN, &test_value);
5271         if (!(test_value >= 1 && test_value <= 2))
5272         {
5273                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid num ant ports value [1..2]");
5274         }
5275
5276         // n_PUCCH_2_0
5277         // todo : how to work out the ack nack mode
5278         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_2_0, 2, ENC_BIG_ENDIAN, &test_value);
5279         if (test_value > 2047)
5280         {
5281                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 2 0 value [0..2047]");
5282         }
5283
5284         // n_PUCCH_2_1
5285         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_2_1, 2, ENC_BIG_ENDIAN, &test_value);
5286         if (test_value > 2047)
5287         {
5288                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 2 1 value [0..2047]");
5289         }
5290
5291         // n_PUCCH_2_2
5292         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_2_2, 2, ENC_BIG_ENDIAN, &test_value);
5293         if (test_value > 2047)
5294         {
5295                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 2 2 value [0..2047]");
5296         }
5297
5298         // n_PUCCH_2_3
5299         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_2_3, 2, ENC_BIG_ENDIAN, &test_value);
5300         if (test_value > 2047)
5301         {
5302                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 2 3 value [0..2047]");
5303         }
5304
5305 }
5306 static void dissect_ul_config_harq_info_uci_rel13_fdd_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
5307 {
5308         proto_item* item;
5309         guint32 test_value;
5310
5311         // HARQ Size 2
5312         ptvcursor_add(ptvc, hf_nfapi_harq_size_2, 2, ENC_BIG_ENDIAN);
5313
5314         // Starting PRB
5315         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_starting_prb, 1, ENC_BIG_ENDIAN, &test_value);
5316         if (test_value > 109)
5317         {
5318                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid starting prb value [0..109]");
5319         }
5320
5321         // n_PRB
5322         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nprb, 1, ENC_BIG_ENDIAN, &test_value);
5323         if (test_value > 109)
5324         {
5325                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n prb value [0..7]");
5326         }
5327
5328         // cdm_Index
5329         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cdm_index, 1, ENC_BIG_ENDIAN, &test_value);
5330         if (test_value > 1)
5331         {
5332                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cdm Index value [0..1]");
5333         }
5334
5335         // N srs
5336         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nsrs, 1, ENC_BIG_ENDIAN, &test_value);
5337         if (test_value > 1)
5338         {
5339                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n srs value [0..1]");
5340         }
5341 }
5342 static void dissect_ul_config_srs_info_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
5343 {
5344         proto_item* item;
5345         guint32 test_value;
5346
5347         // Handle
5348         ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
5349
5350         // Size
5351         ptvcursor_add(ptvc, hf_nfapi_size, 2, ENC_BIG_ENDIAN);
5352
5353         // RNTI
5354         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
5355         if (test_value < 1)
5356         {
5357                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
5358         }
5359
5360         // SRS Bandwidth
5361         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_srs_bandwidth, 1, ENC_BIG_ENDIAN, &test_value);
5362         if (test_value > 3)
5363         {
5364                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs bandwidth value [0..3]");
5365         }
5366
5367         // Frequency Domain Position
5368         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_domain_position, 1, ENC_BIG_ENDIAN, &test_value);
5369         if (test_value > 23)
5370         {
5371                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency domain bandwidth value [0..23]");
5372         }
5373
5374         // SRS Hopping Bandwidth
5375         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_srs_hopping_bandwidth, 1, ENC_BIG_ENDIAN, &test_value);
5376         if (test_value > 3)
5377         {
5378                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs hopping bandwidth value [0..3]");
5379         }
5380
5381         // Transmission Comb
5382         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_comb, 1, ENC_BIG_ENDIAN, &test_value);
5383         if (test_value > 3)
5384         {
5385                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission comb value [0..3]");
5386         }
5387
5388         // ISRS / SRS-ConfigIndex
5389         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_i_srs, 2, ENC_BIG_ENDIAN, &test_value);
5390         if (test_value > 1023)
5391         {
5392                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid isrs/srs-configindex value [0..1023]");
5393         }
5394
5395         // Sounding Reference Cyclic Shift
5396         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_sounding_reference_cyclic_shift, 1, ENC_BIG_ENDIAN, &test_value);
5397         if (test_value > 11)
5398         {
5399                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid sounding reference cyclic shift value [0..11]");
5400         }
5401 }
5402 static void dissect_ul_config_srs_info_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
5403 {
5404         guint32 test_value;
5405
5406         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_antenna_port, 1, ENC_BIG_ENDIAN, &test_value);
5407         if (test_value > 2)
5408         {
5409                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid antenna port value [0..2]");
5410         }
5411 }
5412 static void dissect_ul_config_srs_info_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
5413 {
5414         guint32 test_value;
5415
5416         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_combs, 1, ENC_BIG_ENDIAN, &test_value);
5417         if (test_value > 1)
5418         {
5419                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of combs value [0..1]");
5420         }
5421 }
5422 static void dissect_hi_dci0_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
5423 {
5424         guint32 test_value, size;
5425
5426         // PDU Type
5427         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_hi_dci0_pdu_type, 1, ENC_BIG_ENDIAN, &test_value);
5428         if (test_value > 3)
5429         {
5430                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdu type value [0..3]");
5431         }
5432
5433         // PDU Size
5434         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_size, 1, ENC_BIG_ENDIAN, &size);
5435
5436         guint pdu_end = (ptvcursor_current_offset(ptvc) + size - 2);
5437         dissect_tlv_list(ptvc, pinfo, pdu_end);
5438 }
5439 static void dissect_hi_dci0_request_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
5440 {
5441         guint32 test_value, num_pdu;
5442
5443         // SFN/SF
5444         ptvcursor_add(ptvc, hf_nfapi_sfn_sf, 2, ENC_BIG_ENDIAN);
5445
5446         // Number of DCI
5447         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_dci_pdus, 1, ENC_BIG_ENDIAN, &num_pdu);
5448
5449         // Number of HI
5450         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_hi_pdus, 1, ENC_BIG_ENDIAN, &test_value);
5451         num_pdu += test_value;
5452
5453         dissect_array_value(ptvc, pinfo, "HI DCI0 PDU List", ett_nfapi_hi_dci0_request_pdu_list, num_pdu, dissect_hi_dci0_pdu);
5454 }
5455 static void dissect_hi_dci0_hi_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
5456 {
5457         proto_item* item;
5458         guint32 test_value;
5459         gboolean test_boolean;
5460
5461         // Resource block start
5462         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_start, 1, ENC_BIG_ENDIAN, &test_value);
5463         if (test_value > 100)
5464         {
5465                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block start value [0..100]");
5466         }
5467
5468         // Cyclic Shift 2 for DMRS
5469         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cyclic_shift_2_for_drms, 1, ENC_BIG_ENDIAN, &test_value);
5470         if (test_value > 7)
5471         {
5472                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cyclic shift 2 for drms value [0..7]");
5473         }
5474
5475         // HI value
5476         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_hi_value, 1, ENC_BIG_ENDIAN, &test_boolean);
5477         if (test_boolean > 1)
5478         {
5479                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid hi value [0..1]");
5480         }
5481
5482         // I_PHICH
5483         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_i_phich, 1, ENC_BIG_ENDIAN, &test_value);
5484         if (test_value > 1)
5485         {
5486                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid i phich value [0..1]");
5487         }
5488
5489         // Transmission power
5490         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
5491         if (test_value > 10000)
5492         {
5493                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
5494         }
5495
5496 }
5497 static void dissect_hi_dci0_hi_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
5498 {
5499         proto_item* item;
5500         gboolean test_boolean;
5501
5502         // Flag TB2
5503         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_flag_tb2, 1, ENC_BIG_ENDIAN, &test_boolean);
5504         if (test_boolean > 1)
5505         {
5506                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid flag tb2 value [0..1]");
5507         }
5508
5509         // HI Value 2
5510         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_hi_value_2, 1, ENC_BIG_ENDIAN, &test_boolean);
5511         if (test_boolean > 1)
5512         {
5513                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid hi2 value [0..1]");
5514         }
5515
5516 }
5517 static void dissect_hi_dci0_dci_ul_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
5518 {
5519         proto_item* item;
5520         guint32 test_value;
5521
5522         // DCI format
5523         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_dci_format, 1, ENC_BIG_ENDIAN, &test_value);
5524         if (test_value > 4)
5525         {
5526                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci format value [0..4]");
5527         }
5528
5529         // CCE index
5530         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cce_idx, 1, ENC_BIG_ENDIAN, &test_value);
5531         if (test_value > 88)
5532         {
5533                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cce Index value [0..88]");
5534         }
5535
5536         // Aggregation level
5537         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_aggregation_level, 1, ENC_BIG_ENDIAN, &test_value);
5538         if (!(test_value == 1 || test_value == 2 || test_value == 4 ||
5539                   test_value == 8))
5540         {
5541                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid aggregation level value [1, 2, 4, 8]");
5542         }
5543
5544         // RNTI
5545         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
5546         if (test_value < 1)
5547         {
5548                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
5549         }
5550
5551         // Resource block start
5552         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_start, 1, ENC_BIG_ENDIAN, &test_value);
5553         if (test_value > 100)
5554         {
5555                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block start value [0..100]");
5556         }
5557
5558         // Number of resource blocks
5559         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_resource_blocks, 1, ENC_BIG_ENDIAN, &test_value);
5560         if (test_value > 100)
5561         {
5562                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of resource blocks value [0..100]");
5563         }
5564
5565         // MCS_1
5566         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs_1, 1, ENC_BIG_ENDIAN, &test_value);
5567         if (test_value > 31)
5568         {
5569                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs 1 value [0..31]");
5570         }
5571
5572         // Cyclic Shift 2 for DMRS
5573         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cyclic_shift_2_for_drms, 1, ENC_BIG_ENDIAN, &test_value);
5574         if (test_value > 7)
5575         {
5576                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cyclic shift 2 for drms value [0..7]");
5577         }
5578
5579         // Frequency hopping enabled flag
5580         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_enabled_flag, 1, ENC_BIG_ENDIAN, &test_value);
5581         if (test_value > 1)
5582         {
5583                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping enabled flag value [0..1]");
5584         }
5585
5586         // Frequency hopping bits
5587         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_bits, 1, ENC_BIG_ENDIAN, &test_value);
5588         if (test_value > 3)
5589         {
5590                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping bits value [0..3]");
5591         }
5592
5593         // New Data indication_1
5594         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indication, 1, ENC_BIG_ENDIAN, &test_value);
5595         if (test_value > 1)
5596         {
5597                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indication value [0..1]");
5598         }
5599
5600         // UE TX antenna selection
5601         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_tx_antenna_selection, 1, ENC_BIG_ENDIAN, &test_value);
5602         if (test_value > 2)
5603         {
5604                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue tx antenna selection value [0..2]");
5605         }
5606
5607         // TPC
5608         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpc, 1, ENC_BIG_ENDIAN, &test_value);
5609         if (test_value > 3)
5610         {
5611                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpc value value [0..3]");
5612         }
5613
5614         // CQI/CSI request
5615         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cqi_csi_request, 1, ENC_BIG_ENDIAN, &test_value);
5616         if (test_value > 7)
5617         {
5618                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cqi csi value [0..7]");
5619         }
5620
5621         // UL index
5622         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_index, 1, ENC_BIG_ENDIAN, &test_value);
5623         if (test_value > 3)
5624         {
5625                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul Index value [0..3]");
5626         }
5627
5628         // DL assignment index
5629         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_assignment_index, 1, ENC_BIG_ENDIAN, &test_value);
5630         if (!(test_value >= 1 && test_value <= 4))
5631         {
5632                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dl assignment Index value [1..4]");
5633         }
5634
5635         // TPC bitmap
5636         ptvcursor_add(ptvc, hf_nfapi_tpc_bitmap, 4, ENC_BIG_ENDIAN);
5637
5638         // Transmission power
5639         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
5640         if (test_value > 10000)
5641         {
5642                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
5643         }
5644 }
5645
5646 static void dissect_hi_dci0_dci_ul_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
5647 {
5648         proto_item* item;
5649         guint32 test_value, number_of_antenna_ports_value;
5650         gboolean test_boolean;
5651
5652         // Cross carrier scheduling flag
5653         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_cross_carrier_scheduling_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
5654         if (test_boolean > 1)
5655         {
5656                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cross carrier scheduling flag value [0..1]");
5657         }
5658
5659         // Carrier indicator
5660         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_carrier_indicator, 1, ENC_BIG_ENDIAN, &test_value);
5661         if (test_value > 7)
5662         {
5663                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid carrier indicator value [0..7]");
5664         }
5665
5666         // Size of CQI/CSI field
5667         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_size_of_cqi_csi_feild, 1, ENC_BIG_ENDIAN, &test_value);
5668         if (test_value > 2)
5669         {
5670                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid size of cqi/csi field value [0..2]");
5671         }
5672
5673         // SRS flag
5674         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
5675         if (test_boolean > 1)
5676         {
5677                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs field value [0..1]");
5678         }
5679
5680         // SRS request
5681         ptvcursor_add(ptvc, hf_nfapi_srs_request, 1, ENC_BIG_ENDIAN);
5682
5683         // Resource allocation flag
5684         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_flag, 1, ENC_BIG_ENDIAN, &test_value);
5685         if (test_value > 1)
5686         {
5687                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocation flag value [0..1]");
5688         }
5689
5690         // Resource allocation type
5691         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN, &test_value);
5692         if (test_value > 1)
5693         {
5694                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocation type value [0..1]");
5695         }
5696
5697         // Resource block coding
5698         ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
5699
5700         // MCS_2
5701         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs_2, 1, ENC_BIG_ENDIAN, &test_value);
5702         if (test_value > 31)
5703         {
5704                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs 2 value [0..31]");
5705         }
5706
5707         // New data indication_2
5708         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indication_two, 1, ENC_BIG_ENDIAN, &test_value);
5709         if (test_value > 1)
5710         {
5711                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indication 2 value [0..1]");
5712         }
5713
5714         // Number of antenna ports
5715         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_antenna_ports, 1, ENC_BIG_ENDIAN, &number_of_antenna_ports_value);
5716         if (number_of_antenna_ports_value > 2)
5717         {
5718                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of antenna ports value [0..2]");
5719         }
5720
5721         // TPMI
5722         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpmi, 1, ENC_BIG_ENDIAN, &test_value);
5723         if (number_of_antenna_ports_value == 2)
5724         {
5725                 if (test_value > 7)
5726                 {
5727                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi value [0..7]");
5728                 }
5729         }
5730         else if (number_of_antenna_ports_value == 4)
5731         {
5732                 if (test_value > 63)
5733                 {
5734                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi value [0..63]");
5735                 }
5736         }
5737
5738         // Total DCI length including padding
5739         ptvcursor_add(ptvc, hf_nfapi_total_dci_length_including_padding, 1, ENC_BIG_ENDIAN);
5740
5741         // N_UL_RB
5742         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_ul_rb, 1, ENC_BIG_ENDIAN, &test_value);
5743         if (!(test_value == 6 || test_value == 15 || test_value == 25 || test_value == 50 ||
5744                 test_value == 75 || test_value == 100))
5745         {
5746                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n ul rb value [6, 15, 25, 50, 75, 100]");
5747         }
5748 }
5749 static void dissect_hi_dci0_dci_ul_rel12_value(ptvcursor_t * ptvc, packet_info* pinfo)
5750 {
5751         proto_item* item;
5752         guint32 test_value;
5753
5754         // PSCCH Resource
5755         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pscch_resource, 1, ENC_BIG_ENDIAN, &test_value);
5756         if (test_value > 0x3F)
5757         {
5758                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pscch resource value [0..0x3F]");
5759         }
5760
5761         // Time resource pattern
5762         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_time_resource_pattern, 1, ENC_BIG_ENDIAN, &test_value);
5763         if (test_value > 0x7F)
5764         {
5765                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid time resource pattern value [0..0x7F]");
5766         }
5767
5768 }
5769 static void dissect_hi_dci0_mdpcch_dci_ul_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
5770 {
5771         proto_item* item;
5772         guint32 test_value, dci_format_value, count;
5773         gboolean test_boolean;
5774
5775         // MPDCCH Narrowband
5776         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_narrowband, 1, ENC_BIG_ENDIAN, &test_value);
5777         if (test_value > 15)
5778         {
5779                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mpdcch narrowband value [0..15]");
5780         }
5781
5782         // Number of PRB pairs
5783         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_prb_pairs, 1, ENC_BIG_ENDIAN, &test_value);
5784         if (!(test_value == 2 || test_value == 4 || test_value == 6))
5785         {
5786                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of prb pairs value [2, 4, 6]");
5787         }
5788
5789         // Resource Block Assignment
5790         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_assignment, 1, ENC_BIG_ENDIAN, &test_value);
5791         if (test_value > 14)
5792         {
5793                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block assignment value [0..14]");
5794         }
5795
5796         // MPDCCH transmission type
5797         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_transmission_type, 1, ENC_BIG_ENDIAN, &test_value);
5798         if (test_value > 1)
5799         {
5800                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mpdcch transmission type value [0..1]");
5801         }
5802
5803         // Start symbol
5804         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_start_symbol, 1, ENC_BIG_ENDIAN, &test_value);
5805         if (!(test_value >= 1 && test_value <=4))
5806         {
5807                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid start symbol value [0..1]");
5808         }
5809
5810         // ECCE index
5811         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ecce_index, 1, ENC_BIG_ENDIAN, &test_value);
5812         if (test_value > 22)
5813         {
5814                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ecce Index value [0..22]");
5815         }
5816
5817         // Aggregation level
5818         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_aggregation_level, 1, ENC_BIG_ENDIAN, &test_value);
5819         if (!(test_value == 2 || test_value == 4 || test_value == 8 ||
5820                 test_value == 16 || test_value == 24))
5821         {
5822                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid aggregation level value [2, 4, 8, 16, 24]");
5823         }
5824
5825         // RNTI type
5826         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_rnti_type, 1, ENC_BIG_ENDIAN, &test_value);
5827         if (!(test_value == 0 || test_value == 4))
5828         {
5829                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti type value [0, 4]");
5830         }
5831
5832         // RNTI
5833         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
5834         if (test_value < 1)
5835         {
5836                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
5837         }
5838
5839         // CEMode
5840         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ce_mode, 1, ENC_BIG_ENDIAN, &test_value);
5841         if (!(test_value == 1 || test_value == 2))
5842         {
5843                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cemode value [1,2]");
5844         }
5845
5846         // DMRS scrambling init
5847         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_scrambling_init, 2, ENC_BIG_ENDIAN, &test_value);
5848         if (test_value < 503)
5849         {
5850                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms scrambling init value [0..503]");
5851         }
5852
5853         // Initial transmission SF (io)
5854         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_transmission_sf, 2, ENC_BIG_ENDIAN, &test_value);
5855         if (!(test_value <= 10239 || test_value == 0xFFFF))
5856         {
5857                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial transmission sf io value [0..10239, 0xFFFF]");
5858         }
5859
5860         // Transmission power
5861         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
5862         if (test_value > 10000)
5863         {
5864                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
5865         }
5866
5867         // DCI format
5868         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_ul_dci_format, 1, ENC_BIG_ENDIAN, &dci_format_value);
5869         if (!(dci_format_value == 1 || dci_format_value == 2 || dci_format_value == 4 || dci_format_value == 5))
5870         {
5871                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci format value [1, 2, 4, 5]");
5872         }
5873
5874         // Resource block start
5875         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_start, 1, ENC_BIG_ENDIAN, &test_value);
5876         if (test_value > 99)
5877         {
5878                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block start value [0..99]");
5879         }
5880
5881         // Number of resource blocks
5882         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_resource_blocks, 1, ENC_BIG_ENDIAN, &test_value);
5883         if (!(test_value >= 1 && test_value <= 6))
5884         {
5885                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of resource blocks value [1..6]");
5886         }
5887
5888         // MCS
5889         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs, 1, ENC_BIG_ENDIAN, &test_value);
5890         if (test_value > 15)
5891         {
5892                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs value [0..15]");
5893         }
5894
5895         // PUSCH repetition levels
5896         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pusch_repetition_levels, 1, ENC_BIG_ENDIAN, &test_value);
5897         if (dci_format_value == 4)
5898         {
5899                 if (!(test_value >= 1 && test_value <= 4))
5900                 {
5901                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pusch repetition levels value [1..4]");
5902                 }
5903         }
5904         else if (dci_format_value == 5)
5905         {
5906                 if (!(test_value >= 1 && test_value <= 8))
5907                 {
5908                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pusch repetition levels value [1..8]");
5909                 }
5910         }
5911
5912         // Frequency hopping flag
5913         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_flag, 1, ENC_BIG_ENDIAN, &test_value);
5914         if (test_value > 1)
5915         {
5916                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping flag value [0..1]");
5917         }
5918
5919         // New Data indication
5920         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indication, 1, ENC_BIG_ENDIAN, &test_value);
5921         if (test_value > 1)
5922         {
5923                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indication value [0..1]");
5924         }
5925
5926         // HARQ process
5927         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_process, 1, ENC_BIG_ENDIAN, &test_value);
5928         if (test_value > 7)
5929         {
5930                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq process value [0..7]");
5931         }
5932
5933         // Redundancy version
5934         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version, 1, ENC_BIG_ENDIAN, &test_value);
5935         if (test_value > 3)
5936         {
5937                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy version value [0..3]");
5938         }
5939
5940         // TPC
5941         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpc, 1, ENC_BIG_ENDIAN, &test_value);
5942         if (test_value > 3)
5943         {
5944                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpc value [0..3]");
5945         }
5946
5947         // CSI request
5948         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_request, 1, ENC_BIG_ENDIAN, &test_value);
5949         if (test_value > 1)
5950         {
5951                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi request value [0..1]");
5952         }
5953
5954         // UL index
5955         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_index, 1, ENC_BIG_ENDIAN, &test_value);
5956         if (test_value > 3)
5957         {
5958                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul Index value [0..3]");
5959         }
5960
5961         // DAI presence flag
5962         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_dai_presence_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
5963         if (test_boolean > 1)
5964         {
5965                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dai presence value [0..1]");
5966         }
5967
5968         // DL assignment index
5969         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_assignment_index, 1, ENC_BIG_ENDIAN, &test_value);
5970         if (!(test_value >=1 && test_value <= 4))
5971         {
5972                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dl assignment value [1, 2, 3, 4]");
5973         }
5974
5975         // SRS request
5976         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_request, 1, ENC_BIG_ENDIAN, &test_boolean);
5977         if (test_boolean > 1)
5978         {
5979                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs request value [0..1]");
5980         }
5981
5982         // DCI subframe repetition number
5983         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dci_subframe_repetition_number, 1, ENC_BIG_ENDIAN, &test_value);
5984         if (!(test_value >= 1 && test_value <= 4))
5985         {
5986                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci subframe repetition number value [1..4]");
5987         }
5988
5989         //TPC bitmap
5990         ptvcursor_add(ptvc, hf_nfapi_tpc_bitmap, 4, ENC_BIG_ENDIAN);
5991
5992         // Total DCI length including padding
5993         ptvcursor_add(ptvc, hf_nfapi_total_dci_length_include_padding, 1, ENC_BIG_ENDIAN);
5994
5995         // Number of TX Antenna ports
5996         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_tx_antenna_ports, 1, ENC_BIG_ENDIAN, &count);
5997
5998         dissect_array_value(ptvc, pinfo, "TX Antenna Ports", ett_nfapi_tx_antenna_ports, count, dissect_precoding_value);
5999 }
6000 static void dissect_rx_ue_info_value(ptvcursor_t * ptvc, packet_info* pinfo)
6001 {
6002         guint32 test_value;
6003
6004         // Handle
6005         ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
6006
6007         // RNTI
6008         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
6009         if (test_value < 1)
6010         {
6011                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
6012         }
6013 }
6014 static void dissect_rx_indication_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
6015 {
6016         proto_item* item;
6017         guint32 test_value;
6018
6019         // Length
6020         ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
6021
6022         // Data offset
6023         ptvcursor_add(ptvc, hf_nfapi_data_offset, 2, ENC_BIG_ENDIAN);
6024
6025         // UL_CQI
6026         ptvcursor_add(ptvc, hf_nfapi_ul_cqi, 1, ENC_BIG_ENDIAN);
6027
6028         // Timing advance
6029         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN, &test_value);
6030         if (test_value > 63)
6031         {
6032                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..63]");
6033         }
6034 }
6035 static void dissect_rx_indication_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
6036 {
6037         guint32 test_value;
6038
6039         // Timing advance R9
6040         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance_r9, 2, ENC_BIG_ENDIAN, &test_value);
6041         if (test_value > 7690)
6042         {
6043                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance r9 value [0..7690]");
6044         }
6045
6046 }
6047 static void dissect_harq_indication_data_bundling_value(ptvcursor_t * ptvc, packet_info* pinfo)
6048 {
6049         proto_item* item;
6050         guint32 test_value;
6051
6052         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 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 0 [1..7]");
6056         }
6057
6058         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_1, 1, ENC_BIG_ENDIAN, &test_value);
6059         if (!(test_value >= 1 && test_value <= 7))
6060         {
6061                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 1 [1..7]");
6062         }
6063 }
6064 static void dissect_harq_indication_data_format_1a_1b_bundling_value(ptvcursor_t * ptvc, packet_info* pinfo)
6065 {
6066         guint32 test_value;
6067
6068         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6069         if (!(test_value >= 1 && test_value <= 7))
6070         {
6071                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6072         }
6073 }
6074 static void dissect_harq_indication_data_multplexing_value(ptvcursor_t * ptvc, packet_info* pinfo)
6075 {
6076         proto_item* item;
6077         guint32 test_value;
6078
6079         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 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 0 [1..7]");
6083         }
6084
6085         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_1, 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 1 [1..7]");
6089         }
6090
6091         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_2, 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 2 [1..7]");
6095         }
6096
6097         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_3, 1, ENC_BIG_ENDIAN, &test_value);
6098         if (!(test_value >= 1 && test_value <= 7))
6099         {
6100                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 3 [1..7]");
6101         }
6102
6103 }
6104 static void dissect_harq_indication_data_format_1a_1b_multplexing_value(ptvcursor_t * ptvc, packet_info* pinfo)
6105 {
6106         guint32 test_value;
6107         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6108         if (!(test_value >= 1 && test_value <= 7))
6109         {
6110                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6111         }
6112 }
6113 static void dissect_harq_indication_data_special_bundling_value(ptvcursor_t * ptvc, packet_info* pinfo)
6114 {
6115         guint32 test_value;
6116         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0_special, 1, ENC_BIG_ENDIAN, &test_value);
6117
6118         if (test_value > 4)
6119         {
6120                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [0..4]");
6121         }
6122 }
6123 static void dissect_harq_indication_data_format_1a_1b_special_bundling_value(ptvcursor_t * ptvc, packet_info* pinfo)
6124 {
6125         guint32 test_value;
6126         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0_special, 1, ENC_BIG_ENDIAN, &test_value);
6127         if (test_value > 4)
6128         {
6129                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [0..4]");
6130         }
6131 }
6132 static void dissect_harq_indication_data_channel_selection_value(ptvcursor_t * ptvc, packet_info* pinfo)
6133 {
6134         guint32 test_value;
6135         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6136         if (!(test_value >= 1 && test_value <= 7))
6137         {
6138                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6139         }
6140 }
6141 static void dissect_harq_indication_data_format_3_value(ptvcursor_t * ptvc, packet_info* pinfo)
6142 {
6143         guint32 test_value;
6144         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6145         if (!(test_value >= 1 && test_value <= 7))
6146         {
6147                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6148         }
6149 }
6150 static void dissect_harq_indication_data_format_4_value(ptvcursor_t * ptvc, packet_info* pinfo)
6151 {
6152         guint32 test_value;
6153         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6154         if (!(test_value >= 1 && test_value <= 7))
6155         {
6156                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6157         }
6158 }
6159 static void dissect_harq_indication_data_format_5_value(ptvcursor_t * ptvc, packet_info* pinfo)
6160 {
6161         guint32 test_value;
6162         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6163         if (!(test_value >= 1 && test_value <= 7))
6164         {
6165                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6166         }
6167 }
6168 static void dissect_harq_indication_rel8_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6169 {
6170         proto_item* item;
6171         guint32 test_value, mode;
6172
6173         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tdd_harq_mode, 1, ENC_BIG_ENDIAN, &mode);
6174         if (mode > 4)
6175         {
6176                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mode value [0..4]");
6177         }
6178
6179         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ack_nack, 1, ENC_BIG_ENDIAN, &test_value);
6180         if (!(test_value >= 1 && test_value <= 4))
6181         {
6182                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..4]");
6183         }
6184
6185         switch (mode)
6186         {
6187                 case 0:
6188                 {
6189                         dissect_harq_indication_data_bundling_value(ptvc, pinfo);
6190                         break;
6191                 }
6192                 case 1:
6193                 {
6194                         dissect_harq_indication_data_multplexing_value(ptvc, pinfo);
6195                         break;
6196                 }
6197                 case 2:
6198                 {
6199                         dissect_harq_indication_data_special_bundling_value(ptvc, pinfo);
6200                         break;
6201                 }
6202         };
6203 }
6204 static void dissect_harq_indication_rel9_later_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6205 {
6206         proto_item* item;
6207         guint32 mode, i, count;
6208
6209         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tdd_harq_mode, 1, ENC_BIG_ENDIAN, &mode);
6210         if (mode > 4)
6211         {
6212                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mode value [0..4]");
6213         }
6214
6215         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ack_nack, 1, ENC_BIG_ENDIAN, &count);
6216         if (mode == 0 || mode == 1)
6217         {
6218                 if (!(count >= 1 && count <= 4))
6219                 {
6220                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..4]");
6221                 }
6222         }
6223         else if (mode == 3)
6224         {
6225                 if (!(count >= 1 && count <= 8))
6226                 {
6227                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..8]");
6228                 }
6229         }
6230         else if (mode == 4)
6231         {
6232                 if (!(count >= 1 && count <= 21))
6233                 {
6234                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..21]");
6235                 }
6236         }
6237
6238
6239         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_harq_ack_nack_data, "ACK/NACK Data");
6240
6241         for (i = 0; i < count; ++i)
6242         {
6243                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_harq_ack_nack_data, "[%d]", i);
6244
6245                 switch (mode)
6246                 {
6247                         case 0:
6248                         {
6249                                 dissect_harq_indication_data_format_1a_1b_bundling_value(ptvc, pinfo);
6250                                 break;
6251                         }
6252                         case 1:
6253                         {
6254                                 dissect_harq_indication_data_format_1a_1b_multplexing_value(ptvc, pinfo);
6255                                 break;
6256                         }
6257                         case 2:
6258                         {
6259                                 dissect_harq_indication_data_format_1a_1b_special_bundling_value(ptvc, pinfo);
6260                                 break;
6261                         }
6262                         case 3:
6263                         {
6264                                 dissect_harq_indication_data_channel_selection_value(ptvc, pinfo);
6265                                 break;
6266                         }
6267                         case 4:
6268                         {
6269                                 dissect_harq_indication_data_format_3_value(ptvc, pinfo);
6270                                 break;
6271                         }
6272                 };
6273
6274                 ptvcursor_pop_subtree(ptvc);
6275         }
6276
6277         ptvcursor_pop_subtree(ptvc);
6278 }
6279 static void dissect_harq_indication_rel13_later_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6280 {
6281         proto_item* item;
6282         guint32 mode, i, count;
6283
6284         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tdd_harq_mode, 1, ENC_BIG_ENDIAN, &mode);
6285         if (mode > 6)
6286         {
6287                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mode value [0..6]");
6288         }
6289
6290         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ack_nack, 2, ENC_BIG_ENDIAN, &count);
6291         if (mode == 0 || mode == 1)
6292         {
6293                 if (!(count >= 1 && count <= 4))
6294                 {
6295                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..4]");
6296                 }
6297         }
6298         else if (mode == 3)
6299         {
6300                 if (!(count >= 1 && count <= 8))
6301                 {
6302                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..8]");
6303                 }
6304         }
6305         else if (mode == 4)
6306         {
6307                 if (!(count >= 1 && count <= 21))
6308                 {
6309                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..21]");
6310                 }
6311         }
6312         else if (mode == 5 || mode == 6)
6313         {
6314                 if (count < 22)
6315                 {
6316                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [>= 22]");
6317                 }
6318
6319         }
6320
6321         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_harq_ack_nack_data, "ACK/NACK Data");
6322
6323         for (i = 0; i < count; ++i)
6324         {
6325                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_harq_ack_nack_data, "[%d]", i);
6326
6327                 switch (mode)
6328                 {
6329                         case 0:
6330                         {
6331                                 dissect_harq_indication_data_format_1a_1b_bundling_value(ptvc, pinfo);
6332                                 break;
6333                         }
6334                         case 1:
6335                         {
6336                                 dissect_harq_indication_data_format_1a_1b_multplexing_value(ptvc, pinfo);
6337                                 break;
6338                         }
6339                         case 2:
6340                         {
6341                                 dissect_harq_indication_data_special_bundling_value(ptvc, pinfo);
6342                                 break;
6343                         }
6344                         case 3:
6345                         {
6346                                 dissect_harq_indication_data_channel_selection_value(ptvc, pinfo);
6347                                 break;
6348                         }
6349                         case 4:
6350                         {
6351                                 dissect_harq_indication_data_format_3_value(ptvc, pinfo);
6352                                 break;
6353                         }
6354                         case 5:
6355                         {
6356                                 dissect_harq_indication_data_format_4_value(ptvc, pinfo);
6357                                 break;
6358                         }
6359                         case 6:
6360                         {
6361                                 dissect_harq_indication_data_format_5_value(ptvc, pinfo);
6362                                 break;
6363                         }
6364                 };
6365
6366                 ptvcursor_pop_subtree(ptvc);
6367         }
6368
6369         ptvcursor_pop_subtree(ptvc);
6370 }
6371 static void dissect_harq_indication_rel8_fdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6372 {
6373         proto_item* item;
6374         guint32 test_value;
6375
6376         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_tb_1, 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 1 [1..7]");
6380         }
6381
6382         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_tb_2, 1, ENC_BIG_ENDIAN, &test_value);
6383         if (!(test_value >= 1 && test_value <= 7))
6384         {
6385                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq tb 2 [1..7]");
6386         }
6387
6388 }
6389 static void dissect_harq_tb_value(ptvcursor_t * ptvc, packet_info* pinfo)
6390 {
6391         guint32 test_value;
6392         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_tb_n, 1, ENC_BIG_ENDIAN, &test_value);
6393
6394         if (!(test_value >= 1 && test_value <= 7))
6395         {
6396                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq tb n [1..7]");
6397         }
6398 }
6399 static void dissect_harq_indication_rel9_later_fdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6400 {
6401         guint32 harq_mode_value, count;
6402
6403         // Mode
6404         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_fdd_harq_mode, 1, ENC_BIG_ENDIAN, &harq_mode_value);
6405         if (harq_mode_value > 2)
6406         {
6407                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq mode value [0..2]");
6408         }
6409
6410         // Number of ACK/NACK
6411         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ack_nack, 1, ENC_BIG_ENDIAN, &count);
6412
6413         if (harq_mode_value == 0)
6414         {
6415                 if (!(count >=1 && count <= 2))
6416                 {
6417                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..2]");
6418                 }
6419         }
6420         else if (harq_mode_value == 1)
6421         {
6422                 if (!(count >= 1 && count <= 4))
6423                 {
6424                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..4]");
6425                 }
6426
6427         }
6428         else if (harq_mode_value == 2)
6429         {
6430                 if (!(count >= 1 && count <= 10))
6431                 {
6432                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..10]");
6433                 }
6434
6435         }
6436
6437         dissect_array_value(ptvc, pinfo, "HARQ TB List", ett_nfapi_harq_data, count, dissect_harq_tb_value);
6438 }
6439 static void dissect_harq_indication_rel13_later_fdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6440 {
6441         guint32 harq_mode_value, count;
6442
6443         // Mode
6444         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_fdd_harq_mode, 1, ENC_BIG_ENDIAN, &harq_mode_value);
6445         if (harq_mode_value > 4)
6446         {
6447                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq mode value [0..4]");
6448         }
6449
6450         // Number of ACK/NACK
6451         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ack_nack, 2, ENC_BIG_ENDIAN, &count);
6452
6453         if (harq_mode_value == 0)
6454         {
6455                 if (!(count >= 1 && count <= 2))
6456                 {
6457                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..2]");
6458                 }
6459         }
6460         else if (harq_mode_value == 1)
6461         {
6462                 if (!(count >= 1 && count <= 4))
6463                 {
6464                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..4]");
6465                 }
6466
6467         }
6468         else if (harq_mode_value == 2)
6469         {
6470                 if (!(count >= 1 && count <= 10))
6471                 {
6472                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..10]");
6473                 }
6474         }
6475         else if (harq_mode_value == 3 || harq_mode_value == 4)
6476         {
6477                 if (count < 22)
6478                 {
6479                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [>= 22]");
6480                 }
6481         }
6482
6483         dissect_array_value(ptvc, pinfo, "HARQ TB List", ett_nfapi_harq_data, count, dissect_harq_tb_value);
6484 }
6485 static void dissect_ul_cqi_information_value(ptvcursor_t * ptvc, packet_info* pinfo)
6486 {
6487         proto_item* item;
6488         guint32 test_value;
6489
6490         // UL_CQI
6491         ptvcursor_add(ptvc, hf_nfapi_ul_cqi, 1, ENC_BIG_ENDIAN);
6492
6493         // Channel
6494         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_channel, 1, ENC_BIG_ENDIAN, &test_value);
6495         if (test_value > 1)
6496         {
6497                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid channel value [0..1]");
6498         }
6499 }
6500 static void dissect_crc_indication_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
6501 {
6502         gboolean test_boolean;
6503
6504         // CRC Flag
6505         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_crc_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
6506         if (test_boolean > 1)
6507         {
6508                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid crc flag value [0..1]");
6509         }
6510 }
6511 static void dissect_rx_cqi_indication_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
6512 {
6513         proto_item* item;
6514         guint32 test_value;
6515
6516         //Length
6517         ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
6518
6519         // Data Offset
6520         ptvcursor_add(ptvc, hf_nfapi_data_offset, 2, ENC_BIG_ENDIAN);
6521
6522         // UL_CQI
6523         ptvcursor_add(ptvc, hf_nfapi_ul_cqi, 1, ENC_BIG_ENDIAN);
6524
6525         // RI
6526         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ri, 1, ENC_BIG_ENDIAN, &test_value);
6527         if (test_value > 8)
6528         {
6529                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ri value [0..8]");
6530         }
6531
6532         // Timing Advance
6533         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN, &test_value);
6534         if (test_value > 63)
6535         {
6536                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..63]");
6537         }
6538 }
6539 static void dissect_ri_value(ptvcursor_t * ptvc, packet_info* pinfo)
6540 {
6541         guint32 test_value;
6542
6543         // RI
6544         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ri, 1, ENC_BIG_ENDIAN, &test_value);
6545         if (test_value > 8)
6546         {
6547                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ri value [0..8]");
6548         }
6549 }
6550 static void dissect_rx_cqi_indication_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
6551 {
6552         proto_item* item;
6553         guint32 test_value, count;
6554
6555         // Length
6556         ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
6557
6558         // Data Offset
6559         ptvcursor_add(ptvc, hf_nfapi_data_offset, 2, ENC_BIG_ENDIAN);
6560
6561         // UL_CQI
6562         ptvcursor_add(ptvc, hf_nfapi_ul_cqi, 1, ENC_BIG_ENDIAN);
6563
6564         // Number of CC reported
6565         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_cc_reported, 1, ENC_BIG_ENDIAN, &count);
6566         if (!(count >= 1 && count <= 5))
6567         {
6568                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of CC reported value [1..5]");
6569         }
6570
6571         dissect_array_value(ptvc, pinfo, "CC List", ett_nfapi_cc, count, dissect_ri_value);
6572
6573         // Timing Advance
6574         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN, &test_value);
6575         if (test_value > 63)
6576         {
6577                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..63]");
6578         }
6579
6580         // Timing Advance R9
6581         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance_r9, 2, ENC_BIG_ENDIAN, &test_value);
6582         if (test_value > 7690)
6583         {
6584                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..7690]");
6585         }
6586 }
6587 static void dissect_rach_indication_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
6588 {
6589         proto_item* item;
6590         guint32 test_value;
6591
6592         // RNTI
6593         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
6594         if (test_value < 1)
6595         {
6596                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
6597         }
6598
6599         // Preamble
6600         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_preamble, 1, ENC_BIG_ENDIAN, &test_value);
6601         if (test_value > 63)
6602         {
6603                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid preamble value [0..63]");
6604         }
6605
6606         // Timing Advance
6607         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN, &test_value);
6608         if (test_value > 1282)
6609         {
6610                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..1282]");
6611         }
6612
6613 }
6614 static void dissect_rach_indication_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
6615 {
6616         guint32 test_value;
6617
6618         // Timing Advance R9
6619         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance_r9, 2, ENC_BIG_ENDIAN, &test_value);
6620         if (test_value > 7690)
6621         {
6622                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..7690]");
6623         }
6624 }
6625 static void dissect_rach_indication_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
6626 {
6627         guint32 test_value;
6628
6629         // RACH resource type
6630         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rach_resource_type, 1, ENC_BIG_ENDIAN, &test_value);
6631         if (test_value > 4)
6632         {
6633                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rach resource type value [0..4]");
6634         }
6635 }
6636 static void dissect_snr_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
6637 {
6638         // SNR
6639         ptvcursor_add(ptvc, hf_nfapi_snr, 1, ENC_BIG_ENDIAN);
6640 }
6641 static void dissect_srs_indication_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
6642 {
6643         proto_item* item;
6644         guint32 test_value, count;
6645
6646         // Doppler estimation
6647         ptvcursor_add(ptvc, hf_nfapi_doppler_estimation, 2, ENC_BIG_ENDIAN);
6648
6649         // Timing Advance
6650         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN, &test_value);
6651         if (test_value > 1282)
6652         {
6653                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..1282]");
6654         }
6655
6656         // Number of resource blocks
6657         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_resource_blocks, 1, ENC_BIG_ENDIAN, &count);
6658
6659         // RB start
6660         ptvcursor_add(ptvc, hf_nfapi_rb_start, 1, ENC_BIG_ENDIAN);
6661
6662
6663         dissect_array_value(ptvc, pinfo, "RB List", ett_nfapi_rbs, count, dissect_snr_value);
6664 }
6665 static void dissect_srs_indication_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
6666 {
6667         guint32 test_value;
6668
6669         // Timing Advance R9
6670         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance_r9, 2, ENC_BIG_ENDIAN, &test_value);
6671         if (test_value > 7690)
6672         {
6673                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..7690]");
6674         }
6675 }
6676 static void dissect_srs_indication_rel10_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6677 {
6678         guint32 test_value;
6679
6680         // UpPTS Symbol
6681         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_up_pts_symbol, 1, ENC_BIG_ENDIAN, &test_value);
6682         if (test_value > 1)
6683         {
6684                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid up pts symbol value [0..1]");
6685         }
6686
6687 }
6688 static void dissect_tdd_channel_measurement_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
6689 {
6690         guint32 i, j, num_subbands, num_phy_ant;
6691
6692         // numPRBperSubband
6693         ptvcursor_add(ptvc, hf_nfapi_number_prb_per_subband, 1, ENC_BIG_ENDIAN);
6694
6695         // Number of subbands
6696         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_subbands, 1, ENC_BIG_ENDIAN, &num_subbands);
6697
6698         // numAntennas
6699         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_antennas, 1, ENC_BIG_ENDIAN, &num_phy_ant);
6700
6701         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_subbands, "Subbands");
6702
6703         for (i = 0; i < num_subbands; ++i)
6704         {
6705                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_subbands, "[%d]", i);
6706
6707                 // subbandIndex
6708                 ptvcursor_add(ptvc, hf_nfapi_subband_index, 1, ENC_BIG_ENDIAN);
6709
6710                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_antennas, "Physical Antennas");
6711
6712                 for (j = 0; j < num_phy_ant; ++j)
6713                 {
6714                         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_antennas, "[%d]", j);
6715
6716                         // Channel
6717                         ptvcursor_add(ptvc, hf_nfapi_channel_coefficient, 2, ENC_BIG_ENDIAN);
6718
6719                         ptvcursor_pop_subtree(ptvc);
6720                 }
6721
6722                 ptvcursor_pop_subtree(ptvc);
6723
6724                 ptvcursor_pop_subtree(ptvc);
6725         }
6726
6727         ptvcursor_pop_subtree(ptvc);
6728 }
6729 static void dissect_srs_indication_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
6730 {
6731         guint32 test_value;
6732
6733         //UL_RTOA
6734         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_rtoa, 2, ENC_BIG_ENDIAN, &test_value);
6735         if (test_value > 4800)
6736         {
6737                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul rtoa value [0..4800]");
6738         }
6739 }
6740 static void dissect_lbt_dl_config_request_pdsch_req_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
6741 {
6742         proto_item* item;
6743         guint32 test_value;
6744         guint32 test_boolean;
6745
6746         // Handle
6747         ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
6748
6749         // nCCA
6750         ptvcursor_add(ptvc, hf_nfapi_mp_cca, 4, ENC_BIG_ENDIAN);
6751
6752         // NCCA
6753         ptvcursor_add(ptvc, hf_nfapi_n_cca, 4, ENC_BIG_ENDIAN);
6754
6755         // Offset
6756         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_offset, 4, ENC_BIG_ENDIAN, &test_value);
6757         if (test_value > 999)
6758         {
6759                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid offset value [0..999]");
6760         }
6761
6762         // LTE TXOP SF
6763         ptvcursor_add(ptvc, hf_nfapi_lte_txop_sf, 4, ENC_BIG_ENDIAN);
6764
6765         // TXOP SFN/SF End
6766         ptvcursor_add(ptvc, hf_nfapi_txop_sfn_sf_end, 2, ENC_BIG_ENDIAN);
6767
6768         // LBT mode
6769         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_lbt_mode, 4, ENC_BIG_ENDIAN, &test_boolean);
6770         if (test_boolean > 1)
6771         {
6772                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid offset value [0..1]");
6773         }
6774 }
6775 static void dissect_lbt_dl_config_request_drs_req_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
6776 {
6777         proto_item* item;
6778         guint32 test_value;
6779         guint32 test_boolean;
6780
6781         // Handle
6782         ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
6783
6784         // Offset
6785         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_offset, 4, ENC_BIG_ENDIAN, &test_value);
6786         if (test_value > 999)
6787         {
6788                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid offset value [0..999]");
6789         }
6790
6791         // SFN/SF End
6792         ptvcursor_add(ptvc, hf_nfapi_sfn_sf_end, 2, ENC_BIG_ENDIAN);
6793
6794         // LBT mode
6795         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_lbt_mode, 4, ENC_BIG_ENDIAN, &test_boolean);
6796         if (test_boolean > 1)
6797         {
6798                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid offset value [0..1]");
6799         }
6800 }
6801 static void dissect_lbt_dl_config_request_pdsch_resp_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
6802 {
6803         proto_item* item;
6804         guint32 test_boolean;
6805
6806         // Handle
6807         ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
6808
6809         // result
6810         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_result, 4, ENC_BIG_ENDIAN, &test_boolean);
6811         if (test_boolean > 1)
6812         {
6813                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid result value [0..1]");
6814         }
6815
6816         // LTE TXOP symbols
6817         ptvcursor_add(ptvc, hf_nfapi_txop_symbols, 4, ENC_BIG_ENDIAN);
6818
6819         // Initial Partial SF
6820         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_initial_partial_sf, 4, ENC_BIG_ENDIAN, &test_boolean);
6821         if (test_boolean > 1)
6822         {
6823                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial partial sf value [0..1]");
6824         }
6825 }
6826 static void dissect_lbt_dl_config_request_drs_resp_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
6827 {
6828         proto_item* item;
6829         guint32 test_boolean;
6830
6831         // Handle
6832         ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
6833
6834         // result
6835         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_result, 4, ENC_BIG_ENDIAN, &test_boolean);
6836         if (test_boolean > 1)
6837         {
6838                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid result value [0..1]");
6839         }
6840 }
6841 static void dissect_tx_pdu(ptvcursor_t * ptvc, packet_info* pinfo _U_)
6842 {
6843         guint32 len;
6844
6845         // PDU length
6846         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_length, 2, ENC_BIG_ENDIAN, &len);
6847
6848         // PDU index
6849         ptvcursor_add(ptvc, hf_nfapi_pdu_index, 2, ENC_BIG_ENDIAN);
6850
6851         // PDU#N
6852         ptvcursor_add(ptvc, hf_nfapi_pdu, len, ENC_NA);
6853 }
6854 static void dissect_tx_request_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
6855 {
6856         guint32 num_pdu;
6857
6858         // Number of PDUs
6859         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 2, ENC_BIG_ENDIAN, &num_pdu);
6860
6861         dissect_array_value(ptvc, pinfo, "TX PDU List", ett_nfapi_tx_request_pdu_list, num_pdu, dissect_tx_pdu);
6862 }
6863 static void dissect_harq_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
6864 {
6865         guint32 instance_len;
6866
6867         // Instance Length
6868         ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
6869
6870         guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
6871         dissect_tlv_list(ptvc, pinfo, instance_end);
6872 }
6873 static void dissect_harq_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
6874 {
6875         guint32 num_pdu;
6876
6877         // Number of HARQs
6878         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_harqs, 2, ENC_BIG_ENDIAN, &num_pdu);
6879
6880         dissect_array_value(ptvc, pinfo, "HARQ PDU List", ett_nfapi_harq_indication_pdu_list, num_pdu, dissect_harq_indication_pdu);
6881 }
6882 static void dissect_crc_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
6883 {
6884         guint32 instance_len;
6885
6886         // Instance Length
6887         ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
6888
6889         guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
6890         dissect_tlv_list(ptvc, pinfo, instance_end);
6891 }
6892 static void dissect_crc_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
6893 {
6894         guint32 num_pdu;
6895
6896         // Number of CRCs
6897         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_crcs, 2, ENC_BIG_ENDIAN, &num_pdu);
6898         dissect_array_value(ptvc, pinfo, "CRC PDU List", ett_nfapi_crc_indication_pdu_list, num_pdu, dissect_crc_indication_pdu);
6899 }
6900 static void dissect_sr_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
6901 {
6902         guint32 instance_len;
6903
6904         // Instance Length
6905         ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
6906
6907         guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
6908         dissect_tlv_list(ptvc, pinfo, instance_end);
6909 }
6910 static void dissect_rx_sr_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
6911 {
6912         guint32 num_pdu;
6913
6914         // Number of SRs
6915         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_srs, 2, ENC_BIG_ENDIAN, &num_pdu);
6916
6917         dissect_array_value(ptvc, pinfo, "SR PDU List", ett_nfapi_sr_indication_pdu_list, num_pdu, dissect_sr_indication_pdu);
6918 }
6919 static void dissect_cqi_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
6920 {
6921         guint32 instance_len;
6922
6923         // Instance Length
6924         ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
6925
6926         guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
6927         dissect_tlv_list(ptvc, pinfo, instance_end);
6928 }
6929 static void dissect_rx_cqi_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
6930 {
6931         guint32 i, num_pdu;
6932         guint16* lengths = NULL;
6933
6934         // Number of PDUs
6935         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_cqi, 2, ENC_BIG_ENDIAN, &num_pdu);
6936
6937
6938         tvbuff_t* tvb = ptvcursor_tvbuff(ptvc);
6939         guint32 tmp_offset = ptvcursor_current_offset(ptvc);
6940
6941         if (num_pdu > 0)
6942         {
6943                 lengths = (guint16*)wmem_alloc0(wmem_packet_scope(), num_pdu * 2);
6944         }
6945
6946         for (i = 0; i < num_pdu; ++i)
6947         {
6948                 guint32 instance_len = tvb_get_ntohs(tvb, tmp_offset);
6949                 tmp_offset += 2;
6950                 guint32 pdu_end = tmp_offset + instance_len;
6951
6952                 while (tmp_offset < pdu_end)
6953                 {
6954                         guint16 tlv_id = tvb_get_ntohs(tvb, tmp_offset);
6955                         tmp_offset += 2;
6956                         guint16 tlv_len = tvb_get_ntohs(tvb, tmp_offset);
6957                         tmp_offset += 2;
6958
6959                         if (tlv_id == 0x202F)
6960                         {
6961                                 lengths[i] = tvb_get_ntohs(tvb, tmp_offset);
6962                         }
6963                         else if (tlv_id == 0x2030)
6964                         {
6965                                 lengths[i] = tvb_get_ntohs(tvb, tmp_offset);
6966                         }
6967
6968                         tmp_offset += tlv_len;
6969                 }
6970         }
6971
6972         dissect_array_value(ptvc, pinfo, "CQI PDU List", ett_nfapi_cqi_indication_pdu_list, num_pdu, dissect_cqi_indication_pdu);
6973
6974         for (i = 0; i < num_pdu; ++i)
6975         {
6976                 ptvcursor_add(ptvc, hf_nfapi_pdu, lengths[i], ENC_NA);
6977         }
6978 }
6979 static void dissect_preamble_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
6980 {
6981         guint32 instance_len;
6982
6983         // Instance Length
6984         ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
6985
6986         guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
6987         dissect_tlv_list(ptvc, pinfo, instance_end);
6988 }
6989 static void dissect_rach_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
6990 {
6991         guint32 num_pdu;
6992
6993         // Number of Preambles
6994         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_preambles, 2, ENC_BIG_ENDIAN, &num_pdu);
6995         dissect_array_value(ptvc, pinfo, "Preamble PDU List", ett_nfapi_preamble_indication_pdu_list, num_pdu, dissect_preamble_indication_pdu);
6996 }
6997 static void dissect_srs_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
6998 {
6999         guint32 instance_len;
7000
7001         // Instance Length
7002         ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
7003         guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
7004         dissect_tlv_list(ptvc, pinfo, instance_end);
7005 }
7006 static void dissect_srs_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
7007 {
7008         guint32 num_pdu;
7009
7010         // Number of UEs
7011         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_srss, 1, ENC_BIG_ENDIAN, &num_pdu);
7012         dissect_array_value(ptvc, pinfo, "SRS PDU List", ett_nfapi_srs_indication_pdu_list, num_pdu, dissect_srs_indication_pdu);
7013 }
7014 static void dissect_lbt_dl_config_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
7015 {
7016         guint32 test_value, size;
7017
7018         // PDU Type
7019         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_lbt_dl_req_pdu_type, 1, ENC_BIG_ENDIAN, &test_value);
7020         if (test_value > 1)
7021         {
7022                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdu type value [0..1]");
7023         }
7024
7025         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_size, 1, ENC_BIG_ENDIAN, &size);
7026         guint pdu_end = (ptvcursor_current_offset(ptvc) + size - 2);
7027
7028         dissect_tlv_list(ptvc, pinfo, pdu_end);
7029 }
7030 static void dissect_lbt_dl_config_request_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
7031 {
7032         guint32 num_pdu;
7033
7034         // Number of PDUs
7035         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 2, ENC_BIG_ENDIAN, &num_pdu);
7036         if (!(num_pdu >= 1 && num_pdu <= 2))
7037         {
7038                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pdus value [1..2]");
7039         }
7040
7041         dissect_array_value(ptvc, pinfo, "LBT DL PDU List", ett_nfapi_lbt_dl_config_pdu_list, num_pdu, dissect_lbt_dl_config_pdu);
7042 }
7043 static void dissect_lbt_dl_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
7044 {
7045         guint32 test_value, size;
7046
7047         // PDU Type
7048         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_lbt_dl_ind_pdu_type, 1, ENC_BIG_ENDIAN, &test_value);
7049         if (test_value > 1)
7050         {
7051                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdu type value [0..1]");
7052         }
7053
7054         // PDU Size
7055         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_size, 1, ENC_BIG_ENDIAN, &size);
7056         guint32 pdu_end = (ptvcursor_current_offset(ptvc) + size - 2);
7057         dissect_tlv_list(ptvc, pinfo, pdu_end);
7058 }
7059 static void dissect_lbt_indication_message_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
7060 {
7061         guint32 num_pdu;
7062
7063         // Number of PDUs
7064         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 2, ENC_BIG_ENDIAN, &num_pdu);
7065         if (!(num_pdu >= 1 && num_pdu <= 2))
7066         {
7067                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pdus value [1..2]");
7068         }
7069
7070         dissect_array_value(ptvc, pinfo, "LBT DL PDU List", ett_nfapi_lbt_dl_indication_pdu_list, num_pdu, dissect_lbt_dl_indication_pdu);
7071 }
7072 static void dissect_lte_rssi_request_value(ptvcursor_t * ptvc, packet_info* pinfo)
7073 {
7074         guint32 test_value, num_earfcns;
7075
7076         // Frequency Band Indicator
7077         ptvcursor_add(ptvc, hf_nfapi_frequency_band_indicator, 1, ENC_BIG_ENDIAN);
7078
7079         // Measurement Period
7080         ptvcursor_add(ptvc, hf_nfapi_measurement_period, 2, ENC_BIG_ENDIAN);
7081
7082         // Bandwidth
7083         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_bandwidth, 1, ENC_BIG_ENDIAN, &test_value);
7084         if (!(test_value == 6 || test_value == 15 || test_value == 25 ||
7085                 test_value == 50 || test_value == 75 || test_value == 100))
7086         {
7087                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid bandwidth value [6, 15, 25, 50, 75, 100]");
7088         }
7089
7090         // Timeout
7091         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7092
7093         // Number of EARFCNs
7094         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_earfcns, 1, ENC_BIG_ENDIAN, &num_earfcns);
7095
7096         dissect_array_value(ptvc, pinfo, "EARFCNs", ett_nfapi_earfcn_list, num_earfcns, dissect_earfcn_value);
7097 }
7098 static void dissect_uarfcn_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7099 {
7100         // UARFCN
7101         ptvcursor_add(ptvc, hf_nfapi_uarfcn, 2, ENC_BIG_ENDIAN);
7102 }
7103 static void dissect_utran_rssi_request_value(ptvcursor_t * ptvc, packet_info* pinfo)
7104 {
7105         guint32 num_uarfcns;
7106
7107         // Frequency Band Indicator
7108         ptvcursor_add(ptvc, hf_nfapi_frequency_band_indicator, 1, ENC_BIG_ENDIAN);
7109
7110         // Measurement Period
7111         ptvcursor_add(ptvc, hf_nfapi_measurement_period, 2, ENC_BIG_ENDIAN);
7112
7113         // Timeout
7114         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7115
7116         // Number of UARFCNs
7117         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_uarfcns, 1, ENC_BIG_ENDIAN, &num_uarfcns);
7118
7119         dissect_array_value(ptvc, pinfo, "UARFCNs", ett_nfapi_uarfcn_list, num_uarfcns, dissect_uarfcn_value);
7120 }
7121 static void dissect_arfcn_dir_value(ptvcursor_t * ptvc, packet_info* pinfo)
7122 {
7123         guint32 test_value;
7124
7125         // ARFCN
7126         ptvcursor_add(ptvc, hf_nfapi_arfcn, 2, ENC_BIG_ENDIAN);
7127
7128         // Direction
7129         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_arfcn_direction, 1, ENC_BIG_ENDIAN, &test_value);
7130         if (test_value > 1)
7131         {
7132                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid direction value [0..1]");
7133         }
7134
7135 }
7136 static void dissect_geran_rssi_request_value(ptvcursor_t * ptvc, packet_info* pinfo)
7137 {
7138         guint32 num_arfcns;
7139
7140         // Frequency Band Indicator
7141         ptvcursor_add(ptvc, hf_nfapi_frequency_band_indicator, 1, ENC_BIG_ENDIAN);
7142
7143         // Measurement Period
7144         ptvcursor_add(ptvc, hf_nfapi_measurement_period, 2, ENC_BIG_ENDIAN);
7145
7146         // Timeout
7147         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7148
7149         // Number of ARFCNs
7150         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_arfcns, 1, ENC_BIG_ENDIAN, &num_arfcns);
7151
7152         dissect_array_value(ptvc, pinfo, "ARFCNs", ett_nfapi_arfcn_list, num_arfcns, dissect_arfcn_dir_value);
7153 }
7154 static void dissect_rssi_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7155 {
7156         // RSSI
7157         ptvcursor_add(ptvc, hf_nfapi_rssi, 2, ENC_BIG_ENDIAN);
7158 }
7159 static void dissect_rssi_indication_value(ptvcursor_t * ptvc, packet_info* pinfo)
7160 {
7161         guint32 num_rssi;
7162
7163         // Number of RSSI
7164         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rssi, 2, ENC_BIG_ENDIAN, &num_rssi);
7165
7166         dissect_array_value(ptvc, pinfo, "ARFCNs", ett_nfapi_rssi_list, num_rssi, dissect_rssi_value);
7167 }
7168 static void dissect_pci_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7169 {
7170         // PCI
7171         ptvcursor_add(ptvc, hf_nfapi_pci, 2, ENC_BIG_ENDIAN);
7172 }
7173 static void dissect_lte_cell_search_value(ptvcursor_t * ptvc, packet_info* pinfo)
7174 {
7175         guint32 num_pci;
7176
7177         // EARFCN
7178         ptvcursor_add(ptvc, hf_nfapi_earfcn, 2, ENC_BIG_ENDIAN);
7179
7180         // Measurement Bandwidth
7181         ptvcursor_add(ptvc, hf_nfapi_measurement_bandwidth, 1, ENC_BIG_ENDIAN);
7182
7183         // Exhaustive Search
7184         ptvcursor_add(ptvc, hf_nfapi_exhaustive_search, 1, ENC_BIG_ENDIAN);
7185
7186         // Timeout
7187         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7188
7189         // Number of PCI
7190         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_pci, 1, ENC_BIG_ENDIAN, &num_pci);
7191
7192         dissect_array_value(ptvc, pinfo, "PCIs", ett_nfapi_pci_list, num_pci, dissect_pci_value);
7193 }
7194 static void dissect_psc_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7195 {
7196         // PSC
7197         ptvcursor_add(ptvc, hf_nfapi_psc, 2, ENC_BIG_ENDIAN);
7198 }
7199 static void dissect_utran_cell_search_value(ptvcursor_t * ptvc, packet_info* pinfo)
7200 {
7201         guint32 num_psc;
7202
7203         // UARFCN
7204         ptvcursor_add(ptvc, hf_nfapi_uarfcn, 2, ENC_BIG_ENDIAN);
7205
7206         // Exhaustive Search
7207         ptvcursor_add(ptvc, hf_nfapi_exhaustive_search, 1, ENC_BIG_ENDIAN);
7208
7209         // Timeout
7210         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7211
7212         // Number of PSC
7213         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_psc, 1, ENC_BIG_ENDIAN, &num_psc);
7214
7215         dissect_array_value(ptvc, pinfo, "PSCs", ett_nfapi_psc_list, num_psc, dissect_psc_value);
7216 }
7217 static void dissect_arfcn_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7218 {
7219         // ARFCN
7220         ptvcursor_add(ptvc, hf_nfapi_arfcn, 2, ENC_BIG_ENDIAN);
7221 }
7222 static void dissect_geran_cell_search_value(ptvcursor_t * ptvc, packet_info* pinfo)
7223 {
7224         guint32 num_arfcn;
7225
7226         // Timeout
7227         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7228
7229         // Number of ARFCN
7230         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_arfcns, 1, ENC_BIG_ENDIAN, &num_arfcn);
7231
7232         dissect_array_value(ptvc, pinfo, "ARFCNs", ett_nfapi_arfcn_list, num_arfcn, dissect_arfcn_value);
7233 }
7234
7235 static void dissect_lte_cell_found_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7236 {
7237         // PCI
7238         ptvcursor_add(ptvc, hf_nfapi_pci, 2, ENC_BIG_ENDIAN);
7239
7240         // RSRP
7241         ptvcursor_add(ptvc, hf_nfapi_rsrp, 1, ENC_BIG_ENDIAN);
7242
7243         // RSRQ
7244         ptvcursor_add(ptvc, hf_nfapi_rsrq, 1, ENC_BIG_ENDIAN);
7245
7246         // Frequency Offset
7247         ptvcursor_add(ptvc, hf_nfapi_frequency_offset, 2, ENC_BIG_ENDIAN);
7248 }
7249 static void dissect_lte_cell_search_indication_value(ptvcursor_t * ptvc, packet_info* pinfo)
7250 {
7251         guint32 num_lte_cells;
7252
7253         // Number of LTE Cells Found
7254         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_lte_cells_found, 2, ENC_BIG_ENDIAN, &num_lte_cells);
7255         dissect_array_value(ptvc, pinfo, "LTE Cells Found", ett_nfapi_lte_cells_found_list, num_lte_cells, dissect_lte_cell_found_value);
7256 }
7257 static void dissect_utran_cell_found_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7258 {
7259         // PSC
7260         ptvcursor_add(ptvc, hf_nfapi_psc, 2, ENC_BIG_ENDIAN);
7261
7262         // RSCP
7263         ptvcursor_add(ptvc, hf_nfapi_rscp, 1, ENC_BIG_ENDIAN);
7264
7265         // EcN0
7266         ptvcursor_add(ptvc, hf_nfapi_enco, 1, ENC_BIG_ENDIAN);
7267
7268         // Frequency Offset
7269         ptvcursor_add(ptvc, hf_nfapi_frequency_offset, 2, ENC_BIG_ENDIAN);
7270 }
7271 static void dissect_utran_cell_search_indication_value(ptvcursor_t * ptvc, packet_info* pinfo)
7272 {
7273         guint32 num_utran_cells;
7274
7275         // Number of UTRAN Cells Found
7276         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_utran_cells_found, 2, ENC_BIG_ENDIAN, &num_utran_cells);
7277         dissect_array_value(ptvc, pinfo, "UTRAN Cells Found", ett_nfapi_utran_cells_found_list, num_utran_cells, dissect_utran_cell_found_value);
7278 }
7279 static void dissect_geran_cell_found_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7280 {
7281         // ARFCN
7282         ptvcursor_add(ptvc, hf_nfapi_arfcn, 2, ENC_BIG_ENDIAN);
7283
7284         // BSIC
7285         ptvcursor_add(ptvc, hf_nfapi_bsic, 1, ENC_BIG_ENDIAN);
7286
7287         // RxLev
7288         ptvcursor_add(ptvc, hf_nfapi_rxlev, 1, ENC_BIG_ENDIAN);
7289
7290         // RxQual
7291         ptvcursor_add(ptvc, hf_nfapi_rxqual, 1, ENC_BIG_ENDIAN);
7292
7293         // Frequency Offset
7294         ptvcursor_add(ptvc, hf_nfapi_frequency_offset, 2, ENC_BIG_ENDIAN);
7295
7296         // SFN Offset
7297         ptvcursor_add(ptvc, hf_nfapi_sfn_offset, 4, ENC_BIG_ENDIAN);
7298 }
7299 static void dissect_geran_cell_search_indication_value(ptvcursor_t * ptvc, packet_info* pinfo)
7300 {
7301         guint32 num_geran_cells;
7302
7303         // Number of GSM Cells Found
7304         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_geran_cells_found, 2, ENC_BIG_ENDIAN, &num_geran_cells);
7305         dissect_array_value(ptvc, pinfo, "GERAN Cells Found", ett_nfapi_geran_cells_found_list, num_geran_cells, dissect_geran_cell_found_value);
7306 }
7307 static void dissect_pnf_cell_search_state_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7308 {
7309         guint len = tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
7310         ptvcursor_add(ptvc, hf_nfapi_pnf_search_state, len, ENC_NA);
7311 }
7312 static void dissect_pnf_cell_broadcast_state_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7313 {
7314         guint len = tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
7315         ptvcursor_add(ptvc, hf_nfapi_pnf_broadcast_state, len, ENC_NA);
7316 }
7317 static void dissect_lte_broadcast_detect_request_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7318 {
7319         // EARFCN
7320         ptvcursor_add(ptvc, hf_nfapi_earfcn, 2, ENC_BIG_ENDIAN);
7321
7322         // PCI
7323         ptvcursor_add(ptvc, hf_nfapi_pci, 2, ENC_BIG_ENDIAN);
7324
7325         // Timeout
7326         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7327 }
7328 static void dissect_utran_broadcast_detect_request_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7329 {
7330         // UARFCN
7331         ptvcursor_add(ptvc, hf_nfapi_uarfcn, 2, ENC_BIG_ENDIAN);
7332
7333         // PSC
7334         ptvcursor_add(ptvc, hf_nfapi_psc, 2, ENC_BIG_ENDIAN);
7335
7336         // Timeout
7337         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7338 }
7339 static void dissect_lte_broadcast_detect_indication_value(ptvcursor_t * ptvc, packet_info* pinfo)
7340 {
7341         guint32 test_value;
7342
7343         // Number of Tx Antenna
7344         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_tx_antenna, 1, ENC_BIG_ENDIAN, &test_value);
7345         if (!(test_value == 1 || test_value == 2 || test_value == 4))
7346         {
7347                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of tx antenna value [1, 2, 4]");
7348         }
7349
7350         // MIB[MIB Length]
7351         ptvcursor_add(ptvc, hf_nfapi_mib, 2, ENC_BIG_ENDIAN|ENC_NA);
7352
7353         // SFN Offset
7354         ptvcursor_add(ptvc, hf_nfapi_sfn_offset, 4, ENC_BIG_ENDIAN);
7355 }
7356 static void dissect_utran_broadcast_detect_indication_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7357 {
7358         // MIB[MIB Length]
7359         ptvcursor_add(ptvc, hf_nfapi_mib, 2, ENC_BIG_ENDIAN|ENC_NA);
7360
7361         // SFN Offset
7362         ptvcursor_add(ptvc, hf_nfapi_sfn_offset, 4, ENC_BIG_ENDIAN);
7363 }
7364 static void dissect_lte_system_information_schedule_request_value(ptvcursor_t * ptvc, packet_info* pinfo)
7365 {
7366         proto_item* item;
7367         guint32 test_value;
7368
7369         // EARFCN
7370         ptvcursor_add(ptvc, hf_nfapi_earfcn, 2, ENC_BIG_ENDIAN);
7371
7372         // PCI
7373         ptvcursor_add(ptvc, hf_nfapi_pci, 2, ENC_BIG_ENDIAN);
7374
7375         // Bandwidth
7376         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_bandwidth, 2, ENC_BIG_ENDIAN, &test_value);
7377         if (!(test_value == 6 || test_value == 15 || test_value == 25 ||
7378                 test_value == 50 || test_value == 75 || test_value == 100))
7379         {
7380                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid bandwidth value [6, 15, 25, 50, 75, 100]");
7381         }
7382
7383         // PHICH Configuration
7384         // todo : phich bit decode
7385         ptvcursor_add(ptvc, hf_nfapi_phich_configuration, 1, ENC_BIG_ENDIAN);
7386
7387         // Number of Tx Antenna
7388         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_tx_antenna, 1, ENC_BIG_ENDIAN, &test_value);
7389         if (!(test_value == 1 || test_value == 2 || test_value == 4))
7390         {
7391                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of tx antenna value [1, 2, 4]");
7392         }
7393
7394         // retryCount
7395         ptvcursor_add(ptvc, hf_nfapi_retry_count, 1, ENC_BIG_ENDIAN);
7396
7397         // Timeout
7398         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7399 }
7400 static void dissect_lte_system_information_schedule_indication_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7401 {
7402         // this needs to be SIB 1
7403         guint len = tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
7404         ptvcursor_add(ptvc, hf_nfapi_sib1, len, ENC_NA);
7405 }
7406 static void dissect_si_periodicity_value(ptvcursor_t * ptvc, packet_info* pinfo)
7407 {
7408         proto_item* item;
7409         guint32 test_value;
7410
7411         // SI Periodicity
7412         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_si_periodicity, 1, ENC_BIG_ENDIAN, &test_value);
7413         if (test_value > 7)
7414         {
7415                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid si periodicity value [0..7]");
7416         }
7417
7418         // SI Index
7419         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_si_index, 1, ENC_BIG_ENDIAN, &test_value);
7420         if (test_value > 32)
7421         {
7422                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid si Index value [0..32]");
7423         }
7424 }
7425
7426 static void dissect_lte_system_information_request_value(ptvcursor_t * ptvc, packet_info* pinfo)
7427 {
7428         proto_item* item;
7429         guint32 test_value, si_priodicity;
7430
7431         // EARFCN
7432         ptvcursor_add(ptvc, hf_nfapi_earfcn, 2, ENC_BIG_ENDIAN);
7433
7434         // PCI
7435         ptvcursor_add(ptvc, hf_nfapi_pci, 2, ENC_BIG_ENDIAN);
7436
7437         // Downlink channel bandwidth
7438         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_channel_bandwidth, 2, ENC_BIG_ENDIAN, &test_value);
7439         if (!(test_value == 6 || test_value == 15 || test_value == 25 ||
7440                 test_value == 50 || test_value == 75 || test_value == 100))
7441         {
7442                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid bandwidth value [6, 15, 25, 50, 75, 100]");
7443         }
7444
7445         // PHICH Configuration
7446         ptvcursor_add(ptvc, hf_nfapi_phich_configuration, 1, ENC_BIG_ENDIAN);
7447
7448         // Number of Tx Antenna
7449         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_tx_antenna, 1, ENC_BIG_ENDIAN, &test_value);
7450         if (!(test_value == 1 || test_value == 2 || test_value == 4))
7451         {
7452                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of tx antenna value [1, 2, 4]");
7453         }
7454
7455         // Number of SI Periodicity
7456         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_si_periodicity, 1, ENC_BIG_ENDIAN, &si_priodicity);
7457
7458         dissect_array_value(ptvc, pinfo, "Number SI Periodicity", ett_nfapi_si_periodicity_list, si_priodicity, dissect_si_periodicity_value);
7459
7460         // SI Window Length
7461         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_si_window_length, 1, ENC_BIG_ENDIAN, &test_value);
7462         if (!(test_value == 1 || test_value == 2 || test_value == 5 || test_value == 10 ||
7463                   test_value == 15 || test_value == 20 || test_value == 40))
7464         {
7465                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid si window length value [1, 2, 5, 10, 15, 20, 40]");
7466         }
7467
7468         // Timeout
7469         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7470 }
7471 static void dissect_utran_system_information_request_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7472 {
7473         // UARFCN
7474         ptvcursor_add(ptvc, hf_nfapi_uarfcn, 2, ENC_BIG_ENDIAN);
7475
7476         // PSC
7477         ptvcursor_add(ptvc, hf_nfapi_psc, 2, ENC_BIG_ENDIAN);
7478
7479         // Timeout
7480         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7481 }
7482 static void dissect_geran_system_information_request_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7483 {
7484         // ARFCN
7485         ptvcursor_add(ptvc, hf_nfapi_arfcn, 2, ENC_BIG_ENDIAN);
7486
7487         // BSIC
7488         ptvcursor_add(ptvc, hf_nfapi_bsic, 1, ENC_BIG_ENDIAN);
7489
7490         // Timeout
7491         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7492 }
7493 static void dissect_lte_system_information_indication_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7494 {
7495         // SIB Type
7496         ptvcursor_add(ptvc, hf_nfapi_sib_type, 1, ENC_BIG_ENDIAN);
7497
7498         // SIB[SIB Length]
7499         ptvcursor_add(ptvc, hf_nfapi_sib, 2, ENC_BIG_ENDIAN|ENC_NA);
7500 }
7501 static void dissect_utran_system_information_indication_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7502 {
7503         // SIB[SIB Length]
7504         ptvcursor_add(ptvc, hf_nfapi_sib, 2, ENC_BIG_ENDIAN|ENC_NA);
7505 }
7506 static void dissect_geran_system_information_indication_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7507 {
7508         // SI[SI Length]
7509         ptvcursor_add(ptvc, hf_nfapi_si, 2, ENC_BIG_ENDIAN|ENC_NA);
7510 }
7511
7512 static void dissect_rx_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo _U_);
7513
7514 // Important the tags must be in numerical order so that they can be indexed correctly
7515 static const tlv_t nfapi_tags[] =
7516 {
7517         { 0x1000, "PNF Param General", dissect_pnf_param_general_value },
7518         { 0x1001, "PNF PHY", dissect_pnf_phy_value },
7519         { 0x1002, "PNF RF", dissect_pnf_rf_value },
7520         { 0x1003, "PNF PHY RF Config", dissect_pnf_phy_rf_config_value },
7521         { 0x1004, "DL RS Tx power", dissect_dl_rs_tx_power_value },
7522         { 0x1005, "Received interference power", dissect_received_interference_power_value },
7523         { 0x1006, "Thermal noise power", dissect_thermal_noise_power_value },
7524         { 0x1007, "DL RS TX Power measurement", dissect_dl_rs_tx_power_measurement_value },
7525         { 0x1008, "Received Interference power measurement", dissect_received_interference_power_measurement_value },
7526         { 0x1009, "Thermal noise power measurement", dissect_thermal_noise_power_measurement_value },
7527         { 0x100A, "PNF PHY Rel 10", dissect_pnf_phy_rel10_value },
7528         { 0x100B, "PNF PHY Rel 11", dissect_pnf_phy_rel11_value },
7529         { 0x100C, "PNF PHY Rel 12", dissect_pnf_phy_rel12_value },
7530         { 0x100D, "PNF PHY Rel 13", dissect_pnf_phy_rel13_value },
7531 };
7532
7533 static const tlv_t configuration_tags[] =
7534 {
7535         { 0x0000, NULL, NULL },
7536         { 0x0001, "Subframe config - Duplex Mode", dissect_duplex_mode_value },
7537         { 0x0002, "Subframe config - PCFICH power offset TLV", dissect_pcfich_power_offset_value },
7538         { 0x0003, "Subframe config - P-B", dissect_pb_value },
7539         { 0x0004, "Subframe config - DL cyclic prefix type", dissect_dl_cyclic_prefix_value },
7540         { 0x0005, "Subframe config - UL cyclic prefix type", dissect_ul_cyclic_prefix_value },
7541         { 0x0006, NULL, NULL },
7542         { 0x0007, NULL, NULL },
7543         { 0x0008, NULL, NULL },
7544         { 0x0009, NULL, NULL },
7545         { 0x000A, "RF config - Downlink channel bandwidth", dissect_dl_channel_bandwidth_value },
7546         { 0x000B, "RF config - Uplink channel bandwidth", dissect_ul_channel_bandwidth_value },
7547         { 0x000C, "RF config - Reference signal power", dissect_reference_signal_power_value },
7548         { 0x000D, "RF config - Tx antenna ports", dissect_tx_antenna_ports_value },
7549         { 0x000E, "RF config - Rx Antenna ports", dissect_rx_antenna_ports_value },
7550         { 0x000F, NULL, NULL },
7551         { 0x0010, NULL, NULL },
7552         { 0x0011, NULL, NULL },
7553         { 0x0012, NULL, NULL },
7554         { 0x0013, NULL, NULL },
7555         { 0x0014, "PHICH config - PHICH resource", dissect_phich_resource_value },
7556         { 0x0015, "PHICH config - PHICH duration", dissect_phich_duration_value },
7557         { 0x0016, "PHICH config - PHICH power offset", dissect_phich_power_offset_value },
7558         { 0x0017, NULL, NULL },
7559         { 0x0018, NULL, NULL },
7560         { 0x0019, NULL, NULL },
7561         { 0x001A, NULL, NULL },
7562         { 0x001B, NULL, NULL },
7563         { 0x001C, NULL, NULL },
7564         { 0x001D, NULL, NULL },
7565         { 0x001E, "SCH config - Primary synchronization signal EPRE/EPRERS", dissect_psch_synch_signal_epre_eprers_value },
7566         { 0x001F, "SCH config - Secondary synchronization signal EPRE/EPRERS", dissect_ssch_synch_signal_epre_eprers_value },
7567         { 0x0020, "SCH config - Physical Cell Id", dissect_physical_cell_id_value },
7568         { 0x0021, NULL, NULL },
7569         { 0x0022, NULL, NULL },
7570         { 0x0023, NULL, NULL },
7571         { 0x0024, NULL, NULL },
7572         { 0x0025, NULL, NULL },
7573         { 0x0026, NULL, NULL },
7574         { 0x0027, NULL, NULL },
7575         { 0x0028, "PRACH config - Configuration Index", dissect_prach_configuration_index_value },
7576         { 0x0029, "PRACH config - Root sequence Index", dissect_prach_root_sequence_index_value },
7577         { 0x002A, "PRACH config - Zero correlation zone configuration", dissect_prach_zero_correlation_zone_configuration_value },
7578         { 0x002B, "PRACH config - High speed flag", dissect_prach_high_speed_flag_value },
7579         { 0x002C, "PRACH config - Frequency offset", dissect_prach_frequency_offset_value },
7580         { 0x002D, NULL, NULL },
7581         { 0x002E, NULL, NULL },
7582         { 0x002F, NULL, NULL },
7583         { 0x0030, NULL, NULL },
7584         { 0x0031, NULL, NULL },
7585         { 0x0032, "PUSCH config - Hopping mode", dissect_pusch_hopping_mode_value },
7586         { 0x0033, "PUSCH config - Hopping offset", dissect_pusch_hopping_offset_value },
7587         { 0x0034, "PUSCH config - Number of sub-bands", dissect_pusch_number_of_subbands_value },
7588         { 0x0035, NULL, NULL },
7589         { 0x0036, NULL, NULL },
7590         { 0x0037, NULL, NULL },
7591         { 0x0038, NULL, NULL },
7592         { 0x0039, NULL, NULL },
7593         { 0x003A, NULL, NULL },
7594         { 0x003B, NULL, NULL },
7595         { 0x003C, "PUCCH config - Delta PUCCH Shift", dissect_pucch_delta_pucch_shift_value },
7596         { 0x003D, "PUCCH config - N_CQI RB", dissect_pucch_n_cqi_rb_value },
7597         { 0x003E, "PUCCH config - N_AN CS", dissect_pucch_n_an_cs_value },
7598         { 0x003F, "PUCCH config - N1Pucch-AN", dissect_pucch_n1_pucch_an_value },
7599         { 0x0040, NULL, NULL },
7600         { 0x0041, NULL, NULL },
7601         { 0x0042, NULL, NULL },
7602         { 0x0043, NULL, NULL },
7603         { 0x0044, NULL, NULL },
7604         { 0x0045, NULL, NULL },
7605         { 0x0046, "SRS config - Bandwidth configuration", dissect_srs_bandwidth_configuration_value },
7606         { 0x0047, "SRS config - MaxUpPTS", dissect_srs_max_uppts_value },
7607         { 0x0048, "SRS config - SRS subframe configuration", dissect_srs_subframe_configuration_value },
7608         { 0x0049, "SRS config - SRS AckNack SRS simultaneous transmission", dissect_srs_acknack_srs_sim_tx_value },
7609         { 0x004A, NULL, NULL },
7610         { 0x004B, NULL, NULL },
7611         { 0x004C, NULL, NULL },
7612         { 0x004D, NULL, NULL },
7613         { 0x004E, NULL, NULL },
7614         { 0x004F, NULL, NULL },
7615         { 0x0050, "Uplink reference signal config - Uplink RS hopping", dissect_uplink_rs_hopping_value },
7616         { 0x0051, "Uplink reference signal config - Group assignment (delta sequence-shift pattern)", dissect_group_assignment_value },
7617         { 0x0052, "Uplink reference signal config - Cyclic Shift 1 for DMRS", dissect_cyclic_shift_1_for_drms_value },
7618         { 0x0053, NULL, NULL },
7619         { 0x0054, NULL, NULL },
7620         { 0x0055, NULL, NULL },
7621         { 0x0056, NULL, NULL },
7622         { 0x0057, NULL, NULL },
7623         { 0x0058, NULL, NULL },
7624         { 0x0059, NULL, NULL },
7625         { 0x005A, "TDD frame structure config - Subframe assignment", dissect_tdd_subframe_assignement_value },
7626         { 0x005B, "TDD frame structure config - Special sub-frame patterns", dissect_tdd_subframe_patterns_value },
7627         { 0x005C, NULL, NULL },
7628         { 0x005D, NULL, NULL },
7629         { 0x005E, NULL, NULL },
7630         { 0x005F, NULL, NULL },
7631         { 0x0060, NULL, NULL },
7632         { 0x0061, NULL, NULL },
7633         { 0x0062, NULL, NULL },
7634         { 0x0063, NULL, NULL },
7635         { 0x0064, "LAA config - ED Threshold for LBT for PDSCH", dissect_laa_ed_threashold_for_lbt_for_pdsch_value },
7636         { 0x0065, "LAA config - ED Threshold for LBT for DRS", dissect_laa_ed_threashold_for_lbt_for_drs_value },
7637         { 0x0066, "LAA config - PD Threshold", dissect_laa_pd_threshold_value },
7638         { 0x0067, "LAA config - Multi carrier type", dissect_laa_multi_carrier_type_value },
7639         { 0x0068, "LAA config - Multi carrier TX", dissect_laa_multi_carrier_tx_value },
7640         { 0x0069, "LAA config - Multi carrier freeze", dissect_laa_multi_carrier_freeze_value },
7641         { 0x006A, "LAA config - Tx antenna ports for DRS", dissect_laa_tx_antenna_port_for_drs_value },
7642         { 0x006B, "LAA config - Transmission power for DRS", dissect_laa_transmission_power_for_drs_value },
7643         { 0x006C, NULL, NULL },
7644         { 0x006D, NULL, NULL },
7645         { 0x006E, NULL, NULL },
7646         { 0x006F, NULL, NULL },
7647         { 0x0070, NULL, NULL },
7648         { 0x0071, NULL, NULL },
7649         { 0x0072, NULL, NULL },
7650         { 0x0073, NULL, NULL },
7651         { 0x0074, NULL, NULL },
7652         { 0x0075, NULL, NULL },
7653         { 0x0076, NULL, NULL },
7654         { 0x0077, NULL, NULL },
7655         { 0x0078, "eMTC config - PBCH Repetitions enable R13", dissect_emtc_pbch_repeitions_enabled_r13_value },
7656         { 0x0079, "eMTC config - PRACH CAT-M Root sequence Index", dissect_emtc_prach_cat_m_root_sequence_index_value },
7657         { 0x007A, "eMTC config - PRACH CAT-M Zero correlation zone configuration", dissect_emtc_prach_cat_m_zero_correlation_zone_configuration_value },
7658         { 0x007B, "eMTC config - PRACH CAT-M High speed flag", dissect_emtc_prach_cat_m_high_speed_flag_value },
7659         { 0x007C, "eMTC config - PRACH CE level #0 Enable", dissect_emtc_prach_ce_level_0_enabled_value },
7660         { 0x007D, "eMTC config - PRACH CE level #0 Configuration Index", dissect_emtc_prach_ce_level_0_configuration_offset_value },
7661         { 0x007E, "eMTC config - PRACH CE level #0 Frequency offset", dissect_emtc_prach_ce_level_0_frequency_offset_value },
7662         { 0x007F, "eMTC config - PRACH CE level #0 Number of repetitions per attempt", dissect_emtc_preach_ce_level_0_num_of_repeitions_per_attempt_value },
7663         { 0x0080, "eMTC config - CE level #0 Starting subframe periodicity", dissect_emtc_ce_level_0_starting_subframe_periodicity_value },
7664         { 0x0081, "eMTC config - PRACH CE level #0 Hopping Enable", dissect_emtc_preach_ce_level_0_hopping_enabled_value },
7665         { 0x0082, "eMTC config - PRACH CE level #0 Hopping Offset", dissect_emtc_preach_ce_level_0_hopping_offset_value },
7666         { 0x0083, "eMTC config - PRACH CE level #1 Enable", dissect_emtc_prach_ce_level_1_enabled_value },
7667         { 0x0084, "eMTC config - PRACH CE level #1 Configuration Index", dissect_emtc_prach_ce_level_1_configuration_offset_value },
7668         { 0x0085, "eMTC config - PRACH CE level #1 Frequency offset", dissect_emtc_prach_ce_level_1_frequency_offset_value },
7669         { 0x0086, "eMTC config - PRACH CE level #1 Number of repetitions per attempt", dissect_emtc_preach_ce_level_1_num_of_repeitions_per_attempt_value },
7670         { 0x0087, "eMTC config - CE level #1 Starting subframe periodicity", dissect_emtc_ce_level_1_starting_subframe_periodicity_value },
7671         { 0x0088, "eMTC config - PRACH CE level #1 Hopping Enable", dissect_emtc_preach_ce_level_1_hopping_enabled_value },
7672         { 0x0089, "eMTC config - PRACH CE level #1 Hopping Offset", dissect_emtc_preach_ce_level_1_hopping_offset_value },
7673         { 0x008A, "eMTC config - PRACH CE level #2 Enable", dissect_emtc_prach_ce_level_2_enabled_value },
7674         { 0x008B, "eMTC config - PRACH CE level #2 Configuration Index", dissect_emtc_prach_ce_level_2_configuration_offset_value },
7675         { 0x008C, "eMTC config - PRACH CE level #2 Frequency offset", dissect_emtc_prach_ce_level_2_frequency_offset_value },
7676         { 0x008D, "eMTC config - PRACH CE level #2 Number of repetitions per attempt", dissect_emtc_preach_ce_level_2_num_of_repeitions_per_attempt_value },
7677         { 0x008E, "eMTC config - CE level #2 Starting subframe periodicity", dissect_emtc_ce_level_2_starting_subframe_periodicity_value },
7678         { 0x008F, "eMTC config - PRACH CE level #2 Hopping Enable", dissect_emtc_preach_ce_level_2_hopping_enabled_value },
7679         { 0x0090, "eMTC config - PRACH CE level #2 Hopping Offset", dissect_emtc_preach_ce_level_2_hopping_offset_value },
7680         { 0x0091, "eMTC config - PRACH CE level #3 Enable", dissect_emtc_prach_ce_level_3_enabled_value },
7681         { 0x0092, "eMTC config - PRACH CE level #3 Configuration Index", dissect_emtc_prach_ce_level_3_configuration_offset_value },
7682         { 0x0093, "eMTC config - PRACH CE level #3 Frequency offset", dissect_emtc_prach_ce_level_3_frequency_offset_value },
7683         { 0x0094, "eMTC config - PRACH CE level #3 Number of repetitions per attempt", dissect_emtc_preach_ce_level_3_num_of_repeitions_per_attempt_value },
7684         { 0x0095, "eMTC config - CE level #3 Starting subframe periodicity", dissect_emtc_ce_level_3_starting_subframe_periodicity_value },
7685         { 0x0096, "eMTC config - PRACH CE level #3 Hopping Enable", dissect_emtc_preach_ce_level_3_hopping_enabled_value },
7686         { 0x0097, "eMTC config - PRACH CE level #3 Hopping Offset", dissect_emtc_preach_ce_level_3_hopping_offset_value },
7687         { 0x0098, "eMTC config - PUCCH Interval - ULHoppingConfigCommonModeA", dissect_emtc_pucch_interval_ul_hopping_config_common_mode_a_value },
7688         { 0x0099, "eMTC config - PUCCH Interval - ULHoppingConfigCommonModeB", dissect_emtc_pucch_interval_ul_hopping_config_common_mode_b_value },
7689         { 0x009A, NULL, NULL },
7690         { 0x009B, NULL, NULL },
7691         { 0x009C, NULL, NULL },
7692         { 0x009D, NULL, NULL },
7693         { 0x009E, NULL, NULL },
7694         { 0x009F, NULL, NULL },
7695         { 0x00A0, NULL, NULL },
7696         { 0x00A1, NULL, NULL },
7697         { 0x00A2, NULL, NULL },
7698         { 0x00A3, NULL, NULL },
7699         { 0x00A4, NULL, NULL },
7700         { 0x00A5, NULL, NULL },
7701         { 0x00A6, NULL, NULL },
7702         { 0x00A7, NULL, NULL },
7703         { 0x00A8, NULL, NULL },
7704         { 0x00A9, NULL, NULL },
7705         { 0x00AA, NULL, NULL },
7706         { 0x00AB, NULL, NULL },
7707         { 0x00AC, NULL, NULL },
7708         { 0x00AD, NULL, NULL },
7709         { 0x00AE, NULL, NULL },
7710         { 0x00AF, NULL, NULL },
7711         { 0x00B0, NULL, NULL },
7712         { 0x00B1, NULL, NULL },
7713         { 0x00B2, NULL, NULL },
7714         { 0x00B3, NULL, NULL },
7715         { 0x00B4, NULL, NULL },
7716         { 0x00B5, NULL, NULL },
7717         { 0x00B6, NULL, NULL },
7718         { 0x00B7, NULL, NULL },
7719         { 0x00B8, NULL, NULL },
7720         { 0x00B9, NULL, NULL },
7721         { 0x00BA, NULL, NULL },
7722         { 0x00BB, NULL, NULL },
7723         { 0x00BC, NULL, NULL },
7724         { 0x00BD, NULL, NULL },
7725         { 0x00BE, NULL, NULL },
7726         { 0x00BF, NULL, NULL },
7727         { 0x00C0, NULL, NULL },
7728         { 0x00C1, NULL, NULL },
7729         { 0x00C2, NULL, NULL },
7730         { 0x00C3, NULL, NULL },
7731         { 0x00C4, NULL, NULL },
7732         { 0x00C5, NULL, NULL },
7733         { 0x00C6, NULL, NULL },
7734         { 0x00C7, NULL, NULL },
7735         { 0x00C8, "Layer 2/3 - Downlink Bandwidth Support", dissect_dl_bandwidth_support_value },
7736         { 0x00C9, "Layer 2/3 - Uplink Bandwidth Support", dissect_ul_bandwidth_support_value },
7737         { 0x00CA, "Layer 2/3 - Downlink modulation support", dissect_dl_modulation_value },
7738         { 0x00CB, "Layer 2/3 - Uplink modulation support", dissect_ul_modulation_value },
7739         { 0x00CC, "Layer 2/3 - PHY antenna capability", dissect_phy_antenna_capability_value },
7740         { 0x00CD, "Layer 2/3 - Release capability", dissect_release_capability_value },
7741         { 0x00CE, "Layer 2/3 - MBSFN capability", dissect_mbsfn_value },
7742         { 0x00CF, NULL, NULL },
7743         { 0x00D0, NULL, NULL },
7744         { 0x00D1, "LAA Capability - LAA support", dissect_laa_support_value },
7745         { 0x00D2, "LAA Capability - PD sensing LBT support", dissect_laa_pd_sensing_lbt_support_value },
7746         { 0x00D3, "LAA Capability - Multi carrier LBT support", dissect_laa_multi_carrier_lbt_support_value },
7747         { 0x00D4, "LAA Capability - Partial SF support", dissect_laa_partial_sf_support_value },
7748         { 0x00D5, NULL, NULL },
7749         { 0x00D6, NULL, NULL },
7750         { 0x00D7, NULL, NULL },
7751         { 0x00D8, NULL, NULL },
7752         { 0x00D9, NULL, NULL },
7753         { 0x00DA, NULL, NULL },
7754         { 0x00DB, NULL, NULL },
7755         { 0x00DC, NULL, NULL },
7756         { 0x00DD, NULL, NULL },
7757         { 0x00DE, NULL, NULL },
7758         { 0x00DF, NULL, NULL },
7759         { 0x00E0, NULL, NULL },
7760         { 0x00E1, NULL, NULL },
7761         { 0x00E2, NULL, NULL },
7762         { 0x00E3, NULL, NULL },
7763         { 0x00E4, NULL, NULL },
7764         { 0x00E5, NULL, NULL },
7765         { 0x00E6, NULL, NULL },
7766         { 0x00E7, NULL, NULL },
7767         { 0x00E8, NULL, NULL },
7768         { 0x00E9, NULL, NULL },
7769         { 0x00EA, NULL, NULL },
7770         { 0x00EB, NULL, NULL },
7771         { 0x00EC, NULL, NULL },
7772         { 0x00ED, NULL, NULL },
7773         { 0x00EE, NULL, NULL },
7774         { 0x00EF, NULL, NULL },
7775         { 0x00F0, "Layer 2/3 - Data report mode", dissect_data_report_mode_value },
7776         { 0x00F1, "Layer 2/3 - SFN/SF", dissect_sfn_sf_value },
7777         { 0x00F2, NULL, NULL },
7778         { 0x00F3, NULL, NULL },
7779         { 0x00F4, NULL, NULL },
7780         { 0x00F5, NULL, NULL },
7781         { 0x00F6, NULL, NULL },
7782         { 0x00F7, NULL, NULL },
7783         { 0x00F8, NULL, NULL },
7784         { 0x00F9, NULL, NULL },
7785         { 0x00FA, "Layer 1 - PHY state", dissect_phy_state_value },
7786         { 0x00FB, NULL, NULL },
7787         { 0x00FC, NULL, NULL },
7788         { 0x00FD, NULL, NULL },
7789         { 0x00FE, NULL, NULL },
7790         { 0x00FF, NULL, NULL },
7791         { 0x0100, "NFAPI - P7 VNF Address IPv4", dissect_p7_vnf_address_ipv4_value },
7792         { 0x0101, "NFAPI - P7 VNF Address IPv4", dissect_p7_vnf_address_ipv6_value },
7793         { 0x0102, "NFAPI - P7 Port", dissect_p7_vnf_port_value },
7794         { 0x0103, "NFAPI - P7 PNF Address IPv4", dissect_p7_pnf_address_ipv4_value },
7795         { 0x0104, "NFAPI - P7 PNF Address IPv4", dissect_p7_pnf_address_ipv6_value },
7796         { 0x0105, "NFAPI - P7 Port", dissect_p7_pnf_port_value },
7797         { 0x0106, NULL, NULL },
7798         { 0x0107, NULL, NULL },
7799         { 0x0108, NULL, NULL },
7800         { 0x0109, NULL, NULL },
7801         { 0x010A, "NFAPI - Downlink UEs per Subframe", dissect_downlink_ues_per_subframe_value },
7802         { 0x010B, "NFAPI - Uplink UEs per Subframe", dissect_uplink_ues_per_subframe_value },
7803         { 0x010C, NULL, NULL },
7804         { 0x010D, NULL, NULL },
7805         { 0x010E, NULL, NULL },
7806         { 0x010F, NULL, NULL },
7807         { 0x0110, NULL, NULL },
7808         { 0x0111, NULL, NULL },
7809         { 0x0112, NULL, NULL },
7810         { 0x0113, NULL, NULL },
7811         { 0x0114, "NFAPI - nFAPI RF Bands", dissect_rf_bands_value },
7812         { 0x0115, NULL, NULL },
7813         { 0x0116, NULL, NULL },
7814         { 0x0117, NULL, NULL },
7815         { 0x0118, NULL, NULL },
7816         { 0x0119, NULL, NULL },
7817         { 0x011A, NULL, NULL },
7818         { 0x011B, NULL, NULL },
7819         { 0x011C, NULL, NULL },
7820         { 0x011D, NULL, NULL },
7821         { 0x011E, "NFAPI - Timing window", dissect_timing_window_value },
7822         { 0x011F, "NFAPI - Timing info mode", dissect_timing_info_mode_value },
7823         { 0x0120, "NFAPI - Timing info period", dissect_timing_info_period_value },
7824         { 0x0121, NULL, NULL },
7825         { 0x0122, NULL, NULL },
7826         { 0x0123, NULL, NULL },
7827         { 0x0124, NULL, NULL },
7828         { 0x0125, NULL, NULL },
7829         { 0x0126, NULL, NULL },
7830         { 0x0127, NULL, NULL },
7831         { 0x0128, "NFAPI - Maximum Transmit Power", dissect_maximum_transmit_power_value },
7832         { 0x0129, "NFAPI - EARFCN", dissect_earfcn_value },
7833         { 0x012A, NULL, NULL },
7834         { 0x012B, NULL, NULL },
7835         { 0x012C, NULL, NULL },
7836         { 0x012D, NULL, NULL },
7837         { 0x012E, NULL, NULL },
7838         { 0x012F, NULL, NULL },
7839         { 0x0130, "NFAPI - NMM GSM Frequency Bands", dissect_nmm_gsm_frequency_bands_value },
7840         { 0x0131, "NFAPI - NMM UMTS Frequency Bands", dissect_nmm_umts_frequency_bands_value },
7841         { 0x0132, "NFAPI - NMM LTE Frequency Bands", dissect_nmm_lte_frequency_bands_value },
7842         { 0x0133, "NFAPI - NMM Uplink RSSI supported", dissect_nmm_uplink_rssi_supported_value },
7843 };
7844
7845 static const tlv_t p7_tags[] =
7846 {
7847         { 0x2000, "DL Config Request Body", dissect_dl_config_request_body_value },
7848         { 0x2001, "DL DCI PDU Release 8", dissect_dl_config_request_dl_dci_pdu_rel8_value },
7849         { 0x2002, "DL DCI PDU Release 9", dissect_dl_config_request_dl_dci_pdu_rel9_value },
7850         { 0x2003, "DL DCI PDU Release 10", dissect_dl_config_request_dl_dci_pdu_rel10_value },
7851         { 0x2004, "BCH PDU Release 8", dissect_dl_config_request_bch_pdu_rel8_value },
7852         { 0x2005, "MCH PDU Release 8", dissect_dl_config_request_mch_pdu_rel8_value },
7853         { 0x2006, "DLSCH PDU Release 8", dissect_dl_config_request_dlsch_pdu_rel8_value },
7854         { 0x2007, "DLSCH PDU Release 9", dissect_dl_config_request_dlsch_pdu_rel9_value },
7855         { 0x2008, "DLSCH PDU Release 10", dissect_dl_config_request_dlsch_pdu_rel10_value },
7856         { 0x2009, "PCH PDU Release 8", dissect_dl_config_request_pch_pdu_rel8_value },
7857         { 0x200A, "PRS PDU Release 9", dissect_dl_config_request_prs_pdu_rel9_value },
7858         { 0x200B, "CSI-RS PDU Release 10", dissect_dl_config_request_csi_rs_pdu_rel10_value },
7859         { 0x200C, "UL Config Request Body", dissect_ul_config_request_body_value },
7860         { 0x200D, "ULSCH PDU Release 8", dissect_ul_config_ulsch_pdu_rel8_value },
7861         { 0x200E, "ULSCH PDU Release 10", dissect_ul_config_ulsch_pdu_rel10_value },
7862         { 0x200F, "Initial Transmission Parameters Release 8", dissect_ul_config_init_tx_params_rel8_value },
7863         { 0x2010, "CQI RI Information Release 8", dissect_ul_config_cqi_ri_info_rel8_value },
7864         { 0x2011, "CQI RI Information Release 9 or later", dissect_ul_config_cqi_ri_info_rel9_later_value },
7865         { 0x2012, "HARQ Information (ULSCH) Release 10", dissect_ul_config_harq_info_ulsch_rel10_value },
7866         { 0x2013, "UE Information Release 8", dissect_ul_config_ue_info_rel8_value },
7867         { 0x2014, "CQI Information Release 8", dissect_ul_config_cqi_info_rel8_value },
7868         { 0x2015, "CQI Information Release 10", dissect_ul_config_cqi_info_rel10_value },
7869         { 0x2016, "SR Information Release 8", dissect_ul_config_sr_info_rel8_value },
7870         { 0x2017, "SR Information Release 10", dissect_ul_config_sr_info_rel10_value },
7871         { 0x2018, "HARQ Information (UCI) Release 10 TDD", dissect_ul_config_harq_info_uci_rel10_tdd_value },
7872         { 0x2019, "HARQ Information (UCI) Release 8 FDD", dissect_ul_config_harq_info_uci_rel8_fdd_value },
7873         { 0x201A, "HARQ Information (UCI) Release 9 or later FDD", dissect_ul_config_harq_info_uci_rel9_later_fdd_value },
7874         { 0x201B, "SRS Information Release 8", dissect_ul_config_srs_info_rel8_value },
7875         { 0x201C, "SRS Information Release 10", dissect_ul_config_srs_info_rel10_value },
7876         { 0x201D, "HI DCI0 Request Body", dissect_hi_dci0_request_body_value },
7877         { 0x201E, "HI PDU Release 8", dissect_hi_dci0_hi_rel8_value },
7878         { 0x201F, "HI PDU Release 10", dissect_hi_dci0_hi_rel10_value },
7879         { 0x2020, "DCI UL PDU Release 8", dissect_hi_dci0_dci_ul_rel8_value },
7880         { 0x2021, "DCI UL PDU Release 10", dissect_hi_dci0_dci_ul_rel10_value },
7881         { 0x2022, "Tx Request Body", dissect_tx_request_body_value },
7882         { 0x2023, "RX Indication Body", dissect_rx_indication_body_value },
7883         { 0x2024, "RX PDU Release 8", dissect_rx_indication_rel8_value },
7884         { 0x2025, "RX PDU Release 9", dissect_rx_indication_rel9_value },
7885         { 0x2026, "HARQ Indication Body", dissect_harq_indication_body_value },
7886         { 0x2027, "HARQ PDU Release 8 TDD", dissect_harq_indication_rel8_tdd_value },
7887         { 0x2028, "HARQ PDU Release 9 or later TDD", dissect_harq_indication_rel9_later_tdd_value },
7888         { 0x2029, "HARQ PDU Release 8 FDD", dissect_harq_indication_rel8_fdd_value },
7889         { 0x202A, "HARQ PDU Release 9 or later FDD", dissect_harq_indication_rel9_later_fdd_value },
7890         { 0x202B, "CRC Indication Body", dissect_crc_indication_body_value },
7891         { 0x202C, "CRC PDU Release 8", dissect_crc_indication_rel8_value },
7892         { 0x202D, "RX SR Indication Body", dissect_rx_sr_indication_body_value },
7893         { 0x202E, "RX CQI Indication Body", dissect_rx_cqi_indication_body_value },
7894         { 0x202F, "CQI PDU Release 8", dissect_rx_cqi_indication_rel8_value },
7895         { 0x2030, "CQI PDU Release 9", dissect_rx_cqi_indication_rel9_value },
7896         { 0x2031, "RACH Indication Body", dissect_rach_indication_body_value },
7897         { 0x2032, "Preamable PDU Release 8", dissect_rach_indication_rel8_value },
7898         { 0x2033, "Preamable PDU Release 9", dissect_rach_indication_rel9_value },
7899         { 0x2034, "SRS Indication Body", dissect_srs_indication_body_value },
7900         { 0x2035, "SRS PDU Release 8", dissect_srs_indication_rel8_value },
7901         { 0x2036, "SRS PDU Release 9", dissect_srs_indication_rel9_value },
7902         { 0x2037, "SRS PDU Release 10 TDD", dissect_srs_indication_rel10_tdd_value },
7903         { 0x2038, "RX UE Information", dissect_rx_ue_info_value },
7904         { 0x2039, "DL DCI PDU Release 11", dissect_dl_config_request_dl_dci_pdu_rel11_value },
7905         { 0x203A, "DL DCI PDU Release 12", dissect_dl_config_request_dl_dci_pdu_rel12_value },
7906         { 0x203B, "DL DCI PDU Release 13", dissect_dl_config_request_dl_dci_pdu_rel13_value },
7907         { 0x203C, "DLSCH PDU Release 11", dissect_dl_config_request_dlsch_pdu_rel11_value },
7908         { 0x203D, "DLSCH PDU Release 12", dissect_dl_config_request_dlsch_pdu_rel12_value },
7909         { 0x203E, "DLSCH PDU Release 13", dissect_dl_config_request_dlsch_pdu_rel13_value },
7910         { 0x203F, "PCH PDU Release 13", dissect_dl_config_request_pch_pdu_rel13_value },
7911         { 0x2040, "CSI-RS PDU Release 13", dissect_dl_config_request_csi_rs_pdu_rel13_value },
7912         { 0x2041, "EDPCCH PDU Release 11 Parameters", dissect_dl_config_request_edpcch_params_rel11_value },
7913         { 0x2042, "EDPCCH PDU Release 13 Parameters", dissect_dl_config_request_edpcch_params_rel13_value },
7914         { 0x2043, "ULSCH PDU Release 11", dissect_ul_config_ulsch_pdu_rel11_value },
7915         { 0x2044, "ULSCH PDU Release 13", dissect_ul_config_ulsch_pdu_rel13_value },
7916         { 0x2045, "CQI RI Information Release 13", dissect_ul_config_cqi_ri_info_rel13_value },
7917         { 0x2046, "HARQ Information (ULSCH) Release 13", dissect_ul_config_harq_info_ulsch_rel13_value },
7918         { 0x2047, "UE Information Release 11", dissect_ul_config_ue_info_rel11_value },
7919         { 0x2048, "UE Information Release 13", dissect_ul_config_ue_info_rel13_value },
7920         { 0x2049, "CQI Information Release 13", dissect_ul_config_cqi_info_rel13_value },
7921         { 0x204A, "HARQ Information (UCI) Release 11 FDD/TDD", dissect_ul_config_harq_info_uci_rel11_fdd_tdd_value },
7922         { 0x204B, "HARQ Information (UCI) Release 13 FDD/TDD", dissect_ul_config_harq_info_uci_rel13_fdd_tdd_value },
7923         { 0x204C, "SRS Information Release 13", dissect_ul_config_srs_info_rel13_value },
7924         { 0x204D, "DCI UL PDU Release 12", dissect_hi_dci0_dci_ul_rel12_value },
7925         { 0x204E, "MDPCCH DCI UL PDU Release 13", dissect_hi_dci0_mdpcch_dci_ul_rel13_value },
7926         { 0x204F, "HARQ PDU Release 13 or later TDD", dissect_harq_indication_rel13_later_tdd_value },
7927         { 0x2050, "HARQ PDU Release 13 or later FDD", dissect_harq_indication_rel13_later_fdd_value },
7928         { 0x2051, "Preamable PDU Release 13", dissect_rach_indication_rel13_value },
7929         { 0x2052, "UL CQI Information", dissect_ul_cqi_information_value },
7930         { 0x2053, "SRS PDU Release 11", dissect_srs_indication_rel11_value },
7931         { 0x2054, "TDD Channel Measurement", dissect_tdd_channel_measurement_value },
7932         { 0x2055, "LBT DL Config Request Body", dissect_lbt_dl_config_request_body_value },
7933         { 0x2056, "LBT PDSCH Req PDU Release 13", dissect_lbt_dl_config_request_pdsch_req_rel13_value },
7934         { 0x2057, "LBT DRS req PDU Release 13", dissect_lbt_dl_config_request_drs_req_rel13_value },
7935         { 0x2058, "LBT DL Indication Message Body", dissect_lbt_indication_message_body_value },
7936         { 0x2059, "LBT PDSCH Resp PDU Release 13", dissect_lbt_dl_config_request_pdsch_resp_rel13_value },
7937         { 0x205A, "LBT DRS Resp PDU Release 13", dissect_lbt_dl_config_request_drs_resp_rel13_value },
7938         { 0x205B, "MPDCCH PDU Release 13", dissect_dl_config_request_mpdpcch_pdu_rel13_value },
7939 };
7940
7941 static const tlv_t p4_tags[] =
7942 {
7943         { 0x3000, "LTE RSSI Request", dissect_lte_rssi_request_value },
7944         { 0x3001, "UTRAN RSSI Request", dissect_utran_rssi_request_value },
7945         { 0x3002, "GERAN RSSI Request", dissect_geran_rssi_request_value },
7946         { 0x3003, "RSSI Indication", dissect_rssi_indication_value },
7947         { 0x3004, "LTE CELL SEARCH Request", dissect_lte_cell_search_value },
7948         { 0x3005, "UTRAN CELL SEARCH Request", dissect_utran_cell_search_value },
7949         { 0x3006, "GERAN CELL SEARCH Request", dissect_geran_cell_search_value },
7950         { 0x3007, "LTE CELL SEARCH Indication", dissect_lte_cell_search_indication_value },
7951         { 0x3008, "UTRAN CELL SEARCH Indication", dissect_utran_cell_search_indication_value },
7952         { 0x3009, "GERAN CELL SEARCH Indication", dissect_geran_cell_search_indication_value },
7953         { 0x300A, "PNF CELL SEARCH STATE", dissect_pnf_cell_search_state_value },
7954         { 0x300B, "LTE BROADCAST DETECT Request", dissect_lte_broadcast_detect_request_value },
7955         { 0x300C, "UTRAN BROADCAST DETECT Request", dissect_utran_broadcast_detect_request_value },
7956         { 0x300D, "PNF CELL SEARCH STATE", dissect_pnf_cell_search_state_value },
7957         { 0x300E, "LTE BROADCAST DETECT Indication", dissect_lte_broadcast_detect_indication_value },
7958         { 0x300F, "UTRAN BROADCAST DETECT Indication", dissect_utran_broadcast_detect_indication_value },
7959         { 0x3010, "PNF CELL BROADCAST STATE", dissect_pnf_cell_broadcast_state_value },
7960         { 0x3011, "LTE SYSTEM INFORMATION SCHEDULE Request", dissect_lte_system_information_schedule_request_value },
7961         { 0x3012, "PNF CELL BROADCAST STATE", dissect_pnf_cell_broadcast_state_value },
7962         { 0x3013, "LTE SYSTEM INFORMATION SCHEDULE Indication", dissect_lte_system_information_schedule_indication_value },
7963         { 0x3014, "LTE SYSTEM INFORMATION Request", dissect_lte_system_information_request_value },
7964         { 0x3015, "UTRAN SYSTEM INFORMATION Request", dissect_utran_system_information_request_value },
7965         { 0x3016, "GERAN SYSTEM INFORMATION Request", dissect_geran_system_information_request_value },
7966         { 0x3017, "PNF CELL BROADCAST STATE", dissect_pnf_cell_broadcast_state_value },
7967         { 0x3018, "LTE SYSTEM INFORMATION Indication", dissect_lte_system_information_indication_value },
7968         { 0x3019, "UTRAN SYSTEM INFORMATION Indication", dissect_utran_system_information_indication_value },
7969         { 0x301A, "GERAN SYSTEM INFORMATION Indication", dissect_geran_system_information_indication_value },
7970 };
7971
7972
7973 static const tlv_t* look_up_tlv(int tag_id)
7974 {
7975         const tlv_t* tlv = NULL;
7976
7977         static const gint num_configuration_tags = sizeof(configuration_tags) / sizeof(tlv_t);
7978         static const gint num_nfapi_tags = sizeof(nfapi_tags) / sizeof(tlv_t);
7979         static const gint num_p7_tags = sizeof(p7_tags) / sizeof(tlv_t);
7980         static const gint num_p4_tags = sizeof(p4_tags) / sizeof(tlv_t);
7981
7982         if (tag_id >= 0x0000 && tag_id <= (0x0000 + num_configuration_tags - 1)) // 0x0133)
7983         {
7984                 tlv = &configuration_tags[tag_id];
7985         }
7986         else if (tag_id >= 0x1000 && tag_id <= (0x1000 + num_nfapi_tags - 1)) // 0x100D)
7987         {
7988                 tlv = &nfapi_tags[tag_id - 0x1000];
7989         }
7990         else if (tag_id >= 0x2000 && tag_id <= (0x2000 + num_p7_tags - 1)) //0x205B)
7991         {
7992                 tlv = &p7_tags[tag_id - 0x2000];
7993         }
7994         else if (tag_id >= 0x3000 && tag_id <= (0x3000 + num_p4_tags - 1)) // 0x301A)
7995         {
7996                 tlv = &p4_tags[tag_id - 0x3000];
7997         }
7998         return tlv;
7999 }
8000
8001
8002 static proto_item* dissect_tl_header(ptvcursor_t * ptvc, packet_info* pinfo _U_)
8003 {
8004         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tl, "TL");
8005         ptvcursor_add(ptvc, hf_nfapi_tl_tag, 2, ENC_BIG_ENDIAN);
8006         proto_item* item = ptvcursor_add(ptvc, hf_nfapi_tl_length, 2, ENC_BIG_ENDIAN);
8007         ptvcursor_pop_subtree(ptvc);
8008
8009         return item;
8010 }
8011
8012 static void dissect_tlv_list(ptvcursor_t* ptvc, packet_info* pinfo, gint len)
8013 {
8014         while (ptvcursor_current_offset(ptvc) < len)
8015         {
8016                 guint16 tlv_id = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
8017                 guint16 tlv_len = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc) + 2);
8018
8019                 const tlv_t* tlv = look_up_tlv(tlv_id);
8020
8021                 if (tlv != NULL && tlv->name != NULL && tlv->tag_id == tlv_id)
8022                 {
8023                         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "%s", tlv->name);
8024                         proto_item* tlv_length_item = dissect_tl_header(ptvc, pinfo);
8025
8026                         // There are rare cases where the len of the tlv is 0.
8027                         if (tlv_len > 0)
8028                         {
8029
8030                                 if (tlv->decode != NULL)
8031                                 {
8032                                         // Create a sub buff with the correct length, so we can detect reading off the end
8033                                         tvbuff_t* sub_tvbuff = tvb_new_subset_length(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc), tlv_len);
8034                                         ptvcursor_t* sub_ptvc = ptvcursor_new(ptvcursor_tree(ptvc), sub_tvbuff, 0);
8035
8036                                         tlv->decode(sub_ptvc, pinfo);
8037
8038                                         if (ptvcursor_current_offset(sub_ptvc) != tlv_len)
8039                                         {
8040                                                 // error in the tlv length
8041                                                 expert_add_info_format(pinfo, tlv_length_item, &ei_invalid_tlv_length, "TLV length does not match decoded length");
8042                                         }
8043
8044                                         ptvcursor_free(sub_ptvc);
8045                                 }
8046
8047                                 ptvcursor_advance(ptvc, tlv_len);
8048                         }
8049
8050                         ptvcursor_pop_subtree(ptvc);
8051                 }
8052                 else
8053                 {
8054                         if (tlv_id >= 0xF000 /* && tlv_id <= 0xFFFF*/)
8055                         {
8056                                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "Unknown Vendor Extension Tag");
8057                         }
8058                         else
8059                         {
8060                                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "Unknown");
8061                         }
8062
8063                         dissect_tl_header(ptvc, pinfo);
8064                         ptvcursor_advance(ptvc, tlv_len);
8065                         ptvcursor_pop_subtree(ptvc);
8066                 }
8067         }
8068 }
8069
8070
8071 static void dissect_rx_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
8072 {
8073         guint32 i = 0, count;
8074         guint number_of_pdu_addr = ptvcursor_current_offset(ptvc); // *offset;
8075         wmem_array_t *lengths = wmem_array_new(wmem_packet_scope(), sizeof(guint16));
8076
8077         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 2, ENC_BIG_ENDIAN, &count);
8078
8079         if (count > 0)
8080         {
8081                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_rx_indication_pdu_list, "RX PDU List");
8082                 gint pdu_end = tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc)) + ptvcursor_current_offset(ptvc);
8083
8084                 while (tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc)) > 0 &&
8085                            ptvcursor_current_offset(ptvc) < pdu_end )
8086                 {
8087                         guint16 tlv_id = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
8088                         //guint16 tlv_len = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc) + 2);
8089
8090                         if (tlv_id == 0x2038)
8091                         {
8092                                 if (i != 0)
8093                                         ptvcursor_pop_subtree(ptvc);
8094
8095                                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_rx_indication_pdu_list, "[%d]", i);
8096
8097                                 i++;
8098                         }
8099
8100                         char* tlv_name = "Unknown";
8101                         const tlv_t* tlv = look_up_tlv(tlv_id);
8102
8103                         if (tlv != NULL && tlv->name != NULL && tlv->tag_id == tlv_id)
8104                         {
8105                                 tlv_name = tlv->name;
8106                         }
8107
8108                         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_rx_indication_pdu_list, "%s", tlv_name);
8109
8110                         dissect_tl_header(ptvc, pinfo);
8111
8112
8113                         if (tlv_id == 0x2038)
8114                         {
8115                                 dissect_rx_ue_info_value(ptvc, pinfo);
8116                         }
8117                         else if ((tlv_id == 0x2024) && (i > 0))
8118                         {
8119                                 guint16 val = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
8120                                 wmem_array_append_one(lengths, val);
8121                                 ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
8122                                 int data_offset = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
8123                                 ptvcursor_add(ptvc, hf_nfapi_data_offset, 2, ENC_BIG_ENDIAN);
8124                                 ptvcursor_add(ptvc, hf_nfapi_ul_cqi, 1, ENC_BIG_ENDIAN);
8125                                 ptvcursor_add(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN);
8126
8127                                 if ((data_offset > 0) && (pdu_end == (tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc)) + ptvcursor_current_offset(ptvc))))
8128                                 {
8129                                         pdu_end = number_of_pdu_addr + data_offset;
8130                                 }
8131
8132                         }
8133                         else if (tlv_id == 0x2025)
8134                         {
8135                                 dissect_rx_indication_rel9_value(ptvc, pinfo);
8136                         }
8137
8138                         ptvcursor_pop_subtree(ptvc);
8139
8140                 }
8141
8142                 // pop the last pdu index
8143                 ptvcursor_pop_subtree(ptvc);
8144
8145                 ptvcursor_pop_subtree(ptvc);
8146         }
8147
8148         for (i = 0; i < wmem_array_get_count(lengths); ++i)
8149         {
8150                 ptvcursor_add(ptvc, hf_nfapi_pdu, *((guint16 *)wmem_array_index(lengths, i)), ENC_NA);
8151         }
8152 }
8153
8154
8155 // ----------------------------------------------------------------------------|
8156
8157 static int dissect_p45_header(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
8158 {
8159         proto_tree* p45_tree;
8160
8161         p45_tree = proto_tree_add_subtree(tree, tvb, 0, 8, ett_nfapi_p4_p5_message_header, NULL, "P4 P5 Header");
8162
8163         proto_tree_add_item(p45_tree, hf_nfapi_p4_p5_message_header_phy_id, tvb, 0, 2, ENC_BIG_ENDIAN);
8164         proto_tree_add_item(p45_tree, hf_nfapi_p4_p5_message_header_message_id, tvb, 2, 2, ENC_BIG_ENDIAN);
8165         proto_tree_add_item(p45_tree, hf_nfapi_p4_p5_message_header_message_length, tvb, 4, 2, ENC_BIG_ENDIAN);
8166         proto_tree_add_item(p45_tree, hf_nfapi_p4_p5_message_header_spare, tvb, 6, 2, ENC_BIG_ENDIAN);
8167
8168         return 8;
8169 }
8170
8171 static int dissect_p45_header_with_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8172 {
8173         int offset = dissect_p45_header(tvb, pinfo, tree, data);
8174         ptvcursor_t *ptvc = ptvcursor_new(tree, tvb, offset);
8175
8176         dissect_tlv_list(ptvc, pinfo, tvb_reported_length(tvb));
8177         ptvcursor_free(ptvc);
8178         return tvb_captured_length(tvb);
8179 }
8180
8181 static int dissect_p45_header_with_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8182 {
8183         int offset = dissect_p45_header(tvb, pinfo, tree, data);
8184
8185         proto_tree_add_item(tree, hf_nfapi_error_code, tvb, offset, 4, ENC_BIG_ENDIAN);
8186
8187         return offset+4;
8188 }
8189
8190 static int dissect_p45_header_with_error_and_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8191 {
8192         int offset = dissect_p45_header(tvb, pinfo, tree, data);
8193         ptvcursor_t *ptvc;
8194
8195         proto_tree_add_item(tree, hf_nfapi_error_code, tvb, offset, 4, ENC_BIG_ENDIAN);
8196         offset += 4;
8197
8198         ptvc = ptvcursor_new(tree, tvb, offset);
8199         dissect_tlv_list(ptvc, pinfo, tvb_reported_length(tvb));
8200         ptvcursor_free(ptvc);
8201
8202         return tvb_captured_length(tvb);
8203 }
8204
8205 static int dissect_p45_header_with_p4_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8206 {
8207         int offset = dissect_p45_header(tvb, pinfo, tree, data);
8208
8209         proto_tree_add_item(tree, hf_nfapi_p4_error_code, tvb, offset, 4, ENC_BIG_ENDIAN);
8210
8211         return offset+4;
8212 }
8213
8214 static int dissect_p45_header_with_p4_error_and_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8215 {
8216         int offset = dissect_p45_header(tvb, pinfo, tree, data);
8217         ptvcursor_t *ptvc;
8218
8219         proto_tree_add_item(tree, hf_nfapi_p4_error_code, tvb, offset, 4, ENC_BIG_ENDIAN);
8220         offset += 4;
8221
8222         ptvc = ptvcursor_new(tree, tvb, offset);
8223         dissect_tlv_list(ptvc, pinfo, tvb_reported_length(tvb));
8224         ptvcursor_free(ptvc);
8225
8226         return tvb_captured_length(tvb);
8227 }
8228
8229 static int dissect_p45_header_with_rat_type_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8230 {
8231         int offset = dissect_p45_header(tvb, pinfo, tree, data);
8232         ptvcursor_t *ptvc;
8233
8234         proto_tree_add_item(tree, hf_nfapi_rat_type, tvb, offset, 1, ENC_BIG_ENDIAN);
8235         offset += 1;
8236
8237         ptvc = ptvcursor_new(tree, tvb, offset);
8238         dissect_tlv_list(ptvc, pinfo, tvb_reported_length(tvb));
8239         ptvcursor_free(ptvc);
8240
8241         return tvb_captured_length(tvb);
8242 }
8243
8244 static int dissect_p45_param_response_msg_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8245 {
8246         int offset = dissect_p45_header(tvb, pinfo, tree, data);
8247         ptvcursor_t *ptvc;
8248
8249         proto_tree_add_item(tree, hf_nfapi_error_code, tvb, offset, 1, ENC_BIG_ENDIAN);
8250         offset += 1;
8251         proto_tree_add_item(tree, hf_nfapi_num_tlv, tvb, offset, 1, ENC_BIG_ENDIAN);
8252         offset += 1;
8253
8254         ptvc = ptvcursor_new(tree, tvb, offset);
8255         dissect_tlv_list(ptvc, pinfo, tvb_reported_length(tvb));
8256         ptvcursor_free(ptvc);
8257
8258         return tvb_captured_length(tvb);
8259 }
8260
8261 static int dissect_p7_header(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint8* m, guint8* seg, guint8* seq)
8262 {
8263         proto_tree *header_tree;
8264         int offset = 0;
8265         guint8 m_seg;
8266         static const int *fields[] = {
8267                 &hf_nfapi_p7_message_header_m,
8268                 &hf_nfapi_p7_message_header_segment,
8269                 NULL
8270         };
8271
8272         header_tree = proto_tree_add_subtree(tree, tvb, offset, 16, ett_nfapi_p7_message_header, NULL, "P7 Header");
8273         proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_phy_id, tvb, offset, 2, ENC_BIG_ENDIAN);
8274         offset += 2;
8275         proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_message_id, tvb, offset, 2, ENC_BIG_ENDIAN);
8276         offset += 2;
8277         proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_message_length, tvb, offset, 2, ENC_BIG_ENDIAN);
8278         offset += 2;
8279
8280         if ((m != NULL) && (seg != NULL))
8281         {
8282                 m_seg = tvb_get_guint8(tvb, offset);
8283                 *m = (m_seg & 0x80) >> 7;
8284                 *seg = m_seg & 0x7F;
8285         }
8286         proto_tree_add_bitmask_list(header_tree, tvb, offset, 1, fields, ENC_BIG_ENDIAN);
8287         offset += 1;
8288
8289         if (seq != NULL)
8290         {
8291                 *seq = tvb_get_guint8(tvb, offset);
8292         }
8293         proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_sequence_number, tvb, offset, 1, ENC_BIG_ENDIAN);
8294         offset += 1;
8295         proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_checksum, tvb, offset, 4, ENC_BIG_ENDIAN);
8296         offset += 4;
8297         proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_transmit_timestamp, tvb, offset, 4, ENC_BIG_ENDIAN);
8298         offset += 4;
8299
8300         return offset;
8301 }
8302
8303 static int dissect_p7_dl_node_sync_msg_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8304 {
8305         int offset = dissect_p7_header(tvb, pinfo, tree, NULL, NULL, NULL);
8306
8307         proto_tree_add_item(tree, hf_nfapi_ul_node_sync_t1, tvb, offset, 4, ENC_BIG_ENDIAN);
8308         offset += 4;
8309         proto_tree_add_item(tree, hf_nfapi_ul_node_sync_t2, tvb, offset, 4, ENC_BIG_ENDIAN);
8310         offset += 4;
8311         proto_tree_add_item(tree, hf_nfapi_ul_node_sync_t3, tvb, offset, 4, ENC_BIG_ENDIAN);
8312         offset += 4;
8313
8314         return offset;
8315 }
8316
8317 static int dissect_p7_ul_node_sync_msg_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8318 {
8319         int offset = dissect_p7_header(tvb, pinfo, tree, NULL, NULL, NULL);
8320
8321         proto_tree_add_item(tree, hf_nfapi_dl_node_sync_t1, tvb, offset, 4, ENC_BIG_ENDIAN);
8322         offset += 4;
8323         proto_tree_add_item(tree, hf_nfapi_dl_node_sync_delta_sfn_sf, tvb, offset, 4, ENC_BIG_ENDIAN);
8324         offset += 4;
8325
8326         return offset;
8327 }
8328
8329 static int dissect_p7_timing_info_msg_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8330 {
8331         int offset = dissect_p7_header(tvb, pinfo, tree, NULL, NULL, NULL);
8332         proto_tree_add_item(tree, hf_nfapi_timing_info_last_sfn_sf, tvb, offset, 4, ENC_BIG_ENDIAN);
8333         offset += 4;
8334         proto_tree_add_item(tree, hf_nfapi_timing_info_time_since_last_timing_info, tvb, offset, 4, ENC_BIG_ENDIAN);
8335         offset += 4;
8336         proto_tree_add_item(tree, hf_nfapi_timing_info_dl_config_jitter, tvb, offset, 4, ENC_BIG_ENDIAN);
8337         offset += 4;
8338         proto_tree_add_item(tree, hf_nfapi_timing_info_tx_request_jitter, tvb, offset, 4, ENC_BIG_ENDIAN);
8339         offset += 4;
8340         proto_tree_add_item(tree, hf_nfapi_timing_info_ul_config_jitter, tvb, offset, 4, ENC_BIG_ENDIAN);
8341         offset += 4;
8342         proto_tree_add_item(tree, hf_nfapi_timing_info_hi_dci0_jitter, tvb, offset, 4, ENC_BIG_ENDIAN);
8343         offset += 4;
8344         proto_tree_add_item(tree, hf_nfapi_timing_info_dl_config_latest_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
8345         offset += 4;
8346         proto_tree_add_item(tree, hf_nfapi_timing_info_tx_request_latest_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
8347         offset += 4;
8348         proto_tree_add_item(tree, hf_nfapi_timing_info_ul_config_latest_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
8349         offset += 4;
8350         proto_tree_add_item(tree, hf_nfapi_timing_info_hi_dci0_latest_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
8351         offset += 4;
8352         proto_tree_add_item(tree, hf_nfapi_timing_info_dl_config_earliest_arrival, tvb, offset, 4, ENC_BIG_ENDIAN);
8353         offset += 4;
8354         proto_tree_add_item(tree, hf_nfapi_timing_info_tx_request_earliest_arrival, tvb, offset, 4, ENC_BIG_ENDIAN);
8355         offset += 4;
8356         proto_tree_add_item(tree, hf_nfapi_timing_info_ul_config_earliest_arrival, tvb, offset, 4, ENC_BIG_ENDIAN);
8357         offset += 4;
8358         proto_tree_add_item(tree, hf_nfapi_timing_info_hi_dci0_earliest_arrival, tvb, offset, 4, ENC_BIG_ENDIAN);
8359         offset += 4;
8360
8361         return offset;
8362 }
8363
8364 static reassembly_table ul_p7_reassemble_table;
8365 static reassembly_table dl_p7_reassemble_table;
8366
8367 static int hf_msg_fragments = -1;
8368 static int hf_msg_fragment = -1;
8369 static int hf_msg_fragment_overlap = -1;
8370 static int hf_msg_fragment_overlap_conflicts = -1;
8371 static int hf_msg_fragment_multiple_tails = -1;
8372 static int hf_msg_fragment_too_long_fragment = -1;
8373 static int hf_msg_fragment_error = -1;
8374 static int hf_msg_fragment_count = -1;
8375 static int hf_msg_reassembled_in = -1;
8376 static int hf_msg_reassembled_length = -1;
8377 static gint ett_msg_fragment = -1;
8378 static gint ett_msg_fragments = -1;
8379
8380 static const fragment_items msg_frag_items = {
8381         /* Fragment subtrees */
8382         &ett_msg_fragment,
8383         &ett_msg_fragments,
8384         /* Fragment fields */
8385         &hf_msg_fragments,
8386         &hf_msg_fragment,
8387         &hf_msg_fragment_overlap,
8388         &hf_msg_fragment_overlap_conflicts,
8389         &hf_msg_fragment_multiple_tails,
8390         &hf_msg_fragment_too_long_fragment,
8391         &hf_msg_fragment_error,
8392         &hf_msg_fragment_count,
8393         /* Reassembled in field */
8394         &hf_msg_reassembled_in,
8395         /* Reassembled length field */
8396         &hf_msg_reassembled_length,
8397         NULL,
8398         /* Tag */
8399         "Message fragments"
8400 };
8401
8402 static int dissect_nfapi_ul_p7(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8403 {
8404         guint8 m, seg, seq;
8405         int offset;
8406
8407         guint8 save_fragmented;
8408
8409         guint16 msg_id = tvb_get_ntohs(tvb, 2);
8410         guint16 msg_len = tvb_get_ntohs(tvb, 4);
8411
8412         offset = dissect_p7_header(tvb, pinfo, tree, &m, &seg, &seq);
8413         save_fragmented = pinfo->fragmented;
8414
8415         if (m == 1 || (m == 0 && seg > 0))
8416         {
8417                 fragment_head *fd_head;
8418                 tvbuff_t *save_tvb = tvb;
8419
8420                 if (offset >= msg_len) {
8421                         return tvb_captured_length(tvb);
8422                 }
8423
8424                 pinfo->fragmented = TRUE;
8425
8426                 fd_head = fragment_add_seq_check(&ul_p7_reassemble_table, tvb, offset, pinfo, seq, NULL, seg, msg_len - offset, (m == 1));
8427
8428                 if (fd_head == NULL)
8429                 {
8430                         return tvb_captured_length(tvb);
8431                 }
8432
8433                 tvb = process_reassembled_data(tvb, offset, pinfo, "Reassembled UL P7", fd_head, &msg_frag_items, NULL, tree);
8434                 if (tvb)
8435                 {
8436                         offset = 0;
8437                         col_append_fstr(pinfo->cinfo, COL_INFO, "[NFAPI P7 Reassembled %d]", seg);
8438                 }
8439                 else
8440                 {
8441                         col_append_fstr(pinfo->cinfo, COL_INFO, "[NFAPI P7 Segment %d]", seg);
8442                         return tvb_captured_length(save_tvb);
8443                 }
8444         }
8445
8446         pinfo->fragmented = save_fragmented;
8447
8448         switch (msg_id)
8449         {
8450                 case NFAPI_HARQ_INDICATION_MSG_ID:
8451                 case NFAPI_CRC_INDICATION_MSG_ID:
8452                 case NFAPI_RX_ULSCH_INDICATION_MSG_ID:
8453                 case NFAPI_RACH_INDICATION_MSG_ID:
8454                 case NFAPI_SRS_INDICATION_MSG_ID:
8455                 case NFAPI_RX_SR_INDICATION_MSG_ID:
8456                 case NFAPI_RX_CQI_INDICATION_MSG_ID:
8457                 {
8458                         ptvcursor_t *ptvc = ptvcursor_new(tree, tvb, offset);
8459                         ptvcursor_add(ptvc, hf_nfapi_sfn_sf, 2, ENC_BIG_ENDIAN);
8460                         dissect_tlv_list(ptvc, pinfo, msg_len);
8461                         ptvcursor_free(ptvc);
8462                 }
8463                 break;
8464
8465         };
8466
8467
8468         return tvb_captured_length(tvb);
8469 }
8470
8471 static int dissect_nfapi_dl_p7(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8472 {
8473         guint8 m, seg, seq;
8474         int offset;
8475
8476         guint8 save_fragmented;
8477
8478         guint16 msg_id = tvb_get_ntohs(tvb, 2);
8479         guint16 msg_len = tvb_get_ntohs(tvb, 4);
8480
8481         offset = dissect_p7_header(tvb, pinfo, tree, &m, &seg, &seq);
8482         save_fragmented = pinfo->fragmented;
8483
8484         if (m == 1 || (m == 0 && seg > 0))
8485         {
8486                 fragment_head *fd_head;
8487                 tvbuff_t *save_tvb = tvb;
8488
8489                 if (offset >= msg_len) {
8490                         return tvb_captured_length(tvb);
8491                 }
8492
8493                 pinfo->fragmented = TRUE;
8494
8495                 fd_head = fragment_add_seq_check(&dl_p7_reassemble_table, tvb, offset, pinfo, seq, NULL, seg, msg_len - offset, (m == 1));
8496
8497                 if (fd_head == NULL)
8498                 {
8499                         return tvb_captured_length(tvb);
8500                 }
8501
8502                 tvb = process_reassembled_data(tvb, offset, pinfo, "Reassembled DL P7", fd_head, &msg_frag_items, NULL, tree);
8503                 if (tvb)
8504                 {
8505                         offset = 0;
8506                         col_append_fstr(pinfo->cinfo, COL_INFO, "[NFAPI P7 Reassembled %d]", seg);
8507                 }
8508                 else
8509                 {
8510                         col_append_fstr(pinfo->cinfo, COL_INFO, "[NFAPI P7 Segment %d]", seg);
8511                         return tvb_captured_length(save_tvb);
8512                 }
8513         }
8514
8515         pinfo->fragmented = save_fragmented;
8516
8517         switch (msg_id)
8518         {
8519                 case NFAPI_DL_CONFIG_REQUEST_MSG_ID:
8520                 case NFAPI_UL_CONFIG_REQUEST_MSG_ID:
8521                 case NFAPI_HI_DCI0_REQUEST_MSG_ID:
8522                 case NFAPI_TX_REQUEST_MSG_ID:
8523                 case NFAPI_LBT_DL_CONFIG_REQUEST_MSG_ID:
8524                 case NFAPI_LBT_DL_INDICATION_MSG_ID:
8525                 {
8526                         ptvcursor_t *ptvc = ptvcursor_new(tree, tvb, offset);
8527                         ptvcursor_add(ptvc, hf_nfapi_sfn_sf, 2, ENC_BIG_ENDIAN);
8528                         dissect_tlv_list(ptvc, pinfo, msg_len);
8529                         ptvcursor_free(ptvc);
8530                         break;
8531                 }
8532         }
8533
8534         return tvb_captured_length(tvb);
8535 }
8536
8537
8538 static int dissect_nfapi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8539 {
8540         proto_tree* nfapi_tree;
8541         proto_item* nfapi_item;
8542         guint16 msg_id;
8543         const gchar* message_str;
8544
8545         if (tvb_reported_length(tvb) < 4)
8546                 return 0;
8547
8548         col_set_str(pinfo->cinfo, COL_PROTOCOL, "NFAPI");
8549         col_clear(pinfo->cinfo, COL_INFO);
8550
8551         nfapi_item = proto_tree_add_item(tree, proto_nfapi, tvb, 0, -1, ENC_NA);
8552         nfapi_tree = proto_item_add_subtree(nfapi_item, ett_nfapi);
8553
8554         msg_id = tvb_get_ntohs(tvb, 2);
8555         message_str = val_to_str_const(msg_id, message_id_vals, "Unknown");
8556
8557         // Flag if this is a vendor extention message, could do it for P4, 5, 7
8558         if (msg_id >= 0x0300 && msg_id <= 0x03FF)
8559         {
8560                 col_append_fstr(pinfo->cinfo, COL_INFO, "Vendor Extension");
8561                 proto_item_append_text(nfapi_item, ", Vendor Extension");
8562         }
8563         else
8564         {
8565                 proto_item_append_text(nfapi_item, ", %s", message_str);
8566                 col_append_fstr(pinfo->cinfo, COL_INFO, " %s ", message_str);
8567         }
8568
8569         if (!dissector_try_uint_new(message_table, msg_id, tvb, pinfo, nfapi_tree, FALSE, NULL))
8570         {
8571                 call_data_dissector(tvb, pinfo, nfapi_tree);
8572         }
8573
8574         return tvb_captured_length(tvb);
8575 }
8576
8577 static void nfapi_tag_vals_fn(gchar* s, guint32 v)
8578 {
8579         const tlv_t* tlv = look_up_tlv(v);
8580         if (tlv != 0)
8581         {
8582                 g_snprintf(s, ITEM_LABEL_LENGTH, "%s (0x%x)", tlv->name, v);
8583         }
8584         else
8585         {
8586                 g_snprintf(s, ITEM_LABEL_LENGTH, "%s (0x%x)", "Unknown", v);
8587         }
8588 }
8589 static void neg_pow_conversion_fn(gchar* s, guint8 v)
8590 {
8591         g_snprintf(s, ITEM_LABEL_LENGTH, "%d dB (%d)", ((gint16)v * (-1)), v);
8592 }
8593 static void power_offset_conversion_fn(gchar* s, guint16 v)
8594 {
8595         g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (((float)v * 0.001) - 6.0), v);
8596 }
8597 static void reference_signal_power_conversion_fn(gchar* s, guint16 v)
8598 {
8599         g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (((float)v * 0.25) - 63.75), v);
8600 }
8601 static void laa_threshold_conversion_fn(gchar* s, guint16 v)
8602 {
8603         g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (float)(v * -100.00), v);
8604 }
8605 static void max_transmit_power_2_conversion_fn(gchar* s, guint16 v)
8606 {
8607         g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1) - 10.0, v);
8608 }
8609 static void max_transmit_power_conversion_fn(gchar* s, guint16 v)
8610 {
8611         g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1), v);
8612 }
8613 static void sfn_sf_conversion_fn(gchar* s, guint16 v)
8614 {
8615         g_snprintf(s, ITEM_LABEL_LENGTH, "%d/%d (%d)", v >> 0x4, v & 0x000F, v);
8616 }
8617 static void rssi_conversion_fn(gchar* s, guint16 v)
8618 {
8619         g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1), v);
8620 }
8621 static void dl_rs_tx_pow_measment_conversion_fn(gchar* s, guint16 v)
8622 {
8623         g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1), v);
8624 }
8625
8626 static void ul_cqi_conversion_fn(gchar* s, guint16 v)
8627 {
8628         g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (((float)v / 2 ) - 64.0), v);
8629 }
8630
8631 // ----------------------------------------------------------------------------|
8632
8633 void proto_register_nfapi(void)
8634 {
8635         static hf_register_info hf[] =
8636         {
8637                 { &hf_msg_fragments,
8638                         { "Message fragments", "nfapi.fragments",
8639                         FT_NONE, BASE_NONE, NULL, 0x00,
8640                         NULL, HFILL }
8641                 },
8642                 { &hf_msg_fragment,
8643                         { "Message fragment", "nfapi.fragment",
8644                         FT_FRAMENUM, BASE_NONE, NULL, 0x00,
8645                         NULL, HFILL }
8646                 },
8647                 { &hf_msg_fragment_overlap,
8648                         { "Message fragment overlap", "nfapi.fragment.overlap",
8649                         FT_BOOLEAN, 0, NULL, 0x00,
8650                         NULL, HFILL }
8651                 },
8652                 { &hf_msg_fragment_overlap_conflicts,
8653                         { "Message fragment overlapping with conflicting data", "nfapi.fragment.overlap.conflicts",
8654                         FT_BOOLEAN, 0, NULL, 0x00,
8655                         NULL, HFILL }
8656                 },
8657                 { &hf_msg_fragment_multiple_tails,
8658                         { "Message has multiple tail fragments", "nfapi.fragment.multiple_tails",
8659                         FT_BOOLEAN, 0, NULL, 0x00,
8660                         NULL, HFILL }
8661                 },
8662                 { &hf_msg_fragment_too_long_fragment,
8663                         { "Message fragment too long", "nfapi.fragment.too_long_fragment",
8664                         FT_BOOLEAN, 0, NULL, 0x00,
8665                         NULL, HFILL }
8666                 },
8667                 { &hf_msg_fragment_error,
8668                         { "Message defragmentation error", "nfapi.fragment.error",
8669                         FT_FRAMENUM, BASE_NONE, NULL, 0x00,
8670                         NULL, HFILL }
8671                 },
8672                 { &hf_msg_fragment_count,
8673                         { "Message fragment count", "nfapi.fragment.count",
8674                         FT_UINT32, BASE_DEC, NULL, 0x00,
8675                         NULL, HFILL }
8676                 },
8677                 { &hf_msg_reassembled_in,
8678                         { "Reassembled in", "nfapi.reassembled.in",
8679                         FT_FRAMENUM, BASE_NONE, NULL, 0x00,
8680                         NULL, HFILL }
8681                 },
8682                 { &hf_msg_reassembled_length,
8683                         { "Reassembled length", "nfapi.reassembled.length",
8684                         FT_UINT32, BASE_DEC, NULL, 0x00,
8685                         NULL, HFILL }
8686                 },
8687                 { &hf_nfapi_p4_p5_message_header_phy_id,
8688                         { "PHY ID", "nfapi.p4_p5_message_header.phy_id",
8689                         FT_UINT16, BASE_DEC, NULL, 0x0,
8690                         "Within the PNF Device, the unique identity of the PHY instance as assigned through the PNF_CONFIG.request", HFILL }
8691                 },
8692                 { &hf_nfapi_p4_p5_message_header_message_id,
8693                         { "Message ID", "nfapi.p4_p5_message_header.message_id",
8694                         FT_UINT16, BASE_HEX_DEC, VALS(message_id_vals), 0x0,
8695                         "The nFAPI message identity", HFILL }
8696                 },
8697                 { &hf_nfapi_p4_p5_message_header_message_length,
8698                         { "Message Length", "nfapi.p4_p5_message_header.message_length",
8699                         FT_UINT16, BASE_DEC, NULL, 0x0,
8700                         "The length in bytes of the message including the header", HFILL }
8701                 },
8702                 { &hf_nfapi_p4_p5_message_header_spare,
8703                         { "Spare", "nfapi.p4_p5_message_header.spare",
8704                         FT_UINT16, BASE_DEC, NULL, 0x0,
8705                         "Reserved field to be populated with zeros on transmission and ignored on reception", HFILL }
8706                 },
8707                 { &hf_nfapi_p7_message_header_phy_id,
8708                         { "Phy ID", "nfapi.p7_message_header.phy_id",
8709                         FT_UINT16, BASE_DEC, NULL, 0x0,
8710                         "Within the PNF Device, the unique identity of the PHY instance as assigned through the PNF_CONFIG.request", HFILL }
8711                 },
8712                 { &hf_nfapi_p7_message_header_message_id,
8713                         { "Message ID", "nfapi.p7.message_header.message_id",
8714                         FT_UINT16, BASE_HEX_DEC, VALS(message_id_vals), 0x0,
8715                         "The nFAPI message identity", HFILL }
8716                 },
8717                 { &hf_nfapi_p7_message_header_message_length,
8718                         { "Message Length", "nfapi.p7_message_header.message_length",
8719                         FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &units_byte_bytes, 0x0,
8720                         "The length in bytes of the message segment including the header", HFILL }
8721                 },
8722                 { &hf_nfapi_p7_message_header_m,
8723                         { "More segments", "nfapi.p7_message_header.more_segments",
8724                         FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80,
8725                         "A More flag indicating there are more segments to follow to complete the entire message", HFILL }
8726                 },
8727                 { &hf_nfapi_p7_message_header_segment,
8728                         { "Segment Number", "nfapi.p7_message_header.segment_number",
8729                         FT_UINT8, BASE_DEC, NULL, 0x7F,
8730                         "The segment number starting at zero and incrementing by one between each segment", HFILL }
8731                 },
8732                 { &hf_nfapi_p7_message_header_sequence_number,
8733                         { "Sequence Number", "nfapi.p7_message_header.m_segment_sequence",
8734                         FT_UINT8, BASE_DEC, NULL, 0x0,
8735                         "The incrementing sequence number for all complete messages over the P7 nFAPI interface per PHY instance", HFILL }
8736                 },
8737                 { &hf_nfapi_p7_message_header_checksum,
8738                         { "Checksum", "nfapi.p7_message_header.checksum",
8739                         FT_UINT32, BASE_HEX_DEC, NULL, 0x0,
8740                         "The checksum of the whole message segment (including header) as calculated using "
8741                         "the CRC32c algorithm following the same method as the SCTP protocol defined in IETF RFC 4960 "
8742                         "The Checksum is optional to populate and must be filled with zero's when not used", HFILL }
8743                 },
8744                 { &hf_nfapi_p7_message_header_transmit_timestamp,
8745                         { "Transmit Timestamp", "nfapi.p7_message_header.timestamp",
8746                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
8747                         "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 }
8748                 },
8749                 { &hf_nfapi_tl_tag,
8750                         { "TLV Tag", "nfapi.tl_tag",
8751                         FT_UINT16, BASE_CUSTOM, CF_FUNC(nfapi_tag_vals_fn), 0x0,
8752                         NULL, HFILL }
8753                 },
8754                 { &hf_nfapi_tl_length,
8755                         { "TLV Length", "nfapi.tl_length",
8756                         FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &units_byte_bytes, 0x0,
8757                         NULL, HFILL }
8758                 },
8759                 { &hf_nfapi_error_code,
8760                         { "Error Code", "nfapi.error.code",
8761                         FT_UINT8, BASE_DEC, VALS(nfapi_error_vals), 0x0,
8762                         NULL, HFILL }
8763                 },
8764                 { &hf_nfapi_p4_error_code,
8765                         { "Error Code", "nfapi.p4_error.code",
8766                         FT_UINT8, BASE_DEC, VALS(nfapi_p4_error_vals), 0x0,
8767                         NULL, HFILL }
8768                 },
8769                 { &hf_nfapi_rat_type,
8770                         { "RAT Type", "nfapi.rat_type",
8771                         FT_UINT8, BASE_DEC, VALS(nfapi_rat_type_vals), 0x0,
8772                         NULL, HFILL }
8773                 },
8774                 { &hf_nfapi_num_tlv,
8775                         { "Number of TLV", "nfapi.param.response.num_tlv",
8776                         FT_UINT8, BASE_DEC, NULL, 0x0,
8777                         NULL, HFILL }
8778                 },
8779                 { &hf_nfapi_phy_state,
8780                         { "Phy state value", "nfapi.phy.state",
8781                         FT_UINT16, BASE_DEC, VALS(nfapi_phy_state_vals), 0x0,
8782                         "Indicates the current operational state of the PHY", HFILL }
8783                 },
8784                 { &hf_nfapi_dl_ue_per_sf,
8785                         { "Downlink UEs per Subframe", "nfapi.dl.ue.per.sf",
8786                         FT_UINT8, BASE_DEC, NULL, 0x0,
8787                         "The maximum number of downlink UEs per subframe supported."
8788                         "This is the maximum number of downlink UEs that can be scheduled per "
8789                         "subframe, non-inclusive of broadcast, paging and common channels.", HFILL }
8790                 },
8791                 { &hf_nfapi_ul_ue_per_sf,
8792                         { "Uplink UEs per Subframe", "nfapi.ul.ue.per.sf",
8793                         FT_UINT8, BASE_DEC, NULL, 0x0,
8794                         "The maximum number of uplink UEs per subframe supported."
8795                         "This is the maximum number of uplink UEs that can be scheduled per "
8796                         "subframe, non-inclusive of common channels.", HFILL }
8797                 },
8798                 { &hf_nfapi_duplex_mode,
8799                         { "Duplex Mode", "nfapi.duplex.mode",
8800                         FT_UINT16, BASE_DEC, VALS(nfapi_duplex_mode_vals), 0x0,
8801                         NULL, HFILL }
8802                 },
8803                 { &hf_nfapi_dl_bandwidth_support,
8804                         { "Downlink bandwidth support", "nfapi.dl.bandwidth.support",
8805                         FT_UINT16, BASE_HEX, NULL, 0x0,
8806                         "The PHY downlink channel bandwidth capability (in resource blocks)", HFILL }
8807                 },
8808                 { &hf_nfapi_dl_bandwidth_support_6,
8809                         { "6Mhz", "nfapi.dl.bandwidth.support.6",
8810                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0001,
8811                         NULL, HFILL }
8812                 },
8813                 { &hf_nfapi_dl_bandwidth_support_15,
8814                         { "15Mhz", "nfapi.dl.bandwidth.support.15",
8815                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0002,
8816                         NULL, HFILL }
8817                 },
8818                 { &hf_nfapi_dl_bandwidth_support_25,
8819                         { "25Mhz", "nfapi.dl.bandwidth.support.25",
8820                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0004,
8821                         NULL, HFILL }
8822                 },
8823                 { &hf_nfapi_dl_bandwidth_support_50,
8824                         { "50Mhz", "nfapi.dl.bandwidth.support.50",
8825                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0008,
8826                         NULL, HFILL }
8827                 },
8828                 { &hf_nfapi_dl_bandwidth_support_75,
8829                         { "75Mhz", "nfapi.dl.bandwidth.support.75",
8830                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0010,
8831                         NULL, HFILL }
8832                 },
8833                 { &hf_nfapi_dl_bandwidth_support_100,
8834                         { "100Mhz", "nfapi.dl.bandwidth.support.100",
8835                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0020,
8836                         NULL, HFILL }
8837                 },
8838                 { &hf_nfapi_ul_bandwidth_support,
8839                         { "Uplink bandwidth support", "nfapi.ul.bandwidth.support",
8840                         FT_UINT16, BASE_HEX, NULL, 0x0,
8841                         "The PHY uplink channel bandwidth capability (in resource blocks)", HFILL }
8842                 },
8843                 { &hf_nfapi_ul_bandwidth_support_6,
8844                         { "6Mhz", "nfapi.ul.bandwidth.support.6",
8845                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0001,
8846                         NULL, HFILL }
8847                 },
8848                 { &hf_nfapi_ul_bandwidth_support_15,
8849                         { "15Mhz", "nfapi.ul.bandwidth.support.15",
8850                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0002,
8851                         NULL, HFILL }
8852                 },
8853                 { &hf_nfapi_ul_bandwidth_support_25,
8854                         { "25Mhz", "nfapi.ul.bandwidth.support.25",
8855                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0004,
8856                         NULL, HFILL }
8857                 },
8858                 { &hf_nfapi_ul_bandwidth_support_50,
8859                         { "50Mhz", "nfapi.ul.bandwidth.support.50",
8860                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0008,
8861                         NULL, HFILL }
8862                 },
8863                 { &hf_nfapi_ul_bandwidth_support_75,
8864                         { "75Mhz", "nfapi.ul.bandwidth.support.75",
8865                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0010,
8866                         NULL, HFILL }
8867                 },
8868                 { &hf_nfapi_ul_bandwidth_support_100,
8869                         { "100Mhz", "nfapi.ul.bandwidth.support.100",
8870                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0020,
8871                         NULL, HFILL }
8872                 },
8873                 { &hf_nfapi_dl_modulation_support,
8874                         { "Downlink modulation support", "nfapi.dl.modulation.support",
8875                         FT_UINT16, BASE_HEX, NULL, 0x0,
8876                         "The PHY downlink modulation capability", HFILL }
8877                 },
8878                 { &hf_nfapi_dl_modulation_support_qpsk,
8879                         { "QPSK", "nfapi.dl.modulation.support.qpsk",
8880                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0001,
8881                         NULL, HFILL }
8882                 },
8883                 { &hf_nfapi_dl_modulation_support_16qam,
8884                         { "16QAM", "nfapi.dl.modulation.support.16qam",
8885                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0002,
8886                         NULL, HFILL }
8887                 },
8888                 { &hf_nfapi_dl_modulation_support_64qam,
8889                         { "64QAM", "nfapi.dl.modulation.support.64qam",
8890                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0004,
8891                         NULL, HFILL }
8892                 },
8893                 { &hf_nfapi_dl_modulation_support_256qam,
8894                         { "256QAM", "nfapi.dl.modulation.support.256qam",
8895                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0008,
8896                         NULL, HFILL }
8897                 },
8898                 { &hf_nfapi_ul_modulation_support,
8899                         { "Uplink modulation support", "nfapi.ul.modulation.support",
8900                         FT_UINT16, BASE_HEX, NULL, 0x0,
8901                         "The PHY uplink modulation capability", HFILL }
8902                 },
8903                 { &hf_nfapi_ul_modulation_support_qpsk,
8904                         { "QPSK", "nfapi.ul.modulation.support.qpsk",
8905                         FT_BOOLEAN, 16, NULL, 0x0001,
8906                         NULL, HFILL }
8907                 },
8908                 { &hf_nfapi_ul_modulation_support_16qam,
8909                         { "16QAM", "nfapi.ul.modulation.support.16qam",
8910                         FT_BOOLEAN, 16, NULL, 0x0002,
8911                         NULL, HFILL }
8912                 },
8913                 { &hf_nfapi_ul_modulation_support_64qam,
8914                         { "64QAM", "nfapi.ul.modulation.support.64qam",
8915                         FT_BOOLEAN, 16, NULL, 0x0004,
8916                         NULL, HFILL }
8917                 },
8918                 { &hf_nfapi_phy_antenna_capability,
8919                         { "Phy Antenna capability", "nfapi.phy.antenna.capability",
8920                         FT_UINT16, BASE_DEC, NULL, 0x0,
8921                         "Number of antennas supported", HFILL }
8922                 },
8923                 { &hf_nfapi_release_capability,
8924                         { "Release capability", "nfapi.release.capability",
8925                         FT_UINT16, BASE_DEC, NULL, 0x0,
8926                         "Indicates which release the PHY supports", HFILL }
8927                 },
8928                 { &hf_nfapi_mbsfn_capability,
8929                         { "MBSFN capability", "nfapi.mbsfn.capability",
8930                         FT_BOOLEAN, 16, TFS(&support_strname), 0x0,
8931                         "Indicates support for MBSFN features", HFILL }
8932                 },
8933                 { &hf_nfapi_laa_capability,
8934                         { "LAA Support", "nfapi.laa.support",
8935                         FT_BOOLEAN, 16, TFS(&support_strname), 0x0,
8936                         "Indicates support for LAA features", HFILL }
8937                 },
8938                 { &hf_nfapi_pd_sensing_lbt_support,
8939                         { "PD sensing LBT support", "nfapi.pd.sensing.lbt.support",
8940                         FT_BOOLEAN, 16, TFS(&support_strname), 0x0,
8941                         "Indicates support for PD sensing in L1", HFILL }
8942                 },
8943                 { &hf_nfapi_multi_carrier_lbt_support,
8944                         { "Multi carrier LBT support", "nfapi.multi.carrier.lbt.support",
8945                         FT_UINT16, BASE_DEC, VALS(nfapi_mutli_carrier_lbt_support_vals), 0x0,
8946                         NULL, HFILL }
8947                 },
8948                 { &hf_nfapi_partial_sf_support,
8949                         { "Partial SF support", "nfapi.partial.sf.support",
8950                         FT_BOOLEAN, 8, TFS(&partial_sf_support_strname), 0x0,
8951                         "Indicates support for Partial SF in L1", HFILL }
8952                 },
8953                 { &hf_nfapi_reference_signal_power,
8954                         { "Reference signal power", "nfapi.ref_sig_power",
8955                         FT_UINT16, BASE_CUSTOM, CF_FUNC(reference_signal_power_conversion_fn), 0x0,
8956                         "Normalized value levels (relative) to accommodate different absolute Tx Power used by eNb", HFILL }
8957                 },
8958                 { &hf_nfapi_primary_synchronization_signal_epre_eprers,
8959                         { "Primary synchronization signal EPRE/EPRERS", "nfapi.primary.sync.signal",
8960                         FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
8961                         "The power of synchronization signal with respect to the reference signal, (PSS for LTE cell, NPSS for NB-IOT cell)", HFILL }
8962                 },
8963                 { &hf_nfapi_secondary_synchronization_signal_epre_eprers,
8964                         { "Secondary synchronization signal EPRE/EPRERS", "nfapi.secondary.sync.signal",
8965                         FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
8966                         "The power of synchronization signal with respect to the reference signal, (SSS for LTE cell, NSSS for NB-IOT cell)", HFILL }
8967                 },
8968                 { &hf_nfapi_physical_cell_id,
8969                         { "Physical Cell ID", "nfapi.physical.cell.id",
8970                         FT_UINT16, BASE_DEC, NULL, 0x0,
8971                         "The Cell ID sent with the synchronization signal", HFILL }
8972                 },
8973                 { &hf_nfapi_phich_resource,
8974                         { "PHICH Resource", "nfapi.phich.resource",
8975                         FT_UINT16, BASE_DEC, VALS(nfapi_phich_resource_vals), 0x0,
8976                         "The number of resource element groups used for PHICH", HFILL }
8977                 },
8978                 { &hf_nfapi_phich_duration,
8979                         { "PHICH Duration", "nfapi.phich.duration",
8980                         FT_BOOLEAN, 8, TFS(&phich_duration_strname), 0x0,
8981                         "The PHICH duration for MBSFN and non-MBSFN sub-frames", HFILL }
8982                 },
8983                 { &hf_nfapi_phich_power_offset,
8984                         { "PHICH Power Offset", "nfapi.phich.power.offset",
8985                         FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
8986                         "The power per antenna of the PHICH with respect to the reference signal", HFILL }
8987                 },
8988                 { &hf_nfapi_configuration_index,
8989                         { "Configuration Index", "nfapi.configuration.index",
8990                         FT_UINT16, BASE_DEC, NULL, 0x0,
8991                         "Provides information about the location and format of the PRACH.", HFILL }
8992                 },
8993                 { &hf_nfapi_root_sequence_index,
8994                         { "Root sequence Index", "nfapi.root.sequence.index",
8995                         FT_UINT16, BASE_DEC, NULL, 0x0,
8996                         "PRACH Root sequence Index", HFILL }
8997                 },
8998                 { &hf_nfapi_zero_correlation_zone_configuration,
8999                         { "Zero correlation zone configuration", "nfapi.zero.correlation.zone.configuration",
9000                         FT_UINT16, BASE_DEC, NULL, 0x0,
9001                         "Equivalent to Ncs", HFILL }
9002                 },
9003                 { &hf_nfapi_high_speed_flag,
9004                         { "High Speed Flag", "nfapi.high.speed.flag",
9005                         FT_BOOLEAN, 8, TFS(&high_speed_flag_strname), 0x0,
9006                         "Indicates if unrestricted, or restricted, set of preambles is used", HFILL }
9007                 },
9008                 { &hf_nfapi_frequency_offset,
9009                         { "Frequency offset", "nfapi.frequency.offset",
9010                         FT_UINT16, BASE_DEC, NULL, 0x0,
9011                         "The first physical resource block available for PRACH", HFILL }
9012                 },
9013                 { &hf_nfapi_hopping_mode,
9014                         { "Hopping Mode", "nfapi.hopping.mode",
9015                         FT_BOOLEAN, 8, TFS(&hopping_mode_strname), 0x0,
9016                         "If hopping is enabled indicates the type of hopping used", HFILL }
9017                 },
9018                 { &hf_nfapi_hopping_offset,
9019                         { "Hopping offset", "nfapi.hopping.offset",
9020                         FT_UINT16, BASE_DEC, NULL, 0x0,
9021                         "The offset used if hopping is enabled", HFILL }
9022                 },
9023                 { &hf_nfapi_delta_pucch_shift,
9024                         { "Delta PUCCH Shift", "nfapi.delta.pucch.shift",
9025                         FT_UINT16, BASE_DEC, NULL, 0x0,
9026                         "The cyclic shift difference", HFILL }
9027                 },
9028                 { &hf_nfapi_n_cqi_rb,
9029                         { "N CQI RB", "nfapi.n.cqi.rb",
9030                         FT_UINT16, BASE_DEC, NULL, 0x0,
9031                         "The bandwidth, in units of resource blocks, that is available for use by PUCCH formats 2/2a/2b transmission in each slot", HFILL }
9032                 },
9033                 { &hf_nfapi_n_an_cs,
9034                         { "N AN CS", "nfapi.n.an.cs",
9035                         FT_UINT16, BASE_DEC, NULL, 0x0,
9036                         "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 }
9037                 },
9038                 { &hf_nfapi_n1_pucch_an,
9039                         { "N1 PUCCH AN", "nfapi.n1.pucch.an",
9040                         FT_UINT16, BASE_DEC, NULL, 0x0,
9041                         "N1 PUCCH", HFILL }
9042                 },
9043                 { &hf_nfapi_bandwidth_configuration,
9044                         { "Bandwidth configuration", "nfapi.bw.configuration",
9045                         FT_UINT16, BASE_DEC, NULL, 0x0,
9046                         "The available SRS bandwidth of the cell", HFILL }
9047                 },
9048                 { &hf_nfapi_srs_subframe_configuration,
9049                         { "SRS subframe configuration", "nfapi.srs.subframe.configuration",
9050                         FT_UINT16, BASE_DEC, NULL, 0x0,
9051                         "The subframe configuration. Needed if semi-static configuration is held in PHY", HFILL }
9052                 },
9053                 { &hf_nfapi_uplink_rs_hopping,
9054                         { "Uplink RS hopping", "nfapi.uplink.rs.hopping",
9055                         FT_UINT16, BASE_DEC, VALS(nfapi_uplink_rs_hopping_vals), 0x0,
9056                         "Indicates the type of hopping to use", HFILL }
9057                 },
9058                 { &hf_nfapi_group_assignment,
9059                         { "Group assignment", "nfapi.group.assignment",
9060                         FT_UINT16, BASE_DEC, NULL, 0x0,
9061                         "The sequence shift pattern used if group hopping is enabled", HFILL }
9062                 },
9063                 { &hf_nfapi_cyclic_shift_1_for_drms,
9064                         { "Cyclic Shift 1 for DRMS", "nfapi.cyclic.shift.1.for.drms",
9065                         FT_UINT16, BASE_DEC, NULL, 0x0,
9066                         "Specifies the cyclic shift for the reference signal used in the cell.", HFILL }
9067                 },
9068                 { &hf_nfapi_subframe_assignment,
9069                         { "Subframe_assignment", "nfapi.subframe.assignment",
9070                         FT_UINT16, BASE_DEC, NULL, 0x0,
9071                         "For TDD mode only, indicates the DL/UL subframe structure", HFILL }
9072                 },
9073                 { &hf_nfapi_special_subframe_patterns,
9074                         { "Special Subframe patterns", "nfapi.special.subframe.patterns",
9075                         FT_UINT16, BASE_DEC, NULL, 0x0,
9076                         "For TDD mode only. Length of fields DwPTS, GP and UpPTS", HFILL }
9077                 },
9078                 { &hf_nfapi_ed_threshold_for_lbt_for_pdsch,
9079                         { "ED Threshold for LBT for PDSCH", "nfapi.ed.threshold.for.lbt.pdsch",
9080                         FT_UINT16, BASE_CUSTOM, CF_FUNC(laa_threshold_conversion_fn), 0x0,
9081                         "Indicates the energy detection threshold in dBm for LBT for PDSCH", HFILL }
9082                 },
9083                 { &hf_nfapi_ed_threshold_for_lbt_for_drs,
9084                         { "ED Threshold for LBT for DRS", "nfapi.ed.threshold.for.lbt.for.drs",
9085                         FT_UINT16, BASE_CUSTOM, CF_FUNC(laa_threshold_conversion_fn), 0x0,
9086                         "Indicates the energy detection threshold in dBm for LBT for DRS", HFILL }
9087                 },
9088                 { &hf_nfapi_pd_threshold,
9089                         { "PD Threshold", "nfapi.pd.threshold",
9090                         FT_UINT16, BASE_CUSTOM, CF_FUNC(laa_threshold_conversion_fn), 0x0,
9091                         "Indicates the preamble detection threshold in dBm, if the L1 capabilities support PD", HFILL }
9092                 },
9093                 { &hf_nfapi_multi_carrier_type,
9094                         { "Multi carrier type", "nfapi.multi.carrier.type",
9095                         FT_UINT16, BASE_DEC, VALS(nfapi_laa_carrier_type_vals), 0x0,
9096                         "Indicates multi carrier type configuration of L1 (according to L1 capabilities and L2 scheduler requirements", HFILL }
9097                 },
9098                 { &hf_nfapi_multi_carrier_tx,
9099                         { "Multi carrier TX", "nfapi.multi.carrier.tx",
9100                         FT_BOOLEAN, 8, TFS(&nfapi_multi_carrier_tx_strname), 0x0,
9101                         "Indicates multi carrier transmission configuration of L1 (according to type if supporting multi carrier)", HFILL }
9102                 },
9103                 { &hf_nfapi_multi_carrier_freeze,
9104                         { "Multi carrier freeze", "nfapi.multi.carrier.freeze",
9105                         FT_BOOLEAN, 8, TFS(&nfapi_multi_carrier_freeze_strname), 0x0,
9106                         "Indicates multi carrier freeze, configuration of L1 (applicable only to type A type if supporting multi carrier)", HFILL }
9107                 },
9108                 { &hf_nfapi_tx_antenna_ports_for_drs,
9109                         { "Tx antenna ports for DRS", "nfapi.tx.antenna.ports.for.drs",
9110                         FT_UINT16, BASE_DEC, NULL, 0x0,
9111                         "The number of cell specific transmit antenna ports within the DRS occasions", HFILL }
9112                 },
9113                 { &hf_nfapi_transmission_power_for_drs,
9114                         { "Transmission power for DRS", "nfapi.transmission.power.for.drs",
9115                         FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
9116                         "Offset of cell specific Reference signals power within DRS occasions to the reference signal power", HFILL }
9117                 },
9118                 { &hf_nfapi_pbch_repetitions_enabled_r13,
9119                         { "PBCH Repetitions enable R13", "nfapi.pbch.repetitions.enabled_r13",
9120                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9121                         "Enable / Disable PBCH repetitions", HFILL }
9122                 },
9123                 { &hf_nfapi_prach_cat_m_root_sequence_index,
9124                         { "PRACH CAT-M Root sequence Index", "nfapi.prach.cat_m.root.squence.index",
9125                         FT_UINT16, BASE_DEC, NULL, 0x0,
9126                         "PRACH Root sequence Index", HFILL }
9127                 },
9128                 { &hf_nfapi_prach_cat_m_zero_correlation_zone_configuration,
9129                         { "PRACH CAT-M Zero correlation zone configuration", "nfapi.prach.cat_m.zero.correlation.zone.configuration",
9130                         FT_UINT16, BASE_DEC, NULL, 0x0,
9131                         "Equivalent to Ncs", HFILL }
9132                 },
9133                 { &hf_nfapi_prach_cat_m_high_speed_flag,
9134                         { "PRACH CAT-M High speed flag", "nfapi.prach.cat_m.high.speed.flag",
9135                         FT_BOOLEAN, 8, TFS(&high_speed_flag_strname), 0x0,
9136                         "Indicates if unrestricted, or restricted, set of preambles is used", HFILL }
9137                 },
9138                 { &hf_nfapi_prach_ce_level_0_enable,
9139                         { "PRACH CE level #0 Enable", "nfapi.prach.ce.level.0.enable",
9140                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9141                         "Enable \\ Disable CE level #0.", HFILL }
9142                 },
9143                 { &hf_nfapi_prach_ce_level_0_configuration_index,
9144                         { "PRACH CE level #0 Configuration Index", "nfapi.prach.ce.level.0.configuration.index",
9145                         FT_UINT16, BASE_DEC, NULL, 0x0,
9146                         "Provides information about the location and format of the PRACH", HFILL }
9147                 },
9148                 { &hf_nfapi_prach_ce_level_0_frequency_offset,
9149                         { "PRACH CE level #0 Frequency offset", "nfapi.prach.ce.level.0.frequency_offset",
9150                         FT_UINT16, BASE_DEC, NULL, 0x0,
9151                         "The first physical resource block available for PRACH for each CE", HFILL }
9152                 },
9153                 { &hf_nfapi_prach_ce_level_0_number_of_repetitions_per_attempt,
9154                         { "PRACH CE level #0 Number of repetitions per attempt", "nfapi.prach.ce.level.0.number.of.repetitions.per_attempt",
9155                         FT_UINT16, BASE_DEC, NULL, 0x0,
9156                         "Number of PRACH repetitions per attempt for each CE level", HFILL }
9157                 },
9158                 { &hf_nfapi_prach_ce_level_0_starting_subframe_periodicity,
9159                         { "CE level #0 Starting subframe periodicity", "nfapi.prach.ce.level.0.starting.subframe_periodicity",
9160                         FT_UINT16, BASE_DEC, NULL, 0x0,
9161                         "Optional. PRACH starting subframe periodicity, expressed in number of slots available for preamble transmission(PRACH opportunities)", HFILL }
9162                 },
9163                 { &hf_nfapi_prach_ce_level_0_hopping_enabled,
9164                         { "PRACH CE level #0 Hopping Enable", "nfapi.prach.ce.level.0.hopping_enable",
9165                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9166                         "Enable \\ Disable PRACH frequency hopping for each CE level", HFILL }
9167                 },
9168                 { &hf_nfapi_prach_ce_level_0_hopping_offset,
9169                         { "PRACH CE level #0 Hopping Offset", "nfapi.prach.ce.level.0.hopping.offset",
9170                         FT_UINT16, BASE_DEC, NULL, 0x0,
9171                         "Valid in case 'PRACH Hopping Enable' is enabled", HFILL }
9172                 },
9173                 { &hf_nfapi_prach_ce_level_1_enable,
9174                         { "PRACH CE level #1 Enable", "nfapi.prach.ce.level.0.enable",
9175                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9176                         "Enable \\ Disable CE level #1", HFILL }
9177                 },
9178                 { &hf_nfapi_prach_ce_level_1_configuration_index,
9179                         { "PRACH CE level #1 Configuration Index", "nfapi.prach.ce.level.1.configuration.index",
9180                         FT_UINT16, BASE_DEC, NULL, 0x0,
9181                         "Provides information about the location and format of the PRACH", HFILL }
9182                 },
9183                 { &hf_nfapi_prach_ce_level_1_frequency_offset,
9184                         { "PRACH CE level #1 Frequency offset", "nfapi.prach.ce.level.1.frequency_offset",
9185                         FT_UINT16, BASE_DEC, NULL, 0x0,
9186                         "The first physical resource block available for PRACH for each CE", HFILL }
9187                 },
9188                 { &hf_nfapi_prach_ce_level_1_number_of_repetitions_per_attempt,
9189                         { "PRACH CE level #1 Number of repetitions per attempt", "nfapi.prach.ce.level.1.number.of.repetitions.per_attempt",
9190                         FT_UINT16, BASE_DEC, NULL, 0x0,
9191                         "Number of PRACH repetitions per attempt for each CE level", HFILL }
9192                 },
9193                 { &hf_nfapi_prach_ce_level_1_starting_subframe_periodicity,
9194                         { "CE level #1 Starting subframe periodicity", "nfapi.prach.ce.level.1.starting.subframe_periodicity",
9195                         FT_UINT16, BASE_DEC, NULL, 0x0,
9196                         "Optional.PRACH starting subframe periodicity, expressed in number of slots available for preamble transmission(PRACH opportunities),", HFILL }
9197                 },
9198                 { &hf_nfapi_prach_ce_level_1_hopping_enabled,
9199                         { "PRACH CE level #1 Hopping Enable", "nfapi.prach.ce.level.1.hopping_enable",
9200                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9201                         "Enable \\ Disable PRACH frequency hopping for each CE level.", HFILL }
9202                 },
9203                 { &hf_nfapi_prach_ce_level_1_hopping_offset,
9204                         { "PRACH CE level #1 Hopping Offset", "nfapi.prach.ce.level.1.hopping.offset",
9205                         FT_UINT16, BASE_DEC, NULL, 0x0,
9206                         "Valid in case 'PRACH Hopping Enable' is enabled.", HFILL }
9207                 },
9208                 { &hf_nfapi_prach_ce_level_2_enable,
9209                         { "PRACH CE level #2 Enable", "nfapi.prach.ce.level.2.enable",
9210                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9211                         "Enable \\ Disable CE level #2", HFILL }
9212                 },
9213                 { &hf_nfapi_prach_ce_level_2_configuration_index,
9214                         { "PRACH CE level #2 Configuration Index", "nfapi.prach.ce.level.2.configuration.index",
9215                         FT_UINT16, BASE_DEC, NULL, 0x0,
9216                         "Provides information about the location and format of the PRACH", HFILL }
9217                 },
9218                 { &hf_nfapi_prach_ce_level_2_frequency_offset,
9219                         { "PRACH CE level #2 Frequency offset", "nfapi.prach.ce.level.2.frequency_offset",
9220                         FT_UINT16, BASE_DEC, NULL, 0x0,
9221                         "The first physical resource block available for PRACH for each CE", HFILL }
9222                 },
9223                 { &hf_nfapi_prach_ce_level_2_number_of_repetitions_per_attempt,
9224                         { "PRACH CE level #2 Number of repetitions per attempt", "nfapi.prach.ce.level.2.number.of.repetitions.per_attempt",
9225                         FT_UINT16, BASE_DEC, NULL, 0x0,
9226                         "Number of PRACH repetitions per attempt for each CE level", HFILL }
9227                 },
9228                 { &hf_nfapi_prach_ce_level_2_starting_subframe_periodicity,
9229                         { "CE level #2 Starting subframe periodicity", "nfapi.prach.ce.level.2.starting.subframe_periodicity",
9230                         FT_UINT16, BASE_DEC, NULL, 0x0,
9231                         "Optional. PRACH starting subframe periodicity, expressed in number of slots available for preamble transmission(PRACH opportunities)", HFILL }
9232                 },
9233                 { &hf_nfapi_prach_ce_level_2_hopping_enabled,
9234                         { "PRACH CE level #2 Hopping Enable", "nfapi.prach.ce.level.2.hopping_enable",
9235                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9236                         "Enable \\ Disable PRACH frequency hopping for each CE level", HFILL }
9237                 },
9238                 { &hf_nfapi_prach_ce_level_2_hopping_offset,
9239                         { "PRACH CE level #2 Hopping Offset", "nfapi.prach.ce.level.2.hopping.offset",
9240                         FT_UINT16, BASE_DEC, NULL, 0x0,
9241                         "Valid in case 'PRACH Hopping Enable' is enabled.", HFILL }
9242                 },
9243                 { &hf_nfapi_prach_ce_level_3_enable,
9244                         { "PRACH CE level #3 Enable", "nfapi.prach.ce.level.3.enable",
9245                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9246                         "Enable \\ Disable CE level #3.", HFILL }
9247                 },
9248                 { &hf_nfapi_prach_ce_level_3_configuration_index,
9249                         { "PRACH CE level #3 Configuration Index", "nfapi.prach.ce.level.3.configuration.index",
9250                         FT_UINT16, BASE_DEC, NULL, 0x0,
9251                         "Provides information about the location and format of the PRACH.", HFILL }
9252                 },
9253                 { &hf_nfapi_prach_ce_level_3_frequency_offset,
9254                         { "PRACH CE level #3 Frequency offset", "nfapi.prach.ce.level.3.frequency_offset",
9255                         FT_UINT16, BASE_DEC, NULL, 0x0,
9256                         "The first physical resource block available for PRACH for each CE", HFILL }
9257                 },
9258                 { &hf_nfapi_prach_ce_level_3_number_of_repetitions_per_attempt,
9259                         { "PRACH CE level #3 Number of repetitions per attempt", "nfapi.prach.ce.level.3.number.of.repetitions.per_attempt",
9260                         FT_UINT16, BASE_DEC, NULL, 0x0,
9261                         "Number of PRACH repetitions per attempt for each CE level", HFILL }
9262                 },
9263                 { &hf_nfapi_prach_ce_level_3_starting_subframe_periodicity,
9264                         { "CE level #3 Starting subframe periodicity", "nfapi.prach.ce.level.3.starting.subframe_periodicity",
9265                         FT_UINT16, BASE_DEC, NULL, 0x0,
9266                         "Optional. PRACH starting subframe periodicity, expressed in number of slots available for preamble transmission(PRACH opportunities)", HFILL }
9267                 },
9268                 { &hf_nfapi_prach_ce_level_3_hopping_enabled,
9269                         { "PRACH CE level #3 Hopping Enable", "nfapi.prach.ce.level.3.hopping_enable",
9270                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9271                         "Enable \\ Disable PRACH frequency hopping for each CE level.", HFILL }
9272                 },
9273                 { &hf_nfapi_prach_ce_level_3_hopping_offset,
9274                         { "PRACH CE level #3 Hopping Offset", "nfapi.prach.ce.level.3.hopping.offset",
9275                         FT_UINT16, BASE_DEC, NULL, 0x0,
9276                         "Valid in case 'PRACH Hopping Enable' is enabled.", HFILL }
9277                 },
9278                 { &hf_nfapi_pucch_internal_ul_hopping_config_common_mode_a,
9279                         { "PUCCH Interval-ULHoppingConfigCommonModeA", "nfapi.pucch.interval.ulhopping.config.common.mode.a",
9280                         FT_UINT16, BASE_DEC, NULL, 0x0,
9281                         "NthULNB for UEModeA", HFILL }
9282                 },
9283                 { &hf_nfapi_pucch_internal_ul_hopping_config_common_mode_b,
9284                         { "PUCCH Interval-ULHoppingConfigCommonModeB", "nfapi.pucch.interval.ulhopping.config.common.mode.b",
9285                         FT_UINT16, BASE_DEC, NULL, 0x0,
9286                         "NthULNB for UEModeB", HFILL }
9287                 },
9288                 { &hf_nfapi_data_report_mode,
9289                         { "Data Report Mode", "nfapi.data.report.mode",
9290                         FT_BOOLEAN, 8, TFS(&data_report_mode_vals), 0x0,
9291                         "The data report mode for the uplink data", HFILL }
9292                 },
9293                 { &hf_nfapi_sfnsf,
9294                         { "SFN/SF", "nfapi.sfn.sf",
9295                         FT_UINT16, BASE_CUSTOM, CF_FUNC(sfn_sf_conversion_fn), 0x0,
9296                         "The future SFN/SF subframe where the TLVs included in the message should be applied", HFILL }
9297                 },
9298                 { &hf_nfapi_max_up_pts,
9299                         { "Max UpPTS frames", "nfapi.max.uppts.frame",
9300                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9301                         "Used for TDD only and indicates how SRS operates in UpPTS subframes", HFILL }
9302                 },
9303                 { &hf_nfapi_srs_acknack_srs_simultaneous_transmission,
9304                         { "SRS AckNack Simultaneous transmission", "nfapi.srs.acknack.simult.tx",
9305                         FT_BOOLEAN, 8, TFS(&srs_simult_tx_strname), 0x0,
9306                         "Indicates if SRS and ACK/NACK can be received in the same subframe. Needed if semi-static configuration is held in PHY.", HFILL }
9307                 },
9308                 { &hf_nfapi_pnf_address_ipv4,
9309                         { "PNF IPV4", "nfapi.pnf.address.ipv4",
9310                         FT_IPv4, BASE_NONE, NULL, 0x0,
9311                         "The IPv4 address of the PNF PHY instance to be used by the VNF for this PNF PHY instance", HFILL }
9312                 },
9313                 { &hf_nfapi_pnf_address_ipv6,
9314                         { "PNF IPV6", "nfapi.pnf.address.ipv6",
9315                         FT_IPv6, BASE_NONE, NULL, 0x0,
9316                         "The IPv6 address of the PNF PHY instance to be used by the VNF for this PNF PHY instance", HFILL }
9317                 },
9318                 { &hf_nfapi_vnf_address_ipv4,
9319                         { "VNF IPV4 Address", "nfapi.vnf.address.ipv4",
9320                         FT_IPv4, BASE_NONE, NULL, 0x0,
9321                         "The IPv4 address of the VNF to be used by the PNF for this P7 PHY instance", HFILL }
9322                 },
9323                 { &hf_nfapi_vnf_address_ipv6,
9324                         { "VNF IPV6 Address", "nfapi.vnf.address.ipv6",
9325                         FT_IPv6, BASE_NONE, NULL, 0x0,
9326                         "The IPv6 address of the VNF to be used by the PNF for this P7 PHY instance", HFILL }
9327                 },
9328                 { &hf_nfapi_pnf_port,
9329                         { "PNF PORT value", "nfapi.config.pnf.port.value",
9330                         FT_UINT16, BASE_DEC, NULL, 0x0,
9331                         "The port of the PNF PHY instance to be used by the VNF for this PNF PHY instance", HFILL }
9332                 },
9333                 { &hf_nfapi_vnf_port,
9334                         { "VNF PORT value", "nfapi.config.vnf.port.value",
9335                         FT_UINT16, BASE_DEC, NULL, 0x0,
9336                         "The port of the VNF to be used by the PNF for this P7 PHY instance", HFILL } },
9337                 { &hf_nfapi_sync_mode,
9338                         { "Sync Mode", "nfapi.sync.mode",
9339                         FT_UINT8, BASE_DEC, VALS(nfapi_sync_mode_vals), 0x0,
9340                         "The method of nFAPI Synchronization supported by the PNF", HFILL }
9341                 },
9342                 { &hf_nfapi_location_mode,
9343                         { "Location Mode", "nfapi.location.mode",
9344                         FT_UINT8, BASE_DEC, VALS(location_mode_vals), 0x0,
9345                         "The method of location derivation supported by the PNF", HFILL }
9346                 },
9347                 { &hf_nfapi_location_coordinates,
9348                         { "Location Coordinates", "nfapi.location.coordinates",
9349                         FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
9350                         "The Location of the PNF. The value is formatted as the LocationCoordinates IE using BASIC-PER encoding as defined in "
9351                         "TS36.355 section 6.4.2. The first bit of the LocationCoordinates IE is in the LSB of the first byte of the array."
9352                         "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 }
9353                 },
9354                 { &hf_nfapi_pdu,
9355                         { "PDU", "nfapi.pdu",
9356                         FT_BYTES, BASE_NONE, NULL, 0x0,
9357                         NULL, HFILL }
9358                 },
9359                 { &hf_nfapi_dl_config_timing,
9360                         { "DL config Timing", "nfapi.dl.config.timing",
9361                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
9362                         "The timing offset before the air interface subframe start that the DL_Config.request must be received at the PNF.", HFILL }
9363                 },
9364                 { &hf_nfapi_tx_timing,
9365                         { "Tx Timing", "nfapi.general.tx.timing",
9366                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
9367                         "The timing offset before the air interface subframe start that the TX.request must be received at the PNF.", HFILL }
9368                 },
9369                 { &hf_nfapi_ul_config_timing,
9370                         { "UL Config Timing", "nfapi.ul.config.timing",
9371                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
9372                         "The timing offset before the air interface subframe start that the UL_CONFIG.request must be received at the PNF.", HFILL }
9373                 },
9374                 { &hf_nfapi_hi_dci0_timing,
9375                         { "HI DCi0 Timing", "nfapi.hi.dci0.timing",
9376                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
9377                         "The timing offset before the air interface subframe start that the HI_DCI0.request must be received at the PNF.", HFILL }
9378                 },
9379                 { &hf_nfapi_maximum_number_phys,
9380                         { "Maximum number of Phys", "nfapi.maximum.number.phys",
9381                         FT_UINT16, BASE_DEC, NULL, 0x0,
9382                         "The maximum number of operational PHYs supported by the PNF device.", HFILL }
9383                 },
9384                 { &hf_nfapi_maximum_total_bandwidth,
9385                         { "Maximum Total Bandwidth", "nfapi.maximum.total.bandwidth",
9386                         FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &khz_100_units_db, 0x0,
9387                         "The total maximum bandwidth (in units of 100kHz) supported by the PNF device.", HFILL }
9388                 },
9389                 { &hf_nfapi_maximum_total_number_dl_layers,
9390                         { "Maximum Total Number DL Layers", "nfapi.maximum.total.number.dl.layers",
9391                         FT_UINT16, BASE_DEC, NULL, 0x0,
9392                         "The maximum total number of downlink layers supported.", HFILL }
9393                 },
9394                 { &hf_nfapi_maximum_total_number_ul_layers,
9395                         { "Maximum Total Number UL Layers", "nfapi.maximum.total.number.ul.layers",
9396                         FT_UINT16, BASE_DEC, NULL, 0x0,
9397                         "The maximum total number of uplink layers supported across all available PHYs.", HFILL }
9398                 },
9399                 { &hf_nfapi_shared_bands,
9400                         { "Shared bands", "nfapi.shared.bands",
9401                         FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x0,
9402                         "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 }
9403                 },
9404                 { &hf_nfapi_shared_pa,
9405                         { "Shared pa", "nfapi.shared.pa",
9406                         FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x0,
9407                         "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 }
9408                 },
9409                 { &hf_nfapi_maximum_total_power,
9410                         { "Maximum total power", "nfapi.maximum.total.power",
9411                         FT_UINT16, BASE_CUSTOM, CF_FUNC(dl_rs_tx_pow_measment_conversion_fn), 0x0,
9412                         "The maximum transmit power of the PNF device summed across all PHYs.", HFILL }
9413                 },
9414                 { &hf_nfapi_oui,
9415                         { "OUI", "nfapi.oui",
9416                         FT_STRING, BASE_NONE, NULL, 0x0,
9417                         "The PNF OUI in the format as specified by IEEE", HFILL }
9418                 },
9419                 { &hf_nfapi_pnf_phy_number_phy,
9420                         { "PNF Phy Number of Phy", "nfapi.pnf.phy.number.phy",
9421                         FT_UINT16, BASE_DEC, NULL, 0x0,
9422                         "The number of PHY instances", HFILL }
9423                 },
9424                 { &hf_nfapi_pnf_phy_config_index,
9425                         { "PNF Phy Config Index", "nfapi.pnf.phy.config.index",
9426                         FT_UINT16, BASE_DEC, NULL, 0x0,
9427                         "The unique Index number of the PHY to permit the PNF to identify the PHY in the PNF_CONFIG.Request", HFILL }
9428                 },
9429                 { &hf_nfapi_number_of_rfs,
9430                         { "Number of RFs", "nfapi.pnf.rf.number.rf",
9431                         FT_UINT16, BASE_DEC, NULL, 0x0,
9432                         "The number of RF configurations", HFILL }
9433                 },
9434                 { &hf_nfapi_phy_rf_config_info_phy_id,
9435                         { "Phy ID", "nfapi.pnf.phy.rf.config.phy.id",
9436                         FT_UINT16, BASE_DEC, NULL, 0x0,
9437                         NULL, HFILL }
9438                 },
9439                 { &hf_nfapi_rf_config_index,
9440                         { "RF Config Index", "nfapi.rf_config_index",
9441                         FT_UINT16, BASE_DEC, NULL, 0x0,
9442                         "The Index number defined in the PNF RF struct that the PHY can support",
9443                         HFILL }
9444                 },
9445                 { &hf_nfapi_number_of_rf_exclusions,
9446                         { "Number of RF exclusions", "nfapi.hf_nfapi_number_of_rf_exclusions",
9447                         FT_UINT16, BASE_DEC, NULL, 0x0,
9448                         "The number of RF configurations excluded from use by this PHY", HFILL }
9449                 },
9450                 { &hf_nfapi_maximum_3gpp_release_supported,
9451                         { "Maximum 3gpp Release Supported", "nfapi.maximum_3gpp_release_supported",
9452                         FT_UINT16, BASE_HEX, NULL, 0x0,
9453                         "The major 3GPP releases supported", HFILL }
9454                 },
9455                 { &hf_nfapi_maximum_3gpp_release_supported_rel8,
9456                         { "Release 8", "nfapi.maximum_3gpp_release_supported.rel8",
9457                         FT_BOOLEAN, 16, NULL, 0x0001,
9458                         NULL, HFILL }
9459                 },
9460                 { &hf_nfapi_maximum_3gpp_release_supported_rel9,
9461                         { "Release 9", "nfapi.maximum_3gpp_release_supported.rel9",
9462                         FT_BOOLEAN, 16, NULL, 0x0002,
9463                         NULL, HFILL }
9464                 },
9465                 { &hf_nfapi_maximum_3gpp_release_supported_rel10,
9466                         { "Release 10", "nfapi.maximum_3gpp_release_supported.rel10",
9467                         FT_BOOLEAN, 16, NULL, 0x0004,
9468                         NULL, HFILL }
9469                 },
9470                 { &hf_nfapi_maximum_3gpp_release_supported_rel11,
9471                         { "Release 11", "nfapi.maximum_3gpp_release_supported.rel11",
9472                         FT_BOOLEAN, 16, NULL, 0x0008,
9473                         NULL, HFILL }
9474                 },
9475                 { &hf_nfapi_maximum_3gpp_release_supported_rel12,
9476                         { "Release 12", "nfapi.maximum_3gpp_release_supported.rel12",
9477                         FT_BOOLEAN, 16, NULL, 0x0010,
9478                         NULL, HFILL }
9479                 },
9480                 { &hf_nfapi_maximum_3gpp_release_supported_rel13,
9481                         { "Release 13", "nfapi.maximum_3gpp_release_supported.rel13",
9482                         FT_BOOLEAN, 16, NULL, 0x0020,
9483                         NULL, HFILL }
9484                 },
9485                 { &hf_nfapi_downlink_channel_bandwidth_supported,
9486                         { "Maximum Channel Downlink Bandwidth Supported", "nfapi.downlink_channel_bandwidth_supported",
9487                         FT_UINT16, BASE_DEC, NULL, 0x0,
9488                         "The downlink channel bandwidth supported in resource blocks as specified in 3GPP TS 36.104", HFILL }
9489                 },
9490                 { &hf_nfapi_uplink_channel_bandwidth_supported,
9491                         { "Maximum Channel Uplink Bandwidth Supported", "nfapi.uplink_channel_bandwidth_supported",
9492                         FT_UINT16, BASE_DEC, NULL, 0x0,
9493                         "The uplink channel bandwidth supported in resource blocks as specified in 3GPP TS 36.104.", HFILL }
9494                 },
9495                 { &hf_nfapi_number_of_dl_layers_supported,
9496                         { "Number of DL Layers Supported", "nfapi.number_of_dl_layer_supported",
9497                         FT_UINT16, BASE_DEC, NULL, 0x0,
9498                         "The maximum number of downlink layers supported", HFILL }
9499                 },
9500                 { &hf_nfapi_number_of_ul_layers_supported,
9501                         { "Number of UL Layers Supported", "nfapi.number_of_ul_layer_supported",
9502                         FT_UINT16, BASE_DEC, NULL, 0x0,
9503                         "The maximum number of uplink layers supported", HFILL }
9504                 },
9505                 { &hf_nfapi_nmm_modes_supported,
9506                         { "NMM modes supported", "nfapi.nmm_modes_supported",
9507                         FT_UINT8, BASE_DEC, VALS(nmm_modes_supported_vals), 0x0,
9508                         "Network Monitor Modes Supported.", HFILL }
9509                 },
9510                 { &hf_nfapi_band,
9511                         { "Band", "nfapi.band",
9512                         FT_UINT16, BASE_DEC, NULL, 0x0,
9513                         "Band number as specified in 3GPP TS36.101", HFILL }
9514                 },
9515                 { &hf_nfapi_maximum_transmit_power_2,
9516                         { "Maximum transmit power", "nfapi.maximum_transmit_power",
9517                         FT_UINT16, BASE_CUSTOM, CF_FUNC(max_transmit_power_2_conversion_fn), 0x0,
9518                         "The maximum transmit power for the PHY and RF operating at the configured bandwidth as defined in 3GPP TS 36.104.", HFILL }
9519                 },
9520                 { &hf_nfapi_maximum_transmit_power,
9521                         { "Maximum transmit power", "nfapi.maximum_transmit_power",
9522                         FT_UINT16, BASE_CUSTOM, CF_FUNC(max_transmit_power_conversion_fn), 0x0,
9523                         "The maximum transmit power for the RF chain operating at the maximum supported bandwidth as defined in 3GPP TS 36.104.", HFILL }
9524                 },
9525                 { &hf_nfapi_earfcn,
9526                         { "EARFCN", "nfapi.earfcn",
9527                         FT_UINT16, BASE_DEC, NULL, 0x0,
9528                         "The EARFCN to be measured.", HFILL }
9529                 },
9530                 { &hf_nfapi_number_of_rf_bands,
9531                         { "Number of RF Bands", "nfapi.num.rf_bands",
9532                         FT_UINT16, BASE_DEC, NULL, 0x0,
9533                         "The number of RF Band instances", HFILL }
9534                 },
9535                 { &hf_nfapi_nmm_uplink_rssi_supported,
9536                         { "NMM Uplink RSSI supported", "nfapi.nmm.uplink.rssi.supported",
9537                         FT_UINT8, BASE_DEC, VALS(ul_rssi_supported_vals), 0x0,
9538                         "Indicates if the uplink RSSI meausremnts are supported by NMM.", HFILL }
9539                 },
9540                 { &hf_nfapi_minimum_transmit_power,
9541                         { "Minimum transmit power", "nfapi.minimum_transmit_power",
9542                         FT_UINT16, BASE_CUSTOM, CF_FUNC(max_transmit_power_conversion_fn), 0x0,
9543                         "The minimum transmit power for the RF chain operating at the maximum supported bandwidth as defined in 3GPP TS 36.104.", HFILL }
9544                 },
9545                 { &hf_nfapi_number_of_antennas_suppported,
9546                         { "Number of Supported Antennas", "nfapi.number_of_antennas_suppported",
9547                         FT_UINT8, BASE_DEC, NULL, 0x0,
9548                         "The maximum number of antennas supported.", HFILL }
9549                 },
9550                 { &hf_nfapi_minimum_downlink_frequency,
9551                         { "Minimum downlink frequency", "nfapi.minimum_downlink_frequency",
9552                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &khz_100_units_db, 0x0,
9553                         "The minimum supported downlink frequency in 100kHz units", HFILL }
9554                 },
9555                 { &hf_nfapi_maximum_downlink_frequency,
9556                         { "Maximum downlink frequency", "nfapi.maximum_downlink_frequency",
9557                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &khz_100_units_db, 0x0,
9558                         "The maximum supported downlink frequency in 100kHz units", HFILL }
9559                 },
9560                 { &hf_nfapi_minimum_uplink_frequency,
9561                         { "Minimum uplink frequency", "nfapi.minimum_downlink_frequency",
9562                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &khz_100_units_db, 0x0,
9563                         "The minimum supported uplink frequency in 100kHz units", HFILL }
9564                 },
9565                 { &hf_nfapi_maximum_uplink_frequency,
9566                         { "Maximum uplink frequency", "nfapi.maximum_downlink_frequency",
9567                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &khz_100_units_db, 0x0,
9568                         "The maximum supported uplink frequency in 100kHz units", HFILL }
9569                 },
9570                 { &hf_nfapi_transmission_mode7_supported,
9571                         { "Transmission Mode 7 Supported", "nfapi.pnf.phy_rel10.tx_mode7_supported",
9572                         FT_UINT16, BASE_DEC, NULL, 0x0,
9573                         "Indicates if PHY supports TM7 for PDSCH", HFILL }
9574                 },
9575                 { &hi_nfapi_transmission_mode8_supported,
9576                         { "Transmission Mode 8 Supported", "nfapi.pnf.phy_rel10.tx_mode8_supported",
9577                         FT_UINT16, BASE_DEC, NULL, 0x0,
9578                         "Indicates if PHY supports TM8 for PDSCH", HFILL }
9579                 },
9580                 { &hi_nfapi_two_antennas_ports_for_pucch,
9581                         { "Two antennas ports for PUCCH", "nfapi.pnf.phy_rel10.two_antennas_ports_for_pucch",
9582                         FT_UINT16, BASE_DEC, NULL, 0x0,
9583                         "Indicates if PHY supports PUCCH transmit diversity introduced in Release 10. Equivalent to two-AntennaPortsForPUCCH-r10 in TS36.306", HFILL }
9584                 },
9585                 { &hi_nfapi_transmission_mode_9_supported,
9586                         { "Transmission Mode 9 Supported", "nfapi.pnf.phy_rel10.tx_mode9_supported",
9587                         FT_UINT16, BASE_DEC, NULL, 0x0,
9588                         "Indicates if PHY supports TM9 for PDSCH with 8 antennas and 8 CSI. Equivalent to tm9-With-8Tx-FDD-r10 in TS36.306", HFILL }
9589                 },
9590                 { &hi_nfapi_simultaneous_pucch_pusch,
9591                         { "Simultaneous PUCCH PUSCH", "nfapi.pnf.simultaneous_pucch_pusch",
9592                         FT_UINT16, BASE_DEC, NULL, 0x0,
9593                         "Indicates if PHY supports UE sending simultaneous PUCCH and PUSCH introduced in Release 10. Equivalent to simultaneousPUCCH-PUSCH-r10 in TS36.306", HFILL }
9594                 },
9595                 { &hi_nfapi_four_layer_tx_with_tm3_and_tm4,
9596                         { "Four layer Tx with TM3 and TM4", "nfapi.pnf.phy_rel10.layer_tx_with_tm3_and_tm4",
9597                         FT_UINT16, BASE_DEC, NULL, 0x0,
9598                         "Indicates if PHY supports four layer transmission for TM3 and TM4. Equivalent to fourLayerTM3-TM4-r10 in TS36.306", HFILL }
9599                 },
9600                 { &hf_nfapi_epdcch_supported,
9601                         { "ePDCCH supported", "nfapi.pnf.phy_rel11.epdcch_supported",
9602                         FT_UINT16, BASE_DEC, NULL, 0x0,
9603                         "Indicates if PHY supports Enhanced PDCCH", HFILL }
9604                 },
9605                 { &hi_nfapi_multi_ack_csi_reporting,
9606                         { "Multi ACK CSI reporting", "nfapi.pnf.phy_rel11.mutli_ack_csi_reporting",
9607                         FT_UINT16, BASE_DEC, NULL, 0x0,
9608                         "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 }
9609                 },
9610                 { &hi_nfapi_pucch_tx_diversity_with_channel_selection,
9611                         { "PUCCH Tx diversity with channel selection", "nfapi.pnf.phy_rel11.tx_div_with_channel_selection",
9612                         FT_UINT16, BASE_DEC, NULL, 0x0,
9613                         "Indicates if PHY supports transmit diversity for PUCCH format 1b with channel selection. Equivalent to txDiv-PUCCH1b-ChSelect in TS36.306", HFILL }
9614                 },
9615                 { &hi_nfapi_ul_comp_supported,
9616                         { "UL CoMP supported", "nfapi.pnf.phy_rel11.ul_comp_supported",
9617                         FT_UINT16, BASE_DEC, NULL, 0x0,
9618                         "Indicates if PHY supports UL CoMP", HFILL }
9619                 },
9620                 { &hi_nfapi_transmission_mode_5_supported,
9621                         { "Transmission mode 5 supported", "nfapi.pnf.phy_rel11.tx_mode5_supported",
9622                         FT_UINT16, BASE_DEC, NULL, 0x0,
9623                         "Indicates if PHY supports TM5 for PDSCH", HFILL }
9624                 },
9625                 { &hf_nfapi_csi_subframe_set,
9626                         { "CSI subframe set", "nfapi.pnf.phy_rel12.csi_subframe_set",
9627                         FT_UINT16, BASE_DEC, NULL, 0x0,
9628                         "Equivalent to csi-SubframeSet-r12 in TS36.306", HFILL }
9629                 },
9630                 { &hi_nfapi_enhanced_4tx_codebook,
9631                         { "Enhanced 4TX codebook", "nfapi.pnf.phy_rel12.exhanced_t4x_codebook",
9632                         FT_UINT16, BASE_DEC, NULL, 0x0,
9633                         "Indicates if PHY supports the enhanced 4TX codebook. Equivalent to enhanced-4TxCodebook-r12 in TS36.306", HFILL }
9634                 },
9635                 { &hi_nfapi_drs_supported,
9636                         { "DRS supported", "nfapi.pnf.phy_rel12.drs_supported",
9637                         FT_UINT16, BASE_DEC, NULL, 0x0,
9638                         "Indicates if PHY supports the Discovery Reference Signal", HFILL }
9639                 },
9640                 { &hi_nfapi_ul_64qam_supported,
9641                         { "UL 64QAM supported", "nfapi.pnf.phy_rel12.ul_64qam_supported",
9642                         FT_UINT16, BASE_DEC, NULL, 0x0,
9643                         "Indicates if PHY support 64 QAM in the uplink", HFILL }
9644                 },
9645                 { &hi_nfapi_transmission_mode_10_supported,
9646                         { "Transmission mode 10 supported", "nfapi.pnf.phy_rel12.tx_mode10_supported",
9647                         FT_UINT16, BASE_DEC, NULL, 0x0,
9648                         "Indicates if PHY supports TM10 for PDSCH (DL CoMP)", HFILL }
9649                 },
9650                 { &hi_nfapi_alternative_tbs_indices,
9651                         { "Alternative TBS indices", "nfapi.pnf.phy_rel12.alternative_tbs_indices",
9652                         FT_UINT16, BASE_DEC, NULL, 0x0,
9653                         "Indicates if PHY supports the alternate TBS indices (256 QAM).  Equivalent to alternativeTBS-Indices-r12 in TS36.306", HFILL }
9654                 },
9655                 { &hf_nfapi_pucch_format_4_supported,
9656                         { "PUCCH format 4 supported", "nfapi.pnf.phy_rel13.pucch_format4_supported",
9657                         FT_UINT16, BASE_DEC, NULL, 0x0,
9658                         "Indicates if PHY supports PUCCH format 4", HFILL }
9659                 },
9660                 { &hf_nfapi_pucch_format_5_supported,
9661                         { "PUCCH format 5 supported", "nfapi.pnf.phy_rel13.pucch_format5_supported",
9662                         FT_UINT16, BASE_DEC, NULL, 0x0,
9663                         "Indicates if PHY supports PUCCH format 5", HFILL }
9664                 },
9665                 { &hf_nfapi_more_than_5_ca_supported,
9666                         { "More than 5 CA support", "nfapi.pnf.phy_rel13.mode_than_5_ca_supported",
9667                         FT_UINT16, BASE_DEC, NULL, 0x0,
9668                         "Indicates if PHY supports features required for more than 5 CA support on PUSCH. Equivalent to uci-PUSCH-Ext-r13 in TS36.306", HFILL }
9669                 },
9670                 { &hf_nfapi_laa_supported,
9671                         { "LAA supported", "nfapi.pnf.phy_rel13.laa_supported",
9672                         FT_UINT16, BASE_DEC, NULL, 0x0,
9673                         "Indicates if PHY supports DL LAA (subframe format 3)", HFILL }
9674                 },
9675                 { &hf_nfapi_laa_ending_in_dwpts_supported,
9676                         { "LAA ending in DwPTS supported", "nfapi.pnf.phy_rel13.laa_ending_in_dwpts_supported",
9677                         FT_UINT16, BASE_DEC, NULL, 0x0,
9678                         "Indicates if PHY supports DL LAA ending in a DwPTS subframe. Equivalent to endingDwPTS-r13i n TS36.306", HFILL }
9679                 },
9680                 { &hf_nfapi_laa_starting_in_second_slot_supported,
9681                         { "LAA starting in second slot Supported", "nfapi.pnf.phy_rel13.laa_starting_in_second_slot_supported",
9682                         FT_UINT16, BASE_DEC, NULL, 0x0,
9683                         "Indicates if PHY supports DL LAA starting in the second slot in a subframe. Equivalent to secondSlotStartingPosition-r13 in TS36.306", HFILL }
9684                 },
9685                 { &hf_nfapi_beamforming_supported,
9686                         { "Beamforming Supported", "nfapi.pnf.phy_rel13.beamingforming_supported",
9687                         FT_UINT16, BASE_DEC, NULL, 0x0,
9688                         "Indicates if PHY supports beamforming (FD-MIMO Class B). Equivalent to beamformed-r13 in TS36.306", HFILL }
9689                 },
9690                 { &hf_nfapi_csi_rs_enhancements_supported,
9691                         { "CSI-RS enhancements supported", "nfapi.pnf.phy_rel13.csi_rs_enchancements_supported",
9692                         FT_UINT16, BASE_DEC, NULL, 0x0,
9693                         "Indicates if PHY supports CSI-RS enhancements (FD-MIMO Class A). Equivalent to csi-RS-EnhancementsTDD-r13 in TS36.306", HFILL }
9694                 },
9695                 { &hf_nfapi_drms_enhancements_supported,
9696                         { "DMRS enhancements supported", "nfapi.pnf.phy_rel13.drms_enhancements_supported",
9697                         FT_UINT16, BASE_DEC, NULL, 0x0,
9698                         "Indicates if PHY supports DMRS enhancements added in Release 13. Equivalent to dmrs-Enhancements-r13 in TS36.306", HFILL }
9699                 },
9700                 { &hf_nfapi_srs_enhancements_supported,
9701                         { "SRS enhancements supported", "nfapi.pnf.phy_rel13.srs_enhancements_supported",
9702                         FT_UINT16, BASE_DEC, NULL, 0x0,
9703                         "Indicates if PHY supports SRS enhancements added in Release 13. Equivalent to srs-Enhancements-r13in TS36.306", HFILL }
9704                 },
9705                 { &hf_nfapi_sfn_sf,
9706                         { "SFN_SF", "nfapi.sfn_sf",
9707                         FT_UINT16, BASE_CUSTOM, CF_FUNC(sfn_sf_conversion_fn), 0x0,
9708                         NULL, HFILL }
9709                 },
9710                 { &hf_nfapi_number_pdcch_ofdm_symbols,
9711                         { "Number of PDCCH OFDM Symbols", "nfapi.number_pdcch_ofdm_symbols",
9712                         FT_UINT8, BASE_DEC, NULL, 0x0,
9713                         "The number of OFDM symbols for the PDCCH", HFILL }
9714                 },
9715                 { &hf_nfapi_number_dci,
9716                         { "Number of DCI", "nfapi.number_dci",
9717                         FT_UINT8, BASE_DEC, NULL, 0x0,
9718                         "The number of DCI PDUs included in this message", HFILL }
9719                 },
9720                 { &hf_nfapi_number_pdus,
9721                         { "Number of PDUs", "nfapi.number_pdu",
9722                         FT_UINT16, BASE_DEC, NULL, 0x0,
9723                         "Number of PDUs that are included in this message", HFILL }
9724                 },
9725                 { &hf_nfapi_number_of_harqs,
9726                         { "Number of HARQs", "nfapi.number_harqs",
9727                         FT_UINT16, BASE_DEC, NULL, 0x0,
9728                         "Number of HARQs included in this message", HFILL }
9729                 },
9730                 { &hf_nfapi_number_of_crcs,
9731                         { "Number of CRCs", "nfapi.number_crcs",
9732                         FT_UINT16, BASE_DEC, NULL, 0x0,
9733                         "Number of CRCs included in this message", HFILL }
9734                 },
9735                 { &hf_nfapi_number_of_srs,
9736                         { "Number of SRs", "nfapi.number_srs",
9737                         FT_UINT16, BASE_DEC, NULL, 0x0,
9738                         "Number of SRs included in this message", HFILL }
9739                 },
9740                 { &hf_nfapi_number_of_cqi,
9741                         { "Number of CQIs", "nfapi.number_cqi",
9742                         FT_UINT16, BASE_DEC, NULL, 0x0,
9743                         "Number of CQIs included in this message", HFILL }
9744                 },
9745                 { &hf_nfapi_number_of_preambles,
9746                         { "Number of Preambles", "nfapi.number_preambles",
9747                         FT_UINT16, BASE_DEC, NULL, 0x0,
9748                         "Number of RACH preambles", HFILL }
9749                 },
9750                 { &hf_nfapi_number_of_srss,
9751                         { "Number of SRSs", "nfapi.number_srss",
9752                         FT_UINT16, BASE_DEC, NULL, 0x0,
9753                         "Number of UEs contributing to the uplink SRS", HFILL }
9754                 },
9755                 { &hf_nfapi_lbt_dl_req_pdu_type,
9756                         { "LBT DL Request PDU Type", "nfapi.number_srss",
9757                         FT_UINT16, BASE_DEC, VALS(nfapi_lbt_dl_req_pdu_type), 0x0,
9758                         NULL, HFILL }
9759                 },
9760                 { &hf_nfapi_lbt_dl_ind_pdu_type,
9761                         { "LBT DL Indication PDU Type", "nfapi.number_srss",
9762                         FT_UINT16, BASE_DEC, VALS(nfapi_lbt_dl_ind_pdu_type), 0x0,
9763                         NULL, HFILL }
9764                 },
9765                 { &hf_nfapi_number_pdsch_rnti,
9766                         { "Number of PDSCH RNTI", "nfapi.number_pdsch_rnti",
9767                         FT_UINT8, BASE_DEC, NULL, 0x0,
9768                         "Number of unique RNTIs sent on the PDSCH", HFILL }
9769                 },
9770                 { &hf_nfapi_transmission_power_pcfich,
9771                         { "Transmission Power PCFICH", "nfapi.transmission_power_pcfich",
9772                         FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
9773                         "Offset to the reference signal power.", HFILL }
9774                 },
9775                 { &hf_nfapi_dl_config_pdu_type,
9776                         { "PDU Type", "nfapi.pdu.type",
9777                         FT_UINT8, BASE_DEC, VALS(nfapi_dl_config_pdu_type_vals), 0x0,
9778                         "DL_CONFIG.request PDU Type", HFILL }
9779                 },
9780                 { &hf_nfapi_pdu_size,
9781                         { "PDU size", "nfapi.pdu.size",
9782                         FT_UINT8, BASE_DEC, NULL, 0x0,
9783                         "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 }
9784                 },
9785                 { &hf_nfapi_instance_length,
9786                         { "Instance length", "nfapi.instance.length",
9787                         FT_UINT16, BASE_DEC, NULL, 0x0,
9788                         "The Length in bytes of all TLVs within this instance", HFILL }
9789                 },
9790                 { &hf_nfapi_length,
9791                         { "PDU length", "nfapi.pdu.length",
9792                         FT_UINT16, BASE_DEC, NULL, 0x0,
9793                         "Length of PDU in bytes.", HFILL }
9794                 },
9795                 { &hf_nfapi_pdu_index,
9796                         { "PDU Index", "nfapi.pdu.index",
9797                         FT_UINT16, BASE_DEC, NULL, 0x0,
9798                         "The PDU Index parameter specified for each PDU", HFILL }
9799                 },
9800                 { &hf_nfapi_rnti,
9801                         { "RNTI", "nfapi.rnti",
9802                         FT_UINT16, BASE_DEC, NULL, 0x0,
9803                         "The RNTI used for identifying the UE when receiving the PDU", HFILL }
9804                 },
9805                 { &hf_nfapi_resource_allocation_type,
9806                         { "Resource Allocation Type", "nfapi.resource.allocation.type",
9807                         FT_UINT8, BASE_DEC, VALS(resource_allocation_type_vals), 0x0,
9808                         "Resource allocation type/header Valid for DCI formats : 1, 2, 2A, 2B, 2C, 2D", HFILL }
9809                 },
9810                 { &hf_nfapi_virtual_resource_block_assignment_flag,
9811                         { "Virtual resource block assignment flag", "nfapi.resource.block.assignment.flag",
9812                         FT_UINT8, BASE_DEC, VALS(local_distributed_vals), 0x0,
9813                         "Type of virtual resource block used Valid for DCI formats : 1A, 1B, 1D", HFILL }
9814                 },
9815                 { &hf_nfapi_resource_block_coding,
9816                         { "Resource block coding", "nfapi.resource.block.coding",
9817                         FT_UINT32, BASE_DEC, NULL, 0x0,
9818                         "The encoding for the resource blocks. The coding is dependent on whether resource allocation type 0, 1, 2 is in use", HFILL }
9819                 },
9820                 { &hf_nfapi_modulation,
9821                         { "Modulation", "nfapi.modulation",
9822                         FT_UINT8, BASE_DEC, VALS(modulation_vals), 0x0,
9823                         NULL, HFILL }
9824                 },
9825                 { &hf_nfapi_redundancy_version,
9826                         { "Redundancy version", "nfapi.redundancy.version",
9827                         FT_UINT8, BASE_DEC, NULL, 0x0,
9828                         "HARQ redundancy version", HFILL }
9829                 },
9830                 { &hf_nfapi_transport_blocks,
9831                         { "Transport blocks", "nfapi.transport.blocks",
9832                         FT_UINT8, BASE_DEC, NULL, 0x0,
9833                         "The transport block transmitted to this RNTI", HFILL }
9834                 },
9835                 { &hf_nfapi_transport_block_to_codeword_swap_flag,
9836                         { "Transport block to codeword swap flag", "nfapi.transport.block.to.codeword.swap.flag",
9837                         FT_UINT8, BASE_DEC, VALS(transport_block_to_codeword_swap_flag_vals), 0x0,
9838                         "Indicates the mapping of transport block to codewords.", HFILL }
9839                 },
9840                 { &hf_nfapi_transmission_scheme,
9841                         { "Transmission scheme", "nfapi.transmission.scheme",
9842                         FT_UINT8, BASE_DEC, VALS(transmission_scheme_vals), 0x0,
9843                         "The MIMO mode used in the PDU", HFILL }
9844                 },
9845                 { &hf_nfapi_ul_transmission_scheme,
9846                         { "Transmission scheme", "nfapi.transmission.scheme",
9847                         FT_UINT8, BASE_DEC, VALS(ul_transmission_scheme_vals), 0x0,
9848                         "The MIMO mode used in the PDU", HFILL }
9849                 },
9850                 { &hf_nfapi_number_of_layers,
9851                         { "Number of layers", "nfapi.number.of.layers",
9852                         FT_UINT8, BASE_DEC, NULL, 0x0,
9853                         "The number of layers used in transmission", HFILL }
9854                 },
9855                 { &hf_nfapi_number_of_subbands,
9856                         { "Number of subbands", "nfapi.number.of.subbands",
9857                         FT_UINT8, BASE_DEC, NULL, 0x0,
9858                         "Only valid when transmission scheme = 3, 4, 5. Defines the number of subbands and "
9859                         "codebooks used for PMI.If value = 1 then a single PMI value is supplied which should be used over all RB", HFILL }
9860                 },
9861                 { &hf_nfapi_codebook_index,
9862                         { "Codebook Index", "nfapi.number.of.codebook.index",
9863                         FT_UINT8, BASE_DEC, NULL, 0x0,
9864                         "Only valid when transmission scheme = 3, 4, 5. Defines the codebook used.", HFILL }
9865                 },
9866                 { &hf_nfapi_ue_category_capacity,
9867                         { "UE category capacity", "nfapi.ue.category.capacity",
9868                         FT_UINT8, BASE_DEC, NULL, 0x0,
9869                         "The UE capabilities category", HFILL }
9870                 },
9871                 { &hf_nfapi_pa,
9872                         { "P-A", "nfapi.pa",
9873                         FT_UINT8, BASE_DEC, VALS(pa_vals), 0x0,
9874                         "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 }
9875                 },
9876                 { &hf_nfapi_delta_power_offset_index,
9877                         { "Delta Power offset Index", "nfapi.delta.power.offset.index",
9878                         FT_UINT8, BASE_DEC, NULL, 0x0,
9879                         "Delta power offset, value: 0..1", HFILL }
9880                 },
9881                 { &hf_nfapi_nprb,
9882                         { "Nprb", "nfapi.nprb",
9883                         FT_UINT8, BASE_DEC, VALS(nprb_vals), 0x0,
9884                         "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 }
9885                 },
9886                 { &hf_nfapi_transmission_mode,
9887                         { "Transmission Mode", "nfapi.transmission_nprb",
9888                         FT_UINT8, BASE_DEC, VALS(transmission_mode_vals), 0x0,
9889                         "Transmission mode associated with the UE", HFILL }
9890                 },
9891                 { &hf_nfapi_prnti,
9892                         { "P-RNTI", "nfapi.prnti",
9893                         FT_UINT16, BASE_DEC, NULL, 0x0,
9894                         "The P-RNTI associated with the paging", HFILL }
9895                 },
9896                 { &hf_nfapi_mcs,
9897                         { "MCS", "nfapi.mcs",
9898                         FT_UINT8, BASE_DEC, VALS(pch_modulation_vals), 0x0,
9899                         "The modulation and coding scheme for the transport block", HFILL }
9900                 },
9901                 { &hf_nfapi_number_of_transport_blocks,
9902                         { "Number of transport blocks", "nfapi.number_of_transport_blocks",
9903                         FT_UINT8, BASE_DEC, NULL, 0x0,
9904                         "The number of transport blocks transmitted to this RNTI", HFILL }
9905                 },
9906                 { &hf_nfapi_ue_mode,
9907                         { "UE Mode", "nfapi.ue.mode",
9908                         FT_UINT8, BASE_DEC, VALS(ue_mode_vals), 0x0,
9909                         NULL, HFILL }
9910                 },
9911                 { &hf_prs_bandwidth,
9912                         { "PRS bandwidth", "nfapi.prs.bandwidth",
9913                         FT_UINT8, BASE_DEC, NULL, 0x0,
9914                         "PRS bandwidth in resource blocks.", HFILL }
9915                 },
9916                 { &hf_prs_cyclic_prefix_type,
9917                         { "PRS cyclic prefix type", "nfapi.prs.cyclic.prefix.type",
9918                         FT_BOOLEAN, 8, TFS(&prs_cyclic_prefix_type_strname), 0x0,
9919                         "The cyclic prefix used for PRS transmission", HFILL }
9920                 },
9921                 { &hf_prs_muting,
9922                         { "PRS muting", "nfapi.prs.muting",
9923                         FT_BOOLEAN, 8, TFS(&prs_muting_strname), 0x0,
9924                         "PRS muting dictates if PRS REs are vacant (prsMutingInfo-r9 indicates the SF occasions)", HFILL }
9925                 },
9926                 { &hf_nfapi_num_bf_prb_per_subband,
9927                         { "Num of BF PRB per Subband", "nfapi.num.bf.prb.per.subband",
9928                         FT_UINT8, BASE_DEC, NULL, 0x0,
9929                         "Number of PRBs that are treated as one subband", HFILL }
9930                 },
9931                 { &hf_nfapi_num_bf_vector,
9932                         { "Num of BF Vector", "nfapi.num.bf.vector",
9933                         FT_UINT8, BASE_DEC, NULL, 0x0,
9934                         "Number of beam forming vectors. One beam forming vector is specified for each subband", HFILL }
9935                 },
9936                 { &hf_nfapi_csi_rs_resource_config,
9937                         { "CSI-RS resource config", "nfapi.csi.rs.resource.config",
9938                         FT_UINT8, BASE_DEC, NULL, 0x0,
9939                         "Indicates reference signal configuration for CSI-RS", HFILL }
9940                 },
9941                 { &hf_nfapi_bf_vector_subband_index,
9942                         { "BF Subband Index", "nfapi.num.bf.vector.subband.index",
9943                         FT_UINT8, BASE_DEC, NULL, 0x0,
9944                         "Index of subband for which the following beam forming vector is applied", HFILL }
9945                 },
9946                 { &hf_nfapi_bf_vector_num_antennas,
9947                         { "BF Num of Antennas", "nfapi.num.bf.vector.bf.value",
9948                         FT_UINT8, BASE_DEC, NULL, 0x0,
9949                         "Number of physical antennas", HFILL }
9950                 },
9951                 { &hf_nfapi_bf_vector_bf_value,
9952                         { "BF Value per Antenna", "nfapi.num.bf.vector.bf.value",
9953                         FT_UINT16, BASE_DEC, NULL, 0x0,
9954                         "Beam forming vector element for physical antenna #i real 8 bits followed by imaginary 8 bits", HFILL }
9955                 },
9956                 { &hf_nfapi_nscid,
9957                         { "NSC id", "nfapi.nscid",
9958                         FT_UINT8, BASE_DEC, NULL, 0x0,
9959                         "Used with DCI format 2B and 2C.", HFILL }
9960                 },
9961                 { &hf_nfapi_csi_rs_flag,
9962                         { "CSI RS Flag", "nfapi.csi.rs.flag",
9963                         FT_BOOLEAN, 8, TFS(&csi_rs_flags_strname), 0x0,
9964                         "Indicates if parameters related to CSI-RS are valid or not.", HFILL }
9965                 },
9966                 { &hf_nfapi_csi_rs_resource_config_r10,
9967                         { "CSI RS resource config R10", "nfapi.csi.rs.resource_config_r10",
9968                         FT_UINT8, BASE_DEC, NULL, 0x0,
9969                         "This value is deprecated", HFILL }
9970                 },
9971                 { &hf_nfapi_csi_rs_zero_tx_power_resource_config_bitmap_r10,
9972                         { "CSI-RS Number of NZP configuration", "nfapi.csi.rs.num.of.nzp.configurations",
9973                         FT_UINT8, BASE_DEC, NULL, 0x0,
9974                         "Bitmap of 16 bits. Encoding format of bitmap follows section 6.10.5.2 of 36.211", HFILL }
9975                 },
9976                 { &hf_nfapi_csi_rs_number_of_nzp_configurations,
9977                         { "CSI RS zero Tx Power Resource config bitmap R10", "nfapi.csi.rs.zero.tx.power.resource.config.bitmap.r10",
9978                         FT_UINT16, BASE_DEC, NULL, 0x0,
9979                         "Indicates the number of Non-Zero power CSI-RS configurations.", HFILL }
9980                 },
9981                 { &hf_nfapi_pdsch_start,
9982                         { "PDSCH_start", "nfapi.pdsch.start",
9983                         FT_UINT8, BASE_DEC, NULL, 0x0,
9984                         "Per UE starting OFDM symbol for the PDSCH, impacts the mapping of PDSCH to REs", HFILL }
9985                 },
9986                 { &hf_nfapi_drms_config_flag,
9987                         { "DMRS Config flag", "nfapi.drms.config.flag",
9988                         FT_UINT8, BASE_DEC, VALS(not_used_enabled_vals), 0x0,
9989                         "Indicates if the DMRS Config parameter is valid", HFILL }
9990                 },
9991                 { &hf_nfapi_drms_scrambling,
9992                         { "DMRS Scrambling", "nfapi.drms.scrambling",
9993                         FT_UINT16, BASE_DEC, NULL, 0x0,
9994                         "The scrambling identity for UE specific reference signals.", HFILL }
9995                 },
9996                 { &hf_nfapi_csi_config_flag,
9997                         { "CSI Config flag", "nfapi.csi.config.flag",
9998                         FT_UINT8, BASE_DEC, VALS(not_used_enabled_vals), 0x0,
9999                         "Indicates if the CSI Config parameter is valid", HFILL }
10000                 },
10001                 { &hf_nfapi_csi_scrambling,
10002                         { "CSI Scrambling", "nfapi.csi.scrambling",
10003                         FT_UINT16, BASE_DEC, NULL, 0x0,
10004                         "The scrambling identity for CSI.", HFILL }
10005                 },
10006                 { &hf_nfapi_pdsch_re_mapping_flag,
10007                         { "PDSCH RE mapping flag", "nfapi.pdsch.remapping.flag",
10008                         FT_UINT8, BASE_DEC, VALS(not_used_enabled_vals), 0x0,
10009                         "Indicates if the PDSCH RE parameters are valid.", HFILL }
10010                 },
10011                 { &hf_nfapi_pdsch_re_mapping_antenna_ports,
10012                         { "PDSCH RE mapping antenna ports", "nfapi.pdsch.remapping.antenna.ports",
10013                         FT_UINT8, BASE_DEC, NULL, 0x0,
10014                         "Indicates number of antennas used for PDSCH RE mapping", HFILL }
10015                 },
10016                 { &hf_nfapi_pdsch_re_mapping_freq_shift,
10017                         { "PDSCH RE mapping freq shift", "nfapi.pdsch.remapping.freq.shift",
10018                         FT_UINT8, BASE_DEC, NULL, 0x0,
10019                         "Indicates the frequency shift used for PDSCH RE mapping.", HFILL }
10020                 },
10021                 { &hf_nfapi_alt_cqi_table_r12,
10022                         { "altCQI-Table-r12", "nfapi.alt.cqi.table.r12",
10023                         FT_UINT8, BASE_DEC, NULL, 0x0,
10024                         "altCQI-Table-r12 is indicative of using an alternative MCS table for UEs supporting 256QAM."
10025                         "This is taken into account for calculation of soft buffer size for the transport block", HFILL }
10026                 },
10027                 { &hf_nfapi_max_layers,
10028                         { "MaxLayers", "nfapi.max.layers",
10029                         FT_UINT16, BASE_DEC, NULL, 0x0,
10030                         "Maximal number of negotiated / configured layers for a UE, used for the calculation of soft buffer size for the transport block", HFILL }
10031                 },
10032                 { &hf_nfapi_n_dl_harq,
10033                         { "N_DL_HARQ", "nfapi.n.dl.harq",
10034                         FT_UINT8, BASE_DEC, NULL, 0x0,
10035                         NULL, HFILL }
10036                 },
10037                 { &hf_nfapi_dwpts_symbols,
10038                         { "DwPTS Symbols", "nfapi.dwpts.symbols",
10039                         FT_UINT8, BASE_DEC, NULL, 0x0,
10040                         "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 }
10041                 },
10042                 { &hf_nfapi_initial_lbt_sf,
10043                         { "Initial LBT SF", "nfapi.initial.lbt.sf",
10044                         FT_UINT8, BASE_DEC, NULL, 0x0,
10045                         "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 }
10046                 },
10047                 { &hf_nfapi_ue_type,
10048                         { "UE Type", "nfapi.ue.type",
10049                         FT_UINT8, BASE_DEC, VALS(dlsch_re13_ue_type_vals), 0x0,
10050                         NULL, HFILL }
10051                 },
10052                 { &hf_nfapi_pdsch_payload_type,
10053                         { "PDSCH Payload Type", "nfapi.pdsch.payload.type",
10054                         FT_UINT8, BASE_DEC, VALS(dlsch_re13_pdsch_payload_type_vals), 0x0,
10055                         NULL, HFILL }
10056                 },
10057                 { &hf_nfapi_initial_transmission_sf,
10058                         { "Initial transmission SF (io)", "nfapi.init.tx.sf.io",
10059                         FT_UINT16, BASE_DEC, NULL, 0x0,
10060                         "Absolute Sub-Frame of the initial transmission", HFILL }
10061                 },
10062                 { &hf_nfapi_req13_drms_table_flag,
10063                         { "Rel-13-DMRS-tabe flag", "nfapi.r13.drms.table.flag",
10064                         FT_UINT8, BASE_DEC, NULL, 0x0,
10065                         "Indicates if Release 13 DMRS table is used.", HFILL }
10066                 },
10067                 { &hf_nfapi_csi_rs_resource_index,
10068                         { "CSI-RS resource Index", "nfapi.csi.rs.resource.index",
10069                         FT_UINT8, BASE_DEC, NULL, 0x0,
10070                         "Index of the CSI-RS resource. This is included to link bfValues to CSI-RS resources included in Release 10 parameters.", HFILL }
10071                 },
10072                 { &hf_nfapi_csi_rs_class,
10073                         { "Class", "nfapi.csi.rs.class",
10074                         FT_UINT8, BASE_DEC, VALS(csi_rs_class_vals), 0x0,
10075                         "Indicates CSI-RS class", HFILL }
10076                 },
10077                 { &hf_nfapi_cdm_type,
10078                         { "CDM Type", "nfapi.cdm.type",
10079                         FT_UINT8, BASE_DEC, VALS(csi_rs_cdm_type_vals), 0x0,
10080                         "Indicates CDM type for CSI-RS. See [36.211] section 6.10.5.2. Valid for Class A", HFILL }
10081                 },
10082                 { &hf_nfapi_edpcch_prb_index,
10083                         { "EPDCCH PRB Index", "nfapi.edpcch.prb.index",
10084                         FT_UINT8, BASE_DEC, NULL, 0x0,
10085                         "PRB Index", HFILL }
10086                 },
10087                 { &hf_nfapi_epdcch_resource_assignment_flag,
10088                         { "EPDCCH Resource assignment flag", "nfapi.epdcch.resource.assignment.flag",
10089                         FT_UINT8, BASE_DEC, VALS(local_distributed_vals), 0x0,
10090                         "Type of virtual resource block used", HFILL }
10091                 },
10092                 { &hf_nfapi_epdcch_id,
10093                         { "EPDCCH ID", "nfapi.epdcch.id",
10094                         FT_UINT8, BASE_DEC, NULL, 0x0,
10095                         "EPDCCH Index- used for the scrambler initiation The DMRS scrambling sequence initialization parameter defined in[11] section 6.10.3A.1", HFILL }
10096                 },
10097                 { &hf_nfapi_epdcch_start_symbol,
10098                         { "EPDCCH Start Symbol", "nfapi.epdcch.start.symbol",
10099                         FT_UINT8, BASE_DEC, NULL, 0x0,
10100                         "Indicates the OFDM starting symbol for any EPDCCH and PDSCH", HFILL }
10101                 },
10102                 { &hf_nfapi_epdcch_num_prb,
10103                         { "EPDCCH NumPRB", "nfapi.epdcch.num.prb",
10104                         FT_UINT8, BASE_DEC, NULL, 0x0,
10105                         "Number of PRBs allocated for EPDCCH", HFILL }
10106                 },
10107                 { &hf_nfapi_precoding_value,
10108                         { "Precoding value", "nfapi.precoding.value",
10109                         FT_UINT16, BASE_DEC, NULL, 0x0,
10110                         "Precoding element for physical antenna #i real 8 bits followed by imaginary 8 bits", HFILL }
10111                 },
10112                 { &hf_nfapi_mpdcch_narrowband,
10113                         { "MPDCCH Narrowband", "nfapi.mpdcch.narrowband",
10114                         FT_UINT8, BASE_DEC, NULL, 0x0,
10115                         "Narrowband for MPDCCH", HFILL }
10116                 },
10117                 { &hf_nfapi_number_of_prb_pairs,
10118                         { "Number of PRB pairs", "nfapi.number.prb.pairs",
10119                         FT_UINT8, BASE_DEC, NULL, 0x0,
10120                         "Number of PRB-pairs constituting the MPDCCH-PRB-pair set", HFILL }
10121                 },
10122                 { &hf_nfapi_resource_block_assignment,
10123                         { "Resource Block Assignment", "nfapi.resource.block.assignement",
10124                         FT_UINT8, BASE_DEC, NULL, 0x0,
10125                         "Combinational Index r", HFILL }
10126                 },
10127                 { &hf_nfapi_start_symbol,
10128                         { "Start symbol", "nfapi.start.symbol",
10129                         FT_UINT8, BASE_DEC, NULL, 0x0,
10130                         NULL, HFILL }
10131                 },
10132                 { &hf_nfapi_ecce_index,
10133                         { "ECCE Index", "nfapi.ecce.index",
10134                         FT_UINT8, BASE_DEC, NULL, 0x0,
10135                         "ECCE Index used to send the DCI", HFILL }
10136                 },
10137                 { &hf_nfapi_ce_mode,
10138                         { "CE Mode", "nfapi.ce.mode",
10139                         FT_UINT8, BASE_DEC, VALS(ce_mode_vals), 0x0,
10140                         NULL, HFILL }
10141                 },
10142                 { &hf_nfapi_drms_scrabmling_init,
10143                         { "DMRS scrambling init", "nfapi.drms.scrambling.init",
10144                         FT_UINT16, BASE_DEC, NULL, 0x0,
10145                         "The DMRS scrambling sequence initialization parameter defined in [11] section 6.10.3A.1", HFILL }
10146                 },
10147                 { &hf_nfapi_pdsch_reception_levels,
10148                         { "PDSCH repetition levels", "nfapi.pdsch.repetition.levels",
10149                         FT_UINT8, BASE_DEC, NULL, 0x0,
10150                         "Valid for DCI formats: 6-0A, 6-0B", HFILL }
10151                 },
10152                 { &hf_nfapi_new_data_indicator,
10153                         { "New data indicator", "nfapi.new.data.indicator",
10154                         FT_UINT8, BASE_DEC, NULL, 0x0,
10155                         "The new data indicator for the transport block", HFILL }
10156                 },
10157                 { &hf_nfapi_tpmi_length,
10158                         { "TPMI length", "nfapi.tpmi.length",
10159                         FT_UINT8, BASE_DEC, NULL, 0x0,
10160                         "Length of 'TPMI' field in units of bits", HFILL }
10161                 },
10162                 { &hf_nfapi_pmi_flag,
10163                         { "PMI flag", "nfapi.pmi.flag",
10164                         FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
10165                         "Indicates if 'PMI' field is present", HFILL }
10166                 },
10167                 { &hf_nfapi_harq_resource_offset,
10168                         { "HARQ resource offset", "nfapi.harq.resource.offset",
10169                         FT_UINT8, BASE_DEC, NULL, 0x0,
10170                         "HARQ-ACK resource offset used", HFILL }
10171                 },
10172                 { &hf_nfapi_dci_subframe_repetition_number,
10173                         { "DCI subframe repetition number", "nfapi.dci.subframe.repetition.number",
10174                         FT_UINT8, BASE_DEC, NULL, 0x0,
10175                         "Indicates the number of MPDCCH repetitions", HFILL }
10176                 },
10177                 { &hf_nfapi_downlink_assignment_index_length,
10178                         { "Downlink assignment Index Length", "nfapi.dl.assignement.index.length",
10179                         FT_UINT8, BASE_DEC, NULL, 0x0,
10180                         "Length of Downlink assignment Index field in units of bits.", HFILL }
10181                 },
10182                 { &hf_nfapi_starting_ce_level,
10183                         { "Starting CE Level", "nfapi.starting.ce.level",
10184                         FT_UINT8, BASE_DEC, NULL, 0x0,
10185                         "2 bits provide the PRACH starting CE level", HFILL }
10186                 },
10187                 { &hf_nfapi_antenna_ports_and_scrambling_identity_flag,
10188                         { "Antenna ports and scrambling identity flag", "nfapi.antenna.ports.and.scrambling.identity.flag",
10189                         FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
10190                         "Indicates if 'Antenna ports and scrambling identity' field is present.", HFILL }
10191                 },
10192                 { &hf_nfapi_antenna_ports_and_scrambling_identity,
10193                         { "Antenna ports and scrambling identity", "nfapi.antenna.ports.and.scrambling.identit",
10194                         FT_UINT8, BASE_DEC, NULL, 0x0,
10195                         "Indicates the Antenna port and, scrambling identity value", HFILL }
10196                 },
10197                 { &hf_nfapi_paging_direct_indication_differentiation_flag,
10198                         { "Paging/Direct indication differentiation flag", "nfapi.paging.direct.indictation.differentiation.flag",
10199                         FT_UINT8, BASE_DEC, VALS(paging_direct_indication_differtiation_flag_vals), 0x0,
10200                         "Valid for DCI format 6-2", HFILL }
10201                 },
10202                 { &hf_nfapi_direct_indication,
10203                         { "Direct indication", "nfapi.direct.indication",
10204                         FT_UINT8, BASE_DEC, NULL, 0x0,
10205                         "Valid for DCI format 6-2", HFILL }
10206                 },
10207                 { &hf_nfapi_number_of_tx_antenna_ports,
10208                         { "Number of TX Antenna ports", "nfapi.num.of.tx.antenna.ports",
10209                         FT_UINT8, BASE_DEC, NULL, 0x0,
10210                         "Number of TX physical antenna ports", HFILL }
10211                 },
10212                 { &hf_nfapi_transmission_power,
10213                         { "Transmission Power", "nfapi.transmission_power",
10214                         FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
10215                         "Offset to the reference signal power.", HFILL }
10216                 },
10217                 { &hf_nfapi_mbsfn_area_id,
10218                         { "MBSFN Area id", "nfapi.mbsfn.area.id",
10219                         FT_UINT16, BASE_DEC, NULL, 0x0,
10220                         "Indicates MBSFN area ID", HFILL }
10221                 },
10222                 { &hf_nfapi_dl_dci_format,
10223                         { "DL DCI format", "nfapi.dl.dci.format",
10224                         FT_UINT8, BASE_DEC, VALS(dl_dci_format_vals), 0x0,
10225                         "Format of the DL DCI", HFILL }
10226                 },
10227                 { &hf_nfapi_ul_dci_format,
10228                         { "UL DCI format", "nfapi.ul_dci.format",
10229                         FT_UINT8, BASE_DEC, VALS(ul_dci_format_vals), 0x0,
10230                         "Format of the UL DCI", HFILL }
10231                 },
10232                 { &hf_nfapi_mpdcch_ul_dci_format,
10233                         { "UL DCI format", "nfapi.mpdcch.ul_dci.format",
10234                         FT_UINT8, BASE_DEC, VALS(mpdcch_ul_dci_format_vals), 0x0,
10235                         "Format of the UL DCI", HFILL }
10236                 },
10237                 { &hf_nfapi_cce_idx,
10238                         { "CCE Index", "nfapi.cce.index",
10239                         FT_UINT8, BASE_DEC, NULL, 0x0,
10240                         "CCE Index used to send the DCI", HFILL }
10241                 },
10242                 { &hf_nfapi_aggregation_level,
10243                         { "Aggregation level", "nfapi.aggregation.level",
10244                         FT_UINT8, BASE_DEC, NULL, 0x0,
10245                         "The aggregation level used", HFILL }
10246                 },
10247                 { &hf_nfapi_mcs_1,
10248                         { "MCS_1", "nfapi.mcs_1",
10249                         FT_UINT8, BASE_DEC, NULL, 0x0,
10250                         "The modulation and coding scheme for 1st transport block", HFILL }
10251                 },
10252                 { &hf_nfapi_mcs_2,
10253                         { "MCS_2", "nfapi.mcs_2",
10254                         FT_UINT8, BASE_DEC, NULL, 0x0,
10255                         "The modulation and coding scheme for 2nd transport block", HFILL }
10256                 },
10257                 { &hf_nfapi_redundancy_version_1,
10258                         { "Redundancy version_1", "nfapi.redundancy.version.1",
10259                         FT_UINT8, BASE_DEC, NULL, 0x0,
10260                         "The redundancy version for 1st transport block.", HFILL }
10261                 },
10262                 { &hf_nfapi_redundancy_version_2,
10263                         { "Redundancy version_2", "nfapi.redundancy.version.2",
10264                         FT_UINT8, BASE_DEC, NULL, 0x0,
10265                         "The redundancy version for 2nd transport block", HFILL }
10266                 },
10267                 { &hf_nfapi_new_data_indicator_1,
10268                         { "New data indicator_1", "nfapi.new.data.indicator.1",
10269                         FT_UINT8, BASE_DEC, NULL, 0x0,
10270                         "The new data indicator for 1st transport block.", HFILL }
10271                 },
10272                 { &hf_nfapi_new_data_indicator_2,
10273                         { "New data indicator_2", "nfapi.new.data.indicator.2",
10274                         FT_UINT8, BASE_DEC, NULL, 0x0,
10275                         "The new data indicator for 2nd transport block.", HFILL }
10276                 },
10277                 { &hf_nfapi_harq_process,
10278                         { "HARQ process", "nfapi.harq.process",
10279                         FT_UINT8, BASE_DEC, NULL, 0x0,
10280                         "HARQ process number", HFILL }
10281                 },
10282                 { &hf_nfapi_tpmi,
10283                         { "TPMI", "nfapi.tpmi",
10284                         FT_UINT8, BASE_DEC, NULL, 0x0,
10285                         "The codebook Index to be used for precoding", HFILL }
10286                 },
10287                 { &hf_nfapi_pmi,
10288                         { "PMI", "nfapi.pmi",
10289                         FT_UINT8, BASE_DEC, VALS(pmi_vals), 0x0,
10290                         "Confirmation for precoding", HFILL }
10291                 },
10292                 { &hf_nfapi_precoding_information,
10293                         { "Precoding information", "nfapi.precoding.information",
10294                         FT_UINT8, BASE_DEC, NULL, 0x0,
10295                         NULL, HFILL }
10296                 },
10297                 { &hf_nfapi_tpc,
10298                         { "TPC", "nfapi.tpc",
10299                         FT_UINT8, BASE_DEC, NULL, 0x0,
10300                         "Tx power control command for PUCCH", HFILL }
10301                 },
10302                 { &hf_nfapi_downlink_assignment_index,
10303                         { "Downlink assignment Index", "nfapi.downlink.assignment.index",
10304                         FT_UINT8, BASE_DEC, NULL, 0x0,
10305                         "The downlink assignment Index. In release 8-11 this is only used in TDD mode, "
10306                         "value ignored for FDD. In release 12 or later a field indicating the structure "
10307                         "type of the primary cell is used to determine if this is valid with size 2 bits."
10308                         "In release 13 or later a field indicating codebooksizeDetermination - r13 = 0 is "
10309                         "used to determine is this field is valid with size 4 bits", HFILL }
10310                 },
10311                 { &hf_nfapi_ngap,
10312                         { "Ngap", "nfapi.ngap",
10313                         FT_UINT8, BASE_DEC, VALS(ngap_vals), 0x0,
10314                         "Used in virtual resource block distribution", HFILL }
10315                 },
10316                 { &hf_nfapi_transport_block_size_index,
10317                         { "Transport block size Index", "nfapi.transport.block.size.index",
10318                         FT_UINT8, BASE_DEC, NULL, 0x0,
10319                         "The transport block size", HFILL }
10320                 },
10321                 { &hf_nfapi_downlink_power_offset,
10322                         { "Downlink power offset", "nfapi.downlink.power.offset",
10323                         FT_UINT8, BASE_DEC, NULL, 0x0,
10324                         "Indicates the DL power offset type for multi-user MIMO transmission", HFILL }
10325                 },
10326                 { &hf_nfapi_allocate_prach_flag,
10327                         { "Allocation PRACH flag", "nfapi.allocation.prach.flag",
10328                         FT_UINT8, BASE_DEC, VALS(true_false_vals), 0x0,
10329                         "Indicates that PRACH procedure is initiated", HFILL }
10330                 },
10331                 { &hf_nfapi_preamble_index,
10332                         { "Preamble Index", "nfapi.preamable.index",
10333                         FT_UINT8, BASE_DEC, NULL, 0x0,
10334                         "The preamble Index to be used on the PRACH", HFILL }
10335                 },
10336                 { &hf_nfapi_prach_mask_index,
10337                         { "PRACH mask Index", "nfapi.prach.mask.index",
10338                         FT_UINT8, BASE_DEC, NULL, 0x0,
10339                         "The mask Index to be used on the PRACH", HFILL }
10340                 },
10341                 { &hf_nfapi_rnti_type,
10342                         { "RNTI type", "nfapi.rnti.type",
10343                         FT_UINT8, BASE_DEC, VALS(rnti_type_vals), 0x0,
10344                         NULL, HFILL }
10345                 },
10346                 { &hf_nfapi_mpdcch_rnti_type,
10347                         { "RNTI type", "nfapi.mpdcch.rnti.type",
10348                         FT_UINT8, BASE_DEC, VALS(mpdcch_rnti_type_vals), 0x0,
10349                         NULL, HFILL }
10350                 },
10351                 { &hf_nfapi_mcch_flag,
10352                         { "MCCH flag", "nfapi.mcch.flag",
10353                         FT_BOOLEAN, BASE_NONE, TFS(&mcch_flag_string_name), 0x0,
10354                         "Indicates if format 1C is being used to signal a MCCH or SC-MCCH change notification", HFILL }
10355                 },
10356                 { &hf_nfapi_mcch_change_notification,
10357                         { "MCCH change notification", "nfapi.mcch.change.notification",
10358                         FT_UINT8, BASE_DEC, NULL, 0x0,
10359                         "MCCH or SC-MCCH Change Notification", HFILL }
10360                 },
10361                 { &hf_nfapi_scrambling_identity,
10362                         { "Scrambling identity", "nfapi.scrambling.identity",
10363                         FT_UINT8, BASE_DEC, NULL, 0x0,
10364                         "Indicates the scrambling identity value NSCID", HFILL }
10365                 },
10366                 { &hf_nfapi_cross_carrier_scheduling_flag,
10367                         { "Cross Carrier scheduling flag", "nfapi.cross.carrier.scheduling.flag",
10368                         FT_BOOLEAN, 8, TFS(&cross_carrier_scheduling_flag_strname), 0x0,
10369                         "Indicates if cross carrier scheduling has been enabled for the UE receiving this DCI", HFILL }
10370                 },
10371                 { &hf_nfapi_carrier_indicator,
10372                         { "Carrier Indicator", "nfapi.carrier.indicator",
10373                         FT_UINT8, BASE_DEC, NULL, 0x0,
10374                         "Serving Cell Index", HFILL }
10375                 },
10376                 { &hf_nfapi_srs_flag,
10377                         { "SRS flag", "nfapi.srs.flag",
10378                         FT_BOOLEAN, 8, TFS(&srs_flag_strname), 0x0,
10379                         "Indicates if the SRS request parameter is valid", HFILL }
10380                 },
10381                 { &hf_nfapi_srs_request,
10382                         { "SRS request", "nfapi.srs.request",
10383                         FT_BOOLEAN, 8, TFS(&srs_request_strname), 0x0,
10384                         "SRS request flag", HFILL }
10385                 },
10386                 { &hf_nfapi_antenna_ports_scrambling_and_layers,
10387                         { "Antenna ports scrambling and layers", "nfapi.antenna.ports.scrambling.and.layers",
10388                         FT_UINT8, BASE_DEC, NULL, 0x0,
10389                         "Indicates the Antenna port, scrambling identity value NSCID and number of layers", HFILL }
10390                 },
10391                 { &hf_nfapi_total_dci_length_including_padding,
10392                         { "Total DCI length including padding", "nfapi.total.dci.length.including.padding",
10393                         FT_UINT8, BASE_DEC, NULL, 0x0,
10394                         "The total DCI length including padding bits", HFILL }
10395                 },
10396                 { &hf_nfapi_n_ul_rb,
10397                         { "N_UL_RB", "nfapi.n.dl.rb",
10398                         FT_UINT8, BASE_DEC, NULL, 0x0,
10399                         "BW of serving cell for which the DCI was scheduled for.  This is valid for "
10400                         "the case of cross carrier scheduling, for the case of a self - "
10401                         "scheduling(cross carrier scheduling is not valid or Carrier indicator has value '0', "
10402                         "the BW is the 'DL BW support' as configured in configuration phase(params) "
10403                         "Uplink channel bandwidth in resource blocks", HFILL }
10404                 },
10405                 { &hf_nfapi_harq_ack_resource_offset,
10406                         { "HARQ-ACK resource offset", "nfapi.harq.ack.resource.offset",
10407                         FT_UINT8, BASE_DEC, NULL, 0x0,
10408                         "HARQ-ACK resource offset field is present only when this format is carried by EPDCCH.", HFILL }
10409                 },
10410                 { &hf_nfapi_pdsch_re_mapping_and_quasi_co_location_indicator,
10411                         { "PDSCH RE Mapping and Quasi-Co-Location Indicator", "nfapi.pdsch.re.mapping",
10412                         FT_UINT8, BASE_DEC, NULL, 0x0,
10413                         "Indicates the parameter set configured by the higher layers which the UE should use.", HFILL }
10414                 },
10415                 { &hf_nfapi_primary_cell_type,
10416                         { "Primary cell type", "nfapi.primary.cell.type",
10417                         FT_UINT8, BASE_DEC, VALS(primary_cells_type_vals), 0x0,
10418                         "Indicates the type of the primary cell.", HFILL }
10419                 },
10420                 { &hf_nfapi_ul_dl_configuration_flag,
10421                         { "UL/DL configuration flag", "nfapi.ul.dl.configuration.flag",
10422                         FT_BOOLEAN, 8, TFS(&ul_dl_configuration_flag_strname), 0x0,
10423                         "Indicates if format 1C is being used to signal UL/DL configuration", HFILL }
10424                 },
10425                 { &hf_nfapi_number_of_ul_dl_configurations,
10426                         { "Number of UL/DL configurations", "nfapi.number.ul.dl.configurations",
10427                         FT_UINT8, BASE_DEC, NULL, 0x0,
10428                         NULL, HFILL }
10429                 },
10430                 { &hf_nfapi_ul_dl_configuration_index,
10431                         { "UL/DL configuration indication", "nfapi.ul.dl.configuration.indication",
10432                         FT_UINT8, BASE_DEC, NULL, 0x0,
10433                         "UL/DL configuration Index", HFILL }
10434                 },
10435                 { &hf_nfapi_laa_end_partial_sf_flag,
10436                         { "LAA end partial SF flag", "nfapi.laa.end.partial.sf.flag",
10437                         FT_UINT8, BASE_DEC, NULL, 0x0,
10438                         "Indicates if DCI format 1C is being used to signal LAA end partial SF (valid if end partial SF support configuraton is set)", HFILL }
10439                 },
10440                 { &hf_nfapi_laa_end_partial_sf_configuration,
10441                         { "LAA end partial SF configuration", "nfapi.laa.end.partial.sf.configuration",
10442                         FT_UINT8, BASE_DEC, NULL, 0x0,
10443                         "If DCI format 1C scrambled by CC - RNTI is used to signal end partial SF, this field "
10444                         "contains LAA common information (4 bits used in [9] Table 13A-1 for configuration of "
10445                         "occupied OFDM symbols for current and next SF)", HFILL }
10446                 },
10447                 { &hf_nfapi_codebooksize_determination_r13,
10448                         { "Codebook Size Determination R13", "nfapi.codebook.size.determination.r13",
10449                         FT_UINT8, BASE_DEC, NULL, 0x0,
10450                         "Indicates if the downlink assignment Index parameter (DAI) is 4 bits", HFILL }
10451                 },
10452                 { &hf_nfapi_rel13_drms_table_flag,
10453                         { "Rel-13-DMRS-tabe flag", "nfapi.drms.table.flag.r13",
10454                         FT_UINT8, BASE_DEC, NULL, 0x0,
10455                         "Indicates if Release 13 DMRS table for be used", HFILL }
10456                 },
10457                 { &hf_nfapi_pscch_resource,
10458                         { "PSCCH Resource", "nfapi.pscch.resource",
10459                         FT_UINT8, BASE_DEC, NULL, 0x0,
10460                         "6-bits describing the resource blocks for transmitting PSCCH", HFILL }
10461                 },
10462                 { &hf_nfapi_time_resource_pattern,
10463                         { "Time resource pattern", "nfapi.time.resource.pattern",
10464                         FT_UINT8, BASE_DEC, NULL, 0x0,
10465                         "7-bits describing the time resource pattern Index", HFILL }
10466                 },
10467                 { &hf_nfapi_mpdcch_transmission_type,
10468                         { "MPDCCH transmission type", "nfapi.mpdcch.transmission.type",
10469                         FT_UINT8, BASE_DEC, VALS(local_distributed_vals), 0x0,
10470                         NULL, HFILL }
10471                 },
10472                 { &hf_nfapi_drms_scrambling_init,
10473                         { "DMRS scrambling init", "nfapi.drms.scrambling.init",
10474                         FT_UINT8, BASE_DEC, NULL, 0x0,
10475                         "The DMRS scrambling sequence initialization", HFILL }
10476                 },
10477                 { &hf_nfapi_pusch_repetition_levels,
10478                         { "PUSCH repetition levels", "nfapi.pusch.repetition.levels",
10479                         FT_UINT8, BASE_DEC, NULL, 0x0,
10480                         "Valid for DCI formats: 6-0A, 6-0B", HFILL }
10481                 },
10482                 { &hf_nfapi_frequency_hopping_flag,
10483                         { "Frequency hopping flag", "nfapi.frequency.hopping.flag",
10484                         FT_UINT8, BASE_DEC, NULL, 0x0,
10485                         "Indicates if hopping is being used.", HFILL }
10486                 },
10487                 { &hf_nfapi_csi_request,
10488                         { "CSI request", "nfapi.csi.request",
10489                         FT_UINT8, BASE_DEC, VALS(csi_request_vals), 0x0,
10490                         "Aperiodic CSI request flag", HFILL }
10491                 },
10492                 { &hf_nfapi_dai_presence_flag,
10493                         { "DAI presence flag", "nfapi.dia.presence.flag",
10494                         FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
10495                         "Indicates if DL assignment Index field is present in the DCI", HFILL }
10496                 },
10497                 { &hf_nfapi_total_dci_length_include_padding,
10498                         { "Total DCI length including padding", "nfapi.total.dci.length.including.padding",
10499                         FT_UINT8, BASE_DEC, NULL, 0x0,
10500                         "The total DCI length including padding bits", HFILL }
10501                 },
10502                 { &hf_nfapi_csi_rs_antenna_port_count_r10,
10503                         { "CSI-RS antenna port count r10", "nfapi.csi.rs.antenna.port.count.r10",
10504                         FT_UINT8, BASE_DEC, NULL, 0x0,
10505                         "Indicates number of antennas used for transmission of CSI reference signal.", HFILL }
10506                 },
10507                 { &hf_nfapi_ul_config_pdu_type,
10508                         { "UL Config PDU Type", "nfapi.ul.config.pdu.type",
10509                         FT_UINT8, BASE_DEC, VALS(nfapi_ul_config_pdu_type_vals), 0x0,
10510                         NULL, HFILL }
10511                 },
10512                 { &hf_nfapi_rach_prach_frequency_resources,
10513                         { "RACH PRACH Frequency resources", "nfapi.rach.prach.frequency.resources",
10514                         FT_UINT8, BASE_DEC, NULL, 0x0,
10515                         "If semi-static information is held in the MAC", HFILL }
10516                 },
10517                 { &hf_nfapi_srs_present,
10518                         { "SRS present", "nfapi.srs.present",
10519                         FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
10520                         "If semi-static information is held in the MAC", HFILL }
10521                 },
10522                 { &hf_nfapi_handle,
10523                         { "Handle", "nfapi.handle",
10524                         FT_UINT32, BASE_DEC, NULL, 0x0,
10525                         "An opaque handle", HFILL }
10526                 },
10527                 { &hf_nfapi_pucch_index,
10528                         { "PUCCH Index", "nfapi.pucch.index",
10529                         FT_UINT16, BASE_DEC, NULL, 0x0,
10530                         "The PUCCH Index value", HFILL }
10531                 },
10532                 { &hf_nfapi_size,
10533                         { "Size", "nfapi.size",
10534                         FT_UINT16, BASE_DEC, NULL, 0x0,
10535                         "The size of the ULSCH PDU in bytes as defined by the relevant UL grant", HFILL }
10536                 },
10537                 { &hf_nfapi_resource_block_start,
10538                         { "Resource block start", "nfapi.resource.block.start",
10539                         FT_UINT8, BASE_DEC, NULL, 0x0,
10540                         "The starting resource block for this ULSCH allocation", HFILL }
10541                 },
10542                 { &hf_nfapi_number_of_resource_blocks,
10543                         { "Number of resource blocks", "nfapi.resource.blocks",
10544                         FT_UINT8, BASE_DEC, NULL, 0x0,
10545                         "The number of resource blocks allocated to this ULSCH grant", HFILL }
10546                 },
10547                 { &hf_nfapi_cyclic_shift_2_for_drms,
10548                         { "Cyclic Shift 2 for DRMS", "nfapi.cyclic.shift.2.for.drms",
10549                         FT_UINT8, BASE_DEC, NULL, 0x0,
10550                         "The 2nd cyclic shift for DMRS assigned to the UE in the ULSCH grant", HFILL }
10551                 },
10552                 { &hf_nfapi_frequency_hopping_enabled_flag,
10553                         { "Frequency hopping enabled flag", "nfapi.frequency.hopping.enabled.flag",
10554                         FT_UINT8, BASE_DEC, VALS(hopping_vals), 0x0,
10555                         "Indicates if hopping is being used", HFILL }
10556                 },
10557                 { &hf_nfapi_frequency_hopping_bits,
10558                         { "Frequency hopping bits", "nfapi.frequency.hopping.bits",
10559                         FT_UINT8, BASE_DEC, NULL, 0x0,
10560                         NULL, HFILL }
10561                 },
10562                 { &hf_nfapi_new_data_indication,
10563                         { "New Data inidication", "nfapi.new.data.indication",
10564                         FT_UINT8, BASE_DEC, NULL, 0x0,
10565                         "Specify whether this received transport block is a new transmission from UE", HFILL }
10566                 },
10567                 { &hf_nfapi_harq_process_number,
10568                         { "HARQ Process number", "nfapi.harq.process.number",
10569                         FT_UINT8, BASE_DEC, NULL, 0x0,
10570                         NULL, HFILL }
10571                 },
10572                 { &hf_nfapi_ul_tx_mode,
10573                         { "UL Tx Mode", "nfapi.ul.tx.mode",
10574                         FT_UINT8, BASE_DEC, VALS(ul_tx_mode_vals), 0x0,
10575                         NULL, HFILL }
10576                 },
10577                 { &hf_nfapi_current_tx_nb,
10578                         { "Current Tx nb", "nfapi.current.tx.nb",
10579                         FT_UINT8, BASE_DEC, NULL, 0x0,
10580                         "The current HARQ transmission count of this transport block. Valid if frequency hopping enabled.", HFILL }
10581                 },
10582                 { &hf_nfapi_n_srs,
10583                         { "N SRS", "nfapi.n.srs",
10584                         FT_UINT8, BASE_DEC, VALS(n_srs_vals), 0x0,
10585                         "Indicates if the resource blocks allocated for this grant overlap with the SRS configuration.", HFILL }
10586                 },
10587                 { &hf_nfapi_disable_sequence_hopping_flag,
10588                         { "Disable seqeunce hopping flag", "nfapi.disable.sequence.hopping.flag",
10589                         FT_UINT8, BASE_DEC, NULL, 0x0,
10590                         "Indicates if any configured group hopping should be disabled for this UE.", HFILL }
10591                 },
10592                 { &hf_nfapi_virtual_cell_id_enabled_flag,
10593                         { "Virtual cell ID enabled flag", "nfapi.virtual.cell.id.enabled.flag",
10594                         FT_UINT8, BASE_DEC, VALS(not_used_enabled_vals), 0x0,
10595                         "Indicates if virtual cell is being used and nPUSCH identity is valid.", HFILL }
10596                 },
10597                 { &hf_nfapi_npusch_identity,
10598                         { "nPUSCH Identity", "nfapi.npusch.identity",
10599                         FT_UINT16, BASE_DEC, NULL, 0x0,
10600                         "Virtual cell ID for initialization of group hopping, sequence hopping and sequence shift pattern of PUSCH DMRS.", HFILL }
10601                 },
10602                 { &hf_nfapi_ndrms_csh_identity,
10603                         { "nDMRS-CSH Identity", "nfapi.ndrms.csh.identity",
10604                         FT_UINT16, BASE_DEC, NULL, 0x0,
10605                         "Virtual cell ID for initialization of cyclic shift hopping of PUSCH DMRS.", HFILL }
10606                 },
10607                 { &hf_nfapi_total_number_of_repetitions,
10608                         { "Total Number of repetitions", "nfapi.total.number.of.repetitions",
10609                         FT_UINT16, BASE_DEC, NULL, 0x0,
10610                         NULL, HFILL }
10611                 },
10612                 { &hf_nfapi_repetition_number,
10613                         { "Repetition Number", "nfapi.repetition.number",
10614                         FT_UINT16, BASE_DEC, NULL, 0x0,
10615                         "Current transmission number", HFILL }
10616                 },
10617                 { &hf_nfapi_initial_sf_io,
10618                         { "Initial transmission SF (io)", "nfapi.initial.sf.io",
10619                         FT_UINT16, BASE_DEC, NULL, 0x0,
10620                         "Absolute Sub-Frame of the initial transmission", HFILL }
10621                 },
10622                 { &hf_nfapi_empty_symbols_due_to_retunning,
10623                         { "Empy symbols due to re-tunning", "nfapi.empty.symbols.due.to.retunning",
10624                         FT_UINT8, BASE_DEC, NULL, 0x0,
10625                         "Indicates the symbols that are left empty due to eMTC retuning.", HFILL }
10626                 },
10627                 { &hf_nfapi_dl_cqi_ri_pmi_size_2,
10628                         { "DL CQI/PMI/RI size 2", "nfapi.dl.cqi.ri.pmi.size.2",
10629                         FT_UINT16, BASE_DEC, NULL, 0x0,
10630                         "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 }
10631                 },
10632                 { &hf_nfapi_harq_size_2,
10633                         { "HARQ Size 2", "nfapi.harq.size2",
10634                         FT_UINT8, BASE_DEC, NULL, 0x0,
10635                         "The size of the ACK/NACK in bits.", HFILL }
10636                 },
10637                 { &hf_nfapi_delta_offset_harq_2,
10638                         { "Delta Offset HARQ 2", "nfapi.delta.offset.harq.2",
10639                         FT_UINT8, BASE_DEC, NULL, 0x0,
10640                         "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 }
10641                 },
10642                 { &hf_nfapi_starting_prb,
10643                         { "Starting PRB", "nfapi.starting.prb",
10644                         FT_UINT8, BASE_DEC, NULL, 0x0,
10645                         "The starting PRB for the PUCCH", HFILL }
10646                 },
10647                 { &hf_nfapi_antenna_port,
10648                         { "Antenna Port", "nfapi.antenna.port",
10649                         FT_UINT8, BASE_DEC, VALS(antenna_ports_vals), 0x0,
10650                         "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 }
10651                 },
10652                 { &hf_nfapi_number_of_combs,
10653                         { "Number of Combs", "nfapi.num.of.combs",
10654                         FT_UINT8, BASE_DEC, VALS(combs_vals), 0x0,
10655                         "Defines the maximum number of transmission combs (TC).", HFILL }
10656                 },
10657                 { &hf_nfapi_npucch_identity,
10658                         { "nPUCCH Identity", "nfapi.npucch.identity",
10659                         FT_UINT16, BASE_DEC, NULL, 0x0,
10660                         "Virtual cell ID for initialization of base sequence and cyclic shift hopping of PUCCH.", HFILL }
10661                 },
10662                 { &hf_nfapi_empty_symbols,
10663                         { "Empty symbols", "nfapi.empty.symbols",
10664                         FT_UINT8, BASE_DEC, NULL, 0x0,
10665                         "Indicates the symbols that are left empty due to eMTC retuning.", HFILL }
10666                 },
10667                 { &hf_nfapi_csi_mode,
10668                         { "CSI_mode", "nfapi.csi.mode",
10669                         FT_UINT8, BASE_DEC, VALS(csi_mode_vals), 0x0,
10670                         NULL, HFILL }
10671                 },
10672                 { &hf_nfapi_dl_cqi_pmi_size_2,
10673                         { "DL CQI/PMI Size 2", "nfapi.dl.cqi.pmi.size.2",
10674                         FT_UINT16, BASE_DEC, NULL, 0x0,
10675                         "The size of the DL CQI/PMI in bits", HFILL }
10676                 },
10677                 { &hf_nfapi_statring_prb,
10678                         { "Starting PRB", "nfapi.starting.prb",
10679                         FT_UINT8, BASE_DEC, NULL, 0x0,
10680                         "The starting PRB for the PUCCH", HFILL }
10681                 },
10682                 { &hf_nfapi_cdm_index,
10683                         { "cdm_Index", "nfapi.cdm.index",
10684                         FT_UINT8, BASE_DEC, NULL, 0x0,
10685                         "Selected CDM option", HFILL }
10686                 },
10687                 { &hf_nfapi_nsrs,
10688                         { "N srs", "nfapi.n.srs",
10689                         FT_UINT8, BASE_DEC, NULL, 0x0,
10690                         "Indicates if the resource blocks allocated for this grant overlap with the SRS configuration.", HFILL }
10691                 },
10692                 { &hf_nfapi_num_ant_ports,
10693                         { "Num_ant_ports", "nfapi.num.ant.port",
10694                         FT_UINT8, BASE_DEC, NULL, 0x0,
10695                         "The number of antenna ports used by the UE transmit", HFILL }
10696                 },
10697                 { &hf_nfapi_n_pucch_2_0,
10698                         { "n_PUCCH_2_0", "nfapi.n.pucch.2.0",
10699                         FT_UINT16, BASE_DEC, NULL, 0x0,
10700                         "The PUCCH Index value for ACK/NACK HARQ resource 4 on antenna port", HFILL }
10701                 },
10702                 { &hf_nfapi_n_pucch_2_1,
10703                         { "n_PUCCH_2_1", "nfapi.n.pucch.2.1",
10704                         FT_UINT16, BASE_DEC, NULL, 0x0,
10705                         "HARQ resource 5", HFILL }
10706                 },
10707                 { &hf_nfapi_n_pucch_2_2,
10708                         { "n_PUCCH_2_2", "nfapi.n.pucch.2.2",
10709                         FT_UINT16, BASE_DEC, NULL, 0x0,
10710                         "HARQ resource 6", HFILL }
10711                 },
10712                 { &hf_nfapi_n_pucch_2_3,
10713                         { "n_PUCCH_2_3", "nfapi.n.pucch.2.3",
10714                         FT_UINT16, BASE_DEC, NULL, 0x0,
10715                         "HARQ resource 7", HFILL }
10716                 },
10717                 { &hf_nfapi_dl_cqi_pmi_size_rank_1,
10718                         { "DL CQI PMI size rank 1", "nfapi.dl.cqi.pmi.size.rank.1",
10719                         FT_UINT8, BASE_DEC, NULL, 0x0,
10720                         "The size of the DL CQI/PMI in bits in case of rank 1 report.", HFILL }
10721                 },
10722                 { &hf_nfapi_dl_cqi_pmi_size_rank_greater_1,
10723                         { "DL CQI PMI size rank greater 1", "nfapi.dl.cqi.pmi.size.rank.1",
10724                         FT_UINT8, BASE_DEC, NULL, 0x0,
10725                         "The size of the DL CQI/PMI in bits in case of rank>1 report.", HFILL }
10726                 },
10727                 { &hf_nfapi_ri_size,
10728                         { "RI size", "nfapi.ri.size",
10729                         FT_UINT8, BASE_DEC, NULL, 0x0,
10730                         "The size of RI in bits", HFILL }
10731                 },
10732                 { &hf_nfapi_delta_offset_cqi,
10733                         { "Delta offset cqi", "nfapi.delta.offset.cqi",
10734                         FT_UINT8, BASE_DEC, NULL, 0x0,
10735                         "Delta offset for CQI. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10736                 },
10737                 { &hf_nfapi_delta_offset_ri,
10738                         { "Delta offset ri", "nfapi.delta.offset.ri",
10739                         FT_UINT8, BASE_DEC, NULL, 0x0,
10740                         "Delta offset for RI. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10741                 },
10742                 { &hf_nfapi_harq_size,
10743                         { "HARQ size", "nfapi.harq_size",
10744                         FT_UINT8, BASE_DEC, NULL, 0x0,
10745                         "The size of the ACK/NACK in bits", HFILL }
10746                 },
10747                 { &hf_nfapi_delta_offset_harq,
10748                         { "Delta offset HARQ", "nfapi.delta.offset.harq",
10749                         FT_UINT8, BASE_DEC, NULL, 0x0,
10750                         "Delta offset for HARQ. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10751                 },
10752                 { &hf_nfapi_tdd_ack_nack_mode,
10753                         { "ACK NACK mode", "nfapi.tdd.ack.nack.mode",
10754                         FT_UINT8, BASE_DEC, VALS(nfapi_tdd_ack_nack_mode_vals), 0x0,
10755                         "The format of the ACK/NACK response expected. For TDD only.", HFILL }
10756                 },
10757                 { &hf_nfapi_fdd_ack_nack_mode,
10758                         { "ACK NACK mode", "nfapi.fdd.ack.nack.mode",
10759                         FT_UINT8, BASE_DEC, VALS(nfapi_fdd_ack_nack_mode_vals), 0x0,
10760                         "The format of the ACK/NACK response expected. For TDD only.", HFILL }
10761                 },
10762                 { &hf_nfapi_n_srs_initial,
10763                         { "N srs initial", "nfapi.n.srs.initial",
10764                         FT_UINT8, BASE_DEC, VALS(n_srs_initial_vals), 0x0,
10765                         NULL, HFILL }
10766                 },
10767                 { &hf_nfapi_initial_number_of_resource_blocks,
10768                         { "Initial number of resource blocks", "nfapi.initial.number.of.resource.blocks",
10769                         FT_UINT8, BASE_DEC, NULL, 0x0,
10770                         "The number of resource blocks used in the initial transmission of this transport block.", HFILL }
10771                 },
10772                 { &hf_nfapi_dl_cqi_pmi_size,
10773                         { "DL cqi pmi size", "nfapi.dl.cqi.pmi.size",
10774                         FT_UINT8, BASE_DEC, NULL, 0x0,
10775                         "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 }
10776                 },
10777                 { &hf_nfapi_report_type,
10778                         { "Report type", "nfapi.report.type",
10779                         FT_BOOLEAN, 8, TFS(&nfapi_csi_report_type_strname), 0x0,
10780                         "Type of CSI report", HFILL }
10781                 },
10782                 { &hf_nfapi_dl_cqi_ri_pmi_size,
10783                         { "DL CQI/PMI/RI size", "nfapi.dl.cqi.ri.pmi.size",
10784                         FT_UINT8, BASE_DEC, NULL, 0x0,
10785                         "The size of the DL CQI/PMI/RI/CRI in bits", HFILL }
10786                 },
10787                 { &hf_nfapi_control_type,
10788                         { "Control type", "nfapi.control.type",
10789                         FT_BOOLEAN, 8, TFS(&nfapi_control_type_string_name), 0x0,
10790                         NULL, HFILL }
10791                 },
10792                 { &hf_nfapi_number_of_cc,
10793                         { "Number of cc", "nfapi.number.of.cc",
10794                         FT_UINT8, BASE_DEC, NULL, 0x0,
10795                         "The number of CC in the aperiodic report", HFILL }
10796                 },
10797                 { &hf_nfapi_number_of_pucch_resource,
10798                         { "Number of PUCCH Resource", "nfapi.number.of.pucch.resource",
10799                         FT_UINT8, BASE_DEC, NULL, 0x0,
10800                         "A value of 2 indicates that the UE is configured to transmit on two antenna ports", HFILL }
10801                 },
10802                 { &hf_nfapi_pucch_index_p1,
10803                         { "PUCCH Index P1", "nfapi.pucch.index.p1",
10804                         FT_UINT16, BASE_DEC, NULL, 0x0,
10805                         "The PUCCH Index value for antenna port P1", HFILL }
10806                 },
10807                 { &hf_nfapi_n_pucch_1_0,
10808                         { "N PUCCH 1 0", "nfapi.n.pucch.1.0",
10809                         FT_UINT8, BASE_DEC, NULL, 0x0,
10810                         "HARQ resource 0", HFILL }
10811                 },
10812                 { &hf_nfapi_n_pucch_1_1,
10813                         { "N PUCCH 1 1", "nfapi.n.pucch.1.1",
10814                         FT_UINT8, BASE_DEC, NULL, 0x0,
10815                         "HARQ resource 1", HFILL }
10816                 },
10817                 { &hf_nfapi_n_pucch_1_2,
10818                         { "N PUCCH 1 2", "nfapi.n.pucch.1.2",
10819                         FT_UINT8, BASE_DEC, NULL, 0x0,
10820                         "HARQ resource 2", HFILL }
10821                 },
10822                 { &hf_nfapi_n_pucch_1_3,
10823                         { "N PUCCH 1 3", "nfapi.n.pucch.1.3",
10824                         FT_UINT8, BASE_DEC, NULL, 0x0,
10825                         "HARQ resource 3", HFILL }
10826                 },
10827                 { &hf_nfapi_srs_bandwidth,
10828                         { "SRS Bandwidth", "nfapi.srs.bandwidth",
10829                         FT_UINT8, BASE_DEC, NULL, 0x0,
10830                         "SRS Bandwidth. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10831                 },
10832                 { &hf_nfapi_frequency_domain_position,
10833                         { "Frequency Domain position", "nfapi.frequency.domain.position",
10834                         FT_UINT8, BASE_DEC, NULL, 0x0,
10835                         "Frequency-domain position, NRRC This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10836                 },
10837                 { &hf_nfapi_srs_hopping_bandwidth,
10838                         { "SRS hopping bandwidth", "nfapi.srs.hopping.bandwidth",
10839                         FT_UINT8, BASE_DEC, NULL, 0x0,
10840                         "Configures the frequency hopping on the SRS. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10841                 },
10842                 { &hf_nfapi_transmission_comb,
10843                         { "Transmission comb", "nfapi.transmission.comb",
10844                         FT_UINT8, BASE_DEC, NULL, 0x0,
10845                         "Configures the frequency location of the SRS. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10846                 },
10847                 { &hf_nfapi_i_srs,
10848                         { "I SRS", "nfapi.i.srs",
10849                         FT_UINT8, BASE_DEC, NULL, 0x0,
10850                         "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 }
10851                 },
10852                 { &hf_nfapi_sounding_reference_cyclic_shift,
10853                         { "Sounding reference cyclic shift", "nfapi.sounding.reference.cyclic.shift",
10854                         FT_UINT8, BASE_DEC, NULL, 0x0,
10855                         "Configures the SRS sequence generation. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10856                 },
10857                 { &hf_nfapi_pdu_length,
10858                         { "PDU length", "nfapi.pdu.length",
10859                         FT_UINT16, BASE_DEC, NULL, 0x0,
10860                         "The total length (in bytes) of the PDU description and PDU data, without the padding bytes", HFILL }
10861                 },
10862                 { &hf_nfapi_crc_flag,
10863                         { "CRC flag", "nfapi.crc.flag",
10864                         FT_BOOLEAN, 8, TFS(&crc_flag_strname), 0x0,
10865                         "A flag indicating if a CRC error was detected", HFILL }
10866                 },
10867                 { &hf_nfapi_number_of_hi_pdus,
10868                         { "Number of HI Pdu's", "nfapi.number_of_hi_pdus",
10869                         FT_UINT8, BASE_DEC, NULL, 0x0,
10870                         "Number of HI PDUs included in this message", HFILL }
10871                 },
10872                 { &hf_nfapi_number_of_dci_pdus,
10873                         { "Number of DCI Pdu's", "nfapi.number_of_dci_pdus",
10874                         FT_UINT8, BASE_DEC, NULL, 0x0,
10875                         "Number of DCI PDUs included in this message", HFILL }
10876                 },
10877                 { &hf_nfapi_hi_dci0_pdu_type,
10878                         { "PDU Type", "nfapi.pdu_type",
10879                         FT_UINT8, BASE_DEC, VALS(hi_dci0_pdu_type_vals), 0x0,
10880                         NULL, HFILL }
10881                 },
10882                 { &hf_nfapi_hi_value,
10883                         { "HI Value", "nfapi.hi_value",
10884                         FT_BOOLEAN, 8, TFS(&hi_value_strname), 0x0,
10885                         "The PHICH value which is sent on the resource", HFILL }
10886                 },
10887                 { &hf_nfapi_i_phich,
10888                         { "i phich", "nfapi.i_phich",
10889                         FT_UINT8, BASE_DEC, NULL, 0x0,
10890                         "Is used in the calculation of the PHICH location. For TDD only", HFILL }
10891                 },
10892                 { &hf_nfapi_flag_tb2,
10893                         { "Flag TB2", "nfapi.flag_tb2",
10894                         FT_BOOLEAN, BASE_NONE, TFS(&flag_tb2_strname), 0x0,
10895                         "Indicates is HI is present for a second transport block", HFILL }
10896                 },
10897                 { &hf_nfapi_hi_value_2,
10898                         { "HI Value 2", "nfapi.hi_value_2",
10899                         FT_BOOLEAN, BASE_NONE, TFS(&hi_value_strname), 0x0,
10900                         "The PHICH value for a second transport block.", HFILL }
10901                 },
10902                 { &hf_nfapi_ue_tx_antenna_selection,
10903                         { "UE Tx Antenna selection", "nfapi.ue_tx_antenna_selection",
10904                         FT_UINT8, BASE_DEC, VALS(ue_tx_antenna_selection_vals), 0x0,
10905                         "Indicates how the CRC is calculated on the PDCCH.", HFILL }
10906                 },
10907                 { &hf_nfapi_cqi_csi_request,
10908                         { "cqi csi request", "nfapi.cqi_csi_request",
10909                         FT_UINT8, BASE_DEC, NULL, 0x0,
10910                         "Aperiodic CQI request flag", HFILL }
10911                 },
10912                 { &hf_nfapi_ul_index,
10913                         { "UL Index", "nfapi.ul_index",
10914                         FT_UINT8, BASE_DEC, NULL, 0x0,
10915                         "Valid for TDD mode only", HFILL }
10916                 },
10917                 { &hf_nfapi_dl_assignment_index,
10918                         { "DL Assignment Index", "nfapi.dl_assignment_index",
10919                         FT_UINT8, BASE_DEC, NULL, 0x0,
10920                         "Valid for TDD mode only.", HFILL }
10921                 },
10922                 { &hf_nfapi_tpc_bitmap,
10923                         { "TPC bitmap", "nfapi.tpc_bitmap",
10924                         FT_UINT8, BASE_DEC, NULL, 0x0,
10925                         "TPC commands for PUCCH and PUSCH", HFILL }
10926                 },
10927                 { &hf_nfapi_number_of_antenna_ports,
10928                         { "Number of antenna ports", "nfapi.number.of.antenna.ports",
10929                         FT_UINT8, BASE_DEC, VALS(number_of_antenna_port_vals), 0x0,
10930                         "Defines number of antenna ports for this ULSCH allocation", HFILL }
10931                 },
10932                 { &hf_nfapi_size_of_cqi_csi_feild,
10933                         { "Size of cqi csi feild", "nfapi.size.of.cqi.csi.feild",
10934                         FT_UINT8, BASE_DEC, VALS(size_of_cqi_csi_feild_vals), 0x0,
10935                         "Indicates the size of the CQI/CSI request field", HFILL }
10936                 },
10937                 { &hf_nfapi_new_data_indication_two,
10938                         { "New data indication 2", "nfapi.new.data.indication.two",
10939                         FT_UINT8, BASE_DEC, NULL, 0x0,
10940                         "The new data indicator for the second transport block", HFILL }
10941                 },
10942                 { &hf_nfapi_resource_allocation_flag,
10943                         { "Resource allocation flag", "nfapi.resource.allocation.flag",
10944                         FT_UINT8, BASE_DEC, NULL, 0x0,
10945                         "Indicates if the Resource Allocation Type parameter is valid.", HFILL }
10946                 },
10947                 { &hf_nfapi_dl_node_sync_t1,
10948                         { "DL Node Sync t1", "nfapi.dl.node.sync.t1",
10949                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
10950                         "Offset from VNF SFN/SF 0/0 time reference of the DL Node Sync message transmission at the transport layer, in microseconds.", HFILL }
10951                 },
10952                 { &hf_nfapi_dl_node_sync_delta_sfn_sf,
10953                         { "DL Node Sync Delta SFN SF", "nfapi.dl.node.sync.delta_sfn_sf",
10954                         FT_INT32, BASE_DEC, NULL, 0x0,
10955                         "The delta shift in subframes that the PNF PHY instance must update to on the next subframe boundary", HFILL }
10956                 },
10957                 { &hf_nfapi_dl_cyclic_prefix_type,
10958                         { "DL Cyclic Prefix type", "nfapi.dl.cyclic.prefix.type",
10959                         FT_BOOLEAN, 8, TFS(&cyclic_prefix_type_strname), 0x0,
10960                         "Cyclic prefix type, used for DL", HFILL }
10961                 },
10962                 { &hf_nfapi_ul_cyclic_prefix_type,
10963                         { "UL Cyclic Prefix type", "nfapi.ul.cyclic.prefix.type",
10964                         FT_BOOLEAN, 8, TFS(&cyclic_prefix_type_strname), 0x0,
10965                         "Cyclic prefix type, used for UL", HFILL }
10966                 },
10967                 { &hf_nfapi_downlink_channel_bandwidth,
10968                         { "Downlink Channel Bandwidth", "nfapi.dl.channel.bandwidth",
10969                         FT_UINT16, BASE_DEC, NULL, 0x0,
10970                         "Downlink channel bandwidth in resource blocks.", HFILL }
10971                 },
10972                 { &hf_nfapi_uplink_channel_bandwidth,
10973                         { "Uplink Channel Bandwidth", "nfapi.ul.channel_bandwidth",
10974                         FT_UINT16, BASE_DEC, NULL, 0x0,
10975                         "Uplink channel bandwidth in resource blocks.", HFILL }
10976                 },
10977                 { &hf_nfapi_tx_antenna_ports,
10978                         { "Tx Antenna Ports", "nfapi.tx.antenna.ports",
10979                         FT_UINT16, BASE_DEC, NULL, 0x0,
10980                         "The number of cell specific or NB transmit antenna ports.", HFILL }
10981                 },
10982                 { &hf_nfapi_rx_antenna_ports,
10983                         { "Tx Antenna Ports", "nfapi.rx.antenna.ports",
10984                         FT_UINT16, BASE_DEC, NULL, 0x0,
10985                         "The number of cell specific or NB receive antenna ports.", HFILL }
10986                 },
10987                 { &hf_nfapi_ul_node_sync_t1,
10988                         { "UL Node Sync t1", "nfapi.ul.node.sync.t1",
10989                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
10990                         "The supplied t1 field in the DL Node Sync", HFILL }
10991                 },
10992                 { &hf_nfapi_ul_node_sync_t2,
10993                         { "UL Node Sync t2", "nfapi.ul.node.sync.t2",
10994                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
10995                         "Offset from PNF SFN/SF 0/0 time reference of the DL Node Sync message reception at the transport layer, in microseconds.", HFILL }
10996                 },
10997                 { &hf_nfapi_ul_node_sync_t3,
10998                         { "UL Node Sync t3", "nfapi.ul.node.sync.t3",
10999                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11000                         "Offset from PNF SFN/SF 0/0 time reference of the UL Node Sync message transmission at the transport layer, in microseconds.", HFILL }
11001                 },
11002                 { &hf_nfapi_pb,
11003                         { "P-B", "nfapi.pb.allocation",
11004                         FT_UINT16, BASE_DEC, NULL, 0x0,
11005                         "Refers to downlink power allocation. Value is an Index into the referenced table.", HFILL }
11006                 },
11007                 { &hf_nfapi_timing_info_last_sfn_sf,
11008                         { "Last SFN/SF", "nfapi.timing.info.last.sfn.sf",
11009                         FT_UINT32, BASE_DEC, NULL, 0x0,
11010                         "The completed SFN/SF at the PNF PHY instance that triggered the Timing Info message", HFILL }
11011                 },
11012                 { &hf_nfapi_timing_info_time_since_last_timing_info,
11013                         { "Time since last Timing Info", "nfapi.timing.info.time.since.last.timing.info",
11014                         FT_UINT32, BASE_DEC, NULL, 0x0,
11015                         "The number of ms since the last Timing Info was sent from this PNF PHY instance.", HFILL }
11016                 },
11017                 { &hf_nfapi_timing_info_dl_config_jitter,
11018                         { "DL Config Jitter", "nfapi.timing.info.dl.config.jitter",
11019                         FT_UINT32, BASE_DEC, NULL, 0x0,
11020                         "The inter message jitter of the DL Config message reception in microseconds", HFILL }
11021                 },
11022                 { &hf_nfapi_timing_info_tx_request_jitter,
11023                         { "Tx Request Jitter", "nfapi.timing.info.tx.req.jitter",
11024                         FT_UINT32, BASE_DEC, NULL, 0x0,
11025                         "The inter message jitter of the Tx Request message reception in microseconds", HFILL }
11026                 },
11027                 { &hf_nfapi_timing_info_ul_config_jitter,
11028                         { "UL Config Jitter", "nfapi.timing.info.ul.config.jitter",
11029                         FT_UINT32, BASE_DEC, NULL, 0x0,
11030                         "The inter message jitter of the UL Config message reception in microseconds", HFILL }
11031                 },
11032                 { &hf_nfapi_timing_info_hi_dci0_jitter,
11033                         { "HI_DCI0 Jitter", "nfapi.timing.info.hi.dci0.jitter",
11034                         FT_UINT32, BASE_DEC, NULL, 0x0,
11035                         "The inter message jitter of the HI_DCI0 message reception in microseconds", HFILL }
11036                 },
11037                 { &hf_nfapi_timing_info_dl_config_latest_delay,
11038                         { "DL Config Latest Delay", "nfapi.timing.info.dl.config.latest.delay",
11039                         FT_INT32, BASE_DEC, NULL, 0x0,
11040                         "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 }
11041                 },
11042                 { &hf_nfapi_timing_info_tx_request_latest_delay,
11043                         { "Tx Request Latest Delay", "nfapi.timing.info.tx.request.latest.delay",
11044                         FT_INT32, BASE_DEC, NULL, 0x0,
11045                         "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 }
11046                 },
11047                 { &hf_nfapi_timing_info_ul_config_latest_delay,
11048                         { "UL Config Latest Delay", "nfapi.timing.info.ul.config.latest.delay",
11049                         FT_INT32, BASE_DEC, NULL, 0x0,
11050                         "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 }
11051                 },
11052                 { &hf_nfapi_timing_info_hi_dci0_latest_delay,
11053                         { "HI_DCI0 Latest Delay", "nfapi.timing.info.hi.dci0.latest.delay",
11054                         FT_INT32, BASE_DEC, NULL, 0x0,
11055                         "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 }
11056                 },
11057                 { &hf_nfapi_timing_info_dl_config_earliest_arrival,
11058                         { "DL Config Earliest Arrival", "nfapi.timing.info.dl.config.earliest.arrival",
11059                         FT_INT32, BASE_DEC, NULL, 0x0,
11060                         "The earlierst 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 }
11061                 },
11062                 { &hf_nfapi_timing_info_tx_request_earliest_arrival,
11063                         { "Tx Request Earliest Arrival", "nfapi.timing.info.tx.request.earliest.arrival",
11064                         FT_INT32, BASE_DEC, NULL, 0x0,
11065                         "The earlierst 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 }
11066                 },
11067                 { &hf_nfapi_timing_info_ul_config_earliest_arrival,
11068                         { "UL Config Earliest Arrival", "nfapi.timing.info.ul.config.earliest.arrival",
11069                         FT_INT32, BASE_DEC, NULL, 0x0,
11070                         "The earlierst 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 }
11071                 },
11072                 { &hf_nfapi_timing_info_hi_dci0_earliest_arrival,
11073                         { "HI_DCI0 Earliest Arrival", "nfapi.timing.info.hi.dci0.earliest.arrival",
11074                         FT_INT32, BASE_DEC, NULL, 0x0,
11075                         "The earlierst 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 }
11076                 },
11077                 { &hf_nfapi_pcfich_power_offset,
11078                         { "PCFICH Power Offset", "nfapi.pcfich.power.offset",
11079                         FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
11080                         "The power per antenna of the PCFICH with respect to the reference signal.", HFILL }
11081                 },
11082                 { &hf_nfapi_timing_window,
11083                         { "NFAPI Timing window", "nfapi.timing.window",
11084                         FT_UINT8, BASE_DEC, NULL, 0x0,
11085                         "The window in milliseconds that the PHY must receive and queue the P7 messages.", HFILL }
11086                 },
11087                 { &hf_nfapi_timing_info_mode,
11088                         { "Timing Info mode", "nfapi.timing.info.mode",
11089                         FT_UINT8, BASE_DEC, NULL, 0x0,
11090                         "The configured mode of operation for the timing info message to be sent to the VNF from the PHY", HFILL }
11091                 },
11092                 { &hf_nfapi_timing_info_period,
11093                         { "Timing info period", "nfapi.timing.info.period",
11094                         FT_UINT8, BASE_DEC, NULL, 0x0,
11095                         "If Periodic timing mode is enabled, this defines the periodicity in subframes. This field is ignored if periodic timing mode is disabled.", HFILL }
11096                 },
11097                 { &hf_nfapi_tdd_harq_mode,
11098                         { "Mode", "nfapi.tdd.harq.mode",
11099                         FT_UINT8, BASE_DEC, VALS(tdd_harq_mode_vals), 0x0,
11100                         "The format of the ACK/NACK response expected", HFILL }
11101                 },
11102                 { &hf_nfapi_fdd_harq_mode,
11103                         { "Mode", "nfapi.fdd.harq.mode",
11104                         FT_UINT8, BASE_DEC, VALS(fdd_harq_mode_vals), 0x0,
11105                         "The format of the ACK/NACK response expected", HFILL }
11106                 },
11107                 { &hf_nfapi_number_of_ack_nack,
11108                         { "Number of ACK/NACK", "nfapi.uint16.tag",
11109                         FT_UINT16, BASE_DEC, NULL, 0x0,
11110                         "The number of ACK/NACK results reported for this UE", HFILL }
11111                 },
11112                 { &hf_nfapi_harq_data_value_0,
11113                         { "Value 0", "nfapi.harq.value.0",
11114                         FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11115                         "Indicates HARQ results", HFILL }
11116                 },
11117                 { &hf_nfapi_harq_data_value_0_special,
11118                         { "Value 0", "nfapi.harq.value.0.special",
11119                         FT_UINT8, BASE_DEC, VALS(harq_special_value_vals), 0x0,
11120                         "Indicates HARQ results", HFILL }
11121                 },
11122                 { &hf_nfapi_harq_data_value_1,
11123                         { "Value 1", "nfapi.harq.value.1",
11124                         FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11125                         "Indicates HARQ results", HFILL }
11126                 },
11127                 { &hf_nfapi_harq_data_value_2,
11128                         { "Value 2", "nfapi.harq.value.2",
11129                         FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11130                         "Indicates HARQ results", HFILL }
11131                 },
11132                 { &hf_nfapi_harq_data_value_3,
11133                         { "Value 3", "nfapi.harq.value.3",
11134                         FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11135                         "Indicates HARQ results", HFILL }
11136                 },
11137                 { &hf_nfapi_harq_tb_1,
11138                         { "HARQ TB1", "nfapi.harq.tb.1",
11139                         FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11140                         "HARQ feedback of 1st TB.", HFILL }
11141                 },
11142                 { &hf_nfapi_harq_tb_2,
11143                         { "HARQ TB2", "nfapi.harq.tb.2",
11144                         FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11145                         "HARQ feedback of 2nd TB.", HFILL }
11146                 },
11147                 { &hf_nfapi_harq_tb_n,
11148                         { "HARQ TB_N", "nfapi.harq.tb.n",
11149                         FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11150                         "HARQ feedback of Nth TB.", HFILL }
11151                 },
11152                 { &hf_nfapi_ul_cqi,
11153                         { "UL_CQI", "nfapi.ul.cqi",
11154                         FT_UINT8, BASE_CUSTOM, CF_FUNC(ul_cqi_conversion_fn), 0x0,
11155                         "SNR", HFILL }
11156                 },
11157                 { &hf_nfapi_channel,
11158                         { "Channel", "nfapi.channel",
11159                         FT_UINT8, BASE_DEC, VALS(channel_vals), 0x0,
11160                         "The channel to which this measurement refers", HFILL }
11161                 },
11162                 { &hf_nfapi_data_offset,
11163                         { "Data Offset", "nfapi.data.offset",
11164                         FT_UINT16, BASE_DEC, NULL, 0x0,
11165                         "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 }
11166                 },
11167                 { &hf_nfapi_ri,
11168                         { "RI", "nfapi.ri",
11169                         FT_UINT8, BASE_DEC, NULL, 0x0,
11170                         "The rank indication reported by the UE on PUSCH for aperiodic CSI.", HFILL }
11171                 },
11172                 { &hf_nfapi_timing_advance,
11173                         { "Timing Advance", "nfapi.timing.advance",
11174                         FT_UINT16, BASE_DEC, NULL, 0x0,
11175                         "The timing advance measured for this PDU and UE.", HFILL }
11176                 },
11177                 { &hf_nfapi_timing_advance_r9,
11178                         { "Timing Advance R9", "nfapi.timing.advance.r9",
11179                         FT_UINT16, BASE_DEC, NULL, 0x0,
11180                         "Timing advance used for positioning", HFILL }
11181                 },
11182                 { &hf_nfapi_number_of_cc_reported,
11183                         { "Number of CC reported", "nfapi.number.of.cc.reported",
11184                         FT_UINT8, BASE_DEC, NULL, 0x0,
11185                         NULL, HFILL }
11186                 },
11187                 { &hf_nfapi_preamble,
11188                         { "Preamble", "nfapi.preamble",
11189                         FT_UINT8, BASE_DEC, NULL, 0x0,
11190                         "The detected preamble", HFILL }
11191                 },
11192                 { &hf_nfapi_rach_resource_type,
11193                         { "RACH resource type", "nfapi.rach.resource.type",
11194                         FT_UINT8, BASE_DEC, VALS(rach_resource_type_vals), 0x0,
11195                         "Indicates if this indication is related to Cat-M UE and in which CE level", HFILL }
11196                 },
11197                 { &hf_nfapi_doppler_estimation,
11198                         { "Doppler estimation", "nfapi.doppler.estimation",
11199                         FT_UINT16, BASE_DEC, NULL, 0x0,
11200                         "FFS", HFILL }
11201                 },
11202                 { &hf_nfapi_rb_start,
11203                         { "RB Start", "nfapi.rb.start",
11204                         FT_UINT8, BASE_DEC, NULL, 0x0,
11205                         "The starting point of the RBs to be reported", HFILL }
11206                 },
11207                 { &hf_nfapi_snr,
11208                         { "SNR", "nfapi.snr",
11209                         FT_UINT8, BASE_CUSTOM, CF_FUNC(ul_cqi_conversion_fn), 0x0,
11210                         "Field size dependent on configured bandwidth SNR for RBs, each RBs report one SNR.", HFILL }
11211                 },
11212                 { &hf_nfapi_up_pts_symbol,
11213                         { "UpPTS Symbol", "nfapi.uppts.symbol",
11214                         FT_UINT8, BASE_DEC, VALS(up_pts_symbol_vals), 0x0,
11215                         "Indicates symbol where SRS was received. Only valid if the SRS was received in subframe 1 or 6.", HFILL }
11216                 },
11217                 { &hf_nfapi_number_prb_per_subband,
11218                         { "numPRBperSubband", "nfapi.num.prb.per.subband",
11219                         FT_UINT8, BASE_DEC, NULL, 0x0,
11220                         "Number of PRBs that are treated as one subband", HFILL }
11221                 },
11222                 { &hf_nfapi_number_antennas,
11223                         { "numAntennas", "nfapi.num.antennas",
11224                         FT_UINT8, BASE_DEC, NULL, 0x0,
11225                         "Number of physical antennas", HFILL }
11226                 },
11227                 { &hf_nfapi_subband_index,
11228                         { "subbandIndex", "nfapi.subband.index",
11229                         FT_UINT8, BASE_DEC, NULL, 0x0,
11230                         "Index of subband for which the following channel coefficient is applied", HFILL }
11231                 },
11232                 { &hf_nfapi_channel_coefficient,
11233                         { "Channel", "nfapi.channel.coefficient",
11234                         FT_UINT16, BASE_DEC, NULL, 0x0,
11235                         "Averaged channel coefficient in a subband for physical antenna #i, real 8 bits followed by imaginary 8 bits", HFILL }
11236                 },
11237                 { &hf_nfapi_ul_rtoa,
11238                         { "UL_RTOA", "nfapi.ul.rtoa",
11239                         FT_UINT16, BASE_DEC, NULL, 0x0,
11240                         "UL relative time of arrival used for network based positioning", HFILL }
11241                 },
11242                 { &hf_nfapi_frequency_band_indicator,
11243                         { "Frequency Band Indicator", "nfapi.frequency.band.indicator",
11244                         FT_UINT16, BASE_DEC, NULL, 0x0,
11245                         "The E-UTRA band for which the carrierList applies.", HFILL }
11246                 },
11247                 { &hf_nfapi_measurement_period,
11248                         { "Measurement Period", "nfapi.measurement.period",
11249                         FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11250                         "The length of time to measure RSSI over, in units of 1ms.", HFILL }
11251                 },
11252                 { &hf_nfapi_bandwidth,
11253                         { "Bandwidth", "nfapi.bandwidth",
11254                         FT_UINT8, BASE_DEC, NULL, 0x0,
11255                         "The bandwidth (in resource blocks) over which the RSSI is measured.", HFILL }
11256                 },
11257                 { &hf_nfapi_timeout,
11258                         { "Timeout", "nfapi.timeout",
11259                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11260                         "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 }
11261                 },
11262                 { &hf_nfapi_number_of_earfcns,
11263                         { "Number of EARFCNs", "nfapi.number.of.earfcns",
11264                         FT_UINT8, BASE_DEC, NULL, 0x0,
11265                         "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 }
11266                 },
11267                 { &hf_nfapi_uarfcn,
11268                         { "UARFCN", "nfapi.uarfcn",
11269                         FT_UINT16, BASE_DEC, NULL, 0x0,
11270                         "UARFCN to be measured.", HFILL }
11271                 },
11272                 { &hf_nfapi_number_of_uarfcns,
11273                         { "Number of UARFCNs", "nfapi.number.of.uarfcn",
11274                         FT_UINT8, BASE_DEC, NULL, 0x0,
11275                         "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 }
11276                 },
11277                 { &hf_nfapi_arfcn,
11278                         { "ARFCN", "nfapi.arfcn",
11279                         FT_UINT16, BASE_DEC, NULL, 0x0,
11280                         "The ARFCN to be measured", HFILL }
11281                 },
11282                 { &hf_nfapi_arfcn_direction,
11283                         { "Direction", "nfapi.arfcn.direction",
11284                         FT_UINT8, BASE_DEC, VALS(arfcn_direction_vals), 0x0,
11285                         "The link direction to be measured", HFILL }
11286                 },
11287                 { &hf_nfapi_number_of_arfcns,
11288                         { "Number of ARFCNs", "nfapi.number.of.arfcn",
11289                         FT_UINT8, BASE_DEC, NULL, 0x0,
11290                         "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 }
11291                 },
11292                 { &hf_nfapi_rssi,
11293                         { "RSSI", "nfapi.rssi",
11294                         FT_INT16, BASE_CUSTOM, CF_FUNC(rssi_conversion_fn), 0x0,
11295                         "The list of RSSI values of the carriers measured, in the order of the list of the original request.", HFILL }
11296                 },
11297                 { &hf_nfapi_number_of_rssi,
11298                         { "Number of RSSI", "nfapi.number.of.rssi",
11299                         FT_UINT16, BASE_DEC, NULL, 0x0,
11300                         "The number of RSSI results returned in the following array.", HFILL }
11301                 },
11302                 { &hf_nfapi_pci,
11303                         { "PCI", "nfapi.pci",
11304                         FT_UINT16, BASE_DEC, NULL, 0x0,
11305                         "The PCI for cell which should be searched", HFILL }
11306                 },
11307                 { &hf_nfapi_measurement_bandwidth,
11308                         { "Measurement Bandwidth", "nfapi.measurement.bandwidth",
11309                         FT_UINT8, BASE_DEC, NULL, 0x0,
11310                         "The number of resource blocks which should be used for measuring RSRP", HFILL }
11311                 },
11312                 { &hf_nfapi_exhaustive_search,
11313                         { "Exhaustive Search", "nfapi.exhaustive.search",
11314                         FT_UINT8, BASE_DEC, VALS(exhustive_search_vals), 0x0,
11315                         "NMM should try to find all cells on the carrier", HFILL }
11316                 },
11317                 { &hf_nfapi_number_of_pci,
11318                         { "Number of PCI", "nfapi.number.of.pci",
11319                         FT_UINT8, BASE_DEC, NULL, 0x0,
11320                         "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 }
11321                 },
11322                 { &hf_nfapi_psc,
11323                         { "PSC", "nfapi.psc",
11324                         FT_UINT16, BASE_DEC, NULL, 0x0,
11325                         "The PSC for cells which should be searched.", HFILL }
11326                 },
11327                 { &hf_nfapi_number_of_psc,
11328                         { "Number of PSC", "nfapi.number.of.psc",
11329                         FT_UINT8, BASE_DEC, NULL, 0x0,
11330                         "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 }
11331                 },
11332                 { &hf_nfapi_rsrp,
11333                         { "RSRP", "nfapi.rsrp",
11334                         FT_UINT8, BASE_CUSTOM, CF_FUNC(neg_pow_conversion_fn), 0x0,
11335                         "The measured RSRP value in units of -1dB", HFILL }
11336                 },
11337                 { &hf_nfapi_rsrq,
11338                         { "RSRQ", "nfapi.rsrq",
11339                         FT_UINT8, BASE_CUSTOM, CF_FUNC(neg_pow_conversion_fn), 0x0,
11340                         "The measured RSRQ value in units of -1dB", HFILL }
11341                 },
11342                 { &hf_nfapi_number_of_lte_cells_found,
11343                         { "Number of LTE Cells Found", "nfapi.number.of.lte.cells.found",
11344                         FT_UINT16, BASE_DEC, NULL, 0x0,
11345                         "The number of LTE cells indicated in this message.", HFILL }
11346                 },
11347                 { &hf_nfapi_rscp,
11348                         { "RSCP", "nfapi.rscp",
11349                         FT_UINT8, BASE_CUSTOM, CF_FUNC(neg_pow_conversion_fn), 0x0,
11350                         "The measured RSCP value in units of -1dB", HFILL }
11351                 },
11352                 { &hf_nfapi_enco,
11353                         { "EcNo", "nfapi.ecno",
11354                         FT_UINT8, BASE_CUSTOM, CF_FUNC(neg_pow_conversion_fn), 0x0,
11355                         "The measured RSCP value in units of -1dB", HFILL }
11356                 },
11357                 { &hf_nfapi_number_of_utran_cells_found,
11358                         { "Number of UTRAN Cells Found", "nfapi.number.of.utran.cells.found",
11359                         FT_UINT16, BASE_DEC, NULL, 0x0,
11360                         "The number of LTE cells indicated in this message", HFILL }
11361                 },
11362                 { &hf_nfapi_bsic,
11363                         { "BSIC", "nfapi.bsic",
11364                         FT_UINT8, BASE_DEC, NULL, 0x0,
11365                         "The BSIC of the cell which the NMM synchronized to", HFILL }
11366                 },
11367                 { &hf_nfapi_rxlev,
11368                         { "RxLev", "nfapi.rxlev",
11369                         FT_UINT8, BASE_DEC, NULL, 0x0,
11370                         "The measured RxLev value", HFILL }
11371                 },
11372                 { &hf_nfapi_rxqual,
11373                         { "RxQual", "nfapi.rxqual",
11374                         FT_UINT8, BASE_DEC, NULL, 0x0,
11375                         "The measured RxQual value", HFILL }
11376                 },
11377                 { &hf_nfapi_sfn_offset,
11378                         { "SFN Offset", "nfapi.sfn.offset",
11379                         FT_UINT32, BASE_DEC, NULL, 0x0,
11380                         "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 }
11381                 },
11382                 { &hf_nfapi_number_of_geran_cells_found,
11383                         { "Number of GSM Cells Found", "nfapi.number.of.geran.cells.found",
11384                         FT_UINT16, BASE_DEC, NULL, 0x0,
11385                         "The number of GSM cells indicated in this message", HFILL }
11386                 },
11387                 { &hf_nfapi_number_of_tx_antenna,
11388                         { "Number of Tx Antenna", "nfapi.number.of.tx.antenna",
11389                         FT_UINT8, BASE_DEC, NULL, 0x0,
11390                         "The number of Tx Antenna detected for the cell", HFILL }
11391                 },
11392                 { &hf_nfapi_mib,
11393                         { "MIB", "nfapi.mib",
11394                         FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
11395                         "The MIB read from the specified cell.", HFILL }
11396                 },
11397                 { &hf_nfapi_phich_configuration,
11398                         { "PHICH Configuration", "nfapi.phich.configuration",
11399                         FT_UINT8, BASE_DEC, NULL, 0x0,
11400                         "The PHICH-Config of the cell", HFILL }
11401                 },
11402                 { &hf_nfapi_retry_count,
11403                         { "retryCount", "nfapi.retry.count",
11404                         FT_UINT8, BASE_DEC, NULL, 0x0,
11405                         "The number of SIB1 repetition periods for which decoding of SIB1 should be retried.", HFILL }
11406                 },
11407                 { &hf_nfapi_sib1,
11408                         { "SIB1", "nfapi.sib1",
11409                         FT_BYTES, BASE_NONE, NULL, 0x0,
11410                         NULL, HFILL }
11411                 },
11412                 { &hf_nfapi_si_periodicity,
11413                         { "SI Periodicity", "nfapi.si.periodicity",
11414                         FT_UINT8, BASE_DEC, NULL, 0x0,
11415                         "The SI Periodicity of the requested SIBs, with the first element being for SIB2, the next for SIB3, etc, encoded as follows", HFILL }
11416                 },
11417                 { &hf_nfapi_si_index,
11418                         { "SI Index", "nfapi.si.index",
11419                         FT_UINT8, BASE_DEC, NULL, 0x0,
11420                         "The Index of this SIB in the SIB1 SchedulingInfoList:", HFILL }
11421                 },
11422                 { &hf_nfapi_number_of_si_periodicity,
11423                         { "Number of SI Periodicity", "nfapi.number.of.si.periodicity",
11424                         FT_UINT8, BASE_DEC, NULL, 0x0,
11425                         "The number of System Information periodicity values in the following array", HFILL }
11426                 },
11427                 { &hf_nfapi_si_window_length,
11428                         { "SI Window Length", "nfapi.si.window.length",
11429                         FT_UINT8, BASE_DEC, NULL, 0x0,
11430                         "The SI window in units of 1ms", HFILL }
11431                 },
11432                 { &hf_nfapi_sib_type,
11433                         { "SIB Type", "nfapi.sib.type",
11434                         FT_UINT8, BASE_DEC, NULL, 0x0,
11435                         "The SIB type", HFILL }
11436                 },
11437                 { &hf_nfapi_sib,
11438                         { "SIB", "nfapi.sib",
11439                         FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
11440                         "The SIB element read from the specified cell.", HFILL }
11441                 },
11442                 { &hf_nfapi_si,
11443                         { "SI", "nfapi.si",
11444                         FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
11445                         "The SI element read from the specified cell.", HFILL }
11446                 },
11447                 { &hf_nfapi_pnf_search_state,
11448                         { "State", "nfapi.state",
11449                         FT_BYTES, BASE_NONE, NULL, 0x0,
11450                         "A structure of opaque data optionally sent by the PNF to the VNF", HFILL }
11451                 },
11452                 { &hf_nfapi_pnf_broadcast_state,
11453                         { "State", "nfapi.state",
11454                         FT_BYTES, BASE_NONE, NULL, 0x0,
11455                         "A structure of opaque data optionally sent by the PNF to the VNF", HFILL }
11456                 },
11457                 { &hf_nfapi_dl_rs_tx_power,
11458                         { "DL RS Tx power", "nfapi.dl.rs.tx.power",
11459                         FT_UINT16, BASE_DEC, NULL, 0x0,
11460                         "The DL RS Tx power measurement", HFILL }
11461                 },
11462                 { &hf_nfapi_received_interference_power,
11463                         { "Received interference power", "nfapi.received.interference.power",
11464                         FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11465                         "The Received interference power measurement", HFILL }
11466                 },
11467                 { &hf_nfapi_thermal_noise_power,
11468                         { "Thermal noise power", "nfapi.thermal.noise.power",
11469                         FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11470                         "The Thermal noise power measurement", HFILL }
11471                 },
11472                 { &hf_nfapi_dl_rs_tx_power_measurement,
11473                         { "DL RS TX Power measurement", "nfapi.dl.rs.tx.power.measurement",
11474                         FT_INT16, BASE_CUSTOM, CF_FUNC(dl_rs_tx_pow_measment_conversion_fn), 0x0,
11475                         "The DL RS Tx power measurement defined", HFILL }
11476                 },
11477                 { &hf_nfapi_received_interference_power_measurement,
11478                         { "Received interference power measurement", "nfapi.received.interference.power.measurement",
11479                         FT_INT16, BASE_CUSTOM, CF_FUNC(dl_rs_tx_pow_measment_conversion_fn), 0x0,
11480                         NULL, HFILL }
11481                 },
11482                 { &hf_nfapi_thermal_noise_power_measurement,
11483                         { "Thermal noise power measurement", "nfapi.thermal.noise.power.measurement",
11484                         FT_INT16, BASE_CUSTOM, CF_FUNC(dl_rs_tx_pow_measment_conversion_fn), 0x0,
11485                         "The Thermal noise power measurement", HFILL }
11486                 },
11487                 { &hf_nfapi_initial_partial_sf,
11488                         { "Initial Partial SF", "nfapi.initial.partial.sf",
11489                         FT_BOOLEAN, 32, TFS(&initial_partial_sf_strname), 0x0,
11490                         "Indicates whether the initial SF in the LBT process is full or partial", HFILL }
11491                 },
11492                 { &hf_nfapi_lbt_mode,
11493                         { "LBT Mode", "nfapi.lbt.mode",
11494                         FT_BOOLEAN, 32, TFS(&lbt_mode_strname), 0x0,
11495                         "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 }
11496                 },
11497                 { &hf_nfapi_lte_txop_sf,
11498                         { "LTE TXOP SF", "nfapi.txop.sf",
11499                         FT_UINT32, BASE_DEC, NULL, 0x0,
11500                         "Indicates the LTE TXOP (TMCOT,P in [9] section 15.1.1) duration in subframes.", HFILL }
11501                 },
11502                 { &hf_nfapi_mp_cca,
11503                         { "mp cca", "nfapi.mp.cca",
11504                         FT_UINT32, BASE_DEC, NULL, 0x0,
11505                         "Indicates the value of the defer factor", HFILL }
11506                 },
11507                 { &hf_nfapi_n_cca,
11508                         { "n cca", "nfapi.n.cca",
11509                         FT_UINT32, BASE_DEC, NULL, 0x0,
11510                         "Indicates the value of LBT backoff counter", HFILL }
11511                 },
11512                 { &hf_nfapi_offset,
11513                         { "offset", "nfapi.offset",
11514                         FT_UINT32, BASE_DEC, NULL, 0x0,
11515                         "Indicates the LBT start time in microseconds from the beginning of the subframe scheduled by this message.", HFILL }
11516                 },
11517                 { &hf_nfapi_result,
11518                         { "result", "nfapi.result",
11519                         FT_BOOLEAN, 32, TFS(&tfs_fail_success), 0x0,
11520                         "Indicates the LBT procedure result of SFN/SF:", HFILL }
11521                 },
11522                 { &hf_nfapi_sfn_sf_end,
11523                         { "SFN/SF End", "nfapi.sfn.sf.end",
11524                         FT_UINT16, BASE_DEC, NULL, 0x0,
11525                         "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 }
11526                 },
11527                 { &hf_nfapi_txop_sfn_sf_end,
11528                         { "TXOP SFN/SF End", "nfapi.txop.sfn.sf.end",
11529                         FT_UINT16, BASE_DEC, NULL, 0x0,
11530                         "Indicates the SFN/SF by which the TXOP must end. In worst case, this would be the last TXOP subframe.", HFILL }
11531                 },
11532                 { &hf_nfapi_txop_symbols,
11533                         { "LTE TXOP symbols", "nfapi.lte.txop.symbols",
11534                         FT_UINT32, BASE_DEC, NULL, 0x0,
11535                         "Actual LTE TXOP in symbols", HFILL }
11536                 },
11537         };
11538
11539         /* Setup protocol subtree array */
11540         static gint *ett[] =
11541         {
11542                 &ett_nfapi,
11543                 &ett_nfapi_p4_p5_message_header,
11544                 &ett_nfapi_p7_message_header,
11545                 &ett_nfapi_tlv_tree,
11546                 &ett_nfapi_tl,
11547                 &ett_nfapi_pnf_phy_rf_config,
11548                 &ett_nfapi_pnf_phy,
11549                 &ett_nfapi_pnf_phy_rel10,
11550                 &ett_nfapi_pnf_phy_rel11,
11551                 &ett_nfapi_pnf_phy_rel12,
11552                 &ett_nfapi_pnf_phy_rel13,
11553                 &ett_nfapi_rf_bands,
11554                 &ett_nfapi_bf_vectors,
11555                 &ett_nfapi_csi_rs_bf_vector,
11556                 &ett_nfapi_csi_rs_resource_configs,
11557                 &ett_nfapi_tx_antenna_ports,
11558                 &ett_nfapi_harq_ack_nack_data,
11559                 &ett_nfapi_harq_data,
11560                 &ett_nfapi_cc,
11561                 &ett_nfapi_rbs,
11562                 &ett_nfapi_antennas,
11563                 &ett_nfapi_epdcch_prbs,
11564                 &ett_nfapi_dl_config_request_pdu_list,
11565                 &ett_nfapi_ul_config_request_pdu_list,
11566                 &ett_nfapi_hi_dci0_request_pdu_list,
11567                 &ett_nfapi_tx_request_pdu_list,
11568                 &ett_nfapi_rx_indication_pdu_list,
11569                 &ett_nfapi_harq_indication_pdu_list,
11570                 &ett_nfapi_crc_indication_pdu_list,
11571                 &ett_nfapi_sr_indication_pdu_list,
11572                 &ett_nfapi_cqi_indication_pdu_list,
11573                 &ett_nfapi_preamble_indication_pdu_list,
11574                 &ett_nfapi_srs_indication_pdu_list,
11575                 &ett_nfapi_lbt_dl_config_pdu_list,
11576                 &ett_nfapi_lbt_dl_indication_pdu_list,
11577                 &ett_nfapi_subbands,
11578                 &ett_nfapi_precoding,
11579                 &ett_nfapi_bf_vector_antennas,
11580                 &ett_nfapi_received_interference_power_mesurement_results,
11581                 &ett_nfapi_downlink_bandwidth_support,
11582                 &ett_nfapi_uplink_bandwidth_support,
11583                 &ett_nfapi_release_support,
11584                 &ett_nfapi_downlink_modulation_support,
11585                 &ett_nfapi_uplink_modulation_support,
11586
11587                 &ett_nfapi_earfcn_list,
11588                 &ett_nfapi_uarfcn_list,
11589                 &ett_nfapi_arfcn_list,
11590                 &ett_nfapi_rssi_list,
11591                 &ett_nfapi_pci_list,
11592                 &ett_nfapi_psc_list,
11593                 &ett_nfapi_lte_cells_found_list,
11594                 &ett_nfapi_utran_cells_found_list,
11595                 &ett_nfapi_geran_cells_found_list,
11596                 &ett_nfapi_si_periodicity_list,
11597
11598                 /* for fragmentation support*/
11599                 &ett_msg_fragment,
11600                 &ett_msg_fragments
11601         };
11602
11603         static ei_register_info ei[] =
11604         {
11605                 { &ei_invalid_range, { "nfapi.invalid.range", PI_PROTOCOL, PI_WARN, "Invalid range", EXPFILL } },
11606                 { &ei_invalid_tlv_length, { "nfapi.invalid.tlv.length", PI_PROTOCOL, PI_ERROR, "Invalid TLV length", EXPFILL } },
11607         };
11608
11609         expert_module_t* expert_nfapi;
11610         /* Register protocol */
11611         proto_nfapi = proto_register_protocol("Nfapi", "NFAPI", "nfapi");
11612
11613         expert_nfapi = expert_register_protocol(proto_nfapi);
11614         expert_register_field_array(expert_nfapi, ei, array_length(ei));
11615
11616
11617         proto_register_field_array(proto_nfapi, hf, array_length(hf));
11618         proto_register_subtree_array(ett, array_length(ett));
11619
11620         message_table = register_dissector_table("nfapi.msg_id", "NFAPI Message ID", proto_nfapi, FT_UINT16, BASE_DEC);
11621
11622         reassembly_table_register(&ul_p7_reassemble_table, &addresses_ports_reassembly_table_functions);
11623         reassembly_table_register(&dl_p7_reassemble_table, &addresses_ports_reassembly_table_functions);
11624
11625         nfapi_handle = register_dissector("nfapi", dissect_nfapi, proto_nfapi);
11626
11627 }
11628
11629 // ----------------------------------------------------------------------------|
11630
11631 void proto_reg_handoff_nfapi(void)
11632 {
11633         dissector_handle_t handle;
11634
11635         handle = create_dissector_handle( dissect_nfapi_ul_p7, -1 );
11636         dissector_add_uint("nfapi.msg_id", NFAPI_HARQ_INDICATION_MSG_ID, handle);
11637         dissector_add_uint("nfapi.msg_id", NFAPI_CRC_INDICATION_MSG_ID, handle);
11638         dissector_add_uint("nfapi.msg_id", NFAPI_RX_ULSCH_INDICATION_MSG_ID, handle);
11639         dissector_add_uint("nfapi.msg_id", NFAPI_RACH_INDICATION_MSG_ID, handle);
11640         dissector_add_uint("nfapi.msg_id", NFAPI_SRS_INDICATION_MSG_ID, handle);
11641         dissector_add_uint("nfapi.msg_id", NFAPI_RX_SR_INDICATION_MSG_ID, handle);
11642         dissector_add_uint("nfapi.msg_id", NFAPI_RX_CQI_INDICATION_MSG_ID, handle);
11643
11644         handle = create_dissector_handle( dissect_nfapi_dl_p7, -1 );
11645         dissector_add_uint("nfapi.msg_id", NFAPI_DL_CONFIG_REQUEST_MSG_ID, handle);
11646         dissector_add_uint("nfapi.msg_id", NFAPI_UL_CONFIG_REQUEST_MSG_ID, handle);
11647         dissector_add_uint("nfapi.msg_id", NFAPI_HI_DCI0_REQUEST_MSG_ID, handle);
11648         dissector_add_uint("nfapi.msg_id", NFAPI_TX_REQUEST_MSG_ID, handle);
11649         dissector_add_uint("nfapi.msg_id", NFAPI_LBT_DL_CONFIG_REQUEST_MSG_ID, handle);
11650         dissector_add_uint("nfapi.msg_id", NFAPI_LBT_DL_INDICATION_MSG_ID, handle);
11651
11652         handle = create_dissector_handle( dissect_p45_header, -1 );
11653         dissector_add_uint("nfapi.msg_id", NFAPI_PNF_START_REQUEST_MSG_ID, handle);
11654         dissector_add_uint("nfapi.msg_id", NFAPI_PNF_STOP_REQUEST_MSG_ID, handle);
11655         dissector_add_uint("nfapi.msg_id", NFAPI_PARAM_REQUEST_MSG_ID, handle);
11656         dissector_add_uint("nfapi.msg_id", NFAPI_START_REQUEST_MSG_ID, handle);
11657         dissector_add_uint("nfapi.msg_id", NFAPI_STOP_REQUEST_MSG_ID, handle);
11658         dissector_add_uint("nfapi.msg_id", NFAPI_NMM_STOP_REQUEST_MSG_ID, handle);
11659
11660         handle = create_dissector_handle( dissect_p45_header_with_list, -1 );
11661         dissector_add_uint("nfapi.msg_id", NFAPI_PNF_PARAM_REQUEST_MSG_ID, handle);
11662         dissector_add_uint("nfapi.msg_id", NFAPI_PNF_CONFIG_REQUEST_MSG_ID, handle);
11663         dissector_add_uint("nfapi.msg_id", NFAPI_MEASUREMENT_REQUEST_MSG_ID, handle);
11664
11665         handle = create_dissector_handle( dissect_p45_header_with_error, -1 );
11666         dissector_add_uint("nfapi.msg_id", NFAPI_PNF_CONFIG_RESPONSE_MSG_ID, handle);
11667         dissector_add_uint("nfapi.msg_id", NFAPI_PNF_START_RESPONSE_MSG_ID, handle);
11668         dissector_add_uint("nfapi.msg_id", NFAPI_PNF_STOP_RESPONSE_MSG_ID, handle);
11669         dissector_add_uint("nfapi.msg_id", NFAPI_CONFIG_RESPONSE_MSG_ID, handle);
11670         dissector_add_uint("nfapi.msg_id", NFAPI_START_RESPONSE_MSG_ID, handle);
11671         dissector_add_uint("nfapi.msg_id", NFAPI_STOP_RESPONSE_MSG_ID, handle);
11672
11673         handle = create_dissector_handle( dissect_p45_header_with_p4_error, -1 );
11674         dissector_add_uint("nfapi.msg_id", NFAPI_RSSI_RESPONSE_MSG_ID, handle);
11675         dissector_add_uint("nfapi.msg_id", NFAPI_CELL_SEARCH_RESPONSE_MSG_ID, handle);
11676         dissector_add_uint("nfapi.msg_id", NFAPI_BROADCAST_DETECT_RESPONSE_MSG_ID, handle);
11677         dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_SCHEDULE_RESPONSE_MSG_ID, handle);
11678         dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_RESPONSE_MSG_ID, handle);
11679         dissector_add_uint("nfapi.msg_id", NFAPI_NMM_STOP_RESPONSE_MSG_ID, handle);
11680
11681         handle = create_dissector_handle( dissect_p45_header_with_error_and_list, -1 );
11682         dissector_add_uint("nfapi.msg_id", NFAPI_PNF_PARAM_RESPONSE_MSG_ID, handle);
11683         dissector_add_uint("nfapi.msg_id", NFAPI_CONFIG_REQUEST_MSG_ID, handle);
11684         dissector_add_uint("nfapi.msg_id", NFAPI_MEASUREMENT_RESPONSE_MSG_ID, handle);
11685
11686         handle = create_dissector_handle( dissect_p45_header_with_p4_error_and_list, -1 );
11687         dissector_add_uint("nfapi.msg_id", NFAPI_RSSI_INDICATION_MSG_ID, handle);
11688         dissector_add_uint("nfapi.msg_id", NFAPI_CELL_SEARCH_INDICATION_MSG_ID, handle);
11689         dissector_add_uint("nfapi.msg_id", NFAPI_BROADCAST_DETECT_INDICATION_MSG_ID, handle);
11690         dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_SCHEDULE_INDICATION_MSG_ID, handle);
11691         dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_INDICATION_MSG_ID, handle);
11692
11693         handle = create_dissector_handle( dissect_p45_header_with_rat_type_list, -1 );
11694         dissector_add_uint("nfapi.msg_id", NFAPI_RSSI_REQUEST_MSG_ID, handle);
11695         dissector_add_uint("nfapi.msg_id", NFAPI_CELL_SEARCH_REQUEST_MSG_ID, handle);
11696         dissector_add_uint("nfapi.msg_id", NFAPI_BROADCAST_DETECT_REQUEST_MSG_ID, handle);
11697         dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_SCHEDULE_REQUEST_MSG_ID, handle);
11698         dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_REQUEST_MSG_ID, handle);
11699
11700         dissector_add_uint("nfapi.msg_id", NFAPI_PARAM_RESPONSE_MSG_ID, create_dissector_handle( dissect_p45_param_response_msg_id, -1 ));
11701         dissector_add_uint("nfapi.msg_id", NFAPI_DL_NODE_SYNC_MSG_ID, create_dissector_handle( dissect_p7_dl_node_sync_msg_id, -1 ));
11702         dissector_add_uint("nfapi.msg_id", NFAPI_UL_NODE_SYNC_MSG_ID, create_dissector_handle( dissect_p7_ul_node_sync_msg_id, -1 ));
11703         dissector_add_uint("nfapi.msg_id", NFAPI_TIMING_INFO_MSG_ID, create_dissector_handle( dissect_p7_timing_info_msg_id, -1 ));
11704
11705         dissector_add_for_decode_as("sctp.port", nfapi_handle);
11706         dissector_add_for_decode_as("udp.port", nfapi_handle);
11707 }
11708
11709
11710 /*
11711 * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
11712 *
11713 * Local variables:
11714 * c-basic-offset: 8
11715 * tab-width: 8
11716 * indent-tabs-mode: t
11717 * End:
11718 *
11719 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
11720 * :indentSize=8:tabSize=8:noTabs=false:
11721 */