Correct duplicate values for csi_rs_class_vals
[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 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
22 *
23 * References:
24 * SCF082.09.04  http://scf.io/en/documents/082_-_nFAPI_and_FAPI_specifications.php
25 *
26 */
27
28 #include "config.h"
29
30 #include <epan/packet.h>
31 #include <epan/exceptions.h>
32 #include <epan/expert.h>
33 #include <epan/reassemble.h>
34 #include <epan/wmem/wmem.h>
35
36 #include <ptvcursor.h>
37
38 void proto_register_nfapi(void);
39 void proto_reg_handoff_nfapi(void);
40
41 #define NFAPI_HEADER_LENGTH 8
42 #define NFAPI_P7_HEADER_LENGTH 16
43
44 static const unit_name_string khz_100_units_db = { " (100)khz", NULL };
45
46 typedef enum{
47         NFAPI_DL_CONFIG_REQUEST_MSG_ID = 0x0080,
48         NFAPI_UL_CONFIG_REQUEST_MSG_ID,
49         NFAPI_SUBFRAME_INDICATION_MSG_ID,
50         NFAPI_HI_DCI0_REQUEST_MSG_ID,
51         NFAPI_TX_REQUEST_MSG_ID,
52         NFAPI_HARQ_INDICATION_MSG_ID,
53         NFAPI_CRC_INDICATION_MSG_ID,
54         NFAPI_RX_ULSCH_INDICATION_MSG_ID,
55         NFAPI_RACH_INDICATION_MSG_ID,
56         NFAPI_SRS_INDICATION_MSG_ID,
57         NFAPI_RX_SR_INDICATION_MSG_ID,
58         NFAPI_RX_CQI_INDICATION_MSG_ID,
59         NFAPI_LBT_DL_CONFIG_REQUEST_MSG_ID,
60         NFAPI_LBT_DL_INDICATION_MSG_ID,
61
62         NFAPI_PNF_PARAM_REQUEST_MSG_ID = 0x0100,
63         NFAPI_PNF_PARAM_RESPONSE_MSG_ID,
64         NFAPI_PNF_CONFIG_REQUEST_MSG_ID,
65         NFAPI_PNF_CONFIG_RESPONSE_MSG_ID,
66         NFAPI_PNF_START_REQUEST_MSG_ID,
67         NFAPI_PNF_START_RESPONSE_MSG_ID,
68         NFAPI_PNF_STOP_REQUEST_MSG_ID,
69         NFAPI_PNF_STOP_RESPONSE_MSG_ID,
70         NFAPI_PARAM_REQUEST_MSG_ID,
71         NFAPI_PARAM_RESPONSE_MSG_ID,
72         NFAPI_CONFIG_REQUEST_MSG_ID,
73         NFAPI_CONFIG_RESPONSE_MSG_ID,
74         NFAPI_START_REQUEST_MSG_ID,
75         NFAPI_START_RESPONSE_MSG_ID,
76         NFAPI_STOP_REQUEST_MSG_ID,
77         NFAPI_STOP_RESPONSE_MSG_ID,
78         NFAPI_MEASUREMENT_REQUEST_MSG_ID,
79         NFAPI_MEASUREMENT_RESPONSE_MSG_ID,
80
81         NFAPI_DL_NODE_SYNC_MSG_ID = 0x0180,
82         NFAPI_UL_NODE_SYNC_MSG_ID,
83         NFAPI_TIMING_INFO_MSG_ID,
84
85         NFAPI_RSSI_REQUEST_MSG_ID = 0x0200,
86         NFAPI_RSSI_RESPONSE_MSG_ID,
87         NFAPI_RSSI_INDICATION_MSG_ID,
88         NFAPI_CELL_SEARCH_REQUEST_MSG_ID,
89         NFAPI_CELL_SEARCH_RESPONSE_MSG_ID,
90         NFAPI_CELL_SEARCH_INDICATION_MSG_ID,
91         NFAPI_BROADCAST_DETECT_REQUEST_MSG_ID,
92         NFAPI_BROADCAST_DETECT_RESPONSE_MSG_ID,
93         NFAPI_BROADCAST_DETECT_INDICATION_MSG_ID,
94         NFAPI_SYSTEM_INFORMATION_SCHEDULE_REQUEST_MSG_ID,
95         NFAPI_SYSTEM_INFORMATION_SCHEDULE_RESPONSE_MSG_ID,
96         NFAPI_SYSTEM_INFORMATION_SCHEDULE_INDICATION_MSG_ID,
97         NFAPI_SYSTEM_INFORMATION_REQUEST_MSG_ID,
98         NFAPI_SYSTEM_INFORMATION_RESPONSE_MSG_ID,
99         NFAPI_SYSTEM_INFORMATION_INDICATION_MSG_ID,
100         NFAPI_NMM_STOP_REQUEST_MSG_ID,
101         NFAPI_NMM_STOP_RESPONSE_MSG_ID,
102 } nfapi_message_id_e;
103
104 static const value_string nfapi_error_vals[] = {
105         { 0x0, "MSG_OK" },
106         { 0x1, "MSG_INVALID_STATE" },
107         { 0x2, "MSG_INVALID_CONFIG" },
108         { 0x3, "SFN_OUT_OF_SYNC" },
109         { 0x4, "MSG_SUBFRAME_ERR" },
110         { 0x5, "MSG_BCH_MISSING" },
111         { 0x6, "MSG_BCH_MISSING" },
112         { 0x7, "MSG_HI_ERR" },
113         { 0x8, "MSG_TX_ERR" },
114         { 0, NULL },
115 };
116
117 static const value_string nfapi_p4_error_vals[] = {
118         { 100, "MSG_OK" },
119         { 101, "MSG_INVALID_STATE" },
120         { 102, "MSG_INVALID_CONFIG" },
121         { 103, "MSG_RAT_NOT_SUPPORTED" },
122         { 200, "MSG_NMM_STOP_OK" },
123         { 201, "MSG_NMM_STOP_IGNORED" },
124         { 202, "MSG_NMM_STOP_INVALID_STATE" },
125         { 300, "MSG_PROCEDURE_COMPLETE" },
126         { 301, "MSG_PROCEDURE_STOPPED" },
127         { 302, "MSG_PARTIAL_RESULTS" },
128         { 303, "MSG_TIMEOUT" },
129         { 0, NULL },
130 };
131
132 static const value_string nfapi_rat_type_vals[] = {
133         { 0, "LTE" },
134         { 1, "UTRAN" },
135         { 2, "GERAN" },
136         { 0, NULL },
137 };
138
139 typedef enum{
140         UN_ALIGNED_SYNCHRONIZATION = 0,
141         INTERNAL_PNF_FRAME_ALIGNMENT,
142         ABSOLUTE_TIME_ALIGNED_SYNCHRONIZATION
143 } nfapi_sync_mode_e;
144
145 static const value_string nfapi_sync_mode_vals[] = {
146         { UN_ALIGNED_SYNCHRONIZATION, "UN-ALIGNED SYNCHRONIZATION" },
147         { INTERNAL_PNF_FRAME_ALIGNMENT, "INTERNAL PNF FRAME ALIGNMENT" },
148         { ABSOLUTE_TIME_ALIGNED_SYNCHRONIZATION, "ABSOLUTE TIME ALIGNED SYNCHRONIZATION" },
149         { 0, NULL },
150 };
151
152 typedef enum {
153         NONE = 0,
154         GPS,
155         GLONASS,
156         BEIDOU
157 } location_mode_e;
158
159 static const value_string location_mode_vals[] = {
160         { NONE, "NONE" },
161         { GPS, "GPS" },
162         { GLONASS, "GLONASS" },
163         { BEIDOU, "BeiDou" },
164         { 0, NULL }
165 };
166
167 static const value_string nfapi_uplink_rs_hopping_vals[] = {
168         { 0, "RS_NO_HOPPING" },
169         { 1, "RS_GROUP_HOPPING" },
170         { 2, "RS_SEQUENCE_HOPPING" },
171         { 0, NULL }
172 };
173
174 static const value_string nfapi_laa_carrier_type_vals[] = {
175         { 0, "No multi carrier support" },
176         { 1, "Mode A1" },
177         { 2, "Mode A12" },
178         { 3, "Mode B1" },
179         { 4, "Mode B2" },
180         { 0, NULL }
181 };
182
183 static const value_string nfapi_mutli_carrier_lbt_support_vals[] = {
184         { 0, "Multi carrier Mode A1" },
185         { 1, "Multi carrier Mode A2" },
186         { 2, "Multi carrier Mode B1" },
187         { 3, "Multi carrier Mode B2" },
188         { 0, NULL }
189 };
190
191 static const value_string nfapi_lbt_dl_req_pdu_type[] = {
192         { 0, "LBT_PDSCH_REQ PDU" },
193         { 1, "LBT_DRS_REQ PDU" },
194         { 0, NULL }
195 };
196
197
198 static const value_string nfapi_lbt_dl_ind_pdu_type[] = {
199         { 0, "LBT_PDSCH_RSP PDU" },
200         { 1, "LBT_DRS_RSP PDU" },
201         { 0, NULL }
202 };
203
204 static const value_string nfapi_phy_state_vals[] = {
205         { 0, "IDLE" },
206         { 1, "CONFIGURED" },
207         { 2, "RUNNING" },
208         { 0, NULL },
209 };
210
211
212 /* These are definitions where data 0 & 1 represent/provide a string name*/
213 static const true_false_string  nfapi_csi_report_type_strname = {
214         "Periodic",
215         "Aperiodic",
216 };
217
218 static const true_false_string nfapi_control_type_string_name = {
219         "CQI/PMI",
220         "RI",
221 };
222
223 static const true_false_string cyclic_prefix_type_strname = {
224         "CP_NORMAL",
225         "CP_EXTENDED"
226 };
227
228 static const true_false_string support_strname = {
229         "No Support",
230         "Support"
231 };
232
233 static const true_false_string partial_sf_support_strname =
234 {
235         "Start partial SF support",
236         "End partial SF support"
237 };
238
239 static const true_false_string phich_duration_strname = {
240         "PHICH_D_NORMAL",
241         "PHICH_D_EXTENDED"
242 };
243
244 static const true_false_string high_speed_flag_strname = {
245         "HS_UNRESTRICTED_SET",
246         "HS_RESTRICTED_SET"
247 };
248
249 static const true_false_string hopping_mode_strname = {
250         "HM_INTER_SF",
251         "HM_INTRA_INTER_SF"
252 };
253
254 static const true_false_string srs_simult_tx_strname = {
255         "No Simultaneous Transmission",
256         "Simultaneous Transmission"
257 };
258
259 static const true_false_string crc_flag_strname = {
260         "CRC_CORRECT",
261         "CRC_ERROR"
262 };
263
264 static const true_false_string hi_value_strname = {
265         "HI_NACK",
266         "HI_ACK"
267 };
268
269 static const true_false_string flag_tb2_strname = {
270         "HI_NOT_PRESENT",
271         "HI_PRESENT"
272 };
273
274 static const true_false_string nfapi_multi_carrier_tx_strname = {
275         "Mutual transmission (self-deferral support for current carrier)",
276         "Transmit on channel access win (no self-deferral)"
277 };
278
279 static const true_false_string nfapi_multi_carrier_freeze_strname = {
280         "Absence of other technology is not guaranteed",
281         "Absence of other technology is guaranteed"
282 };
283
284 static const true_false_string initial_partial_sf_strname = {
285         "Full SF",
286         "Partial SF"
287 };
288
289 static const true_false_string lbt_mode_strname = {
290         "Full LBT",
291         "Partial LBT"
292 };
293
294 static const true_false_string data_report_mode_vals = {
295         "Crc reported in CRC.indication",
296         "Crc reported in RX.indication"
297 };
298
299 static const true_false_string mcch_flag_string_name = {
300         "MCCH or SC-MCCH change notification field is not valid",
301         "MCCH or SC-MCCH change notification field is valid"
302 };
303
304 static const true_false_string cross_carrier_scheduling_flag_strname = {
305         "Carrier indicator field is not valid",
306         "Carrier indicator field is valid"
307 };
308
309 static const true_false_string srs_flag_strname = {
310         "SRS request field is not valid",
311         "SRS request field is valid"
312 };
313 static const true_false_string srs_request_strname = {
314         "SRS not requested",
315         "SRS requested"
316 };
317
318 static const true_false_string ul_dl_configuration_flag_strname = {
319         "UL/DL configuration field is not valid",
320         "UL/DL configuration field is valid"
321 };
322
323 static const true_false_string prs_cyclic_prefix_type_strname = {
324         "normal cyclic prefix",
325         "extended cyclic prefix"
326 };
327
328 static const true_false_string prs_muting_strname = {
329         "no muting",
330         "muting"
331 };
332
333
334 static const value_string nfapi_dl_config_pdu_type_vals[] = {
335         { 0, "DL_CONFIG_DCI_DL_PDU" },
336         { 1, "DL_CONFIG_BCH_PDU" },
337         { 2, "DL_CONFIG_MCH_PDU" },
338         { 3, "DL_CONFIG_DLSCH_PDU" },
339         { 4, "DL_CONFIG_PCH_PDU" },
340         { 5, "DL_CONFIG_PRS_PDU" },
341         { 6, "DL_CONFIG_CSI_RS_PDU" },
342         { 7, "DL_CONFIG_EPDCCH_DL_PDU" },
343         { 8, "DL_CONFIG_EPDCCH_DL_PDU" },
344         { 0, NULL }
345 };
346
347 static const value_string nfapi_duplex_mode_vals[] = {
348         { 0, "TDD" },
349         { 1, "FDD" },
350         { 2, "HD-FDD" },
351         { 0, NULL }
352 };
353
354 static const value_string modulation_vals[] = {
355         { 2, "QPSK" },
356         { 4, "16QAM" },
357         { 6, "64QAM" },
358         { 8, "256QAM" },
359         { 0, NULL }
360 };
361
362 static const value_string pch_modulation_vals[] = {
363         { 0, "QPSK" },
364         { 0, NULL }
365 };
366
367 static const value_string ue_mode_vals[] = {
368         { 0, "non LC/CE UE" },
369         { 1, "LC/CE UE" },
370         { 0, NULL }
371 };
372
373 static const value_string csi_rs_class_vals[] = {
374         { 0, "not used" },
375         { 1, "Class A" },
376         { 2, "Class B" },
377         { 0, NULL }
378 };
379
380 static const value_string csi_rs_cdm_type_vals[] = {
381         { 0, "cdm 2" },
382         { 1, "cdm 4" },
383         { 0, NULL }
384 };
385
386 static const value_string antenna_ports_vals[] = {
387         { 0, "1 antenna ports" },
388         { 1, "2 antenna ports" },
389         { 2, "4 antenna ports" },
390         { 0, NULL }
391 };
392
393 static const value_string combs_vals[] = {
394         { 0, "2 TC" },
395         { 1, "4 TC" },
396         { 0, NULL }
397 };
398
399 static const value_string resource_allocation_type_vals[] = {
400         { 0, "type 0" },
401         { 1, "type 1" },
402         { 2, "type 2 1A/1B/1D" },
403         { 3, "type 2 1C" },
404         { 4, "type 2 6-1A" },
405         { 5, "type UEModeB" },
406         { 6, "NB index" },
407         { 0, NULL }
408 };
409
410 static const value_string transmission_scheme_vals[] = {
411         { 0, "SINGLE_ANTENNA_PORT_0" },
412         { 1, "TX_DIVERSITY" },
413         { 2, "LARGE_DELAY_CDD" },
414         { 3, "CLOSED_LOOP_SPATIAL_MULTIPLEXING" },
415         { 4, "MULTI_USER_MIMO" },
416         { 5, "CLOSED_LOOP_RANK_1_PRECODING" },
417         { 6, "SINGLE_ANTENNA_PORT_5" },
418         { 7, "SINGLE_ANTENNA_PORT_7" },
419         { 8, "SINGLE_ANTENNA_PORT_8" },
420         { 9, "DUAL_LAYER_TX_PORT_7_AND_8" },
421         { 10, "UP_TO_8_LAYER_TX" },
422         { 11, "SINGLE_ANTENNA_PORT_11" },
423         { 12, "SINGLE_ANTENNA_PORT_13" },
424         { 13, "DUAL_LAYER_TX_PORT_11_13" },
425         { 0, NULL }
426 };
427
428 static const value_string ul_transmission_scheme_vals[] = {
429         { 0, "SINGLE_ANTENNA_PORT_10" },
430         { 1, "CLOSED_LOOP_SPATIAL_MULTIPLEXING" },
431         { 0, NULL },
432 };
433
434 static const value_string dl_dci_format_vals[] = {
435         { 0, "1" },
436         { 1, "1A" },
437         { 2, "1B" },
438         { 3, "1C" },
439         { 4, "1D" },
440         { 5, "2" },
441         { 6, "2A" },
442         { 7, "2B" },
443         { 8, "2C" },
444         { 9, "2D" },
445         { 10, "6-1A" },
446         { 11, "6-1B" },
447         { 12, "6-2" },
448         { 0, NULL }
449 };
450
451 static const value_string ul_dci_format_vals[] = {
452         { 0, "0" },
453         { 1, "3" },
454         { 2, "3A" },
455         { 3, "4" },
456         { 4, "5" },
457         { 0, NULL }
458 };
459
460 static const value_string mpdcch_ul_dci_format_vals[] = {
461         { 1, "3" },
462         { 2, "3A" },
463         { 4, "6-0A" },
464         { 5, "6-0B" },
465         { 0, NULL }
466 };
467
468
469 static const value_string pa_vals[] = {
470         { 0, "-6dB" },
471         { 1, "-4.77dB" },
472         { 2, "-3dB" },
473         { 3, "-1.77dB" },
474         { 4, "0dB" },
475         { 5, "1dB" },
476         { 6, "2dB" },
477         { 7, "3dB" },
478         { 0, NULL }
479 };
480
481 static const value_string transmission_mode_vals[] = {
482         { 1, "Mode 1" },
483         { 2, "Mode 2" },
484         { 3, "Mode 3" },
485         { 4, "Mode 4" },
486         { 5, "Mode 5" },
487         { 6, "Mode 6" },
488         { 7, "Mode 7" },
489         { 8, "Mode 8" },
490         { 9, "Mode 9" },
491         { 10, "Mode 10" },
492         { 0, NULL }
493 };
494
495 static const value_string nfapi_ul_config_pdu_type_vals[] = {
496         { 0, "ULSCH" },
497         { 1, "ULSCH_CQI_RI" },
498         { 2, "ULSCH_HARQ" },
499         { 3, "ULSCH_CQI_HARQ_RI" },
500         { 4, "UCI_CQI" },
501         { 5, "UCI_SR" },
502         { 6, "UCI_HARQ" },
503         { 7, "UCI_SR_HARQ" },
504         { 8, "UCI_CQI_HARQ" },
505         { 9, "UCI_CQI_SR" },
506         { 10, "UCI_CQI_SR_HARQ" },
507         { 11, "SRS" },
508         { 12, "HARQ_BUFFER" },
509         { 13, "ULSCH_UCI_CSI" },
510         { 14, "ULSCH_UCI_HARQ" },
511         { 15, "ULSCH_CSI_UCI_HARQ" },
512         { 0, NULL }
513 };
514
515 static const value_string nfapi_tdd_ack_nack_mode_vals[] = {
516         { 0, "Bundling" },
517         { 1, "Multiplexing" },
518         { 2, "Format 1b with channel selection" },
519         { 3, "Format 3" },
520         { 4, "Format 4" },
521         { 5, "Format 5" },
522         { 0, NULL }
523 };
524 static const value_string nfapi_fdd_ack_nack_mode_vals[] = {
525         { 0, "Format 1a/1b" },
526         { 1, "Channel selection" },
527         { 2, "Format 3" },
528         { 3, "Format 4" },
529         { 4, "Format 5" },
530         { 0, NULL }
531 };
532
533 static const value_string nfapi_phich_resource_vals[] = {
534         { 0, "PHICH_R_ONE_SIXTH " },
535         { 1, "PHICH_R_HALF" },
536         { 2, "PHICH_R_ONE" },
537         { 3, "PHICH_R_TWO" },
538         { 0, NULL }
539 };
540
541 static const value_string local_distributed_vals[] = {
542         { 0, "localized" },
543         { 1, "distributed" },
544         { 0, NULL }
545 };
546
547 static const value_string transport_block_to_codeword_swap_flag_vals[] = {
548         { 0, "no swapping" },
549         { 1, "swapped" },
550         { 0, NULL }
551 };
552
553 static const value_string ngap_vals[] = {
554         { 0, "Ngap1" },
555         { 1, "Ngap2" },
556         { 0, NULL }
557 };
558
559 static const value_string pmi_vals[] = {
560         { 0, "Use precoding indicated in TPMI field" },
561         { 1, "Use precoding indicated in last PMI report on PUSCH" },
562         { 2, "use precoding indicated in TPM field" },
563         { 0, NULL }
564 };
565
566 static const value_string true_false_vals[] = {
567         { 0, "false" },
568         { 1, "true" },
569         { 0, NULL }
570 };
571
572 static const value_string exhustive_search_vals[] = {
573         { 0, "non-exhaustive search" },
574         { 1, "exhaustive search" },
575         { 0, NULL }
576 };
577
578 static const value_string not_used_enabled_vals[] = {
579         { 0, "not used" },
580         { 1, "enabled" },
581         { 0, NULL }
582 };
583
584 static const value_string hopping_vals[] = {
585         { 0, "no hopping" },
586         { 1, "hopping enabled" },
587         { 0, NULL }
588 };
589
590
591 static const value_string mpdcch_rnti_type_vals[] = {
592         { 1, "Temporary C-RNTI" },
593         { 2, "RA-RNTI" },
594         { 3, "P-RNTI" },
595         { 4, "other" },
596         { 0, NULL }
597 };
598
599 static const value_string rnti_type_vals[] = {
600         { 1, "C-RNTI" },
601         { 2, "RA-RNTI, P-RNTI, SI-RNTI, SC-RNTI, G-RNTI" },
602         { 3, "SPS-CRNTI" },
603         { 0, NULL }
604 };
605
606 static const value_string primary_cells_type_vals[] = {
607         { 1, "TDD" },
608         { 2, "FDD" },
609         { 3, "HD_FDD" },
610         { 0, NULL }
611 };
612
613 static const value_string ul_rssi_supported_vals[] = {
614         { 0, "Uplink RSSI not supported" },
615         { 1, "Uplink RSSI supported" },
616         { 0, NULL }
617 };
618
619 static const value_string nprb_vals[] = {
620         { 0, "2" },
621         { 1, "3" },
622         { 0, NULL }
623 };
624
625 static const value_string nmm_modes_supported_vals[] =
626 {
627         { 0, "NONE" },
628         { 1, "NMM_ONLY" },
629         { 2, "NMM_IN_CONFIGURED_STATE" },
630         { 3, "NMM_IN_RUNNING_STATE" },
631         { 4, "NMM_IN_CONFIGURED_AND_RUNNING_STATE" },
632         { 0, NULL }
633 };
634
635 static const value_string dlsch_re13_ue_type_vals[] = {
636         { 0, "non LC/CE UE" },
637         { 1, "LC/CE CEModeA UE" },
638         { 2, "LC/CE CEModeB UE" },
639         { 0, NULL }
640 };
641
642 static const value_string dlsch_re13_pdsch_payload_type_vals[] = {
643         { 0, "PDSCH carrying SIB1-BR " },
644         { 1, "PDSCH carrying SI message (except for SIB1-BR or PCH)" },
645         { 2, "PDSCH carrying other" },
646         { 0, NULL }
647 };
648
649 static const value_string csi_rs_flags_strname[] = {
650         { 0, "CSI - RS parameters are not valid" },
651         { 1, "CSI - RS parameters are valid" },
652         { 0, NULL}
653 };
654
655
656 static const value_string paging_direct_indication_differtiation_flag_vals[] = {
657         { 0, "Direct Information" },
658         { 1, "Paging" },
659         { 0, NULL }
660 };
661
662 static const value_string ul_tx_mode_vals[] = {
663         { 0, "SISO/MIMO" },
664         { 1, "MIMO" },
665         { 0, NULL }
666 };
667
668 static const value_string n_srs_vals[] = {
669         { 0, "No overlap" },
670         { 1, "Overlap" },
671         { 0, NULL }
672 };
673
674 static const value_string n_srs_initial_vals[] = {
675         { 0, "Last OFDM symbol is not punctured" },
676         { 1, "Last OFDM symbol is punctured." },
677         { 0, NULL }
678 };
679
680
681 static const value_string csi_mode_vals[] = {
682         { 0, "PUCCH format 2/2a/2b/3" },
683         { 1, "PUCCH format 4" },
684         { 2, "PUCCH format 5" },
685         { 0, NULL }
686 };
687
688 static const value_string hi_dci0_pdu_type_vals[] = {
689         { 0, "HI" },
690         { 1, "DCI UL" },
691         { 2, "EDPCCH DCI UL" },
692         { 3, "MDPCCH DCI UL" },
693         { 0, NULL }
694 };
695
696 static const value_string ue_tx_antenna_selection_vals[] = {
697         { 0, "Not Configured" },
698         { 1, "Configured and using UE port 0" },
699         { 2, "Configured and using UE port 1" },
700         { 0, NULL }
701 };
702
703 static const value_string size_of_cqi_csi_feild_vals[] = {
704         { 0, "1 bit" },
705         { 1, "2 bits" },
706         { 2, "3 bits" },
707         { 0, NULL }
708 };
709
710 static const value_string number_of_antenna_port_vals[] = {
711         { 0, "1 antenna port" },
712         { 1, "2 antenna ports" },
713         { 2, "4 antenna ports" },
714         { 0, NULL }
715 };
716
717 static const value_string ce_mode_vals[] = {
718         { 1, "CEModeA" },
719         { 2, "CEModeB" },
720         { 0, NULL }
721 };
722
723
724 static const value_string csi_request_vals[] = {
725         { 0, "Aperiodic CSI not requested" },
726         { 1, "Aperiodic CSI requested" },
727         { 0, NULL }
728 };
729
730 static const value_string tdd_harq_mode_vals[] = {
731         { 0, "Format 1a/1b BUNDLING" },
732         { 1, "Format 1a/1b MULTIPLEXING" },
733         { 2, "Format 1a/1b  SPECIAL BUNDLING" },
734         { 3, "Channel Selection" },
735         { 4, "Format 3" },
736         { 5, "Format 4" },
737         { 6, "Format 5" },
738         { 0, NULL }
739 };
740
741 static const value_string fdd_harq_mode_vals[] = {
742         { 0, "Format 1a/1b" },
743         { 1, "Channel Selection" },
744         { 2, "Format 3" },
745         { 3, "Format 4" },
746         { 4, "Format 5" },
747         { 0, NULL }
748 };
749
750 static const value_string harq_value_vals[] = {
751         { 1, "ACK" },
752         { 2, "NACK" },
753         { 3, "ACK or NACK" },
754         { 4, "DTX" },
755         { 5, "ACK or DTX" },
756         { 6, "NACK or DTX" },
757         { 7, "ACK or NACK or DTX" },
758         { 0, NULL }
759 };
760
761
762 static const value_string harq_special_value_vals[] = {
763         { 0, "0 or None" },
764         { 1, "1 or 4 or 7 ACKs reported" },
765         { 2, "2 or 5 or 8 ACKs reported" },
766         { 3, "3 or 6 or 9 ACKs reported" },
767         { 4, "DTX (UE did not transmit anything)" },
768         { 0, NULL }
769 };
770
771 static const value_string channel_vals[] = {
772         { 0, "PUCCH" },
773         { 1, "PUSCH" },
774         { 0, NULL }
775 };
776
777 static const value_string rach_resource_type_vals[] = {
778         { 0, "Non LC / CE RACH" },
779         { 1, "LC / CE RACH CE level 0" },
780         { 2, "LC / CE RACH CE level 1" },
781         { 3, "LC / CE RACH CE level 2" },
782         { 4, "LC / CE RACH CE level 3" },
783         { 0, NULL }
784 };
785
786 static const value_string up_pts_symbol_vals[] = {
787         { 0, "Symbol 0" },
788         { 1, "Symbol 1" },
789         { 0, NULL }
790 };
791
792 static const value_string arfcn_direction_vals[] = {
793         { 0, "DL" },
794         { 1, "UL" },
795         { 0, NULL }
796 };
797
798 static int proto_nfapi = -1;
799
800 /* These are for the subtrees */
801 static gint ett_nfapi = -1;
802 static gint ett_nfapi_p4_p5_message_header = -1;
803 static gint ett_nfapi_p7_message_header = -1;
804 static gint ett_nfapi_tlv_tree = -1;
805 static gint ett_nfapi_tl = -1;
806 static gint ett_nfapi_pnf_phy = -1;
807 static gint ett_nfapi_pnf_phy_rel10 = -1;
808 static gint ett_nfapi_pnf_phy_rel11 = -1;
809 static gint ett_nfapi_pnf_phy_rel12 = -1;
810 static gint ett_nfapi_pnf_phy_rel13 = -1;
811 static gint ett_nfapi_pnf_phy_rf_config = -1;
812 static gint ett_nfapi_rf_bands = -1;
813 static gint ett_nfapi_tx_antenna_ports = -1;
814 static gint ett_nfapi_harq_ack_nack_data = -1;
815 static gint ett_nfapi_harq_data = -1;
816 static gint ett_nfapi_cc = -1;
817 static gint ett_nfapi_rbs = -1;
818 static gint ett_nfapi_antennas = -1;
819 static gint ett_nfapi_dl_config_request_pdu_list = -1;
820 static gint ett_nfapi_ul_config_request_pdu_list = -1;
821 static gint ett_nfapi_hi_dci0_request_pdu_list = -1;
822 static gint ett_nfapi_tx_request_pdu_list = -1;
823 static gint ett_nfapi_rx_indication_pdu_list = -1;
824 static gint ett_nfapi_harq_indication_pdu_list = -1;
825 static gint ett_nfapi_crc_indication_pdu_list = -1;
826 static gint ett_nfapi_sr_indication_pdu_list = -1;
827 static gint ett_nfapi_cqi_indication_pdu_list = -1;
828 static gint ett_nfapi_preamble_indication_pdu_list = -1;
829 static gint ett_nfapi_srs_indication_pdu_list = -1;
830 static gint ett_nfapi_lbt_dl_config_pdu_list = -1;
831 static gint ett_nfapi_lbt_dl_indication_pdu_list = -1;
832 static gint ett_nfapi_subbands = -1;
833 static gint ett_nfapi_bf_vector_antennas = -1;
834 static gint ett_nfapi_bf_vectors = -1;
835 static gint ett_nfapi_csi_rs_resource_configs = -1;
836 static gint ett_nfapi_csi_rs_bf_vector = -1;
837 static gint ett_nfapi_epdcch_prbs = -1;
838 static gint ett_nfapi_precoding = -1;
839 static gint ett_nfapi_earfcn_list = -1;
840 static gint ett_nfapi_uarfcn_list = -1;
841 static gint ett_nfapi_arfcn_list = -1;
842 static gint ett_nfapi_rssi_list = -1;
843 static gint ett_nfapi_pci_list = -1;
844 static gint ett_nfapi_psc_list = -1;
845 static gint ett_nfapi_lte_cells_found_list = -1;
846 static gint ett_nfapi_utran_cells_found_list = -1;
847 static gint ett_nfapi_geran_cells_found_list = -1;
848 static gint ett_nfapi_si_periodicity_list = -1;
849 static gint ett_nfapi_downlink_bandwidth_support = -1;
850 static gint ett_nfapi_uplink_bandwidth_support = -1;
851 static gint ett_nfapi_downlink_modulation_support = -1;
852 static gint ett_nfapi_uplink_modulation_support = -1;
853 static gint ett_nfapi_received_interference_power_mesurement_results = -1;
854 static gint ett_nfapi_release_support = -1;
855 static expert_field ei_invalid_range = EI_INIT;
856 static expert_field ei_invalid_tlv_length = EI_INIT;
857
858 static int hf_nfapi_p4_p5_message_header_phy_id = -1;
859 static int hf_nfapi_p4_p5_message_header_message_id = -1;
860 static int hf_nfapi_p4_p5_message_header_message_length = -1;
861 static int hf_nfapi_p4_p5_message_header_spare = -1;
862 static int hf_nfapi_p7_message_header_phy_id = -1;
863 static int hf_nfapi_p7_message_header_message_id = -1;
864 static int hf_nfapi_p7_message_header_message_length = -1;
865 static int hf_nfapi_p7_message_header_m = -1;
866 static int hf_nfapi_p7_message_header_segment = -1;
867 static int hf_nfapi_p7_message_header_sequence_number = -1;
868 static int hf_nfapi_p7_message_header_checksum = -1;
869 static int hf_nfapi_p7_message_header_transmit_timestamp = -1;
870 static int hf_nfapi_tl_tag = -1;
871 static int hf_nfapi_tl_length = -1;
872 static int hf_nfapi_sync_mode = -1;
873 static int hf_nfapi_location_mode = -1;
874 static int hf_nfapi_location_coordinates = -1;
875 static int hf_nfapi_dl_config_timing = -1;
876 static int hf_nfapi_tx_timing = -1;
877 static int hf_nfapi_ul_config_timing = -1;
878 static int hf_nfapi_hi_dci0_timing = -1;
879 static int hf_nfapi_maximum_number_phys = -1;
880 static int hf_nfapi_maximum_total_bandwidth = -1;
881 static int hf_nfapi_maximum_total_number_dl_layers = -1;
882 static int hf_nfapi_maximum_total_number_ul_layers = -1;
883 static int hf_nfapi_shared_bands = -1;
884 static int hf_nfapi_shared_pa = -1;
885 static int hf_nfapi_maximum_total_power = -1;
886 static int hf_nfapi_oui = -1;
887 static int hf_nfapi_pdu = -1;
888 static int hf_nfapi_pnf_phy_number_phy = -1;
889 static int hf_nfapi_pnf_phy_config_index = -1;
890 static int hf_nfapi_number_of_rf_exclusions = -1;
891 static int hf_nfapi_dl_bandwidth_support = -1;
892 static int hf_nfapi_dl_bandwidth_support_6 = -1;
893 static int hf_nfapi_dl_bandwidth_support_15 = -1;
894 static int hf_nfapi_dl_bandwidth_support_25 = -1;
895 static int hf_nfapi_dl_bandwidth_support_50 = -1;
896 static int hf_nfapi_dl_bandwidth_support_75 = -1;
897 static int hf_nfapi_dl_bandwidth_support_100 = -1;
898 static int hf_nfapi_ul_bandwidth_support = -1;
899 static int hf_nfapi_ul_bandwidth_support_6 = -1;
900 static int hf_nfapi_ul_bandwidth_support_15= -1;
901 static int hf_nfapi_ul_bandwidth_support_25 = -1;
902 static int hf_nfapi_ul_bandwidth_support_50 = -1;
903 static int hf_nfapi_ul_bandwidth_support_75 = -1;
904 static int hf_nfapi_ul_bandwidth_support_100 = -1;
905 static int hf_nfapi_downlink_channel_bandwidth_supported = -1;
906 static int hf_nfapi_uplink_channel_bandwidth_supported = -1;
907 static int hf_nfapi_number_of_dl_layers_supported = -1;
908 static int hf_nfapi_number_of_ul_layers_supported = -1;
909 static int hf_nfapi_maximum_3gpp_release_supported = -1;
910 static int hf_nfapi_maximum_3gpp_release_supported_rel8 = -1;
911 static int hf_nfapi_maximum_3gpp_release_supported_rel9 = -1;
912 static int hf_nfapi_maximum_3gpp_release_supported_rel10 = -1;
913 static int hf_nfapi_maximum_3gpp_release_supported_rel11 = -1;
914 static int hf_nfapi_maximum_3gpp_release_supported_rel12 = -1;
915 static int hf_nfapi_maximum_3gpp_release_supported_rel13 = -1;
916 static int hf_nfapi_nmm_modes_supported = -1;
917 static int hf_nfapi_number_of_rfs = -1;
918 static int hf_nfapi_rf_config_index = -1;
919 static int hf_nfapi_band = -1;
920 static int hf_nfapi_maximum_transmit_power = -1;
921 static int hf_nfapi_maximum_transmit_power_2 = -1;
922 static int hf_nfapi_earfcn = -1;
923 static int hf_nfapi_minimum_transmit_power = -1;
924 static int hf_nfapi_number_of_antennas_suppported = -1;
925 static int hf_nfapi_minimum_downlink_frequency = -1;
926 static int hf_nfapi_maximum_downlink_frequency = -1;
927 static int hf_nfapi_minimum_uplink_frequency = -1;
928 static int hf_nfapi_maximum_uplink_frequency = -1;
929 static int hf_nfapi_number_of_rf_bands = -1;
930 static int hf_nfapi_nmm_uplink_rssi_supported = -1;
931 static int hf_nfapi_phy_rf_config_info_phy_id = -1;
932 static int hf_nfapi_transmission_mode7_supported = -1;
933 static int hi_nfapi_transmission_mode8_supported = -1;
934 static int hi_nfapi_two_antennas_ports_for_pucch = -1;
935 static int hi_nfapi_transmission_mode_9_supported = -1;
936 static int hi_nfapi_simultaneous_pucch_pusch = -1;
937 static int hi_nfapi_four_layer_tx_with_tm3_and_tm4 = -1;
938 static int hf_nfapi_epdcch_supported = -1;
939 static int hi_nfapi_multi_ack_csi_reporting = -1;
940 static int hi_nfapi_pucch_tx_diversity_with_channel_selection = -1;
941 static int hi_nfapi_ul_comp_supported = -1;
942 static int hi_nfapi_transmission_mode_5_supported = -1;
943 static int hf_nfapi_csi_subframe_set = -1;
944 static int hi_nfapi_enhanced_4tx_codebook = -1;
945 static int hi_nfapi_drs_supported = -1;
946 static int hi_nfapi_ul_64qam_supported = -1;
947 static int hi_nfapi_transmission_mode_10_supported = -1;
948 static int hi_nfapi_alternative_tbs_indices = -1;
949 static int hf_nfapi_pucch_format_4_supported = -1;
950 static int hf_nfapi_pucch_format_5_supported = -1;
951 static int hf_nfapi_more_than_5_ca_supported = -1;
952 static int hf_nfapi_laa_supported = -1;
953 static int hf_nfapi_laa_ending_in_dwpts_supported = -1;
954 static int hf_nfapi_laa_starting_in_second_slot_supported = -1;
955 static int hf_nfapi_beamforming_supported = -1;
956 static int hf_nfapi_csi_rs_enhancements_supported = -1;
957 static int hf_nfapi_drms_enhancements_supported = -1;
958 static int hf_nfapi_srs_enhancements_supported = -1;
959 static int hf_nfapi_dl_rs_tx_power = -1;
960 static int hf_nfapi_received_interference_power = -1;
961 static int hf_nfapi_thermal_noise_power = -1;
962 static int hf_nfapi_dl_rs_tx_power_measurement = -1;
963 static int hf_nfapi_received_interference_power_measurement = -1;
964 static int hf_nfapi_thermal_noise_power_measurement = -1;
965
966 // P5 Message Structures
967 static int hf_nfapi_error_code = -1;
968 static int hf_nfapi_p4_error_code = -1;
969 static int hf_nfapi_rat_type = -1;
970 static int hf_nfapi_num_tlv = -1;
971 static int hf_nfapi_phy_state = -1;
972 static int hf_nfapi_phy_antenna_capability = -1;
973 static int hf_nfapi_release_capability = -1;
974 static int hf_nfapi_mbsfn_capability = -1;
975 static int hf_nfapi_laa_capability = -1;
976 static int hf_nfapi_pd_sensing_lbt_support = -1;
977 static int hf_nfapi_multi_carrier_lbt_support = -1;
978 static int hf_nfapi_partial_sf_support = -1;
979
980 static int hf_nfapi_pnf_address_ipv4 = -1;
981 static int hf_nfapi_pnf_address_ipv6 = -1;
982 static int hf_nfapi_vnf_address_ipv4 = -1;
983 static int hf_nfapi_vnf_address_ipv6 = -1;
984 static int hf_nfapi_pnf_port = -1;
985 static int hf_nfapi_vnf_port = -1;
986 static int hf_nfapi_dl_ue_per_sf = -1;
987 static int hf_nfapi_ul_ue_per_sf = -1;
988 static int hf_nfapi_timing_window = -1;
989 static int hf_nfapi_timing_info_mode = -1;
990 static int hf_nfapi_timing_info_period = -1;
991 static int hf_nfapi_duplex_mode = -1;
992 static int hf_nfapi_pcfich_power_offset = -1;
993 static int hf_nfapi_pb = -1;
994 static int hf_nfapi_dl_cyclic_prefix_type = -1;
995 static int hf_nfapi_ul_cyclic_prefix_type = -1;
996 static int hf_nfapi_tx_antenna_ports = -1;
997 static int hf_nfapi_rx_antenna_ports = -1;
998 static int hf_nfapi_downlink_channel_bandwidth = -1;
999 static int hf_nfapi_uplink_channel_bandwidth = -1;
1000 static int hf_nfapi_reference_signal_power = -1;
1001 static int hf_nfapi_phich_resource = -1;
1002 static int hf_nfapi_phich_duration = -1;
1003 static int hf_nfapi_phich_power_offset = -1;
1004 static int hf_nfapi_primary_synchronization_signal_epre_eprers = -1;
1005 static int hf_nfapi_secondary_synchronization_signal_epre_eprers = -1;
1006 static int hf_nfapi_physical_cell_id = -1;
1007 static int hf_nfapi_configuration_index = -1;
1008 static int hf_nfapi_root_sequence_index = -1;
1009 static int hf_nfapi_zero_correlation_zone_configuration = -1;
1010 static int hf_nfapi_high_speed_flag = -1;
1011 static int hf_nfapi_frequency_offset = -1;
1012 static int hf_nfapi_hopping_mode = -1;
1013 static int hf_nfapi_hopping_offset = -1;
1014 static int hf_nfapi_delta_pucch_shift = -1;
1015 static int hf_nfapi_n_cqi_rb = -1;
1016 static int hf_nfapi_n_an_cs = -1;
1017 static int hf_nfapi_n1_pucch_an = -1;
1018 static int hf_nfapi_bandwidth_configuration = -1;
1019 static int hf_nfapi_max_up_pts = -1;
1020 static int hf_nfapi_srs_subframe_configuration = -1;
1021 static int hf_nfapi_srs_acknack_srs_simultaneous_transmission = -1;
1022 static int hf_nfapi_uplink_rs_hopping = -1;
1023 static int hf_nfapi_group_assignment = -1;
1024 static int hf_nfapi_cyclic_shift_1_for_drms = -1;
1025 static int hf_nfapi_subframe_assignment = -1;
1026 static int hf_nfapi_special_subframe_patterns = -1;
1027 static int hf_nfapi_ed_threshold_for_lbt_for_pdsch = -1;
1028 static int hf_nfapi_ed_threshold_for_lbt_for_drs = -1;
1029 static int hf_nfapi_pd_threshold = -1;
1030 static int hf_nfapi_multi_carrier_type = -1;
1031 static int hf_nfapi_multi_carrier_tx = -1;
1032 static int hf_nfapi_multi_carrier_freeze = -1;
1033 static int hf_nfapi_tx_antenna_ports_for_drs = -1;
1034 static int hf_nfapi_transmission_power_for_drs = -1;
1035 static int hf_nfapi_pbch_repetitions_enabled_r13 = -1;
1036 static int hf_nfapi_prach_cat_m_root_sequence_index = -1;
1037 static int hf_nfapi_prach_cat_m_zero_correlation_zone_configuration = -1;
1038 static int hf_nfapi_prach_cat_m_high_speed_flag = -1;
1039 static int hf_nfapi_prach_ce_level_0_enable = -1;
1040 static int hf_nfapi_prach_ce_level_0_configuration_index = -1;
1041 static int hf_nfapi_prach_ce_level_0_frequency_offset = -1;
1042 static int hf_nfapi_prach_ce_level_0_number_of_repetitions_per_attempt = -1;
1043 static int hf_nfapi_prach_ce_level_0_starting_subframe_periodicity = -1;
1044 static int hf_nfapi_prach_ce_level_0_hopping_enabled = -1;
1045 static int hf_nfapi_prach_ce_level_0_hopping_offset = -1;
1046 static int hf_nfapi_prach_ce_level_1_enable = -1;
1047 static int hf_nfapi_prach_ce_level_1_configuration_index = -1;
1048 static int hf_nfapi_prach_ce_level_1_frequency_offset = -1;
1049 static int hf_nfapi_prach_ce_level_1_number_of_repetitions_per_attempt = -1;
1050 static int hf_nfapi_prach_ce_level_1_starting_subframe_periodicity = -1;
1051 static int hf_nfapi_prach_ce_level_1_hopping_enabled = -1;
1052 static int hf_nfapi_prach_ce_level_1_hopping_offset = -1;
1053 static int hf_nfapi_prach_ce_level_2_enable = -1;
1054 static int hf_nfapi_prach_ce_level_2_configuration_index = -1;
1055 static int hf_nfapi_prach_ce_level_2_frequency_offset = -1;
1056 static int hf_nfapi_prach_ce_level_2_number_of_repetitions_per_attempt = -1;
1057 static int hf_nfapi_prach_ce_level_2_starting_subframe_periodicity = -1;
1058 static int hf_nfapi_prach_ce_level_2_hopping_enabled = -1;
1059 static int hf_nfapi_prach_ce_level_2_hopping_offset = -1;
1060 static int hf_nfapi_prach_ce_level_3_enable = -1;
1061 static int hf_nfapi_prach_ce_level_3_configuration_index = -1;
1062 static int hf_nfapi_prach_ce_level_3_frequency_offset = -1;
1063 static int hf_nfapi_prach_ce_level_3_number_of_repetitions_per_attempt = -1;
1064 static int hf_nfapi_prach_ce_level_3_starting_subframe_periodicity = -1;
1065 static int hf_nfapi_prach_ce_level_3_hopping_enabled = -1;
1066 static int hf_nfapi_prach_ce_level_3_hopping_offset = -1;
1067 static int hf_nfapi_pucch_internal_ul_hopping_config_common_mode_b = -1;
1068 static int hf_nfapi_pucch_internal_ul_hopping_config_common_mode_a = -1;
1069 static int hf_nfapi_dl_modulation_support = -1;
1070 static int hf_nfapi_dl_modulation_support_qpsk = -1;
1071 static int hf_nfapi_dl_modulation_support_16qam = -1;
1072 static int hf_nfapi_dl_modulation_support_64qam = -1;
1073 static int hf_nfapi_dl_modulation_support_256qam = -1;
1074 static int hf_nfapi_ul_modulation_support = -1;
1075 static int hf_nfapi_ul_modulation_support_qpsk = -1;
1076 static int hf_nfapi_ul_modulation_support_16qam = -1;
1077 static int hf_nfapi_ul_modulation_support_64qam = -1;
1078 static int hf_nfapi_data_report_mode = -1;
1079 static int hf_nfapi_sfnsf = -1;
1080
1081 // P7 Sub Structures
1082 static int hf_nfapi_dl_dci_format = -1;
1083 static int hf_nfapi_ul_dci_format = -1;
1084 static int hf_nfapi_mpdcch_ul_dci_format = -1;
1085 static int hf_nfapi_cce_idx = -1;
1086 static int hf_nfapi_aggregation_level = -1;
1087 static int hf_nfapi_mcs_1 = -1;
1088 static int hf_nfapi_redundancy_version_1 = -1;
1089 static int hf_nfapi_new_data_indicator_1 = -1;
1090 static int hf_nfapi_mcs_2 = -1;
1091 static int hf_nfapi_redundancy_version_2 = -1;
1092 static int hf_nfapi_new_data_indicator_2 = -1;
1093 static int hf_nfapi_harq_process = -1;
1094 static int hf_nfapi_tpmi = -1;
1095 static int hf_nfapi_pmi = -1;
1096 static int hf_nfapi_precoding_information = -1;
1097 static int hf_nfapi_tpc = -1;
1098 static int hf_nfapi_downlink_assignment_index = -1;
1099 static int hf_nfapi_transport_block_size_index = -1;
1100 static int hf_nfapi_downlink_power_offset = -1;
1101 static int hf_nfapi_allocate_prach_flag = -1;
1102 static int hf_nfapi_preamble_index = -1;
1103 static int hf_nfapi_prach_mask_index = -1;
1104 static int hf_nfapi_rnti_type = -1;
1105 static int hf_nfapi_mpdcch_rnti_type = -1;
1106 static int hf_nfapi_mcch_flag = -1;
1107 static int hf_nfapi_mcch_change_notification = -1;
1108 static int hf_nfapi_scrambling_identity = -1;
1109 static int hf_nfapi_cross_carrier_scheduling_flag = -1;
1110 static int hf_nfapi_carrier_indicator = -1;
1111 static int hf_nfapi_srs_flag = -1;
1112 static int hf_nfapi_srs_request = -1;
1113 static int hf_nfapi_antenna_ports_scrambling_and_layers = -1;
1114 static int hf_nfapi_total_dci_length_including_padding = -1;
1115 static int hf_nfapi_harq_ack_resource_offset = -1;
1116 static int hf_nfapi_pdsch_re_mapping_and_quasi_co_location_indicator = -1;
1117 static int hf_nfapi_primary_cell_type = -1;
1118 static int hf_nfapi_ul_dl_configuration_flag = -1;
1119 static int hf_nfapi_number_of_ul_dl_configurations = -1;
1120 static int hf_nfapi_ul_dl_configuration_index = -1;
1121 static int hf_nfapi_laa_end_partial_sf_flag = -1;
1122 static int hf_nfapi_laa_end_partial_sf_configuration = -1;
1123 static int hf_nfapi_initial_lbt_sf = -1;
1124 static int hf_nfapi_codebooksize_determination_r13 = -1;
1125 static int hf_nfapi_rel13_drms_table_flag = -1;
1126 static int hf_nfapi_csi_rs_resource_config = -1;
1127 static int hf_nfapi_csi_rs_number_of_nzp_configurations = -1;
1128 static int hf_nfapi_pdsch_start = -1;
1129 static int hf_nfapi_drms_config_flag = -1;
1130 static int hf_nfapi_drms_scrambling = -1;
1131 static int hf_nfapi_csi_config_flag = -1;
1132 static int hf_nfapi_csi_scrambling = -1;
1133 static int hf_nfapi_pdsch_re_mapping_flag = -1;
1134 static int hf_nfapi_pdsch_re_mapping_antenna_ports = -1;
1135 static int hf_nfapi_pdsch_re_mapping_freq_shift = -1;
1136 static int hf_nfapi_alt_cqi_table_r12 = -1;
1137 static int hf_nfapi_max_layers = -1;
1138 static int hf_nfapi_n_dl_harq = -1;
1139 static int hf_nfapi_dwpts_symbols = -1;
1140 static int hf_nfapi_ue_type = -1;
1141 static int hf_nfapi_pdsch_payload_type = -1;
1142 static int hf_nfapi_initial_transmission_sf = -1;
1143 static int hf_nfapi_req13_drms_table_flag = -1;
1144 static int hf_nfapi_prnti = -1;
1145 static int hf_nfapi_mcs = -1;
1146 static int hf_nfapi_number_of_transport_blocks = -1;
1147 static int hf_nfapi_ue_mode = -1;
1148 static int hf_prs_bandwidth = -1;
1149 static int hf_prs_cyclic_prefix_type = -1;
1150 static int hf_prs_muting = -1;
1151 static int hf_nfapi_csi_rs_resource_index = -1;
1152 static int hf_nfapi_csi_rs_class = -1;
1153 static int hf_nfapi_cdm_type = -1;
1154 static int hf_nfapi_edpcch_prb_index = -1;
1155 static int hf_nfapi_epdcch_resource_assignment_flag = -1;
1156 static int hf_nfapi_epdcch_id = -1;
1157 static int hf_nfapi_epdcch_start_symbol = -1;
1158 static int hf_nfapi_epdcch_num_prb = -1;
1159 static int hf_nfapi_precoding_value = -1;
1160 static int hf_nfapi_mpdcch_narrowband = -1;
1161 static int hf_nfapi_number_of_prb_pairs = -1;
1162 static int hf_nfapi_resource_block_assignment = -1;
1163 static int hf_nfapi_start_symbol = -1;
1164 static int hf_nfapi_ecce_index = -1;
1165 static int hf_nfapi_ce_mode = -1;
1166 static int hf_nfapi_drms_scrabmling_init = -1;
1167 static int hf_nfapi_pdsch_reception_levels = -1;
1168 static int hf_nfapi_new_data_indicator = -1;
1169 static int hf_nfapi_tpmi_length = -1;
1170 static int hf_nfapi_pmi_flag = -1;
1171 static int hf_nfapi_harq_resource_offset = -1;
1172 static int hf_nfapi_dci_subframe_repetition_number = -1;
1173 static int hf_nfapi_downlink_assignment_index_length = -1;
1174 static int hf_nfapi_starting_ce_level = -1;
1175 static int hf_nfapi_antenna_ports_and_scrambling_identity_flag = -1;
1176 static int hf_nfapi_antenna_ports_and_scrambling_identity = -1;
1177 static int hf_nfapi_paging_direct_indication_differentiation_flag = -1;
1178 static int hf_nfapi_direct_indication = -1;
1179 static int hf_nfapi_number_of_tx_antenna_ports = -1;
1180
1181 // P7 Message Structures
1182 static int hf_nfapi_dl_node_sync_t1 = -1;
1183 static int hf_nfapi_dl_node_sync_delta_sfn_sf = -1;
1184 static int hf_nfapi_ul_node_sync_t1 = -1;
1185 static int hf_nfapi_ul_node_sync_t2 = -1;
1186 static int hf_nfapi_ul_node_sync_t3 = -1;
1187 static int hf_nfapi_timing_info_last_sfn_sf = -1;
1188 static int hf_nfapi_timing_info_time_since_last_timing_info = -1;
1189 static int hf_nfapi_timing_info_dl_config_jitter = -1;
1190 static int hf_nfapi_timing_info_tx_request_jitter = -1;
1191 static int hf_nfapi_timing_info_ul_config_jitter = -1;
1192 static int hf_nfapi_timing_info_hi_dci0_jitter = -1;
1193 static int hf_nfapi_timing_info_dl_config_latest_delay = -1;
1194 static int hf_nfapi_timing_info_tx_request_latest_delay = -1;
1195 static int hf_nfapi_timing_info_ul_config_latest_delay = -1;
1196 static int hf_nfapi_timing_info_hi_dci0_latest_delay = -1;
1197 static int hf_nfapi_timing_info_dl_config_earliest_arrival = -1;
1198 static int hf_nfapi_timing_info_tx_request_earliest_arrival = -1;
1199 static int hf_nfapi_timing_info_ul_config_earliest_arrival = -1;
1200 static int hf_nfapi_timing_info_hi_dci0_earliest_arrival = -1;
1201 static int hf_nfapi_sfn_sf = -1;
1202 static int hf_nfapi_number_pdcch_ofdm_symbols = -1;
1203 static int hf_nfapi_number_dci = -1;
1204 static int hf_nfapi_number_pdus = -1;
1205 static int hf_nfapi_number_pdsch_rnti = -1;
1206 static int hf_nfapi_transmission_power_pcfich = -1;
1207 static int hf_nfapi_number_of_harqs = -1;
1208 static int hf_nfapi_number_of_crcs = -1;
1209 static int hf_nfapi_number_of_srs = -1;
1210 static int hf_nfapi_number_of_cqi = -1;
1211 static int hf_nfapi_number_of_preambles = -1;
1212 static int hf_nfapi_number_of_srss = -1;
1213 static int hf_nfapi_lbt_dl_req_pdu_type = -1;
1214 static int hf_nfapi_lbt_dl_ind_pdu_type = -1;
1215 static int hf_nfapi_dl_config_pdu_type = -1;
1216 static int hf_nfapi_pdu_size = -1;
1217 static int hf_nfapi_instance_length = -1;
1218 static int hf_nfapi_length;
1219 static int hf_nfapi_pdu_index = -1;
1220 static int hf_nfapi_rnti = -1;
1221 static int hf_nfapi_resource_allocation_type = -1;
1222 static int hf_nfapi_virtual_resource_block_assignment_flag = -1;
1223 static int hf_nfapi_resource_block_coding = -1;
1224 static int hf_nfapi_modulation = -1;
1225 static int hf_nfapi_redundancy_version = -1;
1226 static int hf_nfapi_transport_blocks = -1;
1227 static int hf_nfapi_transport_block_to_codeword_swap_flag = -1;
1228 static int hf_nfapi_transmission_scheme = -1;
1229 static int hf_nfapi_ul_transmission_scheme = -1;
1230 static int hf_nfapi_number_of_layers = -1;
1231 static int hf_nfapi_number_of_subbands = -1;
1232 static int hf_nfapi_codebook_index = -1;
1233 static int hf_nfapi_ue_category_capacity = -1;
1234 static int hf_nfapi_pa = -1;
1235 static int hf_nfapi_delta_power_offset_index = -1;
1236 static int hf_nfapi_ngap = -1;
1237 static int hf_nfapi_nprb = -1;
1238 static int hf_nfapi_transmission_mode = -1;
1239 static int hf_nfapi_num_bf_prb_per_subband = -1;
1240 static int hf_nfapi_num_bf_vector = -1;
1241 static int hf_nfapi_bf_vector_subband_index = -1;
1242 static int hf_nfapi_bf_vector_num_antennas = -1;
1243 static int hf_nfapi_bf_vector_bf_value = -1;
1244 static int hf_nfapi_nscid = -1;
1245 static int hf_nfapi_csi_rs_flag = -1;
1246 static int hf_nfapi_csi_rs_resource_config_r10 = -1;
1247 static int hf_nfapi_csi_rs_zero_tx_power_resource_config_bitmap_r10 = -1;
1248 static int hf_nfapi_transmission_power = -1;
1249 static int hf_nfapi_mbsfn_area_id = -1;
1250 static int hf_nfapi_csi_rs_antenna_port_count_r10 = -1;
1251 static int hf_nfapi_ul_config_pdu_type = -1;
1252 static int hf_nfapi_rach_prach_frequency_resources = -1;
1253 static int hf_nfapi_srs_present = -1;
1254 static int hf_nfapi_handle = -1;
1255 static int hf_nfapi_pucch_index = -1;
1256 static int hf_nfapi_size = -1;
1257 static int hf_nfapi_resource_block_start = -1;
1258 static int hf_nfapi_number_of_resource_blocks = -1;
1259 static int hf_nfapi_cyclic_shift_2_for_drms = -1;
1260 static int hf_nfapi_frequency_hopping_enabled_flag = -1;
1261 static int hf_nfapi_frequency_hopping_bits = -1;
1262 static int hf_nfapi_new_data_indication = -1;
1263 static int hf_nfapi_harq_process_number = -1;
1264 static int hf_nfapi_ul_tx_mode = -1;
1265 static int hf_nfapi_current_tx_nb = -1;
1266 static int hf_nfapi_n_srs = -1;
1267 static int hf_nfapi_disable_sequence_hopping_flag = -1;
1268 static int hf_nfapi_dl_cqi_pmi_size_rank_1 = -1;
1269 static int hf_nfapi_dl_cqi_pmi_size_rank_greater_1 = -1;
1270 static int hf_nfapi_ri_size = -1;
1271 static int hf_nfapi_delta_offset_cqi = -1;
1272 static int hf_nfapi_delta_offset_ri = -1;
1273 static int hf_nfapi_harq_size = -1;
1274 static int hf_nfapi_delta_offset_harq = -1;
1275 static int hf_nfapi_tdd_ack_nack_mode = -1;
1276 static int hf_nfapi_fdd_ack_nack_mode = -1;
1277 static int hf_nfapi_n_srs_initial = -1;
1278 static int hf_nfapi_initial_number_of_resource_blocks = -1;
1279 static int hf_nfapi_dl_cqi_pmi_size = -1;
1280 static int hf_nfapi_report_type = -1;
1281 static int hf_nfapi_dl_cqi_ri_pmi_size = -1;
1282 static int hf_nfapi_control_type = -1;
1283 static int hf_nfapi_number_of_cc = -1;
1284 static int hf_nfapi_virtual_cell_id_enabled_flag = -1;
1285 static int hf_nfapi_npusch_identity = -1;
1286 static int hf_nfapi_ndrms_csh_identity = -1;
1287 static int hf_nfapi_total_number_of_repetitions = -1;
1288 static int hf_nfapi_repetition_number = -1;
1289 static int hf_nfapi_initial_sf_io = -1;
1290 static int hf_nfapi_empty_symbols_due_to_retunning = -1;
1291 static int hf_nfapi_dl_cqi_ri_pmi_size_2 = -1;
1292 static int hf_nfapi_npucch_identity = -1;
1293 static int hf_nfapi_harq_size_2 = -1;
1294 static int hf_nfapi_delta_offset_harq_2 = -1;
1295 static int hf_nfapi_empty_symbols = -1;
1296 static int hf_nfapi_csi_mode = -1;
1297 static int hf_nfapi_dl_cqi_pmi_size_2 = -1;
1298 static int hf_nfapi_statring_prb = -1;
1299 static int hf_nfapi_cdm_index = -1;
1300 static int hf_nfapi_nsrs = -1;
1301 static int hf_nfapi_num_ant_ports = -1;
1302 static int hf_nfapi_n_pucch_2_0 = -1;
1303 static int hf_nfapi_n_pucch_2_1 = -1;
1304 static int hf_nfapi_n_pucch_2_2 = -1;
1305 static int hf_nfapi_n_pucch_2_3 = -1;
1306 static int hf_nfapi_starting_prb = -1;
1307 static int hf_nfapi_antenna_port = -1;
1308 static int hf_nfapi_number_of_combs = -1;
1309 static int hf_nfapi_number_of_pucch_resource = -1;
1310 static int hf_nfapi_pucch_index_p1 = -1;
1311 static int hf_nfapi_n_pucch_1_0 = -1;
1312 static int hf_nfapi_n_pucch_1_1 = -1;
1313 static int hf_nfapi_n_pucch_1_2 = -1;
1314 static int hf_nfapi_n_pucch_1_3 = -1;
1315 static int hf_nfapi_srs_bandwidth = -1;
1316 static int hf_nfapi_frequency_domain_position = -1;
1317 static int hf_nfapi_srs_hopping_bandwidth = -1;
1318 static int hf_nfapi_transmission_comb = -1;
1319 static int hf_nfapi_i_srs = -1;
1320 static int hf_nfapi_sounding_reference_cyclic_shift = -1;
1321 static int hf_nfapi_pdu_length = -1;
1322 static int hf_nfapi_crc_flag = -1;
1323 static int hf_nfapi_number_of_hi_pdus = -1;
1324 static int hf_nfapi_number_of_dci_pdus = -1;
1325 static int hf_nfapi_hi_dci0_pdu_type = -1;
1326 static int hf_nfapi_hi_value = -1;
1327 static int hf_nfapi_i_phich = -1;
1328 static int hf_nfapi_flag_tb2 = -1;
1329 static int hf_nfapi_hi_value_2 = -1;
1330 static int hf_nfapi_ue_tx_antenna_selection = -1;
1331 static int hf_nfapi_cqi_csi_request = -1;
1332 static int hf_nfapi_ul_index = -1;
1333 static int hf_nfapi_dl_assignment_index = -1;
1334 static int hf_nfapi_tpc_bitmap = -1;
1335 static int hf_nfapi_new_data_indication_two = -1;
1336 static int hf_nfapi_size_of_cqi_csi_feild = -1;
1337 static int hf_nfapi_resource_allocation_flag = -1;
1338 static int hf_nfapi_number_of_antenna_ports = -1;
1339 static int hf_nfapi_n_ul_rb = -1;
1340 static int hf_nfapi_pscch_resource = -1;
1341 static int hf_nfapi_time_resource_pattern = -1;
1342 static int hf_nfapi_mpdcch_transmission_type = -1;
1343 static int hf_nfapi_drms_scrambling_init = -1;
1344 static int hf_nfapi_pusch_repetition_levels = -1;
1345 static int hf_nfapi_frequency_hopping_flag = -1;
1346 static int hf_nfapi_csi_request = -1;
1347 static int hf_nfapi_dai_presence_flag = -1;
1348 static int hf_nfapi_total_dci_length_include_padding = -1;
1349 static int hf_nfapi_data_offset = -1;
1350 static int hf_nfapi_ul_cqi = -1;
1351 static int hf_nfapi_timing_advance_r9 = -1;
1352 static int hf_nfapi_timing_advance = -1;
1353 static int hf_nfapi_harq_data_value_0 = -1;
1354 static int hf_nfapi_harq_data_value_0_special = -1;
1355 static int hf_nfapi_harq_data_value_1 = -1;
1356 static int hf_nfapi_harq_data_value_2 = -1;
1357 static int hf_nfapi_harq_data_value_3 = -1;
1358 static int hf_nfapi_tdd_harq_mode = -1;
1359 static int hf_nfapi_fdd_harq_mode = -1;
1360 static int hf_nfapi_number_of_ack_nack = -1;
1361 static int hf_nfapi_harq_tb_1 = -1;
1362 static int hf_nfapi_harq_tb_2 = -1;
1363 static int hf_nfapi_harq_tb_n = -1;
1364 static int hf_nfapi_channel = -1;
1365 static int hf_nfapi_ri = -1;
1366 static int hf_nfapi_number_of_cc_reported = -1;
1367 static int hf_nfapi_preamble = -1;
1368 static int hf_nfapi_rach_resource_type = -1;
1369 static int hf_nfapi_snr = -1;
1370 static int hf_nfapi_doppler_estimation = -1;
1371 static int hf_nfapi_rb_start = -1;
1372 static int hf_nfapi_up_pts_symbol = -1;
1373 static int hf_nfapi_number_prb_per_subband = -1;
1374 static int hf_nfapi_number_antennas = -1;
1375 static int hf_nfapi_subband_index = -1;
1376 static int hf_nfapi_channel_coefficient = -1;
1377 static int hf_nfapi_ul_rtoa = -1;
1378 static int hf_nfapi_mp_cca = -1;
1379 static int hf_nfapi_n_cca = -1;
1380 static int hf_nfapi_offset = -1;
1381 static int hf_nfapi_lte_txop_sf = -1;
1382 static int hf_nfapi_txop_sfn_sf_end = -1;
1383 static int hf_nfapi_lbt_mode = -1;
1384 static int hf_nfapi_sfn_sf_end = -1;
1385 static int hf_nfapi_result = -1;
1386 static int hf_nfapi_txop_symbols = -1;
1387 static int hf_nfapi_initial_partial_sf = -1;
1388 static int hf_nfapi_frequency_band_indicator = -1;
1389 static int hf_nfapi_measurement_period = -1;
1390 static int hf_nfapi_bandwidth = -1;
1391 static int hf_nfapi_timeout = -1;
1392 static int hf_nfapi_number_of_earfcns = -1;
1393 static int hf_nfapi_uarfcn = -1;
1394 static int hf_nfapi_number_of_uarfcns = -1;
1395 static int hf_nfapi_arfcn = -1;
1396 static int hf_nfapi_arfcn_direction = -1;
1397 static int hf_nfapi_number_of_arfcns = -1;
1398 static int hf_nfapi_rssi = -1;
1399 static int hf_nfapi_number_of_rssi = -1;
1400 static int hf_nfapi_pci = -1;
1401 static int hf_nfapi_measurement_bandwidth = -1;
1402 static int hf_nfapi_exhaustive_search = -1;
1403 static int hf_nfapi_number_of_pci = -1;
1404 static int hf_nfapi_psc = -1;
1405 static int hf_nfapi_number_of_psc = -1;
1406 static int hf_nfapi_rsrp = -1;
1407 static int hf_nfapi_rsrq = -1;
1408 static int hf_nfapi_number_of_lte_cells_found = -1;
1409 static int hf_nfapi_rscp = -1;
1410 static int hf_nfapi_enco = -1;
1411 static int hf_nfapi_number_of_utran_cells_found = -1;
1412 static int hf_nfapi_bsic = -1;
1413 static int hf_nfapi_rxlev = -1;
1414 static int hf_nfapi_rxqual = -1;
1415 static int hf_nfapi_sfn_offset = -1;
1416 static int hf_nfapi_number_of_geran_cells_found = -1;
1417 static int hf_nfapi_number_of_tx_antenna = -1;
1418 static int hf_nfapi_mib = -1;
1419 static int hf_nfapi_phich_configuration = -1;
1420 static int hf_nfapi_retry_count = -1;
1421 static int hf_nfapi_sib1 = -1;
1422 static int hf_nfapi_si_periodicity = -1;
1423 static int hf_nfapi_si_index = -1;
1424 static int hf_nfapi_number_of_si_periodicity = -1;
1425 static int hf_nfapi_si_window_length = -1;
1426 static int hf_nfapi_sib_type = -1;
1427 static int hf_nfapi_sib = -1;
1428 static int hf_nfapi_si = -1;
1429 static int hf_nfapi_pnf_search_state = -1;
1430 static int hf_nfapi_pnf_broadcast_state = -1;
1431
1432 static const value_string message_id_vals[] =
1433 {
1434         { NFAPI_DL_CONFIG_REQUEST_MSG_ID, "DL_CONFIG.request" },
1435         { NFAPI_UL_CONFIG_REQUEST_MSG_ID, "UL_CONFIG.request" },
1436         { NFAPI_SUBFRAME_INDICATION_MSG_ID, "SUBFRAME_INDICATION" },
1437         { NFAPI_HI_DCI0_REQUEST_MSG_ID, "HI_DCI0.request" },
1438         { NFAPI_TX_REQUEST_MSG_ID, "TX.request" },
1439         { NFAPI_HARQ_INDICATION_MSG_ID, "HARQ.indication" },
1440         { NFAPI_CRC_INDICATION_MSG_ID, "CRC.indication" },
1441         { NFAPI_RX_ULSCH_INDICATION_MSG_ID, "RX_ULSCH.indication" },
1442         { NFAPI_RACH_INDICATION_MSG_ID, "RACH.indication" },
1443         { NFAPI_SRS_INDICATION_MSG_ID, "SRS.indication" },
1444         { NFAPI_RX_SR_INDICATION_MSG_ID, "RX_SR.indication" },
1445         { NFAPI_RX_CQI_INDICATION_MSG_ID, "RX_CQI.indication" },
1446         { NFAPI_LBT_DL_CONFIG_REQUEST_MSG_ID, "LBT_DL_CONFIG.request" },
1447         { NFAPI_LBT_DL_INDICATION_MSG_ID, "LBT_DL.indication" },
1448
1449         { NFAPI_PNF_PARAM_REQUEST_MSG_ID, "PNF_PARAM.request" },
1450         { NFAPI_PNF_PARAM_RESPONSE_MSG_ID, "PNF_PARAM.response" },
1451         { NFAPI_PNF_CONFIG_REQUEST_MSG_ID, "PNF_CONFIG.request" },
1452         { NFAPI_PNF_CONFIG_RESPONSE_MSG_ID, "PNF_CONFIG.response" },
1453         { NFAPI_PNF_START_REQUEST_MSG_ID, "PNF_START.request" },
1454         { NFAPI_PNF_START_RESPONSE_MSG_ID, "PNF_START.response" },
1455         { NFAPI_PNF_STOP_REQUEST_MSG_ID, "PNF_STOP.request" },
1456         { NFAPI_PNF_STOP_RESPONSE_MSG_ID, "PNF_STOP.response" },
1457         { NFAPI_PARAM_REQUEST_MSG_ID, "PARAM.request" },
1458         { NFAPI_PARAM_RESPONSE_MSG_ID, "PARAM.response" },
1459         { NFAPI_CONFIG_REQUEST_MSG_ID, "CONFIG.request" },
1460         { NFAPI_CONFIG_RESPONSE_MSG_ID, "CONFIG.response" },
1461         { NFAPI_START_REQUEST_MSG_ID, "START.request" },
1462         { NFAPI_START_RESPONSE_MSG_ID, "START.response" },
1463         { NFAPI_STOP_REQUEST_MSG_ID, "STOP.request" },
1464         { NFAPI_STOP_RESPONSE_MSG_ID, "STOP.response" },
1465         { NFAPI_MEASUREMENT_REQUEST_MSG_ID, "MEASUREMENT.request" },
1466         { NFAPI_MEASUREMENT_RESPONSE_MSG_ID, "MEASUREMENT.response" },
1467
1468         { NFAPI_DL_NODE_SYNC_MSG_ID, "UL_NODE_SYNC" },
1469         { NFAPI_UL_NODE_SYNC_MSG_ID, "DL_NODE_SYNC" },
1470         { NFAPI_TIMING_INFO_MSG_ID, "TIMING_INFO" },
1471
1472         { NFAPI_RSSI_REQUEST_MSG_ID, "RSSI.request" },
1473         { NFAPI_RSSI_RESPONSE_MSG_ID, "RSSI.response" },
1474         { NFAPI_RSSI_INDICATION_MSG_ID, "RSSI.indication" },
1475         { NFAPI_CELL_SEARCH_REQUEST_MSG_ID, "CELL_SEARCH.request" },
1476         { NFAPI_CELL_SEARCH_RESPONSE_MSG_ID, "CELL_SEARCH.response" },
1477         { NFAPI_CELL_SEARCH_INDICATION_MSG_ID, "CELL_SEARCH.indication" },
1478         { NFAPI_BROADCAST_DETECT_REQUEST_MSG_ID, "BROADCAST_DETECT.request" },
1479         { NFAPI_BROADCAST_DETECT_RESPONSE_MSG_ID, "BROADCAST_DETECT.response" },
1480         { NFAPI_BROADCAST_DETECT_INDICATION_MSG_ID, "BROADCAST_DETECT.indication" },
1481         { NFAPI_SYSTEM_INFORMATION_SCHEDULE_REQUEST_MSG_ID, "SYSTEM_INFORMATION_SCHEDULE.request" },
1482         { NFAPI_SYSTEM_INFORMATION_SCHEDULE_RESPONSE_MSG_ID, "SYSTEM_INFORMATION_SCHEDULE.response" },
1483         { NFAPI_SYSTEM_INFORMATION_SCHEDULE_INDICATION_MSG_ID, "SYSTEM_INFORMATION_SCHEDULE.indication" },
1484         { NFAPI_SYSTEM_INFORMATION_REQUEST_MSG_ID, "SYSTEM_INFORMATION.request" },
1485         { NFAPI_SYSTEM_INFORMATION_RESPONSE_MSG_ID, "SYSTEM_INFORMATION.response" },
1486         { NFAPI_SYSTEM_INFORMATION_INDICATION_MSG_ID, "SYSTEM_INFORMATION.indication" },
1487         { NFAPI_NMM_STOP_REQUEST_MSG_ID, "NMM_STOP.request" },
1488         { NFAPI_NMM_STOP_RESPONSE_MSG_ID, "NMM_STOP.response" },
1489
1490         { 0, NULL },
1491 };
1492
1493 static dissector_handle_t nfapi_handle;
1494 static dissector_table_t message_table;
1495
1496 static const int * dl_bandwidth_support_fields[] = {
1497         &hf_nfapi_dl_bandwidth_support_6,
1498         &hf_nfapi_dl_bandwidth_support_15,
1499         &hf_nfapi_dl_bandwidth_support_25,
1500         &hf_nfapi_dl_bandwidth_support_50,
1501         &hf_nfapi_dl_bandwidth_support_75,
1502         &hf_nfapi_dl_bandwidth_support_100,
1503         NULL
1504 };
1505
1506 static const int * ul_bandwidth_support_fields[] = {
1507         &hf_nfapi_ul_bandwidth_support_6,
1508         &hf_nfapi_ul_bandwidth_support_15,
1509         &hf_nfapi_ul_bandwidth_support_25,
1510         &hf_nfapi_ul_bandwidth_support_50,
1511         &hf_nfapi_ul_bandwidth_support_75,
1512         &hf_nfapi_ul_bandwidth_support_100,
1513         NULL
1514 };
1515
1516 static const int * maximum_3gpp_release_supported_fields[] = {
1517         &hf_nfapi_maximum_3gpp_release_supported_rel8,
1518         &hf_nfapi_maximum_3gpp_release_supported_rel9,
1519         &hf_nfapi_maximum_3gpp_release_supported_rel10,
1520         &hf_nfapi_maximum_3gpp_release_supported_rel11,
1521         &hf_nfapi_maximum_3gpp_release_supported_rel12,
1522         &hf_nfapi_maximum_3gpp_release_supported_rel13,
1523         &hf_nfapi_dl_bandwidth_support_100,
1524         NULL
1525 };
1526
1527 typedef void(*tlv_decode)(ptvcursor_t * ptvc, packet_info* pinfo);
1528
1529 typedef struct
1530 {
1531         guint16 tag_id;
1532         char* name;
1533         tlv_decode decode;
1534 } tlv_t;
1535
1536 static void dissect_tlv_list(ptvcursor_t * ptvc, packet_info* pinfo, gint len);
1537
1538 static void dissect_array_value(ptvcursor_t * ptvc, packet_info* pinfo, const char* name, guint32 ett_idx, guint32 count, tlv_decode decode)
1539 {
1540         guint16 i = 0;
1541
1542         if (count > 0)
1543         {
1544                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_idx, "%s", name);
1545
1546                 for (i = 0; i < count; ++i)
1547                 {
1548                         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_idx, "[%d]", i);
1549                         decode(ptvc, pinfo);
1550                         ptvcursor_pop_subtree(ptvc);
1551                 }
1552
1553                 ptvcursor_pop_subtree(ptvc);
1554         }
1555 }
1556
1557 static void dissect_pnf_param_general_value(ptvcursor_t * ptvc, packet_info* pinfo)
1558 {
1559         proto_item* item;
1560         guint32 test_value;
1561
1562         // nFAPI Sync Mode
1563         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_sync_mode, 1, ENC_BIG_ENDIAN, &test_value);
1564         if (test_value > 2)
1565         {
1566                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nfapi sync mode value [0..2]");
1567         }
1568
1569         // Location Mode
1570         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_location_mode, 1, ENC_BIG_ENDIAN, &test_value);
1571         if (test_value > 3)
1572         {
1573                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid location mode value [0..3]");
1574         }
1575
1576         ptvcursor_add(ptvc, hf_nfapi_location_coordinates, 2, ENC_BIG_ENDIAN|ENC_NA);
1577         ptvcursor_add(ptvc, hf_nfapi_dl_config_timing, 4, ENC_BIG_ENDIAN);
1578         ptvcursor_add(ptvc, hf_nfapi_tx_timing, 4, ENC_BIG_ENDIAN);
1579         ptvcursor_add(ptvc, hf_nfapi_ul_config_timing, 4, ENC_BIG_ENDIAN);
1580         ptvcursor_add(ptvc, hf_nfapi_hi_dci0_timing, 4, ENC_BIG_ENDIAN);
1581         ptvcursor_add(ptvc, hf_nfapi_maximum_number_phys, 2, ENC_BIG_ENDIAN);
1582         ptvcursor_add(ptvc, hf_nfapi_maximum_total_bandwidth, 2, ENC_BIG_ENDIAN);
1583         ptvcursor_add(ptvc, hf_nfapi_maximum_total_number_dl_layers, 1, ENC_BIG_ENDIAN);
1584         ptvcursor_add(ptvc, hf_nfapi_maximum_total_number_ul_layers, 1, ENC_BIG_ENDIAN);
1585
1586         // Shared Bands
1587         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_shared_bands, 1, ENC_BIG_ENDIAN, &test_value);
1588         if (test_value > 1)
1589         {
1590                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid shared bands value [0..1]");
1591         }
1592
1593         // Shared PA
1594         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_shared_pa, 1, ENC_BIG_ENDIAN, &test_value);
1595         if (test_value > 1)
1596         {
1597                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid shared pa value [0..1]");
1598         }
1599
1600         ptvcursor_add(ptvc, hf_nfapi_maximum_total_power, 2, ENC_BIG_ENDIAN);
1601         ptvcursor_add(ptvc, hf_nfapi_oui, 3, ENC_HOST_ENDIAN);
1602 }
1603 static void dissect_pnf_rf_config_instance_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
1604 {
1605         ptvcursor_add(ptvc, hf_nfapi_rf_config_index, 2, ENC_BIG_ENDIAN);
1606 }
1607
1608 static void dissect_pnf_phy_instance_value(ptvcursor_t * ptvc, packet_info* pinfo)
1609 {
1610         proto_item* item;
1611         guint32 array_size, test_value;
1612         guint64 test_value64;
1613
1614         ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1615
1616         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rfs, 2, ENC_BIG_ENDIAN, &array_size);
1617         dissect_array_value(ptvc, pinfo, "RF Config List", ett_nfapi_pnf_phy, array_size, dissect_pnf_rf_config_instance_value);
1618
1619         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rf_exclusions, 2, ENC_BIG_ENDIAN, &array_size);
1620         dissect_array_value(ptvc, pinfo, "RF Exclustion List", ett_nfapi_pnf_phy, array_size, dissect_pnf_rf_config_instance_value);
1621
1622         // Downlink Channel Bandwidth Supported
1623         item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
1624                                                                                         hf_nfapi_downlink_channel_bandwidth_supported, ett_nfapi_downlink_bandwidth_support, dl_bandwidth_support_fields, ENC_BIG_ENDIAN, &test_value64);
1625         if (test_value64 > 0x3F)
1626         {
1627                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink channel bandwidth supported bits [0..0x3F]");
1628         }
1629         ptvcursor_advance(ptvc, 2);
1630
1631         // Uplink Channel Bandwidth Supported
1632         item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
1633                                                                                         hf_nfapi_uplink_channel_bandwidth_supported, ett_nfapi_uplink_bandwidth_support, ul_bandwidth_support_fields, ENC_BIG_ENDIAN, &test_value64);
1634         if (test_value64 > 0x3F)
1635         {
1636                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid uplink channel bandwidht supported bits [0..0x3F]");
1637         }
1638         ptvcursor_advance(ptvc, 2);
1639
1640         // Number of DL layers supported
1641         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_dl_layers_supported, 1, ENC_BIG_ENDIAN, &test_value);
1642         switch (test_value)
1643         {
1644         case 1:
1645         case 2:
1646         case 4:
1647         case 8:
1648                 break;
1649         default:
1650                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of dl layers supported value [1, 2, 4, 8]");
1651                 break;
1652         }
1653
1654         // Number of DL layers supported
1655         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ul_layers_supported, 1, ENC_BIG_ENDIAN, &test_value);
1656         switch (test_value)
1657         {
1658         case 1:
1659         case 2:
1660         case 4:
1661         case 8:
1662                 break;
1663         default:
1664                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ul layers supported value [1, 2, 4, 8]");
1665                 break;
1666         }
1667
1668         // Maximum 3GPP Release Supported
1669         item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
1670                                                                                         hf_nfapi_maximum_3gpp_release_supported, ett_nfapi_release_support, maximum_3gpp_release_supported_fields, ENC_BIG_ENDIAN, &test_value64);
1671         if (test_value64 > 0x3F)
1672         {
1673                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid maximum 3GPP release supported value [0..0x3F]");
1674         }
1675         ptvcursor_advance(ptvc, 2);
1676
1677         // NMM Modes Supported
1678         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nmm_modes_supported, 1, ENC_BIG_ENDIAN, &test_value);
1679         if (test_value > 3)
1680         {
1681                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nmm modes supported value [0..3]");
1682         }
1683 }
1684
1685 static void dissect_pnf_phy_value(ptvcursor_t * ptvc, packet_info* pinfo)
1686 {
1687         guint32 num_phy;
1688         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_phy);
1689         dissect_array_value(ptvc, pinfo, "PHY List", ett_nfapi_pnf_phy, num_phy, dissect_pnf_phy_instance_value);
1690 }
1691
1692 static void dissect_pnf_rf_config_value(ptvcursor_t * ptvc, packet_info* pinfo)
1693 {
1694         proto_item* item;
1695         guint32 test_value;
1696
1697         ptvcursor_add(ptvc, hf_nfapi_rf_config_index, 2, ENC_BIG_ENDIAN);
1698         ptvcursor_add(ptvc, hf_nfapi_band, 2, ENC_BIG_ENDIAN);
1699         ptvcursor_add(ptvc, hf_nfapi_maximum_transmit_power, 2, ENC_BIG_ENDIAN);
1700         ptvcursor_add(ptvc, hf_nfapi_minimum_transmit_power, 2, ENC_BIG_ENDIAN);
1701
1702         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_antennas_suppported, 1, ENC_BIG_ENDIAN, &test_value);
1703         switch (test_value)
1704         {
1705         case 1:
1706         case 2:
1707         case 4:
1708         case 8:
1709                 break;
1710         default:
1711                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of supported antennas [1, 2, 4, 8]");
1712                 break;
1713         }
1714
1715         ptvcursor_add(ptvc, hf_nfapi_minimum_downlink_frequency, 4, ENC_BIG_ENDIAN);
1716         ptvcursor_add(ptvc, hf_nfapi_maximum_downlink_frequency, 4, ENC_BIG_ENDIAN);
1717         ptvcursor_add(ptvc, hf_nfapi_minimum_uplink_frequency, 4, ENC_BIG_ENDIAN);
1718         ptvcursor_add(ptvc, hf_nfapi_maximum_uplink_frequency, 4, ENC_BIG_ENDIAN);
1719 }
1720
1721
1722 static void dissect_pnf_rf_value(ptvcursor_t * ptvc, packet_info* pinfo)
1723 {
1724         guint32 num_rf;
1725         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rfs, 2, ENC_BIG_ENDIAN, &num_rf);
1726         dissect_array_value(ptvc, pinfo, "RF List", ett_nfapi_pnf_phy_rf_config, num_rf, dissect_pnf_rf_config_value);
1727 }
1728
1729 static void dissect_pnf_phy_rel10_instance_value(ptvcursor_t * ptvc, packet_info* pinfo)
1730 {
1731         proto_item* item;
1732         guint32 test_value;
1733
1734         // PHY Config Index
1735         ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1736
1737         // Transmission mode 7 supported
1738         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_mode7_supported, 2, ENC_BIG_ENDIAN, &test_value);
1739         if (test_value > 1)
1740         {
1741                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode 7 supported value [0..1]");
1742         }
1743
1744         // Two antennas ports for PUCCH
1745         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_transmission_mode8_supported, 2, ENC_BIG_ENDIAN, &test_value);
1746         if (test_value > 1)
1747         {
1748                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode 8 supported value [0..1]");
1749         }
1750
1751         // Transmission mode 8 supported
1752         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_two_antennas_ports_for_pucch, 2, ENC_BIG_ENDIAN, &test_value);
1753         if (test_value > 1)
1754         {
1755                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid two antennas ports for pucch value [0..1]");
1756         }
1757
1758         // Transmission mode 9 supported
1759         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_transmission_mode_9_supported, 2, ENC_BIG_ENDIAN, &test_value);
1760         if (test_value > 1)
1761         {
1762                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode 9 supported value [0..1]");
1763         }
1764
1765         // Simultaneous PUCCH PUSCH
1766         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_simultaneous_pucch_pusch, 2, ENC_BIG_ENDIAN, &test_value);
1767         if (test_value > 1)
1768         {
1769                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid simultaneous pucch pusch supported value [0..1]");
1770         }
1771
1772         // Four layer Tx with TM3 and TM4
1773         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_four_layer_tx_with_tm3_and_tm4, 2, ENC_BIG_ENDIAN, &test_value);
1774         if (test_value > 1)
1775         {
1776                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid four layer tx with tm3 and tm4 value [0..1]");
1777         }
1778 }
1779
1780 static void dissect_pnf_phy_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
1781 {
1782         guint32 num_phy;
1783         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_phy);
1784         dissect_array_value(ptvc, pinfo, "PHY Rel 10 List", ett_nfapi_pnf_phy_rel10, num_phy, dissect_pnf_phy_rel10_instance_value);
1785 }
1786
1787 static void dissect_pnf_phy_rel11_instance_value(ptvcursor_t * ptvc, packet_info* pinfo)
1788 {
1789         proto_item* item;
1790         guint32 test_value;
1791
1792         // PHY Config Index
1793         ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1794
1795         // ePDCCH supported
1796         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_epdcch_supported, 2, ENC_BIG_ENDIAN, &test_value);
1797         if (test_value > 1)
1798         {
1799                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid edpcch supported value [0..1]");
1800         }
1801
1802         // Multi ACK CSI reporting
1803         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_multi_ack_csi_reporting, 2, ENC_BIG_ENDIAN, &test_value);
1804         if (test_value > 1)
1805         {
1806                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid multi ack csi reporting value [0..1]");
1807         }
1808
1809         // PUCCH Tx diversity with channel selection
1810         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_pucch_tx_diversity_with_channel_selection, 2, ENC_BIG_ENDIAN, &test_value);
1811         if (test_value > 1)
1812         {
1813                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch tx diversity with channel selection value [0..1]");
1814         }
1815
1816         // UL CoMP supported
1817         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_ul_comp_supported, 2, ENC_BIG_ENDIAN, &test_value);
1818         if (test_value > 1)
1819         {
1820                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul comp supported value [0..1]");
1821         }
1822
1823         // Transmission mode 5 supported
1824         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_transmission_mode_5_supported, 2, ENC_BIG_ENDIAN, &test_value);
1825         if (test_value > 1)
1826         {
1827                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode 5 supported value [0..1]");
1828         }
1829 }
1830
1831 static void dissect_pnf_phy_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
1832 {
1833         guint32 num_phy;
1834         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_phy);
1835         dissect_array_value(ptvc, pinfo, "PHY Rel 11 List", ett_nfapi_pnf_phy_rel11, num_phy, dissect_pnf_phy_rel11_instance_value);
1836 }
1837
1838 static void dissect_pnf_phy_rel12_instance_value(ptvcursor_t * ptvc, packet_info* pinfo)
1839 {
1840         proto_item* item;
1841         guint32 test_value;
1842
1843         // PHY Config Index
1844         ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1845
1846         // CSI subframe set
1847         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_subframe_set, 2, ENC_BIG_ENDIAN, &test_value);
1848         if (test_value > 1)
1849         {
1850                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi subframe set value [0..1]");
1851         }
1852
1853         // Enhanced 4TX codebook
1854         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_enhanced_4tx_codebook, 2, ENC_BIG_ENDIAN, &test_value);
1855         if (test_value > 1)
1856         {
1857                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid enhanced 4TX codebook value [0..1]");
1858         }
1859
1860         // DRS supported
1861         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_drs_supported, 2, ENC_BIG_ENDIAN, &test_value);
1862         if (test_value > 1)
1863         {
1864                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drs supported value [0..1]");
1865         }
1866
1867         // UL 64QAM supported
1868         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_ul_64qam_supported, 2, ENC_BIG_ENDIAN, &test_value);
1869         if (test_value > 1)
1870         {
1871                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul 64 QAM supported value [0..1]");
1872         }
1873
1874         // Transmission mode 10 supported
1875         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_transmission_mode_10_supported, 2, ENC_BIG_ENDIAN, &test_value);
1876         if (test_value > 1)
1877         {
1878                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode 10 supported value [0..1]");
1879         }
1880
1881         // Alternative TBS indices
1882         item = ptvcursor_add_ret_uint(ptvc, hi_nfapi_alternative_tbs_indices, 2, ENC_BIG_ENDIAN, &test_value);
1883         if (test_value > 1)
1884         {
1885                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid alternative tbs indicies supported value [0..1]");
1886         }
1887 }
1888
1889 static void dissect_pnf_phy_rel12_value(ptvcursor_t * ptvc, packet_info* pinfo)
1890 {
1891         guint32 num_phy;
1892         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_phy);
1893         dissect_array_value(ptvc, pinfo, "PHY Rel 12 List", ett_nfapi_pnf_phy_rel12, num_phy, dissect_pnf_phy_rel12_instance_value);
1894 }
1895
1896 static void dissect_pnf_phy_rel13_instance_value(ptvcursor_t * ptvc, packet_info* pinfo)
1897 {
1898         proto_item* item;
1899         guint32 test_value;
1900
1901         // PHY Config Index
1902         ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1903
1904         // PUCCH format 4 supported
1905         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_format_4_supported, 2, ENC_BIG_ENDIAN, &test_value);
1906         if (test_value > 1)
1907         {
1908                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch format 4 supported value [0..1]");
1909         }
1910
1911         // PUCCH format 5 supported
1912         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_format_5_supported, 2, ENC_BIG_ENDIAN, &test_value);
1913         if (test_value > 1)
1914         {
1915                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch format 5 supported value [0..1]");
1916         }
1917
1918         // More than 5 CA support
1919         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_more_than_5_ca_supported, 2, ENC_BIG_ENDIAN, &test_value);
1920         if (test_value > 1)
1921         {
1922                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid more than 5 ca supported value [0..1]");
1923         }
1924
1925         // LAA supported
1926         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_laa_supported, 2, ENC_BIG_ENDIAN, &test_value);
1927         if (test_value > 1)
1928         {
1929                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid laa supported value [0..1]");
1930         }
1931
1932         // LAA ending in DwPTS supported
1933         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_laa_ending_in_dwpts_supported, 2, ENC_BIG_ENDIAN, &test_value);
1934         if (test_value > 1)
1935         {
1936                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid laa ending in dwpts supported value [0..1]");
1937         }
1938
1939         // LAA starting in second slot Supported
1940         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_laa_starting_in_second_slot_supported, 2, ENC_BIG_ENDIAN, &test_value);
1941         if (test_value > 1)
1942         {
1943                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid laa starting in second slot supported value [0..1]");
1944         }
1945
1946         // Beamforming Supported
1947         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_beamforming_supported, 2, ENC_BIG_ENDIAN, &test_value);
1948         if (test_value > 1)
1949         {
1950                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid beamforming supported value [0..1]");
1951         }
1952
1953         // CSI-RS enhancements supported
1954         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_enhancements_supported, 2, ENC_BIG_ENDIAN, &test_value);
1955         if (test_value > 1)
1956         {
1957                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi rs enhancements supported value [0..1]");
1958         }
1959
1960         // DMRS enhancements supported
1961         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_enhancements_supported, 2, ENC_BIG_ENDIAN, &test_value);
1962         if (test_value > 1)
1963         {
1964                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms enhancements supported value [0..1]");
1965         }
1966
1967         // SRS enhancements supported
1968         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_srs_enhancements_supported, 2, ENC_BIG_ENDIAN, &test_value);
1969         if (test_value > 1)
1970         {
1971                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs enhancements supported value [0..1]");
1972         }
1973
1974 }
1975
1976 static void dissect_pnf_phy_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
1977 {
1978         guint32 num_phy;
1979         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_phy);
1980         dissect_array_value(ptvc, pinfo, "PHY Rel 13 List", ett_nfapi_pnf_phy_rel13, num_phy, dissect_pnf_phy_rel13_instance_value);
1981 }
1982
1983 static void dissect_pnf_phy_rf_config_instance_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
1984 {
1985         ptvcursor_add(ptvc, hf_nfapi_phy_rf_config_info_phy_id, 2, ENC_BIG_ENDIAN);
1986         ptvcursor_add(ptvc, hf_nfapi_pnf_phy_config_index, 2, ENC_BIG_ENDIAN);
1987         ptvcursor_add(ptvc, hf_nfapi_rf_config_index, 2, ENC_BIG_ENDIAN);
1988 }
1989 static void dissect_pnf_phy_rf_config_value(ptvcursor_t * ptvc, packet_info* pinfo)
1990 {
1991         guint32 num_configs;
1992         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pnf_phy_number_phy, 2, ENC_BIG_ENDIAN, &num_configs);
1993         dissect_array_value(ptvc, pinfo, "PHY RF Config List", ett_nfapi_pnf_phy_rf_config, num_configs, dissect_pnf_phy_rf_config_instance_value);
1994 }
1995
1996 static void dissect_dl_rs_tx_power_value(ptvcursor_t * ptvc, packet_info* pinfo)
1997 {
1998         guint32 test_value;
1999         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_rs_tx_power, 2, ENC_BIG_ENDIAN, &test_value);
2000
2001         if (!(test_value >= 1 && test_value <= 255))
2002         {
2003                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value [1..255]");
2004         }
2005 }
2006 static void dissect_received_interference_power_value(ptvcursor_t * ptvc, packet_info* pinfo)
2007 {
2008         guint32 test_value;
2009         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_received_interference_power, 2, ENC_BIG_ENDIAN, &test_value);
2010
2011         if (!(test_value >= 1 && test_value <= 255))
2012         {
2013                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value [1..255]");
2014         }
2015 }
2016 static void dissect_thermal_noise_power_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
2017 {
2018         ptvcursor_add(ptvc, hf_nfapi_thermal_noise_power, 2, ENC_BIG_ENDIAN);
2019 }
2020 static void dissect_dl_rs_tx_power_measurement_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
2021 {
2022         ptvcursor_add(ptvc, hf_nfapi_dl_rs_tx_power_measurement, 2, ENC_BIG_ENDIAN);
2023 }
2024
2025 static void dissect_received_interference_power_result_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
2026 {
2027         ptvcursor_add(ptvc, hf_nfapi_received_interference_power_measurement, 2, ENC_BIG_ENDIAN);
2028 }
2029 static void dissect_received_interference_power_measurement_value(ptvcursor_t * ptvc, packet_info* pinfo)
2030 {
2031         guint32 num_resource_block;
2032         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_resource_blocks, 2, ENC_BIG_ENDIAN, &num_resource_block);
2033         dissect_array_value(ptvc, pinfo, "Results", ett_nfapi_received_interference_power_mesurement_results, num_resource_block, dissect_received_interference_power_result_value);
2034 }
2035 static void dissect_thermal_noise_power_measurement_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
2036 {
2037         ptvcursor_add(ptvc, hf_nfapi_thermal_noise_power_measurement, 2, ENC_BIG_ENDIAN);
2038 }
2039 static void dissect_duplex_mode_value(ptvcursor_t * ptvc, packet_info* pinfo)
2040 {
2041         guint32 test_value;
2042         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_duplex_mode, 2, ENC_BIG_ENDIAN, &test_value);
2043
2044         if (test_value > 2)
2045         {
2046                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid duplex mode [0..2]");
2047         }
2048 }
2049 static void dissect_pcfich_power_offset_value(ptvcursor_t* ptvc, packet_info *pinfo)
2050 {
2051         guint32 test_value;
2052         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pcfich_power_offset, 2, ENC_BIG_ENDIAN, &test_value);
2053
2054         if (test_value > 10000)
2055         {
2056                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid power level [0..10000]");
2057         }
2058 }
2059 static void dissect_pb_value(ptvcursor_t * ptvc, packet_info* pinfo)
2060 {
2061         guint32 test_value;
2062         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pb, 2, ENC_BIG_ENDIAN, &test_value);
2063
2064         if (test_value > 3)
2065         {
2066                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink power allocation index [0..3]");
2067         }
2068 }
2069
2070 static void dissect_dl_cyclic_prefix_value(ptvcursor_t * ptvc, packet_info* pinfo)
2071 {
2072         guint32 test_value;
2073         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_dl_cyclic_prefix_type, 2, ENC_BIG_ENDIAN, &test_value);
2074
2075         if (test_value > 1)
2076         {
2077                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dl cyclic prefix type [0..1]");
2078         }
2079 }
2080 static void dissect_ul_cyclic_prefix_value(ptvcursor_t * ptvc, packet_info* pinfo)
2081 {
2082         guint32 test_value;
2083         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_ul_cyclic_prefix_type, 2, ENC_BIG_ENDIAN, &test_value);
2084
2085         if (test_value > 1)
2086         {
2087                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul cyclic prefix type [0..1]");
2088         }
2089 }
2090 static void dissect_dl_channel_bandwidth_value(ptvcursor_t * ptvc, packet_info* pinfo)
2091 {
2092         guint32 test_value;
2093         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_channel_bandwidth, 2, ENC_BIG_ENDIAN, &test_value);
2094
2095         if (!(test_value == 6 || test_value == 15 || test_value == 25 || test_value == 50 || test_value == 75 || test_value == 100))
2096         {
2097                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink bandwidth value [6, 15, 25, 50, 75, 100]");
2098         }
2099 }
2100 static void dissect_ul_channel_bandwidth_value(ptvcursor_t * ptvc, packet_info* pinfo)
2101 {
2102         guint32 test_value;
2103         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_uplink_channel_bandwidth, 2, ENC_BIG_ENDIAN, &test_value);
2104
2105         if (!(test_value == 6 || test_value == 15 || test_value == 25 || test_value == 50 || test_value == 75 || test_value == 100))
2106         {
2107                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid uplink bandwidth value [6, 15, 25, 50, 75, 100]");
2108         }
2109 }
2110 static void dissect_reference_signal_power_value(ptvcursor_t * ptvc, packet_info* pinfo)
2111 {
2112         guint32 test_value;
2113         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_reference_signal_power, 2, ENC_BIG_ENDIAN, &test_value);
2114
2115         if (test_value > 255)
2116         {
2117                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid reference signal power [0..255]");
2118         }
2119
2120 }
2121 static void dissect_tx_antenna_ports_value(ptvcursor_t * ptvc, packet_info* pinfo)
2122 {
2123         guint32 test_value;
2124         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tx_antenna_ports, 2, ENC_BIG_ENDIAN, &test_value);
2125
2126         if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16))
2127         {
2128                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tx antenna ports value [1, 2, 4, 8, 16]");
2129         }
2130 }
2131 static void dissect_rx_antenna_ports_value(ptvcursor_t * ptvc, packet_info* pinfo)
2132 {
2133         guint32 test_value;
2134         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rx_antenna_ports, 2, ENC_BIG_ENDIAN, &test_value);
2135
2136         if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16))
2137         {
2138                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rx antenna ports value [1, 2, 4, 8, 16]");
2139         }
2140 }
2141 static void dissect_phich_resource_value(ptvcursor_t * ptvc, packet_info* pinfo)
2142 {
2143         guint32 test_value;
2144         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_phich_resource, 2, ENC_BIG_ENDIAN, &test_value);
2145
2146         if (test_value > 3)
2147         {
2148                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid phich resource value [0..3]");
2149         }
2150 }
2151 static void dissect_phich_duration_value(ptvcursor_t * ptvc, packet_info* pinfo)
2152 {
2153         guint32 test_value;
2154         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_phich_duration, 2, ENC_BIG_ENDIAN, &test_value);
2155
2156         if (test_value > 1)
2157         {
2158                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid phich duration value [0..1]");
2159         }
2160 }
2161 static void dissect_phich_power_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2162 {
2163         guint32 test_value;
2164         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_phich_power_offset, 2, ENC_BIG_ENDIAN, &test_value);
2165
2166         if (test_value > 10000)
2167         {
2168                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid phich power offset value [0..10000]");
2169         }
2170 }
2171 static void dissect_psch_synch_signal_epre_eprers_value(ptvcursor_t * ptvc, packet_info* pinfo)
2172 {
2173         guint32 test_value;
2174         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_primary_synchronization_signal_epre_eprers, 2, ENC_BIG_ENDIAN, &test_value);
2175
2176         if (test_value > 10000)
2177         {
2178                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid primary synchronization signal epre/eprers value [0..10000]");
2179         }
2180 }
2181 static void dissect_physical_cell_id_value(ptvcursor_t * ptvc, packet_info* pinfo)
2182 {
2183         guint32 test_value;
2184         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_physical_cell_id, 2, ENC_BIG_ENDIAN, &test_value);
2185
2186         if (test_value > 503)
2187         {
2188                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid physical cell id [0..503]");
2189         }
2190 }
2191 static void dissect_ssch_synch_signal_epre_eprers_value(ptvcursor_t * ptvc, packet_info* pinfo)
2192 {
2193         guint32 test_value;
2194         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_secondary_synchronization_signal_epre_eprers, 2, ENC_BIG_ENDIAN, &test_value);
2195
2196         if (test_value > 10000)
2197         {
2198                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid secondary synchronization signal epre/eprers value [0..10000]");
2199         }
2200 }
2201 static void dissect_prach_configuration_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
2202 {
2203         guint32 test_value;
2204         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_configuration_index, 2, ENC_BIG_ENDIAN, &test_value);
2205
2206         if (test_value > 63)
2207         {
2208                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach configuration index [0..63]");
2209         }
2210 }
2211 static void dissect_prach_root_sequence_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
2212 {
2213         guint32 test_value;
2214         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_root_sequence_index, 2, ENC_BIG_ENDIAN, &test_value);
2215
2216         if (test_value > 837)
2217         {
2218                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach root sequency index [0..837]");
2219         }
2220 }
2221 static void dissect_prach_zero_correlation_zone_configuration_value(ptvcursor_t * ptvc, packet_info* pinfo)
2222 {
2223         guint32 test_value;
2224         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_zero_correlation_zone_configuration, 2, ENC_BIG_ENDIAN, &test_value);
2225
2226         // How do differentiate between fdd 0..6 and tdd 0..15 ranges?
2227         if (test_value > 15)
2228         {
2229                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid zero correlation zone configuration [0..15]");
2230         }
2231 }
2232 static void dissect_prach_high_speed_flag_value(ptvcursor_t * ptvc, packet_info* pinfo)
2233 {
2234         guint32 test_value;
2235         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_high_speed_flag, 2, ENC_BIG_ENDIAN, &test_value);
2236
2237         if (test_value > 1)
2238         {
2239                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid high speed flag value [0..1]");
2240         }
2241 }
2242 static void dissect_prach_frequency_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2243 {
2244         guint32 test_value;
2245         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_offset, 2, ENC_BIG_ENDIAN, &test_value);
2246
2247         // How to determine the ul channel bandwidth?
2248         if (test_value > (100 -6))
2249         {
2250                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach frequency offset value [0..94]");
2251         }
2252 }
2253 static void dissect_pusch_hopping_mode_value(ptvcursor_t * ptvc, packet_info* pinfo)
2254 {
2255         guint32 test_value;
2256         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_hopping_mode, 2, ENC_BIG_ENDIAN, &test_value);
2257
2258         if (test_value > 1)
2259         {
2260                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pusch hopping mode value [0..1]");
2261         }
2262 }
2263 static void dissect_pusch_hopping_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2264 {
2265         guint32 test_value;
2266         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_hopping_offset, 2, ENC_BIG_ENDIAN, &test_value);
2267
2268         if (test_value > 98)
2269         {
2270                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pusch hopping offset value [0..98]");
2271         }
2272 }
2273 static void dissect_pusch_number_of_subbands_value(ptvcursor_t * ptvc, packet_info* pinfo)
2274 {
2275         guint32 test_value;
2276         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_subbands, 2, ENC_BIG_ENDIAN, &test_value);
2277
2278         if (!(test_value >= 1 && test_value <= 4))
2279         {
2280                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of sub-bands [1..4]");
2281         }
2282 }
2283 static void dissect_pucch_delta_pucch_shift_value(ptvcursor_t * ptvc, packet_info* pinfo)
2284 {
2285         guint32 test_value;
2286         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_pucch_shift, 2, ENC_BIG_ENDIAN, &test_value);
2287
2288         if (!(test_value >= 1 && test_value <= 3))
2289         {
2290                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta pucch shift [1..3]");
2291         }
2292 }
2293 static void dissect_pucch_n_cqi_rb_value(ptvcursor_t * ptvc, packet_info* pinfo)
2294 {
2295         guint32 test_value;
2296         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_cqi_rb, 2, ENC_BIG_ENDIAN, &test_value);
2297
2298         if (test_value > 98)
2299         {
2300                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n cqi rb value [0..98]");
2301         }
2302 }
2303 static void dissect_pucch_n_an_cs_value(ptvcursor_t * ptvc, packet_info* pinfo)
2304 {
2305         guint32 test_value;
2306         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_an_cs, 2, ENC_BIG_ENDIAN, &test_value);
2307
2308         if (test_value > 7)
2309         {
2310                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n an cs value [0..7]");
2311         }
2312 }
2313 static void dissect_pucch_n1_pucch_an_value(ptvcursor_t * ptvc, packet_info* pinfo)
2314 {
2315         guint32 test_value;
2316         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n1_pucch_an, 2, ENC_BIG_ENDIAN, &test_value);
2317
2318         if (test_value > 2047)
2319         {
2320                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n1pucch an value [0..2047]");
2321         }
2322 }
2323 static void dissect_srs_bandwidth_configuration_value(ptvcursor_t * ptvc, packet_info* pinfo)
2324 {
2325         guint32 test_value;
2326         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_bandwidth_configuration, 2, ENC_BIG_ENDIAN, &test_value);
2327
2328         if (test_value > 7)
2329         {
2330                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs bandwidth configuration value [0..7]");
2331         }
2332 }
2333 static void dissect_srs_max_uppts_value(ptvcursor_t * ptvc, packet_info* pinfo)
2334 {
2335         guint32 test_value;
2336         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_max_up_pts, 2, ENC_BIG_ENDIAN, &test_value);
2337
2338         if (test_value > 1)
2339         {
2340                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid max up pts value [0..1]");
2341         }
2342 }
2343 static void dissect_srs_subframe_configuration_value(ptvcursor_t * ptvc, packet_info* pinfo)
2344 {
2345         guint32 test_value;
2346         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_srs_subframe_configuration, 2, ENC_BIG_ENDIAN, &test_value);
2347
2348         if (test_value > 15)
2349         {
2350                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs subframe configuration value [0..15]");
2351         }
2352 }
2353 static void dissect_srs_acknack_srs_sim_tx_value(ptvcursor_t * ptvc, packet_info* pinfo)
2354 {
2355         guint32 test_value;
2356         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_acknack_srs_simultaneous_transmission, 2, ENC_BIG_ENDIAN, &test_value);
2357
2358         if (test_value > 1)
2359         {
2360                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs ack nack srs simultaneous transmission value [0..1]");
2361         }
2362 }
2363 static void dissect_uplink_rs_hopping_value(ptvcursor_t * ptvc, packet_info* pinfo)
2364 {
2365         guint32 test_value;
2366         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_uplink_rs_hopping, 2, ENC_BIG_ENDIAN, &test_value);
2367
2368         if (test_value > 2)
2369         {
2370                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid uplink rs hopping value [0..2]");
2371         }
2372 }
2373 static void dissect_group_assignment_value(ptvcursor_t * ptvc, packet_info* pinfo)
2374 {
2375         guint32 test_value;
2376         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_group_assignment, 2, ENC_BIG_ENDIAN, &test_value);
2377
2378         if (test_value > 29)
2379         {
2380                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid group assignment value [0..29]");
2381         }
2382 }
2383 static void dissect_cyclic_shift_1_for_drms_value(ptvcursor_t * ptvc, packet_info* pinfo)
2384 {
2385         guint32 test_value;
2386         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cyclic_shift_1_for_drms, 2, ENC_BIG_ENDIAN, &test_value);
2387
2388         if (test_value > 7)
2389         {
2390                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cyclic shift 1 for drms value [0..7]");
2391         }
2392 }
2393 static void dissect_tdd_subframe_assignement_value(ptvcursor_t * ptvc, packet_info* pinfo)
2394 {
2395         guint32 test_value;
2396         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_subframe_assignment, 2, ENC_BIG_ENDIAN, &test_value);
2397
2398         if (test_value > 6)
2399         {
2400                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tdd subframe assignment value [0..6]");
2401         }
2402 }
2403 static void dissect_tdd_subframe_patterns_value(ptvcursor_t * ptvc, packet_info* pinfo)
2404 {
2405         guint32 test_value;
2406         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_special_subframe_patterns, 2, ENC_BIG_ENDIAN, &test_value);
2407
2408         if (test_value > 9)
2409         {
2410                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid special subframe pattern value [0..9]");
2411         }
2412 }
2413 static void dissect_laa_ed_threashold_for_lbt_for_pdsch_value(ptvcursor_t * ptvc, packet_info* pinfo)
2414 {
2415         guint32 test_value;
2416         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ed_threshold_for_lbt_for_pdsch, 2, ENC_BIG_ENDIAN, &test_value);
2417
2418         if (test_value > 70)
2419         {
2420                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ed threshold for ltb for pdsch value [0..70]");
2421         }
2422 }
2423 static void dissect_laa_ed_threashold_for_lbt_for_drs_value(ptvcursor_t * ptvc, packet_info* pinfo)
2424 {
2425         guint32 test_value;
2426         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ed_threshold_for_lbt_for_drs, 2, ENC_BIG_ENDIAN, &test_value);
2427
2428         if (test_value > 70)
2429         {
2430                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ed threshold for ltb for drs value [0..70]");
2431         }
2432 }
2433 static void dissect_laa_pd_threshold_value(ptvcursor_t * ptvc, packet_info* pinfo)
2434 {
2435         guint32 test_value;
2436         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pd_threshold, 2, ENC_BIG_ENDIAN, &test_value);
2437
2438         if (test_value > 70 && test_value != 65535)
2439         {
2440                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pd threshold value [0..70, 65536]");
2441         }
2442 }
2443 static void dissect_laa_multi_carrier_type_value(ptvcursor_t * ptvc, packet_info* pinfo)
2444 {
2445         guint32 test_value;
2446         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_multi_carrier_type, 2, ENC_BIG_ENDIAN, &test_value);
2447
2448         if (test_value > 4)
2449         {
2450                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mutli carrier type [0..4]");
2451         }
2452 }
2453 static void dissect_laa_multi_carrier_tx_value(ptvcursor_t * ptvc, packet_info* pinfo)
2454 {
2455         guint32 test_value;
2456         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_multi_carrier_tx, 2, ENC_BIG_ENDIAN, &test_value);
2457
2458         if (test_value > 1)
2459         {
2460                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mutli carrier tx value [0..1]");
2461         }
2462 }
2463 static void dissect_laa_multi_carrier_freeze_value(ptvcursor_t * ptvc, packet_info* pinfo)
2464 {
2465         guint32 test_value;
2466         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_multi_carrier_freeze, 2, ENC_BIG_ENDIAN, &test_value);
2467
2468         if (test_value > 1)
2469         {
2470                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mutli carrier freeze value [0..1]");
2471         }
2472 }
2473 static void dissect_laa_tx_antenna_port_for_drs_value(ptvcursor_t * ptvc, packet_info* pinfo)
2474 {
2475         guint32 test_value;
2476         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tx_antenna_ports_for_drs, 2, ENC_BIG_ENDIAN, &test_value);
2477
2478         if (!(test_value == 1 || test_value == 2 || test_value == 4))
2479         {
2480                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tx antenna ports for drs value [1, 2, 4]");
2481         }
2482 }
2483 static void dissect_laa_transmission_power_for_drs_value(ptvcursor_t * ptvc, packet_info* pinfo)
2484 {
2485         guint32 test_value;
2486         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power_for_drs, 2, ENC_BIG_ENDIAN, &test_value);
2487
2488         if (test_value > 10000)
2489         {
2490                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power for drs [0..10000]");
2491         }
2492 }
2493 static void dissect_emtc_pbch_repeitions_enabled_r13_value(ptvcursor_t * ptvc, packet_info* pinfo)
2494 {
2495         guint32 test_value;
2496         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_pbch_repetitions_enabled_r13, 2, ENC_BIG_ENDIAN, &test_value);
2497
2498         if (test_value > 1)
2499         {
2500                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pbch repetitions enabled r13 value [0..1]");
2501         }
2502 }
2503 static void dissect_emtc_prach_cat_m_root_sequence_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
2504 {
2505         guint32 test_value;
2506         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_cat_m_root_sequence_index, 2, ENC_BIG_ENDIAN, &test_value);
2507
2508         if (test_value > 837)
2509         {
2510                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach cat-m root sequence index value [0..837]");
2511         }
2512 }
2513 static void dissect_emtc_prach_cat_m_zero_correlation_zone_configuration_value(ptvcursor_t * ptvc, packet_info* pinfo)
2514 {
2515         guint32 test_value;
2516         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_cat_m_zero_correlation_zone_configuration, 2, ENC_BIG_ENDIAN, &test_value);
2517
2518         if (test_value > 15)
2519         {
2520                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach cat-m zero correlation zone configuration value [0..15]");
2521         }
2522 }
2523 static void dissect_emtc_prach_cat_m_high_speed_flag_value(ptvcursor_t * ptvc, packet_info* pinfo)
2524 {
2525         guint32 test_value;
2526         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_cat_m_high_speed_flag, 2, ENC_BIG_ENDIAN, &test_value);
2527
2528         if (test_value > 1)
2529         {
2530                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach cat-m high speed flag value [0..1]");
2531         }
2532 }
2533 static void dissect_emtc_prach_ce_level_0_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2534 {
2535         guint32 test_value;
2536         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_0_enable, 2, ENC_BIG_ENDIAN, &test_value);
2537
2538         if (test_value > 1)
2539         {
2540                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #0 enable value [0..1]");
2541         }
2542 }
2543 static void dissect_emtc_prach_ce_level_0_configuration_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2544 {
2545         guint32 test_value;
2546         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_0_configuration_index, 2, ENC_BIG_ENDIAN, &test_value);
2547
2548         if (test_value > 63)
2549         {
2550                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #0 configuration index value [0..63]");
2551         }
2552 }
2553 static void dissect_emtc_prach_ce_level_0_frequency_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2554 {
2555         guint32 test_value;
2556         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_0_frequency_offset, 2, ENC_BIG_ENDIAN, &test_value);
2557
2558         if (test_value > (100 - 6))
2559         {
2560                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #0 frequency offset value [0..94]");
2561         }
2562 }
2563 static void dissect_emtc_preach_ce_level_0_num_of_repeitions_per_attempt_value(ptvcursor_t * ptvc, packet_info* pinfo)
2564 {
2565         guint32 test_value;
2566         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);
2567
2568         if (!( test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2569                    test_value == 64 || test_value == 128))
2570         {
2571                 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]");
2572         }
2573 }
2574 static void dissect_emtc_ce_level_0_starting_subframe_periodicity_value(ptvcursor_t * ptvc, packet_info* pinfo)
2575 {
2576         guint32 test_value;
2577         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_0_starting_subframe_periodicity, 2, ENC_BIG_ENDIAN, &test_value);
2578
2579         if (!(test_value == 0xFFF || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2580                   test_value == 64 || test_value == 128 || test_value == 256))
2581         {
2582                 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]");
2583         }
2584 }
2585 static void dissect_emtc_preach_ce_level_0_hopping_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2586 {
2587         guint32 test_value;
2588         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_0_hopping_enabled, 2, ENC_BIG_ENDIAN, &test_value);
2589
2590         if (test_value > 1)
2591         {
2592                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #0 hopping enabled value [0..1]");
2593         }
2594 }
2595 static void dissect_emtc_preach_ce_level_0_hopping_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2596 {
2597         guint32 test_value;
2598         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_0_hopping_offset, 2, ENC_BIG_ENDIAN, &test_value);
2599
2600         if (test_value > 94)
2601         {
2602                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #0 hopping offset value [0..94]");
2603         }
2604 }
2605 static void dissect_emtc_prach_ce_level_1_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2606 {
2607         guint32 test_value;
2608         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_1_enable, 2, ENC_BIG_ENDIAN, &test_value);
2609
2610         if (test_value > 1)
2611         {
2612                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #1 enable value [0..1]");
2613         }
2614 }
2615 static void dissect_emtc_prach_ce_level_1_configuration_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2616 {
2617         guint32 test_value;
2618         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_1_configuration_index, 2, ENC_BIG_ENDIAN, &test_value);
2619
2620         if (test_value > 63)
2621         {
2622                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #1 configuration index value [0..63]");
2623         }
2624 }
2625 static void dissect_emtc_prach_ce_level_1_frequency_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2626 {
2627         guint32 test_value;
2628         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_1_frequency_offset, 2, ENC_BIG_ENDIAN, &test_value);
2629
2630         if (test_value > (100 - 6))
2631         {
2632                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #1 frequency offset value [0..94]");
2633         }
2634 }
2635 static void dissect_emtc_preach_ce_level_1_num_of_repeitions_per_attempt_value(ptvcursor_t * ptvc, packet_info* pinfo)
2636 {
2637         guint32 test_value;
2638         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);
2639
2640         if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2641                 test_value == 64 || test_value == 128))
2642         {
2643                 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]");
2644         }
2645 }
2646 static void dissect_emtc_ce_level_1_starting_subframe_periodicity_value(ptvcursor_t * ptvc, packet_info* pinfo)
2647 {
2648         guint32 test_value;
2649         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_1_starting_subframe_periodicity, 2, ENC_BIG_ENDIAN, &test_value);
2650
2651         if (!(test_value == 0xFFF || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2652                 test_value == 64 || test_value == 128 || test_value == 256))
2653         {
2654                 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]");
2655         }
2656 }
2657 static void dissect_emtc_preach_ce_level_1_hopping_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2658 {
2659         guint32 test_value;
2660         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_1_hopping_enabled, 2, ENC_BIG_ENDIAN, &test_value);
2661
2662         if (test_value > 1)
2663         {
2664                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #1 hopping enabled value [0..1]");
2665         }
2666 }
2667 static void dissect_emtc_preach_ce_level_1_hopping_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2668 {
2669         guint32 test_value;
2670         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_1_hopping_offset, 2, ENC_BIG_ENDIAN, &test_value);
2671
2672         if (test_value > 94)
2673         {
2674                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #1 hopping offset value [0..94]");
2675         }
2676 }
2677 static void dissect_emtc_prach_ce_level_2_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2678 {
2679         guint32 test_value;
2680         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_2_enable, 2, ENC_BIG_ENDIAN, &test_value);
2681
2682         if (test_value > 1)
2683         {
2684                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 enable value [0..1]");
2685         }
2686 }
2687 static void dissect_emtc_prach_ce_level_2_configuration_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2688 {
2689         guint32 test_value;
2690         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_2_configuration_index, 2, ENC_BIG_ENDIAN, &test_value);
2691
2692         if (test_value > 63)
2693         {
2694                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 configuration index value [0..63]");
2695         }
2696 }
2697 static void dissect_emtc_prach_ce_level_2_frequency_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2698 {
2699         guint32 test_value;
2700         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_2_frequency_offset, 2, ENC_BIG_ENDIAN, &test_value);
2701
2702         if (test_value > (100 - 6))
2703         {
2704                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 frequency offset value [0..94]");
2705         }
2706 }
2707 static void dissect_emtc_preach_ce_level_2_num_of_repeitions_per_attempt_value(ptvcursor_t * ptvc, packet_info* pinfo)
2708 {
2709         guint32 test_value;
2710         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);
2711
2712         if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2713                 test_value == 64 || test_value == 128))
2714         {
2715                 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]");
2716         }
2717 }
2718 static void dissect_emtc_ce_level_2_starting_subframe_periodicity_value(ptvcursor_t * ptvc, packet_info* pinfo)
2719 {
2720         guint32 test_value;
2721         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_2_starting_subframe_periodicity, 2, ENC_BIG_ENDIAN, &test_value);
2722
2723         if (!(test_value == 0xFFF || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2724                 test_value == 64 || test_value == 128 || test_value == 256))
2725         {
2726                 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]");
2727         }
2728 }
2729 static void dissect_emtc_preach_ce_level_2_hopping_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2730 {
2731         guint32 test_value;
2732         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_2_hopping_enabled, 2, ENC_BIG_ENDIAN, &test_value);
2733
2734         if (test_value > 1)
2735         {
2736                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 hopping enabled value [0..1]");
2737         }
2738 }
2739 static void dissect_emtc_preach_ce_level_2_hopping_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2740 {
2741         guint32 test_value;
2742         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_2_hopping_offset, 2, ENC_BIG_ENDIAN, &test_value);
2743
2744         if (test_value > 94)
2745         {
2746                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 hopping offset value [0..94]");
2747         }
2748 }
2749 static void dissect_emtc_prach_ce_level_3_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2750 {
2751         guint32 test_value;
2752         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_3_enable, 2, ENC_BIG_ENDIAN, &test_value);
2753
2754         if (test_value > 1)
2755         {
2756                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #3 enable value [0..1]");
2757         }
2758 }
2759 static void dissect_emtc_prach_ce_level_3_configuration_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2760 {
2761         guint32 test_value;
2762         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_3_configuration_index, 2, ENC_BIG_ENDIAN, &test_value);
2763
2764         if (test_value > 63)
2765         {
2766                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #2 configuration index value [0..63]");
2767         }
2768 }
2769 static void dissect_emtc_prach_ce_level_3_frequency_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2770 {
2771         guint32 test_value;
2772         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_3_frequency_offset, 2, ENC_BIG_ENDIAN, &test_value);
2773
2774         if (test_value > (100 - 6))
2775         {
2776                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #3 frequency offset value [0..94]");
2777         }
2778 }
2779 static void dissect_emtc_preach_ce_level_3_num_of_repeitions_per_attempt_value(ptvcursor_t * ptvc, packet_info* pinfo)
2780 {
2781         guint32 test_value;
2782         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);
2783
2784         if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2785                 test_value == 64 || test_value == 128))
2786         {
2787                 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]");
2788         }
2789 }
2790 static void dissect_emtc_ce_level_3_starting_subframe_periodicity_value(ptvcursor_t * ptvc, packet_info* pinfo)
2791 {
2792         guint32 test_value;
2793         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_3_starting_subframe_periodicity, 2, ENC_BIG_ENDIAN, &test_value);
2794
2795         if (!(test_value == 0xFFF || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16 || test_value == 32 ||
2796                 test_value == 64 || test_value == 128 || test_value == 256))
2797         {
2798                 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]");
2799         }
2800 }
2801 static void dissect_emtc_preach_ce_level_3_hopping_enabled_value(ptvcursor_t * ptvc, packet_info* pinfo)
2802 {
2803         guint32 test_value;
2804         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_prach_ce_level_3_hopping_enabled, 2, ENC_BIG_ENDIAN, &test_value);
2805
2806         if (test_value > 1)
2807         {
2808                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #3 hopping enabled value [0..1]");
2809         }
2810 }
2811 static void dissect_emtc_preach_ce_level_3_hopping_offset_value(ptvcursor_t * ptvc, packet_info* pinfo)
2812 {
2813         guint32 test_value;
2814         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_ce_level_3_hopping_offset, 2, ENC_BIG_ENDIAN, &test_value);
2815
2816         if (test_value > 94)
2817         {
2818                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach ce level #3 hopping offset value [0..94]");
2819         }
2820 }
2821 static void dissect_emtc_pucch_interval_ul_hopping_config_common_mode_a_value(ptvcursor_t * ptvc, packet_info* pinfo)
2822 {
2823         guint32 test_value;
2824         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_internal_ul_hopping_config_common_mode_a, 2, ENC_BIG_ENDIAN, &test_value);
2825
2826         if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 5 || test_value == 10 || test_value == 20))
2827         {
2828                 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]");
2829         }
2830 }
2831 static void dissect_emtc_pucch_interval_ul_hopping_config_common_mode_b_value(ptvcursor_t * ptvc, packet_info* pinfo)
2832 {
2833         guint32 test_value;
2834         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_internal_ul_hopping_config_common_mode_b, 2, ENC_BIG_ENDIAN, &test_value);
2835
2836         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))
2837         {
2838                 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]");
2839         }
2840 }
2841 static void dissect_dl_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_dl_bandwidth_support, ett_nfapi_downlink_bandwidth_support, dl_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 downlink bandwidth supported bits [0..0x3F]");
2849         }
2850
2851         ptvcursor_advance(ptvc, 2);
2852 }
2853 static void dissect_ul_bandwidth_support_value(ptvcursor_t * ptvc, packet_info* pinfo)
2854 {
2855         guint64 test_value64;
2856         proto_item* item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
2857                                         hf_nfapi_ul_bandwidth_support, ett_nfapi_uplink_bandwidth_support, ul_bandwidth_support_fields, ENC_BIG_ENDIAN, &test_value64);
2858         if (test_value64 > 0x3F)
2859         {
2860                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid uplink bandwidth supported bits [0..0x3F]");
2861         }
2862
2863         ptvcursor_advance(ptvc, 2);
2864
2865 }
2866 static void dissect_dl_modulation_value(ptvcursor_t * ptvc, packet_info* pinfo)
2867 {
2868         static const int * dl_modulation_support_fields[] = {
2869                 &hf_nfapi_dl_modulation_support_qpsk,
2870                 &hf_nfapi_dl_modulation_support_16qam,
2871                 &hf_nfapi_dl_modulation_support_64qam,
2872                 &hf_nfapi_dl_modulation_support_256qam,
2873                 NULL
2874         };
2875
2876         guint64 test_value64;
2877         proto_item* item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
2878                                         hf_nfapi_dl_modulation_support, ett_nfapi_downlink_modulation_support, dl_modulation_support_fields, ENC_BIG_ENDIAN, &test_value64);
2879
2880         if (test_value64 > 0xF)
2881         {
2882                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink modulation support bit [0..0xF]");
2883         }
2884
2885         ptvcursor_advance(ptvc, 2);
2886 }
2887 static void dissect_ul_modulation_value(ptvcursor_t * ptvc, packet_info* pinfo)
2888 {
2889         static const int * ul_modulation_support_fields[] = {
2890                 &hf_nfapi_ul_modulation_support_qpsk,
2891                 &hf_nfapi_ul_modulation_support_16qam,
2892                 &hf_nfapi_ul_modulation_support_64qam,
2893                 NULL
2894         };
2895
2896         guint64 test_value64;
2897         proto_item* item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
2898                                         hf_nfapi_ul_modulation_support, ett_nfapi_uplink_modulation_support, ul_modulation_support_fields, ENC_BIG_ENDIAN, &test_value64);
2899
2900         if (test_value64 > 0x7)
2901         {
2902                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid uplink modulation support bit [0..0x7]");
2903         }
2904
2905         ptvcursor_advance(ptvc, 2);
2906 }
2907 static void dissect_phy_antenna_capability_value(ptvcursor_t * ptvc, packet_info* pinfo)
2908 {
2909         guint32 test_value;
2910         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_phy_antenna_capability, 2, ENC_BIG_ENDIAN, &test_value);
2911
2912         if (!(test_value == 1 || test_value == 2 || test_value == 4 || test_value == 8 || test_value == 16))
2913         {
2914                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid phy antenna capability [1, 2, 4, 8, 16]");
2915         }
2916 }
2917 static void dissect_release_capability_value(ptvcursor_t * ptvc, packet_info* pinfo)
2918 {
2919         guint64 test_value64;
2920         proto_item* item = proto_tree_add_bitmask_ret_uint64(ptvcursor_tree(ptvc), ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc),
2921                                                                                         hf_nfapi_release_capability, ett_nfapi_release_support, maximum_3gpp_release_supported_fields, ENC_BIG_ENDIAN, &test_value64);
2922         if (test_value64 > 0x3F)
2923         {
2924                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid release capability value [0..0x3F]");
2925         }
2926
2927         ptvcursor_advance(ptvc, 2);
2928 }
2929 static void dissect_mbsfn_value(ptvcursor_t * ptvc, packet_info* pinfo)
2930 {
2931         guint32 test_value;
2932         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_mbsfn_capability, 2, ENC_BIG_ENDIAN, &test_value);
2933
2934         if (test_value > 1)
2935         {
2936                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mbsfn capability bit [0..0x1]");
2937         }
2938 }
2939 static void dissect_laa_support_value(ptvcursor_t * ptvc, packet_info* pinfo)
2940 {
2941         guint32 test_value;
2942         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_laa_capability, 2, ENC_BIG_ENDIAN, &test_value);
2943
2944         if (test_value > 1)
2945         {
2946                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid laa support bit [0..0x1]");
2947         }
2948 }
2949 static void dissect_laa_pd_sensing_lbt_support_value(ptvcursor_t * ptvc, packet_info* pinfo)
2950 {
2951         guint32 test_value;
2952         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_pd_sensing_lbt_support, 2, ENC_BIG_ENDIAN, &test_value);
2953
2954         if (test_value > 1)
2955         {
2956                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pd sensing lbt support bit [0..0x1]");
2957         }
2958 }
2959 static void dissect_laa_multi_carrier_lbt_support_value(ptvcursor_t * ptvc, packet_info* pinfo)
2960 {
2961         guint32 test_value;
2962         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_multi_carrier_lbt_support, 2, ENC_BIG_ENDIAN, &test_value);
2963
2964         if (test_value > 0xF)
2965         {
2966                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid multi carrier LBT support bit [0..0xF]");
2967         }
2968 }
2969 static void dissect_laa_partial_sf_support_value(ptvcursor_t * ptvc, packet_info* pinfo)
2970 {
2971         guint32 test_value;
2972         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_partial_sf_support, 2, ENC_BIG_ENDIAN, &test_value);
2973
2974         if (test_value > 0x1)
2975         {
2976                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid partial SF support bit [0..0x1]");
2977         }
2978 }
2979 static void dissect_data_report_mode_value(ptvcursor_t * ptvc, packet_info* pinfo)
2980 {
2981         gboolean test_value;
2982         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_data_report_mode, 2, ENC_BIG_ENDIAN, &test_value);
2983
2984         if (test_value > 1)
2985         {
2986                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid data report mode value [0..1]");
2987         }
2988 }
2989 static void dissect_sfn_sf_value(ptvcursor_t * ptvc, packet_info* pinfo)
2990 {
2991         guint32 test_value;
2992         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_sfnsf, 2, ENC_BIG_ENDIAN, &test_value);
2993
2994         guint32 sfn = test_value >> 0x4;
2995         guint32 sf = test_value & 0x000F;
2996         if (sfn > 1023 || sf > 9)
2997         {
2998                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid sfn/sf value sfn:%d [0..1023] sf:%d [0..9]", sfn, sf);
2999         }
3000 }
3001 static void dissect_phy_state_value(ptvcursor_t * ptvc, packet_info* pinfo)
3002 {
3003         guint32 test_value;
3004         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_phy_state, 2, ENC_BIG_ENDIAN, &test_value);
3005
3006         if (test_value > 2)
3007         {
3008                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid phy state [0..2]");
3009         }
3010 }
3011 static void dissect_p7_vnf_address_ipv4_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3012 {
3013         ptvcursor_add(ptvc, hf_nfapi_vnf_address_ipv4, 4, ENC_NA);
3014 }
3015 static void dissect_p7_vnf_address_ipv6_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3016 {
3017         ptvcursor_add(ptvc, hf_nfapi_vnf_address_ipv6, 16, ENC_NA);
3018 }
3019 static void dissect_p7_vnf_port_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3020 {
3021         ptvcursor_add(ptvc, hf_nfapi_vnf_port, 2, ENC_BIG_ENDIAN);
3022 }
3023 static void dissect_p7_pnf_address_ipv4_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3024 {
3025         ptvcursor_add(ptvc, hf_nfapi_pnf_address_ipv4, 4, ENC_NA);
3026 }
3027 static void dissect_p7_pnf_address_ipv6_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3028 {
3029         ptvcursor_add(ptvc, hf_nfapi_pnf_address_ipv6, 16, ENC_NA);
3030 }
3031 static void dissect_p7_pnf_port_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3032 {
3033         ptvcursor_add(ptvc, hf_nfapi_pnf_port, 2, ENC_BIG_ENDIAN);
3034 }
3035 static void dissect_downlink_ues_per_subframe_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3036 {
3037         ptvcursor_add(ptvc, hf_nfapi_dl_ue_per_sf, 1, ENC_BIG_ENDIAN);
3038 }
3039 static void dissect_uplink_ues_per_subframe_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3040 {
3041         ptvcursor_add(ptvc, hf_nfapi_ul_ue_per_sf, 1, ENC_BIG_ENDIAN);
3042 }
3043 static void dissect_rf_band_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3044 {
3045         ptvcursor_add(ptvc, hf_nfapi_band, 2, ENC_BIG_ENDIAN);
3046 }
3047 static void dissect_rf_bands_value(ptvcursor_t * ptvc, packet_info* pinfo)
3048 {
3049         guint32 count;
3050         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rf_bands, 2, ENC_BIG_ENDIAN, &count);
3051         dissect_array_value(ptvc, pinfo, "RF Band List", ett_nfapi_rf_bands, count, dissect_rf_band_value);
3052 }
3053 static void dissect_timing_window_value(ptvcursor_t * ptvc, packet_info* pinfo)
3054 {
3055         guint32 test_value;
3056         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_window, 1, ENC_BIG_ENDIAN, &test_value);
3057
3058         if (test_value > 30)
3059         {
3060                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing window value [0..30]");
3061         }
3062 }
3063 static void dissect_timing_info_mode_value(ptvcursor_t * ptvc, packet_info* pinfo)
3064 {
3065         guint32 test_value;
3066         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_info_mode, 1, ENC_BIG_ENDIAN, &test_value);
3067
3068         if (test_value > 0x3)
3069         {
3070                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing info mode [0..0x3]");
3071         }
3072 }
3073 static void dissect_timing_info_period_value(ptvcursor_t * ptvc, packet_info* pinfo)
3074 {
3075         guint32 test_value;
3076         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_info_period, 1, ENC_BIG_ENDIAN, &test_value);
3077
3078         if (!(test_value >= 1 && test_value <= 255))
3079         {
3080                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing info period [1..255]");
3081         }
3082 }
3083 static void dissect_maximum_transmit_power_value(ptvcursor_t * ptvc, packet_info* pinfo)
3084 {
3085         guint32 test_value;
3086         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_maximum_transmit_power_2, 2, ENC_BIG_ENDIAN, &test_value);
3087
3088         if (test_value > 700)
3089         {
3090                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid maxiumum transmit power [0..700]");
3091         }
3092 }
3093 static void dissect_earfcn_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3094 {
3095         ptvcursor_add(ptvc, hf_nfapi_earfcn, 2, ENC_BIG_ENDIAN);
3096 }
3097 static void dissect_nmm_gsm_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_umts_frequency_bands_value(ptvcursor_t * ptvc, packet_info* pinfo)
3104 {
3105         guint32 count;
3106         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rf_bands, 2, ENC_BIG_ENDIAN, &count);
3107         dissect_array_value(ptvc, pinfo, "RF Band List", ett_nfapi_rf_bands, count, dissect_rf_band_value);
3108 }
3109 static void dissect_nmm_lte_frequency_bands_value(ptvcursor_t * ptvc, packet_info* pinfo)
3110 {
3111         guint32 count;
3112         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rf_bands, 2, ENC_BIG_ENDIAN, &count);
3113         dissect_array_value(ptvc, pinfo, "RF Band List", ett_nfapi_rf_bands, count, dissect_rf_band_value);
3114 }
3115 static void dissect_nmm_uplink_rssi_supported_value(ptvcursor_t * ptvc, packet_info* pinfo)
3116 {
3117         guint32 test_value;
3118         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nmm_uplink_rssi_supported, 1, ENC_BIG_ENDIAN, &test_value);
3119
3120         if (test_value > 1)
3121         {
3122                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nmm uplink rssi supported value [0..1]");
3123         }
3124 }
3125 static void dissect_dl_config_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
3126 {
3127         guint32 size;
3128         ptvcursor_add(ptvc, hf_nfapi_dl_config_pdu_type, 1, ENC_BIG_ENDIAN);
3129         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_size, 1, ENC_BIG_ENDIAN, &size);
3130
3131         guint pdu_end = (ptvcursor_current_offset(ptvc) + size - 2);
3132         dissect_tlv_list(ptvc, pinfo, pdu_end);
3133 }
3134 static void dissect_dl_config_request_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
3135 {
3136         proto_item* item;
3137         guint32 test_value, number_of_dcis_value, number_of_pdus_value;
3138
3139         // Number of PDCCH OFDM symbols
3140         item  = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdcch_ofdm_symbols, 1, ENC_BIG_ENDIAN, &test_value);
3141         if (test_value > 4)
3142         {
3143                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pdcch ofdm symbols value [0..4]");
3144         }
3145
3146         // Number of DCIs
3147         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_dci, 1, ENC_BIG_ENDIAN, &number_of_dcis_value);
3148
3149         // Number of  PDUs
3150         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 2, ENC_BIG_ENDIAN, &number_of_pdus_value);
3151         if (number_of_pdus_value > 514)
3152         {
3153                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pdus value [0..514]");
3154         }
3155
3156         // Number of PDSCH RNTIs
3157         ptvcursor_add(ptvc, hf_nfapi_number_pdsch_rnti, 1, ENC_BIG_ENDIAN);
3158
3159         // Transmission power for PCFICH
3160         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power_pcfich, 2, ENC_BIG_ENDIAN, &test_value);
3161         if (test_value > 10000)
3162         {
3163                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power for pcfich value [0..10000]");
3164         }
3165
3166         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);
3167 }
3168 static void dissect_dl_config_request_bch_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
3169 {
3170         proto_item* item;
3171         guint32 test_value;
3172
3173         // Length
3174         ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
3175
3176         // PDU index
3177         ptvcursor_add(ptvc, hf_nfapi_pdu_index, 2, ENC_BIG_ENDIAN);
3178
3179         // Transmission power
3180         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
3181         if (test_value > 10000)
3182         {
3183                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
3184         }
3185
3186 }
3187 static void dissect_dl_config_request_dl_dci_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
3188 {
3189         proto_item* item;
3190         guint32 test_value;
3191
3192         // DCI format
3193         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_dci_format, 1, ENC_BIG_ENDIAN, &test_value);
3194         if (test_value > 9)
3195         {
3196                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci format value [0..9]");
3197         }
3198
3199         // CCE index
3200         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cce_idx, 1, ENC_BIG_ENDIAN, &test_value);
3201         if (test_value > 88)
3202         {
3203                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cce index value [0..88]");
3204         }
3205
3206         // Aggregation level
3207         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_aggregation_level, 1, ENC_BIG_ENDIAN, &test_value);
3208         if (!(test_value == 1 || test_value == 2 || test_value == 4 ||
3209                   test_value == 8 || test_value == 16 || test_value == 32))
3210         {
3211                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid aggregation level value [1, 2, 4, 8, 16, 32]");
3212         }
3213
3214         // RNTI
3215         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
3216         if (test_value < 1)
3217         {
3218                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
3219         }
3220
3221         // Resource allocation type
3222         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN, &test_value);
3223         if (test_value > 1)
3224         {
3225                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocation type value [0..1]");
3226         }
3227
3228         // Virtual resource block assignment flag
3229         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_virtual_resource_block_assignment_flag, 1, ENC_BIG_ENDIAN, &test_value);
3230         if (test_value > 1)
3231         {
3232                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid virtual resource block assignment flag value [0..1]");
3233         }
3234
3235         // Resource block coding
3236         ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
3237
3238         // MCS_1
3239         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs_1, 1, ENC_BIG_ENDIAN, &test_value);
3240         if (test_value > 31)
3241         {
3242                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs 1 value [0..31]");
3243         }
3244
3245         // Redundancy version_1
3246         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version_1, 1, ENC_BIG_ENDIAN, &test_value);
3247         if (test_value > 3)
3248         {
3249                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy version 1 value [0..3]");
3250         }
3251
3252         // New data indicator_1
3253         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indicator_1, 1, ENC_BIG_ENDIAN, &test_value);
3254         if (test_value > 3)
3255         {
3256                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indicator 1 value [0..1]");
3257         }
3258
3259         // Transport block to codeword swap flag
3260         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transport_block_to_codeword_swap_flag, 1, ENC_BIG_ENDIAN, &test_value);
3261         if (test_value > 3)
3262         {
3263                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport block to codeword swap flag value [0..1]");
3264         }
3265
3266         // MCS_2
3267         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs_2, 1, ENC_BIG_ENDIAN, &test_value);
3268         if (test_value > 31)
3269         {
3270                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs 2 value [0..31]");
3271         }
3272
3273         // Redundancy version_2
3274         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version_2, 1, ENC_BIG_ENDIAN, &test_value);
3275         if (test_value > 3)
3276         {
3277                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy version 2 value [0..3]");
3278         }
3279
3280         // New Data indicator_2
3281         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indicator_2, 1, ENC_BIG_ENDIAN, &test_value);
3282         if (test_value > 3)
3283         {
3284                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indicator 2 value [0..1]");
3285         }
3286
3287         // HARQ process
3288         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_process, 1, ENC_BIG_ENDIAN, &test_value);
3289         if (test_value > 3)
3290         {
3291                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq process value [0..15]");
3292         }
3293
3294         // TPMI
3295         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpmi, 1, ENC_BIG_ENDIAN, &test_value);
3296         if (test_value > 3)
3297         {
3298                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi value [0..3]");
3299         }
3300
3301         // PMI
3302         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pmi, 1, ENC_BIG_ENDIAN, &test_value);
3303         if (test_value > 2)
3304         {
3305                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi value [0..2]");
3306         }
3307
3308         // Precoding information
3309         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_precoding_information, 1, ENC_BIG_ENDIAN, &test_value);
3310         if (test_value > 2)
3311         {
3312                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid precoding information value [0..15]");
3313         }
3314
3315         // TPC
3316         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpc, 1, ENC_BIG_ENDIAN, &test_value);
3317         if (test_value > 3)
3318         {
3319                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpc value [0..3]");
3320         }
3321
3322         // Downlink assignment index
3323         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_assignment_index, 1, ENC_BIG_ENDIAN, &test_value);
3324         if (test_value > 15)
3325         {
3326                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink assignment value [0..15]");
3327         }
3328
3329         // NGAP
3330         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ngap, 1, ENC_BIG_ENDIAN, &test_value);
3331         if (test_value > 1)
3332         {
3333                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ngap value [0..1]");
3334         }
3335
3336         // Transport block size index
3337         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transport_block_size_index, 1, ENC_BIG_ENDIAN, &test_value);
3338         if (test_value > 31)
3339         {
3340                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport block size index value [0..31]");
3341         }
3342
3343         // Downlink power offset
3344         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_power_offset, 1, ENC_BIG_ENDIAN, &test_value);
3345         if (test_value > 1)
3346         {
3347                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink power offset value [0..1]");
3348         }
3349
3350         // Allocate PRACH flag
3351         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_allocate_prach_flag, 1, ENC_BIG_ENDIAN, &test_value);
3352         if (test_value > 1)
3353         {
3354                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid allocate prach flag value [0..1]");
3355         }
3356
3357         // Preamble index
3358         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_preamble_index, 1, ENC_BIG_ENDIAN, &test_value);
3359         if (test_value > 63)
3360         {
3361                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid preamble index value [0..63]");
3362         }
3363
3364         // PRACH mask index
3365         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_mask_index, 1, ENC_BIG_ENDIAN, &test_value);
3366         if (test_value > 15)
3367         {
3368                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach mask index value [0..15]");
3369         }
3370
3371         // RNTI type
3372         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti_type, 1, ENC_BIG_ENDIAN, &test_value);
3373         if (!(test_value >= 1 && test_value <= 3))
3374         {
3375                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti type value [1..3]");
3376         }
3377
3378         // Transmission power
3379         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
3380         if (test_value > 10000)
3381         {
3382                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value value [0..10000]");
3383         }
3384
3385 }
3386 static void dissect_dl_config_request_dl_dci_pdu_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
3387 {
3388         proto_item* item;
3389         guint32 test_value;
3390         gboolean test_boolean;
3391
3392         // MCCH flag
3393         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_mcch_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
3394         if (test_boolean > 1)
3395         {
3396                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcch flag value [0..1]");
3397         }
3398
3399         // MCCH change notification
3400         ptvcursor_add(ptvc, hf_nfapi_mcch_change_notification, 1, ENC_BIG_ENDIAN);
3401
3402         // Scrambling identity
3403         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_scrambling_identity, 1, ENC_BIG_ENDIAN, &test_value);
3404         if (test_value > 1)
3405         {
3406                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid scrambling identity value [0..1]");
3407         }
3408
3409 }
3410 static void dissect_dl_config_request_dl_dci_pdu_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
3411 {
3412         proto_item* item;
3413         guint32 test_value;
3414         gboolean test_boolean;
3415
3416         // Cross carrier scheduling flag
3417         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_cross_carrier_scheduling_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
3418         if (test_boolean > 1)
3419         {
3420                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cross carrier scheduling flag value [0..1]");
3421         }
3422
3423         // Carrier indicator
3424         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_carrier_indicator, 1, ENC_BIG_ENDIAN, &test_value);
3425         if (test_value > 7)
3426         {
3427                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid carrier indicator value [0..7]");
3428         }
3429
3430         // SRS flag
3431         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
3432         if (test_boolean > 1)
3433         {
3434                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs flag value [0..1]");
3435         }
3436
3437         // SRS request
3438         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_request, 1, ENC_BIG_ENDIAN, &test_boolean);
3439         if (test_boolean > 1)
3440         {
3441                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs request value [0..1]");
3442         }
3443
3444         // Antenna ports, scrambling and layers
3445         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_antenna_ports_scrambling_and_layers, 1, ENC_BIG_ENDIAN, &test_value);
3446         if (test_value > 15)
3447         {
3448                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid antenna ports scrambling and layers value [0..15]");
3449         }
3450
3451         // Total DCI length including padding
3452         ptvcursor_add(ptvc, hf_nfapi_total_dci_length_including_padding, 1, ENC_BIG_ENDIAN);
3453
3454         // N_DL_RB
3455         // TODO : This is missing from the encoder....
3456         //ptvcursor_add(ptvc, hf_nfapi_n_dl_rb, 1, ENC_BIG_ENDIAN);
3457 }
3458 static void dissect_dl_config_request_dl_dci_pdu_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
3459 {
3460         proto_item* item;
3461         guint32 test_value;
3462
3463         // HARQ-ACK resource offset
3464         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_ack_resource_offset, 1, ENC_BIG_ENDIAN, &test_value);
3465         if (test_value > 3)
3466         {
3467                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid hack ack resource offset value [0..3]");
3468         }
3469
3470         // PDSCH RE Mapping and Quasi-Co-Location Indicator
3471         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_re_mapping_and_quasi_co_location_indicator, 1, ENC_BIG_ENDIAN, &test_value);
3472         if (test_value > 3)
3473         {
3474                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch re mapping value [0..3]");
3475         }
3476
3477 }
3478 static void dissect_ul_dl_configuration_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
3479 {
3480         guint32 test_value;
3481
3482         // UL/DL configuration indication
3483         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_dl_configuration_index, 1, ENC_BIG_ENDIAN, &test_value);
3484         if (!(test_value >= 1 && test_value <= 5))
3485         {
3486                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul/dl configuration indication value [1..5]");
3487         }
3488 }
3489 static void dissect_dl_config_request_dl_dci_pdu_rel12_value(ptvcursor_t * ptvc, packet_info* pinfo)
3490 {
3491         proto_item* item;
3492         guint32 test_value, count;
3493         gboolean test_boolean;
3494
3495         // Primary cell type
3496         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_primary_cell_type, 1, ENC_BIG_ENDIAN, &test_value);
3497         if (test_value > 2)
3498         {
3499                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid primary cell type value [0..2]");
3500         }
3501
3502         // UL/DL configuration flag
3503         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_ul_dl_configuration_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
3504         if (test_boolean > 1)
3505         {
3506                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul/dl configuration flag value [0..1]");
3507         }
3508
3509         // Number of UL / DL configurations
3510         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ul_dl_configurations, 1, ENC_BIG_ENDIAN, &count);
3511
3512         dissect_array_value(ptvc, pinfo, "UL/DL Configurations", ett_nfapi_pnf_phy, count, dissect_ul_dl_configuration_index_value);
3513 }
3514 static void dissect_dl_config_request_dl_dci_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3515 {
3516         ptvcursor_add(ptvc, hf_nfapi_laa_end_partial_sf_flag, 1, ENC_BIG_ENDIAN);
3517         ptvcursor_add(ptvc, hf_nfapi_laa_end_partial_sf_configuration, 1, ENC_BIG_ENDIAN);
3518         ptvcursor_add(ptvc, hf_nfapi_initial_lbt_sf, 1, ENC_BIG_ENDIAN);
3519         ptvcursor_add(ptvc, hf_nfapi_codebooksize_determination_r13, 1, ENC_BIG_ENDIAN);
3520         ptvcursor_add(ptvc, hf_nfapi_rel13_drms_table_flag, 1, ENC_BIG_ENDIAN);
3521 }
3522 static void dissect_dl_config_request_mch_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3523 {
3524         ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
3525         ptvcursor_add(ptvc, hf_nfapi_pdu_index, 2, ENC_BIG_ENDIAN);
3526         ptvcursor_add(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN);
3527         ptvcursor_add(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN);
3528         ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
3529         ptvcursor_add(ptvc, hf_nfapi_modulation, 1, ENC_BIG_ENDIAN);
3530         ptvcursor_add(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN);
3531         ptvcursor_add(ptvc, hf_nfapi_mbsfn_area_id, 2, ENC_BIG_ENDIAN);
3532 }
3533 static void dissect_codebook_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
3534 {
3535         guint32 test_value;
3536
3537         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_codebook_index, 1, ENC_BIG_ENDIAN, &test_value);
3538         if (test_value > 15)
3539         {
3540                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid codebook index value [0..15]");
3541         }
3542 }
3543 static void dissect_bf_vector_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
3544 {
3545         ptvcursor_add(ptvc, hf_nfapi_bf_vector_bf_value, 2, ENC_BIG_ENDIAN);
3546 }
3547 static void dissect_bf_vector_type_value(ptvcursor_t * ptvc, packet_info* pinfo)
3548 {
3549         guint32 count;
3550
3551         ptvcursor_add(ptvc, hf_nfapi_bf_vector_subband_index, 1, ENC_BIG_ENDIAN);
3552         ptvcursor_add_ret_uint(ptvc, hf_nfapi_bf_vector_num_antennas, 1, ENC_BIG_ENDIAN, &count);
3553         dissect_array_value(ptvc, pinfo, "Antennas",  ett_nfapi_bf_vector_antennas, count, dissect_bf_vector_value);
3554 }
3555 static void dissect_dl_config_request_dlsch_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
3556 {
3557         proto_item* item;
3558         guint32 test_value, num_subbands, num_vectors;
3559
3560         // Length
3561         ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
3562
3563         // PDU index
3564         ptvcursor_add(ptvc, hf_nfapi_pdu_index, 2, ENC_BIG_ENDIAN);
3565
3566         // RNTI
3567         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
3568         if (!(test_value >= 1 /* && rnti_value <= 65535)*/))
3569         {
3570                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid codebook index value [1..65535]");
3571         }
3572
3573         // Resource allocation type
3574         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN, &test_value);
3575         if (test_value > 5)
3576         {
3577                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocation type value [0..5]");
3578         }
3579
3580         // Virtual resource block assignment flag
3581         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_virtual_resource_block_assignment_flag, 1, ENC_BIG_ENDIAN, &test_value);
3582         if (test_value > 1)
3583         {
3584                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid virtual resource block allocation assignment value [0..1]");
3585         }
3586
3587         // Resource block coding
3588         ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
3589
3590         // Modulation
3591         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_modulation, 1, ENC_BIG_ENDIAN, &test_value);
3592         if (!(test_value == 2 || test_value == 4 || test_value == 6 || test_value == 8))
3593         {
3594                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid modulation value [2, 4, 6, 8]");
3595         }
3596
3597         // Redundancy version
3598         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version, 1, ENC_BIG_ENDIAN, &test_value);
3599         if (test_value > 3)
3600         {
3601                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy value [0..3]");
3602         }
3603
3604         // Transport blocks
3605         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transport_blocks, 1, ENC_BIG_ENDIAN, &test_value);
3606         if (!(test_value >= 1 && test_value <= 2))
3607         {
3608                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport blocks value [1..2]");
3609         }
3610
3611         // Transport block to codeword swap flag
3612         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transport_block_to_codeword_swap_flag, 1, ENC_BIG_ENDIAN, &test_value);
3613         if (test_value > 1)
3614         {
3615                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport block to codeword swap flag value [0..1]");
3616         }
3617
3618         // Transmission scheme
3619         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_scheme, 1, ENC_BIG_ENDIAN, &test_value);
3620         if (test_value > 13)
3621         {
3622                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission scheme value [0..13]");
3623         }
3624
3625         // Number of layers
3626         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_layers, 1, ENC_BIG_ENDIAN, &test_value);
3627         if (!(test_value >= 1 && test_value <= 8))
3628         {
3629                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of layers value [1..8]");
3630         }
3631
3632         // Number of subbands
3633         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_subbands, 1, ENC_BIG_ENDIAN, &num_subbands);
3634         if (num_subbands > 13)
3635         {
3636                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of subbands value [0..13]");
3637         }
3638
3639         dissect_array_value(ptvc, pinfo, "Subbands", ett_nfapi_subbands, num_subbands, dissect_codebook_index_value);
3640
3641         // UE category capacity
3642         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_category_capacity, 1, ENC_BIG_ENDIAN, &test_value);
3643         if (test_value > 14)
3644         {
3645                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue category capacity value [0..14]");
3646         }
3647
3648         // P-A
3649         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pa, 1, ENC_BIG_ENDIAN, &test_value);
3650         if (test_value > 7)
3651         {
3652                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid p-a value [0..7]");
3653         }
3654
3655         // Delta power offset index
3656         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_power_offset_index, 1, ENC_BIG_ENDIAN, &test_value);
3657         if (test_value > 1)
3658         {
3659                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta power offset value [0..1]");
3660         }
3661
3662         // NGAP
3663         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ngap, 1, ENC_BIG_ENDIAN, &test_value);
3664         if (test_value > 1)
3665         {
3666                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ngap value [0..1]");
3667         }
3668
3669         // NPRB
3670         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nprb, 1, ENC_BIG_ENDIAN, &test_value);
3671         if (test_value > 1)
3672         {
3673                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nprb value [0..1]");
3674         }
3675
3676         // Transmission mode
3677         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_mode, 1, ENC_BIG_ENDIAN, &test_value);
3678         if (!(test_value >= 1 && test_value <= 10))
3679         {
3680                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission mode value [1..10]");
3681         }
3682
3683         // numBfPRBperSubband
3684         ptvcursor_add(ptvc, hf_nfapi_num_bf_prb_per_subband, 1, ENC_BIG_ENDIAN);
3685
3686         // numBfVector
3687         ptvcursor_add_ret_uint(ptvc, hf_nfapi_num_bf_vector, 1, ENC_BIG_ENDIAN, &num_vectors);
3688
3689         dissect_array_value(ptvc, pinfo, "Beamforming Vectors", ett_nfapi_bf_vectors, num_vectors, dissect_bf_vector_type_value);
3690 }
3691 static void dissect_csi_rs_resource_config_value(ptvcursor_t * ptvc, packet_info* pinfo)
3692 {
3693         guint32 test_value;
3694
3695         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_resource_config, 1, ENC_BIG_ENDIAN, &test_value);
3696         if (test_value > 31)
3697         {
3698                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi-rs resource config value [0..31]");
3699         }
3700 }
3701 static void dissect_dl_config_request_dlsch_pdu_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
3702 {
3703         guint32 test_value;
3704
3705         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nscid, 1, ENC_BIG_ENDIAN, &test_value);
3706         if (test_value > 1)
3707         {
3708                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nscid value [0..1]");
3709         }
3710 }
3711 static void dissect_dl_config_request_dlsch_pdu_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
3712 {
3713         proto_item* item;
3714         guint32 test_value, count;
3715         gboolean test_boolean;
3716
3717         // CSI-RS flag
3718         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_csi_rs_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
3719         if (test_boolean > 1)
3720         {
3721                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi-rs flag value [0..1]");
3722         }
3723
3724         // CSI-RS resource config R10
3725         ptvcursor_add(ptvc, hf_nfapi_csi_rs_resource_config_r10, 1, ENC_BIG_ENDIAN);
3726
3727         // CSI-RS zero Tx power resource config bitmap R10
3728         ptvcursor_add(ptvc, hf_nfapi_csi_rs_zero_tx_power_resource_config_bitmap_r10, 2, ENC_BIG_ENDIAN);
3729
3730         // CSI-RS Number of NZP configuration
3731         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_number_of_nzp_configurations, 1, ENC_BIG_ENDIAN, &count);
3732         if (count > 3)
3733         {
3734                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi-rs number of nzp configuration value [0..3]");
3735         }
3736
3737         // CSI-RS configuration
3738         dissect_array_value(ptvc, pinfo, "CSI-RS Resource Configs", ett_nfapi_csi_rs_resource_configs, count, dissect_csi_rs_resource_config_value);
3739
3740         // PDSCH start
3741         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_start, 1, ENC_BIG_ENDIAN, &test_value);
3742         if (test_value > 4)
3743         {
3744                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch start value [0..4]");
3745         }
3746
3747 }
3748 static void dissect_dl_config_request_dlsch_pdu_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
3749 {
3750         proto_item* item;
3751         guint32 test_value;
3752
3753         // DMRS Config flag
3754         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_config_flag, 1, ENC_BIG_ENDIAN, &test_value);
3755         if (test_value > 1)
3756         {
3757                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms config flag value [0..1]");
3758         }
3759
3760         // DMRS-Scrambling
3761         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_scrambling, 2, ENC_BIG_ENDIAN, &test_value);
3762         if (test_value > 503)
3763         {
3764                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms scrambling value [0..503]");
3765         }
3766
3767         // CSI Config flag
3768         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_config_flag, 1, ENC_BIG_ENDIAN, &test_value);
3769         if (test_value > 1)
3770         {
3771                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi config flag value [0..1]");
3772         }
3773
3774         // CSI- Scrambling
3775         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_scrambling, 2, ENC_BIG_ENDIAN, &test_value);
3776         if (test_value > 503)
3777         {
3778                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi scrambling value [0..503]");
3779         }
3780
3781         // PDSCH RE mapping flag
3782         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_re_mapping_flag, 1, ENC_BIG_ENDIAN, &test_value);
3783         if (test_value > 1)
3784         {
3785                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch re mapping flag value [0..1]");
3786         }
3787
3788         // PDSCH RE mapping antenna ports
3789         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_re_mapping_antenna_ports, 1, ENC_BIG_ENDIAN, &test_value);
3790         if (!(test_value == 1 || test_value == 2 || test_value == 4))
3791         {
3792                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch re mapping antenna ports value [1, 2, 4]");
3793         }
3794
3795         // PDSCH RE mapping freq shift
3796         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_re_mapping_freq_shift, 1, ENC_BIG_ENDIAN, &test_value);
3797         if (test_value > 5)
3798         {
3799                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch re mapping freq shift value [0..5]");
3800         }
3801 }
3802 static void dissect_dl_config_request_dlsch_pdu_rel12_value(ptvcursor_t * ptvc, packet_info* pinfo)
3803 {
3804         proto_item* item;
3805         guint32 test_value;
3806
3807         // altCQI-Table-r12
3808         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_alt_cqi_table_r12, 1, ENC_BIG_ENDIAN, &test_value);
3809         if (test_value > 1)
3810         {
3811                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid alt cqi table r12 value [0..1]");
3812         }
3813
3814         // MaxLayers
3815         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_max_layers, 1, ENC_BIG_ENDIAN, &test_value);
3816         if (!(test_value >= 1 && test_value <= 8))
3817         {
3818                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid max layers value [1..8]");
3819         }
3820
3821         ptvcursor_add(ptvc, hf_nfapi_n_dl_harq, 1, ENC_BIG_ENDIAN);
3822 }
3823 static void dissect_dl_config_request_dlsch_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
3824 {
3825         proto_item* item;
3826         guint32 test_value;
3827
3828         // DwPTS Symbols
3829         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dwpts_symbols, 1, ENC_BIG_ENDIAN, &test_value);
3830         if (!(test_value == 3 || test_value == 6 || test_value == 9 ||
3831                 test_value == 10 || test_value == 11 || test_value == 12 ||
3832                 test_value == 14))
3833         {
3834                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dwpts symbols value [3, 6, 9, 10, 11, 12, 14]");
3835         }
3836
3837         // Initial LBT SF
3838         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_lbt_sf, 1, ENC_BIG_ENDIAN, &test_value);
3839         if (test_value > 1)
3840         {
3841                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial lbt sf value [0..1]");
3842         }
3843
3844         // UE Type
3845         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_type, 1, ENC_BIG_ENDIAN, &test_value);
3846         if (test_value > 2)
3847         {
3848                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue type value [0..2]");
3849         }
3850
3851         // PDSCH Payload Type
3852         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_payload_type, 1, ENC_BIG_ENDIAN, &test_value);
3853         if (test_value > 2)
3854         {
3855                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch payload type value [0..2]");
3856         }
3857
3858         // Initial transmission SF (io)
3859         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_transmission_sf, 2, ENC_BIG_ENDIAN, &test_value);
3860         if (!(test_value <= 10239 || test_value == 0xFFFF))
3861         {
3862                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial transmission sf io value [0..10239, 0xFFFF]");
3863         }
3864
3865         // Rel-13-DMRS-tabe flag
3866         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_req13_drms_table_flag, 1, ENC_BIG_ENDIAN, &test_value);
3867         if (test_value > 1)
3868         {
3869                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rel13 drms table flag value [0..1]");
3870         }
3871 }
3872 static void dissect_dl_config_request_pch_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
3873 {
3874         proto_item* item;
3875         guint32 test_value;
3876
3877         // Length
3878         ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
3879
3880         // PDU index
3881         ptvcursor_add(ptvc, hf_nfapi_pdu_index, 2, ENC_BIG_ENDIAN);
3882
3883         // P-RNTI
3884         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prnti, 2, ENC_BIG_ENDIAN, &test_value);
3885         if (test_value != 0xFFFE)
3886         {
3887                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prnti value [0xFFFE]");
3888         }
3889
3890         // Resource allocation type
3891         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN, &test_value);
3892         if (!(test_value == 2 || test_value == 3 || test_value == 6))
3893         {
3894                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocate type value [2, 3, 6]");
3895         }
3896
3897         // Virtual resource block assignment flag
3898         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_virtual_resource_block_assignment_flag, 1, ENC_BIG_ENDIAN, &test_value);
3899         if (test_value > 1)
3900         {
3901                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid virtual resource block assignment flag value [0..1]");
3902         }
3903
3904         // Resource block coding
3905         ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
3906
3907         // MCS
3908         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs, 1, ENC_BIG_ENDIAN, &test_value);
3909         if (test_value != 0)
3910         {
3911                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs value [0]");
3912         }
3913
3914         // Redundancy version
3915         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version, 1, ENC_BIG_ENDIAN, &test_value);
3916         if (test_value != 0)
3917         {
3918                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy value [0]");
3919         }
3920
3921         // Number of transport blocks
3922         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_transport_blocks, 1, ENC_BIG_ENDIAN, &test_value);
3923         if (test_value != 1)
3924         {
3925                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport blocks value [1]");
3926         }
3927
3928         // Transport block to codeword swap flag
3929         ptvcursor_add(ptvc, hf_nfapi_transport_block_to_codeword_swap_flag, 1, ENC_BIG_ENDIAN);
3930
3931         // Transmission scheme
3932         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_scheme, 1, ENC_BIG_ENDIAN, &test_value);
3933         if (!(test_value == 0 || test_value == 1 || test_value == 6))
3934         {
3935                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission schemes value [0, 1, 6]");
3936         }
3937
3938         // Number of layers
3939         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_layers, 1, ENC_BIG_ENDIAN, &test_value);
3940         if (!(test_value >= 1 && test_value <= 4))
3941         {
3942                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of layers value [1..4]");
3943         }
3944
3945         // Codebook index
3946         ptvcursor_add(ptvc, hf_nfapi_codebook_index, 1, ENC_BIG_ENDIAN);
3947
3948         // UE category capacity
3949         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_category_capacity, 1, ENC_BIG_ENDIAN, &test_value);
3950         if (test_value > 14)
3951         {
3952                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue category capacity value [0..14]");
3953         }
3954
3955         // P-A
3956         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pa, 1, ENC_BIG_ENDIAN, &test_value);
3957         if (test_value > 7)
3958         {
3959                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid p-a value value [0..7]");
3960         }
3961
3962         // Transmission power
3963         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
3964         if (test_value > 10000)
3965         {
3966                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
3967         }
3968
3969         // NPRB
3970         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nprb, 1, ENC_BIG_ENDIAN, &test_value);
3971         if (test_value > 1)
3972         {
3973                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid nprb value [0..1]");
3974         }
3975
3976         // NGAP
3977         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ngap, 1, ENC_BIG_ENDIAN, &test_value);
3978         if (test_value > 1)
3979         {
3980                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ngap value [0..1]");
3981         }
3982
3983 }
3984 static void dissect_dl_config_request_pch_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
3985 {
3986         proto_item* item;
3987         guint32 test_value;
3988
3989         // UE mode
3990         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_mode, 1, ENC_BIG_ENDIAN, &test_value);
3991         if (test_value > 1)
3992         {
3993                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue mode value [0..1]");
3994         }
3995
3996         // Initial transmission SF (io)
3997         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_transmission_sf, 2, ENC_BIG_ENDIAN, &test_value);
3998         if (!(test_value <= 10239 || test_value == 0xFFFF))
3999         {
4000                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial transmission sf io value [0..10239, 0xFFFF]");
4001         }
4002 }
4003 static void dissect_dl_config_request_prs_pdu_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
4004 {
4005         proto_item* item;
4006         guint32 test_value;
4007         gboolean test_boolean;
4008
4009         // Transmission power
4010         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
4011         if (test_value > 10000)
4012         {
4013                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
4014         }
4015
4016         // PRS bandwidth
4017         item = ptvcursor_add_ret_uint(ptvc, hf_prs_bandwidth, 1, ENC_BIG_ENDIAN, &test_value);
4018         if (!(test_value == 6 || test_value == 15 || test_value == 25 ||
4019                   test_value == 50 || test_value == 75 || test_value == 100))
4020         {
4021                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prs bandwidth value [6, 15, 25, 50, 75, 100]");
4022         }
4023
4024         // PRS cyclic prefix type
4025         item = ptvcursor_add_ret_boolean(ptvc, hf_prs_cyclic_prefix_type, 1, ENC_BIG_ENDIAN, &test_boolean);
4026         if (test_boolean > 1)
4027         {
4028                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prs cyclic prefix value [0..1]");
4029         }
4030
4031         // PRS muting
4032         item = ptvcursor_add_ret_boolean(ptvc, hf_prs_muting, 1, ENC_BIG_ENDIAN, &test_boolean);
4033         if (test_boolean > 1)
4034         {
4035                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prs muting value [0..1]");
4036         }
4037 }
4038 static void dissect_dl_config_request_csi_rs_pdu_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
4039 {
4040         proto_item* item;
4041         guint32 test_value, count;
4042
4043         // CSI-RS antenna port count R10
4044         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_antenna_port_count_r10, 1, ENC_BIG_ENDIAN, &test_value);
4045         if (!(test_value == 1 || test_value == 2 ||
4046                   test_value == 4 || test_value == 8 ||
4047                   test_value == 12 || test_value == 16))
4048         {
4049                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi rs antenna port count r10 value [1, 2, 4, 6, 8, 10]");
4050         }
4051
4052         // CSI-RS resource config R10
4053         ptvcursor_add(ptvc, hf_nfapi_csi_rs_resource_config_r10, 1, ENC_BIG_ENDIAN);
4054
4055         // Transmission power
4056         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
4057         if (test_value > 10000)
4058         {
4059                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
4060         }
4061
4062         // CSI-RS zero Tx power resource config bitmap R10
4063         ptvcursor_add(ptvc, hf_nfapi_csi_rs_zero_tx_power_resource_config_bitmap_r10, 2, ENC_BIG_ENDIAN);
4064
4065         // CSI-RS Number of NZP configuration
4066         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_number_of_nzp_configurations, 1, ENC_BIG_ENDIAN, &count);
4067         if (count > 8)
4068         {
4069                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi-rs number of nzp configuration value [0..8]");
4070         }
4071
4072         // CSI-RS configuration
4073         dissect_array_value(ptvc, pinfo, "CSI-RS Resource Configs", ett_nfapi_csi_rs_resource_configs, count, dissect_csi_rs_resource_config_value);
4074 }
4075 static void dissect_csi_rs_bf_vector_value(ptvcursor_t * ptvc, packet_info* pinfo)
4076 {
4077         guint32 count;
4078         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_resource_index, 1, ENC_BIG_ENDIAN, &count);
4079         if (count > 7)
4080         {
4081                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi-rs resource index value [0..7]");
4082         }
4083
4084         // todo : how to work out the antenna port count for the bfValue
4085 }
4086 static void dissect_dl_config_request_csi_rs_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4087 {
4088         proto_item* item;
4089         guint32 test_value, class_value, count;
4090
4091         // Class
4092         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_rs_class, 1, ENC_BIG_ENDIAN, &class_value);
4093         if (class_value > 2)
4094         {
4095                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid class value [0..2]");
4096         }
4097
4098         // cdmType
4099         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cdm_type, 1, ENC_BIG_ENDIAN, &test_value);
4100         if (test_value > 1)
4101         {
4102                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cdm type value [0..1]");
4103         }
4104
4105         // numBfVector
4106         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_num_bf_vector, 1, ENC_BIG_ENDIAN, &count);
4107         if (!((class_value == 1 && count == 0) || (class_value == 2 && count <= 8)))
4108         {
4109                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid num bf vector value [0] or [0..8]");
4110         }
4111
4112         dissect_array_value(ptvc, pinfo, "Beamforming Vector", ett_nfapi_csi_rs_bf_vector, count, dissect_csi_rs_bf_vector_value);
4113 }
4114 static void dissect_epdcch_prb_index_value(ptvcursor_t * ptvc, packet_info* pinfo)
4115 {
4116         guint32 test_value;
4117
4118         // EPDCCH PRB index
4119         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_edpcch_prb_index, 1, ENC_BIG_ENDIAN, &test_value);
4120         if (test_value > 99)
4121         {
4122                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid epdcch prb_index value [0..99]");
4123         }
4124 }
4125 static void dissect_dl_config_request_edpcch_params_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
4126 {
4127         proto_item* item;
4128         guint32 test_value, count;
4129
4130         // EPDCCH Resource assignment flag
4131         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_epdcch_resource_assignment_flag, 1, ENC_BIG_ENDIAN, &test_value);
4132         if (test_value > 1)
4133         {
4134                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid epdcch resource assignment flag value [0..1]");
4135         }
4136
4137         // EPDCCH ID
4138         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_epdcch_id, 2, ENC_BIG_ENDIAN, &test_value);
4139         if (test_value > 503)
4140         {
4141                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid epdcch id value [0..503]");
4142         }
4143
4144         // EPDCCH Start Symbol
4145         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_epdcch_start_symbol, 1, ENC_BIG_ENDIAN, &test_value);
4146         if (!(test_value >= 1 && test_value <= 4))
4147         {
4148                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid epdcch start symbol value [1..4]");
4149         }
4150
4151         // EPDCCH NumPRB
4152         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_epdcch_num_prb, 1, ENC_BIG_ENDIAN, &count);
4153         if (!(count == 2 || count == 4 || count == 8))
4154         {
4155                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid epdcch num prb value [2, 4, 8]");
4156         }
4157
4158         dissect_array_value(ptvc, pinfo, "PRBs", ett_nfapi_epdcch_prbs, count, dissect_epdcch_prb_index_value);
4159
4160         dissect_bf_vector_type_value(ptvc, pinfo);
4161 }
4162 static void dissect_dl_config_request_edpcch_params_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4163 {
4164         proto_item* item;
4165         guint32 test_value;
4166
4167         // DwPTS Symbols
4168         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_lbt_sf, 1, ENC_BIG_ENDIAN, &test_value);
4169         if (!(test_value == 3 || test_value == 6 || test_value == 9 ||
4170                 test_value == 10 || test_value == 11 || test_value == 12 ||
4171                 test_value == 14))
4172         {
4173                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dwpts symbols value [3, 6, 9, 10, 11, 12, 14]");
4174         }
4175
4176         // Initial LBT SF
4177         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dwpts_symbols, 1, ENC_BIG_ENDIAN, &test_value);
4178         if (test_value > 1)
4179         {
4180                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial lbt sf value [0..1]");
4181         }
4182
4183 }
4184 static void dissect_precoding_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
4185 {
4186         ptvcursor_add(ptvc, hf_nfapi_precoding_value, 2, ENC_BIG_ENDIAN);
4187 }
4188 static void dissect_dl_config_request_mpdpcch_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4189 {
4190         proto_item* item;
4191         guint32 test_value, count;
4192         gboolean test_boolean;
4193
4194         // MPDCCH Narrowband
4195         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_narrowband, 1, ENC_BIG_ENDIAN, &test_value);
4196         if (test_value > 15)
4197         {
4198                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mpdcch narrowband value [0..15]");
4199         }
4200
4201         // Number of PRB pairs
4202         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_prb_pairs, 1, ENC_BIG_ENDIAN, &test_value);
4203         if (!(test_value == 2 || test_value == 4 || test_value == 6))
4204         {
4205                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of prb pair value [2, 4, 6]");
4206         }
4207
4208         // Resource Block Assignment
4209         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_assignment, 1, ENC_BIG_ENDIAN, &test_value);
4210         if (test_value > 14)
4211         {
4212                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block assignment value [0..14]");
4213         }
4214
4215         // MPDCCH transmission type
4216         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_transmission_type, 1, ENC_BIG_ENDIAN, &test_value);
4217         if (test_value > 1)
4218         {
4219                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mpdcch transmission type value [0..1]");
4220         }
4221
4222         // Start symbol
4223         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_start_symbol, 1, ENC_BIG_ENDIAN, &test_value);
4224         if (!(test_value >= 1 && test_value <=4))
4225         {
4226                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid start symbol value [1..4]");
4227         }
4228
4229         // ECCE index
4230         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ecce_index, 1, ENC_BIG_ENDIAN, &test_value);
4231         if (test_value > 22)
4232         {
4233                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ecce index value [0..22]");
4234         }
4235
4236         // Aggregation level
4237         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_aggregation_level, 1, ENC_BIG_ENDIAN, &test_value);
4238         if (!(test_value == 2 || test_value == 4 || test_value == 8 ||
4239                 test_value == 16 || test_value == 24))
4240         {
4241                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid aggregation level value [2, 4, 8, 16, 24]");
4242         }
4243
4244         // RNTI type
4245         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_rnti_type, 1, ENC_BIG_ENDIAN, &test_value);
4246         if (test_value > 4)
4247         {
4248                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti type value [0..4]");
4249         }
4250
4251         // RNTI
4252         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
4253         if (!(test_value >= 1))
4254         {
4255                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
4256         }
4257
4258         // CEMode
4259         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ce_mode, 1, ENC_BIG_ENDIAN, &test_value);
4260         if (!(test_value >= 1 && test_value <= 2))
4261         {
4262                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cemode value [1..2]");
4263         }
4264
4265         // DMRS scrambling init
4266         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_scrabmling_init, 2, ENC_BIG_ENDIAN, &test_value);
4267         if (test_value > 503)
4268         {
4269                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms scrambling init value [0..503]");
4270         }
4271
4272         // Initial transmission SF (io)
4273         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_transmission_sf, 2, ENC_BIG_ENDIAN, &test_value);
4274         if (!(test_value <= 10239 || test_value == 0xFFFF))
4275         {
4276                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial transmission sf io value [0..10239, 0xFFFF]");
4277         }
4278
4279         // Transmission power
4280         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
4281         if (test_value > 10000)
4282         {
4283                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
4284         }
4285
4286         // DCI format
4287         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_dci_format, 1, ENC_BIG_ENDIAN, &test_value);
4288         if (!(test_value == 10 || test_value == 11 || test_value == 12))
4289         {
4290                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci format value [10, 11, 12]");
4291         }
4292
4293         // Resource block coding
4294         ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 2, ENC_BIG_ENDIAN);
4295
4296         // MCS
4297         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs, 1, ENC_BIG_ENDIAN, &test_value);
4298         if (test_value > 15)
4299         {
4300                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..15]");
4301         }
4302
4303         // PDSCH repetition levels
4304         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdsch_reception_levels, 1, ENC_BIG_ENDIAN, &test_value);
4305         if (!(test_value >= 1 && test_value <= 8))
4306         {
4307                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdsch repetition levels value [1..8]");
4308         }
4309
4310         // Redundancy version
4311         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version, 1, ENC_BIG_ENDIAN, &test_value);
4312         if (test_value > 3)
4313         {
4314                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy version value [0..3]");
4315         }
4316
4317         // New data indicator
4318         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indicator, 1, ENC_BIG_ENDIAN, &test_value);
4319         if (test_value > 1)
4320         {
4321                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indicator value [0..1]");
4322         }
4323
4324         // HARQ process
4325         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_process, 1, ENC_BIG_ENDIAN, &test_value);
4326         if (test_value > 15)
4327         {
4328                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq process value [0..15]");
4329         }
4330
4331         // TPMI length
4332         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpmi_length, 1, ENC_BIG_ENDIAN, &test_value);
4333         if (!(test_value == 0 || test_value == 2 || test_value == 4))
4334         {
4335                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi length value [0, 2, 4]");
4336         }
4337
4338         // TPMI
4339         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpmi, 1, ENC_BIG_ENDIAN, &test_value);
4340         if (test_value > 15)
4341         {
4342                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi value [0..15]");
4343         }
4344
4345         // PMI flag
4346         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_pmi_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
4347         if (test_boolean > 1)
4348         {
4349                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pmi flag value [0..1]");
4350         }
4351
4352         // PMI
4353         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pmi, 1, ENC_BIG_ENDIAN, &test_value);
4354         if (test_value > 1)
4355         {
4356                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pmi value [0..1]");
4357         }
4358
4359         // HARQ resource offset
4360         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_resource_offset, 1, ENC_BIG_ENDIAN, &test_value);
4361         if (test_value > 3)
4362         {
4363                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq resource offset value [0..3]");
4364         }
4365
4366         // DCI subframe repetition number
4367         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dci_subframe_repetition_number, 1, ENC_BIG_ENDIAN, &test_value);
4368         if (!(test_value >= 1 && test_value <= 4))
4369         {
4370                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci subframe repetition number value [1..4]");
4371         }
4372
4373         // TPC
4374         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpc, 1, ENC_BIG_ENDIAN, &test_value);
4375         if (test_value > 3)
4376         {
4377                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpc value [0..3]");
4378         }
4379
4380         // Downlink assignment index Length
4381         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_assignment_index_length, 1, ENC_BIG_ENDIAN, &test_value);
4382         if (!(test_value == 0 || test_value == 2 || test_value == 4))
4383         {
4384                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink assignmnet index value [0, 2, 4]");
4385         }
4386
4387         // Downlink assignment index
4388         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_assignment_index, 1, ENC_BIG_ENDIAN, &test_value);
4389         if (test_value > 15)
4390         {
4391                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid downlink assignment index value [0..15]");
4392         }
4393
4394         // Allocate PRACH flag
4395         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_allocate_prach_flag, 1, ENC_BIG_ENDIAN, &test_value);
4396         if (test_value > 1)
4397         {
4398                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid allocate prach flag value [0..1]");
4399         }
4400
4401         // Preamble index
4402         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_preamble_index, 1, ENC_BIG_ENDIAN, &test_value);
4403         if (test_value > 63)
4404         {
4405                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid preamble index value [0..63]");
4406         }
4407
4408         // PRACH mask index
4409         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_prach_mask_index, 1, ENC_BIG_ENDIAN, &test_value);
4410         if (test_value > 15)
4411         {
4412                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid prach mask index value [0..15]");
4413         }
4414
4415         // Starting CE Level
4416         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_starting_ce_level, 1, ENC_BIG_ENDIAN, &test_value);
4417         if (test_value > 3)
4418         {
4419                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid starting ce level value [0..3]");
4420         }
4421
4422         // SRS request
4423         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_request, 1, ENC_BIG_ENDIAN, &test_boolean);
4424         if (test_boolean > 1)
4425         {
4426                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs request value [0..1]");
4427         }
4428
4429         // Antenna ports and scrambling identity flag
4430         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_antenna_ports_and_scrambling_identity_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
4431         if (test_boolean > 1)
4432         {
4433                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid antenna ports and scrambling identity flag value [0..1]");
4434         }
4435
4436         // Antenna ports and scrambling identity
4437         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_antenna_ports_and_scrambling_identity, 1, ENC_BIG_ENDIAN, &test_value);
4438         if (test_value > 3)
4439         {
4440                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid antenna ports and scrambling identity value [0..3]");
4441         }
4442
4443         // Frequency hopping enabled flag
4444         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_enabled_flag, 1, ENC_BIG_ENDIAN, &test_value);
4445         if (test_value > 1)
4446         {
4447                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping enabled flag value [0..1]");
4448         }
4449
4450         // Paging/Direct indication differentiation flag
4451         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_paging_direct_indication_differentiation_flag, 1, ENC_BIG_ENDIAN, &test_value);
4452         if (test_value > 1)
4453         {
4454                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid paging/direct indication differentiation flag value [0..1]");
4455         }
4456
4457         // Direct indication
4458         ptvcursor_add(ptvc, hf_nfapi_direct_indication, 1, ENC_BIG_ENDIAN);
4459
4460         // Total DCI length including padding
4461         ptvcursor_add(ptvc, hf_nfapi_total_dci_length_including_padding, 1, ENC_BIG_ENDIAN);
4462
4463         // Number of TX Antenna ports
4464         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_tx_antenna_ports, 1, ENC_BIG_ENDIAN, &count);
4465
4466         dissect_array_value(ptvc, pinfo, "Precoding", ett_nfapi_precoding, count, dissect_precoding_value);
4467 }
4468 static void dissect_ul_config_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
4469 {
4470         proto_item* item;
4471         guint32 test_value, size;
4472
4473         // PDU Type
4474         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_config_pdu_type, 1, ENC_BIG_ENDIAN, &test_value);
4475         if (test_value > 15)
4476         {
4477                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul pdu type value [0..15]");
4478         }
4479
4480         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_size, 1, ENC_BIG_ENDIAN, &size);
4481
4482         guint pdu_end = (ptvcursor_current_offset(ptvc) + size - 2);
4483         dissect_tlv_list(ptvc, pinfo, pdu_end);
4484 }
4485 static void  dissect_ul_config_request_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
4486 {
4487         proto_item* item;
4488         guint32 test_value, num_pdu;
4489         gboolean test_boolean;
4490
4491         // Number of PDUs
4492         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 1, ENC_BIG_ENDIAN, &num_pdu);
4493
4494         // RACH/PRACH frequency resources
4495         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rach_prach_frequency_resources, 1, ENC_BIG_ENDIAN, &test_value);
4496         if (test_value > 1)
4497         {
4498                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rach prach frequency resources value [0..1]");
4499         }
4500
4501         // SRS present
4502         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_present, 1, ENC_BIG_ENDIAN, &test_boolean);
4503         if (test_boolean > 1)
4504         {
4505                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs present value [0..1]");
4506         }
4507
4508         dissect_array_value(ptvc, pinfo, "UL Config PDU List", ett_nfapi_ul_config_request_pdu_list, num_pdu, dissect_ul_config_pdu);
4509 }
4510 static void dissect_ul_config_ulsch_pdu_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
4511 {
4512         proto_item* item;
4513         guint32 test_value;
4514
4515         // Handle
4516         ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
4517
4518         // Size
4519         ptvcursor_add(ptvc, hf_nfapi_size, 2, ENC_BIG_ENDIAN);
4520
4521         // RNTI
4522         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
4523         if (!(test_value >= 1))
4524         {
4525                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
4526         }
4527
4528         // Resource block start
4529         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_start, 1, ENC_BIG_ENDIAN, &test_value);
4530         if (test_value > 99)
4531         {
4532                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block start value [0..99]");
4533         }
4534
4535         // Number of resource blocks
4536         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_resource_blocks, 1, ENC_BIG_ENDIAN, &test_value);
4537         if (!(test_value >= 1 && test_value <= 100))
4538         {
4539                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of resource blocks value [1..100]");
4540         }
4541
4542         // Modulation type
4543         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_modulation, 1, ENC_BIG_ENDIAN, &test_value);
4544         if (!(test_value == 2 || test_value == 4 || test_value ==  6))
4545         {
4546                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid modulation type value [2, 4, 6]");
4547         }
4548
4549         // Cyclic Shift 2 for DMRS
4550         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cyclic_shift_2_for_drms, 1, ENC_BIG_ENDIAN, &test_value);
4551         if (test_value > 99)
4552         {
4553                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cyclic shift 2 for drms value [0..7]");
4554         }
4555
4556         // Frequency hopping enabled flag
4557         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_enabled_flag, 1, ENC_BIG_ENDIAN, &test_value);
4558         if (test_value > 1)
4559         {
4560                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping enabled flag value [0..1]");
4561         }
4562
4563         // Frequency hopping bits
4564         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_bits, 1, ENC_BIG_ENDIAN, &test_value);
4565         if (test_value > 3)
4566         {
4567                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping bits value [0..3]");
4568         }
4569
4570         // New data indication
4571         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indication, 1, ENC_BIG_ENDIAN, &test_value);
4572         if (test_value > 1)
4573         {
4574                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indicator value [0..1]");
4575         }
4576
4577         // Redundancy version
4578         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version, 1, ENC_BIG_ENDIAN, &test_value);
4579         if (test_value > 3)
4580         {
4581                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy version value [0..3]");
4582         }
4583
4584         // HARQ process number
4585         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_process_number, 1, ENC_BIG_ENDIAN, &test_value);
4586         if (test_value > 15)
4587         {
4588                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq process number value [0..15]");
4589         }
4590
4591         // UL Tx mode
4592         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_tx_mode, 1, ENC_BIG_ENDIAN, &test_value);
4593         if (test_value > 1)
4594         {
4595                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul tx mode value [0..1]");
4596         }
4597
4598         // Current TX NB
4599         ptvcursor_add(ptvc, hf_nfapi_current_tx_nb, 1, ENC_BIG_ENDIAN);
4600
4601         // N srs
4602         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_srs, 1, ENC_BIG_ENDIAN, &test_value);
4603         if (test_value > 1)
4604         {
4605                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n_srs value [0..1]");
4606         }
4607 }
4608 static void dissect_ul_config_ulsch_pdu_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
4609 {
4610         proto_item* item;
4611         guint32 test_value;
4612
4613         // Resource allocation type
4614         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN, &test_value);
4615         if (test_value > 1)
4616         {
4617                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocation type value [0..1]");
4618         }
4619
4620         // Resource block coding
4621         ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
4622
4623         // Transport blocks
4624         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transport_blocks, 1, ENC_BIG_ENDIAN, &test_value);
4625         if (!(test_value >= 1 && test_value <= 2))
4626         {
4627                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transport blocks value [1..2]");
4628         }
4629
4630         // Transmission scheme
4631         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_transmission_scheme, 1, ENC_BIG_ENDIAN, &test_value);
4632         if (test_value > 1)
4633         {
4634                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission scheme value [0..1]");
4635         }
4636
4637         // Number Of layers
4638         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_layers, 1, ENC_BIG_ENDIAN, &test_value);
4639         if (!(test_value >= 1 && test_value <=4 ))
4640         {
4641                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of layers value [1..4]");
4642         }
4643
4644         // Codebook Index
4645         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_codebook_index, 1, ENC_BIG_ENDIAN, &test_value);
4646         if (test_value > 23)
4647         {
4648                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid codebook index value [0..23]");
4649         }
4650
4651         // Disable sequence hopping flag
4652         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_disable_sequence_hopping_flag, 1, ENC_BIG_ENDIAN, &test_value);
4653         if (test_value > 1)
4654         {
4655                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid disable sequence hopping flag value [0..1]");
4656         }
4657 }
4658 static void dissect_ul_config_ulsch_pdu_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
4659 {
4660         proto_item* item;
4661         guint32 test_value;
4662
4663         // Virtual cell ID enabled flag
4664         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_virtual_cell_id_enabled_flag, 1, ENC_BIG_ENDIAN, &test_value);
4665         if (test_value > 1)
4666         {
4667                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid virtual cell id enabled flag value [0..1]");
4668         }
4669
4670         // nPUSCH Identity
4671         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_npusch_identity, 2, ENC_BIG_ENDIAN, &test_value);
4672         if (test_value > 509)
4673         {
4674                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npusch identity value [0..509]");
4675         }
4676
4677         // DMRS Config flag
4678         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_config_flag, 1, ENC_BIG_ENDIAN, &test_value);
4679         if (test_value > 1)
4680         {
4681                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms config flag value [0..1]");
4682         }
4683
4684         // nDMRS-CSH Identity
4685         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ndrms_csh_identity, 2, ENC_BIG_ENDIAN, &test_value);
4686         if (test_value > 509)
4687         {
4688                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ndrms-csh identity value [0..509]");
4689         }
4690
4691 }
4692 static void dissect_ul_config_ulsch_pdu_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4693 {
4694         proto_item* item;
4695         guint32 test_value;
4696
4697         // UE Type
4698         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_type, 1, ENC_BIG_ENDIAN, &test_value);
4699         if (test_value > 2)
4700         {
4701                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue type value [0..2]");
4702         }
4703
4704         // Total Number of repetitions
4705         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_total_number_of_repetitions, 2, ENC_BIG_ENDIAN, &test_value);
4706         if (!(test_value >= 1 && test_value <= 2048))
4707         {
4708                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid total number of repetitions value [1..2048]");
4709         }
4710
4711         // Repetition Number
4712         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_repetition_number, 2, ENC_BIG_ENDIAN, &test_value);
4713         if (!(test_value >= 1 && test_value <= 2048))
4714         {
4715                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid repetition number value [1..2048]");
4716         }
4717
4718         // Initial transmission SF (io)
4719         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_sf_io, 2, ENC_BIG_ENDIAN, &test_value);
4720         if (!(test_value <= 10239 || test_value == 0xFFFF))
4721         {
4722                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid repetition number value [0..10239, 0xFFFF]");
4723         }
4724
4725         // Empy symbols due to re-tunning
4726         // todo : decode as a bitmap
4727         ptvcursor_add(ptvc, hf_nfapi_empty_symbols_due_to_retunning, 1, ENC_BIG_ENDIAN);
4728 }
4729 static void dissect_ul_config_init_tx_params_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
4730 {
4731         proto_item* item;
4732         guint32 test_value;
4733
4734         // N srs initial
4735         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_srs_initial, 1, ENC_BIG_ENDIAN, &test_value);
4736         if (test_value > 1)
4737         {
4738                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n srs initial value [0..1]");
4739         }
4740
4741         // Initial number of resource blocks
4742         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_number_of_resource_blocks, 1, ENC_BIG_ENDIAN, &test_value);
4743         if (!(test_value >= 1 && test_value <= 100))
4744         {
4745                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial number of resource blocks value [1..100]");
4746         }
4747
4748 }
4749 static void dissect_ul_config_cqi_ri_info_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
4750 {
4751         proto_item* item;
4752         guint32 test_value;
4753
4754         // DL CQI/PMI Size Rank = 1
4755         ptvcursor_add(ptvc, hf_nfapi_dl_cqi_pmi_size_rank_1, 1, ENC_BIG_ENDIAN);
4756
4757         // DL CQI/PMI Size Rank>1
4758         ptvcursor_add(ptvc, hf_nfapi_dl_cqi_pmi_size_rank_greater_1, 1, ENC_BIG_ENDIAN);
4759
4760         // RI Size
4761         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ri_size, 1, ENC_BIG_ENDIAN, &test_value);
4762         if (test_value > 3)
4763         {
4764                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ri size value [0..3]");
4765         }
4766
4767         // Delta Offset CQI
4768         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_cqi, 1, ENC_BIG_ENDIAN, &test_value);
4769         if (test_value > 15)
4770         {
4771                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset cqi value [0..15]");
4772         }
4773
4774         // Delta Offset RI
4775         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_ri, 1, ENC_BIG_ENDIAN, &test_value);
4776         if (test_value > 15)
4777         {
4778                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset ri value [0..15]");
4779         }
4780
4781 }
4782 static void dissect_ul_config_cqi_ri_info_rel9_later_value(ptvcursor_t * ptvc, packet_info* pinfo)
4783 {
4784         proto_item* item;
4785         guint32 test_value;
4786         gboolean type, test_boolean;
4787
4788         // Report type
4789         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_report_type, 1, ENC_BIG_ENDIAN, &type);
4790         if (type > 1)
4791         {
4792                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid report type value [0..1]");
4793         }
4794
4795         // Delta offset CQI
4796         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_cqi, 1, ENC_BIG_ENDIAN, &test_value);
4797         if (test_value > 15)
4798         {
4799                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset cqi value [0..15]");
4800         }
4801
4802         // Delta offset RI
4803         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_ri, 1, ENC_BIG_ENDIAN, &test_value);
4804         if (test_value > 15)
4805         {
4806                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset ri value [0..15]");
4807         }
4808
4809         switch (type)
4810         {
4811                 case 0:
4812                 {
4813                         // DL CQI/PMI/RI size
4814                         ptvcursor_add(ptvc, hf_nfapi_dl_cqi_ri_pmi_size, 1, ENC_BIG_ENDIAN);
4815
4816                         // Control Type
4817                         ptvcursor_add_ret_boolean(ptvc, hf_nfapi_control_type, 1, ENC_BIG_ENDIAN, &test_boolean);
4818                         if (test_boolean > 1)
4819                         {
4820                                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid control type value [0..1]");
4821                         }
4822                         break;
4823                 }
4824                 case 1:
4825                 {
4826                         // todo : encoder not right for this case.
4827                         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_cc, 1, ENC_BIG_ENDIAN, &test_value);
4828
4829                         if (!(test_value >= 1 && test_value <= 32))
4830                         {
4831                                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of cc value [1..32]");
4832                         }
4833
4834                         /*
4835                         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "CCs");
4836
4837                         for (int i = 0; i < num_cc; ++i)
4838                         {
4839                                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "[%d]", i);
4840
4841                                 guint8 ri_size = tvb_get_guint8(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
4842                                 ptvcursor_add(ptvc, hf_nfapi_ri_size, 1, ENC_BIG_ENDIAN);
4843
4844                                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "Rank");
4845
4846                                 for (int j = 0; j < ri_size; ++j)
4847                                 {
4848                                         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "[%d]", j);
4849                                         ptvcursor_add(ptvc, hf_nfapi_dl_cqi_pmi_size, 1, ENC_BIG_ENDIAN);
4850                                         ptvcursor_pop_subtree(ptvc);
4851                                 }
4852
4853                                 ptvcursor_pop_subtree(ptvc);
4854
4855                                 ptvcursor_pop_subtree(ptvc);
4856                         }
4857
4858                         ptvcursor_pop_subtree(ptvc);
4859                         */
4860
4861                         break;
4862                 }
4863         }
4864 }
4865 static void dissect_ul_config_cqi_ri_info_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4866 {
4867         guint32 test_value;
4868
4869         // DL CQI/PMI/RI size 2
4870         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_cqi_ri_pmi_size_2, 2, ENC_BIG_ENDIAN, &test_value);
4871         if (test_value < 255)
4872         {
4873                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dl cqi ri pmi size 2 value [>= 255]");
4874         }
4875 }
4876 static void dissect_ul_config_harq_info_ulsch_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
4877 {
4878         proto_item* item;
4879         guint32 test_value;
4880
4881         // HARQ Size
4882         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_size, 1, ENC_BIG_ENDIAN, &test_value);
4883         if (test_value > 21)
4884         {
4885                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq size value [0..21]");
4886         }
4887
4888         // Delta Offset HARQ
4889         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_harq, 1, ENC_BIG_ENDIAN, &test_value);
4890         if (test_value > 15)
4891         {
4892                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset harq value [0..15]");
4893         }
4894
4895         // ACK_NACK mode
4896         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tdd_ack_nack_mode, 1, ENC_BIG_ENDIAN, &test_value);
4897         if (test_value > 5)
4898         {
4899                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ack nack mode value [0..5]");
4900         }
4901 }
4902 static void dissect_ul_config_harq_info_ulsch_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4903 {
4904         proto_item* item;
4905         guint32 test_value;
4906
4907         // HARQ Size 2
4908         ptvcursor_add(ptvc, hf_nfapi_harq_size_2, 2, ENC_BIG_ENDIAN);
4909
4910         // Delta Offset HARQ 2
4911         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_delta_offset_harq_2, 1, ENC_BIG_ENDIAN, &test_value);
4912         if (test_value > 15)
4913         {
4914                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid delta offset harq 2 value [0..15]");
4915         }
4916 }
4917 static void dissect_ul_config_ue_info_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
4918 {
4919         proto_item* item;
4920         guint32 test_value;
4921
4922         // Handle
4923         ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
4924
4925         // RNTI
4926         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
4927         if (test_value < 1)
4928         {
4929                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
4930         }
4931 }
4932 static void dissect_ul_config_ue_info_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
4933 {
4934         proto_item* item;
4935         guint32 test_value;
4936
4937         // Virtual cell ID enabled flag
4938         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_virtual_cell_id_enabled_flag, 1, ENC_BIG_ENDIAN, &test_value);
4939         if (test_value > 1)
4940         {
4941                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid virtual cell id enabled flag value [0..1]");
4942         }
4943
4944         // nPUCCH Identity
4945         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_npucch_identity, 2, ENC_BIG_ENDIAN, &test_value);
4946         if (test_value > 503)
4947         {
4948                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch identity value [0..503]");
4949         }
4950
4951 }
4952 static void dissect_ul_config_ue_info_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
4953 {
4954         proto_item* item;
4955         guint32 test_value;
4956
4957         // UE Type
4958         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_type, 1, ENC_BIG_ENDIAN, &test_value);
4959         if (test_value > 2)
4960         {
4961                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue type value [0..2]");
4962         }
4963
4964         // Empty symbols
4965         // todo : use bit map decoding
4966         ptvcursor_add(ptvc, hf_nfapi_empty_symbols, 1, ENC_BIG_ENDIAN);
4967
4968         // Total Number of repetitions
4969         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_total_number_of_repetitions, 2, ENC_BIG_ENDIAN, &test_value);
4970         if (!(test_value >= 1 && test_value <= 32))
4971         {
4972                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid total number of repetitions value [1..32]");
4973         }
4974
4975         // Repetition Number
4976         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_repetition_number, 2, ENC_BIG_ENDIAN, &test_value);
4977         if (!(test_value >= 1 && test_value <= 32))
4978         {
4979                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid repetition number value [1..32]");
4980         }
4981
4982 }
4983 static void dissect_ul_config_cqi_info_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
4984 {
4985         proto_item* item;
4986         guint32 test_value;
4987
4988         // PUCCH index
4989         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_index, 2, ENC_BIG_ENDIAN, &test_value);
4990         if (test_value > 1184)
4991         {
4992                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch index value [0..1184]");
4993         }
4994
4995         // DL CQI/PMI Size
4996         ptvcursor_add(ptvc, hf_nfapi_dl_cqi_pmi_size, 1, ENC_BIG_ENDIAN);
4997 }
4998 static void dissect_ul_config_cqi_info_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
4999 {
5000         proto_item* item;
5001         guint32 test_value;
5002
5003         // Number of PUCCH Resources
5004         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_pucch_resource, 1, ENC_BIG_ENDIAN, &test_value);
5005         if (!(test_value >= 1 && test_value <= 2))
5006         {
5007                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pucch resources value [1..2]");
5008         }
5009
5010         //PUCCH Index P1
5011         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_index_p1, 2, ENC_BIG_ENDIAN, &test_value);
5012         if (test_value > 1184)
5013         {
5014                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch index p1 value [0..1184]");
5015         }
5016 }
5017 static void dissect_ul_config_cqi_info_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
5018 {
5019         proto_item* item;
5020         guint32 test_value;
5021
5022         // CSI_mode
5023         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_mode, 1, ENC_BIG_ENDIAN, &test_value);
5024         if (test_value > 2)
5025         {
5026                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi mode value [0..2]");
5027         }
5028
5029         // DL CQI/PMI Size 2
5030         ptvcursor_add(ptvc, hf_nfapi_dl_cqi_pmi_size_2, 2, ENC_BIG_ENDIAN);
5031
5032         // Starting PRB
5033         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_statring_prb, 1, ENC_BIG_ENDIAN, &test_value);
5034         if (test_value > 109)
5035         {
5036                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid starting prb value [0..109]");
5037         }
5038
5039         // n_PRB
5040         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nprb, 1, ENC_BIG_ENDIAN, &test_value);
5041         if (test_value > 7)
5042         {
5043                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n prb value [0..7]");
5044         }
5045
5046         // cdm_Index
5047         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cdm_index, 1, ENC_BIG_ENDIAN, &test_value);
5048         if (test_value > 1)
5049         {
5050                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cdm index value [0..1]");
5051         }
5052
5053         // N srs
5054         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nsrs, 1, ENC_BIG_ENDIAN, &test_value);
5055         if (test_value > 1)
5056         {
5057                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n srs value [0..1]");
5058         }
5059
5060 }
5061 static void dissect_ul_config_sr_info_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
5062 {
5063         guint32 test_value;
5064         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_index, 1, ENC_BIG_ENDIAN, &test_value);
5065         if (test_value > 2047)
5066         {
5067                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch index value [0..2047]");
5068         }
5069 }
5070 static void dissect_ul_config_sr_info_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
5071 {
5072         proto_item* item;
5073         guint32 test_value;
5074
5075         // Number of PUCCH Resources
5076         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_pucch_resource, 1, ENC_BIG_ENDIAN, &test_value);
5077         if (!(test_value >= 1 && test_value <= 2))
5078         {
5079                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pucch resources value [1..2]");
5080         }
5081
5082         // PUCCH Index P1
5083         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pucch_index_p1, 2, ENC_BIG_ENDIAN, &test_value);
5084         if (test_value > 2047)
5085         {
5086                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pucch index p1 value [0..2047]");
5087         }
5088 }
5089 static void dissect_ul_config_harq_info_uci_rel10_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
5090 {
5091         proto_item* item;
5092         guint32 test_value, ack_nack_mode_value;
5093
5094         // HARQ size
5095         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_size, 1, ENC_BIG_ENDIAN, &test_value);
5096         if (test_value > 21)
5097         {
5098                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq size value [0..21]");
5099         }
5100
5101         // ACK_NACK mode
5102         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tdd_ack_nack_mode, 1, ENC_BIG_ENDIAN, &ack_nack_mode_value);
5103         if (ack_nack_mode_value > 5)
5104         {
5105                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ack nack mode value [0..5]");
5106         }
5107
5108         // Number of PUCCH resources
5109         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_pucch_resource, 1, ENC_BIG_ENDIAN, &test_value);
5110         if (test_value > 4)
5111         {
5112                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pucch resources value [0..4]");
5113         }
5114
5115         // n_PUCCH_1_0
5116         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_0, 2, ENC_BIG_ENDIAN, &test_value);
5117         if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1 || ack_nack_mode_value == 2)
5118         {
5119                 if (test_value > 2047)
5120                 {
5121                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 0 value [0..2047] (All Format 1a/1b)");
5122                 }
5123         }
5124         else if (ack_nack_mode_value == 3)
5125         {
5126                 if (test_value > 549)
5127                 {
5128                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 0 value [0..549] (Format 3)");
5129                 }
5130         }
5131
5132         // n_PUCCH_1_1
5133         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_1, 2, ENC_BIG_ENDIAN, &test_value);
5134         if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1 || ack_nack_mode_value == 2)
5135         {
5136                 if (test_value > 2047)
5137                 {
5138                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 1 value [0..2047] (All Format 1a/1b)");
5139                 }
5140         }
5141
5142         // n_PUCCH_1_2
5143         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_2, 2, ENC_BIG_ENDIAN, &test_value);
5144         if (ack_nack_mode_value == 2)
5145         {
5146                 if (test_value > 2047)
5147                 {
5148                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 2 value [0..2047] (All Format 1a/1b)");
5149                 }
5150         }
5151
5152         // n_PUCCH_1_3
5153         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_3, 2, ENC_BIG_ENDIAN, &test_value);
5154         if (ack_nack_mode_value == 2)
5155         {
5156                 if (test_value > 2047)
5157                 {
5158                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 3 value [0..2047] (All Format 1a/1b)");
5159                 }
5160         }
5161 }
5162 static void dissect_ul_config_harq_info_uci_rel8_fdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
5163 {
5164         proto_item* item;
5165         guint32 test_value;
5166
5167         // n_PUCCH_1_0
5168         // todo : how to work out the ack_nack mode?
5169         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_0, 2, ENC_BIG_ENDIAN, &test_value);
5170         if (test_value > 2047)
5171         {
5172                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n pucch 1 0 value [0..2047]");
5173         }
5174
5175         // HARQ Size
5176         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_size, 1, ENC_BIG_ENDIAN, &test_value);
5177         if (!(test_value >= 1 && test_value <= 2))
5178         {
5179                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq size value [1..2]");
5180         }
5181 }
5182 static void dissect_ul_config_harq_info_uci_rel9_later_fdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
5183 {
5184         proto_item *item, *harq_size_item;
5185         guint32 test_value, harq_size_value, ack_nack_mode_value;
5186
5187         // HARQ Size
5188         harq_size_item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_size, 1, ENC_BIG_ENDIAN, &harq_size_value);
5189
5190         // ACK_NAK mode
5191         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_fdd_ack_nack_mode, 1, ENC_BIG_ENDIAN, &ack_nack_mode_value);
5192         if (ack_nack_mode_value > 4)
5193         {
5194                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ack nack mode value [0..4]");
5195         }
5196
5197         if (ack_nack_mode_value == 0 || ack_nack_mode_value == 2)
5198         {
5199                 if (!(harq_size_value >= 1 && harq_size_value <= 10))
5200                 {
5201                         expert_add_info_format(pinfo, harq_size_item, &ei_invalid_range, "Invalid harq size value [1..10] (Format 1a/1b/3)");
5202                 }
5203         }
5204         else if (ack_nack_mode_value == 3 ||  ack_nack_mode_value == 4)
5205         {
5206                 if (harq_size_value != 0)
5207                 {
5208                         expert_add_info_format(pinfo, harq_size_item, &ei_invalid_range, "Invalid harq size value [0] (Format 4/5)");
5209                 }
5210         }
5211
5212         // Number of PUCCH Resources
5213         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_pucch_resource, 1, ENC_BIG_ENDIAN, &test_value);
5214         if (test_value == 0 || test_value == 2)
5215         {
5216                 if (!(harq_size_value >= 1 && harq_size_value <= 4))
5217                 {
5218                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq size value [1..4] (Format 1a/1b/3)");
5219                 }
5220         }
5221         else if (test_value == 3 || test_value == 4)
5222         {
5223                 if (harq_size_value != 0)
5224                 {
5225                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq size value [0] (Format 4/5)");
5226                 }
5227         }
5228
5229         // n_PUCCH_1_0
5230         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_0, 2, ENC_BIG_ENDIAN, &test_value);
5231         if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1)
5232         {
5233                 if (test_value > 2047)
5234                 {
5235                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 1 0 value [0..2047] (Format 1a/1b/channel selection)");
5236                 }
5237         }
5238         else if (ack_nack_mode_value == 2)
5239         {
5240                 if (test_value > 549)
5241                 {
5242                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 1 0 value [0..549] (Format 3)");
5243                 }
5244         }
5245
5246         // n_PUCCH_1_1
5247         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_1, 2, ENC_BIG_ENDIAN, &test_value);
5248         if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1)
5249         {
5250                 if (test_value > 2047)
5251                 {
5252                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 1 1 value [0..2047] (Format 1a/1b/channel selection)");
5253                 }
5254         }
5255
5256         // n_PUCCH_1_2
5257         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_2, 2, ENC_BIG_ENDIAN, &test_value);
5258         if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1)
5259         {
5260                 if (test_value > 2047)
5261                 {
5262                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 1 2 value [0..2047] (Format 1a/1b/channel selection)");
5263                 }
5264         }
5265
5266         // n_PUCCH_1_3
5267         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_1_3, 2, ENC_BIG_ENDIAN, &test_value);
5268         if (ack_nack_mode_value == 0 || ack_nack_mode_value == 1)
5269         {
5270                 if (test_value > 2047)
5271                 {
5272                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 1 3 value [0..2047] (Format 1a/1b/channel selection)");
5273                 }
5274         }
5275 }
5276 static void dissect_ul_config_harq_info_uci_rel11_fdd_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
5277 {
5278         proto_item* item;
5279         guint32 test_value;
5280
5281         // Num_ant_ports
5282         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_num_ant_ports, 1, ENC_BIG_ENDIAN, &test_value);
5283         if (!(test_value >= 1 && test_value <= 2))
5284         {
5285                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid num ant ports value [1..2]");
5286         }
5287
5288         // n_PUCCH_2_0
5289         // todo : how to work out the ack nack mode
5290         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_2_0, 2, ENC_BIG_ENDIAN, &test_value);
5291         if (test_value > 2047)
5292         {
5293                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 2 0 value [0..2047]");
5294         }
5295
5296         // n_PUCCH_2_1
5297         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_2_1, 2, ENC_BIG_ENDIAN, &test_value);
5298         if (test_value > 2047)
5299         {
5300                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 2 1 value [0..2047]");
5301         }
5302
5303         // n_PUCCH_2_2
5304         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_2_2, 2, ENC_BIG_ENDIAN, &test_value);
5305         if (test_value > 2047)
5306         {
5307                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 2 2 value [0..2047]");
5308         }
5309
5310         // n_PUCCH_2_3
5311         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_pucch_2_3, 2, ENC_BIG_ENDIAN, &test_value);
5312         if (test_value > 2047)
5313         {
5314                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid npucch 2 3 value [0..2047]");
5315         }
5316
5317 }
5318 static void dissect_ul_config_harq_info_uci_rel13_fdd_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
5319 {
5320         proto_item* item;
5321         guint32 test_value;
5322
5323         // HARQ Size 2
5324         ptvcursor_add(ptvc, hf_nfapi_harq_size_2, 2, ENC_BIG_ENDIAN);
5325
5326         // Starting PRB
5327         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_starting_prb, 1, ENC_BIG_ENDIAN, &test_value);
5328         if (test_value > 109)
5329         {
5330                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid starting prb value [0..109]");
5331         }
5332
5333         // n_PRB
5334         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nprb, 1, ENC_BIG_ENDIAN, &test_value);
5335         if (test_value > 109)
5336         {
5337                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n prb value [0..7]");
5338         }
5339
5340         // cdm_Index
5341         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cdm_index, 1, ENC_BIG_ENDIAN, &test_value);
5342         if (test_value > 1)
5343         {
5344                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cdm index value [0..1]");
5345         }
5346
5347         // N srs
5348         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_nsrs, 1, ENC_BIG_ENDIAN, &test_value);
5349         if (test_value > 1)
5350         {
5351                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n srs value [0..1]");
5352         }
5353 }
5354 static void dissect_ul_config_srs_info_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
5355 {
5356         proto_item* item;
5357         guint32 test_value;
5358
5359         // Handle
5360         ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
5361
5362         // Size
5363         ptvcursor_add(ptvc, hf_nfapi_size, 2, ENC_BIG_ENDIAN);
5364
5365         // RNTI
5366         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
5367         if (test_value < 1)
5368         {
5369                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
5370         }
5371
5372         // SRS Bandwidth
5373         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_srs_bandwidth, 1, ENC_BIG_ENDIAN, &test_value);
5374         if (test_value > 3)
5375         {
5376                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs bandwidth value [0..3]");
5377         }
5378
5379         // Frequency Domain Position
5380         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_domain_position, 1, ENC_BIG_ENDIAN, &test_value);
5381         if (test_value > 23)
5382         {
5383                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency domain bandwidth value [0..23]");
5384         }
5385
5386         // SRS Hopping Bandwidth
5387         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_srs_hopping_bandwidth, 1, ENC_BIG_ENDIAN, &test_value);
5388         if (test_value > 3)
5389         {
5390                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs hopping bandwidth value [0..3]");
5391         }
5392
5393         // Transmission Comb
5394         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_comb, 1, ENC_BIG_ENDIAN, &test_value);
5395         if (test_value > 3)
5396         {
5397                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission comb value [0..3]");
5398         }
5399
5400         // ISRS / SRS-ConfigIndex
5401         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_i_srs, 2, ENC_BIG_ENDIAN, &test_value);
5402         if (test_value > 1023)
5403         {
5404                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid isrs/srs-configindex value [0..1023]");
5405         }
5406
5407         // Sounding Reference Cyclic Shift
5408         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_sounding_reference_cyclic_shift, 1, ENC_BIG_ENDIAN, &test_value);
5409         if (test_value > 11)
5410         {
5411                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid sounding reference cyclic shift value [0..11]");
5412         }
5413 }
5414 static void dissect_ul_config_srs_info_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
5415 {
5416         guint32 test_value;
5417
5418         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_antenna_port, 1, ENC_BIG_ENDIAN, &test_value);
5419         if (test_value > 2)
5420         {
5421                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid antenna port value [0..2]");
5422         }
5423 }
5424 static void dissect_ul_config_srs_info_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
5425 {
5426         guint32 test_value;
5427
5428         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_combs, 1, ENC_BIG_ENDIAN, &test_value);
5429         if (test_value > 1)
5430         {
5431                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of combs value [0..1]");
5432         }
5433 }
5434 static void dissect_hi_dci0_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
5435 {
5436         guint32 test_value, size;
5437
5438         // PDU Type
5439         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_hi_dci0_pdu_type, 1, ENC_BIG_ENDIAN, &test_value);
5440         if (test_value > 3)
5441         {
5442                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdu type value [0..3]");
5443         }
5444
5445         // PDU Size
5446         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_size, 1, ENC_BIG_ENDIAN, &size);
5447
5448         guint pdu_end = (ptvcursor_current_offset(ptvc) + size - 2);
5449         dissect_tlv_list(ptvc, pinfo, pdu_end);
5450 }
5451 static void dissect_hi_dci0_request_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
5452 {
5453         guint32 test_value, num_pdu;
5454
5455         // SFN/SF
5456         ptvcursor_add(ptvc, hf_nfapi_sfn_sf, 2, ENC_BIG_ENDIAN);
5457
5458         // Number of DCI
5459         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_dci_pdus, 1, ENC_BIG_ENDIAN, &num_pdu);
5460
5461         // Number of  HI
5462         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_hi_pdus, 1, ENC_BIG_ENDIAN, &test_value);
5463         num_pdu += test_value;
5464
5465         dissect_array_value(ptvc, pinfo, "HI DCI0 PDU List", ett_nfapi_hi_dci0_request_pdu_list, num_pdu, dissect_hi_dci0_pdu);
5466 }
5467 static void dissect_hi_dci0_hi_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
5468 {
5469         proto_item* item;
5470         guint32 test_value;
5471         gboolean test_boolean;
5472
5473         // Resource block start
5474         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_start, 1, ENC_BIG_ENDIAN, &test_value);
5475         if (test_value > 100)
5476         {
5477                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block start value [0..100]");
5478         }
5479
5480         // Cyclic Shift 2 for DMRS
5481         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cyclic_shift_2_for_drms, 1, ENC_BIG_ENDIAN, &test_value);
5482         if (test_value > 7)
5483         {
5484                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cyclic shift 2 for drms value [0..7]");
5485         }
5486
5487         // HI value
5488         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_hi_value, 1, ENC_BIG_ENDIAN, &test_boolean);
5489         if (test_boolean > 1)
5490         {
5491                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid hi value [0..1]");
5492         }
5493
5494         // I_PHICH
5495         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_i_phich, 1, ENC_BIG_ENDIAN, &test_value);
5496         if (test_value > 1)
5497         {
5498                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid i phich value [0..1]");
5499         }
5500
5501         // Transmission power
5502         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
5503         if (test_value > 10000)
5504         {
5505                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
5506         }
5507
5508 }
5509 static void dissect_hi_dci0_hi_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
5510 {
5511         proto_item* item;
5512         gboolean test_boolean;
5513
5514         // Flag TB2
5515         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_flag_tb2, 1, ENC_BIG_ENDIAN, &test_boolean);
5516         if (test_boolean > 1)
5517         {
5518                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid flag tb2 value [0..1]");
5519         }
5520
5521         // HI Value 2
5522         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_hi_value_2, 1, ENC_BIG_ENDIAN, &test_boolean);
5523         if (test_boolean > 1)
5524         {
5525                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid hi2 value [0..1]");
5526         }
5527
5528 }
5529 static void dissect_hi_dci0_dci_ul_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
5530 {
5531         proto_item* item;
5532         guint32 test_value;
5533
5534         // DCI format
5535         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_dci_format, 1, ENC_BIG_ENDIAN, &test_value);
5536         if (test_value > 4)
5537         {
5538                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci format value [0..4]");
5539         }
5540
5541         // CCE index
5542         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cce_idx, 1, ENC_BIG_ENDIAN, &test_value);
5543         if (test_value > 88)
5544         {
5545                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cce index value [0..88]");
5546         }
5547
5548         // Aggregation level
5549         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_aggregation_level, 1, ENC_BIG_ENDIAN, &test_value);
5550         if (!(test_value == 1 || test_value == 2 || test_value == 4 ||
5551                   test_value == 8))
5552         {
5553                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid aggregation level value [1, 2, 4, 8]");
5554         }
5555
5556         // RNTI
5557         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
5558         if (test_value < 1)
5559         {
5560                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
5561         }
5562
5563         // Resource block start
5564         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_start, 1, ENC_BIG_ENDIAN, &test_value);
5565         if (test_value > 100)
5566         {
5567                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block start value [0..100]");
5568         }
5569
5570         // Number of resource blocks
5571         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_resource_blocks, 1, ENC_BIG_ENDIAN, &test_value);
5572         if (test_value > 100)
5573         {
5574                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of resource blocks value [0..100]");
5575         }
5576
5577         // MCS_1
5578         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs_1, 1, ENC_BIG_ENDIAN, &test_value);
5579         if (test_value > 31)
5580         {
5581                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs 1 value [0..31]");
5582         }
5583
5584         // Cyclic Shift 2 for DMRS
5585         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cyclic_shift_2_for_drms, 1, ENC_BIG_ENDIAN, &test_value);
5586         if (test_value > 7)
5587         {
5588                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cyclic shift 2 for drms value [0..7]");
5589         }
5590
5591         // Frequency hopping enabled flag
5592         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_enabled_flag, 1, ENC_BIG_ENDIAN, &test_value);
5593         if (test_value > 1)
5594         {
5595                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping enabled flag value [0..1]");
5596         }
5597
5598         // Frequency hopping bits
5599         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_bits, 1, ENC_BIG_ENDIAN, &test_value);
5600         if (test_value > 3)
5601         {
5602                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping bits value [0..3]");
5603         }
5604
5605         // New Data indication_1
5606         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indication, 1, ENC_BIG_ENDIAN, &test_value);
5607         if (test_value > 1)
5608         {
5609                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indication value [0..1]");
5610         }
5611
5612         // UE TX antenna selection
5613         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ue_tx_antenna_selection, 1, ENC_BIG_ENDIAN, &test_value);
5614         if (test_value > 2)
5615         {
5616                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ue tx antenna selection value [0..2]");
5617         }
5618
5619         // TPC
5620         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpc, 1, ENC_BIG_ENDIAN, &test_value);
5621         if (test_value > 3)
5622         {
5623                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpc value value [0..3]");
5624         }
5625
5626         // CQI/CSI request
5627         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_cqi_csi_request, 1, ENC_BIG_ENDIAN, &test_value);
5628         if (test_value > 7)
5629         {
5630                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cqi csi value [0..7]");
5631         }
5632
5633         // UL index
5634         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_index, 1, ENC_BIG_ENDIAN, &test_value);
5635         if (test_value > 3)
5636         {
5637                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul index value [0..3]");
5638         }
5639
5640         // DL assignment index
5641         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_assignment_index, 1, ENC_BIG_ENDIAN, &test_value);
5642         if (!(test_value >= 1 && test_value <= 4))
5643         {
5644                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dl assignment index value [1..4]");
5645         }
5646
5647         // TPC bitmap
5648         ptvcursor_add(ptvc, hf_nfapi_tpc_bitmap, 4, ENC_BIG_ENDIAN);
5649
5650         // Transmission power
5651         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
5652         if (test_value > 10000)
5653         {
5654                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
5655         }
5656 }
5657
5658 static void dissect_hi_dci0_dci_ul_rel10_value(ptvcursor_t * ptvc, packet_info* pinfo)
5659 {
5660         proto_item* item;
5661         guint32 test_value, number_of_antenna_ports_value;
5662         gboolean test_boolean;
5663
5664         // Cross carrier scheduling flag
5665         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_cross_carrier_scheduling_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
5666         if (test_boolean > 1)
5667         {
5668                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cross carrier scheduling flag value [0..1]");
5669         }
5670
5671         // Carrier indicator
5672         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_carrier_indicator, 1, ENC_BIG_ENDIAN, &test_value);
5673         if (test_value > 7)
5674         {
5675                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid carrier indicator value [0..7]");
5676         }
5677
5678         // Size of CQI/CSI field
5679         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_size_of_cqi_csi_feild, 1, ENC_BIG_ENDIAN, &test_value);
5680         if (test_value > 2)
5681         {
5682                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid size of cqi/csi field value [0..2]");
5683         }
5684
5685         // SRS flag
5686         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
5687         if (test_boolean > 1)
5688         {
5689                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs field value [0..1]");
5690         }
5691
5692         // SRS request
5693         ptvcursor_add(ptvc, hf_nfapi_srs_request, 1, ENC_BIG_ENDIAN);
5694
5695         // Resource allocation flag
5696         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_flag, 1, ENC_BIG_ENDIAN, &test_value);
5697         if (test_value > 1)
5698         {
5699                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocation flag value [0..1]");
5700         }
5701
5702         // Resource allocation type
5703         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_allocation_type, 1, ENC_BIG_ENDIAN, &test_value);
5704         if (test_value > 1)
5705         {
5706                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource allocation type value [0..1]");
5707         }
5708
5709         // Resource block coding
5710         ptvcursor_add(ptvc, hf_nfapi_resource_block_coding, 4, ENC_BIG_ENDIAN);
5711
5712         // MCS_2
5713         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs_2, 1, ENC_BIG_ENDIAN, &test_value);
5714         if (test_value > 31)
5715         {
5716                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs 2 value [0..31]");
5717         }
5718
5719         // New data indication_2
5720         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indication_two, 1, ENC_BIG_ENDIAN, &test_value);
5721         if (test_value > 1)
5722         {
5723                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indication 2 value [0..1]");
5724         }
5725
5726         // Number of antenna ports
5727         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_antenna_ports, 1, ENC_BIG_ENDIAN, &number_of_antenna_ports_value);
5728         if (number_of_antenna_ports_value > 2)
5729         {
5730                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of antenna ports value [0..2]");
5731         }
5732
5733         // TPMI
5734         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpmi, 1, ENC_BIG_ENDIAN, &test_value);
5735         if (number_of_antenna_ports_value == 2)
5736         {
5737                 if (test_value > 7)
5738                 {
5739                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi value [0..7]");
5740                 }
5741         }
5742         else if (number_of_antenna_ports_value == 4)
5743         {
5744                 if (test_value > 63)
5745                 {
5746                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpmi value [0..63]");
5747                 }
5748         }
5749
5750         // Total DCI length including padding
5751         ptvcursor_add(ptvc, hf_nfapi_total_dci_length_including_padding, 1, ENC_BIG_ENDIAN);
5752
5753         // N_UL_RB
5754         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_n_ul_rb, 1, ENC_BIG_ENDIAN, &test_value);
5755         if (!(test_value == 6 || test_value == 15 || test_value == 25 || test_value == 50 ||
5756                 test_value == 75 || test_value == 100))
5757         {
5758                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid n ul rb value [6, 15, 25, 50, 75, 100]");
5759         }
5760 }
5761 static void dissect_hi_dci0_dci_ul_rel12_value(ptvcursor_t * ptvc, packet_info* pinfo)
5762 {
5763         proto_item* item;
5764         guint32 test_value;
5765
5766         // PSCCH Resource
5767         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pscch_resource, 1, ENC_BIG_ENDIAN, &test_value);
5768         if (test_value > 0x3F)
5769         {
5770                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pscch resource value [0..0x3F]");
5771         }
5772
5773         // Time resource pattern
5774         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_time_resource_pattern, 1, ENC_BIG_ENDIAN, &test_value);
5775         if (test_value > 0x7F)
5776         {
5777                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid time resource pattern value [0..0x7F]");
5778         }
5779
5780 }
5781 static void dissect_hi_dci0_mdpcch_dci_ul_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
5782 {
5783         proto_item* item;
5784         guint32 test_value, dci_format_value, count;
5785         gboolean test_boolean;
5786
5787         // MPDCCH Narrowband
5788         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_narrowband, 1, ENC_BIG_ENDIAN, &test_value);
5789         if (test_value > 15)
5790         {
5791                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mpdcch narrowband value [0..15]");
5792         }
5793
5794         // Number of PRB pairs
5795         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_prb_pairs, 1, ENC_BIG_ENDIAN, &test_value);
5796         if (!(test_value == 2 || test_value == 4 || test_value == 6))
5797         {
5798                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of prb pairs value [2, 4, 6]");
5799         }
5800
5801         // Resource Block Assignment
5802         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_assignment, 1, ENC_BIG_ENDIAN, &test_value);
5803         if (test_value > 14)
5804         {
5805                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block assignment value [0..14]");
5806         }
5807
5808         // MPDCCH transmission type
5809         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_transmission_type, 1, ENC_BIG_ENDIAN, &test_value);
5810         if (test_value > 1)
5811         {
5812                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mpdcch transmission type value [0..1]");
5813         }
5814
5815         // Start symbol
5816         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_start_symbol, 1, ENC_BIG_ENDIAN, &test_value);
5817         if (!(test_value >= 1 && test_value <=4))
5818         {
5819                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid start symbol value [0..1]");
5820         }
5821
5822         // ECCE index
5823         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ecce_index, 1, ENC_BIG_ENDIAN, &test_value);
5824         if (test_value > 22)
5825         {
5826                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ecce index value [0..22]");
5827         }
5828
5829         // Aggregation level
5830         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_aggregation_level, 1, ENC_BIG_ENDIAN, &test_value);
5831         if (!(test_value == 2 || test_value == 4 || test_value == 8 ||
5832                 test_value == 16 || test_value == 24))
5833         {
5834                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid aggregation level value [2, 4, 8, 16, 24]");
5835         }
5836
5837         // RNTI type
5838         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_rnti_type, 1, ENC_BIG_ENDIAN, &test_value);
5839         if (!(test_value == 0 || test_value == 4))
5840         {
5841                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti type value [0, 4]");
5842         }
5843
5844         // RNTI
5845         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
5846         if (test_value < 1)
5847         {
5848                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
5849         }
5850
5851         // CEMode
5852         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ce_mode, 1, ENC_BIG_ENDIAN, &test_value);
5853         if (!(test_value == 1 || test_value == 2))
5854         {
5855                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid cemode value [1,2]");
5856         }
5857
5858         // DMRS scrambling init
5859         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_drms_scrambling_init, 2, ENC_BIG_ENDIAN, &test_value);
5860         if (test_value < 503)
5861         {
5862                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid drms scrambling init value [0..503]");
5863         }
5864
5865         // Initial transmission SF (io)
5866         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_initial_transmission_sf, 2, ENC_BIG_ENDIAN, &test_value);
5867         if (!(test_value <= 10239 || test_value == 0xFFFF))
5868         {
5869                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial transmission sf io value [0..10239, 0xFFFF]");
5870         }
5871
5872         // Transmission power
5873         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_transmission_power, 2, ENC_BIG_ENDIAN, &test_value);
5874         if (test_value > 10000)
5875         {
5876                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid transmission power value [0..10000]");
5877         }
5878
5879         // DCI format
5880         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mpdcch_ul_dci_format, 1, ENC_BIG_ENDIAN, &dci_format_value);
5881         if (!(dci_format_value == 1 || dci_format_value == 2 || dci_format_value == 4 || dci_format_value == 5))
5882         {
5883                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci format value [1, 2, 4, 5]");
5884         }
5885
5886         // Resource block start
5887         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_resource_block_start, 1, ENC_BIG_ENDIAN, &test_value);
5888         if (test_value > 99)
5889         {
5890                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid resource block start value [0..99]");
5891         }
5892
5893         // Number of resource blocks
5894         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_resource_blocks, 1, ENC_BIG_ENDIAN, &test_value);
5895         if (!(test_value >= 1 && test_value <= 6))
5896         {
5897                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of resource blocks value [1..6]");
5898         }
5899
5900         // MCS
5901         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_mcs, 1, ENC_BIG_ENDIAN, &test_value);
5902         if (test_value > 15)
5903         {
5904                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mcs value [0..15]");
5905         }
5906
5907         // PUSCH repetition levels
5908         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_pusch_repetition_levels, 1, ENC_BIG_ENDIAN, &test_value);
5909         if (dci_format_value == 4)
5910         {
5911                 if (!(test_value >= 1 && test_value <= 4))
5912                 {
5913                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pusch repetition levels value [1..4]");
5914                 }
5915         }
5916         else if (dci_format_value == 5)
5917         {
5918                 if (!(test_value >= 1 && test_value <= 8))
5919                 {
5920                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pusch repetition levels value [1..8]");
5921                 }
5922         }
5923
5924         // Frequency hopping flag
5925         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_frequency_hopping_flag, 1, ENC_BIG_ENDIAN, &test_value);
5926         if (test_value > 1)
5927         {
5928                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid frequency hopping flag value [0..1]");
5929         }
5930
5931         // New Data indication
5932         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_new_data_indication, 1, ENC_BIG_ENDIAN, &test_value);
5933         if (test_value > 1)
5934         {
5935                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid new data indication value [0..1]");
5936         }
5937
5938         // HARQ process
5939         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_process, 1, ENC_BIG_ENDIAN, &test_value);
5940         if (test_value > 7)
5941         {
5942                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq process value [0..7]");
5943         }
5944
5945         // Redundancy version
5946         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_redundancy_version, 1, ENC_BIG_ENDIAN, &test_value);
5947         if (test_value > 3)
5948         {
5949                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid redundancy version value [0..3]");
5950         }
5951
5952         // TPC
5953         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tpc, 1, ENC_BIG_ENDIAN, &test_value);
5954         if (test_value > 3)
5955         {
5956                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid tpc value [0..3]");
5957         }
5958
5959         // CSI request
5960         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_csi_request, 1, ENC_BIG_ENDIAN, &test_value);
5961         if (test_value > 1)
5962         {
5963                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid csi request value [0..1]");
5964         }
5965
5966         // UL index
5967         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_index, 1, ENC_BIG_ENDIAN, &test_value);
5968         if (test_value > 3)
5969         {
5970                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul index value [0..3]");
5971         }
5972
5973         // DAI presence flag
5974         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_dai_presence_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
5975         if (test_boolean > 1)
5976         {
5977                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dai presence value [0..1]");
5978         }
5979
5980         // DL assignment index
5981         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dl_assignment_index, 1, ENC_BIG_ENDIAN, &test_value);
5982         if (!(test_value >=1 && test_value <= 4))
5983         {
5984                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dl assignment value [1, 2, 3, 4]");
5985         }
5986
5987         // SRS request
5988         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_srs_request, 1, ENC_BIG_ENDIAN, &test_boolean);
5989         if (test_boolean > 1)
5990         {
5991                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid srs request value [0..1]");
5992         }
5993
5994         // DCI subframe repetition number
5995         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_dci_subframe_repetition_number, 1, ENC_BIG_ENDIAN, &test_value);
5996         if (!(test_value >= 1 && test_value <= 4))
5997         {
5998                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid dci subframe repetition number value [1..4]");
5999         }
6000
6001         //TPC bitmap
6002         ptvcursor_add(ptvc, hf_nfapi_tpc_bitmap, 4, ENC_BIG_ENDIAN);
6003
6004         // Total DCI length including padding
6005         ptvcursor_add(ptvc, hf_nfapi_total_dci_length_include_padding, 1, ENC_BIG_ENDIAN);
6006
6007         // Number of TX Antenna ports
6008         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_tx_antenna_ports, 1, ENC_BIG_ENDIAN, &count);
6009
6010         dissect_array_value(ptvc, pinfo, "TX Antenna Ports", ett_nfapi_tx_antenna_ports, count, dissect_precoding_value);
6011 }
6012 static void dissect_rx_ue_info_value(ptvcursor_t * ptvc, packet_info* pinfo)
6013 {
6014         guint32 test_value;
6015
6016         // Handle
6017         ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
6018
6019         // RNTI
6020         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
6021         if (test_value < 1)
6022         {
6023                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
6024         }
6025 }
6026 static void dissect_rx_indication_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
6027 {
6028         proto_item* item;
6029         guint32 test_value;
6030
6031         // Length
6032         ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
6033
6034         // Data offset
6035         ptvcursor_add(ptvc, hf_nfapi_data_offset, 2, ENC_BIG_ENDIAN);
6036
6037         // UL_CQI
6038         ptvcursor_add(ptvc, hf_nfapi_ul_cqi, 1, ENC_BIG_ENDIAN);
6039
6040         // Timing advance
6041         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN, &test_value);
6042         if (test_value > 63)
6043         {
6044                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..63]");
6045         }
6046 }
6047 static void dissect_rx_indication_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
6048 {
6049         guint32 test_value;
6050
6051         // Timing advance R9
6052         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance_r9, 2, ENC_BIG_ENDIAN, &test_value);
6053         if (test_value > 7690)
6054         {
6055                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance r9 value [0..7690]");
6056         }
6057
6058 }
6059 static void dissect_harq_indication_data_bundling_value(ptvcursor_t * ptvc, packet_info* pinfo)
6060 {
6061         proto_item* item;
6062         guint32 test_value;
6063
6064         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6065         if (!(test_value >= 1 && test_value <= 7))
6066         {
6067                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6068         }
6069
6070         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_1, 1, ENC_BIG_ENDIAN, &test_value);
6071         if (!(test_value >= 1 && test_value <= 7))
6072         {
6073                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 1 [1..7]");
6074         }
6075 }
6076 static void dissect_harq_indication_data_format_1a_1b_bundling_value(ptvcursor_t * ptvc, packet_info* pinfo)
6077 {
6078         guint32 test_value;
6079
6080         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6081         if (!(test_value >= 1 && test_value <= 7))
6082         {
6083                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6084         }
6085 }
6086 static void dissect_harq_indication_data_multplexing_value(ptvcursor_t * ptvc, packet_info* pinfo)
6087 {
6088         proto_item* item;
6089         guint32 test_value;
6090
6091         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 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 0 [1..7]");
6095         }
6096
6097         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_1, 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 1 [1..7]");
6101         }
6102
6103         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_2, 1, ENC_BIG_ENDIAN, &test_value);
6104         if (!(test_value >= 1 && test_value <= 7))
6105         {
6106                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 2 [1..7]");
6107         }
6108
6109         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_3, 1, ENC_BIG_ENDIAN, &test_value);
6110         if (!(test_value >= 1 && test_value <= 7))
6111         {
6112                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 3 [1..7]");
6113         }
6114
6115 }
6116 static void dissect_harq_indication_data_format_1a_1b_multplexing_value(ptvcursor_t * ptvc, packet_info* pinfo)
6117 {
6118         guint32 test_value;
6119         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6120         if (!(test_value >= 1 && test_value <= 7))
6121         {
6122                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6123         }
6124 }
6125 static void dissect_harq_indication_data_special_bundling_value(ptvcursor_t * ptvc, packet_info* pinfo)
6126 {
6127         guint32 test_value;
6128         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0_special, 1, ENC_BIG_ENDIAN, &test_value);
6129
6130         if (test_value > 4)
6131         {
6132                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [0..4]");
6133         }
6134 }
6135 static void dissect_harq_indication_data_format_1a_1b_special_bundling_value(ptvcursor_t * ptvc, packet_info* pinfo)
6136 {
6137         guint32 test_value;
6138         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0_special, 1, ENC_BIG_ENDIAN, &test_value);
6139         if (test_value > 4)
6140         {
6141                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [0..4]");
6142         }
6143 }
6144 static void dissect_harq_indication_data_channel_selection_value(ptvcursor_t * ptvc, packet_info* pinfo)
6145 {
6146         guint32 test_value;
6147         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6148         if (!(test_value >= 1 && test_value <= 7))
6149         {
6150                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6151         }
6152 }
6153 static void dissect_harq_indication_data_format_3_value(ptvcursor_t * ptvc, packet_info* pinfo)
6154 {
6155         guint32 test_value;
6156         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6157         if (!(test_value >= 1 && test_value <= 7))
6158         {
6159                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6160         }
6161 }
6162 static void dissect_harq_indication_data_format_4_value(ptvcursor_t * ptvc, packet_info* pinfo)
6163 {
6164         guint32 test_value;
6165         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6166         if (!(test_value >= 1 && test_value <= 7))
6167         {
6168                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6169         }
6170 }
6171 static void dissect_harq_indication_data_format_5_value(ptvcursor_t * ptvc, packet_info* pinfo)
6172 {
6173         guint32 test_value;
6174         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_data_value_0, 1, ENC_BIG_ENDIAN, &test_value);
6175         if (!(test_value >= 1 && test_value <= 7))
6176         {
6177                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid value 0 [1..7]");
6178         }
6179 }
6180 static void dissect_harq_indication_rel8_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6181 {
6182         proto_item* item;
6183         guint32 test_value, mode;
6184
6185         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tdd_harq_mode, 1, ENC_BIG_ENDIAN, &mode);
6186         if (mode > 4)
6187         {
6188                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mode value [0..4]");
6189         }
6190
6191         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ack_nack, 1, ENC_BIG_ENDIAN, &test_value);
6192         if (!(test_value >= 1 && test_value <= 4))
6193         {
6194                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..4]");
6195         }
6196
6197         switch (mode)
6198         {
6199                 case 0:
6200                 {
6201                         dissect_harq_indication_data_bundling_value(ptvc, pinfo);
6202                         break;
6203                 }
6204                 case 1:
6205                 {
6206                         dissect_harq_indication_data_multplexing_value(ptvc, pinfo);
6207                         break;
6208                 }
6209                 case 2:
6210                 {
6211                         dissect_harq_indication_data_special_bundling_value(ptvc, pinfo);
6212                         break;
6213                 }
6214         };
6215 }
6216 static void dissect_harq_indication_rel9_later_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6217 {
6218         proto_item* item;
6219         guint32 mode, i, count;
6220
6221         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tdd_harq_mode, 1, ENC_BIG_ENDIAN, &mode);
6222         if (mode > 4)
6223         {
6224                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mode value [0..4]");
6225         }
6226
6227         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ack_nack, 1, ENC_BIG_ENDIAN, &count);
6228         if (mode == 0 || mode == 1)
6229         {
6230                 if (!(count >= 1 && count <= 4))
6231                 {
6232                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..4]");
6233                 }
6234         }
6235         else if (mode == 3)
6236         {
6237                 if (!(count >= 1 && count <= 8))
6238                 {
6239                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..8]");
6240                 }
6241         }
6242         else if (mode == 4)
6243         {
6244                 if (!(count >= 1 && count <= 21))
6245                 {
6246                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..21]");
6247                 }
6248         }
6249
6250
6251         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_harq_ack_nack_data, "ACK/NACK Data");
6252
6253         for (i = 0; i < count; ++i)
6254         {
6255                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_harq_ack_nack_data, "[%d]", i);
6256
6257                 switch (mode)
6258                 {
6259                         case 0:
6260                         {
6261                                 dissect_harq_indication_data_format_1a_1b_bundling_value(ptvc, pinfo);
6262                                 break;
6263                         }
6264                         case 1:
6265                         {
6266                                 dissect_harq_indication_data_format_1a_1b_multplexing_value(ptvc, pinfo);
6267                                 break;
6268                         }
6269                         case 2:
6270                         {
6271                                 dissect_harq_indication_data_format_1a_1b_special_bundling_value(ptvc, pinfo);
6272                                 break;
6273                         }
6274                         case 3:
6275                         {
6276                                 dissect_harq_indication_data_channel_selection_value(ptvc, pinfo);
6277                                 break;
6278                         }
6279                         case 4:
6280                         {
6281                                 dissect_harq_indication_data_format_3_value(ptvc, pinfo);
6282                                 break;
6283                         }
6284                 };
6285
6286                 ptvcursor_pop_subtree(ptvc);
6287         }
6288
6289         ptvcursor_pop_subtree(ptvc);
6290 }
6291 static void dissect_harq_indication_rel13_later_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6292 {
6293         proto_item* item;
6294         guint32 mode, i, count;
6295
6296         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_tdd_harq_mode, 1, ENC_BIG_ENDIAN, &mode);
6297         if (mode > 6)
6298         {
6299                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid mode value [0..6]");
6300         }
6301
6302         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ack_nack, 2, ENC_BIG_ENDIAN, &count);
6303         if (mode == 0 || mode == 1)
6304         {
6305                 if (!(count >= 1 && count <= 4))
6306                 {
6307                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..4]");
6308                 }
6309         }
6310         else if (mode == 3)
6311         {
6312                 if (!(count >= 1 && count <= 8))
6313                 {
6314                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..8]");
6315                 }
6316         }
6317         else if (mode == 4)
6318         {
6319                 if (!(count >= 1 && count <= 21))
6320                 {
6321                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [1..21]");
6322                 }
6323         }
6324         else if (mode == 5 || mode == 6)
6325         {
6326                 if (count < 22)
6327                 {
6328                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack nack value [>= 22]");
6329                 }
6330
6331         }
6332
6333         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_harq_ack_nack_data, "ACK/NACK Data");
6334
6335         for (i = 0; i < count; ++i)
6336         {
6337                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_harq_ack_nack_data, "[%d]", i);
6338
6339                 switch (mode)
6340                 {
6341                         case 0:
6342                         {
6343                                 dissect_harq_indication_data_format_1a_1b_bundling_value(ptvc, pinfo);
6344                                 break;
6345                         }
6346                         case 1:
6347                         {
6348                                 dissect_harq_indication_data_format_1a_1b_multplexing_value(ptvc, pinfo);
6349                                 break;
6350                         }
6351                         case 2:
6352                         {
6353                                 dissect_harq_indication_data_special_bundling_value(ptvc, pinfo);
6354                                 break;
6355                         }
6356                         case 3:
6357                         {
6358                                 dissect_harq_indication_data_channel_selection_value(ptvc, pinfo);
6359                                 break;
6360                         }
6361                         case 4:
6362                         {
6363                                 dissect_harq_indication_data_format_3_value(ptvc, pinfo);
6364                                 break;
6365                         }
6366                         case 5:
6367                         {
6368                                 dissect_harq_indication_data_format_4_value(ptvc, pinfo);
6369                                 break;
6370                         }
6371                         case 6:
6372                         {
6373                                 dissect_harq_indication_data_format_5_value(ptvc, pinfo);
6374                                 break;
6375                         }
6376                 };
6377
6378                 ptvcursor_pop_subtree(ptvc);
6379         }
6380
6381         ptvcursor_pop_subtree(ptvc);
6382 }
6383 static void dissect_harq_indication_rel8_fdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6384 {
6385         proto_item* item;
6386         guint32 test_value;
6387
6388         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_tb_1, 1, ENC_BIG_ENDIAN, &test_value);
6389         if (!(test_value >= 1 && test_value <= 7))
6390         {
6391                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq tb 1 [1..7]");
6392         }
6393
6394         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_tb_2, 1, ENC_BIG_ENDIAN, &test_value);
6395         if (!(test_value >= 1 && test_value <= 7))
6396         {
6397                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq tb 2 [1..7]");
6398         }
6399
6400 }
6401 static void dissect_harq_tb_value(ptvcursor_t * ptvc, packet_info* pinfo)
6402 {
6403         guint32 test_value;
6404         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_harq_tb_n, 1, ENC_BIG_ENDIAN, &test_value);
6405
6406         if (!(test_value >= 1 && test_value <= 7))
6407         {
6408                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq tb n [1..7]");
6409         }
6410 }
6411 static void dissect_harq_indication_rel9_later_fdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6412 {
6413         guint32 harq_mode_value, count;
6414
6415         // Mode
6416         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_fdd_harq_mode, 1, ENC_BIG_ENDIAN, &harq_mode_value);
6417         if (harq_mode_value > 2)
6418         {
6419                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq mode value [0..2]");
6420         }
6421
6422         // Number of ACK/NACK
6423         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ack_nack, 1, ENC_BIG_ENDIAN, &count);
6424
6425         if (harq_mode_value == 0)
6426         {
6427                 if (!(count >=1 && count <= 2))
6428                 {
6429                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..2]");
6430                 }
6431         }
6432         else if (harq_mode_value == 1)
6433         {
6434                 if (!(count >= 1 && count <= 4))
6435                 {
6436                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..4]");
6437                 }
6438
6439         }
6440         else if (harq_mode_value == 2)
6441         {
6442                 if (!(count >= 1 && count <= 10))
6443                 {
6444                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..10]");
6445                 }
6446
6447         }
6448
6449         dissect_array_value(ptvc, pinfo, "HARQ TB List", ett_nfapi_harq_data, count, dissect_harq_tb_value);
6450 }
6451 static void dissect_harq_indication_rel13_later_fdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6452 {
6453         guint32 harq_mode_value, count;
6454
6455         // Mode
6456         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_fdd_harq_mode, 1, ENC_BIG_ENDIAN, &harq_mode_value);
6457         if (harq_mode_value > 4)
6458         {
6459                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid harq mode value [0..4]");
6460         }
6461
6462         // Number of ACK/NACK
6463         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_ack_nack, 2, ENC_BIG_ENDIAN, &count);
6464
6465         if (harq_mode_value == 0)
6466         {
6467                 if (!(count >= 1 && count <= 2))
6468                 {
6469                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..2]");
6470                 }
6471         }
6472         else if (harq_mode_value == 1)
6473         {
6474                 if (!(count >= 1 && count <= 4))
6475                 {
6476                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..4]");
6477                 }
6478
6479         }
6480         else if (harq_mode_value == 2)
6481         {
6482                 if (!(count >= 1 && count <= 10))
6483                 {
6484                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [1..10]");
6485                 }
6486         }
6487         else if (harq_mode_value == 3 || harq_mode_value == 4)
6488         {
6489                 if (count < 22)
6490                 {
6491                         expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of ack/nack value [>= 22]");
6492                 }
6493         }
6494
6495         dissect_array_value(ptvc, pinfo, "HARQ TB List", ett_nfapi_harq_data, count, dissect_harq_tb_value);
6496 }
6497 static void dissect_ul_cqi_information_value(ptvcursor_t * ptvc, packet_info* pinfo)
6498 {
6499         proto_item* item;
6500         guint32 test_value;
6501
6502         // UL_CQI
6503         ptvcursor_add(ptvc, hf_nfapi_ul_cqi, 1, ENC_BIG_ENDIAN);
6504
6505         // Channel
6506         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_channel, 1, ENC_BIG_ENDIAN, &test_value);
6507         if (test_value > 1)
6508         {
6509                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid channel value [0..1]");
6510         }
6511 }
6512 static void dissect_crc_indication_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
6513 {
6514         gboolean test_boolean;
6515
6516         // CRC Flag
6517         proto_item* item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_crc_flag, 1, ENC_BIG_ENDIAN, &test_boolean);
6518         if (test_boolean > 1)
6519         {
6520                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid crc flag value [0..1]");
6521         }
6522 }
6523 static void dissect_rx_cqi_indication_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
6524 {
6525         proto_item* item;
6526         guint32 test_value;
6527
6528         //Length
6529         ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
6530
6531         // Data Offset
6532         ptvcursor_add(ptvc, hf_nfapi_data_offset, 2, ENC_BIG_ENDIAN);
6533
6534         // UL_CQI
6535         ptvcursor_add(ptvc, hf_nfapi_ul_cqi, 1, ENC_BIG_ENDIAN);
6536
6537         // RI
6538         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ri, 1, ENC_BIG_ENDIAN, &test_value);
6539         if (test_value > 8)
6540         {
6541                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ri value [0..8]");
6542         }
6543
6544         // Timing Advance
6545         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN, &test_value);
6546         if (test_value > 63)
6547         {
6548                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..63]");
6549         }
6550 }
6551 static void dissect_ri_value(ptvcursor_t * ptvc, packet_info* pinfo)
6552 {
6553         guint32 test_value;
6554
6555         // RI
6556         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ri, 1, ENC_BIG_ENDIAN, &test_value);
6557         if (test_value > 8)
6558         {
6559                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ri value [0..8]");
6560         }
6561 }
6562 static void dissect_rx_cqi_indication_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
6563 {
6564         proto_item* item;
6565         guint32 test_value, count;
6566
6567         // Length
6568         ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
6569
6570         // Data Offset
6571         ptvcursor_add(ptvc, hf_nfapi_data_offset, 2, ENC_BIG_ENDIAN);
6572
6573         // UL_CQI
6574         ptvcursor_add(ptvc, hf_nfapi_ul_cqi, 1, ENC_BIG_ENDIAN);
6575
6576         // Number of CC reported
6577         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_cc_reported, 1, ENC_BIG_ENDIAN, &count);
6578         if (!(count >= 1 && count <= 5))
6579         {
6580                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of CC reported value [1..5]");
6581         }
6582
6583         dissect_array_value(ptvc, pinfo, "CC List", ett_nfapi_cc, count, dissect_ri_value);
6584
6585         // Timing Advance
6586         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN, &test_value);
6587         if (test_value > 63)
6588         {
6589                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..63]");
6590         }
6591
6592         // Timing Advance R9
6593         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance_r9, 2, ENC_BIG_ENDIAN, &test_value);
6594         if (test_value > 7690)
6595         {
6596                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..7690]");
6597         }
6598 }
6599 static void dissect_rach_indication_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
6600 {
6601         proto_item* item;
6602         guint32 test_value;
6603
6604         // RNTI
6605         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rnti, 2, ENC_BIG_ENDIAN, &test_value);
6606         if (test_value < 1)
6607         {
6608                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rnti value [1..65535]");
6609         }
6610
6611         // Preamble
6612         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_preamble, 1, ENC_BIG_ENDIAN, &test_value);
6613         if (test_value > 63)
6614         {
6615                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid preamble value [0..63]");
6616         }
6617
6618         // Timing Advance
6619         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN, &test_value);
6620         if (test_value > 1282)
6621         {
6622                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..1282]");
6623         }
6624
6625 }
6626 static void dissect_rach_indication_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
6627 {
6628         guint32 test_value;
6629
6630         // Timing Advance R9
6631         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance_r9, 2, ENC_BIG_ENDIAN, &test_value);
6632         if (test_value > 7690)
6633         {
6634                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..7690]");
6635         }
6636 }
6637 static void dissect_rach_indication_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
6638 {
6639         guint32 test_value;
6640
6641         // RACH resource type
6642         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_rach_resource_type, 1, ENC_BIG_ENDIAN, &test_value);
6643         if (test_value > 4)
6644         {
6645                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid rach resource type value [0..4]");
6646         }
6647 }
6648 static void dissect_snr_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
6649 {
6650         // SNR
6651         ptvcursor_add(ptvc, hf_nfapi_snr, 1, ENC_BIG_ENDIAN);
6652 }
6653 static void dissect_srs_indication_rel8_value(ptvcursor_t * ptvc, packet_info* pinfo)
6654 {
6655         proto_item* item;
6656         guint32 test_value, count;
6657
6658         // Doppler estimation
6659         ptvcursor_add(ptvc, hf_nfapi_doppler_estimation, 2, ENC_BIG_ENDIAN);
6660
6661         // Timing Advance
6662         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN, &test_value);
6663         if (test_value > 1282)
6664         {
6665                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..1282]");
6666         }
6667
6668         // Number of resource blocks
6669         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_resource_blocks, 1, ENC_BIG_ENDIAN, &count);
6670
6671         // RB start
6672         ptvcursor_add(ptvc, hf_nfapi_rb_start, 1, ENC_BIG_ENDIAN);
6673
6674
6675         dissect_array_value(ptvc, pinfo, "RB List", ett_nfapi_rbs, count, dissect_snr_value);
6676 }
6677 static void dissect_srs_indication_rel9_value(ptvcursor_t * ptvc, packet_info* pinfo)
6678 {
6679         guint32 test_value;
6680
6681         // Timing Advance R9
6682         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_timing_advance_r9, 2, ENC_BIG_ENDIAN, &test_value);
6683         if (test_value > 7690)
6684         {
6685                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid timing advance value [0..7690]");
6686         }
6687 }
6688 static void dissect_srs_indication_rel10_tdd_value(ptvcursor_t * ptvc, packet_info* pinfo)
6689 {
6690         guint32 test_value;
6691
6692         // UpPTS Symbol
6693         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_up_pts_symbol, 1, ENC_BIG_ENDIAN, &test_value);
6694         if (test_value > 1)
6695         {
6696                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid up pts symbol value [0..1]");
6697         }
6698
6699 }
6700 static void dissect_tdd_channel_measurement_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
6701 {
6702         guint32 i, j, num_subbands, num_phy_ant;
6703
6704         // numPRBperSubband
6705         ptvcursor_add(ptvc, hf_nfapi_number_prb_per_subband, 1, ENC_BIG_ENDIAN);
6706
6707         // Number of subbands
6708         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_subbands, 1, ENC_BIG_ENDIAN, &num_subbands);
6709
6710         // numAntennas
6711         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_antennas, 1, ENC_BIG_ENDIAN, &num_phy_ant);
6712
6713         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_subbands, "Subbands");
6714
6715         for (i = 0; i < num_subbands; ++i)
6716         {
6717                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_subbands, "[%d]", i);
6718
6719                 // subbandIndex
6720                 ptvcursor_add(ptvc, hf_nfapi_subband_index, 1, ENC_BIG_ENDIAN);
6721
6722                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_antennas, "Physical Antennas");
6723
6724                 for (j = 0; j < num_phy_ant; ++j)
6725                 {
6726                         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_antennas, "[%d]", j);
6727
6728                         // Channel
6729                         ptvcursor_add(ptvc, hf_nfapi_channel_coefficient, 2, ENC_BIG_ENDIAN);
6730
6731                         ptvcursor_pop_subtree(ptvc);
6732                 }
6733
6734                 ptvcursor_pop_subtree(ptvc);
6735
6736                 ptvcursor_pop_subtree(ptvc);
6737         }
6738
6739         ptvcursor_pop_subtree(ptvc);
6740 }
6741 static void dissect_srs_indication_rel11_value(ptvcursor_t * ptvc, packet_info* pinfo)
6742 {
6743         guint32 test_value;
6744
6745         //UL_RTOA
6746         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_ul_rtoa, 2, ENC_BIG_ENDIAN, &test_value);
6747         if (test_value > 4800)
6748         {
6749                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid ul rtoa value [0..4800]");
6750         }
6751 }
6752 static void dissect_lbt_dl_config_request_pdsch_req_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
6753 {
6754         proto_item* item;
6755         guint32 test_value;
6756         guint32 test_boolean;
6757
6758         // Handle
6759         ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
6760
6761         // nCCA
6762         ptvcursor_add(ptvc, hf_nfapi_mp_cca, 4, ENC_BIG_ENDIAN);
6763
6764         // NCCA
6765         ptvcursor_add(ptvc, hf_nfapi_n_cca, 4, ENC_BIG_ENDIAN);
6766
6767         // Offset
6768         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_offset, 4, ENC_BIG_ENDIAN, &test_value);
6769         if (test_value > 999)
6770         {
6771                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid offset value [0..999]");
6772         }
6773
6774         // LTE TXOP SF
6775         ptvcursor_add(ptvc, hf_nfapi_lte_txop_sf, 4, ENC_BIG_ENDIAN);
6776
6777         // TXOP SFN/SF End
6778         ptvcursor_add(ptvc, hf_nfapi_txop_sfn_sf_end, 2, ENC_BIG_ENDIAN);
6779
6780         // LBT mode
6781         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_lbt_mode, 4, ENC_BIG_ENDIAN, &test_boolean);
6782         if (test_boolean > 1)
6783         {
6784                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid offset value [0..1]");
6785         }
6786 }
6787 static void dissect_lbt_dl_config_request_drs_req_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
6788 {
6789         proto_item* item;
6790         guint32 test_value;
6791         guint32 test_boolean;
6792
6793         // Handle
6794         ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
6795
6796         // Offset
6797         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_offset, 4, ENC_BIG_ENDIAN, &test_value);
6798         if (test_value > 999)
6799         {
6800                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid offset value [0..999]");
6801         }
6802
6803         // SFN/SF End
6804         ptvcursor_add(ptvc, hf_nfapi_sfn_sf_end, 2, ENC_BIG_ENDIAN);
6805
6806         // LBT mode
6807         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_lbt_mode, 4, ENC_BIG_ENDIAN, &test_boolean);
6808         if (test_boolean > 1)
6809         {
6810                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid offset value [0..1]");
6811         }
6812 }
6813 static void dissect_lbt_dl_config_request_pdsch_resp_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
6814 {
6815         proto_item* item;
6816         guint32 test_boolean;
6817
6818         // Handle
6819         ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
6820
6821         // result
6822         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_result, 4, ENC_BIG_ENDIAN, &test_boolean);
6823         if (test_boolean > 1)
6824         {
6825                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid result value [0..1]");
6826         }
6827
6828         // LTE TXOP symbols
6829         ptvcursor_add(ptvc, hf_nfapi_txop_symbols, 4, ENC_BIG_ENDIAN);
6830
6831         // Initial Partial SF
6832         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_initial_partial_sf, 4, ENC_BIG_ENDIAN, &test_boolean);
6833         if (test_boolean > 1)
6834         {
6835                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid initial partial sf value [0..1]");
6836         }
6837 }
6838 static void dissect_lbt_dl_config_request_drs_resp_rel13_value(ptvcursor_t * ptvc, packet_info* pinfo)
6839 {
6840         proto_item* item;
6841         guint32 test_boolean;
6842
6843         // Handle
6844         ptvcursor_add(ptvc, hf_nfapi_handle, 4, ENC_BIG_ENDIAN);
6845
6846         // result
6847         item = ptvcursor_add_ret_boolean(ptvc, hf_nfapi_result, 4, ENC_BIG_ENDIAN, &test_boolean);
6848         if (test_boolean > 1)
6849         {
6850                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid result value [0..1]");
6851         }
6852 }
6853 static void dissect_tx_pdu(ptvcursor_t * ptvc, packet_info* pinfo _U_)
6854 {
6855         guint32 len;
6856
6857         // PDU length
6858         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_length, 2, ENC_BIG_ENDIAN, &len);
6859
6860         // PDU index
6861         ptvcursor_add(ptvc, hf_nfapi_pdu_index, 2, ENC_BIG_ENDIAN);
6862
6863         // PDU#N
6864         ptvcursor_add(ptvc, hf_nfapi_pdu, len, ENC_NA);
6865 }
6866 static void dissect_tx_request_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
6867 {
6868         guint32 num_pdu;
6869
6870         // Number of PDUs
6871         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 2, ENC_BIG_ENDIAN, &num_pdu);
6872
6873         dissect_array_value(ptvc, pinfo, "TX PDU List", ett_nfapi_tx_request_pdu_list, num_pdu, dissect_tx_pdu);
6874 }
6875 static void dissect_harq_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
6876 {
6877         guint32 instance_len;
6878
6879         // Instance Length
6880         ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
6881
6882         guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
6883         dissect_tlv_list(ptvc, pinfo, instance_end);
6884 }
6885 static void dissect_harq_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
6886 {
6887         guint32 num_pdu;
6888
6889         // Number of HARQs
6890         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_harqs, 2, ENC_BIG_ENDIAN, &num_pdu);
6891
6892         dissect_array_value(ptvc, pinfo, "HARQ PDU List", ett_nfapi_harq_indication_pdu_list, num_pdu, dissect_harq_indication_pdu);
6893 }
6894 static void dissect_crc_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
6895 {
6896         guint32 instance_len;
6897
6898         // Instance Length
6899         ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
6900
6901         guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
6902         dissect_tlv_list(ptvc, pinfo, instance_end);
6903 }
6904 static void dissect_crc_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
6905 {
6906         guint32 num_pdu;
6907
6908         // Number of CRCs
6909         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_crcs, 2, ENC_BIG_ENDIAN, &num_pdu);
6910         dissect_array_value(ptvc, pinfo, "CRC PDU List", ett_nfapi_crc_indication_pdu_list, num_pdu, dissect_crc_indication_pdu);
6911 }
6912 static void dissect_sr_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
6913 {
6914         guint32 instance_len;
6915
6916         // Instance Length
6917         ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
6918
6919         guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
6920         dissect_tlv_list(ptvc, pinfo, instance_end);
6921 }
6922 static void dissect_rx_sr_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
6923 {
6924         guint32 num_pdu;
6925
6926         // Number of SRs
6927         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_srs, 2, ENC_BIG_ENDIAN, &num_pdu);
6928
6929         dissect_array_value(ptvc, pinfo, "SR PDU List", ett_nfapi_sr_indication_pdu_list, num_pdu, dissect_sr_indication_pdu);
6930 }
6931 static void dissect_cqi_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
6932 {
6933         guint32 instance_len;
6934
6935         // Instance Length
6936         ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
6937
6938         guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
6939         dissect_tlv_list(ptvc, pinfo, instance_end);
6940 }
6941 static void dissect_rx_cqi_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
6942 {
6943         guint32 i, num_pdu;
6944         guint16* lengths = NULL;
6945
6946         // Number of PDUs
6947         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_cqi, 2, ENC_BIG_ENDIAN, &num_pdu);
6948
6949
6950         tvbuff_t* tvb = ptvcursor_tvbuff(ptvc);
6951         guint32 tmp_offset = ptvcursor_current_offset(ptvc);
6952
6953         if (num_pdu > 0)
6954         {
6955                 lengths = (guint16*)wmem_alloc0(wmem_packet_scope(), num_pdu * 2);
6956         }
6957
6958         for (i = 0; i < num_pdu; ++i)
6959         {
6960                 guint32 instance_len = tvb_get_ntohs(tvb, tmp_offset);
6961                 tmp_offset += 2;
6962                 guint32 pdu_end = tmp_offset + instance_len;
6963
6964                 while (tmp_offset < pdu_end)
6965                 {
6966                         guint16 tlv_id = tvb_get_ntohs(tvb, tmp_offset);
6967                         tmp_offset += 2;
6968                         guint16 tlv_len = tvb_get_ntohs(tvb, tmp_offset);
6969                         tmp_offset += 2;
6970
6971                         if (tlv_id == 0x202F)
6972                         {
6973                                 lengths[i] = tvb_get_ntohs(tvb, tmp_offset);
6974                         }
6975                         else if (tlv_id == 0x2030)
6976                         {
6977                                 lengths[i] = tvb_get_ntohs(tvb, tmp_offset);
6978                         }
6979
6980                         tmp_offset += tlv_len;
6981                 }
6982         }
6983
6984         dissect_array_value(ptvc, pinfo, "CQI PDU List", ett_nfapi_cqi_indication_pdu_list, num_pdu, dissect_cqi_indication_pdu);
6985
6986         for (i = 0; i < num_pdu; ++i)
6987         {
6988                 ptvcursor_add(ptvc, hf_nfapi_pdu, lengths[i], ENC_NA);
6989         }
6990 }
6991 static void dissect_preamble_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
6992 {
6993         guint32 instance_len;
6994
6995         // Instance Length
6996         ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
6997
6998         guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
6999         dissect_tlv_list(ptvc, pinfo, instance_end);
7000 }
7001 static void dissect_rach_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
7002 {
7003         guint32 num_pdu;
7004
7005         // Number of Preambles
7006         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_preambles, 2, ENC_BIG_ENDIAN, &num_pdu);
7007         dissect_array_value(ptvc, pinfo, "Preamble PDU List", ett_nfapi_preamble_indication_pdu_list, num_pdu, dissect_preamble_indication_pdu);
7008 }
7009 static void dissect_srs_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
7010 {
7011         guint32 instance_len;
7012
7013         // Instance Length
7014         ptvcursor_add_ret_uint(ptvc, hf_nfapi_instance_length, 2, ENC_BIG_ENDIAN, &instance_len);
7015         guint32 instance_end = (ptvcursor_current_offset(ptvc) + instance_len - 2);
7016         dissect_tlv_list(ptvc, pinfo, instance_end);
7017 }
7018 static void dissect_srs_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
7019 {
7020         guint32 num_pdu;
7021
7022         // Number of UEs
7023         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_srss, 1, ENC_BIG_ENDIAN, &num_pdu);
7024         dissect_array_value(ptvc, pinfo, "SRS PDU List", ett_nfapi_srs_indication_pdu_list, num_pdu, dissect_srs_indication_pdu);
7025 }
7026 static void dissect_lbt_dl_config_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
7027 {
7028         guint32 test_value, size;
7029
7030         // PDU Type
7031         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_lbt_dl_req_pdu_type, 1, ENC_BIG_ENDIAN, &test_value);
7032         if (test_value > 1)
7033         {
7034                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdu type value [0..1]");
7035         }
7036
7037         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_size, 1, ENC_BIG_ENDIAN, &size);
7038         guint pdu_end = (ptvcursor_current_offset(ptvc) + size - 2);
7039
7040         dissect_tlv_list(ptvc, pinfo, pdu_end);
7041 }
7042 static void dissect_lbt_dl_config_request_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
7043 {
7044         guint32 num_pdu;
7045
7046         // Number of  PDUs
7047         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 2, ENC_BIG_ENDIAN, &num_pdu);
7048         if (!(num_pdu >= 1 && num_pdu <= 2))
7049         {
7050                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pdus value [1..2]");
7051         }
7052
7053         dissect_array_value(ptvc, pinfo, "LBT DL PDU List", ett_nfapi_lbt_dl_config_pdu_list, num_pdu, dissect_lbt_dl_config_pdu);
7054 }
7055 static void dissect_lbt_dl_indication_pdu(ptvcursor_t * ptvc, packet_info* pinfo)
7056 {
7057         guint32 test_value, size;
7058
7059         // PDU Type
7060         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_lbt_dl_ind_pdu_type, 1, ENC_BIG_ENDIAN, &test_value);
7061         if (test_value > 1)
7062         {
7063                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid pdu type value [0..1]");
7064         }
7065
7066         // PDU Size
7067         ptvcursor_add_ret_uint(ptvc, hf_nfapi_pdu_size, 1, ENC_BIG_ENDIAN, &size);
7068         guint32 pdu_end = (ptvcursor_current_offset(ptvc) + size - 2);
7069         dissect_tlv_list(ptvc, pinfo, pdu_end);
7070 }
7071 static void dissect_lbt_indication_message_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
7072 {
7073         guint32 num_pdu;
7074
7075         // Number of  PDUs
7076         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 2, ENC_BIG_ENDIAN, &num_pdu);
7077         if (!(num_pdu >= 1 && num_pdu <= 2))
7078         {
7079                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of pdus value [1..2]");
7080         }
7081
7082         dissect_array_value(ptvc, pinfo, "LBT DL PDU List", ett_nfapi_lbt_dl_indication_pdu_list, num_pdu, dissect_lbt_dl_indication_pdu);
7083 }
7084 static void dissect_lte_rssi_request_value(ptvcursor_t * ptvc, packet_info* pinfo)
7085 {
7086         guint32 test_value, num_earfcns;
7087
7088         // Frequency Band Indicator
7089         ptvcursor_add(ptvc, hf_nfapi_frequency_band_indicator, 1, ENC_BIG_ENDIAN);
7090
7091         // Measurement Period
7092         ptvcursor_add(ptvc, hf_nfapi_measurement_period, 2, ENC_BIG_ENDIAN);
7093
7094         // Bandwidth
7095         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_bandwidth, 1, ENC_BIG_ENDIAN, &test_value);
7096         if (!(test_value == 6 || test_value == 15 || test_value == 25 ||
7097                 test_value == 50 || test_value == 75 || test_value == 100))
7098         {
7099                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid bandwidth value [6, 15, 25, 50, 75, 100]");
7100         }
7101
7102         // Timeout
7103         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7104
7105         // Number of EARFCNs
7106         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_earfcns, 1, ENC_BIG_ENDIAN, &num_earfcns);
7107
7108         dissect_array_value(ptvc, pinfo, "EARFCNs", ett_nfapi_earfcn_list, num_earfcns, dissect_earfcn_value);
7109 }
7110 static void dissect_uarfcn_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7111 {
7112         // UARFCN
7113         ptvcursor_add(ptvc, hf_nfapi_uarfcn, 2, ENC_BIG_ENDIAN);
7114 }
7115 static void dissect_utran_rssi_request_value(ptvcursor_t * ptvc, packet_info* pinfo)
7116 {
7117         guint32 num_uarfcns;
7118
7119         // Frequency Band Indicator
7120         ptvcursor_add(ptvc, hf_nfapi_frequency_band_indicator, 1, ENC_BIG_ENDIAN);
7121
7122         // Measurement Period
7123         ptvcursor_add(ptvc, hf_nfapi_measurement_period, 2, ENC_BIG_ENDIAN);
7124
7125         // Timeout
7126         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7127
7128         // Number of UARFCNs
7129         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_uarfcns, 1, ENC_BIG_ENDIAN, &num_uarfcns);
7130
7131         dissect_array_value(ptvc, pinfo, "UARFCNs", ett_nfapi_uarfcn_list, num_uarfcns, dissect_uarfcn_value);
7132 }
7133 static void dissect_arfcn_dir_value(ptvcursor_t * ptvc, packet_info* pinfo)
7134 {
7135         guint32 test_value;
7136
7137         // ARFCN
7138         ptvcursor_add(ptvc, hf_nfapi_arfcn, 2, ENC_BIG_ENDIAN);
7139
7140         // Direction
7141         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_arfcn_direction, 1, ENC_BIG_ENDIAN, &test_value);
7142         if (test_value > 1)
7143         {
7144                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid direction value [0..1]");
7145         }
7146
7147 }
7148 static void dissect_geran_rssi_request_value(ptvcursor_t * ptvc, packet_info* pinfo)
7149 {
7150         guint32 num_arfcns;
7151
7152         // Frequency Band Indicator
7153         ptvcursor_add(ptvc, hf_nfapi_frequency_band_indicator, 1, ENC_BIG_ENDIAN);
7154
7155         // Measurement Period
7156         ptvcursor_add(ptvc, hf_nfapi_measurement_period, 2, ENC_BIG_ENDIAN);
7157
7158         // Timeout
7159         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7160
7161         // Number of ARFCNs
7162         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_arfcns, 1, ENC_BIG_ENDIAN, &num_arfcns);
7163
7164         dissect_array_value(ptvc, pinfo, "ARFCNs", ett_nfapi_arfcn_list, num_arfcns, dissect_arfcn_dir_value);
7165 }
7166 static void dissect_rssi_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7167 {
7168         // RSSI
7169         ptvcursor_add(ptvc, hf_nfapi_rssi, 2, ENC_BIG_ENDIAN);
7170 }
7171 static void dissect_rssi_indication_value(ptvcursor_t * ptvc, packet_info* pinfo)
7172 {
7173         guint32 num_rssi;
7174
7175         // Number of RSSI
7176         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_rssi, 2, ENC_BIG_ENDIAN, &num_rssi);
7177
7178         dissect_array_value(ptvc, pinfo, "ARFCNs", ett_nfapi_rssi_list, num_rssi, dissect_rssi_value);
7179 }
7180 static void dissect_pci_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7181 {
7182         // PCI
7183         ptvcursor_add(ptvc, hf_nfapi_pci, 2, ENC_BIG_ENDIAN);
7184 }
7185 static void dissect_lte_cell_search_value(ptvcursor_t * ptvc, packet_info* pinfo)
7186 {
7187         guint32 num_pci;
7188
7189         // EARFCN
7190         ptvcursor_add(ptvc, hf_nfapi_earfcn, 2, ENC_BIG_ENDIAN);
7191
7192         // Measurement Bandwidth
7193         ptvcursor_add(ptvc, hf_nfapi_measurement_bandwidth, 1, ENC_BIG_ENDIAN);
7194
7195         // Exhaustive Search
7196         ptvcursor_add(ptvc, hf_nfapi_exhaustive_search, 1, ENC_BIG_ENDIAN);
7197
7198         // Timeout
7199         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7200
7201         // Number of PCI
7202         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_pci, 1, ENC_BIG_ENDIAN, &num_pci);
7203
7204         dissect_array_value(ptvc, pinfo, "PCIs", ett_nfapi_pci_list, num_pci, dissect_pci_value);
7205 }
7206 static void dissect_psc_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7207 {
7208         // PSC
7209         ptvcursor_add(ptvc, hf_nfapi_psc, 2, ENC_BIG_ENDIAN);
7210 }
7211 static void dissect_utran_cell_search_value(ptvcursor_t * ptvc, packet_info* pinfo)
7212 {
7213         guint32 num_psc;
7214
7215         // UARFCN
7216         ptvcursor_add(ptvc, hf_nfapi_uarfcn, 2, ENC_BIG_ENDIAN);
7217
7218         // Exhaustive Search
7219         ptvcursor_add(ptvc, hf_nfapi_exhaustive_search, 1, ENC_BIG_ENDIAN);
7220
7221         // Timeout
7222         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7223
7224         // Number of PSC
7225         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_psc, 1, ENC_BIG_ENDIAN, &num_psc);
7226
7227         dissect_array_value(ptvc, pinfo, "PSCs", ett_nfapi_psc_list, num_psc, dissect_psc_value);
7228 }
7229 static void dissect_arfcn_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7230 {
7231         // ARFCN
7232         ptvcursor_add(ptvc, hf_nfapi_arfcn, 2, ENC_BIG_ENDIAN);
7233 }
7234 static void dissect_geran_cell_search_value(ptvcursor_t * ptvc, packet_info* pinfo)
7235 {
7236         guint32 num_arfcn;
7237
7238         // Timeout
7239         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7240
7241         // Number of ARFCN
7242         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_arfcns, 1, ENC_BIG_ENDIAN, &num_arfcn);
7243
7244         dissect_array_value(ptvc, pinfo, "ARFCNs", ett_nfapi_arfcn_list, num_arfcn, dissect_arfcn_value);
7245 }
7246
7247 static void dissect_lte_cell_found_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7248 {
7249         // PCI
7250         ptvcursor_add(ptvc, hf_nfapi_pci, 2, ENC_BIG_ENDIAN);
7251
7252         // RSRP
7253         ptvcursor_add(ptvc, hf_nfapi_rsrp, 1, ENC_BIG_ENDIAN);
7254
7255         // RSRQ
7256         ptvcursor_add(ptvc, hf_nfapi_rsrq, 1, ENC_BIG_ENDIAN);
7257
7258         // Frequency Offset
7259         ptvcursor_add(ptvc, hf_nfapi_frequency_offset, 2, ENC_BIG_ENDIAN);
7260 }
7261 static void dissect_lte_cell_search_indication_value(ptvcursor_t * ptvc, packet_info* pinfo)
7262 {
7263         guint32 num_lte_cells;
7264
7265         // Number of LTE Cells Found
7266         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_lte_cells_found, 2, ENC_BIG_ENDIAN, &num_lte_cells);
7267         dissect_array_value(ptvc, pinfo, "LTE Cells Found", ett_nfapi_lte_cells_found_list, num_lte_cells, dissect_lte_cell_found_value);
7268 }
7269 static void dissect_utran_cell_found_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7270 {
7271         // PSC
7272         ptvcursor_add(ptvc, hf_nfapi_psc, 2, ENC_BIG_ENDIAN);
7273
7274         // RSCP
7275         ptvcursor_add(ptvc, hf_nfapi_rscp, 1, ENC_BIG_ENDIAN);
7276
7277         // EcN0
7278         ptvcursor_add(ptvc, hf_nfapi_enco, 1, ENC_BIG_ENDIAN);
7279
7280         // Frequency Offset
7281         ptvcursor_add(ptvc, hf_nfapi_frequency_offset, 2, ENC_BIG_ENDIAN);
7282 }
7283 static void dissect_utran_cell_search_indication_value(ptvcursor_t * ptvc, packet_info* pinfo)
7284 {
7285         guint32 num_utran_cells;
7286
7287         // Number of UTRAN Cells Found
7288         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_utran_cells_found, 2, ENC_BIG_ENDIAN, &num_utran_cells);
7289         dissect_array_value(ptvc, pinfo, "UTRAN Cells Found", ett_nfapi_utran_cells_found_list, num_utran_cells, dissect_utran_cell_found_value);
7290 }
7291 static void dissect_geran_cell_found_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7292 {
7293         // ARFCN
7294         ptvcursor_add(ptvc, hf_nfapi_arfcn, 2, ENC_BIG_ENDIAN);
7295
7296         // BSIC
7297         ptvcursor_add(ptvc, hf_nfapi_bsic, 1, ENC_BIG_ENDIAN);
7298
7299         // RxLev
7300         ptvcursor_add(ptvc, hf_nfapi_rxlev, 1, ENC_BIG_ENDIAN);
7301
7302         // RxQual
7303         ptvcursor_add(ptvc, hf_nfapi_rxqual, 1, ENC_BIG_ENDIAN);
7304
7305         // Frequency Offset
7306         ptvcursor_add(ptvc, hf_nfapi_frequency_offset, 2, ENC_BIG_ENDIAN);
7307
7308         // SFN Offset
7309         ptvcursor_add(ptvc, hf_nfapi_sfn_offset, 4, ENC_BIG_ENDIAN);
7310 }
7311 static void dissect_geran_cell_search_indication_value(ptvcursor_t * ptvc, packet_info* pinfo)
7312 {
7313         guint32 num_geran_cells;
7314
7315         // Number of GSM Cells Found
7316         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_geran_cells_found, 2, ENC_BIG_ENDIAN, &num_geran_cells);
7317         dissect_array_value(ptvc, pinfo, "GERAN Cells Found", ett_nfapi_geran_cells_found_list, num_geran_cells, dissect_geran_cell_found_value);
7318 }
7319 static void dissect_pnf_cell_search_state_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7320 {
7321         guint len = tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
7322         ptvcursor_add(ptvc, hf_nfapi_pnf_search_state, len, ENC_NA);
7323 }
7324 static void dissect_pnf_cell_broadcast_state_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7325 {
7326         guint len = tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
7327         ptvcursor_add(ptvc, hf_nfapi_pnf_broadcast_state, len, ENC_NA);
7328 }
7329 static void dissect_lte_broadcast_detect_request_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7330 {
7331         // EARFCN
7332         ptvcursor_add(ptvc, hf_nfapi_earfcn, 2, ENC_BIG_ENDIAN);
7333
7334         // PCI
7335         ptvcursor_add(ptvc, hf_nfapi_pci, 2, ENC_BIG_ENDIAN);
7336
7337         // Timeout
7338         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7339 }
7340 static void dissect_utran_broadcast_detect_request_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7341 {
7342         // UARFCN
7343         ptvcursor_add(ptvc, hf_nfapi_uarfcn, 2, ENC_BIG_ENDIAN);
7344
7345         // PSC
7346         ptvcursor_add(ptvc, hf_nfapi_psc, 2, ENC_BIG_ENDIAN);
7347
7348         // Timeout
7349         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7350 }
7351 static void dissect_lte_broadcast_detect_indication_value(ptvcursor_t * ptvc, packet_info* pinfo)
7352 {
7353         guint32 test_value;
7354
7355         // Number of Tx Antenna
7356         proto_item* item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_tx_antenna, 1, ENC_BIG_ENDIAN, &test_value);
7357         if (!(test_value == 1 || test_value == 2 || test_value == 4))
7358         {
7359                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of tx antenna value [1, 2, 4]");
7360         }
7361
7362         // MIB[MIB Length]
7363         ptvcursor_add(ptvc, hf_nfapi_mib, 2, ENC_BIG_ENDIAN|ENC_NA);
7364
7365         // SFN Offset
7366         ptvcursor_add(ptvc, hf_nfapi_sfn_offset, 4, ENC_BIG_ENDIAN);
7367 }
7368 static void dissect_utran_broadcast_detect_indication_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7369 {
7370         // MIB[MIB Length]
7371         ptvcursor_add(ptvc, hf_nfapi_mib, 2, ENC_BIG_ENDIAN|ENC_NA);
7372
7373         // SFN Offset
7374         ptvcursor_add(ptvc, hf_nfapi_sfn_offset, 4, ENC_BIG_ENDIAN);
7375 }
7376 static void dissect_lte_system_information_schedule_request_value(ptvcursor_t * ptvc, packet_info* pinfo)
7377 {
7378         proto_item* item;
7379         guint32 test_value;
7380
7381         // EARFCN
7382         ptvcursor_add(ptvc, hf_nfapi_earfcn, 2, ENC_BIG_ENDIAN);
7383
7384         // PCI
7385         ptvcursor_add(ptvc, hf_nfapi_pci, 2, ENC_BIG_ENDIAN);
7386
7387         // Bandwidth
7388         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_bandwidth, 2, ENC_BIG_ENDIAN, &test_value);
7389         if (!(test_value == 6 || test_value == 15 || test_value == 25 ||
7390                 test_value == 50 || test_value == 75 || test_value == 100))
7391         {
7392                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid bandwidth value [6, 15, 25, 50, 75, 100]");
7393         }
7394
7395         // PHICH Configuration
7396         // todo : phich bit decode
7397         ptvcursor_add(ptvc, hf_nfapi_phich_configuration, 1, ENC_BIG_ENDIAN);
7398
7399         // Number of Tx Antenna
7400         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_tx_antenna, 1, ENC_BIG_ENDIAN, &test_value);
7401         if (!(test_value == 1 || test_value == 2 || test_value == 4))
7402         {
7403                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of tx antenna value [1, 2, 4]");
7404         }
7405
7406         // retryCount
7407         ptvcursor_add(ptvc, hf_nfapi_retry_count, 1, ENC_BIG_ENDIAN);
7408
7409         // Timeout
7410         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7411 }
7412 static void dissect_lte_system_information_schedule_indication_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7413 {
7414         // this needs to be SIB 1
7415         guint len = tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
7416         ptvcursor_add(ptvc, hf_nfapi_sib1, len, ENC_NA);
7417 }
7418 static void dissect_si_periodicity_value(ptvcursor_t * ptvc, packet_info* pinfo)
7419 {
7420         proto_item* item;
7421         guint32 test_value;
7422
7423         // SI Periodicity
7424         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_si_periodicity, 1, ENC_BIG_ENDIAN, &test_value);
7425         if (test_value > 7)
7426         {
7427                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid si periodicity value [0..7]");
7428         }
7429
7430         // SI Index
7431         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_si_index, 1, ENC_BIG_ENDIAN, &test_value);
7432         if (test_value > 32)
7433         {
7434                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid si index value [0..32]");
7435         }
7436 }
7437
7438 static void dissect_lte_system_information_request_value(ptvcursor_t * ptvc, packet_info* pinfo)
7439 {
7440         proto_item* item;
7441         guint32 test_value, si_priodicity;
7442
7443         // EARFCN
7444         ptvcursor_add(ptvc, hf_nfapi_earfcn, 2, ENC_BIG_ENDIAN);
7445
7446         // PCI
7447         ptvcursor_add(ptvc, hf_nfapi_pci, 2, ENC_BIG_ENDIAN);
7448
7449         // Downlink channel bandwidth
7450         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_downlink_channel_bandwidth, 2, ENC_BIG_ENDIAN, &test_value);
7451         if (!(test_value == 6 || test_value == 15 || test_value == 25 ||
7452                 test_value == 50 || test_value == 75 || test_value == 100))
7453         {
7454                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid bandwidth value [6, 15, 25, 50, 75, 100]");
7455         }
7456
7457         // PHICH Configuration
7458         ptvcursor_add(ptvc, hf_nfapi_phich_configuration, 1, ENC_BIG_ENDIAN);
7459
7460         // Number of Tx Antenna
7461         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_tx_antenna, 1, ENC_BIG_ENDIAN, &test_value);
7462         if (!(test_value == 1 || test_value == 2 || test_value == 4))
7463         {
7464                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid number of tx antenna value [1, 2, 4]");
7465         }
7466
7467         // Number of SI Periodicity
7468         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_si_periodicity, 1, ENC_BIG_ENDIAN, &si_priodicity);
7469
7470         dissect_array_value(ptvc, pinfo, "Number SI Periodicity", ett_nfapi_si_periodicity_list, si_priodicity, dissect_si_periodicity_value);
7471
7472         // SI Window Length
7473         item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_si_window_length, 1, ENC_BIG_ENDIAN, &test_value);
7474         if (!(test_value == 1 || test_value == 2 || test_value == 5 || test_value == 10 ||
7475                   test_value == 15 || test_value == 20 || test_value == 40))
7476         {
7477                 expert_add_info_format(pinfo, item, &ei_invalid_range, "Invalid si window length value [1, 2, 5, 10, 15, 20, 40]");
7478         }
7479
7480         // Timeout
7481         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7482 }
7483 static void dissect_utran_system_information_request_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7484 {
7485         // UARFCN
7486         ptvcursor_add(ptvc, hf_nfapi_uarfcn, 2, ENC_BIG_ENDIAN);
7487
7488         // PSC
7489         ptvcursor_add(ptvc, hf_nfapi_psc, 2, ENC_BIG_ENDIAN);
7490
7491         // Timeout
7492         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7493 }
7494 static void dissect_geran_system_information_request_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7495 {
7496         // ARFCN
7497         ptvcursor_add(ptvc, hf_nfapi_arfcn, 2, ENC_BIG_ENDIAN);
7498
7499         // BSIC
7500         ptvcursor_add(ptvc, hf_nfapi_bsic, 1, ENC_BIG_ENDIAN);
7501
7502         // Timeout
7503         ptvcursor_add(ptvc, hf_nfapi_timeout, 4, ENC_BIG_ENDIAN);
7504 }
7505 static void dissect_lte_system_information_indication_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7506 {
7507         // SIB Type
7508         ptvcursor_add(ptvc, hf_nfapi_sib_type, 1, ENC_BIG_ENDIAN);
7509
7510         // SIB[SIB Length]
7511         ptvcursor_add(ptvc, hf_nfapi_sib, 2, ENC_BIG_ENDIAN|ENC_NA);
7512 }
7513 static void dissect_utran_system_information_indication_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7514 {
7515         // SIB[SIB Length]
7516         ptvcursor_add(ptvc, hf_nfapi_sib, 2, ENC_BIG_ENDIAN|ENC_NA);
7517 }
7518 static void dissect_geran_system_information_indication_value(ptvcursor_t * ptvc, packet_info* pinfo _U_)
7519 {
7520         // SI[SI Length]
7521         ptvcursor_add(ptvc, hf_nfapi_si, 2, ENC_BIG_ENDIAN|ENC_NA);
7522 }
7523
7524 static void dissect_rx_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo _U_);
7525
7526 // Important the tags must be in numerical order so that they can be indexed correctly
7527 static const tlv_t nfapi_tags[] =
7528 {
7529         { 0x1000, "PNF Param General", dissect_pnf_param_general_value },
7530         { 0x1001, "PNF PHY", dissect_pnf_phy_value },
7531         { 0x1002, "PNF RF", dissect_pnf_rf_value },
7532         { 0x1003, "PNF PHY RF Config", dissect_pnf_phy_rf_config_value },
7533         { 0x1004, "DL RS Tx power", dissect_dl_rs_tx_power_value },
7534         { 0x1005, "Received interference power", dissect_received_interference_power_value },
7535         { 0x1006, "Thermal noise power", dissect_thermal_noise_power_value },
7536         { 0x1007, "DL RS TX Power measurement", dissect_dl_rs_tx_power_measurement_value },
7537         { 0x1008, "Received Interference power measurement", dissect_received_interference_power_measurement_value },
7538         { 0x1009, "Thermal noise power measurement", dissect_thermal_noise_power_measurement_value },
7539         { 0x100A, "PNF PHY Rel 10", dissect_pnf_phy_rel10_value },
7540         { 0x100B, "PNF PHY Rel 11", dissect_pnf_phy_rel11_value },
7541         { 0x100C, "PNF PHY Rel 12", dissect_pnf_phy_rel12_value },
7542         { 0x100D, "PNF PHY Rel 13", dissect_pnf_phy_rel13_value },
7543 };
7544
7545 static const tlv_t configuration_tags[] =
7546 {
7547         { 0x0000, NULL, NULL },
7548         { 0x0001, "Subframe config - Duplex Mode", dissect_duplex_mode_value },
7549         { 0x0002, "Subframe config - PCFICH power offset TLV", dissect_pcfich_power_offset_value },
7550         { 0x0003, "Subframe config - P-B", dissect_pb_value },
7551         { 0x0004, "Subframe config - DL cyclic prefix type", dissect_dl_cyclic_prefix_value },
7552         { 0x0005, "Subframe config - UL cyclic prefix type", dissect_ul_cyclic_prefix_value },
7553         { 0x0006, NULL, NULL },
7554         { 0x0007, NULL, NULL },
7555         { 0x0008, NULL, NULL },
7556         { 0x0009, NULL, NULL },
7557         { 0x000A, "RF config - Downlink channel bandwidth", dissect_dl_channel_bandwidth_value },
7558         { 0x000B, "RF config - Uplink channel bandwidth", dissect_ul_channel_bandwidth_value },
7559         { 0x000C, "RF config - Reference signal power", dissect_reference_signal_power_value },
7560         { 0x000D, "RF config - Tx antenna ports", dissect_tx_antenna_ports_value },
7561         { 0x000E, "RF config - Rx Antenna ports", dissect_rx_antenna_ports_value },
7562         { 0x000F, NULL, NULL },
7563         { 0x0010, NULL, NULL },
7564         { 0x0011, NULL, NULL },
7565         { 0x0012, NULL, NULL },
7566         { 0x0013, NULL, NULL },
7567         { 0x0014, "PHICH config - PHICH resource", dissect_phich_resource_value },
7568         { 0x0015, "PHICH config - PHICH duration", dissect_phich_duration_value },
7569         { 0x0016, "PHICH config - PHICH power offset", dissect_phich_power_offset_value },
7570         { 0x0017, NULL, NULL },
7571         { 0x0018, NULL, NULL },
7572         { 0x0019, NULL, NULL },
7573         { 0x001A, NULL, NULL },
7574         { 0x001B, NULL, NULL },
7575         { 0x001C, NULL, NULL },
7576         { 0x001D, NULL, NULL },
7577         { 0x001E, "SCH config - Primary synchronization signal EPRE/EPRERS", dissect_psch_synch_signal_epre_eprers_value },
7578         { 0x001F, "SCH config - Secondary synchronization signal EPRE/EPRERS", dissect_ssch_synch_signal_epre_eprers_value },
7579         { 0x0020, "SCH config - Physical Cell Id", dissect_physical_cell_id_value },
7580         { 0x0021, NULL, NULL },
7581         { 0x0022, NULL, NULL },
7582         { 0x0023, NULL, NULL },
7583         { 0x0024, NULL, NULL },
7584         { 0x0025, NULL, NULL },
7585         { 0x0026, NULL, NULL },
7586         { 0x0027, NULL, NULL },
7587         { 0x0028, "PRACH config - Configuration index", dissect_prach_configuration_index_value },
7588         { 0x0029, "PRACH config - Root sequence index", dissect_prach_root_sequence_index_value },
7589         { 0x002A, "PRACH config - Zero correlation zone configuration", dissect_prach_zero_correlation_zone_configuration_value },
7590         { 0x002B, "PRACH config - High speed flag", dissect_prach_high_speed_flag_value },
7591         { 0x002C, "PRACH config - Frequency offset", dissect_prach_frequency_offset_value },
7592         { 0x002D, NULL, NULL },
7593         { 0x002E, NULL, NULL },
7594         { 0x002F, NULL, NULL },
7595         { 0x0030, NULL, NULL },
7596         { 0x0031, NULL, NULL },
7597         { 0x0032, "PUSCH config - Hopping mode", dissect_pusch_hopping_mode_value },
7598         { 0x0033, "PUSCH config - Hopping offset", dissect_pusch_hopping_offset_value },
7599         { 0x0034, "PUSCH config - Number of sub-bands", dissect_pusch_number_of_subbands_value },
7600         { 0x0035, NULL, NULL },
7601         { 0x0036, NULL, NULL },
7602         { 0x0037, NULL, NULL },
7603         { 0x0038, NULL, NULL },
7604         { 0x0039, NULL, NULL },
7605         { 0x003A, NULL, NULL },
7606         { 0x003B, NULL, NULL },
7607         { 0x003C, "PUCCH config - Delta PUCCH Shift", dissect_pucch_delta_pucch_shift_value },
7608         { 0x003D, "PUCCH config - N_CQI RB", dissect_pucch_n_cqi_rb_value },
7609         { 0x003E, "PUCCH config - N_AN CS", dissect_pucch_n_an_cs_value },
7610         { 0x003F, "PUCCH config - N1Pucch-AN", dissect_pucch_n1_pucch_an_value },
7611         { 0x0040, NULL, NULL },
7612         { 0x0041, NULL, NULL },
7613         { 0x0042, NULL, NULL },
7614         { 0x0043, NULL, NULL },
7615         { 0x0044, NULL, NULL },
7616         { 0x0045, NULL, NULL },
7617         { 0x0046, "SRS config - Bandwidth configuration", dissect_srs_bandwidth_configuration_value },
7618         { 0x0047, "SRS config - MaxUpPTS", dissect_srs_max_uppts_value },
7619         { 0x0048, "SRS config - SRS subframe configuration", dissect_srs_subframe_configuration_value },
7620         { 0x0049, "SRS config - SRS AckNack SRS simultaneous transmission", dissect_srs_acknack_srs_sim_tx_value },
7621         { 0x004A, NULL, NULL },
7622         { 0x004B, NULL, NULL },
7623         { 0x004C, NULL, NULL },
7624         { 0x004D, NULL, NULL },
7625         { 0x004E, NULL, NULL },
7626         { 0x004F, NULL, NULL },
7627         { 0x0050, "Uplink reference signal config - Uplink RS hopping", dissect_uplink_rs_hopping_value },
7628         { 0x0051, "Uplink reference signal config - Group assignment (delta sequence-shift pattern)", dissect_group_assignment_value },
7629         { 0x0052, "Uplink reference signal config - Cyclic Shift 1 for DMRS", dissect_cyclic_shift_1_for_drms_value },
7630         { 0x0053, NULL, NULL },
7631         { 0x0054, NULL, NULL },
7632         { 0x0055, NULL, NULL },
7633         { 0x0056, NULL, NULL },
7634         { 0x0057, NULL, NULL },
7635         { 0x0058, NULL, NULL },
7636         { 0x0059, NULL, NULL },
7637         { 0x005A, "TDD frame structure config - Subframe assignment", dissect_tdd_subframe_assignement_value },
7638         { 0x005B, "TDD frame structure config - Special sub-frame patterns", dissect_tdd_subframe_patterns_value },
7639         { 0x005C, NULL, NULL },
7640         { 0x005D, NULL, NULL },
7641         { 0x005E, NULL, NULL },
7642         { 0x005F, NULL, NULL },
7643         { 0x0060, NULL, NULL },
7644         { 0x0061, NULL, NULL },
7645         { 0x0062, NULL, NULL },
7646         { 0x0063, NULL, NULL },
7647         { 0x0064, "LAA config - ED Threshold for LBT for PDSCH", dissect_laa_ed_threashold_for_lbt_for_pdsch_value },
7648         { 0x0065, "LAA config - ED Threshold for LBT for DRS", dissect_laa_ed_threashold_for_lbt_for_drs_value },
7649         { 0x0066, "LAA config - PD Threshold", dissect_laa_pd_threshold_value },
7650         { 0x0067, "LAA config - Multi carrier type", dissect_laa_multi_carrier_type_value },
7651         { 0x0068, "LAA config - Multi carrier TX", dissect_laa_multi_carrier_tx_value },
7652         { 0x0069, "LAA config - Multi carrier freeze", dissect_laa_multi_carrier_freeze_value },
7653         { 0x006A, "LAA config - Tx antenna ports for DRS", dissect_laa_tx_antenna_port_for_drs_value },
7654         { 0x006B, "LAA config - Transmission power for DRS", dissect_laa_transmission_power_for_drs_value },
7655         { 0x006C, NULL, NULL },
7656         { 0x006D, NULL, NULL },
7657         { 0x006E, NULL, NULL },
7658         { 0x006F, NULL, NULL },
7659         { 0x0070, NULL, NULL },
7660         { 0x0071, NULL, NULL },
7661         { 0x0072, NULL, NULL },
7662         { 0x0073, NULL, NULL },
7663         { 0x0074, NULL, NULL },
7664         { 0x0075, NULL, NULL },
7665         { 0x0076, NULL, NULL },
7666         { 0x0077, NULL, NULL },
7667         { 0x0078, "eMTC config - PBCH Repetitions enable R13", dissect_emtc_pbch_repeitions_enabled_r13_value },
7668         { 0x0079, "eMTC config - PRACH CAT-M Root sequence index", dissect_emtc_prach_cat_m_root_sequence_index_value },
7669         { 0x007A, "eMTC config - PRACH CAT-M Zero correlation zone configuration", dissect_emtc_prach_cat_m_zero_correlation_zone_configuration_value },
7670         { 0x007B, "eMTC config - PRACH CAT-M High speed flag", dissect_emtc_prach_cat_m_high_speed_flag_value },
7671         { 0x007C, "eMTC config - PRACH CE level #0 Enable", dissect_emtc_prach_ce_level_0_enabled_value },
7672         { 0x007D, "eMTC config - PRACH CE level #0 Configuration index", dissect_emtc_prach_ce_level_0_configuration_offset_value },
7673         { 0x007E, "eMTC config - PRACH CE level #0 Frequency offset", dissect_emtc_prach_ce_level_0_frequency_offset_value },
7674         { 0x007F, "eMTC config - PRACH CE level #0 Number of repetitions per attempt", dissect_emtc_preach_ce_level_0_num_of_repeitions_per_attempt_value },
7675         { 0x0080, "eMTC config - CE level #0 Starting subframe periodicity", dissect_emtc_ce_level_0_starting_subframe_periodicity_value },
7676         { 0x0081, "eMTC config - PRACH CE level #0 Hopping Enable", dissect_emtc_preach_ce_level_0_hopping_enabled_value },
7677         { 0x0082, "eMTC config - PRACH CE level #0 Hopping Offset", dissect_emtc_preach_ce_level_0_hopping_offset_value },
7678         { 0x0083, "eMTC config - PRACH CE level #1 Enable", dissect_emtc_prach_ce_level_1_enabled_value },
7679         { 0x0084, "eMTC config - PRACH CE level #1 Configuration index", dissect_emtc_prach_ce_level_1_configuration_offset_value },
7680         { 0x0085, "eMTC config - PRACH CE level #1 Frequency offset", dissect_emtc_prach_ce_level_1_frequency_offset_value },
7681         { 0x0086, "eMTC config - PRACH CE level #1 Number of repetitions per attempt", dissect_emtc_preach_ce_level_1_num_of_repeitions_per_attempt_value },
7682         { 0x0087, "eMTC config - CE level #1 Starting subframe periodicity", dissect_emtc_ce_level_1_starting_subframe_periodicity_value },
7683         { 0x0088, "eMTC config - PRACH CE level #1 Hopping Enable", dissect_emtc_preach_ce_level_1_hopping_enabled_value },
7684         { 0x0089, "eMTC config - PRACH CE level #1 Hopping Offset", dissect_emtc_preach_ce_level_1_hopping_offset_value },
7685         { 0x008A, "eMTC config - PRACH CE level #2 Enable", dissect_emtc_prach_ce_level_2_enabled_value },
7686         { 0x008B, "eMTC config - PRACH CE level #2 Configuration index", dissect_emtc_prach_ce_level_2_configuration_offset_value },
7687         { 0x008C, "eMTC config - PRACH CE level #2 Frequency offset", dissect_emtc_prach_ce_level_2_frequency_offset_value },
7688         { 0x008D, "eMTC config - PRACH CE level #2 Number of repetitions per attempt", dissect_emtc_preach_ce_level_2_num_of_repeitions_per_attempt_value },
7689         { 0x008E, "eMTC config - CE level #2 Starting subframe periodicity", dissect_emtc_ce_level_2_starting_subframe_periodicity_value },
7690         { 0x008F, "eMTC config - PRACH CE level #2 Hopping Enable", dissect_emtc_preach_ce_level_2_hopping_enabled_value },
7691         { 0x0090, "eMTC config - PRACH CE level #2 Hopping Offset", dissect_emtc_preach_ce_level_2_hopping_offset_value },
7692         { 0x0091, "eMTC config - PRACH CE level #3 Enable", dissect_emtc_prach_ce_level_3_enabled_value },
7693         { 0x0092, "eMTC config - PRACH CE level #3 Configuration index", dissect_emtc_prach_ce_level_3_configuration_offset_value },
7694         { 0x0093, "eMTC config - PRACH CE level #3 Frequency offset", dissect_emtc_prach_ce_level_3_frequency_offset_value },
7695         { 0x0094, "eMTC config - PRACH CE level #3 Number of repetitions per attempt", dissect_emtc_preach_ce_level_3_num_of_repeitions_per_attempt_value },
7696         { 0x0095, "eMTC config - CE level #3 Starting subframe periodicity", dissect_emtc_ce_level_3_starting_subframe_periodicity_value },
7697         { 0x0096, "eMTC config - PRACH CE level #3 Hopping Enable", dissect_emtc_preach_ce_level_3_hopping_enabled_value },
7698         { 0x0097, "eMTC config - PRACH CE level #3 Hopping Offset", dissect_emtc_preach_ce_level_3_hopping_offset_value },
7699         { 0x0098, "eMTC config - PUCCH Interval - ULHoppingConfigCommonModeA", dissect_emtc_pucch_interval_ul_hopping_config_common_mode_a_value },
7700         { 0x0099, "eMTC config - PUCCH Interval - ULHoppingConfigCommonModeB", dissect_emtc_pucch_interval_ul_hopping_config_common_mode_b_value },
7701         { 0x009A, NULL, NULL },
7702         { 0x009B, NULL, NULL },
7703         { 0x009C, NULL, NULL },
7704         { 0x009D, NULL, NULL },
7705         { 0x009E, NULL, NULL },
7706         { 0x009F, NULL, NULL },
7707         { 0x00A0, NULL, NULL },
7708         { 0x00A1, NULL, NULL },
7709         { 0x00A2, NULL, NULL },
7710         { 0x00A3, NULL, NULL },
7711         { 0x00A4, NULL, NULL },
7712         { 0x00A5, NULL, NULL },
7713         { 0x00A6, NULL, NULL },
7714         { 0x00A7, NULL, NULL },
7715         { 0x00A8, NULL, NULL },
7716         { 0x00A9, NULL, NULL },
7717         { 0x00AA, NULL, NULL },
7718         { 0x00AB, NULL, NULL },
7719         { 0x00AC, NULL, NULL },
7720         { 0x00AD, NULL, NULL },
7721         { 0x00AE, NULL, NULL },
7722         { 0x00AF, NULL, NULL },
7723         { 0x00B0, NULL, NULL },
7724         { 0x00B1, NULL, NULL },
7725         { 0x00B2, NULL, NULL },
7726         { 0x00B3, NULL, NULL },
7727         { 0x00B4, NULL, NULL },
7728         { 0x00B5, NULL, NULL },
7729         { 0x00B6, NULL, NULL },
7730         { 0x00B7, NULL, NULL },
7731         { 0x00B8, NULL, NULL },
7732         { 0x00B9, NULL, NULL },
7733         { 0x00BA, NULL, NULL },
7734         { 0x00BB, NULL, NULL },
7735         { 0x00BC, NULL, NULL },
7736         { 0x00BD, NULL, NULL },
7737         { 0x00BE, NULL, NULL },
7738         { 0x00BF, NULL, NULL },
7739         { 0x00C0, NULL, NULL },
7740         { 0x00C1, NULL, NULL },
7741         { 0x00C2, NULL, NULL },
7742         { 0x00C3, NULL, NULL },
7743         { 0x00C4, NULL, NULL },
7744         { 0x00C5, NULL, NULL },
7745         { 0x00C6, NULL, NULL },
7746         { 0x00C7, NULL, NULL },
7747         { 0x00C8, "Layer 2/3 - Downlink Bandwidth Support", dissect_dl_bandwidth_support_value },
7748         { 0x00C9, "Layer 2/3 - Uplink Bandwidth Support", dissect_ul_bandwidth_support_value },
7749         { 0x00CA, "Layer 2/3 - Downlink modulation support", dissect_dl_modulation_value },
7750         { 0x00CB, "Layer 2/3 - Uplink modulation support", dissect_ul_modulation_value },
7751         { 0x00CC, "Layer 2/3 - PHY antenna capability", dissect_phy_antenna_capability_value },
7752         { 0x00CD, "Layer 2/3 - Release capability", dissect_release_capability_value },
7753         { 0x00CE, "Layer 2/3 - MBSFN capability", dissect_mbsfn_value },
7754         { 0x00CF, NULL, NULL },
7755         { 0x00D0, NULL, NULL },
7756         { 0x00D1, "LAA Capability - LAA support", dissect_laa_support_value },
7757         { 0x00D2, "LAA Capability - PD sensing LBT support", dissect_laa_pd_sensing_lbt_support_value },
7758         { 0x00D3, "LAA Capability - Multi carrier LBT support", dissect_laa_multi_carrier_lbt_support_value },
7759         { 0x00D4, "LAA Capability - Partial SF support", dissect_laa_partial_sf_support_value },
7760         { 0x00D5, NULL, NULL },
7761         { 0x00D6, NULL, NULL },
7762         { 0x00D7, NULL, NULL },
7763         { 0x00D8, NULL, NULL },
7764         { 0x00D9, NULL, NULL },
7765         { 0x00DA, NULL, NULL },
7766         { 0x00DB, NULL, NULL },
7767         { 0x00DC, NULL, NULL },
7768         { 0x00DD, NULL, NULL },
7769         { 0x00DE, NULL, NULL },
7770         { 0x00DF, NULL, NULL },
7771         { 0x00E0, NULL, NULL },
7772         { 0x00E1, NULL, NULL },
7773         { 0x00E2, NULL, NULL },
7774         { 0x00E3, NULL, NULL },
7775         { 0x00E4, NULL, NULL },
7776         { 0x00E5, NULL, NULL },
7777         { 0x00E6, NULL, NULL },
7778         { 0x00E7, NULL, NULL },
7779         { 0x00E8, NULL, NULL },
7780         { 0x00E9, NULL, NULL },
7781         { 0x00EA, NULL, NULL },
7782         { 0x00EB, NULL, NULL },
7783         { 0x00EC, NULL, NULL },
7784         { 0x00ED, NULL, NULL },
7785         { 0x00EE, NULL, NULL },
7786         { 0x00EF, NULL, NULL },
7787         { 0x00F0, "Layer 2/3 - Data report mode", dissect_data_report_mode_value },
7788         { 0x00F1, "Layer 2/3 - SFN/SF", dissect_sfn_sf_value },
7789         { 0x00F2, NULL, NULL },
7790         { 0x00F3, NULL, NULL },
7791         { 0x00F4, NULL, NULL },
7792         { 0x00F5, NULL, NULL },
7793         { 0x00F6, NULL, NULL },
7794         { 0x00F7, NULL, NULL },
7795         { 0x00F8, NULL, NULL },
7796         { 0x00F9, NULL, NULL },
7797         { 0x00FA, "Layer 1 - PHY state", dissect_phy_state_value },
7798         { 0x00FB, NULL, NULL },
7799         { 0x00FC, NULL, NULL },
7800         { 0x00FD, NULL, NULL },
7801         { 0x00FE, NULL, NULL },
7802         { 0x00FF, NULL, NULL },
7803         { 0x0100, "NFAPI - P7 VNF Address IPv4", dissect_p7_vnf_address_ipv4_value },
7804         { 0x0101, "NFAPI - P7 VNF Address IPv4", dissect_p7_vnf_address_ipv6_value },
7805         { 0x0102, "NFAPI - P7 Port", dissect_p7_vnf_port_value },
7806         { 0x0103, "NFAPI - P7 PNF Address IPv4", dissect_p7_pnf_address_ipv4_value },
7807         { 0x0104, "NFAPI - P7 PNF Address IPv4", dissect_p7_pnf_address_ipv6_value },
7808         { 0x0105, "NFAPI - P7 Port", dissect_p7_pnf_port_value },
7809         { 0x0106, NULL, NULL },
7810         { 0x0107, NULL, NULL },
7811         { 0x0108, NULL, NULL },
7812         { 0x0109, NULL, NULL },
7813         { 0x010A, "NFAPI - Downlink UEs per Subframe", dissect_downlink_ues_per_subframe_value },
7814         { 0x010B, "NFAPI - Uplink UEs per Subframe", dissect_uplink_ues_per_subframe_value },
7815         { 0x010C, NULL, NULL },
7816         { 0x010D, NULL, NULL },
7817         { 0x010E, NULL, NULL },
7818         { 0x010F, NULL, NULL },
7819         { 0x0110, NULL, NULL },
7820         { 0x0111, NULL, NULL },
7821         { 0x0112, NULL, NULL },
7822         { 0x0113, NULL, NULL },
7823         { 0x0114, "NFAPI - nFAPI RF Bands", dissect_rf_bands_value },
7824         { 0x0115, NULL, NULL },
7825         { 0x0116, NULL, NULL },
7826         { 0x0117, NULL, NULL },
7827         { 0x0118, NULL, NULL },
7828         { 0x0119, NULL, NULL },
7829         { 0x011A, NULL, NULL },
7830         { 0x011B, NULL, NULL },
7831         { 0x011C, NULL, NULL },
7832         { 0x011D, NULL, NULL },
7833         { 0x011E, "NFAPI - Timing window", dissect_timing_window_value },
7834         { 0x011F, "NFAPI - Timing info mode", dissect_timing_info_mode_value },
7835         { 0x0120, "NFAPI - Timing info period", dissect_timing_info_period_value },
7836         { 0x0121, NULL, NULL },
7837         { 0x0122, NULL, NULL },
7838         { 0x0123, NULL, NULL },
7839         { 0x0124, NULL, NULL },
7840         { 0x0125, NULL, NULL },
7841         { 0x0126, NULL, NULL },
7842         { 0x0127, NULL, NULL },
7843         { 0x0128, "NFAPI - Maximum Transmit Power", dissect_maximum_transmit_power_value },
7844         { 0x0129, "NFAPI - EARFCN", dissect_earfcn_value },
7845         { 0x012A, NULL, NULL },
7846         { 0x012B, NULL, NULL },
7847         { 0x012C, NULL, NULL },
7848         { 0x012D, NULL, NULL },
7849         { 0x012E, NULL, NULL },
7850         { 0x012F, NULL, NULL },
7851         { 0x0130, "NFAPI - NMM GSM Frequency Bands", dissect_nmm_gsm_frequency_bands_value },
7852         { 0x0131, "NFAPI - NMM UMTS Frequency Bands", dissect_nmm_umts_frequency_bands_value },
7853         { 0x0132, "NFAPI - NMM LTE Frequency Bands", dissect_nmm_lte_frequency_bands_value },
7854         { 0x0133, "NFAPI - NMM Uplink RSSI supported", dissect_nmm_uplink_rssi_supported_value },
7855 };
7856
7857 static const tlv_t p7_tags[] =
7858 {
7859         { 0x2000, "DL Config Request Body", dissect_dl_config_request_body_value },
7860         { 0x2001, "DL DCI PDU Release 8", dissect_dl_config_request_dl_dci_pdu_rel8_value },
7861         { 0x2002, "DL DCI PDU Release 9", dissect_dl_config_request_dl_dci_pdu_rel9_value },
7862         { 0x2003, "DL DCI PDU Release 10", dissect_dl_config_request_dl_dci_pdu_rel10_value },
7863         { 0x2004, "BCH PDU Release 8", dissect_dl_config_request_bch_pdu_rel8_value },
7864         { 0x2005, "MCH PDU Release 8", dissect_dl_config_request_mch_pdu_rel8_value },
7865         { 0x2006, "DLSCH PDU Release 8", dissect_dl_config_request_dlsch_pdu_rel8_value },
7866         { 0x2007, "DLSCH PDU Release 9", dissect_dl_config_request_dlsch_pdu_rel9_value },
7867         { 0x2008, "DLSCH PDU Release 10", dissect_dl_config_request_dlsch_pdu_rel10_value },
7868         { 0x2009, "PCH PDU Release 8", dissect_dl_config_request_pch_pdu_rel8_value },
7869         { 0x200A, "PRS PDU Release 9", dissect_dl_config_request_prs_pdu_rel9_value },
7870         { 0x200B, "CSI-RS PDU Release 10", dissect_dl_config_request_csi_rs_pdu_rel10_value },
7871         { 0x200C, "UL Config Request Body", dissect_ul_config_request_body_value },
7872         { 0x200D, "ULSCH PDU Release 8", dissect_ul_config_ulsch_pdu_rel8_value },
7873         { 0x200E, "ULSCH PDU Release 10", dissect_ul_config_ulsch_pdu_rel10_value },
7874         { 0x200F, "Initial Transmission Parameters Release 8", dissect_ul_config_init_tx_params_rel8_value },
7875         { 0x2010, "CQI RI Information Release 8", dissect_ul_config_cqi_ri_info_rel8_value },
7876         { 0x2011, "CQI RI Information Release 9 or later", dissect_ul_config_cqi_ri_info_rel9_later_value },
7877         { 0x2012, "HARQ Information (ULSCH) Release 10", dissect_ul_config_harq_info_ulsch_rel10_value },
7878         { 0x2013, "UE Information Release 8", dissect_ul_config_ue_info_rel8_value },
7879         { 0x2014, "CQI Information Release 8", dissect_ul_config_cqi_info_rel8_value },
7880         { 0x2015, "CQI Information Release 10", dissect_ul_config_cqi_info_rel10_value },
7881         { 0x2016, "SR Information Release 8", dissect_ul_config_sr_info_rel8_value },
7882         { 0x2017, "SR Information Release 10", dissect_ul_config_sr_info_rel10_value },
7883         { 0x2018, "HARQ Information (UCI) Release 10 TDD", dissect_ul_config_harq_info_uci_rel10_tdd_value },
7884         { 0x2019, "HARQ Information (UCI) Release 8 FDD", dissect_ul_config_harq_info_uci_rel8_fdd_value },
7885         { 0x201A, "HARQ Information (UCI) Release 9 or later FDD", dissect_ul_config_harq_info_uci_rel9_later_fdd_value },
7886         { 0x201B, "SRS Information Release 8", dissect_ul_config_srs_info_rel8_value },
7887         { 0x201C, "SRS Information Release 10", dissect_ul_config_srs_info_rel10_value },
7888         { 0x201D, "HI DCI0 Request Body", dissect_hi_dci0_request_body_value },
7889         { 0x201E, "HI PDU Release 8", dissect_hi_dci0_hi_rel8_value },
7890         { 0x201F, "HI PDU Release 10", dissect_hi_dci0_hi_rel10_value },
7891         { 0x2020, "DCI UL PDU Release 8", dissect_hi_dci0_dci_ul_rel8_value },
7892         { 0x2021, "DCI UL PDU Release 10", dissect_hi_dci0_dci_ul_rel10_value },
7893         { 0x2022, "Tx Request Body", dissect_tx_request_body_value },
7894         { 0x2023, "RX Indication Body", dissect_rx_indication_body_value },
7895         { 0x2024, "RX PDU Release 8", dissect_rx_indication_rel8_value },
7896         { 0x2025, "RX PDU Release 9", dissect_rx_indication_rel9_value },
7897         { 0x2026, "HARQ Indication Body", dissect_harq_indication_body_value },
7898         { 0x2027, "HARQ PDU Release 8 TDD", dissect_harq_indication_rel8_tdd_value },
7899         { 0x2028, "HARQ PDU Release 9 or later TDD", dissect_harq_indication_rel9_later_tdd_value },
7900         { 0x2029, "HARQ PDU Release 8 FDD", dissect_harq_indication_rel8_fdd_value },
7901         { 0x202A, "HARQ PDU Release 9 or later FDD", dissect_harq_indication_rel9_later_fdd_value },
7902         { 0x202B, "CRC Indication Body", dissect_crc_indication_body_value },
7903         { 0x202C, "CRC PDU Release 8", dissect_crc_indication_rel8_value },
7904         { 0x202D, "RX SR Indication Body", dissect_rx_sr_indication_body_value },
7905         { 0x202E, "RX CQI Indication Body", dissect_rx_cqi_indication_body_value },
7906         { 0x202F, "CQI PDU Release 8", dissect_rx_cqi_indication_rel8_value },
7907         { 0x2030, "CQI PDU Release 9", dissect_rx_cqi_indication_rel9_value },
7908         { 0x2031, "RACH Indication Body", dissect_rach_indication_body_value },
7909         { 0x2032, "Preamable PDU Release 8", dissect_rach_indication_rel8_value },
7910         { 0x2033, "Preamable PDU Release 9", dissect_rach_indication_rel9_value },
7911         { 0x2034, "SRS Indication Body", dissect_srs_indication_body_value },
7912         { 0x2035, "SRS PDU Release 8", dissect_srs_indication_rel8_value },
7913         { 0x2036, "SRS PDU Release 9", dissect_srs_indication_rel9_value },
7914         { 0x2037, "SRS PDU Release 10 TDD", dissect_srs_indication_rel10_tdd_value },
7915         { 0x2038, "RX UE Information", dissect_rx_ue_info_value },
7916         { 0x2039, "DL DCI PDU Release 11", dissect_dl_config_request_dl_dci_pdu_rel11_value },
7917         { 0x203A, "DL DCI PDU Release 12", dissect_dl_config_request_dl_dci_pdu_rel12_value },
7918         { 0x203B, "DL DCI PDU Release 13", dissect_dl_config_request_dl_dci_pdu_rel13_value },
7919         { 0x203C, "DLSCH PDU Release 11", dissect_dl_config_request_dlsch_pdu_rel11_value },
7920         { 0x203D, "DLSCH PDU Release 12", dissect_dl_config_request_dlsch_pdu_rel12_value },
7921         { 0x203E, "DLSCH PDU Release 13", dissect_dl_config_request_dlsch_pdu_rel13_value },
7922         { 0x203F, "PCH PDU Release 13", dissect_dl_config_request_pch_pdu_rel13_value },
7923         { 0x2040, "CSI-RS PDU Release 13", dissect_dl_config_request_csi_rs_pdu_rel13_value },
7924         { 0x2041, "EDPCCH PDU Release 11 Parameters", dissect_dl_config_request_edpcch_params_rel11_value },
7925         { 0x2042, "EDPCCH PDU Release 13 Parameters", dissect_dl_config_request_edpcch_params_rel13_value },
7926         { 0x2043, "ULSCH PDU Release 11", dissect_ul_config_ulsch_pdu_rel11_value },
7927         { 0x2044, "ULSCH PDU Release 13", dissect_ul_config_ulsch_pdu_rel13_value },
7928         { 0x2045, "CQI RI Information Release 13", dissect_ul_config_cqi_ri_info_rel13_value },
7929         { 0x2046, "HARQ Information (ULSCH) Release 13", dissect_ul_config_harq_info_ulsch_rel13_value },
7930         { 0x2047, "UE Information Release 11", dissect_ul_config_ue_info_rel11_value },
7931         { 0x2048, "UE Information Release 13", dissect_ul_config_ue_info_rel13_value },
7932         { 0x2049, "CQI Information Release 13", dissect_ul_config_cqi_info_rel13_value },
7933         { 0x204A, "HARQ Information (UCI) Release 11 FDD/TDD", dissect_ul_config_harq_info_uci_rel11_fdd_tdd_value },
7934         { 0x204B, "HARQ Information (UCI) Release 13 FDD/TDD", dissect_ul_config_harq_info_uci_rel13_fdd_tdd_value },
7935         { 0x204C, "SRS Information Release 13", dissect_ul_config_srs_info_rel13_value },
7936         { 0x204D, "DCI UL PDU Release 12", dissect_hi_dci0_dci_ul_rel12_value },
7937         { 0x204E, "MDPCCH DCI UL PDU Release 13", dissect_hi_dci0_mdpcch_dci_ul_rel13_value },
7938         { 0x204F, "HARQ PDU Release 13 or later TDD", dissect_harq_indication_rel13_later_tdd_value },
7939         { 0x2050, "HARQ PDU Release 13 or later FDD", dissect_harq_indication_rel13_later_fdd_value },
7940         { 0x2051, "Preamable PDU Release 13", dissect_rach_indication_rel13_value },
7941         { 0x2052, "UL CQI Information", dissect_ul_cqi_information_value },
7942         { 0x2053, "SRS PDU Release 11", dissect_srs_indication_rel11_value },
7943         { 0x2054, "TDD Channel Measurement", dissect_tdd_channel_measurement_value },
7944         { 0x2055, "LBT DL Config Request Body", dissect_lbt_dl_config_request_body_value },
7945         { 0x2056, "LBT PDSCH Req PDU Release 13", dissect_lbt_dl_config_request_pdsch_req_rel13_value },
7946         { 0x2057, "LBT DRS req PDU Release 13", dissect_lbt_dl_config_request_drs_req_rel13_value },
7947         { 0x2058, "LBT DL Indication Message Body", dissect_lbt_indication_message_body_value },
7948         { 0x2059, "LBT PDSCH Resp PDU Release 13", dissect_lbt_dl_config_request_pdsch_resp_rel13_value },
7949         { 0x205A, "LBT DRS Resp PDU Release 13", dissect_lbt_dl_config_request_drs_resp_rel13_value },
7950         { 0x205B, "MPDCCH PDU Release 13", dissect_dl_config_request_mpdpcch_pdu_rel13_value },
7951 };
7952
7953 static const tlv_t p4_tags[] =
7954 {
7955         { 0x3000, "LTE RSSI Request", dissect_lte_rssi_request_value },
7956         { 0x3001, "UTRAN RSSI Request", dissect_utran_rssi_request_value },
7957         { 0x3002, "GERAN RSSI Request", dissect_geran_rssi_request_value },
7958         { 0x3003, "RSSI Indication", dissect_rssi_indication_value },
7959         { 0x3004, "LTE CELL SEARCH Request", dissect_lte_cell_search_value },
7960         { 0x3005, "UTRAN CELL SEARCH Request", dissect_utran_cell_search_value },
7961         { 0x3006, "GERAN CELL SEARCH Request", dissect_geran_cell_search_value },
7962         { 0x3007, "LTE CELL SEARCH Indication", dissect_lte_cell_search_indication_value },
7963         { 0x3008, "UTRAN CELL SEARCH Indication", dissect_utran_cell_search_indication_value },
7964         { 0x3009, "GERAN CELL SEARCH Indication", dissect_geran_cell_search_indication_value },
7965         { 0x300A, "PNF CELL SEARCH STATE", dissect_pnf_cell_search_state_value },
7966         { 0x300B, "LTE BROADCAST DETECT Request", dissect_lte_broadcast_detect_request_value },
7967         { 0x300C, "UTRAN BROADCAST DETECT Request", dissect_utran_broadcast_detect_request_value },
7968         { 0x300D, "PNF CELL SEARCH STATE", dissect_pnf_cell_search_state_value },
7969         { 0x300E, "LTE BROADCAST DETECT Indication", dissect_lte_broadcast_detect_indication_value },
7970         { 0x300F, "UTRAN BROADCAST DETECT Indication", dissect_utran_broadcast_detect_indication_value },
7971         { 0x3010, "PNF CELL BROADCAST STATE", dissect_pnf_cell_broadcast_state_value },
7972         { 0x3011, "LTE SYSTEM INFORMATION SCHEDULE Request", dissect_lte_system_information_schedule_request_value },
7973         { 0x3012, "PNF CELL BROADCAST STATE", dissect_pnf_cell_broadcast_state_value },
7974         { 0x3013, "LTE SYSTEM INFORMATION SCHEDULE Indication", dissect_lte_system_information_schedule_indication_value },
7975         { 0x3014, "LTE SYSTEM INFORMATION Request", dissect_lte_system_information_request_value },
7976         { 0x3015, "UTRAN SYSTEM INFORMATION Request", dissect_utran_system_information_request_value },
7977         { 0x3016, "GERAN SYSTEM INFORMATION Request", dissect_geran_system_information_request_value },
7978         { 0x3017, "PNF CELL BROADCAST STATE", dissect_pnf_cell_broadcast_state_value },
7979         { 0x3018, "LTE SYSTEM INFORMATION Indication", dissect_lte_system_information_indication_value },
7980         { 0x3019, "UTRAN SYSTEM INFORMATION Indication", dissect_utran_system_information_indication_value },
7981         { 0x301A, "GERAN SYSTEM INFORMATION Indication", dissect_geran_system_information_indication_value },
7982 };
7983
7984
7985 static const tlv_t* look_up_tlv(int tag_id)
7986 {
7987         const tlv_t* tlv = NULL;
7988
7989         static const gint num_configuration_tags = sizeof(configuration_tags) / sizeof(tlv_t);
7990         static const gint num_nfapi_tags = sizeof(nfapi_tags) / sizeof(tlv_t);
7991         static const gint num_p7_tags = sizeof(p7_tags) / sizeof(tlv_t);
7992         static const gint num_p4_tags = sizeof(p4_tags) / sizeof(tlv_t);
7993
7994         if (tag_id >= 0x0000 && tag_id <= (0x0000 + num_configuration_tags - 1)) // 0x0133)
7995         {
7996                 tlv = &configuration_tags[tag_id];
7997         }
7998         else if (tag_id >= 0x1000 && tag_id <= (0x1000 + num_nfapi_tags - 1)) // 0x100D)
7999         {
8000                 tlv = &nfapi_tags[tag_id - 0x1000];
8001         }
8002         else if (tag_id >= 0x2000 && tag_id <= (0x2000 + num_p7_tags - 1)) //0x205B)
8003         {
8004                 tlv = &p7_tags[tag_id - 0x2000];
8005         }
8006         else if (tag_id >= 0x3000 && tag_id <= (0x3000 + num_p4_tags - 1)) // 0x301A)
8007         {
8008                 tlv = &p4_tags[tag_id - 0x3000];
8009         }
8010         return tlv;
8011 }
8012
8013
8014 static proto_item* dissect_tl_header(ptvcursor_t * ptvc, packet_info* pinfo _U_)
8015 {
8016         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tl, "TL");
8017         ptvcursor_add(ptvc, hf_nfapi_tl_tag, 2, ENC_BIG_ENDIAN);
8018         proto_item* item = ptvcursor_add(ptvc, hf_nfapi_tl_length, 2, ENC_BIG_ENDIAN);
8019         ptvcursor_pop_subtree(ptvc);
8020
8021         return item;
8022 }
8023
8024 static void dissect_tlv_list(ptvcursor_t* ptvc, packet_info* pinfo, gint len)
8025 {
8026         while (ptvcursor_current_offset(ptvc) < len)
8027         {
8028                 guint16 tlv_id = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
8029                 guint16 tlv_len = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc) + 2);
8030
8031                 const tlv_t* tlv = look_up_tlv(tlv_id);
8032
8033                 if (tlv != NULL && tlv->name != NULL && tlv->tag_id == tlv_id)
8034                 {
8035                         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "%s", tlv->name);
8036                         proto_item* tlv_length_item = dissect_tl_header(ptvc, pinfo);
8037
8038                         // There are rare cases where the len of the tlv is 0.
8039                         if (tlv_len > 0)
8040                         {
8041
8042                                 if (tlv->decode != NULL)
8043                                 {
8044                                         // Create a sub buff with the correct length, so we can detect reading off the end
8045                                         tvbuff_t* sub_tvbuff = tvb_new_subset_length(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc), tlv_len);
8046                                         ptvcursor_t* sub_ptvc = ptvcursor_new(ptvcursor_tree(ptvc), sub_tvbuff, 0);
8047
8048                                         tlv->decode(sub_ptvc, pinfo);
8049
8050                                         if (ptvcursor_current_offset(sub_ptvc) != tlv_len)
8051                                         {
8052                                                 // error in the tlv length
8053                                                 expert_add_info_format(pinfo, tlv_length_item, &ei_invalid_tlv_length, "TLV length does not match decoded length");
8054                                         }
8055
8056                                         ptvcursor_free(sub_ptvc);
8057                                 }
8058
8059                                 ptvcursor_advance(ptvc, tlv_len);
8060                         }
8061
8062                         ptvcursor_pop_subtree(ptvc);
8063                 }
8064                 else
8065                 {
8066                         if (tlv_id >= 0xF000 /* && tlv_id <= 0xFFFF*/)
8067                         {
8068                                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "Unknown Vendor Extension Tag");
8069                         }
8070                         else
8071                         {
8072                                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_tlv_tree, "Unknown");
8073                         }
8074
8075                         dissect_tl_header(ptvc, pinfo);
8076                         ptvcursor_advance(ptvc, tlv_len);
8077                         ptvcursor_pop_subtree(ptvc);
8078                 }
8079         }
8080 }
8081
8082
8083 static void dissect_rx_indication_body_value(ptvcursor_t * ptvc, packet_info* pinfo)
8084 {
8085         guint32 i = 0, count;
8086         guint number_of_pdu_addr = ptvcursor_current_offset(ptvc); // *offset;
8087         wmem_array_t *lengths = wmem_array_new(wmem_packet_scope(), sizeof(guint16));
8088
8089         ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 2, ENC_BIG_ENDIAN, &count);
8090
8091         if (count > 0)
8092         {
8093                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_rx_indication_pdu_list, "RX PDU List");
8094                 gint pdu_end = tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc)) + ptvcursor_current_offset(ptvc);
8095
8096                 while (tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc)) > 0 &&
8097                            ptvcursor_current_offset(ptvc) < pdu_end )
8098                 {
8099                         guint16 tlv_id = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
8100                         //guint16 tlv_len = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc) + 2);
8101
8102                         if (tlv_id == 0x2038)
8103                         {
8104                                 if (i != 0)
8105                                         ptvcursor_pop_subtree(ptvc);
8106
8107                                 ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_rx_indication_pdu_list, "[%d]", i);
8108
8109                                 i++;
8110                         }
8111
8112                         char* tlv_name = "Unknown";
8113                         const tlv_t* tlv = look_up_tlv(tlv_id);
8114
8115                         if (tlv != NULL && tlv->name != NULL && tlv->tag_id == tlv_id)
8116                         {
8117                                 tlv_name = tlv->name;
8118                         }
8119
8120                         ptvcursor_add_text_with_subtree(ptvc, SUBTREE_UNDEFINED_LENGTH, ett_nfapi_rx_indication_pdu_list, "%s", tlv_name);
8121
8122                         dissect_tl_header(ptvc, pinfo);
8123
8124
8125                         if (tlv_id == 0x2038)
8126                         {
8127                                 dissect_rx_ue_info_value(ptvc, pinfo);
8128                         }
8129                         else if ((tlv_id == 0x2024) && (i > 0))
8130                         {
8131                                 guint16 val = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
8132                                 wmem_array_append_one(lengths, val);
8133                                 ptvcursor_add(ptvc, hf_nfapi_length, 2, ENC_BIG_ENDIAN);
8134                                 int data_offset = tvb_get_ntohs(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc));
8135                                 ptvcursor_add(ptvc, hf_nfapi_data_offset, 2, ENC_BIG_ENDIAN);
8136                                 ptvcursor_add(ptvc, hf_nfapi_ul_cqi, 1, ENC_BIG_ENDIAN);
8137                                 ptvcursor_add(ptvc, hf_nfapi_timing_advance, 2, ENC_BIG_ENDIAN);
8138
8139                                 if ((data_offset > 0) && (pdu_end == (tvb_reported_length_remaining(ptvcursor_tvbuff(ptvc), ptvcursor_current_offset(ptvc)) + ptvcursor_current_offset(ptvc))))
8140                                 {
8141                                         pdu_end = number_of_pdu_addr + data_offset;
8142                                 }
8143
8144                         }
8145                         else if (tlv_id == 0x2025)
8146                         {
8147                                 dissect_rx_indication_rel9_value(ptvc, pinfo);
8148                         }
8149
8150                         ptvcursor_pop_subtree(ptvc);
8151
8152                 }
8153
8154                 // pop the last pdu index.
8155                 ptvcursor_pop_subtree(ptvc);
8156
8157                 ptvcursor_pop_subtree(ptvc);
8158         }
8159
8160         for (i = 0; i < wmem_array_get_count(lengths); ++i)
8161         {
8162                 ptvcursor_add(ptvc, hf_nfapi_pdu, *((guint16 *)wmem_array_index(lengths, i)), ENC_NA);
8163         }
8164 }
8165
8166
8167 // ----------------------------------------------------------------------------|
8168
8169 static int dissect_p45_header(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
8170 {
8171         proto_tree* p45_tree;
8172
8173         p45_tree = proto_tree_add_subtree(tree, tvb, 0, 8, ett_nfapi_p4_p5_message_header, NULL, "P4 P5 Header");
8174
8175         proto_tree_add_item(p45_tree, hf_nfapi_p4_p5_message_header_phy_id, tvb, 0, 2, ENC_BIG_ENDIAN);
8176         proto_tree_add_item(p45_tree, hf_nfapi_p4_p5_message_header_message_id, tvb, 2, 2, ENC_BIG_ENDIAN);
8177         proto_tree_add_item(p45_tree, hf_nfapi_p4_p5_message_header_message_length, tvb, 4, 2, ENC_BIG_ENDIAN);
8178         proto_tree_add_item(p45_tree, hf_nfapi_p4_p5_message_header_spare, tvb, 6, 2, ENC_BIG_ENDIAN);
8179
8180         return 8;
8181 }
8182
8183 static int dissect_p45_header_with_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8184 {
8185         int offset = dissect_p45_header(tvb, pinfo, tree, data);
8186         ptvcursor_t *ptvc = ptvcursor_new(tree, tvb, offset);
8187
8188         dissect_tlv_list(ptvc, pinfo, tvb_reported_length(tvb));
8189         ptvcursor_free(ptvc);
8190         return tvb_captured_length(tvb);
8191 }
8192
8193 static int dissect_p45_header_with_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8194 {
8195         int offset = dissect_p45_header(tvb, pinfo, tree, data);
8196
8197         proto_tree_add_item(tree, hf_nfapi_error_code, tvb, offset, 4, ENC_BIG_ENDIAN);
8198
8199         return offset+4;
8200 }
8201
8202 static int dissect_p45_header_with_error_and_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8203 {
8204         int offset = dissect_p45_header(tvb, pinfo, tree, data);
8205         ptvcursor_t *ptvc;
8206
8207         proto_tree_add_item(tree, hf_nfapi_error_code, tvb, offset, 4, ENC_BIG_ENDIAN);
8208         offset += 4;
8209
8210         ptvc = ptvcursor_new(tree, tvb, offset);
8211         dissect_tlv_list(ptvc, pinfo, tvb_reported_length(tvb));
8212         ptvcursor_free(ptvc);
8213
8214         return tvb_captured_length(tvb);
8215 }
8216
8217 static int dissect_p45_header_with_p4_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8218 {
8219         int offset = dissect_p45_header(tvb, pinfo, tree, data);
8220
8221         proto_tree_add_item(tree, hf_nfapi_p4_error_code, tvb, offset, 4, ENC_BIG_ENDIAN);
8222
8223         return offset+4;
8224 }
8225
8226 static int dissect_p45_header_with_p4_error_and_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8227 {
8228         int offset = dissect_p45_header(tvb, pinfo, tree, data);
8229         ptvcursor_t *ptvc;
8230
8231         proto_tree_add_item(tree, hf_nfapi_p4_error_code, tvb, offset, 4, ENC_BIG_ENDIAN);
8232         offset += 4;
8233
8234         ptvc = ptvcursor_new(tree, tvb, offset);
8235         dissect_tlv_list(ptvc, pinfo, tvb_reported_length(tvb));
8236         ptvcursor_free(ptvc);
8237
8238         return tvb_captured_length(tvb);
8239 }
8240
8241 static int dissect_p45_header_with_rat_type_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8242 {
8243         int offset = dissect_p45_header(tvb, pinfo, tree, data);
8244         ptvcursor_t *ptvc;
8245
8246         proto_tree_add_item(tree, hf_nfapi_rat_type, tvb, offset, 1, ENC_BIG_ENDIAN);
8247         offset += 1;
8248
8249         ptvc = ptvcursor_new(tree, tvb, offset);
8250         dissect_tlv_list(ptvc, pinfo, tvb_reported_length(tvb));
8251         ptvcursor_free(ptvc);
8252
8253         return tvb_captured_length(tvb);
8254 }
8255
8256 static int dissect_p45_param_response_msg_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
8257 {
8258         int offset = dissect_p45_header(tvb, pinfo, tree, data);
8259         ptvcursor_t *ptvc;
8260
8261         proto_tree_add_item(tree, hf_nfapi_error_code, tvb, offset, 1, ENC_BIG_ENDIAN);
8262         offset += 1;
8263         proto_tree_add_item(tree, hf_nfapi_num_tlv, tvb, offset, 1, ENC_BIG_ENDIAN);
8264         offset += 1;
8265
8266         ptvc = ptvcursor_new(tree, tvb, offset);
8267         dissect_tlv_list(ptvc, pinfo, tvb_reported_length(tvb));
8268         ptvcursor_free(ptvc);
8269
8270         return tvb_captured_length(tvb);
8271 }
8272
8273 static int dissect_p7_header(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint8* m, guint8* seg, guint8* seq)
8274 {
8275         proto_tree *header_tree;
8276         int offset = 0;
8277         guint8 m_seg;
8278         static const int *fields[] = {
8279                 &hf_nfapi_p7_message_header_m,
8280                 &hf_nfapi_p7_message_header_segment,
8281                 NULL
8282         };
8283
8284         header_tree = proto_tree_add_subtree(tree, tvb, offset, 16, ett_nfapi_p7_message_header, NULL, "P7 Header");
8285         proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_phy_id, tvb, offset, 2, ENC_BIG_ENDIAN);
8286         offset += 2;
8287         proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_message_id, tvb, offset, 2, ENC_BIG_ENDIAN);
8288         offset += 2;
8289         proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_message_length, tvb, offset, 2, ENC_BIG_ENDIAN);
8290         offset += 2;
8291
8292         if ((m != NULL) && (seg != NULL))
8293         {
8294                 m_seg = tvb_get_guint8(tvb, offset);
8295                 *m = (m_seg & 0x80) >> 7;
8296                 *seg = m_seg & 0x7F;
8297         }
8298         proto_tree_add_bitmask_list(header_tree, tvb, offset, 1, fields, ENC_BIG_ENDIAN);
8299         offset += 1;
8300
8301         if (seq != NULL)
8302         {
8303                 *seq = tvb_get_guint8(tvb, offset);
8304         }
8305         proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_sequence_number, tvb, offset, 1, ENC_BIG_ENDIAN);
8306         offset += 1;
8307         proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_checksum, tvb, offset, 4, ENC_BIG_ENDIAN);
8308         offset += 4;
8309         proto_tree_add_item(header_tree, hf_nfapi_p7_message_header_transmit_timestamp, tvb, offset, 4, ENC_BIG_ENDIAN);
8310         offset += 4;
8311
8312         return offset;
8313 }
8314
8315 static int dissect_p7_dl_node_sync_msg_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8316 {
8317         int offset = dissect_p7_header(tvb, pinfo, tree, NULL, NULL, NULL);
8318
8319         proto_tree_add_item(tree, hf_nfapi_ul_node_sync_t1, tvb, offset, 4, ENC_BIG_ENDIAN);
8320         offset += 4;
8321         proto_tree_add_item(tree, hf_nfapi_ul_node_sync_t2, tvb, offset, 4, ENC_BIG_ENDIAN);
8322         offset += 4;
8323         proto_tree_add_item(tree, hf_nfapi_ul_node_sync_t3, tvb, offset, 4, ENC_BIG_ENDIAN);
8324         offset += 4;
8325
8326         return offset;
8327 }
8328
8329 static int dissect_p7_ul_node_sync_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
8333         proto_tree_add_item(tree, hf_nfapi_dl_node_sync_t1, tvb, offset, 4, ENC_BIG_ENDIAN);
8334         offset += 4;
8335         proto_tree_add_item(tree, hf_nfapi_dl_node_sync_delta_sfn_sf, tvb, offset, 4, ENC_BIG_ENDIAN);
8336         offset += 4;
8337
8338         return offset;
8339 }
8340
8341 static int dissect_p7_timing_info_msg_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8342 {
8343         int offset = dissect_p7_header(tvb, pinfo, tree, NULL, NULL, NULL);
8344         proto_tree_add_item(tree, hf_nfapi_timing_info_last_sfn_sf, tvb, offset, 4, ENC_BIG_ENDIAN);
8345         offset += 4;
8346         proto_tree_add_item(tree, hf_nfapi_timing_info_time_since_last_timing_info, tvb, offset, 4, ENC_BIG_ENDIAN);
8347         offset += 4;
8348         proto_tree_add_item(tree, hf_nfapi_timing_info_dl_config_jitter, tvb, offset, 4, ENC_BIG_ENDIAN);
8349         offset += 4;
8350         proto_tree_add_item(tree, hf_nfapi_timing_info_tx_request_jitter, tvb, offset, 4, ENC_BIG_ENDIAN);
8351         offset += 4;
8352         proto_tree_add_item(tree, hf_nfapi_timing_info_ul_config_jitter, tvb, offset, 4, ENC_BIG_ENDIAN);
8353         offset += 4;
8354         proto_tree_add_item(tree, hf_nfapi_timing_info_hi_dci0_jitter, tvb, offset, 4, ENC_BIG_ENDIAN);
8355         offset += 4;
8356         proto_tree_add_item(tree, hf_nfapi_timing_info_dl_config_latest_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
8357         offset += 4;
8358         proto_tree_add_item(tree, hf_nfapi_timing_info_tx_request_latest_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
8359         offset += 4;
8360         proto_tree_add_item(tree, hf_nfapi_timing_info_ul_config_latest_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
8361         offset += 4;
8362         proto_tree_add_item(tree, hf_nfapi_timing_info_hi_dci0_latest_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
8363         offset += 4;
8364         proto_tree_add_item(tree, hf_nfapi_timing_info_dl_config_earliest_arrival, tvb, offset, 4, ENC_BIG_ENDIAN);
8365         offset += 4;
8366         proto_tree_add_item(tree, hf_nfapi_timing_info_tx_request_earliest_arrival, tvb, offset, 4, ENC_BIG_ENDIAN);
8367         offset += 4;
8368         proto_tree_add_item(tree, hf_nfapi_timing_info_ul_config_earliest_arrival, tvb, offset, 4, ENC_BIG_ENDIAN);
8369         offset += 4;
8370         proto_tree_add_item(tree, hf_nfapi_timing_info_hi_dci0_earliest_arrival, tvb, offset, 4, ENC_BIG_ENDIAN);
8371         offset += 4;
8372
8373         return offset;
8374 }
8375
8376 static reassembly_table ul_p7_reassemble_table;
8377 static reassembly_table dl_p7_reassemble_table;
8378
8379 static int hf_msg_fragments = -1;
8380 static int hf_msg_fragment = -1;
8381 static int hf_msg_fragment_overlap = -1;
8382 static int hf_msg_fragment_overlap_conflicts = -1;
8383 static int hf_msg_fragment_multiple_tails = -1;
8384 static int hf_msg_fragment_too_long_fragment = -1;
8385 static int hf_msg_fragment_error = -1;
8386 static int hf_msg_fragment_count = -1;
8387 static int hf_msg_reassembled_in = -1;
8388 static int hf_msg_reassembled_length = -1;
8389 static gint ett_msg_fragment = -1;
8390 static gint ett_msg_fragments = -1;
8391
8392 static const fragment_items msg_frag_items = {
8393         /* Fragment subtrees */
8394         &ett_msg_fragment,
8395         &ett_msg_fragments,
8396         /* Fragment fields */
8397         &hf_msg_fragments,
8398         &hf_msg_fragment,
8399         &hf_msg_fragment_overlap,
8400         &hf_msg_fragment_overlap_conflicts,
8401         &hf_msg_fragment_multiple_tails,
8402         &hf_msg_fragment_too_long_fragment,
8403         &hf_msg_fragment_error,
8404         &hf_msg_fragment_count,
8405         /* Reassembled in field */
8406         &hf_msg_reassembled_in,
8407         /* Reassembled length field */
8408         &hf_msg_reassembled_length,
8409         NULL,
8410         /* Tag */
8411         "Message fragments"
8412 };
8413
8414 static int dissect_nfapi_ul_p7(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8415 {
8416         guint8 m, seg, seq;
8417         int offset;
8418
8419         guint8 save_fragmented;
8420
8421         guint16 msg_id = tvb_get_ntohs(tvb, 2);
8422         guint16 msg_len = tvb_get_ntohs(tvb, 4);
8423
8424         offset = dissect_p7_header(tvb, pinfo, tree, &m, &seg, &seq);
8425         save_fragmented = pinfo->fragmented;
8426
8427         if (m == 1 || (m == 0 && seg > 0))
8428         {
8429                 fragment_head *fd_head;
8430                 tvbuff_t *save_tvb = tvb;
8431
8432                 if (offset >= msg_len) {
8433                         return tvb_captured_length(tvb);
8434                 }
8435
8436                 pinfo->fragmented = TRUE;
8437
8438                 fd_head = fragment_add_seq_check(&ul_p7_reassemble_table, tvb, offset, pinfo, seq, NULL, seg, msg_len - offset, (m == 1));
8439
8440                 if (fd_head == NULL)
8441                 {
8442                         return tvb_captured_length(tvb);
8443                 }
8444
8445                 tvb = process_reassembled_data(tvb, offset, pinfo, "Reassembled UL P7", fd_head, &msg_frag_items, NULL, tree);
8446                 if (tvb)
8447                 {
8448                         offset = 0;
8449                         col_append_fstr(pinfo->cinfo, COL_INFO, "[NFAPI P7 Reassembled %d]", seg);
8450                 }
8451                 else
8452                 {
8453                         col_append_fstr(pinfo->cinfo, COL_INFO, "[NFAPI P7 Segment %d]", seg);
8454                         return tvb_captured_length(save_tvb);
8455                 }
8456         }
8457
8458         pinfo->fragmented = save_fragmented;
8459
8460         switch (msg_id)
8461         {
8462                 case NFAPI_HARQ_INDICATION_MSG_ID:
8463                 case NFAPI_CRC_INDICATION_MSG_ID:
8464                 case NFAPI_RX_ULSCH_INDICATION_MSG_ID:
8465                 case NFAPI_RACH_INDICATION_MSG_ID:
8466                 case NFAPI_SRS_INDICATION_MSG_ID:
8467                 case NFAPI_RX_SR_INDICATION_MSG_ID:
8468                 case NFAPI_RX_CQI_INDICATION_MSG_ID:
8469                 {
8470                         ptvcursor_t *ptvc = ptvcursor_new(tree, tvb, offset);
8471                         ptvcursor_add(ptvc, hf_nfapi_sfn_sf, 2, ENC_BIG_ENDIAN);
8472                         dissect_tlv_list(ptvc, pinfo, msg_len);
8473                         ptvcursor_free(ptvc);
8474                 }
8475                 break;
8476
8477         };
8478
8479
8480         return tvb_captured_length(tvb);
8481 }
8482
8483 static int dissect_nfapi_dl_p7(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8484 {
8485         guint8 m, seg, seq;
8486         int offset;
8487
8488         guint8 save_fragmented;
8489
8490         guint16 msg_id = tvb_get_ntohs(tvb, 2);
8491         guint16 msg_len = tvb_get_ntohs(tvb, 4);
8492
8493         offset = dissect_p7_header(tvb, pinfo, tree, &m, &seg, &seq);
8494         save_fragmented = pinfo->fragmented;
8495
8496         if (m == 1 || (m == 0 && seg > 0))
8497         {
8498                 fragment_head *fd_head;
8499                 tvbuff_t *save_tvb = tvb;
8500
8501                 if (offset >= msg_len) {
8502                         return tvb_captured_length(tvb);
8503                 }
8504
8505                 pinfo->fragmented = TRUE;
8506
8507                 fd_head = fragment_add_seq_check(&dl_p7_reassemble_table, tvb, offset, pinfo, seq, NULL, seg, msg_len - offset, (m == 1));
8508
8509                 if (fd_head == NULL)
8510                 {
8511                         return tvb_captured_length(tvb);
8512                 }
8513
8514                 tvb = process_reassembled_data(tvb, offset, pinfo, "Reassembled DL P7", fd_head, &msg_frag_items, NULL, tree);
8515                 if (tvb)
8516                 {
8517                         offset = 0;
8518                         col_append_fstr(pinfo->cinfo, COL_INFO, "[NFAPI P7 Reassembled %d]", seg);
8519                 }
8520                 else
8521                 {
8522                         col_append_fstr(pinfo->cinfo, COL_INFO, "[NFAPI P7 Segment %d]", seg);
8523                         return tvb_captured_length(save_tvb);
8524                 }
8525         }
8526
8527         pinfo->fragmented = save_fragmented;
8528
8529         switch (msg_id)
8530         {
8531                 case NFAPI_DL_CONFIG_REQUEST_MSG_ID:
8532                 case NFAPI_UL_CONFIG_REQUEST_MSG_ID:
8533                 case NFAPI_HI_DCI0_REQUEST_MSG_ID:
8534                 case NFAPI_TX_REQUEST_MSG_ID:
8535                 case NFAPI_LBT_DL_CONFIG_REQUEST_MSG_ID:
8536                 case NFAPI_LBT_DL_INDICATION_MSG_ID:
8537                 {
8538                         ptvcursor_t *ptvc = ptvcursor_new(tree, tvb, offset);
8539                         ptvcursor_add(ptvc, hf_nfapi_sfn_sf, 2, ENC_BIG_ENDIAN);
8540                         dissect_tlv_list(ptvc, pinfo, msg_len);
8541                         ptvcursor_free(ptvc);
8542                         break;
8543                 }
8544         }
8545
8546         return tvb_captured_length(tvb);
8547 }
8548
8549
8550 static int dissect_nfapi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8551 {
8552         proto_tree* nfapi_tree;
8553         proto_item* nfapi_item;
8554         guint16 msg_id;
8555         const gchar* message_str;
8556
8557         if (tvb_reported_length(tvb) < 4)
8558                 return 0;
8559
8560         col_set_str(pinfo->cinfo, COL_PROTOCOL, "NFAPI");
8561         col_clear(pinfo->cinfo, COL_INFO);
8562
8563         nfapi_item = proto_tree_add_item(tree, proto_nfapi, tvb, 0, -1, ENC_NA);
8564         nfapi_tree = proto_item_add_subtree(nfapi_item, ett_nfapi);
8565
8566         msg_id = tvb_get_ntohs(tvb, 2);
8567         message_str = val_to_str_const(msg_id, message_id_vals, "Unknown");
8568
8569         // Flag if this is a vendor extention message, could do it for P4, 5, 7
8570         if (msg_id >= 0x0300 && msg_id <= 0x03FF)
8571         {
8572                 col_append_fstr(pinfo->cinfo, COL_INFO, "Vendor Extension");
8573                 proto_item_append_text(nfapi_item, ", Vendor Extension");
8574         }
8575         else
8576         {
8577                 proto_item_append_text(nfapi_item, ", %s", message_str);
8578                 col_append_fstr(pinfo->cinfo, COL_INFO, " %s ", message_str);
8579         }
8580
8581         if (!dissector_try_uint_new(message_table, msg_id, tvb, pinfo, nfapi_tree, FALSE, NULL))
8582         {
8583                 call_data_dissector(tvb, pinfo, nfapi_tree);
8584         }
8585
8586         return tvb_captured_length(tvb);
8587 }
8588
8589 static void nfapi_tag_vals_fn(gchar* s, guint32 v)
8590 {
8591         const tlv_t* tlv = look_up_tlv(v);
8592         if (tlv != 0)
8593         {
8594                 g_snprintf(s, ITEM_LABEL_LENGTH, "%s (0x%x)", tlv->name, v);
8595         }
8596         else
8597         {
8598                 g_snprintf(s, ITEM_LABEL_LENGTH, "%s (0x%x)", "Unknown", v);
8599         }
8600 }
8601 static void neg_pow_conversion_fn(gchar* s, guint8 v)
8602 {
8603         g_snprintf(s, ITEM_LABEL_LENGTH, "%d dB (%d)", ((gint16)v * (-1)), v);
8604 }
8605 static void power_offset_conversion_fn(gchar* s, guint16 v)
8606 {
8607         g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (((float)v * 0.001) - 6.0), v);
8608 }
8609 static void reference_signal_power_conversion_fn(gchar* s, guint16 v)
8610 {
8611         g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (((float)v * 0.25) - 63.75), v);
8612 }
8613 static void laa_threshold_conversion_fn(gchar* s, guint16 v)
8614 {
8615         g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (float)(v * -100.00), v);
8616 }
8617 static void max_transmit_power_2_conversion_fn(gchar* s, guint16 v)
8618 {
8619         g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1) - 10.0, v);
8620 }
8621 static void max_transmit_power_conversion_fn(gchar* s, guint16 v)
8622 {
8623         g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1), v);
8624 }
8625 static void sfn_sf_conversion_fn(gchar* s, guint16 v)
8626 {
8627         g_snprintf(s, ITEM_LABEL_LENGTH, "%d/%d (%d)", v >> 0x4, v & 0x000F, v);
8628 }
8629 static void rssi_conversion_fn(gchar* s, guint16 v)
8630 {
8631         g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1), v);
8632 }
8633 static void dl_rs_tx_pow_measment_conversion_fn(gchar* s, guint16 v)
8634 {
8635         g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1), v);
8636 }
8637
8638 static void ul_cqi_conversion_fn(gchar* s, guint16 v)
8639 {
8640         g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (((float)v / 2 ) - 64.0), v);
8641 }
8642
8643 // ----------------------------------------------------------------------------|
8644
8645 void proto_register_nfapi(void)
8646 {
8647         static hf_register_info hf[] =
8648         {
8649                 { &hf_msg_fragments,
8650                         { "Message fragments", "nfapi.fragments",
8651                         FT_NONE, BASE_NONE, NULL, 0x00,
8652                         NULL, HFILL }
8653                 },
8654                 { &hf_msg_fragment,
8655                         { "Message fragment", "nfapi.fragment",
8656                         FT_FRAMENUM, BASE_NONE, NULL, 0x00,
8657                         NULL, HFILL }
8658                 },
8659                 { &hf_msg_fragment_overlap,
8660                         { "Message fragment overlap", "nfapi.fragment.overlap",
8661                         FT_BOOLEAN, 0, NULL, 0x00,
8662                         NULL, HFILL }
8663                 },
8664                 { &hf_msg_fragment_overlap_conflicts,
8665                         { "Message fragment overlapping with conflicting data", "nfapi.fragment.overlap.conflicts",
8666                         FT_BOOLEAN, 0, NULL, 0x00,
8667                         NULL, HFILL }
8668                 },
8669                 { &hf_msg_fragment_multiple_tails,
8670                         { "Message has multiple tail fragments", "nfapi.fragment.multiple_tails",
8671                         FT_BOOLEAN, 0, NULL, 0x00,
8672                         NULL, HFILL }
8673                 },
8674                 { &hf_msg_fragment_too_long_fragment,
8675                         { "Message fragment too long", "nfapi.fragment.too_long_fragment",
8676                         FT_BOOLEAN, 0, NULL, 0x00,
8677                         NULL, HFILL }
8678                 },
8679                 { &hf_msg_fragment_error,
8680                         { "Message defragmentation error", "nfapi.fragment.error",
8681                         FT_FRAMENUM, BASE_NONE, NULL, 0x00,
8682                         NULL, HFILL }
8683                 },
8684                 { &hf_msg_fragment_count,
8685                         { "Message fragment count", "nfapi.fragment.count",
8686                         FT_UINT32, BASE_DEC, NULL, 0x00,
8687                         NULL, HFILL }
8688                 },
8689                 { &hf_msg_reassembled_in,
8690                         { "Reassembled in", "nfapi.reassembled.in",
8691                         FT_FRAMENUM, BASE_NONE, NULL, 0x00,
8692                         NULL, HFILL }
8693                 },
8694                 { &hf_msg_reassembled_length,
8695                         { "Reassembled length", "nfapi.reassembled.length",
8696                         FT_UINT32, BASE_DEC, NULL, 0x00,
8697                         NULL, HFILL }
8698                 },
8699                 { &hf_nfapi_p4_p5_message_header_phy_id,
8700                         { "PHY ID", "nfapi.p4_p5_message_header.phy_id",
8701                         FT_UINT16, BASE_DEC, NULL, 0x0,
8702                         "Within the PNF Device, the unique identity of the PHY instance as assigned through the PNF_CONFIG.request", HFILL }
8703                 },
8704                 { &hf_nfapi_p4_p5_message_header_message_id,
8705                         { "Message ID", "nfapi.p4_p5_message_header.message_id",
8706                         FT_UINT16, BASE_HEX_DEC, VALS(message_id_vals), 0x0,
8707                         "The nFAPI message identity", HFILL }
8708                 },
8709                 { &hf_nfapi_p4_p5_message_header_message_length,
8710                         { "Message Length", "nfapi.p4_p5_message_header.message_length",
8711                         FT_UINT16, BASE_DEC, NULL, 0x0,
8712                         "The length in bytes of the message including the header", HFILL }
8713                 },
8714                 { &hf_nfapi_p4_p5_message_header_spare,
8715                         { "Spare", "nfapi.p4_p5_message_header.spare",
8716                         FT_UINT16, BASE_DEC, NULL, 0x0,
8717                         "Reserved field to be populated with zeros on transmission and ignored on reception", HFILL }
8718                 },
8719                 { &hf_nfapi_p7_message_header_phy_id,
8720                         { "Phy ID", "nfapi.p7_message_header.phy_id",
8721                         FT_UINT16, BASE_DEC, NULL, 0x0,
8722                         "Within the PNF Device, the unique identity of the PHY instance as assigned through the PNF_CONFIG.request", HFILL }
8723                 },
8724                 { &hf_nfapi_p7_message_header_message_id,
8725                         { "Message ID", "nfapi.p7.message_header.message_id",
8726                         FT_UINT16, BASE_HEX_DEC, VALS(message_id_vals), 0x0,
8727                         "The nFAPI message identity", HFILL }
8728                 },
8729                 { &hf_nfapi_p7_message_header_message_length,
8730                         { "Message Length", "nfapi.p7_message_header.message_length",
8731                         FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &units_byte_bytes, 0x0,
8732                         "The length in bytes of the message segment including the header", HFILL }
8733                 },
8734                 { &hf_nfapi_p7_message_header_m,
8735                         { "More segments", "nfapi.p7_message_header.m_segment_sequence",
8736                         FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80,
8737                         "A More flag indicating there are more segments to follow to complete the entire message", HFILL }
8738                 },
8739                 { &hf_nfapi_p7_message_header_segment,
8740                         { "Segment Number", "nfapi.p7_message_header.m_segment_sequence",
8741                         FT_UINT8, BASE_DEC, NULL, 0x7F,
8742                         "The segment number starting at zero and incrementing by one between each segment", HFILL }
8743                 },
8744                 { &hf_nfapi_p7_message_header_sequence_number,
8745                         { "Sequence Number", "nfapi.p7_message_header.m_segment_sequence",
8746                         FT_UINT8, BASE_DEC, NULL, 0x0,
8747                         "The incrementing sequence number for all complete messages over the P7 nFAPI interface per PHY instance", HFILL }
8748                 },
8749                 { &hf_nfapi_p7_message_header_checksum,
8750                         { "Checksum", "nfapi.p7_message_header.checksum",
8751                         FT_UINT32, BASE_HEX_DEC, NULL, 0x0,
8752                         "The checksum of the whole message segment (including header) as calculated using "
8753                         "the CRC32c algorithm following the same method as the SCTP protocol defined in IETF RFC 4960 "
8754                         "The Checksum is optional to populate and must be filled with zero's when not used", HFILL }
8755                 },
8756                 { &hf_nfapi_p7_message_header_transmit_timestamp,
8757                         { "Transmit Timestamp", "nfapi.p7_message_header.timestamp",
8758                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
8759                         "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 }
8760                 },
8761                 { &hf_nfapi_tl_tag,
8762                         { "TLV Tag", "nfapi.tl_tag",
8763                         FT_UINT16, BASE_CUSTOM, CF_FUNC(nfapi_tag_vals_fn), 0x0,
8764                         NULL, HFILL }
8765                 },
8766                 { &hf_nfapi_tl_length,
8767                         { "TLV Length", "nfapi.tl_length",
8768                         FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &units_byte_bytes, 0x0,
8769                         NULL, HFILL }
8770                 },
8771                 { &hf_nfapi_error_code,
8772                         { "Error Code", "nfapi.error.code",
8773                         FT_UINT8, BASE_DEC, VALS(nfapi_error_vals), 0x0,
8774                         NULL, HFILL }
8775                 },
8776                 { &hf_nfapi_p4_error_code,
8777                         { "Error Code", "nfapi.p4_error.code",
8778                         FT_UINT8, BASE_DEC, VALS(nfapi_p4_error_vals), 0x0,
8779                         NULL, HFILL }
8780                 },
8781                 { &hf_nfapi_rat_type,
8782                         { "RAT Type", "nfapi.rat_type",
8783                         FT_UINT8, BASE_DEC, VALS(nfapi_rat_type_vals), 0x0,
8784                         NULL, HFILL }
8785                 },
8786                 { &hf_nfapi_num_tlv,
8787                         { "Number of TLV", "nfapi.param.response.num_tlv",
8788                         FT_UINT8, BASE_DEC, NULL, 0x0,
8789                         NULL, HFILL }
8790                 },
8791                 { &hf_nfapi_phy_state,
8792                         { "Phy state value", "nfapi.phy.state",
8793                         FT_UINT16, BASE_DEC, VALS(nfapi_phy_state_vals), 0x0,
8794                         "Indicates the current operational state of the PHY", HFILL }
8795                 },
8796                 { &hf_nfapi_dl_ue_per_sf,
8797                         { "Downlink UEs per Subframe", "nfapi.dl.ue.per.sf",
8798                         FT_UINT8, BASE_DEC, NULL, 0x0,
8799                         "The maximum number of downlink UEs per subframe supported."
8800                         "This is the maximum number of downlink UEs that can be scheduled per "
8801                         "subframe, non-inclusive of broadcast, paging and common channels.", HFILL }
8802                 },
8803                 { &hf_nfapi_ul_ue_per_sf,
8804                         { "Uplink UEs per Subframe", "nfapi.ul.ue.per.sf",
8805                         FT_UINT8, BASE_DEC, NULL, 0x0,
8806                         "The maximum number of uplink UEs per subframe supported."
8807                         "This is the maximum number of uplink UEs that can be scheduled per "
8808                         "subframe, non-inclusive of common channels.", HFILL }
8809                 },
8810                 { &hf_nfapi_duplex_mode,
8811                         { "Duplex Mode", "nfapi.duplex.mode",
8812                         FT_UINT16, BASE_DEC, VALS(nfapi_duplex_mode_vals), 0x0,
8813                         NULL, HFILL }
8814                 },
8815                 { &hf_nfapi_dl_bandwidth_support,
8816                         { "Downlink bandwidth support", "nfapi.dl.bandwidth.support",
8817                         FT_UINT16, BASE_HEX, NULL, 0x0,
8818                         "The PHY downlink channel bandwidth capability (in resource blocks)", HFILL }
8819                 },
8820                 { &hf_nfapi_dl_bandwidth_support_6,
8821                         { "6Mhz", "nfapi.dl.bandwidth.support.6",
8822                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0001,
8823                         NULL, HFILL }
8824                 },
8825                 { &hf_nfapi_dl_bandwidth_support_15,
8826                         { "15Mhz", "nfapi.dl.bandwidth.support.15",
8827                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0002,
8828                         NULL, HFILL }
8829                 },
8830                 { &hf_nfapi_dl_bandwidth_support_25,
8831                         { "25Mhz", "nfapi.dl.bandwidth.support.25",
8832                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0004,
8833                         NULL, HFILL }
8834                 },
8835                 { &hf_nfapi_dl_bandwidth_support_50,
8836                         { "50Mhz", "nfapi.dl.bandwidth.support.50",
8837                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0008,
8838                         NULL, HFILL }
8839                 },
8840                 { &hf_nfapi_dl_bandwidth_support_75,
8841                         { "75Mhz", "nfapi.dl.bandwidth.support.75",
8842                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0010,
8843                         NULL, HFILL }
8844                 },
8845                 { &hf_nfapi_dl_bandwidth_support_100,
8846                         { "100Mhz", "nfapi.dl.bandwidth.support.100",
8847                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0020,
8848                         NULL, HFILL }
8849                 },
8850                 { &hf_nfapi_ul_bandwidth_support,
8851                         { "Uplink bandwidth support", "nfapi.ul.bandwidth.support",
8852                         FT_UINT16, BASE_HEX, NULL, 0x0,
8853                         "The PHY uplink channel bandwidth capability (in resource blocks)", HFILL }
8854                 },
8855                 { &hf_nfapi_ul_bandwidth_support_6,
8856                         { "6Mhz", "nfapi.ul.bandwidth.support.6",
8857                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0001,
8858                         NULL, HFILL }
8859                 },
8860                 { &hf_nfapi_ul_bandwidth_support_15,
8861                         { "15Mhz", "nfapi.ul.bandwidth.support.15",
8862                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0002,
8863                         NULL, HFILL }
8864                 },
8865                 { &hf_nfapi_ul_bandwidth_support_25,
8866                         { "25Mhz", "nfapi.ul.bandwidth.support.25",
8867                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0004,
8868                         NULL, HFILL }
8869                 },
8870                 { &hf_nfapi_ul_bandwidth_support_50,
8871                         { "50Mhz", "nfapi.ul.bandwidth.support.50",
8872                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0008,
8873                         NULL, HFILL }
8874                 },
8875                 { &hf_nfapi_ul_bandwidth_support_75,
8876                         { "75Mhz", "nfapi.ul.bandwidth.support.75",
8877                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0010,
8878                         NULL, HFILL }
8879                 },
8880                 { &hf_nfapi_ul_bandwidth_support_100,
8881                         { "100Mhz", "nfapi.ul.bandwidth.support.100",
8882                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0020,
8883                         NULL, HFILL }
8884                 },
8885                 { &hf_nfapi_dl_modulation_support,
8886                         { "Downlink modulation support", "nfapi.dl.modulation.support",
8887                         FT_UINT16, BASE_HEX, NULL, 0x0,
8888                         "The PHY downlink modulation capability", HFILL }
8889                 },
8890                 { &hf_nfapi_dl_modulation_support_qpsk,
8891                         { "QPSK", "nfapi.dl.modulation.support.qpsk",
8892                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0001,
8893                         NULL, HFILL }
8894                 },
8895                 { &hf_nfapi_dl_modulation_support_16qam,
8896                         { "16QAM", "nfapi.dl.modulation.support.16qam",
8897                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0002,
8898                         NULL, HFILL }
8899                 },
8900                 { &hf_nfapi_dl_modulation_support_64qam,
8901                         { "64QAM", "nfapi.dl.modulation.support.64qam",
8902                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0004,
8903                         NULL, HFILL }
8904                 },
8905                 { &hf_nfapi_dl_modulation_support_256qam,
8906                         { "256QAM", "nfapi.dl.modulation.support.256qam",
8907                         FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0008,
8908                         NULL, HFILL }
8909                 },
8910                 { &hf_nfapi_ul_modulation_support,
8911                         { "Uplink modulation support", "nfapi.ul.modulation.support",
8912                         FT_UINT16, BASE_HEX, NULL, 0x0,
8913                         "The PHY uplink modulation capability", HFILL }
8914                 },
8915                 { &hf_nfapi_ul_modulation_support_qpsk,
8916                         { "QPSK", "nfapi.ul.modulation.support.qpsk",
8917                         FT_BOOLEAN, 16, NULL, 0x0001,
8918                         NULL, HFILL }
8919                 },
8920                 { &hf_nfapi_ul_modulation_support_16qam,
8921                         { "16QAM", "nfapi.ul.modulation.support.16qam",
8922                         FT_BOOLEAN, 16, NULL, 0x0002,
8923                         NULL, HFILL }
8924                 },
8925                 { &hf_nfapi_ul_modulation_support_64qam,
8926                         { "64QAM", "nfapi.ul.modulation.support.64qam",
8927                         FT_BOOLEAN, 16, NULL, 0x0004,
8928                         NULL, HFILL }
8929                 },
8930                 { &hf_nfapi_phy_antenna_capability,
8931                         { "Phy Antenna capability", "nfapi.phy.antenna.capability",
8932                         FT_UINT16, BASE_DEC, NULL, 0x0,
8933                         "Number of antennas supported", HFILL }
8934                 },
8935                 { &hf_nfapi_release_capability,
8936                         { "Release capability", "nfapi.release.capability",
8937                         FT_UINT16, BASE_DEC, NULL, 0x0,
8938                         "Indicates which release the PHY supports", HFILL }
8939                 },
8940                 { &hf_nfapi_mbsfn_capability,
8941                         { "MBSFN capability", "nfapi.mbsfn.capability",
8942                         FT_BOOLEAN, 16, TFS(&support_strname), 0x0,
8943                         "Indicates support for MBSFN features", HFILL }
8944                 },
8945                 { &hf_nfapi_laa_capability,
8946                         { "LAA Support", "nfapi.laa.support",
8947                         FT_BOOLEAN, 16, TFS(&support_strname), 0x0,
8948                         "Indicates support for LAA features", HFILL }
8949                 },
8950                 { &hf_nfapi_pd_sensing_lbt_support,
8951                         { "PD sensing LBT support", "nfapi.pd.sensing.lbt.support",
8952                         FT_BOOLEAN, 16, TFS(&support_strname), 0x0,
8953                         "Indicates support for PD sensing in L1", HFILL }
8954                 },
8955                 { &hf_nfapi_multi_carrier_lbt_support,
8956                         { "Multi carrier LBT support", "nfapi.multi.carrier.lbt.support",
8957                         FT_UINT16, BASE_DEC, VALS(nfapi_mutli_carrier_lbt_support_vals), 0x0,
8958                         NULL, HFILL }
8959                 },
8960                 { &hf_nfapi_partial_sf_support,
8961                         { "Partial SF support", "nfapi.partial.sf.support",
8962                         FT_BOOLEAN, 8, TFS(&partial_sf_support_strname), 0x0,
8963                         "Indicates support for Partial SF in L1", HFILL }
8964                 },
8965                 { &hf_nfapi_reference_signal_power,
8966                         { "Reference signal power", "nfapi.ref_sig_power",
8967                         FT_UINT16, BASE_CUSTOM, CF_FUNC(reference_signal_power_conversion_fn), 0x0,
8968                         "Normalized value levels (relative) to accommodate different absolute Tx Power used by eNb", HFILL }
8969                 },
8970                 { &hf_nfapi_primary_synchronization_signal_epre_eprers,
8971                         { "Primary synchronization signal EPRE/EPRERS", "nfapi.primary.sync.signal",
8972                         FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
8973                         "The power of synchronization signal with respect to the reference signal, (PSS for LTE cell, NPSS for NB-IOT cell)", HFILL }
8974                 },
8975                 { &hf_nfapi_secondary_synchronization_signal_epre_eprers,
8976                         { "Secondary synchronization signal EPRE/EPRERS", "nfapi.secondary.sync.signal",
8977                         FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
8978                         "The power of synchronization signal with respect to the reference signal, (SSS for LTE cell, NSSS for NB-IOT cell)", HFILL }
8979                 },
8980                 { &hf_nfapi_physical_cell_id,
8981                         { "Physical Cell ID", "nfapi.physical.cell.id",
8982                         FT_UINT16, BASE_DEC, NULL, 0x0,
8983                         "The Cell ID sent with the synchronization signal", HFILL }
8984                 },
8985                 { &hf_nfapi_phich_resource,
8986                         { "PHICH Resource", "nfapi.phich.resource",
8987                         FT_UINT16, BASE_DEC, VALS(nfapi_phich_resource_vals), 0x0,
8988                         "The number of resource element groups used for PHICH", HFILL }
8989                 },
8990                 { &hf_nfapi_phich_duration,
8991                         { "PHICH Duration", "nfapi.phich.duration",
8992                         FT_BOOLEAN, 8, TFS(&phich_duration_strname), 0x0,
8993                         "The PHICH duration for MBSFN and non-MBSFN sub-frames", HFILL }
8994                 },
8995                 { &hf_nfapi_phich_power_offset,
8996                         { "PHICH Power Offset", "nfapi.phich.power.offset",
8997                         FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
8998                         "The power per antenna of the PHICH with respect to the reference signal", HFILL }
8999                 },
9000                 { &hf_nfapi_configuration_index,
9001                         { "Configuration Index", "nfapi.configuration.index",
9002                         FT_UINT16, BASE_DEC, NULL, 0x0,
9003                         "Provides information about the location and format of the PRACH.", HFILL }
9004                 },
9005                 { &hf_nfapi_root_sequence_index,
9006                         { "Root sequence Index", "nfapi.root.sequence.index",
9007                         FT_UINT16, BASE_DEC, NULL, 0x0,
9008                         "PRACH Root sequence index", HFILL }
9009                 },
9010                 { &hf_nfapi_zero_correlation_zone_configuration,
9011                         { "Zero correlation zone configuration", "nfapi.zero.correlation.zone.configuration",
9012                         FT_UINT16, BASE_DEC, NULL, 0x0,
9013                         "Equivalent to Ncs", HFILL }
9014                 },
9015                 { &hf_nfapi_high_speed_flag,
9016                         { "High Speed Flag", "nfapi.high.speed.flag",
9017                         FT_BOOLEAN, 8, TFS(&high_speed_flag_strname), 0x0,
9018                         "Indicates if unrestricted, or restricted, set of preambles is used", HFILL }
9019                 },
9020                 { &hf_nfapi_frequency_offset,
9021                         { "Frequency offset", "nfapi.frequency.offset",
9022                         FT_UINT16, BASE_DEC, NULL, 0x0,
9023                         "The first physical resource block available for PRACH", HFILL }
9024                 },
9025                 { &hf_nfapi_hopping_mode,
9026                         { "Hopping Mode", "nfapi.hopping.mode",
9027                         FT_BOOLEAN, 8, TFS(&hopping_mode_strname), 0x0,
9028                         "If hopping is enabled indicates the type of hopping used", HFILL }
9029                 },
9030                 { &hf_nfapi_hopping_offset,
9031                         { "Hopping offset", "nfapi.hopping.offset",
9032                         FT_UINT16, BASE_DEC, NULL, 0x0,
9033                         "The offset used if hopping is enabled", HFILL }
9034                 },
9035                 { &hf_nfapi_delta_pucch_shift,
9036                         { "Delta PUCCH Shift", "nfapi.delta.pucch.shift",
9037                         FT_UINT16, BASE_DEC, NULL, 0x0,
9038                         "The cyclic shift difference", HFILL }
9039                 },
9040                 { &hf_nfapi_n_cqi_rb,
9041                         { "N CQI RB", "nfapi.n.cqi.rb",
9042                         FT_UINT16, BASE_DEC, NULL, 0x0,
9043                         "The bandwidth, in units of resource blocks, that is available for use by PUCCH formats 2/2a/2b transmission in each slot", HFILL }
9044                 },
9045                 { &hf_nfapi_n_an_cs,
9046                         { "N AN CS", "nfapi.n.an.cs",
9047                         FT_UINT16, BASE_DEC, NULL, 0x0,
9048                         "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 }
9049                 },
9050                 { &hf_nfapi_n1_pucch_an,
9051                         { "N1 PUCCH AN", "nfapi.n1.pucch.an",
9052                         FT_UINT16, BASE_DEC, NULL, 0x0,
9053                         "N1 PUCCH", HFILL }
9054                 },
9055                 { &hf_nfapi_bandwidth_configuration,
9056                         { "Bandwidth configuration", "nfapi.bw.configuration",
9057                         FT_UINT16, BASE_DEC, NULL, 0x0,
9058                         "The available SRS bandwidth of the cell", HFILL }
9059                 },
9060                 { &hf_nfapi_srs_subframe_configuration,
9061                         { "SRS subframe configuration", "nfapi.srs.subframe.configuration",
9062                         FT_UINT16, BASE_DEC, NULL, 0x0,
9063                         "The subframe configuration. Needed if semi-static configuration is held in PHY", HFILL }
9064                 },
9065                 { &hf_nfapi_uplink_rs_hopping,
9066                         { "Uplink RS hopping", "nfapi.uplink.rs.hopping",
9067                         FT_UINT16, BASE_DEC, VALS(nfapi_uplink_rs_hopping_vals), 0x0,
9068                         "Indicates the type of hopping to use", HFILL }
9069                 },
9070                 { &hf_nfapi_group_assignment,
9071                         { "Group assignment", "nfapi.group.assignment",
9072                         FT_UINT16, BASE_DEC, NULL, 0x0,
9073                         "The sequence shift pattern used if group hopping is enabled", HFILL }
9074                 },
9075                 { &hf_nfapi_cyclic_shift_1_for_drms,
9076                         { "Cyclic Shift 1 for DRMS", "nfapi.cyclic.shift.1.for.drms",
9077                         FT_UINT16, BASE_DEC, NULL, 0x0,
9078                         "Specifies the cyclic shift for the reference signal used in the cell.", HFILL }
9079                 },
9080                 { &hf_nfapi_subframe_assignment,
9081                         { "Subframe_assignment", "nfapi.subframe.assignment",
9082                         FT_UINT16, BASE_DEC, NULL, 0x0,
9083                         "For TDD mode only, indicates the DL/UL subframe structure", HFILL }
9084                 },
9085                 { &hf_nfapi_special_subframe_patterns,
9086                         { "Special Subframe patterns", "nfapi.special.subframe.patterns",
9087                         FT_UINT16, BASE_DEC, NULL, 0x0,
9088                         "For TDD mode only. Length of fields DwPTS, GP and UpPTS", HFILL }
9089                 },
9090                 { &hf_nfapi_ed_threshold_for_lbt_for_pdsch,
9091                         { "ED Threshold for LBT for PDSCH", "nfapi.ed.threshold.for.lbt.pdsch",
9092                         FT_UINT16, BASE_CUSTOM, CF_FUNC(laa_threshold_conversion_fn), 0x0,
9093                         "Indicates the energy detection threshold in dBm for LBT for PDSCH", HFILL }
9094                 },
9095                 { &hf_nfapi_ed_threshold_for_lbt_for_drs,
9096                         { "ED Threshold for LBT for DRS", "nfapi.ed.threshold.for.lbt.for.drs",
9097                         FT_UINT16, BASE_CUSTOM, CF_FUNC(laa_threshold_conversion_fn), 0x0,
9098                         "Indicates the energy detection threshold in dBm for LBT for DRS", HFILL }
9099                 },
9100                 { &hf_nfapi_pd_threshold,
9101                         { "PD Threshold", "nfapi.pd.threshold",
9102                         FT_UINT16, BASE_CUSTOM, CF_FUNC(laa_threshold_conversion_fn), 0x0,
9103                         "Indicates the preamble detection threshold in dBm, if the L1 capabilities support PD", HFILL }
9104                 },
9105                 { &hf_nfapi_multi_carrier_type,
9106                         { "Multi carrier type", "nfapi.multi.carrier.type",
9107                         FT_UINT16, BASE_DEC, VALS(nfapi_laa_carrier_type_vals), 0x0,
9108                         "Indicates multi carrier type configuration of L1 (according to L1 capabilities and L2 scheduler requirements", HFILL }
9109                 },
9110                 { &hf_nfapi_multi_carrier_tx,
9111                         { "Multi carrier TX", "nfapi.multi.carrier.tx",
9112                         FT_BOOLEAN, 8, TFS(&nfapi_multi_carrier_tx_strname), 0x0,
9113                         "Indicates multi carrier transmission configuration of L1 (according to type if supporting multi carrier)", HFILL }
9114                 },
9115                 { &hf_nfapi_multi_carrier_freeze,
9116                         { "Multi carrier freeze", "nfapi.multi.carrier.freeze",
9117                         FT_BOOLEAN, 8, TFS(&nfapi_multi_carrier_freeze_strname), 0x0,
9118                         "Indicates multi carrier freeze, configuration of L1 (applicable only to type A type if supporting multi carrier)", HFILL }
9119                 },
9120                 { &hf_nfapi_tx_antenna_ports_for_drs,
9121                         { "Tx antenna ports for DRS", "nfapi.tx.antenna.ports.for.drs",
9122                         FT_UINT16, BASE_DEC, NULL, 0x0,
9123                         "The number of cell specific transmit antenna ports within the DRS occasions", HFILL }
9124                 },
9125                 { &hf_nfapi_transmission_power_for_drs,
9126                         { "Transmission power for DRS", "nfapi.transmission.power.for.drs.",
9127                         FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
9128                         "Offset of cell specific Reference signals power within DRS occasions to the reference signal power", HFILL }
9129                 },
9130                 { &hf_nfapi_pbch_repetitions_enabled_r13,
9131                         { "PBCH Repetitions enable R13", "nfapi.pbch.repetitions.enabled_r13",
9132                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9133                         "Enable / Disable PBCH repetitions", HFILL }
9134                 },
9135                 { &hf_nfapi_prach_cat_m_root_sequence_index,
9136                         { "PRACH CAT-M Root sequence index", "nfapi.prach.cat_m.root.squence.index",
9137                         FT_UINT16, BASE_DEC, NULL, 0x0,
9138                         "PRACH Root sequence index", HFILL }
9139                 },
9140                 { &hf_nfapi_prach_cat_m_zero_correlation_zone_configuration,
9141                         { "PRACH CAT-M Zero correlation zone configuration", "nfapi.prach.cat_m.zero.correlation.zone.configuration",
9142                         FT_UINT16, BASE_DEC, NULL, 0x0,
9143                         "Equivalent to Ncs", HFILL }
9144                 },
9145                 { &hf_nfapi_prach_cat_m_high_speed_flag,
9146                         { "PRACH CAT-M High speed flag", "nfapi.prach.cat_m.high.speed.flag",
9147                         FT_BOOLEAN, 8, TFS(&high_speed_flag_strname), 0x0,
9148                         "Indicates if unrestricted, or restricted, set of preambles is used", HFILL }
9149                 },
9150                 { &hf_nfapi_prach_ce_level_0_enable,
9151                         { "PRACH CE level #0 Enable", "nfapi.prach.ce.level.0.enable",
9152                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9153                         "Enable \\ Disable CE level #0.", HFILL }
9154                 },
9155                 { &hf_nfapi_prach_ce_level_0_configuration_index,
9156                         { "PRACH CE level #0 Configuration index", "nfapi.prach.ce.level.0.configuration.index",
9157                         FT_UINT16, BASE_DEC, NULL, 0x0,
9158                         "Provides information about the location and format of the PRACH", HFILL }
9159                 },
9160                 { &hf_nfapi_prach_ce_level_0_frequency_offset,
9161                         { "PRACH CE level #0 Frequency offset", "nfapi.prach.ce.level.0.frequency_offset",
9162                         FT_UINT16, BASE_DEC, NULL, 0x0,
9163                         "The first physical resource block available for PRACH for each CE", HFILL }
9164                 },
9165                 { &hf_nfapi_prach_ce_level_0_number_of_repetitions_per_attempt,
9166                         { "PRACH CE level #0 Number of repetitions per attempt", "nfapi.prach.ce.level.0.number.of.repetitions.per_attempt",
9167                         FT_UINT16, BASE_DEC, NULL, 0x0,
9168                         "Number of PRACH repetitions per attempt for each CE level", HFILL }
9169                 },
9170                 { &hf_nfapi_prach_ce_level_0_starting_subframe_periodicity,
9171                         { "CE level #0 Starting subframe periodicity", "nfapi.prach.ce.level.0.starting.subframe_periodicity",
9172                         FT_UINT16, BASE_DEC, NULL, 0x0,
9173                         "Optional. PRACH starting subframe periodicity, expressed in number of slots available for preamble transmission(PRACH opportunities)", HFILL }
9174                 },
9175                 { &hf_nfapi_prach_ce_level_0_hopping_enabled,
9176                         { "PRACH CE level #0 Hopping Enable", "nfapi.prach.ce.level.0.hopping_enable",
9177                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9178                         "Enable \\ Disable PRACH frequency hopping for each CE level", HFILL }
9179                 },
9180                 { &hf_nfapi_prach_ce_level_0_hopping_offset,
9181                         { "PRACH CE level #0 Hopping Offset", "nfapi.prach.ce.level.0.hopping.offset",
9182                         FT_UINT16, BASE_DEC, NULL, 0x0,
9183                         "Valid in case 'PRACH Hopping Enable' is enabled", HFILL }
9184                 },
9185                 { &hf_nfapi_prach_ce_level_1_enable,
9186                         { "PRACH CE level #1 Enable", "nfapi.prach.ce.level.0.enable",
9187                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9188                         "Enable \\ Disable CE level #1", HFILL }
9189                 },
9190                 { &hf_nfapi_prach_ce_level_1_configuration_index,
9191                         { "PRACH CE level #1 Configuration index", "nfapi.prach.ce.level.1.configuration.index",
9192                         FT_UINT16, BASE_DEC, NULL, 0x0,
9193                         "Provides information about the location and format of the PRACH", HFILL }
9194                 },
9195                 { &hf_nfapi_prach_ce_level_1_frequency_offset,
9196                         { "PRACH CE level #1 Frequency offset", "nfapi.prach.ce.level.1.frequency_offset",
9197                         FT_UINT16, BASE_DEC, NULL, 0x0,
9198                         "The first physical resource block available for PRACH for each CE", HFILL }
9199                 },
9200                 { &hf_nfapi_prach_ce_level_1_number_of_repetitions_per_attempt,
9201                         { "PRACH CE level #1 Number of repetitions per attempt", "nfapi.prach.ce.level.1.number.of.repetitions.per_attempt",
9202                         FT_UINT16, BASE_DEC, NULL, 0x0,
9203                         "Number of PRACH repetitions per attempt for each CE level", HFILL }
9204                 },
9205                 { &hf_nfapi_prach_ce_level_1_starting_subframe_periodicity,
9206                         { "CE level #1 Starting subframe periodicity", "nfapi.prach.ce.level.1.starting.subframe_periodicity",
9207                         FT_UINT16, BASE_DEC, NULL, 0x0,
9208                         "Optional.PRACH starting subframe periodicity, expressed in number of slots available for preamble transmission(PRACH opportunities),", HFILL }
9209                 },
9210                 { &hf_nfapi_prach_ce_level_1_hopping_enabled,
9211                         { "PRACH CE level #1 Hopping Enable", "nfapi.prach.ce.level.1.hopping_enable",
9212                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9213                         "Enable \\ Disable PRACH frequency hopping for each CE level.", HFILL }
9214                 },
9215                 { &hf_nfapi_prach_ce_level_1_hopping_offset,
9216                         { "PRACH CE level #1 Hopping Offset", "nfapi.prach.ce.level.1.hopping.offset",
9217                         FT_UINT16, BASE_DEC, NULL, 0x0,
9218                         "Valid in case 'PRACH Hopping Enable' is enabled.", HFILL }
9219                 },
9220                 { &hf_nfapi_prach_ce_level_2_enable,
9221                         { "PRACH CE level #2 Enable", "nfapi.prach.ce.level.2.enable",
9222                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9223                         "Enable \\ Disable CE level #2", HFILL }
9224                 },
9225                 { &hf_nfapi_prach_ce_level_2_configuration_index,
9226                         { "PRACH CE level #2 Configuration index", "nfapi.prach.ce.level.2.configuration.index",
9227                         FT_UINT16, BASE_DEC, NULL, 0x0,
9228                         "Provides information about the location and format of the PRACH", HFILL }
9229                 },
9230                 { &hf_nfapi_prach_ce_level_2_frequency_offset,
9231                         { "PRACH CE level #2 Frequency offset", "nfapi.prach.ce.level.2.frequency_offset",
9232                         FT_UINT16, BASE_DEC, NULL, 0x0,
9233                         "The first physical resource block available for PRACH for each CE", HFILL }
9234                 },
9235                 { &hf_nfapi_prach_ce_level_2_number_of_repetitions_per_attempt,
9236                         { "PRACH CE level #2 Number of repetitions per attempt", "nfapi.prach.ce.level.2.number.of.repetitions.per_attempt",
9237                         FT_UINT16, BASE_DEC, NULL, 0x0,
9238                         "Number of PRACH repetitions per attempt for each CE level", HFILL }
9239                 },
9240                 { &hf_nfapi_prach_ce_level_2_starting_subframe_periodicity,
9241                         { "CE level #2 Starting subframe periodicity", "nfapi.prach.ce.level.2.starting.subframe_periodicity",
9242                         FT_UINT16, BASE_DEC, NULL, 0x0,
9243                         "Optional. PRACH starting subframe periodicity, expressed in number of slots available for preamble transmission(PRACH opportunities)", HFILL }
9244                 },
9245                 { &hf_nfapi_prach_ce_level_2_hopping_enabled,
9246                         { "PRACH CE level #2 Hopping Enable", "nfapi.prach.ce.level.2.hopping_enable",
9247                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9248                         "Enable \\ Disable PRACH frequency hopping for each CE level", HFILL }
9249                 },
9250                 { &hf_nfapi_prach_ce_level_2_hopping_offset,
9251                         { "PRACH CE level #2 Hopping Offset", "nfapi.prach.ce.level.2.hopping.offset",
9252                         FT_UINT16, BASE_DEC, NULL, 0x0,
9253                         "Valid in case 'PRACH Hopping Enable' is enabled.", HFILL }
9254                 },
9255                 { &hf_nfapi_prach_ce_level_3_enable,
9256                         { "PRACH CE level #3 Enable", "nfapi.prach.ce.level.3.enable",
9257                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9258                         "Enable \\ Disable CE level #3.", HFILL }
9259                 },
9260                 { &hf_nfapi_prach_ce_level_3_configuration_index,
9261                         { "PRACH CE level #3 Configuration index", "nfapi.prach.ce.level.3.configuration.index",
9262                         FT_UINT16, BASE_DEC, NULL, 0x0,
9263                         "Provides information about the location and format of the PRACH.", HFILL }
9264                 },
9265                 { &hf_nfapi_prach_ce_level_3_frequency_offset,
9266                         { "PRACH CE level #3 Frequency offset", "nfapi.prach.ce.level.3.frequency_offset",
9267                         FT_UINT16, BASE_DEC, NULL, 0x0,
9268                         "The first physical resource block available for PRACH for each CE", HFILL }
9269                 },
9270                 { &hf_nfapi_prach_ce_level_3_number_of_repetitions_per_attempt,
9271                         { "PRACH CE level #3 Number of repetitions per attempt", "nfapi.prach.ce.level.3.number.of.repetitions.per_attempt",
9272                         FT_UINT16, BASE_DEC, NULL, 0x0,
9273                         "Number of PRACH repetitions per attempt for each CE level", HFILL }
9274                 },
9275                 { &hf_nfapi_prach_ce_level_3_starting_subframe_periodicity,
9276                         { "CE level #3 Starting subframe periodicity", "nfapi.prach.ce.level.3.starting.subframe_periodicity",
9277                         FT_UINT16, BASE_DEC, NULL, 0x0,
9278                         "Optional. PRACH starting subframe periodicity, expressed in number of slots available for preamble transmission(PRACH opportunities)", HFILL }
9279                 },
9280                 { &hf_nfapi_prach_ce_level_3_hopping_enabled,
9281                         { "PRACH CE level #3 Hopping Enable", "nfapi.prach.ce.level.3.hopping_enable",
9282                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9283                         "Enable \\ Disable PRACH frequency hopping for each CE level.", HFILL }
9284                 },
9285                 { &hf_nfapi_prach_ce_level_3_hopping_offset,
9286                         { "PRACH CE level #3 Hopping Offset", "nfapi.prach.ce.level.3.hopping.offset",
9287                         FT_UINT16, BASE_DEC, NULL, 0x0,
9288                         "Valid in case 'PRACH Hopping Enable' is enabled.", HFILL }
9289                 },
9290                 { &hf_nfapi_pucch_internal_ul_hopping_config_common_mode_a,
9291                         { "PUCCH Interval-ULHoppingConfigCommonModeA", "nfapi.pucch.interval.ulhopping.config.common.mode.a",
9292                         FT_UINT16, BASE_DEC, NULL, 0x0,
9293                         "NthULNB for UEModeA", HFILL }
9294                 },
9295                 { &hf_nfapi_pucch_internal_ul_hopping_config_common_mode_b,
9296                         { "PUCCH Interval-ULHoppingConfigCommonModeB", "nfapi.pucch.interval.ulhopping.config.common.mode.b",
9297                         FT_UINT16, BASE_DEC, NULL, 0x0,
9298                         "NthULNB for UEModeB", HFILL }
9299                 },
9300                 { &hf_nfapi_data_report_mode,
9301                         { "Data Report Mode", "nfapi.data.report.mode",
9302                         FT_BOOLEAN, 8, TFS(&data_report_mode_vals), 0x0,
9303                         "The data report mode for the uplink data", HFILL }
9304                 },
9305                 { &hf_nfapi_sfnsf,
9306                         { "SFN/SF", "nfapi.sfn.sf",
9307                         FT_UINT16, BASE_CUSTOM, CF_FUNC(sfn_sf_conversion_fn), 0x0,
9308                         "The future SFN/SF subframe where the TLVs included in the message should be applied", HFILL }
9309                 },
9310                 { &hf_nfapi_max_up_pts,
9311                         { "Max UpPTS frames", "nfapi.max.uppts.frame",
9312                         FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x0,
9313                         "Used for TDD only and indicates how SRS operates in UpPTS subframes", HFILL }
9314                 },
9315                 { &hf_nfapi_srs_acknack_srs_simultaneous_transmission,
9316                         { "SRS AckNack Simultaneous transmission", "nfapi.srs.acknack.simult.tx",
9317                         FT_BOOLEAN, 8, TFS(&srs_simult_tx_strname), 0x0,
9318                         "Indicates if SRS and ACK/NACK can be received in the same subframe. Needed if semi-static configuration is held in PHY.", HFILL }
9319                 },
9320                 { &hf_nfapi_pnf_address_ipv4,
9321                         { "PNF IPV4", "nfapi.pnf.address.ipv4",
9322                         FT_IPv4, BASE_NONE, NULL, 0x0,
9323                         "The IPv4 address of the PNF PHY instance to be used by the VNF for this PNF PHY instance", HFILL }
9324                 },
9325                 { &hf_nfapi_pnf_address_ipv6,
9326                         { "PNF IPV6", "nfapi.pnf.address.ipv6",
9327                         FT_IPv6, BASE_NONE, NULL, 0x0,
9328                         "The IPv6 address of the PNF PHY instance to be used by the VNF for this PNF PHY instance", HFILL }
9329                 },
9330                 { &hf_nfapi_vnf_address_ipv4,
9331                         { "VNF IPV4 Address", "nfapi.vnf.address.ipv4",
9332                         FT_IPv4, BASE_NONE, NULL, 0x0,
9333                         "The IPv4 address of the VNF to be used by the PNF for this P7 PHY instance", HFILL }
9334                 },
9335                 { &hf_nfapi_vnf_address_ipv6,
9336                         { "VNF IPV6 Address", "nfapi.vnf.address.ipv6",
9337                         FT_IPv6, BASE_NONE, NULL, 0x0,
9338                         "The IPv6 address of the VNF to be used by the PNF for this P7 PHY instance", HFILL }
9339                 },
9340                 { &hf_nfapi_pnf_port,
9341                         { "PNF PORT value", "nfapi.config.pnf.port.value",
9342                         FT_UINT16, BASE_DEC, NULL, 0x0,
9343                         "The port of the PNF PHY instance to be used by the VNF for this PNF PHY instance", HFILL }
9344                 },
9345                 { &hf_nfapi_vnf_port,
9346                         { "VNF PORT value", "nfapi.config.vnf.port.value",
9347                         FT_UINT16, BASE_DEC, NULL, 0x0,
9348                         "The port of the VNF to be used by the PNF for this P7 PHY instance", HFILL } },
9349                 { &hf_nfapi_sync_mode,
9350                         { "Sync Mode", "nfapi.sync.mode",
9351                         FT_UINT8, BASE_DEC, VALS(nfapi_sync_mode_vals), 0x0,
9352                         "The method of nFAPI Synchronization supported by the PNF", HFILL }
9353                 },
9354                 { &hf_nfapi_location_mode,
9355                         { "Location Mode", "nfapi.location.mode",
9356                         FT_UINT8, BASE_DEC, VALS(location_mode_vals), 0x0,
9357                         "The method of location derivation supported by the PNF", HFILL }
9358                 },
9359                 { &hf_nfapi_location_coordinates,
9360                         { "Location Coordinates", "nfapi.location.coordinates",
9361                         FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
9362                         "The Location of the PNF. The value is formatted as the LocationCoordinates IE using BASIC-PER encoding as defined in "
9363                         "TS36.355 section 6.4.2. The first bit of the LocationCoordinates IE is in the LSB of the first byte of the array."
9364                         "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 }
9365                 },
9366                 { &hf_nfapi_pdu,
9367                         { "PDU", "nfapi.pdu",
9368                         FT_BYTES, BASE_NONE, NULL, 0x0,
9369                         NULL, HFILL }
9370                 },
9371                 { &hf_nfapi_dl_config_timing,
9372                         { "DL config Timing", "nfapi.dl.config.timing",
9373                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
9374                         "The timing offset before the air interface subframe start that the DL_Config.request must be received at the PNF.", HFILL }
9375                 },
9376                 { &hf_nfapi_tx_timing,
9377                         { "Tx Timing", "nfapi.general.tx.timing",
9378                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
9379                         "The timing offset before the air interface subframe start that the TX.request must be received at the PNF.", HFILL }
9380                 },
9381                 { &hf_nfapi_ul_config_timing,
9382                         { "UL Config Timing", "nfapi.ul.config.timing",
9383                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
9384                         "The timing offset before the air interface subframe start that the UL_CONFIG.request must be received at the PNF.", HFILL }
9385                 },
9386                 { &hf_nfapi_hi_dci0_timing,
9387                         { "HI DCi0 Timing", "nfapi.hi.dci0.timing",
9388                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
9389                         "The timing offset before the air interface subframe start that the HI_DCI0.request must be received at the PNF.", HFILL }
9390                 },
9391                 { &hf_nfapi_maximum_number_phys,
9392                         { "Maximum number of Phys", "nfapi.maximum.number.phys",
9393                         FT_UINT16, BASE_DEC, NULL, 0x0,
9394                         "The maximum number of operational PHYs supported by the PNF device.", HFILL }
9395                 },
9396                 { &hf_nfapi_maximum_total_bandwidth,
9397                         { "Maximum Total Bandwidth", "nfapi.maximum.total.bandwidth",
9398                         FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &khz_100_units_db, 0x0,
9399                         "The total maximum bandwidth (in units of 100kHz) supported by the PNF device.", HFILL }
9400                 },
9401                 { &hf_nfapi_maximum_total_number_dl_layers,
9402                         { "Maximum Total Number DL Layers", "nfapi.maximum.total.number.dl.layers",
9403                         FT_UINT16, BASE_DEC, NULL, 0x0,
9404                         "The maximum total number of downlink layers supported.", HFILL }
9405                 },
9406                 { &hf_nfapi_maximum_total_number_ul_layers,
9407                         { "Maximum Total Number UL Layers", "nfapi.maximum.total.number.ul.layers",
9408                         FT_UINT16, BASE_DEC, NULL, 0x0,
9409                         "The maximum total number of uplink layers supported across all available PHYs.", HFILL }
9410                 },
9411                 { &hf_nfapi_shared_bands,
9412                         { "Shared bands", "nfapi.shared.bands",
9413                         FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x0,
9414                         "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 }
9415                 },
9416                 { &hf_nfapi_shared_pa,
9417                         { "Shared pa", "nfapi.shared.pa",
9418                         FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x0,
9419                         "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 }
9420                 },
9421                 { &hf_nfapi_maximum_total_power,
9422                         { "Maximum total power", "nfapi.maximum.total.power",
9423                         FT_UINT16, BASE_CUSTOM, CF_FUNC(dl_rs_tx_pow_measment_conversion_fn), 0x0,
9424                         "The maximum transmit power of the PNF device summed across all PHYs.", HFILL }
9425                 },
9426                 { &hf_nfapi_oui,
9427                         { "OUI", "nfapi.oui",
9428                         FT_STRING, BASE_NONE, NULL, 0x0,
9429                         "The PNF OUI in the format as specified by IEEE", HFILL }
9430                 },
9431                 { &hf_nfapi_pnf_phy_number_phy,
9432                         { "PNF Phy Number of Phy", "nfapi.pnf.phy.number.phy",
9433                         FT_UINT16, BASE_DEC, NULL, 0x0,
9434                         "The number of PHY instances", HFILL }
9435                 },
9436                 { &hf_nfapi_pnf_phy_config_index,
9437                         { "PNF Phy Config Index", "nfapi.pnf.phy.config.index",
9438                         FT_UINT16, BASE_DEC, NULL, 0x0,
9439                         "The unique index number of the PHY to permit the PNF to identify the PHY in the PNF_CONFIG.Request", HFILL }
9440                 },
9441                 { &hf_nfapi_number_of_rfs,
9442                         { "Number of RFs", "nfapi.pnf.rf.number.rf",
9443                         FT_UINT16, BASE_DEC, NULL, 0x0,
9444                         "The number of RF configurations", HFILL }
9445                 },
9446                 { &hf_nfapi_phy_rf_config_info_phy_id,
9447                         { "Phy ID", "nfapi.pnf.phy.rf.config.phy.id",
9448                         FT_UINT16, BASE_DEC, NULL, 0x0,
9449                         NULL, HFILL }
9450                 },
9451                 { &hf_nfapi_rf_config_index,
9452                         { "RF Config Index", "nfapi.rf_config_index",
9453                         FT_UINT16, BASE_DEC, NULL, 0x0,
9454                         "The index number defined in the PNF RF struct that the PHY can support",
9455                         HFILL }
9456                 },
9457                 { &hf_nfapi_number_of_rf_exclusions,
9458                         { "Number of RF exclusions", "nfapi.hf_nfapi_number_of_rf_exclusions",
9459                         FT_UINT16, BASE_DEC, NULL, 0x0,
9460                         "The number of RF configurations excluded from use by this PHY", HFILL }
9461                 },
9462                 { &hf_nfapi_maximum_3gpp_release_supported,
9463                         { "Maximum 3gpp Release Supported", "nfapi.maximum_3gpp_release_supported",
9464                         FT_UINT16, BASE_HEX, NULL, 0x0,
9465                         "The major 3GPP releases supported", HFILL }
9466                 },
9467                 { &hf_nfapi_maximum_3gpp_release_supported_rel8,
9468                         { "Release 8", "nfapi.maximum_3gpp_release_supported.rel8",
9469                         FT_BOOLEAN, 16, NULL, 0x0001,
9470                         NULL, HFILL }
9471                 },
9472                 { &hf_nfapi_maximum_3gpp_release_supported_rel9,
9473                         { "Release 9", "nfapi.maximum_3gpp_release_supported.rel9",
9474                         FT_BOOLEAN, 16, NULL, 0x0002,
9475                         NULL, HFILL }
9476                 },
9477                 { &hf_nfapi_maximum_3gpp_release_supported_rel10,
9478                         { "Release 10", "nfapi.maximum_3gpp_release_supported.rel10",
9479                         FT_BOOLEAN, 16, NULL, 0x0004,
9480                         NULL, HFILL }
9481                 },
9482                 { &hf_nfapi_maximum_3gpp_release_supported_rel11,
9483                         { "Release 11", "nfapi.maximum_3gpp_release_supported.rel11",
9484                         FT_BOOLEAN, 16, NULL, 0x0008,
9485                         NULL, HFILL }
9486                 },
9487                 { &hf_nfapi_maximum_3gpp_release_supported_rel12,
9488                         { "Release 12", "nfapi.maximum_3gpp_release_supported.rel12",
9489                         FT_BOOLEAN, 16, NULL, 0x0010,
9490                         NULL, HFILL }
9491                 },
9492                 { &hf_nfapi_maximum_3gpp_release_supported_rel13,
9493                         { "Release 13", "nfapi.maximum_3gpp_release_supported.rel13",
9494                         FT_BOOLEAN, 16, NULL, 0x0020,
9495                         NULL, HFILL }
9496                 },
9497                 { &hf_nfapi_downlink_channel_bandwidth_supported,
9498                         { "Maximum Channel Downlink Bandwidth Supported", "nfapi.downlink_channel_bandwidth_supported",
9499                         FT_UINT16, BASE_DEC, NULL, 0x0,
9500                         "The downlink channel bandwidth supported in resource blocks as specified in 3GPP TS 36.104", HFILL }
9501                 },
9502                 { &hf_nfapi_uplink_channel_bandwidth_supported,
9503                         { "Maximum Channel Uplink Bandwidth Supported", "nfapi.uplink_channel_bandwidth_supported",
9504                         FT_UINT16, BASE_DEC, NULL, 0x0,
9505                         "The uplink channel bandwidth supported in resource blocks as specified in 3GPP TS 36.104.", HFILL }
9506                 },
9507                 { &hf_nfapi_number_of_dl_layers_supported,
9508                         { "Number of DL Layers Supported", "nfapi.number_of_dl_layer_supported",
9509                         FT_UINT16, BASE_DEC, NULL, 0x0,
9510                         "The maximum number of downlink layers supported", HFILL }
9511                 },
9512                 { &hf_nfapi_number_of_ul_layers_supported,
9513                         { "Number of UL Layers Supported", "nfapi.number_of_ul_layer_supported",
9514                         FT_UINT16, BASE_DEC, NULL, 0x0,
9515                         "The maximum number of uplink layers supported", HFILL }
9516                 },
9517                 { &hf_nfapi_nmm_modes_supported,
9518                         { "NMM modes supported", "nfapi.nmm_modes_supported",
9519                         FT_UINT8, BASE_DEC, VALS(nmm_modes_supported_vals), 0x0,
9520                         "Network Monitor Modes Supported.", HFILL }
9521                 },
9522                 { &hf_nfapi_band,
9523                         { "Band", "nfapi.band",
9524                         FT_UINT16, BASE_DEC, NULL, 0x0,
9525                         "Band number as specified in 3GPP TS36.101", HFILL }
9526                 },
9527                 { &hf_nfapi_maximum_transmit_power_2,
9528                         { "Maximum transmit power", "nfapi.maximum_transmit_power",
9529                         FT_UINT16, BASE_CUSTOM, CF_FUNC(max_transmit_power_2_conversion_fn), 0x0,
9530                         "The maximum transmit power for the PHY and RF operating at the configured bandwidth as defined in 3GPP TS 36.104.", HFILL }
9531                 },
9532                 { &hf_nfapi_maximum_transmit_power,
9533                         { "Maximum transmit power", "nfapi.maximum_transmit_power",
9534                         FT_UINT16, BASE_CUSTOM, CF_FUNC(max_transmit_power_conversion_fn), 0x0,
9535                         "The maximum transmit power for the RF chain operating at the maximum supported bandwidth as defined in 3GPP TS 36.104.", HFILL }
9536                 },
9537                 { &hf_nfapi_earfcn,
9538                         { "EARFCN", "nfapi.earfcn",
9539                         FT_UINT16, BASE_DEC, NULL, 0x0,
9540                         "The EARFCN to be measured.", HFILL }
9541                 },
9542                 { &hf_nfapi_number_of_rf_bands,
9543                         { "Number of RF Bands", "nfapi.num.rf_bands",
9544                         FT_UINT16, BASE_DEC, NULL, 0x0,
9545                         "The number of RF Band instances", HFILL }
9546                 },
9547                 { &hf_nfapi_nmm_uplink_rssi_supported,
9548                         { "NMM Uplink RSSI supported", "nfapi.nmm.uplink.rssi.supported",
9549                         FT_UINT8, BASE_DEC, VALS(ul_rssi_supported_vals), 0x0,
9550                         "Indicates if the uplink RSSI meausremnts are supported by NMM.", HFILL }
9551                 },
9552                 { &hf_nfapi_minimum_transmit_power,
9553                         { "Minimum transmit power", "nfapi.minimum_transmit_power",
9554                         FT_UINT16, BASE_CUSTOM, CF_FUNC(max_transmit_power_conversion_fn), 0x0,
9555                         "The minimum transmit power for the RF chain operating at the maximum supported bandwidth as defined in 3GPP TS 36.104.", HFILL }
9556                 },
9557                 { &hf_nfapi_number_of_antennas_suppported,
9558                         { "Number of Supported Antennas", "nfapi.number_of_antennas_suppported",
9559                         FT_UINT8, BASE_DEC, NULL, 0x0,
9560                         "The maximum number of antennas supported.", HFILL }
9561                 },
9562                 { &hf_nfapi_minimum_downlink_frequency,
9563                         { "Minimum downlink frequency", "nfapi.minimum_downlink_frequency",
9564                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &khz_100_units_db, 0x0,
9565                         "The minimum supported downlink frequency in 100kHz units", HFILL }
9566                 },
9567                 { &hf_nfapi_maximum_downlink_frequency,
9568                         { "Maximum downlink frequency", "nfapi.maximum_downlink_frequency",
9569                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &khz_100_units_db, 0x0,
9570                         "The maximum supported downlink frequency in 100kHz units", HFILL }
9571                 },
9572                 { &hf_nfapi_minimum_uplink_frequency,
9573                         { "Minimum uplink frequency", "nfapi.minimum_downlink_frequency",
9574                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &khz_100_units_db, 0x0,
9575                         "The minimum supported uplink frequency in 100kHz units", HFILL }
9576                 },
9577                 { &hf_nfapi_maximum_uplink_frequency,
9578                         { "Maximum uplink frequency", "nfapi.maximum_downlink_frequency",
9579                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &khz_100_units_db, 0x0,
9580                         "The maximum supported uplink frequency in 100kHz units", HFILL }
9581                 },
9582                 { &hf_nfapi_transmission_mode7_supported,
9583                         { "Transmission Mode 7 Supported", "nfapi.pnf.phy_rel10.tx_mode7_supported",
9584                         FT_UINT16, BASE_DEC, NULL, 0x0,
9585                         "Indicates if PHY supports TM7 for PDSCH", HFILL }
9586                 },
9587                 { &hi_nfapi_transmission_mode8_supported,
9588                         { "Transmission Mode 8 Supported", "nfapi.pnf.phy_rel10.tx_mode8_supported",
9589                         FT_UINT16, BASE_DEC, NULL, 0x0,
9590                         "Indicates if PHY supports TM8 for PDSCH", HFILL }
9591                 },
9592                 { &hi_nfapi_two_antennas_ports_for_pucch,
9593                         { "Two antennas ports for PUCCH", "nfapi.pnf.phy_rel10.two_antennas_ports_for_pucch",
9594                         FT_UINT16, BASE_DEC, NULL, 0x0,
9595                         "Indicates if PHY supports PUCCH transmit diversity introduced in Release 10. Equivalent to two-AntennaPortsForPUCCH-r10 in TS36.306", HFILL }
9596                 },
9597                 { &hi_nfapi_transmission_mode_9_supported,
9598                         { "Transmission Mode 9 Supported", "nfapi.pnf.phy_rel10.tx_mode9_supported",
9599                         FT_UINT16, BASE_DEC, NULL, 0x0,
9600                         "Indicates if PHY supports TM9 for PDSCH with 8 antennas and 8 CSI. Equivalent to tm9-With-8Tx-FDD-r10 in TS36.306", HFILL }
9601                 },
9602                 { &hi_nfapi_simultaneous_pucch_pusch,
9603                         { "Simultaneous PUCCH PUSCH", "nfapi.pnf.simultaneous_pucch_pusch",
9604                         FT_UINT16, BASE_DEC, NULL, 0x0,
9605                         "Indicates if PHY supports UE sending simultaneous PUCCH and PUSCH introduced in Release 10. Equivalent to simultaneousPUCCH-PUSCH-r10 in TS36.306", HFILL }
9606                 },
9607                 { &hi_nfapi_four_layer_tx_with_tm3_and_tm4,
9608                         { "Four layer Tx with TM3 and TM4", "nfapi.pnf.phy_rel10.layer_tx_with_tm3_and_tm4",
9609                         FT_UINT16, BASE_DEC, NULL, 0x0,
9610                         "Indicates if PHY supports four layer transmission for TM3 and TM4. Equivalent to fourLayerTM3-TM4-r10 in TS36.306", HFILL }
9611                 },
9612                 { &hf_nfapi_epdcch_supported,
9613                         { "ePDCCH supported", "nfapi.pnf.phy_rel11.epdcch_supported",
9614                         FT_UINT16, BASE_DEC, NULL, 0x0,
9615                         "Indicates if PHY supports Enhanced PDCCH", HFILL }
9616                 },
9617                 { &hi_nfapi_multi_ack_csi_reporting,
9618                         { "Multi ACK CSI reporting", "nfapi.pnf.phy_rel11.mutli_ack_csi_reporting",
9619                         FT_UINT16, BASE_DEC, NULL, 0x0,
9620                         "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 }
9621                 },
9622                 { &hi_nfapi_pucch_tx_diversity_with_channel_selection,
9623                         { "PUCCH Tx diversity with channel selection", "nfapi.pnf.phy_rel11.tx_div_with_channel_selection",
9624                         FT_UINT16, BASE_DEC, NULL, 0x0,
9625                         "Indicates if PHY supports transmit diversity for PUCCH format 1b with channel selection. Equivalent to txDiv-PUCCH1b-ChSelect in TS36.306", HFILL }
9626                 },
9627                 { &hi_nfapi_ul_comp_supported,
9628                         { "UL CoMP supported", "nfapi.pnf.phy_rel11.ul_comp_supported",
9629                         FT_UINT16, BASE_DEC, NULL, 0x0,
9630                         "Indicates if PHY supports UL CoMP", HFILL }
9631                 },
9632                 { &hi_nfapi_transmission_mode_5_supported,
9633                         { "Transmission mode 5 supported", "nfapi.pnf.phy_rel11.tx_mode5_supported",
9634                         FT_UINT16, BASE_DEC, NULL, 0x0,
9635                         "Indicates if PHY supports TM5 for PDSCH", HFILL }
9636                 },
9637                 { &hf_nfapi_csi_subframe_set,
9638                         { "CSI subframe set", "nfapi.pnf.phy_rel12.csi_subframe_set",
9639                         FT_UINT16, BASE_DEC, NULL, 0x0,
9640                         "Equivalent to csi-SubframeSet-r12 in TS36.306", HFILL }
9641                 },
9642                 { &hi_nfapi_enhanced_4tx_codebook,
9643                         { "Enhanced 4TX codebook", "nfapi.pnf.phy_rel12.exhanced_t4x_codebook",
9644                         FT_UINT16, BASE_DEC, NULL, 0x0,
9645                         "Indicates if PHY supports the enhanced 4TX codebook. Equivalent to enhanced-4TxCodebook-r12 in TS36.306", HFILL }
9646                 },
9647                 { &hi_nfapi_drs_supported,
9648                         { "DRS supported", "nfapi.pnf.phy_rel12.drs_supported",
9649                         FT_UINT16, BASE_DEC, NULL, 0x0,
9650                         "Indicates if PHY supports the Discovery Reference Signal", HFILL }
9651                 },
9652                 { &hi_nfapi_ul_64qam_supported,
9653                         { "UL 64QAM supported", "nfapi.pnf.phy_rel12.ul_64qam_supported",
9654                         FT_UINT16, BASE_DEC, NULL, 0x0,
9655                         "Indicates if PHY support 64 QAM in the uplink", HFILL }
9656                 },
9657                 { &hi_nfapi_transmission_mode_10_supported,
9658                         { "Transmission mode 10 supported", "nfapi.pnf.phy_rel12.tx_mode10_supported",
9659                         FT_UINT16, BASE_DEC, NULL, 0x0,
9660                         "Indicates if PHY supports TM10 for PDSCH (DL CoMP)", HFILL }
9661                 },
9662                 { &hi_nfapi_alternative_tbs_indices,
9663                         { "Alternative TBS indices", "nfapi.pnf.phy_rel12.alternative_tbs_indices",
9664                         FT_UINT16, BASE_DEC, NULL, 0x0,
9665                         "Indicates if PHY supports the alternate TBS indices (256 QAM).  Equivalent to alternativeTBS-Indices-r12 in TS36.306", HFILL }
9666                 },
9667                 { &hf_nfapi_pucch_format_4_supported,
9668                         { "PUCCH format 4 supported", "nfapi.pnf.phy_rel13.pucch_format4_supported",
9669                         FT_UINT16, BASE_DEC, NULL, 0x0,
9670                         "Indicates if PHY supports PUCCH format 4", HFILL }
9671                 },
9672                 { &hf_nfapi_pucch_format_5_supported,
9673                         { "PUCCH format 5 supported", "nfapi.pnf.phy_rel13.pucch_format5_supported",
9674                         FT_UINT16, BASE_DEC, NULL, 0x0,
9675                         "Indicates if PHY supports PUCCH format 5", HFILL }
9676                 },
9677                 { &hf_nfapi_more_than_5_ca_supported,
9678                         { "More than 5 CA support", "nfapi.pnf.phy_rel13.mode_than_5_ca_supported",
9679                         FT_UINT16, BASE_DEC, NULL, 0x0,
9680                         "Indicates if PHY supports features required for more than 5 CA support on PUSCH. Equivalent to uci-PUSCH-Ext-r13 in TS36.306", HFILL }
9681                 },
9682                 { &hf_nfapi_laa_supported,
9683                         { "LAA supported", "nfapi.pnf.phy_rel13.laa_supported",
9684                         FT_UINT16, BASE_DEC, NULL, 0x0,
9685                         "Indicates if PHY supports DL LAA (subframe format 3)", HFILL }
9686                 },
9687                 { &hf_nfapi_laa_ending_in_dwpts_supported,
9688                         { "LAA ending in DwPTS supported", "nfapi.pnf.phy_rel13.laa_ending_in_dwpts_supported",
9689                         FT_UINT16, BASE_DEC, NULL, 0x0,
9690                         "Indicates if PHY supports DL LAA ending in a DwPTS subframe. Equivalent to endingDwPTS-r13i n TS36.306", HFILL }
9691                 },
9692                 { &hf_nfapi_laa_starting_in_second_slot_supported,
9693                         { "LAA starting in second slot Supported", "nfapi.pnf.phy_rel13.laa_starting_in_second_slot_supported",
9694                         FT_UINT16, BASE_DEC, NULL, 0x0,
9695                         "Indicates if PHY supports DL LAA starting in the second slot in a subframe. Equivalent to secondSlotStartingPosition-r13 in TS36.306", HFILL }
9696                 },
9697                 { &hf_nfapi_beamforming_supported,
9698                         { "Beamforming Supported", "nfapi.pnf.phy_rel13.beamingforming_supported",
9699                         FT_UINT16, BASE_DEC, NULL, 0x0,
9700                         "Indicates if PHY supports beamforming (FD-MIMO Class B). Equivalent to beamformed-r13 in TS36.306", HFILL }
9701                 },
9702                 { &hf_nfapi_csi_rs_enhancements_supported,
9703                         { "CSI-RS enhancements supported", "nfapi.pnf.phy_rel13.csi_rs_enchancements_supported",
9704                         FT_UINT16, BASE_DEC, NULL, 0x0,
9705                         "Indicates if PHY supports CSI-RS enhancements (FD-MIMO Class A). Equivalent to csi-RS-EnhancementsTDD-r13 in TS36.306", HFILL }
9706                 },
9707                 { &hf_nfapi_drms_enhancements_supported,
9708                         { "DMRS enhancements supported", "nfapi.pnf.phy_rel13.drms_enhancements_supported",
9709                         FT_UINT16, BASE_DEC, NULL, 0x0,
9710                         "Indicates if PHY supports DMRS enhancements added in Release 13. Equivalent to dmrs-Enhancements-r13 in TS36.306", HFILL }
9711                 },
9712                 { &hf_nfapi_srs_enhancements_supported,
9713                         { "SRS enhancements supported", "nfapi.pnf.phy_rel13.srs_enhancements_supported",
9714                         FT_UINT16, BASE_DEC, NULL, 0x0,
9715                         "Indicates if PHY supports SRS enhancements added in Release 13. Equivalent to srs-Enhancements-r13in TS36.306", HFILL }
9716                 },
9717                 { &hf_nfapi_sfn_sf,
9718                         { "SFN_SF", "nfapi.sfn_sf",
9719                         FT_UINT16, BASE_CUSTOM, CF_FUNC(sfn_sf_conversion_fn), 0x0,
9720                         NULL, HFILL }
9721                 },
9722                 { &hf_nfapi_number_pdcch_ofdm_symbols,
9723                         { "Number of PDCCH OFDM Symbols", "nfapi.number_pdcch_ofdm_symbols",
9724                         FT_UINT8, BASE_DEC, NULL, 0x0,
9725                         "The number of OFDM symbols for the PDCCH", HFILL }
9726                 },
9727                 { &hf_nfapi_number_dci,
9728                         { "Number of DCI", "nfapi.number_dci",
9729                         FT_UINT8, BASE_DEC, NULL, 0x0,
9730                         "The number of DCI PDUs included in this message", HFILL }
9731                 },
9732                 { &hf_nfapi_number_pdus,
9733                         { "Number of PDUs", "nfapi.number_pdu",
9734                         FT_UINT16, BASE_DEC, NULL, 0x0,
9735                         "Number of PDUs that are included in this message", HFILL }
9736                 },
9737                 { &hf_nfapi_number_of_harqs,
9738                         { "Number of HARQs", "nfapi.number_harqs",
9739                         FT_UINT16, BASE_DEC, NULL, 0x0,
9740                         "Number of HARQs included in this message", HFILL }
9741                 },
9742                 { &hf_nfapi_number_of_crcs,
9743                         { "Number of CRCs", "nfapi.number_crcs",
9744                         FT_UINT16, BASE_DEC, NULL, 0x0,
9745                         "Number of CRCs included in this message", HFILL }
9746                 },
9747                 { &hf_nfapi_number_of_srs,
9748                         { "Number of SRs", "nfapi.number_srs",
9749                         FT_UINT16, BASE_DEC, NULL, 0x0,
9750                         "Number of SRs included in this message", HFILL }
9751                 },
9752                 { &hf_nfapi_number_of_cqi,
9753                         { "Number of CQIs", "nfapi.number_cqi",
9754                         FT_UINT16, BASE_DEC, NULL, 0x0,
9755                         "Number of CQIs included in this message", HFILL }
9756                 },
9757                 { &hf_nfapi_number_of_preambles,
9758                         { "Number of Preambles", "nfapi.number_preambles",
9759                         FT_UINT16, BASE_DEC, NULL, 0x0,
9760                         "Number of RACH preambles", HFILL }
9761                 },
9762                 { &hf_nfapi_number_of_srss,
9763                         { "Number of SRSs", "nfapi.number_srss",
9764                         FT_UINT16, BASE_DEC, NULL, 0x0,
9765                         "Number of UEs contributing to the uplink SRS", HFILL }
9766                 },
9767                 { &hf_nfapi_lbt_dl_req_pdu_type,
9768                         { "LBT DL Request PDU Type", "nfapi.number_srss",
9769                         FT_UINT16, BASE_DEC, VALS(nfapi_lbt_dl_req_pdu_type), 0x0,
9770                         NULL, HFILL }
9771                 },
9772                 { &hf_nfapi_lbt_dl_ind_pdu_type,
9773                         { "LBT DL Indication PDU Type", "nfapi.number_srss",
9774                         FT_UINT16, BASE_DEC, VALS(nfapi_lbt_dl_ind_pdu_type), 0x0,
9775                         NULL, HFILL }
9776                 },
9777                 { &hf_nfapi_number_pdsch_rnti,
9778                         { "Number of PDSCH RNTI", "nfapi.number_pdsch_rnti",
9779                         FT_UINT8, BASE_DEC, NULL, 0x0,
9780                         "Number of unique RNTIs sent on the PDSCH", HFILL }
9781                 },
9782                 { &hf_nfapi_transmission_power_pcfich,
9783                         { "Transmission Power PCFICH", "nfapi.transmission_power_pcfich",
9784                         FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
9785                         "Offset to the reference signal power.", HFILL }
9786                 },
9787                 { &hf_nfapi_dl_config_pdu_type,
9788                         { "PDU Type", "nfapi.pdu.type",
9789                         FT_UINT8, BASE_DEC, VALS(nfapi_dl_config_pdu_type_vals), 0x0,
9790                         "DL_CONFIG.request PDU Type", HFILL }
9791                 },
9792                 { &hf_nfapi_pdu_size,
9793                         { "PDU size", "nfapi.pdu.size",
9794                         FT_UINT8, BASE_DEC, NULL, 0x0,
9795                         "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 }
9796                 },
9797                 { &hf_nfapi_instance_length,
9798                         { "Instance length", "nfapi.instance.length",
9799                         FT_UINT16, BASE_DEC, NULL, 0x0,
9800                         "The Length in bytes of all TLVs within this instance", HFILL }
9801                 },
9802                 { &hf_nfapi_length,
9803                         { "PDU length", "nfapi.pdu.length",
9804                         FT_UINT16, BASE_DEC, NULL, 0x0,
9805                         "Length of PDU in bytes.", HFILL }
9806                 },
9807                 { &hf_nfapi_pdu_index,
9808                         { "PDU Index", "nfapi.pdu.index",
9809                         FT_UINT16, BASE_DEC, NULL, 0x0,
9810                         "The PDU index parameter specified for each PDU", HFILL }
9811                 },
9812                 { &hf_nfapi_rnti,
9813                         { "RNTI", "nfapi.rnti",
9814                         FT_UINT16, BASE_DEC, NULL, 0x0,
9815                         "The RNTI used for identifying the UE when receiving the PDU", HFILL }
9816                 },
9817                 { &hf_nfapi_resource_allocation_type,
9818                         { "Resource Allocation Type", "nfapi.resource.allocation.type",
9819                         FT_UINT8, BASE_DEC, VALS(resource_allocation_type_vals), 0x0,
9820                         "Resource allocation type/header Valid for DCI formats : 1, 2, 2A, 2B, 2C, 2D", HFILL }
9821                 },
9822                 { &hf_nfapi_virtual_resource_block_assignment_flag,
9823                         { "Virtual resource block assignment flag", "nfapi.resource.block.assignment.flag",
9824                         FT_UINT8, BASE_DEC, VALS(local_distributed_vals), 0x0,
9825                         "Type of virtual resource block used Valid for DCI formats : 1A, 1B, 1D", HFILL }
9826                 },
9827                 { &hf_nfapi_resource_block_coding,
9828                         { "Resource block coding", "nfapi.resource.block.coding",
9829                         FT_UINT32, BASE_DEC, NULL, 0x0,
9830                         "The encoding for the resource blocks. The coding is dependent on whether resource allocation type 0, 1, 2 is in use", HFILL }
9831                 },
9832                 { &hf_nfapi_modulation,
9833                         { "Modulation", "nfapi.modulation",
9834                         FT_UINT8, BASE_DEC, VALS(modulation_vals), 0x0,
9835                         NULL, HFILL }
9836                 },
9837                 { &hf_nfapi_redundancy_version,
9838                         { "Redundancy version", "nfapi.redundancy.version",
9839                         FT_UINT8, BASE_DEC, NULL, 0x0,
9840                         "HARQ redundancy version", HFILL }
9841                 },
9842                 { &hf_nfapi_transport_blocks,
9843                         { "Transport blocks", "nfapi.transport.blocks",
9844                         FT_UINT8, BASE_DEC, NULL, 0x0,
9845                         "The transport block transmitted to this RNTI", HFILL }
9846                 },
9847                 { &hf_nfapi_transport_block_to_codeword_swap_flag,
9848                         { "Transport block to codeword swap flag", "nfapi.transport.block.to.codeword.swap.flag",
9849                         FT_UINT8, BASE_DEC, VALS(transport_block_to_codeword_swap_flag_vals), 0x0,
9850                         "Indicates the mapping of transport block to codewords.", HFILL }
9851                 },
9852                 { &hf_nfapi_transmission_scheme,
9853                         { "Transmission scheme", "nfapi.transmission.scheme",
9854                         FT_UINT8, BASE_DEC, VALS(transmission_scheme_vals), 0x0,
9855                         "The MIMO mode used in the PDU", HFILL }
9856                 },
9857                 { &hf_nfapi_ul_transmission_scheme,
9858                         { "Transmission scheme", "nfapi.transmission.scheme",
9859                         FT_UINT8, BASE_DEC, VALS(ul_transmission_scheme_vals), 0x0,
9860                         "The MIMO mode used in the PDU", HFILL }
9861                 },
9862                 { &hf_nfapi_number_of_layers,
9863                         { "Number of layers", "nfapi.number.of.layers",
9864                         FT_UINT8, BASE_DEC, NULL, 0x0,
9865                         "The number of layers used in transmission", HFILL }
9866                 },
9867                 { &hf_nfapi_number_of_subbands,
9868                         { "Number of subbands", "nfapi.number.of.subbands",
9869                         FT_UINT8, BASE_DEC, NULL, 0x0,
9870                         "Only valid when transmission scheme = 3, 4, 5. Defines the number of subbands and "
9871                         "codebooks used for PMI.If value = 1 then a single PMI value is supplied which should be used over all RB", HFILL }
9872                 },
9873                 { &hf_nfapi_codebook_index,
9874                         { "Codebook index", "nfapi.number.of.codebook.index",
9875                         FT_UINT8, BASE_DEC, NULL, 0x0,
9876                         "Only valid when transmission scheme = 3, 4, 5. Defines the codebook used.", HFILL }
9877                 },
9878                 { &hf_nfapi_ue_category_capacity,
9879                         { "UE category capacity", "nfapi.ue.category.capacity",
9880                         FT_UINT8, BASE_DEC, NULL, 0x0,
9881                         "The UE capabilities category", HFILL }
9882                 },
9883                 { &hf_nfapi_pa,
9884                         { "P-A", "nfapi.pa",
9885                         FT_UINT8, BASE_DEC, VALS(pa_vals), 0x0,
9886                         "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 }
9887                 },
9888                 { &hf_nfapi_delta_power_offset_index,
9889                         { "Delta Power offset index", "nfapi.delta.power.offset.index",
9890                         FT_UINT8, BASE_DEC, NULL, 0x0,
9891                         "Delta power offset, value: 0..1", HFILL }
9892                 },
9893                 { &hf_nfapi_nprb,
9894                         { "Nprb", "nfapi.nprb",
9895                         FT_UINT8, BASE_DEC, VALS(nprb_vals), 0x0,
9896                         "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 }
9897                 },
9898                 { &hf_nfapi_transmission_mode,
9899                         { "Transmission Mode", "nfapi.transmission_nprb",
9900                         FT_UINT8, BASE_DEC, VALS(transmission_mode_vals), 0x0,
9901                         "Transmission mode associated with the UE", HFILL }
9902                 },
9903                 { &hf_nfapi_prnti,
9904                         { "P-RNTI", "nfapi.prnti",
9905                         FT_UINT16, BASE_DEC, NULL, 0x0,
9906                         "The P-RNTI associated with the paging", HFILL }
9907                 },
9908                 { &hf_nfapi_mcs,
9909                         { "MCS", "nfapi.mcs",
9910                         FT_UINT8, BASE_DEC, VALS(pch_modulation_vals), 0x0,
9911                         "The modulation and coding scheme for the transport block", HFILL }
9912                 },
9913                 { &hf_nfapi_number_of_transport_blocks,
9914                         { "Number of transport blocks", "nfapi.number_of_transport_blocks",
9915                         FT_UINT8, BASE_DEC, NULL, 0x0,
9916                         "The number of transport blocks transmitted to this RNTI", HFILL }
9917                 },
9918                 { &hf_nfapi_ue_mode,
9919                         { "UE Mode", "nfapi.ue.mode",
9920                         FT_UINT8, BASE_DEC, VALS(ue_mode_vals), 0x0,
9921                         NULL, HFILL }
9922                 },
9923                 { &hf_prs_bandwidth,
9924                         { "PRS bandwidth", "nfapi.prs.bandwidth",
9925                         FT_UINT8, BASE_DEC, NULL, 0x0,
9926                         "PRS bandwidth in resource blocks.", HFILL }
9927                 },
9928                 { &hf_prs_cyclic_prefix_type,
9929                         { "PRS cyclic prefix type", "nfapi.prs.cyclic.prefix.type",
9930                         FT_BOOLEAN, 8, TFS(&prs_cyclic_prefix_type_strname), 0x0,
9931                         "The cyclic prefix used for PRS transmission", HFILL }
9932                 },
9933                 { &hf_prs_muting,
9934                         { "PRS muting", "nfapi.prs.muting",
9935                         FT_BOOLEAN, 8, TFS(&prs_muting_strname), 0x0,
9936                         "PRS muting dictates if PRS REs are vacant (prsMutingInfo-r9 indicates the SF occasions)", HFILL }
9937                 },
9938                 { &hf_nfapi_num_bf_prb_per_subband,
9939                         { "Num of BF PRB per Subband", "nfapi.num.bf.prb.per.subband",
9940                         FT_UINT8, BASE_DEC, NULL, 0x0,
9941                         "Number of PRBs that are treated as one subband", HFILL }
9942                 },
9943                 { &hf_nfapi_num_bf_vector,
9944                         { "Num of BF Vector", "nfapi.num.bf.vector",
9945                         FT_UINT8, BASE_DEC, NULL, 0x0,
9946                         "Number of beam forming vectors. One beam forming vector is specified for each subband", HFILL }
9947                 },
9948                 { &hf_nfapi_csi_rs_resource_config,
9949                         { "CSI-RS resource config", "nfapi.csi.rs.resource.config",
9950                         FT_UINT8, BASE_DEC, NULL, 0x0,
9951                         "Indicates reference signal configuration for CSI-RS", HFILL }
9952                 },
9953                 { &hf_nfapi_bf_vector_subband_index,
9954                         { "BF Subband Index", "nfapi.num.bf.vector.subband.index",
9955                         FT_UINT8, BASE_DEC, NULL, 0x0,
9956                         "Index of subband for which the following beam forming vector is applied", HFILL }
9957                 },
9958                 { &hf_nfapi_bf_vector_num_antennas,
9959                         { "BF Num of Antennas", "nfapi.num.bf.vector.bf.value",
9960                         FT_UINT8, BASE_DEC, NULL, 0x0,
9961                         "Number of physical antennas", HFILL }
9962                 },
9963                 { &hf_nfapi_bf_vector_bf_value,
9964                         { "BF Value per Antenna", "nfapi.num.bf.vector.bf.value",
9965                         FT_UINT16, BASE_DEC, NULL, 0x0,
9966                         "Beam forming vector element for physical antenna #i real 8 bits followed by imaginary 8 bits", HFILL }
9967                 },
9968                 { &hf_nfapi_nscid,
9969                         { "NSC id", "nfapi.nscid",
9970                         FT_UINT8, BASE_DEC, NULL, 0x0,
9971                         "Used with DCI format 2B and 2C.", HFILL }
9972                 },
9973                 { &hf_nfapi_csi_rs_flag,
9974                         { "CSI RS Flag", "nfapi.csi.rs.flag",
9975                         FT_BOOLEAN, 8, TFS(&csi_rs_flags_strname), 0x0,
9976                         "Indicates if parameters related to CSI-RS are valid or not.", HFILL }
9977                 },
9978                 { &hf_nfapi_csi_rs_resource_config_r10,
9979                         { "CSI RS resource config R10", "nfapi.csi.rs.resource_config_r10",
9980                         FT_UINT8, BASE_DEC, NULL, 0x0,
9981                         "This value is deprecated", HFILL }
9982                 },
9983                 { &hf_nfapi_csi_rs_zero_tx_power_resource_config_bitmap_r10,
9984                         { "CSI-RS Number of NZP configuration", "nfapi.csi.rs.num.of.nzp.configurations",
9985                         FT_UINT8, BASE_DEC, NULL, 0x0,
9986                         "Bitmap of 16 bits. Encoding format of bitmap follows section 6.10.5.2 of 36.211", HFILL }
9987                 },
9988                 { &hf_nfapi_csi_rs_number_of_nzp_configurations,
9989                         { "CSI RS zero Tx Power Resource config bitmap R10", "nfapi.csi.rs.zero.tx.power.resource.config.bitmap.r10",
9990                         FT_UINT16, BASE_DEC, NULL, 0x0,
9991                         "Indicates the number of Non-Zero power CSI-RS configurations.", HFILL }
9992                 },
9993                 { &hf_nfapi_pdsch_start,
9994                         { "PDSCH_start", "nfapi.pdsch.start",
9995                         FT_UINT8, BASE_DEC, NULL, 0x0,
9996                         "Per UE starting OFDM symbol for the PDSCH, impacts the mapping of PDSCH to REs", HFILL }
9997                 },
9998                 { &hf_nfapi_drms_config_flag,
9999                         { "DMRS Config flag", "nfapi.drms.config.flag",
10000                         FT_UINT8, BASE_DEC, VALS(not_used_enabled_vals), 0x0,
10001                         "Indicates if the DMRS Config parameter is valid", HFILL }
10002                 },
10003                 { &hf_nfapi_drms_scrambling,
10004                         { "DMRS Scrambling", "nfapi.drms.scrambling",
10005                         FT_UINT16, BASE_DEC, NULL, 0x0,
10006                         "The scrambling identity for UE specific reference signals.", HFILL }
10007                 },
10008                 { &hf_nfapi_csi_config_flag,
10009                         { "CSI Config flag", "nfapi.csi.config.flag",
10010                         FT_UINT8, BASE_DEC, VALS(not_used_enabled_vals), 0x0,
10011                         "Indicates if the CSI Config parameter is valid", HFILL }
10012                 },
10013                 { &hf_nfapi_csi_scrambling,
10014                         { "CSI Scrambling", "nfapi.csi.scrambling",
10015                         FT_UINT16, BASE_DEC, NULL, 0x0,
10016                         "The scrambling identity for CSI.", HFILL }
10017                 },
10018                 { &hf_nfapi_pdsch_re_mapping_flag,
10019                         { "PDSCH RE mapping flag", "nfapi.pdsch.remapping.flag",
10020                         FT_UINT8, BASE_DEC, VALS(not_used_enabled_vals), 0x0,
10021                         "Indicates if the PDSCH RE parameters are valid.", HFILL }
10022                 },
10023                 { &hf_nfapi_pdsch_re_mapping_antenna_ports,
10024                         { "PDSCH RE mapping antenna ports", "nfapi.pdsch.remapping.antenna.ports",
10025                         FT_UINT8, BASE_DEC, NULL, 0x0,
10026                         "Indicates number of antennas used for PDSCH RE mapping", HFILL }
10027                 },
10028                 { &hf_nfapi_pdsch_re_mapping_freq_shift,
10029                         { "PDSCH RE mapping freq shift", "nfapi.pdsch.remapping.freq.shift",
10030                         FT_UINT8, BASE_DEC, NULL, 0x0,
10031                         "Indicates the frequency shift used for PDSCH RE mapping.", HFILL }
10032                 },
10033                 { &hf_nfapi_alt_cqi_table_r12,
10034                         { "altCQI-Table-r12", "nfapi.alt.cqi.table.r12",
10035                         FT_UINT8, BASE_DEC, NULL, 0x0,
10036                         "altCQI-Table-r12 is indicative of using an alternative MCS table for UEs supporting 256QAM."
10037                         "This is taken into account  for calculation of soft buffer size for the transport block", HFILL }
10038                 },
10039                 { &hf_nfapi_max_layers,
10040                         { "MaxLayers", "nfapi.max.layers",
10041                         FT_UINT16, BASE_DEC, NULL, 0x0,
10042                         "Maximal number of negotiated / configured layers for a UE, used for the calculation of soft buffer size for the transport block", HFILL }
10043                 },
10044                 { &hf_nfapi_n_dl_harq,
10045                         { "N_DL_HARQ", "nfapi.n.dl.harq",
10046                         FT_UINT8, BASE_DEC, NULL, 0x0,
10047                         NULL, HFILL }
10048                 },
10049                 { &hf_nfapi_dwpts_symbols,
10050                         { "DwPTS Symbols", "nfapi.dwpts.symbols",
10051                         FT_UINT8, BASE_DEC, NULL, 0x0,
10052                         "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 }
10053                 },
10054                 { &hf_nfapi_initial_lbt_sf,
10055                         { "Initial LBT SF", "nfapi.initial.lbt.sf",
10056                         FT_UINT8, BASE_DEC, NULL, 0x0,
10057                         "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 }
10058                 },
10059                 { &hf_nfapi_ue_type,
10060                         { "UE Type", "nfapi.ue.type",
10061                         FT_UINT8, BASE_DEC, VALS(dlsch_re13_ue_type_vals), 0x0,
10062                         NULL, HFILL }
10063                 },
10064                 { &hf_nfapi_pdsch_payload_type,
10065                         { "PDSCH Payload Type", "nfapi.pdsch.payload.type",
10066                         FT_UINT8, BASE_DEC, VALS(dlsch_re13_pdsch_payload_type_vals), 0x0,
10067                         NULL, HFILL }
10068                 },
10069                 { &hf_nfapi_initial_transmission_sf,
10070                         { "Initial transmission SF (io)", "nfapi.init.tx.sf.io",
10071                         FT_UINT16, BASE_DEC, NULL, 0x0,
10072                         "Absolute Sub-Frame  of the initial transmission", HFILL }
10073                 },
10074                 { &hf_nfapi_req13_drms_table_flag,
10075                         { "Rel-13-DMRS-tabe flag", "nfapi.r13.drms.table.flag",
10076                         FT_UINT8, BASE_DEC, NULL, 0x0,
10077                         "Indicates if Release 13 DMRS table is used.", HFILL }
10078                 },
10079                 { &hf_nfapi_csi_rs_resource_index,
10080                         { "CSI-RS resource index", "nfapi.csi.rs.resource.index",
10081                         FT_UINT8, BASE_DEC, NULL, 0x0,
10082                         "Index of the CSI-RS resource. This is included to link bfValues to CSI-RS resources included in Release 10 parameters.", HFILL }
10083                 },
10084                 { &hf_nfapi_csi_rs_class,
10085                         { "Class", "nfapi.csi.rs.class",
10086                         FT_UINT8, BASE_DEC, VALS(csi_rs_class_vals), 0x0,
10087                         "Indicates CSI-RS class", HFILL }
10088                 },
10089                 { &hf_nfapi_cdm_type,
10090                         { "CDM Type", "nfapi.cdm.type",
10091                         FT_UINT8, BASE_DEC, VALS(csi_rs_cdm_type_vals), 0x0,
10092                         "Indicates CDM type for CSI-RS. See [36.211] section 6.10.5.2. Valid for Class A", HFILL }
10093                 },
10094                 { &hf_nfapi_edpcch_prb_index,
10095                         { "EPDCCH PRB index", "nfapi.edpcch.prb.index",
10096                         FT_UINT8, BASE_DEC, NULL, 0x0,
10097                         "PRB index", HFILL }
10098                 },
10099                 { &hf_nfapi_epdcch_resource_assignment_flag,
10100                         { "EPDCCH Resource assignment flag", "nfapi.epdcch.resource.assignment.flag",
10101                         FT_UINT8, BASE_DEC, VALS(local_distributed_vals), 0x0,
10102                         "Type of virtual resource block used", HFILL }
10103                 },
10104                 { &hf_nfapi_epdcch_id,
10105                         { "EPDCCH ID", "nfapi.epdcch.id",
10106                         FT_UINT8, BASE_DEC, NULL, 0x0,
10107                         "EPDCCH index- used for the scrambler initiation The DMRS scrambling sequence initialization parameter defined in[11] section 6.10.3A.1", HFILL }
10108                 },
10109                 { &hf_nfapi_epdcch_start_symbol,
10110                         { "EPDCCH Start Symbol", "nfapi.epdcch.start.symbol",
10111                         FT_UINT8, BASE_DEC, NULL, 0x0,
10112                         "Indicates the OFDM starting symbol for any EPDCCH and PDSCH", HFILL }
10113                 },
10114                 { &hf_nfapi_epdcch_num_prb,
10115                         { "EPDCCH NumPRB", "nfapi.epdcch.num.prb",
10116                         FT_UINT8, BASE_DEC, NULL, 0x0,
10117                         "Number of PRBs allocated for EPDCCH", HFILL }
10118                 },
10119                 { &hf_nfapi_precoding_value,
10120                         { "Precoding value", "nfapi.precoding.value",
10121                         FT_UINT16, BASE_DEC, NULL, 0x0,
10122                         "Precoding element for physical antenna #i real 8 bits followed by imaginary 8 bits", HFILL }
10123                 },
10124                 { &hf_nfapi_mpdcch_narrowband,
10125                         { "MPDCCH Narrowband", "nfapi.mpdcch.narrowband",
10126                         FT_UINT8, BASE_DEC, NULL, 0x0,
10127                         "Narrowband for MPDCCH", HFILL }
10128                 },
10129                 { &hf_nfapi_number_of_prb_pairs,
10130                         { "Number of PRB pairs", "nfapi.number.prb.pairs",
10131                         FT_UINT8, BASE_DEC, NULL, 0x0,
10132                         "Number of PRB-pairs constituting the MPDCCH-PRB-pair set", HFILL }
10133                 },
10134                 { &hf_nfapi_resource_block_assignment,
10135                         { "Resource Block Assignment", "nfapi.resource.block.assignement",
10136                         FT_UINT8, BASE_DEC, NULL, 0x0,
10137                         "Combinational index r", HFILL }
10138                 },
10139                 { &hf_nfapi_start_symbol,
10140                         { "Start symbol", "nfapi.start.symbol",
10141                         FT_UINT8, BASE_DEC, NULL, 0x0,
10142                         NULL, HFILL }
10143                 },
10144                 { &hf_nfapi_ecce_index,
10145                         { "ECCE index", "nfapi.ecce.index",
10146                         FT_UINT8, BASE_DEC, NULL, 0x0,
10147                         "CCE index used to send the DCI", HFILL }
10148                 },
10149                 { &hf_nfapi_ce_mode,
10150                         { "CE Mode", "nfapi.ce.mode",
10151                         FT_UINT8, BASE_DEC, VALS(ce_mode_vals), 0x0,
10152                         NULL, HFILL }
10153                 },
10154                 { &hf_nfapi_drms_scrabmling_init,
10155                         { "DMRS scrambling init", "nfapi.drms.scrambling.init",
10156                         FT_UINT16, BASE_DEC, NULL, 0x0,
10157                         "The DMRS scrambling sequence initialization parameter defined in [11] section 6.10.3A.1", HFILL }
10158                 },
10159                 { &hf_nfapi_pdsch_reception_levels,
10160                         { "PDSCH repetition levels", "nfapi.pdsch.repetition.levels",
10161                         FT_UINT8, BASE_DEC, NULL, 0x0,
10162                         "Valid for DCI formats: 6-0A, 6-0B", HFILL }
10163                 },
10164                 { &hf_nfapi_new_data_indicator,
10165                         { "New data indicator", "nfapi.new.data.indicator",
10166                         FT_UINT8, BASE_DEC, NULL, 0x0,
10167                         "The new data indicator for the transport block", HFILL }
10168                 },
10169                 { &hf_nfapi_tpmi_length,
10170                         { "TPMI length", "nfapi.tpmi.length",
10171                         FT_UINT8, BASE_DEC, NULL, 0x0,
10172                         "Length of 'TPMI' field in units of bits", HFILL }
10173                 },
10174                 { &hf_nfapi_pmi_flag,
10175                         { "PMI flag", "nfapi.pmi.flag",
10176                         FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
10177                         "Indicates if 'PMI' field is present", HFILL }
10178                 },
10179                 { &hf_nfapi_harq_resource_offset,
10180                         { "HARQ resource offset", "nfapi.harq.resource.offset",
10181                         FT_UINT8, BASE_DEC, NULL, 0x0,
10182                         "HARQ-ACK resource offset used", HFILL }
10183                 },
10184                 { &hf_nfapi_dci_subframe_repetition_number,
10185                         { "DCI subframe repetition number", "nfapi.dci.subframe.repetition.number",
10186                         FT_UINT8, BASE_DEC, NULL, 0x0,
10187                         "Indicates the number of MPDCCH repetitions", HFILL }
10188                 },
10189                 { &hf_nfapi_downlink_assignment_index_length,
10190                         { "Downlink assignment index Length", "nfapi.dl.assignement.index.length",
10191                         FT_UINT8, BASE_DEC, NULL, 0x0,
10192                         "Length of Downlink assignment index field in units of bits.", HFILL }
10193                 },
10194                 { &hf_nfapi_starting_ce_level,
10195                         { "Starting CE Level", "nfapi.starting.ce.level",
10196                         FT_UINT8, BASE_DEC, NULL, 0x0,
10197                         "2 bits provide the PRACH starting CE level", HFILL }
10198                 },
10199                 { &hf_nfapi_antenna_ports_and_scrambling_identity_flag,
10200                         { "Antenna ports and scrambling identity flag", "nfapi.antenna.ports.and.scrambling.identity.flag",
10201                         FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
10202                         "Indicates if 'Antenna ports and scrambling identity' field is present.", HFILL }
10203                 },
10204                 { &hf_nfapi_antenna_ports_and_scrambling_identity,
10205                         { "Antenna ports and scrambling identity", "nfapi.antenna.ports.and.scrambling.identit",
10206                         FT_UINT8, BASE_DEC, NULL, 0x0,
10207                         "Indicates the Antenna port and, scrambling identity value", HFILL }
10208                 },
10209                 { &hf_nfapi_paging_direct_indication_differentiation_flag,
10210                         { "Paging/Direct indication differentiation flag", "nfapi.paging.direct.indictation.differentiation.flag",
10211                         FT_UINT8, BASE_DEC, VALS(paging_direct_indication_differtiation_flag_vals), 0x0,
10212                         "Valid for DCI format 6-2", HFILL }
10213                 },
10214                 { &hf_nfapi_direct_indication,
10215                         { "Direct indication", "nfapi.direct.indication",
10216                         FT_UINT8, BASE_DEC, NULL, 0x0,
10217                         "Valid for DCI format 6-2", HFILL }
10218                 },
10219                 { &hf_nfapi_number_of_tx_antenna_ports,
10220                         { "Number of TX Antenna ports", "nfapi.num.of.tx.antenna.ports.",
10221                         FT_UINT8, BASE_DEC, NULL, 0x0,
10222                         "Number of TX physical antenna ports", HFILL }
10223                 },
10224                 { &hf_nfapi_transmission_power,
10225                         { "Transmission Power", "nfapi.transmission_power",
10226                         FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
10227                         "Offset to the reference signal power.", HFILL }
10228                 },
10229                 { &hf_nfapi_mbsfn_area_id,
10230                         { "MBSFN Area id", "nfapi.mbsfn.area.id",
10231                         FT_UINT16, BASE_DEC, NULL, 0x0,
10232                         "Indicates MBSFN area ID", HFILL }
10233                 },
10234                 { &hf_nfapi_dl_dci_format,
10235                         { "DL DCI format", "nfapi.dl.dci.format",
10236                         FT_UINT8, BASE_DEC, VALS(dl_dci_format_vals), 0x0,
10237                         "Format of the DL DCI", HFILL }
10238                 },
10239                 { &hf_nfapi_ul_dci_format,
10240                         { "UL DCI format", "nfapi.ul_dci.format",
10241                         FT_UINT8, BASE_DEC, VALS(ul_dci_format_vals), 0x0,
10242                         "Format of the UL DCI", HFILL }
10243                 },
10244                 { &hf_nfapi_mpdcch_ul_dci_format,
10245                         { "UL DCI format", "nfapi.mpdcch.ul_dci.format",
10246                         FT_UINT8, BASE_DEC, VALS(mpdcch_ul_dci_format_vals), 0x0,
10247                         "Format of the UL DCI", HFILL }
10248                 },
10249                 { &hf_nfapi_cce_idx,
10250                         { "CCE index", "nfapi.cce.index",
10251                         FT_UINT8, BASE_DEC, NULL, 0x0,
10252                         "CCE index used to send the DCI", HFILL }
10253                 },
10254                 { &hf_nfapi_aggregation_level,
10255                         { "Aggregation level", "nfapi.aggregation.level",
10256                         FT_UINT8, BASE_DEC, NULL, 0x0,
10257                         "The aggregation level used", HFILL }
10258                 },
10259                 { &hf_nfapi_mcs_1,
10260                         { "MCS_1", "nfapi.mcs_1",
10261                         FT_UINT8, BASE_DEC, NULL, 0x0,
10262                         "The modulation and coding scheme for 1st transport block", HFILL }
10263                 },
10264                 { &hf_nfapi_mcs_2,
10265                         { "MCS_2", "nfapi.mcs_2",
10266                         FT_UINT8, BASE_DEC, NULL, 0x0,
10267                         "The modulation and coding scheme for 2nd transport block", HFILL }
10268                 },
10269                 { &hf_nfapi_redundancy_version_1,
10270                         { "Redundancy version_1", "nfapi.redundancy.version.1",
10271                         FT_UINT8, BASE_DEC, NULL, 0x0,
10272                         "The redundancy version for 1st transport block.", HFILL }
10273                 },
10274                 { &hf_nfapi_redundancy_version_2,
10275                         { "Redundancy version_2", "nfapi.redundancy.version.2",
10276                         FT_UINT8, BASE_DEC, NULL, 0x0,
10277                         "The redundancy version for 2nd transport block", HFILL }
10278                 },
10279                 { &hf_nfapi_new_data_indicator_1,
10280                         { "New data indicator_1", "nfapi.new.data.indicator.1",
10281                         FT_UINT8, BASE_DEC, NULL, 0x0,
10282                         "The new data indicator for 1st transport block.", HFILL }
10283                 },
10284                 { &hf_nfapi_new_data_indicator_2,
10285                         { "New data indicator_2", "nfapi.new.data.indicator.2",
10286                         FT_UINT8, BASE_DEC, NULL, 0x0,
10287                         "The new data indicator for 2nd transport block.", HFILL }
10288                 },
10289                 { &hf_nfapi_harq_process,
10290                         { "HARQ process", "nfapi.harq.process",
10291                         FT_UINT8, BASE_DEC, NULL, 0x0,
10292                         "HARQ process number", HFILL }
10293                 },
10294                 { &hf_nfapi_tpmi,
10295                         { "TPMI", "nfapi.tpmi",
10296                         FT_UINT8, BASE_DEC, NULL, 0x0,
10297                         "The codebook index to be used for precoding", HFILL }
10298                 },
10299                 { &hf_nfapi_pmi,
10300                         { "PMI", "nfapi.pmi",
10301                         FT_UINT8, BASE_DEC, VALS(pmi_vals), 0x0,
10302                         "Confirmation for precoding", HFILL }
10303                 },
10304                 { &hf_nfapi_precoding_information,
10305                         { "Precoding information", "nfapi.precoding.information",
10306                         FT_UINT8, BASE_DEC, NULL, 0x0,
10307                         NULL, HFILL }
10308                 },
10309                 { &hf_nfapi_tpc,
10310                         { "TPC", "nfapi.tpc",
10311                         FT_UINT8, BASE_DEC, NULL, 0x0,
10312                         "Tx power control command for PUCCH", HFILL }
10313                 },
10314                 { &hf_nfapi_downlink_assignment_index,
10315                         { "Downlink assignment index", "nfapi.downlink.assignment.index",
10316                         FT_UINT8, BASE_DEC, NULL, 0x0,
10317                         "The downlink assignment index. In release 8-11 this is only used in TDD mode, "
10318                         "value ignored for FDD. In release 12 or later a field indicating the structure "
10319                         "type of the primary cell is used to determine if this is valid with size 2 bits."
10320                         "In release 13 or later a field indicating codebooksizeDetermination - r13 = 0 is "
10321                         "used to determine is this field is valid with size 4 bits", HFILL }
10322                 },
10323                 { &hf_nfapi_ngap,
10324                         { "Ngap", "nfapi.ngap",
10325                         FT_UINT8, BASE_DEC, VALS(ngap_vals), 0x0,
10326                         "Used in virtual resource block distribution", HFILL }
10327                 },
10328                 { &hf_nfapi_transport_block_size_index,
10329                         { "Transport block size index", "nfapi.transport.block.size.index",
10330                         FT_UINT8, BASE_DEC, NULL, 0x0,
10331                         "The transport block size", HFILL }
10332                 },
10333                 { &hf_nfapi_downlink_power_offset,
10334                         { "Downlink power offset", "nfapi.downlink.power.offset",
10335                         FT_UINT8, BASE_DEC, NULL, 0x0,
10336                         "Indicates the DL power offset type for multi-user MIMO transmission", HFILL }
10337                 },
10338                 { &hf_nfapi_allocate_prach_flag,
10339                         { "Allocation PRACH flag", "nfapi.allocation.prach.flag",
10340                         FT_UINT8, BASE_DEC, VALS(true_false_vals), 0x0,
10341                         "Indicates that PRACH procedure is initiated", HFILL }
10342                 },
10343                 { &hf_nfapi_preamble_index,
10344                         { "Preamble index", "nfapi.preamable.index",
10345                         FT_UINT8, BASE_DEC, NULL, 0x0,
10346                         "The preamble index to be used on the PRACH", HFILL }
10347                 },
10348                 { &hf_nfapi_prach_mask_index,
10349                         { "PRACH mask index", "nfapi.prach.mask.index",
10350                         FT_UINT8, BASE_DEC, NULL, 0x0,
10351                         "The mask index to be used on the PRACH", HFILL }
10352                 },
10353                 { &hf_nfapi_rnti_type,
10354                         { "RNTI type", "nfapi.rnti.type",
10355                         FT_UINT8, BASE_DEC, VALS(rnti_type_vals), 0x0,
10356                         NULL, HFILL }
10357                 },
10358                 { &hf_nfapi_mpdcch_rnti_type,
10359                         { "RNTI type", "nfapi.mpdcch.rnti.type",
10360                         FT_UINT8, BASE_DEC, VALS(mpdcch_rnti_type_vals), 0x0,
10361                         NULL, HFILL }
10362                 },
10363                 { &hf_nfapi_mcch_flag,
10364                         { "MCCH flag", "nfapi.mcch.flag",
10365                         FT_BOOLEAN, BASE_NONE, TFS(&mcch_flag_string_name), 0x0,
10366                         "Indicates if format 1C is being used to signal a MCCH or SC-MCCH change notification", HFILL }
10367                 },
10368                 { &hf_nfapi_mcch_change_notification,
10369                         { "MCCH change notification", "nfapi.mcch.change.notification",
10370                         FT_UINT8, BASE_DEC, NULL, 0x0,
10371                         "MCCH or SC-MCCH Change Notification", HFILL }
10372                 },
10373                 { &hf_nfapi_scrambling_identity,
10374                         { "Scrambling identity", "nfapi.scrambling.identity",
10375                         FT_UINT8, BASE_DEC, NULL, 0x0,
10376                         "Indicates the scrambling identity value NSCID", HFILL }
10377                 },
10378                 { &hf_nfapi_cross_carrier_scheduling_flag,
10379                         { "Cross Carrier scheduling flag", "nfapi.cross.carrier.scheduling.flag",
10380                         FT_BOOLEAN, 8, TFS(&cross_carrier_scheduling_flag_strname), 0x0,
10381                         "Indicates if cross carrier scheduling has been enabled for the UE receiving this DCI", HFILL }
10382                 },
10383                 { &hf_nfapi_carrier_indicator,
10384                         { "Carrier Indicator", "nfapi.carrier.indicator",
10385                         FT_UINT8, BASE_DEC, NULL, 0x0,
10386                         "Serving Cell Index", HFILL }
10387                 },
10388                 { &hf_nfapi_srs_flag,
10389                         { "SRS flag", "nfapi.srs.flag",
10390                         FT_BOOLEAN, 8, TFS(&srs_flag_strname), 0x0,
10391                         "Indicates if the SRS request parameter is valid", HFILL }
10392                 },
10393                 { &hf_nfapi_srs_request,
10394                         { "SRS request", "nfapi.srs.request",
10395                         FT_BOOLEAN, 8, TFS(&srs_request_strname), 0x0,
10396                         "SRS request flag", HFILL }
10397                 },
10398                 { &hf_nfapi_antenna_ports_scrambling_and_layers,
10399                         { "Antenna ports scrambling and layers", "nfapi.antenna.ports.scrambling.and.layers",
10400                         FT_UINT8, BASE_DEC, NULL, 0x0,
10401                         "Indicates the Antenna port, scrambling identity value NSCID and number of layers", HFILL }
10402                 },
10403                 { &hf_nfapi_total_dci_length_including_padding,
10404                         { "Total DCI length including padding", "nfapi.total.dci.length.including.padding",
10405                         FT_UINT8, BASE_DEC, NULL, 0x0,
10406                         "The total DCI length including padding bits", HFILL }
10407                 },
10408                 { &hf_nfapi_n_ul_rb,
10409                         { "N_UL_RB", "nfapi.n.dl.rb",
10410                         FT_UINT8, BASE_DEC, NULL, 0x0,
10411                         "BW of serving cell for which the DCI was scheduled for.  This is valid for "
10412                         "the case of cross carrier scheduling, for the case of a self - "
10413                         "scheduling(cross carrier scheduling is not valid or Carrier indicator has value '0', "
10414                         "the BW is the 'DL BW support' as configured in configuration phase(params) "
10415                         "Uplink channel bandwidth in resource blocks", HFILL }
10416                 },
10417                 { &hf_nfapi_harq_ack_resource_offset,
10418                         { "HARQ-ACK resource offset", "nfapi.harq.ack.resource.offset",
10419                         FT_UINT8, BASE_DEC, NULL, 0x0,
10420                         "HARQ-ACK resource offset field is present only when this format is carried by EPDCCH.", HFILL }
10421                 },
10422                 { &hf_nfapi_pdsch_re_mapping_and_quasi_co_location_indicator,
10423                         { "PDSCH RE Mapping and Quasi-Co-Location Indicator", "nfapi.pdsch.re.mapping",
10424                         FT_UINT8, BASE_DEC, NULL, 0x0,
10425                         "Indicates the parameter set configured by the higher layers which the UE should use.", HFILL }
10426                 },
10427                 { &hf_nfapi_primary_cell_type,
10428                         { "Primary cell type", "nfapi.primary.cell.type",
10429                         FT_UINT8, BASE_DEC, VALS(primary_cells_type_vals), 0x0,
10430                         "Indicates the type of the primary cell.", HFILL }
10431                 },
10432                 { &hf_nfapi_ul_dl_configuration_flag,
10433                         { "UL/DL configuration flag", "nfapi.ul.dl.configuration.flag",
10434                         FT_BOOLEAN, 8, TFS(&ul_dl_configuration_flag_strname), 0x0,
10435                         "Indicates if format 1C is being used to signal UL/DL configuration", HFILL }
10436                 },
10437                 { &hf_nfapi_number_of_ul_dl_configurations,
10438                         { "Number of UL/DL configurations", "nfapi.number.ul.dl.configurations",
10439                         FT_UINT8, BASE_DEC, NULL, 0x0,
10440                         NULL, HFILL }
10441                 },
10442                 { &hf_nfapi_ul_dl_configuration_index,
10443                         { "UL/DL configuration indication", "nfapi.ul.dl.configuration.indication",
10444                         FT_UINT8, BASE_DEC, NULL, 0x0,
10445                         "UL/DL configuration index", HFILL }
10446                 },
10447                 { &hf_nfapi_laa_end_partial_sf_flag,
10448                         { "LAA end partial SF flag", "nfapi.laa.end.partial.sf.flag",
10449                         FT_UINT8, BASE_DEC, NULL, 0x0,
10450                         "Indicates if DCI format 1C is being used to signal LAA end partial SF (valid if end partial SF support configuraton is set)", HFILL }
10451                 },
10452                 { &hf_nfapi_laa_end_partial_sf_configuration,
10453                         { "LAA end partial SF configuration", "nfapi.laa.end.partial.sf.configuration",
10454                         FT_UINT8, BASE_DEC, NULL, 0x0,
10455                         "If DCI format 1C scrambled by CC - RNTI is used to signal end partial SF, this field "
10456                         "contains LAA common information (4 bits used in [9] Table 13A-1 for configuration of "
10457                         "occupied OFDM symbols for current and next SF)", HFILL }
10458                 },
10459                 { &hf_nfapi_codebooksize_determination_r13,
10460                         { "Codebook Size Determination R13", "nfapi.codebook.size.determination.r13",
10461                         FT_UINT8, BASE_DEC, NULL, 0x0,
10462                         "Indicates if the downlink assignment index parameter (DAI) is 4 bits", HFILL }
10463                 },
10464                 { &hf_nfapi_rel13_drms_table_flag,
10465                         { "Rel-13-DMRS-tabe flag", "nfapi.drms.table.flag.r13",
10466                         FT_UINT8, BASE_DEC, NULL, 0x0,
10467                         "Indicates if Release 13 DMRS table for be used", HFILL }
10468                 },
10469                 { &hf_nfapi_pscch_resource,
10470                         { "PSCCH Resource", "nfapi.pscch.resource",
10471                         FT_UINT8, BASE_DEC, NULL, 0x0,
10472                         "6-bits describing the resource blocks for transmitting PSCCH", HFILL }
10473                 },
10474                 { &hf_nfapi_time_resource_pattern,
10475                         { "Time resource pattern", "nfapi.time.resource.pattern",
10476                         FT_UINT8, BASE_DEC, NULL, 0x0,
10477                         "7-bits describing the time resource pattern index", HFILL }
10478                 },
10479                 { &hf_nfapi_mpdcch_transmission_type,
10480                         { "MPDCCH transmission type", "nfapi.mpdcch.transmission.type",
10481                         FT_UINT8, BASE_DEC, VALS(local_distributed_vals), 0x0,
10482                         NULL, HFILL }
10483                 },
10484                 { &hf_nfapi_drms_scrambling_init,
10485                         { "DMRS scrambling init", "nfapi.drms.scrambling.init",
10486                         FT_UINT8, BASE_DEC, NULL, 0x0,
10487                         "The DMRS scrambling sequence initialization", HFILL }
10488                 },
10489                 { &hf_nfapi_pusch_repetition_levels,
10490                         { "PUSCH repetition levels", "nfapi.pusch.repetition.levels",
10491                         FT_UINT8, BASE_DEC, NULL, 0x0,
10492                         "Valid for DCI formats: 6-0A, 6-0B", HFILL }
10493                 },
10494                 { &hf_nfapi_frequency_hopping_flag,
10495                         { "Frequency hopping flag", "nfapi.frequency.hopping.flag",
10496                         FT_UINT8, BASE_DEC, NULL, 0x0,
10497                         "Indicates if hopping is being used.", HFILL }
10498                 },
10499                 { &hf_nfapi_csi_request,
10500                         { "CSI request", "nfapi.csi.request",
10501                         FT_UINT8, BASE_DEC, VALS(csi_request_vals), 0x0,
10502                         "Aperiodic CSI request flag", HFILL }
10503                 },
10504                 { &hf_nfapi_dai_presence_flag,
10505                         { "DAI presence flag", "nfapi.dia.presence.flag",
10506                         FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
10507                         "Indicates if DL assignment index field is present in the DCI", HFILL }
10508                 },
10509                 { &hf_nfapi_total_dci_length_include_padding,
10510                         { "Total DCI length including padding", "nfapi.total.dci.length.including.padding",
10511                         FT_UINT8, BASE_DEC, NULL, 0x0,
10512                         "The total DCI length including padding bits", HFILL }
10513                 },
10514                 { &hf_nfapi_csi_rs_antenna_port_count_r10,
10515                         { "CSI-RS antenna port count r10", "nfapi.csi.rs.antenna.port.count.r10",
10516                         FT_UINT8, BASE_DEC, NULL, 0x0,
10517                         "Indicates number of antennas used for transmission of CSI reference signal.", HFILL }
10518                 },
10519                 { &hf_nfapi_ul_config_pdu_type,
10520                         { "UL Config PDU Type", "nfapi.ul.config.pdu.type",
10521                         FT_UINT8, BASE_DEC, VALS(nfapi_ul_config_pdu_type_vals), 0x0,
10522                         NULL, HFILL }
10523                 },
10524                 { &hf_nfapi_rach_prach_frequency_resources,
10525                         { "RACH PRACH Frequency resources", "nfapi.rach.prach.frequency.resources",
10526                         FT_UINT8, BASE_DEC, NULL, 0x0,
10527                         "If semi-static information is held in the MAC", HFILL }
10528                 },
10529                 { &hf_nfapi_srs_present,
10530                         { "SRS present", "nfapi.srs.present",
10531                         FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
10532                         "If semi-static information is held in the MAC", HFILL }
10533                 },
10534                 { &hf_nfapi_handle,
10535                         { "Handle", "nfapi.handle",
10536                         FT_UINT32, BASE_DEC, NULL, 0x0,
10537                         "An opaque handle", HFILL }
10538                 },
10539                 { &hf_nfapi_pucch_index,
10540                         { "PUCCH Index", "nfapi.pucch.index",
10541                         FT_UINT16, BASE_DEC, NULL, 0x0,
10542                         "The PUCCH index value", HFILL }
10543                 },
10544                 { &hf_nfapi_size,
10545                         { "Size", "nfapi.size",
10546                         FT_UINT16, BASE_DEC, NULL, 0x0,
10547                         "The size of the ULSCH PDU in bytes as defined by the relevant UL grant", HFILL }
10548                 },
10549                 { &hf_nfapi_resource_block_start,
10550                         { "Resource block start", "nfapi.resource.block.start",
10551                         FT_UINT8, BASE_DEC, NULL, 0x0,
10552                         "The starting resource block for this ULSCH allocation", HFILL }
10553                 },
10554                 { &hf_nfapi_number_of_resource_blocks,
10555                         { "Number of resource blocks", "nfapi.resource.blocks",
10556                         FT_UINT8, BASE_DEC, NULL, 0x0,
10557                         "The number of resource blocks allocated to this ULSCH grant", HFILL }
10558                 },
10559                 { &hf_nfapi_cyclic_shift_2_for_drms,
10560                         { "Cyclic Shift 2 for DRMS", "nfapi.cyclic.shift.2.for.drms",
10561                         FT_UINT8, BASE_DEC, NULL, 0x0,
10562                         "The 2nd cyclic shift for DMRS assigned to the UE in the ULSCH grant", HFILL }
10563                 },
10564                 { &hf_nfapi_frequency_hopping_enabled_flag,
10565                         { "Frequency hopping enabled flag", "nfapi.frequency.hopping.enabled.flag",
10566                         FT_UINT8, BASE_DEC, VALS(hopping_vals), 0x0,
10567                         "Indicates if hopping is being used", HFILL }
10568                 },
10569                 { &hf_nfapi_frequency_hopping_bits,
10570                         { "Frequency hopping bits", "nfapi.frequency.hopping.bits",
10571                         FT_UINT8, BASE_DEC, NULL, 0x0,
10572                         NULL, HFILL }
10573                 },
10574                 { &hf_nfapi_new_data_indication,
10575                         { "New Data inidication", "nfapi.new.data.indication",
10576                         FT_UINT8, BASE_DEC, NULL, 0x0,
10577                         "Specify whether this received transport block is a new transmission from UE", HFILL }
10578                 },
10579                 { &hf_nfapi_harq_process_number,
10580                         { "HARQ Process number", "nfapi.harq.process.number",
10581                         FT_UINT8, BASE_DEC, NULL, 0x0,
10582                         NULL, HFILL }
10583                 },
10584                 { &hf_nfapi_ul_tx_mode,
10585                         { "UL Tx Mode", "nfapi.ul.tx.mode",
10586                         FT_UINT8, BASE_DEC, VALS(ul_tx_mode_vals), 0x0,
10587                         NULL, HFILL }
10588                 },
10589                 { &hf_nfapi_current_tx_nb,
10590                         { "Current Tx nb", "nfapi.current.tx.nb",
10591                         FT_UINT8, BASE_DEC, NULL, 0x0,
10592                         "The current HARQ transmission count of this transport block. Valid if frequency hopping enabled.", HFILL }
10593                 },
10594                 { &hf_nfapi_n_srs,
10595                         { "N SRS", "nfapi.n.srs",
10596                         FT_UINT8, BASE_DEC, VALS(n_srs_vals), 0x0,
10597                         "Indicates if the resource blocks allocated for this grant overlap with the SRS configuration.", HFILL }
10598                 },
10599                 { &hf_nfapi_disable_sequence_hopping_flag,
10600                         { "Disable seqeunce hopping flag", "nfapi.disable.sequence.hopping.flag",
10601                         FT_UINT8, BASE_DEC, NULL, 0x0,
10602                         "Indicates if any configured group hopping should be disabled for this UE.", HFILL }
10603                 },
10604                 { &hf_nfapi_virtual_cell_id_enabled_flag,
10605                         { "Virtual cell ID enabled flag", "nfapi.virtual.cell.id.enabled.flag",
10606                         FT_UINT8, BASE_DEC, VALS(not_used_enabled_vals), 0x0,
10607                         "Indicates if virtual cell is being used and nPUSCH identity is valid.", HFILL }
10608                 },
10609                 { &hf_nfapi_npusch_identity,
10610                         { "nPUSCH Identity", "nfapi.npusch.identity",
10611                         FT_UINT16, BASE_DEC, NULL, 0x0,
10612                         "Virtual cell ID for initialization of group hopping, sequence hopping and sequence shift pattern of PUSCH DMRS.", HFILL }
10613                 },
10614                 { &hf_nfapi_ndrms_csh_identity,
10615                         { "nDMRS-CSH Identity", "nfapi.ndrms.csh.identity",
10616                         FT_UINT16, BASE_DEC, NULL, 0x0,
10617                         "Virtual cell ID for initialization of cyclic shift hopping of PUSCH DMRS.", HFILL }
10618                 },
10619                 { &hf_nfapi_total_number_of_repetitions,
10620                         { "Total Number of repetitions", "nfapi.total.number.of.repetitions",
10621                         FT_UINT16, BASE_DEC, NULL, 0x0,
10622                         NULL, HFILL }
10623                 },
10624                 { &hf_nfapi_repetition_number,
10625                         { "Repetition Number", "nfapi.repetition.number",
10626                         FT_UINT16, BASE_DEC, NULL, 0x0,
10627                         "Current transmission number", HFILL }
10628                 },
10629                 { &hf_nfapi_initial_sf_io,
10630                         { "Initial transmission SF (io)", "nfapi.initial.sf.io",
10631                         FT_UINT16, BASE_DEC, NULL, 0x0,
10632                         "Absolute Sub-Frame  of the initial transmission", HFILL }
10633                 },
10634                 { &hf_nfapi_empty_symbols_due_to_retunning,
10635                         { "Empy symbols due to re-tunning", "nfapi.empty.symbols.due.to.retunning",
10636                         FT_UINT8, BASE_DEC, NULL, 0x0,
10637                         "Indicates the symbols that are left empty due to eMTC retuning.", HFILL }
10638                 },
10639                 { &hf_nfapi_dl_cqi_ri_pmi_size_2,
10640                         { "DL CQI/PMI/RI size 2", "nfapi.dl.cqi.ri.pmi.size.2",
10641                         FT_UINT16, BASE_DEC, NULL, 0x0,
10642                         "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 }
10643                 },
10644                 { &hf_nfapi_harq_size_2,
10645                         { "HARQ Size 2", "nfapi.harq.size2",
10646                         FT_UINT8, BASE_DEC, NULL, 0x0,
10647                         "The size of the ACK/NACK in bits.", HFILL }
10648                 },
10649                 { &hf_nfapi_delta_offset_harq_2,
10650                         { "Delta Offset HARQ 2", "nfapi.delta.offset.harq.2",
10651                         FT_UINT8, BASE_DEC, NULL, 0x0,
10652                         "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 }
10653                 },
10654                 { &hf_nfapi_starting_prb,
10655                         { "Starting PRB", "nfapi.starting.prb",
10656                         FT_UINT8, BASE_DEC, NULL, 0x0,
10657                         "The starting PRB for the PUCCH", HFILL }
10658                 },
10659                 { &hf_nfapi_antenna_port,
10660                         { "Antenna Port", "nfapi.antenna.port",
10661                         FT_UINT8, BASE_DEC, VALS(antenna_ports_vals), 0x0,
10662                         "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 }
10663                 },
10664                 { &hf_nfapi_number_of_combs,
10665                         { "Number of Combs", "nfapi.num.of.combs",
10666                         FT_UINT8, BASE_DEC, VALS(combs_vals), 0x0,
10667                         "Defines the maximum number of transmission combs (TC).", HFILL }
10668                 },
10669                 { &hf_nfapi_npucch_identity,
10670                         { "nPUCCH Identity", "nfapi.npucch.identity",
10671                         FT_UINT16, BASE_DEC, NULL, 0x0,
10672                         "Virtual cell ID for initialization of base sequence and cyclic shift hopping of PUCCH.", HFILL }
10673                 },
10674                 { &hf_nfapi_empty_symbols,
10675                         { "Empty symbols", "nfapi.empty.symbols",
10676                         FT_UINT8, BASE_DEC, NULL, 0x0,
10677                         "Indicates the symbols that are left empty due to eMTC retuning.", HFILL }
10678                 },
10679                 { &hf_nfapi_csi_mode,
10680                         { "CSI_mode", "nfapi.csi.mode",
10681                         FT_UINT8, BASE_DEC, VALS(csi_mode_vals), 0x0,
10682                         NULL, HFILL }
10683                 },
10684                 { &hf_nfapi_dl_cqi_pmi_size_2,
10685                         { "DL CQI/PMI Size 2", "nfapi.dl.cqi.pmi.size.2",
10686                         FT_UINT16, BASE_DEC, NULL, 0x0,
10687                         "The size of the DL CQI/PMI in bits", HFILL }
10688                 },
10689                 { &hf_nfapi_statring_prb,
10690                         { "Starting PRB", "nfapi.starting.prb",
10691                         FT_UINT8, BASE_DEC, NULL, 0x0,
10692                         "The starting PRB for the PUCCH", HFILL }
10693                 },
10694                 { &hf_nfapi_cdm_index,
10695                         { "cdm_Index", "nfapi.cdm.index",
10696                         FT_UINT8, BASE_DEC, NULL, 0x0,
10697                         "Selected CDM option", HFILL }
10698                 },
10699                 { &hf_nfapi_nsrs,
10700                         { "N srs", "nfapi.n.srs",
10701                         FT_UINT8, BASE_DEC, NULL, 0x0,
10702                         "Indicates if the resource blocks allocated for this grant overlap with the SRS configuration.", HFILL }
10703                 },
10704                 { &hf_nfapi_num_ant_ports,
10705                         { "Num_ant_ports", "nfapi.num.ant.port",
10706                         FT_UINT8, BASE_DEC, NULL, 0x0,
10707                         "The number of antenna ports used by the UE transmit", HFILL }
10708                 },
10709                 { &hf_nfapi_n_pucch_2_0,
10710                         { "n_PUCCH_2_0", "nfapi.n.pucch.2.0",
10711                         FT_UINT16, BASE_DEC, NULL, 0x0,
10712                         "The PUCCH Index value for ACK/NACK HARQ resource 4 on antenna port", HFILL }
10713                 },
10714                 { &hf_nfapi_n_pucch_2_1,
10715                         { "n_PUCCH_2_1", "nfapi.n.pucch.2.1",
10716                         FT_UINT16, BASE_DEC, NULL, 0x0,
10717                         "HARQ resource 5", HFILL }
10718                 },
10719                 { &hf_nfapi_n_pucch_2_2,
10720                         { "n_PUCCH_2_2", "nfapi.n.pucch.2.2",
10721                         FT_UINT16, BASE_DEC, NULL, 0x0,
10722                         "HARQ resource 6", HFILL }
10723                 },
10724                 { &hf_nfapi_n_pucch_2_3,
10725                         { "n_PUCCH_2_3", "nfapi.n.pucch.2.3",
10726                         FT_UINT16, BASE_DEC, NULL, 0x0,
10727                         "HARQ resource 7", HFILL }
10728                 },
10729                 { &hf_nfapi_dl_cqi_pmi_size_rank_1,
10730                         { "DL CQI PMI size rank 1", "nfapi.dl.cqi.pmi.size.rank.1",
10731                         FT_UINT8, BASE_DEC, NULL, 0x0,
10732                         "The size of the DL CQI/PMI in bits in case of rank 1 report.", HFILL }
10733                 },
10734                 { &hf_nfapi_dl_cqi_pmi_size_rank_greater_1,
10735                         { "DL CQI PMI size rank greater 1", "nfapi.dl.cqi.pmi.size.rank.1",
10736                         FT_UINT8, BASE_DEC, NULL, 0x0,
10737                         "The size of the DL CQI/PMI in bits in case of rank>1 report.", HFILL }
10738                 },
10739                 { &hf_nfapi_ri_size,
10740                         { "RI size", "nfapi.ri.size",
10741                         FT_UINT8, BASE_DEC, NULL, 0x0,
10742                         "The size of RI in bits", HFILL }
10743                 },
10744                 { &hf_nfapi_delta_offset_cqi,
10745                         { "Delta offset cqi", "nfapi.delta.offset.cqi",
10746                         FT_UINT8, BASE_DEC, NULL, 0x0,
10747                         "Delta offset for CQI. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10748                 },
10749                 { &hf_nfapi_delta_offset_ri,
10750                         { "Delta offset ri", "nfapi.delta.offset.ri",
10751                         FT_UINT8, BASE_DEC, NULL, 0x0,
10752                         "Delta offset for RI. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10753                 },
10754                 { &hf_nfapi_harq_size,
10755                         { "HARQ size", "nfapi.harq_size",
10756                         FT_UINT8, BASE_DEC, NULL, 0x0,
10757                         "The size of the ACK/NACK in bits", HFILL }
10758                 },
10759                 { &hf_nfapi_delta_offset_harq,
10760                         { "Delta offset HARQ", "nfapi.delta.offset.harq",
10761                         FT_UINT8, BASE_DEC, NULL, 0x0,
10762                         "Delta offset for HARQ. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10763                 },
10764                 { &hf_nfapi_tdd_ack_nack_mode,
10765                         { "ACK NACK mode", "nfapi.tdd.ack.nack.mode",
10766                         FT_UINT8, BASE_DEC, VALS(nfapi_tdd_ack_nack_mode_vals), 0x0,
10767                         "The format of the ACK/NACK response expected. For TDD only.", HFILL }
10768                 },
10769                 { &hf_nfapi_fdd_ack_nack_mode,
10770                         { "ACK NACK mode", "nfapi.fdd.ack.nack.mode",
10771                         FT_UINT8, BASE_DEC, VALS(nfapi_fdd_ack_nack_mode_vals), 0x0,
10772                         "The format of the ACK/NACK response expected. For TDD only.", HFILL }
10773                 },
10774                 { &hf_nfapi_n_srs_initial,
10775                         { "N srs initial", "nfapi.n.srs.initial",
10776                         FT_UINT8, BASE_DEC, VALS(n_srs_initial_vals), 0x0,
10777                         NULL, HFILL }
10778                 },
10779                 { &hf_nfapi_initial_number_of_resource_blocks,
10780                         { "Initial number of resource blocks", "nfapi.initial.number.of.resource.blocks",
10781                         FT_UINT8, BASE_DEC, NULL, 0x0,
10782                         "The number of resource blocks used in the initial transmission of this transport block.", HFILL }
10783                 },
10784                 { &hf_nfapi_dl_cqi_pmi_size,
10785                         { "DL cqi pmi size", "nfapi.dl.cqi.pmi.size",
10786                         FT_UINT8, BASE_DEC, NULL, 0x0,
10787                         "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 }
10788                 },
10789                 { &hf_nfapi_report_type,
10790                         { "Report type", "nfapi.report.type",
10791                         FT_BOOLEAN, 8, TFS(&nfapi_csi_report_type_strname), 0x0,
10792                         "Type of CSI report", HFILL }
10793                 },
10794                 { &hf_nfapi_dl_cqi_ri_pmi_size,
10795                         { "DL CQI/PMI/RI size", "nfapi.dl.cqi.ri.pmi.size",
10796                         FT_UINT8, BASE_DEC, NULL, 0x0,
10797                         "The size of the DL CQI/PMI/RI/CRI in bits", HFILL }
10798                 },
10799                 { &hf_nfapi_control_type,
10800                         { "Control type", "nfapi.control.type",
10801                         FT_BOOLEAN, 8, TFS(&nfapi_control_type_string_name), 0x0,
10802                         NULL, HFILL }
10803                 },
10804                 { &hf_nfapi_number_of_cc,
10805                         { "Number of cc", "nfapi.number.of.cc",
10806                         FT_UINT8, BASE_DEC, NULL, 0x0,
10807                         "The number of CC in the aperiodic report", HFILL }
10808                 },
10809                 { &hf_nfapi_number_of_pucch_resource,
10810                         { "Number of PUCCH Resource", "nfapi.number.of.pucch.resource",
10811                         FT_UINT8, BASE_DEC, NULL, 0x0,
10812                         "A value of 2 indicates that the UE is configured to transmit on two antenna ports", HFILL }
10813                 },
10814                 { &hf_nfapi_pucch_index_p1,
10815                         { "PUCCH Index P1", "nfapi.pucch.index.p1",
10816                         FT_UINT16, BASE_DEC, NULL, 0x0,
10817                         "The PUCCH index value   for antenna port P1", HFILL }
10818                 },
10819                 { &hf_nfapi_n_pucch_1_0,
10820                         { "N PUCCH 1 0", "nfapi.n.pucch.1.0",
10821                         FT_UINT8, BASE_DEC, NULL, 0x0,
10822                         "HARQ resource 0", HFILL }
10823                 },
10824                 { &hf_nfapi_n_pucch_1_1,
10825                         { "N PUCCH 1 1", "nfapi.n.pucch.1.1",
10826                         FT_UINT8, BASE_DEC, NULL, 0x0,
10827                         "HARQ resource 1", HFILL }
10828                 },
10829                 { &hf_nfapi_n_pucch_1_2,
10830                         { "N PUCCH 1 2", "nfapi.n.pucch.1.2",
10831                         FT_UINT8, BASE_DEC, NULL, 0x0,
10832                         "HARQ resource 2", HFILL }
10833                 },
10834                 { &hf_nfapi_n_pucch_1_3,
10835                         { "N PUCCH 1 3", "nfapi.n.pucch.1.3",
10836                         FT_UINT8, BASE_DEC, NULL, 0x0,
10837                         "HARQ resource 3", HFILL }
10838                 },
10839                 { &hf_nfapi_srs_bandwidth,
10840                         { "SRS Bandwidth", "nfapi.srs.bandwidth",
10841                         FT_UINT8, BASE_DEC, NULL, 0x0,
10842                         "SRS Bandwidth. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10843                 },
10844                 { &hf_nfapi_frequency_domain_position,
10845                         { "Frequency Domain position", "nfapi.frequency.domain.position",
10846                         FT_UINT8, BASE_DEC, NULL, 0x0,
10847                         "Frequency-domain position, NRRC This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10848                 },
10849                 { &hf_nfapi_srs_hopping_bandwidth,
10850                         { "SRS hopping bandwidth", "nfapi.srs.hopping.bandwidth",
10851                         FT_UINT8, BASE_DEC, NULL, 0x0,
10852                         "Configures the frequency hopping on the SRS. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10853                 },
10854                 { &hf_nfapi_transmission_comb,
10855                         { "Transmission comb", "nfapi.transmission.comb",
10856                         FT_UINT8, BASE_DEC, NULL, 0x0,
10857                         "Configures the frequency location of the SRS. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10858                 },
10859                 { &hf_nfapi_i_srs,
10860                         { "I SRS", "nfapi.i.srs",
10861                         FT_UINT8, BASE_DEC, NULL, 0x0,
10862                         "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 }
10863                 },
10864                 { &hf_nfapi_sounding_reference_cyclic_shift,
10865                         { "Sounding reference cyclic shift", "nfapi.sounding.reference.cyclic.shift",
10866                         FT_UINT8, BASE_DEC, NULL, 0x0,
10867                         "Configures the SRS sequence generation. This value is fixed for a UE and allocated in RRC connection setup.", HFILL }
10868                 },
10869                 { &hf_nfapi_pdu_length,
10870                         { "PDU length", "nfapi.pdu.length",
10871                         FT_UINT16, BASE_DEC, NULL, 0x0,
10872                         "The total length (in bytes) of the PDU description and PDU data, without the padding bytes", HFILL }
10873                 },
10874                 { &hf_nfapi_crc_flag,
10875                         { "CRC flag", "nfapi.crc.flag",
10876                         FT_BOOLEAN, 8, TFS(&crc_flag_strname), 0x0,
10877                         "A flag indicating if a CRC error was detected", HFILL }
10878                 },
10879                 { &hf_nfapi_number_of_hi_pdus,
10880                         { "Number of HI Pdu's", "nfapi.number_of_hi_pdus",
10881                         FT_UINT8, BASE_DEC, NULL, 0x0,
10882                         "Number of HI PDUs included in this message", HFILL }
10883                 },
10884                 { &hf_nfapi_number_of_dci_pdus,
10885                         { "Number of DCI Pdu's", "nfapi.number_of_dci_pdus",
10886                         FT_UINT8, BASE_DEC, NULL, 0x0,
10887                         "Number of DCI PDUs included in this message", HFILL }
10888                 },
10889                 { &hf_nfapi_hi_dci0_pdu_type,
10890                         { "PDU Type", "nfapi.pdu_type",
10891                         FT_UINT8, BASE_DEC, VALS(hi_dci0_pdu_type_vals), 0x0,
10892                         NULL, HFILL }
10893                 },
10894                 { &hf_nfapi_hi_value,
10895                         { "HI Value", "nfapi.hi_value",
10896                         FT_BOOLEAN, 8, TFS(&hi_value_strname), 0x0,
10897                         "The PHICH value which is sent on the resource", HFILL }
10898                 },
10899                 { &hf_nfapi_i_phich,
10900                         { "i phich", "nfapi.i_phich",
10901                         FT_UINT8, BASE_DEC, NULL, 0x0,
10902                         "Is used in the calculation of the PHICH location. For TDD only", HFILL }
10903                 },
10904                 { &hf_nfapi_flag_tb2,
10905                         { "Flag TB2", "nfapi.flag_tb2",
10906                         FT_BOOLEAN, BASE_NONE, TFS(&flag_tb2_strname), 0x0,
10907                         "Indicates is HI is present for a second transport block", HFILL }
10908                 },
10909                 { &hf_nfapi_hi_value_2,
10910                         { "HI Value 2", "nfapi.hi_value_2",
10911                         FT_BOOLEAN, BASE_NONE, TFS(&hi_value_strname), 0x0,
10912                         "The PHICH value for a second transport block.", HFILL }
10913                 },
10914                 { &hf_nfapi_ue_tx_antenna_selection,
10915                         { "UE Tx Antenna selection", "nfapi.ue_tx_antenna_selection",
10916                         FT_UINT8, BASE_DEC, VALS(ue_tx_antenna_selection_vals), 0x0,
10917                         "Indicates how the CRC is calculated on the PDCCH.", HFILL }
10918                 },
10919                 { &hf_nfapi_cqi_csi_request,
10920                         { "cqi csi request", "nfapi.cqi_csi_request",
10921                         FT_UINT8, BASE_DEC, NULL, 0x0,
10922                         "Aperiodic CQI request flag", HFILL }
10923                 },
10924                 { &hf_nfapi_ul_index,
10925                         { "UL index", "nfapi.ul_index",
10926                         FT_UINT8, BASE_DEC, NULL, 0x0,
10927                         "Valid for TDD mode only", HFILL }
10928                 },
10929                 { &hf_nfapi_dl_assignment_index,
10930                         { "DL Assignment index", "nfapi.dl_assignment_index",
10931                         FT_UINT8, BASE_DEC, NULL, 0x0,
10932                         "Valid for TDD mode only.", HFILL }
10933                 },
10934                 { &hf_nfapi_tpc_bitmap,
10935                         { "TPC bitmap", "nfapi.tpc_bitmap",
10936                         FT_UINT8, BASE_DEC, NULL, 0x0,
10937                         "TPC commands for PUCCH and PUSCH", HFILL }
10938                 },
10939                 { &hf_nfapi_number_of_antenna_ports,
10940                         { "Number of antenna ports", "nfapi.number.of.antenna.ports",
10941                         FT_UINT8, BASE_DEC, VALS(number_of_antenna_port_vals), 0x0,
10942                         "Defines number of antenna ports for this ULSCH allocation", HFILL }
10943                 },
10944                 { &hf_nfapi_size_of_cqi_csi_feild,
10945                         { "Size of cqi csi feild", "nfapi.size.of.cqi.csi.feild",
10946                         FT_UINT8, BASE_DEC, VALS(size_of_cqi_csi_feild_vals), 0x0,
10947                         "Indicates the size of the CQI/CSI request field", HFILL }
10948                 },
10949                 { &hf_nfapi_new_data_indication_two,
10950                         { "New data indication 2", "nfapi.new.data.indication.two",
10951                         FT_UINT8, BASE_DEC, NULL, 0x0,
10952                         "The new data indicator for the second transport block", HFILL }
10953                 },
10954                 { &hf_nfapi_resource_allocation_flag,
10955                         { "Resource allocation flag", "nfapi.resource.allocation.flag",
10956                         FT_UINT8, BASE_DEC, NULL, 0x0,
10957                         "Indicates if the Resource Allocation Type parameter is valid.", HFILL }
10958                 },
10959                 { &hf_nfapi_dl_node_sync_t1,
10960                         { "DL Node Sync t1", "nfapi.dl.node.sync.t1",
10961                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
10962                         "Offset from VNF SFN/SF 0/0 time reference of the DL Node Sync message transmission at the transport layer, in microseconds.", HFILL }
10963                 },
10964                 { &hf_nfapi_dl_node_sync_delta_sfn_sf,
10965                         { "DL Node Sync Delta SFN SF", "nfapi.dl.node.sync.delta_sfn_sf",
10966                         FT_INT32, BASE_DEC, NULL, 0x0,
10967                         "The delta shift in subframes that the PNF PHY instance must update to on the next subframe boundary", HFILL }
10968                 },
10969                 { &hf_nfapi_dl_cyclic_prefix_type,
10970                         { "DL Cyclic Prefix type", "nfapi.dl.cyclic.prefix.type",
10971                         FT_BOOLEAN, 8, TFS(&cyclic_prefix_type_strname), 0x0,
10972                         "Cyclic prefix type, used for DL", HFILL }
10973                 },
10974                 { &hf_nfapi_ul_cyclic_prefix_type,
10975                         { "UL Cyclic Prefix type", "nfapi.ul.cyclic.prefix.type",
10976                         FT_BOOLEAN, 8, TFS(&cyclic_prefix_type_strname), 0x0,
10977                         "Cyclic prefix type, used for UL", HFILL }
10978                 },
10979                 { &hf_nfapi_downlink_channel_bandwidth,
10980                         { "Downlink Channel Bandwidth", "nfapi.dl.channel.bandwidth",
10981                         FT_UINT16, BASE_DEC, NULL, 0x0,
10982                         "Downlink channel bandwidth in resource blocks.", HFILL }
10983                 },
10984                 { &hf_nfapi_uplink_channel_bandwidth,
10985                         { "Uplink Channel Bandwidth", "nfapi.ul.channel_bandwidth",
10986                         FT_UINT16, BASE_DEC, NULL, 0x0,
10987                         "Uplink channel bandwidth in resource blocks.", HFILL }
10988                 },
10989                 { &hf_nfapi_tx_antenna_ports,
10990                         { "Tx Antenna Ports", "nfapi.tx.antenna.ports",
10991                         FT_UINT16, BASE_DEC, NULL, 0x0,
10992                         "The number of cell specific or NB transmit antenna ports.", HFILL }
10993                 },
10994                 { &hf_nfapi_rx_antenna_ports,
10995                         { "Tx Antenna Ports", "nfapi.rx.antenna.ports",
10996                         FT_UINT16, BASE_DEC, NULL, 0x0,
10997                         "The number of cell specific or NB receive antenna ports.", HFILL }
10998                 },
10999                 { &hf_nfapi_ul_node_sync_t1,
11000                         { "UL Node Sync t1", "nfapi.ul.node.sync.t1",
11001                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11002                         "The supplied t1 field in the DL Node Sync", HFILL }
11003                 },
11004                 { &hf_nfapi_ul_node_sync_t2,
11005                         { "UL Node Sync t2", "nfapi.ul.node.sync.t2",
11006                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11007                         "Offset from PNF SFN/SF 0/0 time reference of the DL Node Sync message reception at the transport layer, in microseconds.", HFILL }
11008                 },
11009                 { &hf_nfapi_ul_node_sync_t3,
11010                         { "UL Node Sync t3", "nfapi.ul.node.sync.t3",
11011                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11012                         "Offset from PNF SFN/SF 0/0 time reference of the UL Node Sync message transmission at the transport layer, in microseconds.", HFILL }
11013                 },
11014                 { &hf_nfapi_pb,
11015                         { "P-B", "nfapi.pb.allocation",
11016                         FT_UINT16, BASE_DEC, NULL, 0x0,
11017                         "Refers to downlink power allocation. Value is an index into the referenced table.", HFILL }
11018                 },
11019                 { &hf_nfapi_timing_info_last_sfn_sf,
11020                         { "Last SFN/SF", "nfapi.timing.info.last.sfn.sf",
11021                         FT_UINT32, BASE_DEC, NULL, 0x0,
11022                         "The completed SFN/SF at the PNF PHY instance that triggered the Timing Info message", HFILL }
11023                 },
11024                 { &hf_nfapi_timing_info_time_since_last_timing_info,
11025                         { "Time since last Timing Info", "nfapi.timing.info.time.since.last.timing.info",
11026                         FT_UINT32, BASE_DEC, NULL, 0x0,
11027                         "The number of ms since the last Timing Info was sent from this PNF PHY instance.", HFILL }
11028                 },
11029                 { &hf_nfapi_timing_info_dl_config_jitter,
11030                         { "DL Config Jitter", "nfapi.timing.info.dl.config.jitter",
11031                         FT_UINT32, BASE_DEC, NULL, 0x0,
11032                         "The inter message jitter of the DL Config message reception in microseconds", HFILL }
11033                 },
11034                 { &hf_nfapi_timing_info_tx_request_jitter,
11035                         { "Tx Request Jitter", "nfapi.timing.info.tx.req.jitter",
11036                         FT_UINT32, BASE_DEC, NULL, 0x0,
11037                         "The inter message jitter of the Tx Request message reception in microseconds", HFILL }
11038                 },
11039                 { &hf_nfapi_timing_info_ul_config_jitter,
11040                         { "UL Config Jitter", "nfapi.timing.info.ul.config.jitter",
11041                         FT_UINT32, BASE_DEC, NULL, 0x0,
11042                         "The inter message jitter of the UL Config message reception in microseconds", HFILL }
11043                 },
11044                 { &hf_nfapi_timing_info_hi_dci0_jitter,
11045                         { "HI_DCI0 Jitter", "nfapi.timing.info.hi.dci0.jitter",
11046                         FT_UINT32, BASE_DEC, NULL, 0x0,
11047                         "The inter message jitter of the HI_DCI0 message reception in microseconds", HFILL }
11048                 },
11049                 { &hf_nfapi_timing_info_dl_config_latest_delay,
11050                         { "DL Config Latest Delay", "nfapi.timing.info.dl.config.latest.delay",
11051                         FT_INT32, BASE_DEC, NULL, 0x0,
11052                         "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 }
11053                 },
11054                 { &hf_nfapi_timing_info_tx_request_latest_delay,
11055                         { "Tx Request Latest Delay", "nfapi.timing.info.tx.request.latest.delay",
11056                         FT_INT32, BASE_DEC, NULL, 0x0,
11057                         "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 }
11058                 },
11059                 { &hf_nfapi_timing_info_ul_config_latest_delay,
11060                         { "UL Config Latest Delay", "nfapi.timing.info.ul.config.latest.delay",
11061                         FT_INT32, BASE_DEC, NULL, 0x0,
11062                         "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 }
11063                 },
11064                 { &hf_nfapi_timing_info_hi_dci0_latest_delay,
11065                         { "HI_DCI0 Latest Delay", "nfapi.timing.info.hi.dci0.latest.delay",
11066                         FT_INT32, BASE_DEC, NULL, 0x0,
11067                         "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 }
11068                 },
11069                 { &hf_nfapi_timing_info_dl_config_earliest_arrival,
11070                         { "DL Config Earliest Arrival", "nfapi.timing.info.dl.config.earliest.arrival",
11071                         FT_INT32, BASE_DEC, NULL, 0x0,
11072                         "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 }
11073                 },
11074                 { &hf_nfapi_timing_info_tx_request_earliest_arrival,
11075                         { "Tx Request Earliest Arrival", "nfapi.timing.info.tx.request.earliest.arrival",
11076                         FT_INT32, BASE_DEC, NULL, 0x0,
11077                         "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 }
11078                 },
11079                 { &hf_nfapi_timing_info_ul_config_earliest_arrival,
11080                         { "UL Config Earliest Arrival", "nfapi.timing.info.ul.config.earliest.arrival",
11081                         FT_INT32, BASE_DEC, NULL, 0x0,
11082                         "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 }
11083                 },
11084                 { &hf_nfapi_timing_info_hi_dci0_earliest_arrival,
11085                         { "HI_DCI0 Earliest Arrival", "nfapi.timing.info.hi.dci0.earliest.arrival",
11086                         FT_INT32, BASE_DEC, NULL, 0x0,
11087                         "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 }
11088                 },
11089                 { &hf_nfapi_pcfich_power_offset,
11090                         { "PCFICH Power Offset", "nfapi.pcfich.power.offset",
11091                         FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
11092                         "The power per antenna of the PCFICH with respect to the reference signal.", HFILL }
11093                 },
11094                 { &hf_nfapi_timing_window,
11095                         { "NFAPI Timing window", "nfapi.timing.window",
11096                         FT_UINT8, BASE_DEC, NULL, 0x0,
11097                         "The window in milliseconds that the PHY must receive and queue the P7 messages.", HFILL }
11098                 },
11099                 { &hf_nfapi_timing_info_mode,
11100                         { "Timing Info mode", "nfapi.timing.info.mode",
11101                         FT_UINT8, BASE_DEC, NULL, 0x0,
11102                         "The configured mode of operation for the timing info message to be sent to the VNF from the PHY", HFILL }
11103                 },
11104                 { &hf_nfapi_timing_info_period,
11105                         { "Timing info period", "nfapi.timing.info.period",
11106                         FT_UINT8, BASE_DEC, NULL, 0x0,
11107                         "If Periodic timing mode is enabled, this defines the periodicity in subframes. This field is ignored if periodic timing mode is disabled.", HFILL }
11108                 },
11109                 { &hf_nfapi_tdd_harq_mode,
11110                         { "Mode", "nfapi.tdd.harq.mode",
11111                         FT_UINT8, BASE_DEC, VALS(tdd_harq_mode_vals), 0x0,
11112                         "The format of the ACK/NACK response expected", HFILL }
11113                 },
11114                 { &hf_nfapi_fdd_harq_mode,
11115                         { "Mode", "nfapi.fdd.harq.mode",
11116                         FT_UINT8, BASE_DEC, VALS(fdd_harq_mode_vals), 0x0,
11117                         "The format of the ACK/NACK response expected", HFILL }
11118                 },
11119                 { &hf_nfapi_number_of_ack_nack,
11120                         { "Number of ACK/NACK", "nfapi.uint16.tag",
11121                         FT_UINT16, BASE_DEC, NULL, 0x0,
11122                         "The number of ACK/NACK results reported for this UE", HFILL }
11123                 },
11124                 { &hf_nfapi_harq_data_value_0,
11125                         { "Value 0", "nfapi.harq.value.0",
11126                         FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11127                         "Indicates HARQ results", HFILL }
11128                 },
11129                 { &hf_nfapi_harq_data_value_0_special,
11130                         { "Value 0", "nfapi.harq.value.0.special",
11131                         FT_UINT8, BASE_DEC, VALS(harq_special_value_vals), 0x0,
11132                         "Indicates HARQ results", HFILL }
11133                 },
11134                 { &hf_nfapi_harq_data_value_1,
11135                         { "Value 1", "nfapi.harq.value.1",
11136                         FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11137                         "Indicates HARQ results", HFILL }
11138                 },
11139                 { &hf_nfapi_harq_data_value_2,
11140                         { "Value 2", "nfapi.harq.value.2",
11141                         FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11142                         "Indicates HARQ results", HFILL }
11143                 },
11144                 { &hf_nfapi_harq_data_value_3,
11145                         { "Value 3", "nfapi.harq.value.3",
11146                         FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11147                         "Indicates HARQ results", HFILL }
11148                 },
11149                 { &hf_nfapi_harq_tb_1,
11150                         { "HARQ TB1", "nfapi.harq.tb.",
11151                         FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11152                         "HARQ feedback of 1st TB.", HFILL }
11153                 },
11154                 { &hf_nfapi_harq_tb_2,
11155                         { "HARQ TB2", "nfapi.harq.tb.2",
11156                         FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11157                         "HARQ feedback of 2nd TB.", HFILL }
11158                 },
11159                 { &hf_nfapi_harq_tb_n,
11160                         { "HARQ TB_N", "nfapi.harq.tb.n",
11161                         FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
11162                         "HARQ feedback of Nth TB.", HFILL }
11163                 },
11164                 { &hf_nfapi_ul_cqi,
11165                         { "UL_CQI", "nfapi.ul.cqi",
11166                         FT_UINT8, BASE_CUSTOM, CF_FUNC(ul_cqi_conversion_fn), 0x0,
11167                         "SNR", HFILL }
11168                 },
11169                 { &hf_nfapi_channel,
11170                         { "Channel", "nfapi.channel",
11171                         FT_UINT8, BASE_DEC, VALS(channel_vals), 0x0,
11172                         "The channel to which this measurement refers", HFILL }
11173                 },
11174                 { &hf_nfapi_data_offset,
11175                         { "Data Offset", "nfapi.data.offset",
11176                         FT_UINT16, BASE_DEC, NULL, 0x0,
11177                         "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 }
11178                 },
11179                 { &hf_nfapi_ri,
11180                         { "RI", "nfapi.ri",
11181                         FT_UINT8, BASE_DEC, NULL, 0x0,
11182                         "The rank indication reported by the UE on PUSCH for aperiodic CSI.", HFILL }
11183                 },
11184                 { &hf_nfapi_timing_advance,
11185                         { "Timing Advance", "nfapi.timing.advance",
11186                         FT_UINT16, BASE_DEC, NULL, 0x0,
11187                         "The timing advance measured for this PDU and UE.", HFILL }
11188                 },
11189                 { &hf_nfapi_timing_advance_r9,
11190                         { "Timing Advance R9", "nfapi.timing.advance.r9",
11191                         FT_UINT16, BASE_DEC, NULL, 0x0,
11192                         "Timing advance used for positioning", HFILL }
11193                 },
11194                 { &hf_nfapi_number_of_cc_reported,
11195                         { "Number of CC reported", "nfapi.number.of.cc.reported",
11196                         FT_UINT8, BASE_DEC, NULL, 0x0,
11197                         NULL, HFILL }
11198                 },
11199                 { &hf_nfapi_preamble,
11200                         { "Preamble", "nfapi.preamble",
11201                         FT_UINT8, BASE_DEC, NULL, 0x0,
11202                         "The detected preamble", HFILL }
11203                 },
11204                 { &hf_nfapi_rach_resource_type,
11205                         { "RACH resource type", "nfapi.rach.resource.type",
11206                         FT_UINT8, BASE_DEC, VALS(rach_resource_type_vals), 0x0,
11207                         "Indicates if this indication is related to Cat-M UE and in which CE level", HFILL }
11208                 },
11209                 { &hf_nfapi_doppler_estimation,
11210                         { "Doppler estimation", "nfapi.doppler.estimation",
11211                         FT_UINT16, BASE_DEC, NULL, 0x0,
11212                         "FFS", HFILL }
11213                 },
11214                 { &hf_nfapi_rb_start,
11215                         { "RB Start", "nfapi.rb.start",
11216                         FT_UINT8, BASE_DEC, NULL, 0x0,
11217                         "The starting point of the RBs to be reported", HFILL }
11218                 },
11219                 { &hf_nfapi_snr,
11220                         { "SNR", "nfapi.snr",
11221                         FT_UINT8, BASE_CUSTOM, CF_FUNC(ul_cqi_conversion_fn), 0x0,
11222                         "Field size dependent on configured bandwidth SNR for RBs, each RBs report one SNR.", HFILL }
11223                 },
11224                 { &hf_nfapi_up_pts_symbol,
11225                         { "UpPTS Symbol", "nfapi.uppts.symbol",
11226                         FT_UINT8, BASE_DEC, VALS(up_pts_symbol_vals), 0x0,
11227                         "Indicates symbol where SRS was received. Only valid if the SRS was received in subframe 1 or 6.", HFILL }
11228                 },
11229                 { &hf_nfapi_number_prb_per_subband,
11230                         { "numPRBperSubband", "nfapi.num.prb.per.subband",
11231                         FT_UINT8, BASE_DEC, NULL, 0x0,
11232                         "Number of PRBs that are treated as one subband", HFILL }
11233                 },
11234                 { &hf_nfapi_number_antennas,
11235                         { "numAntennas", "nfapi.num.antennas",
11236                         FT_UINT8, BASE_DEC, NULL, 0x0,
11237                         "Number of physical antennas", HFILL }
11238                 },
11239                 { &hf_nfapi_subband_index,
11240                         { "subbandIndex", "nfapi.subband.index",
11241                         FT_UINT8, BASE_DEC, NULL, 0x0,
11242                         "Index of subband for which the following channel coefficient is applied", HFILL }
11243                 },
11244                 { &hf_nfapi_channel_coefficient,
11245                         { "Channel", "nfapi.channel.coefficient",
11246                         FT_UINT16, BASE_DEC, NULL, 0x0,
11247                         "Averaged channel coefficient in a subband for physical antenna #i, real 8 bits followed by imaginary 8 bits", HFILL }
11248                 },
11249                 { &hf_nfapi_ul_rtoa,
11250                         { "UL_RTOA", "nfapi.ul.rtoa",
11251                         FT_UINT16, BASE_DEC, NULL, 0x0,
11252                         "UL relative time of arrival used for network based positioning", HFILL }
11253                 },
11254                 { &hf_nfapi_frequency_band_indicator,
11255                         { "Frequency Band Indicator", "nfapi.frequency.band.indicator",
11256                         FT_UINT16, BASE_DEC, NULL, 0x0,
11257                         "The E-UTRA band for which the carrierList applies.", HFILL }
11258                 },
11259                 { &hf_nfapi_measurement_period,
11260                         { "Measurement Period", "nfapi.measurement.period",
11261                         FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11262                         "The length of time to measure RSSI over, in units of 1ms.", HFILL }
11263                 },
11264                 { &hf_nfapi_bandwidth,
11265                         { "Bandwidth", "nfapi.bandwidth",
11266                         FT_UINT8, BASE_DEC, NULL, 0x0,
11267                         "The bandwidth (in resource blocks) over which the RSSI is measured.", HFILL }
11268                 },
11269                 { &hf_nfapi_timeout,
11270                         { "Timeout", "nfapi.timeout",
11271                         FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11272                         "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 }
11273                 },
11274                 { &hf_nfapi_number_of_earfcns,
11275                         { "Number of EARFCNs", "nfapi.number.of.earfcns",
11276                         FT_UINT8, BASE_DEC, NULL, 0x0,
11277                         "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 }
11278                 },
11279                 { &hf_nfapi_uarfcn,
11280                         { "UARFCN", "nfapi.uarfcn",
11281                         FT_UINT16, BASE_DEC, NULL, 0x0,
11282                         "UARFCN to be measured.", HFILL }
11283                 },
11284                 { &hf_nfapi_number_of_uarfcns,
11285                         { "Number of UARFCNs", "nfapi.number.of.uarfcn",
11286                         FT_UINT8, BASE_DEC, NULL, 0x0,
11287                         "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 }
11288                 },
11289                 { &hf_nfapi_arfcn,
11290                         { "ARFCN", "nfapi.arfcn",
11291                         FT_UINT16, BASE_DEC, NULL, 0x0,
11292                         "The ARFCN to be measured", HFILL }
11293                 },
11294                 { &hf_nfapi_arfcn_direction,
11295                         { "Direction", "nfapi.arfcn.direction",
11296                         FT_UINT8, BASE_DEC, VALS(arfcn_direction_vals), 0x0,
11297                         "The link direction to be measured", HFILL }
11298                 },
11299                 { &hf_nfapi_number_of_arfcns,
11300                         { "Number of ARFCNs", "nfapi.number.of.arfcn",
11301                         FT_UINT8, BASE_DEC, NULL, 0x0,
11302                         "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 }
11303                 },
11304                 { &hf_nfapi_rssi,
11305                         { "RSSI", "nfapi.rssi",
11306                         FT_INT16, BASE_CUSTOM, CF_FUNC(rssi_conversion_fn), 0x0,
11307                         "The list of RSSI values of the carriers measured, in the order of the list of the original request.", HFILL }
11308                 },
11309                 { &hf_nfapi_number_of_rssi,
11310                         { "Number of RSSI", "nfapi.number.of.rssi",
11311                         FT_UINT16, BASE_DEC, NULL, 0x0,
11312                         "The number of RSSI results returned in the following array.", HFILL }
11313                 },
11314                 { &hf_nfapi_pci,
11315                         { "PCI", "nfapi.pci",
11316                         FT_UINT16, BASE_DEC, NULL, 0x0,
11317                         "The PCI for cell which should be searched", HFILL }
11318                 },
11319                 { &hf_nfapi_measurement_bandwidth,
11320                         { "Measurement Bandwidth", "nfapi.measurement.bandwidth",
11321                         FT_UINT8, BASE_DEC, NULL, 0x0,
11322                         "The number of resource blocks which should be used for measuring RSRP", HFILL }
11323                 },
11324                 { &hf_nfapi_exhaustive_search,
11325                         { "Exhaustive Search", "nfapi.exhaustive.search",
11326                         FT_UINT8, BASE_DEC, VALS(exhustive_search_vals), 0x0,
11327                         "NMM should try to find all cells on the carrier", HFILL }
11328                 },
11329                 { &hf_nfapi_number_of_pci,
11330                         { "Number of PCI", "nfapi.number.of.pci",
11331                         FT_UINT8, BASE_DEC, NULL, 0x0,
11332                         "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 }
11333                 },
11334                 { &hf_nfapi_psc,
11335                         { "PSC", "nfapi.psc",
11336                         FT_UINT16, BASE_DEC, NULL, 0x0,
11337                         "The PSC for cells which should be searched.", HFILL }
11338                 },
11339                 { &hf_nfapi_number_of_psc,
11340                         { "Number of PSC", "nfapi.number.of.psc",
11341                         FT_UINT8, BASE_DEC, NULL, 0x0,
11342                         "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 }
11343                 },
11344                 { &hf_nfapi_rsrp,
11345                         { "RSRP", "nfapi.rsrp",
11346                         FT_UINT8, BASE_CUSTOM, CF_FUNC(neg_pow_conversion_fn), 0x0,
11347                         "The measured RSRP value in units of -1dB", HFILL }
11348                 },
11349                 { &hf_nfapi_rsrq,
11350                         { "RSRQ", "nfapi.rsrq",
11351                         FT_UINT8, BASE_CUSTOM, CF_FUNC(neg_pow_conversion_fn), 0x0,
11352                         "The measured RSRQ value in units of -1dB", HFILL }
11353                 },
11354                 { &hf_nfapi_number_of_lte_cells_found,
11355                         { "Number of LTE Cells Found", "nfapi.number.of.lte.cells.found",
11356                         FT_UINT16, BASE_DEC, NULL, 0x0,
11357                         "The number of LTE cells indicated in this message.", HFILL }
11358                 },
11359                 { &hf_nfapi_rscp,
11360                         { "RSCP", "nfapi.rscp",
11361                         FT_UINT8, BASE_CUSTOM, CF_FUNC(neg_pow_conversion_fn), 0x0,
11362                         "The measured RSCP value in units of -1dB", HFILL }
11363                 },
11364                 { &hf_nfapi_enco,
11365                         { "EcNo", "nfapi.ecno",
11366                         FT_UINT8, BASE_CUSTOM, CF_FUNC(neg_pow_conversion_fn), 0x0,
11367                         "The measured RSCP value in units of -1dB", HFILL }
11368                 },
11369                 { &hf_nfapi_number_of_utran_cells_found,
11370                         { "Number of UTRAN Cells Found", "nfapi.number.of.utran.cells.found",
11371                         FT_UINT16, BASE_DEC, NULL, 0x0,
11372                         "The number of LTE cells indicated in this message", HFILL }
11373                 },
11374                 { &hf_nfapi_bsic,
11375                         { "BSIC", "nfapi.bsic",
11376                         FT_UINT8, BASE_DEC, NULL, 0x0,
11377                         "The BSIC of the cell which the NMM synchronized to", HFILL }
11378                 },
11379                 { &hf_nfapi_rxlev,
11380                         { "RxLev", "nfapi.rxlev",
11381                         FT_UINT8, BASE_DEC, NULL, 0x0,
11382                         "The measured RxLev value", HFILL }
11383                 },
11384                 { &hf_nfapi_rxqual,
11385                         { "RxQual", "nfapi.rxqual",
11386                         FT_UINT8, BASE_DEC, NULL, 0x0,
11387                         "The measured RxQual value", HFILL }
11388                 },
11389                 { &hf_nfapi_sfn_offset,
11390                         { "SFN Offset", "nfapi.sfn.offset",
11391                         FT_UINT32, BASE_DEC, NULL, 0x0,
11392                         "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 }
11393                 },
11394                 { &hf_nfapi_number_of_geran_cells_found,
11395                         { "Number of GSM Cells Found", "nfapi.number.of.geran.cells.found",
11396                         FT_UINT16, BASE_DEC, NULL, 0x0,
11397                         "The number of GSM cells indicated in this message", HFILL }
11398                 },
11399                 { &hf_nfapi_number_of_tx_antenna,
11400                         { "Number of Tx Antenna", "nfapi.number.of.tx.antenna",
11401                         FT_UINT8, BASE_DEC, NULL, 0x0,
11402                         "The number of Tx Antenna detected for the cell", HFILL }
11403                 },
11404                 { &hf_nfapi_mib,
11405                         { "MIB", "nfapi.mib",
11406                         FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
11407                         "The MIB read from the specified cell.", HFILL }
11408                 },
11409                 { &hf_nfapi_phich_configuration,
11410                         { "PHICH Configuration", "nfapi.phich.configuration",
11411                         FT_UINT8, BASE_DEC, NULL, 0x0,
11412                         "The PHICH-Config of the cell", HFILL }
11413                 },
11414                 { &hf_nfapi_retry_count,
11415                         { "retryCount", "nfapi.retry.count",
11416                         FT_UINT8, BASE_DEC, NULL, 0x0,
11417                         "The number of SIB1 repetition periods for which decoding of SIB1 should be retried.", HFILL }
11418                 },
11419                 { &hf_nfapi_sib1,
11420                         { "SIB1", "nfapi.sib1",
11421                         FT_BYTES, BASE_NONE, NULL, 0x0,
11422                         NULL, HFILL }
11423                 },
11424                 { &hf_nfapi_si_periodicity,
11425                         { "SI Periodicity", "nfapi.si.periodicity",
11426                         FT_UINT8, BASE_DEC, NULL, 0x0,
11427                         "The SI Periodicity of the requested SIBs, with the first element being for SIB2, the next for SIB3, etc, encoded as follows", HFILL }
11428                 },
11429                 { &hf_nfapi_si_index,
11430                         { "SI Index", "nfapi.si.index",
11431                         FT_UINT8, BASE_DEC, NULL, 0x0,
11432                         "The index of this SIB in the SIB1 SchedulingInfoList:", HFILL }
11433                 },
11434                 { &hf_nfapi_number_of_si_periodicity,
11435                         { "Number of SI Periodicity", "nfapi.number.of.si.periodicity",
11436                         FT_UINT8, BASE_DEC, NULL, 0x0,
11437                         "The number of System Information periodicity values in the following array", HFILL }
11438                 },
11439                 { &hf_nfapi_si_window_length,
11440                         { "SI Window Length", "nfapi.si.window.length",
11441                         FT_UINT8, BASE_DEC, NULL, 0x0,
11442                         "The SI window in units of 1ms", HFILL }
11443                 },
11444                 { &hf_nfapi_sib_type,
11445                         { "SIB Type", "nfapi.sib.type",
11446                         FT_UINT8, BASE_DEC, NULL, 0x0,
11447                         "The SIB type", HFILL }
11448                 },
11449                 { &hf_nfapi_sib,
11450                         { "SIB", "nfapi.sib",
11451                         FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
11452                         "The SIB element read from the specified cell.", HFILL }
11453                 },
11454                 { &hf_nfapi_si,
11455                         { "SI", "nfapi.si",
11456                         FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
11457                         "The SI element read from the specified cell.", HFILL }
11458                 },
11459                 { &hf_nfapi_pnf_search_state,
11460                         { "State", "nfapi.state",
11461                         FT_BYTES, BASE_NONE, NULL, 0x0,
11462                         "A structure of opaque data optionally sent by the PNF to the VNF", HFILL }
11463                 },
11464                 { &hf_nfapi_pnf_broadcast_state,
11465                         { "State", "nfapi.state",
11466                         FT_BYTES, BASE_NONE, NULL, 0x0,
11467                         "A structure of opaque data optionally sent by the PNF to the VNF", HFILL }
11468                 },
11469                 { &hf_nfapi_dl_rs_tx_power,
11470                         { "DL RS Tx power", "nfapi.dl.rs.tx.power",
11471                         FT_UINT16, BASE_DEC, NULL, 0x0,
11472                         "The DL RS Tx power measurement", HFILL }
11473                 },
11474                 { &hf_nfapi_received_interference_power,
11475                         { "Received interference power", "nfapi.received.interference.power",
11476                         FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11477                         "The Received interference power measurement", HFILL }
11478                 },
11479                 { &hf_nfapi_thermal_noise_power,
11480                         { "Thermal noise power", "nfapi.thermal.noise.power",
11481                         FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0x0,
11482                         "The Thermal noise power measurement", HFILL }
11483                 },
11484                 { &hf_nfapi_dl_rs_tx_power_measurement,
11485                         { "DL RS TX Power measurement", "nfapi.dl.rs.tx.power.measurement",
11486                         FT_INT16, BASE_CUSTOM, CF_FUNC(dl_rs_tx_pow_measment_conversion_fn), 0x0,
11487                         "The DL RS Tx power measurement defined", HFILL }
11488                 },
11489                 { &hf_nfapi_received_interference_power_measurement,
11490                         { "Received interference power measurement", "nfapi.received.interference.power.measurement",
11491                         FT_INT16, BASE_CUSTOM, CF_FUNC(dl_rs_tx_pow_measment_conversion_fn), 0x0,
11492                         NULL, HFILL }
11493                 },
11494                 { &hf_nfapi_thermal_noise_power_measurement,
11495                         { "Thermal noise power measurement", "nfapi.thermal.noise.power.measurement",
11496                         FT_INT16, BASE_CUSTOM, CF_FUNC(dl_rs_tx_pow_measment_conversion_fn), 0x0,
11497                         "The Thermal noise power measurement", HFILL }
11498                 },
11499                 { &hf_nfapi_initial_partial_sf,
11500                         { "Initial Partial SF", "nfapi.initial.partial.sf",
11501                         FT_BOOLEAN, 32, TFS(&initial_partial_sf_strname), 0x0,
11502                         "Indicates whether the initial SF in the LBT process is full or partial", HFILL }
11503                 },
11504                 { &hf_nfapi_lbt_mode,
11505                         { "LBT Mode", "nfapi.lbt.mode",
11506                         FT_BOOLEAN, 32, TFS(&lbt_mode_strname), 0x0,
11507                         "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 }
11508                 },
11509                 { &hf_nfapi_lte_txop_sf,
11510                         { "LTE TXOP SF", "nfapi.txop.sf",
11511                         FT_UINT32, BASE_DEC, NULL, 0x0,
11512                         "Indicates the LTE TXOP (TMCOT,P in [9] section 15.1.1) duration in subframes.", HFILL }
11513                 },
11514                 { &hf_nfapi_mp_cca,
11515                         { "mp cca", "nfapi.mp.cca",
11516                         FT_UINT32, BASE_DEC, NULL, 0x0,
11517                         "Indicates the value of the defer factor", HFILL }
11518                 },
11519                 { &hf_nfapi_n_cca,
11520                         { "n cca", "nfapi.n.cca",
11521                         FT_UINT32, BASE_DEC, NULL, 0x0,
11522                         "Indicates the value of LBT backoff counter", HFILL }
11523                 },
11524                 { &hf_nfapi_offset,
11525                         { "offset", "nfapi.offset",
11526                         FT_UINT32, BASE_DEC, NULL, 0x0,
11527                         "Indicates the LBT start time in microseconds from the beginning of the subframe scheduled by this message.", HFILL }
11528                 },
11529                 { &hf_nfapi_result,
11530                         { "result", "nfapi.result",
11531                         FT_BOOLEAN, 32, TFS(&tfs_fail_success), 0x0,
11532                         "Indicates the LBT procedure result of SFN/SF:", HFILL }
11533                 },
11534                 { &hf_nfapi_sfn_sf_end,
11535                         { "SFN/SF End", "nfapi.sfn.sf.end",
11536                         FT_UINT16, BASE_DEC, NULL, 0x0,
11537                         "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 }
11538                 },
11539                 { &hf_nfapi_txop_sfn_sf_end,
11540                         { "TXOP SFN/SF End", "nfapi.txop.sfn.sf.end",
11541                         FT_UINT16, BASE_DEC, NULL, 0x0,
11542                         "Indicates the SFN/SF by which the TXOP must end. In worst case, this would be the last TXOP subframe.", HFILL }
11543                 },
11544                 { &hf_nfapi_txop_symbols,
11545                         { "LTE TXOP symbols", "nfapi.lte.txop.symbols",
11546                         FT_UINT32, BASE_DEC, NULL, 0x0,
11547                         "Actual LTE TXOP in symbols", HFILL }
11548                 },
11549         };
11550
11551         /* Setup protocol subtree array */
11552         static gint *ett[] =
11553         {
11554                 &ett_nfapi,
11555                 &ett_nfapi_p4_p5_message_header,
11556                 &ett_nfapi_p7_message_header,
11557                 &ett_nfapi_tlv_tree,
11558                 &ett_nfapi_tl,
11559                 &ett_nfapi_pnf_phy_rf_config,
11560                 &ett_nfapi_pnf_phy,
11561                 &ett_nfapi_pnf_phy_rel10,
11562                 &ett_nfapi_pnf_phy_rel11,
11563                 &ett_nfapi_pnf_phy_rel12,
11564                 &ett_nfapi_pnf_phy_rel13,
11565                 &ett_nfapi_rf_bands,
11566                 &ett_nfapi_bf_vectors,
11567                 &ett_nfapi_csi_rs_bf_vector,
11568                 &ett_nfapi_csi_rs_resource_configs,
11569                 &ett_nfapi_tx_antenna_ports,
11570                 &ett_nfapi_harq_ack_nack_data,
11571                 &ett_nfapi_harq_data,
11572                 &ett_nfapi_cc,
11573                 &ett_nfapi_rbs,
11574                 &ett_nfapi_antennas,
11575                 &ett_nfapi_epdcch_prbs,
11576                 &ett_nfapi_dl_config_request_pdu_list,
11577                 &ett_nfapi_ul_config_request_pdu_list,
11578                 &ett_nfapi_hi_dci0_request_pdu_list,
11579                 &ett_nfapi_tx_request_pdu_list,
11580                 &ett_nfapi_rx_indication_pdu_list,
11581                 &ett_nfapi_harq_indication_pdu_list,
11582                 &ett_nfapi_crc_indication_pdu_list,
11583                 &ett_nfapi_sr_indication_pdu_list,
11584                 &ett_nfapi_cqi_indication_pdu_list,
11585                 &ett_nfapi_preamble_indication_pdu_list,
11586                 &ett_nfapi_srs_indication_pdu_list,
11587                 &ett_nfapi_lbt_dl_config_pdu_list,
11588                 &ett_nfapi_lbt_dl_indication_pdu_list,
11589                 &ett_nfapi_subbands,
11590                 &ett_nfapi_precoding,
11591                 &ett_nfapi_bf_vector_antennas,
11592                 &ett_nfapi_received_interference_power_mesurement_results,
11593                 &ett_nfapi_downlink_bandwidth_support,
11594                 &ett_nfapi_uplink_bandwidth_support,
11595                 &ett_nfapi_release_support,
11596                 &ett_nfapi_downlink_modulation_support,
11597                 &ett_nfapi_uplink_modulation_support,
11598
11599                 &ett_nfapi_earfcn_list,
11600                 &ett_nfapi_uarfcn_list,
11601                 &ett_nfapi_arfcn_list,
11602                 &ett_nfapi_rssi_list,
11603                 &ett_nfapi_pci_list,
11604                 &ett_nfapi_psc_list,
11605                 &ett_nfapi_lte_cells_found_list,
11606                 &ett_nfapi_utran_cells_found_list,
11607                 &ett_nfapi_geran_cells_found_list,
11608                 &ett_nfapi_si_periodicity_list,
11609
11610                 /* for fragmentation support*/
11611                 &ett_msg_fragment,
11612                 &ett_msg_fragments
11613         };
11614
11615         static ei_register_info ei[] =
11616         {
11617                 { &ei_invalid_range, { "nfapi.invalid.range", PI_PROTOCOL, PI_WARN, NULL, EXPFILL } },
11618                 { &ei_invalid_tlv_length, { "nfapi.invalid.tlv.length", PI_PROTOCOL, PI_ERROR, NULL, EXPFILL } },
11619         };
11620
11621         expert_module_t* expert_nfapi;
11622         /* Register protocol */
11623         proto_nfapi = proto_register_protocol("Nfapi", "NFAPI", "nfapi");
11624
11625         expert_nfapi = expert_register_protocol(proto_nfapi);
11626         expert_register_field_array(expert_nfapi, ei, array_length(ei));
11627
11628
11629         proto_register_field_array(proto_nfapi, hf, array_length(hf));
11630         proto_register_subtree_array(ett, array_length(ett));
11631
11632         message_table = register_dissector_table("nfapi.msg_id", "NFAPI Message ID", proto_nfapi, FT_UINT16, BASE_DEC);
11633
11634         reassembly_table_register(&ul_p7_reassemble_table, &addresses_ports_reassembly_table_functions);
11635         reassembly_table_register(&dl_p7_reassemble_table, &addresses_ports_reassembly_table_functions);
11636
11637         nfapi_handle = register_dissector("nfapi", dissect_nfapi, proto_nfapi);
11638
11639 }
11640
11641 // ----------------------------------------------------------------------------|
11642
11643 void proto_reg_handoff_nfapi(void)
11644 {
11645         dissector_handle_t handle;
11646
11647         handle = create_dissector_handle( dissect_nfapi_ul_p7, -1 );
11648         dissector_add_uint("nfapi.msg_id", NFAPI_HARQ_INDICATION_MSG_ID, handle);
11649         dissector_add_uint("nfapi.msg_id", NFAPI_CRC_INDICATION_MSG_ID, handle);
11650         dissector_add_uint("nfapi.msg_id", NFAPI_RX_ULSCH_INDICATION_MSG_ID, handle);
11651         dissector_add_uint("nfapi.msg_id", NFAPI_RACH_INDICATION_MSG_ID, handle);
11652         dissector_add_uint("nfapi.msg_id", NFAPI_SRS_INDICATION_MSG_ID, handle);
11653         dissector_add_uint("nfapi.msg_id", NFAPI_RX_SR_INDICATION_MSG_ID, handle);
11654         dissector_add_uint("nfapi.msg_id", NFAPI_RX_CQI_INDICATION_MSG_ID, handle);
11655
11656         handle = create_dissector_handle( dissect_nfapi_dl_p7, -1 );
11657         dissector_add_uint("nfapi.msg_id", NFAPI_DL_CONFIG_REQUEST_MSG_ID, handle);
11658         dissector_add_uint("nfapi.msg_id", NFAPI_UL_CONFIG_REQUEST_MSG_ID, handle);
11659         dissector_add_uint("nfapi.msg_id", NFAPI_HI_DCI0_REQUEST_MSG_ID, handle);
11660         dissector_add_uint("nfapi.msg_id", NFAPI_TX_REQUEST_MSG_ID, handle);
11661         dissector_add_uint("nfapi.msg_id", NFAPI_LBT_DL_CONFIG_REQUEST_MSG_ID, handle);
11662         dissector_add_uint("nfapi.msg_id", NFAPI_LBT_DL_INDICATION_MSG_ID, handle);
11663
11664         handle = create_dissector_handle( dissect_p45_header, -1 );
11665         dissector_add_uint("nfapi.msg_id", NFAPI_PNF_START_REQUEST_MSG_ID, handle);
11666         dissector_add_uint("nfapi.msg_id", NFAPI_PNF_STOP_REQUEST_MSG_ID, handle);
11667         dissector_add_uint("nfapi.msg_id", NFAPI_PARAM_REQUEST_MSG_ID, handle);
11668         dissector_add_uint("nfapi.msg_id", NFAPI_START_REQUEST_MSG_ID, handle);
11669         dissector_add_uint("nfapi.msg_id", NFAPI_STOP_REQUEST_MSG_ID, handle);
11670         dissector_add_uint("nfapi.msg_id", NFAPI_NMM_STOP_REQUEST_MSG_ID, handle);
11671
11672         handle = create_dissector_handle( dissect_p45_header_with_list, -1 );
11673         dissector_add_uint("nfapi.msg_id", NFAPI_PNF_PARAM_REQUEST_MSG_ID, handle);
11674         dissector_add_uint("nfapi.msg_id", NFAPI_PNF_CONFIG_REQUEST_MSG_ID, handle);
11675         dissector_add_uint("nfapi.msg_id", NFAPI_MEASUREMENT_REQUEST_MSG_ID, handle);
11676
11677         handle = create_dissector_handle( dissect_p45_header_with_error, -1 );
11678         dissector_add_uint("nfapi.msg_id", NFAPI_PNF_CONFIG_RESPONSE_MSG_ID, handle);
11679         dissector_add_uint("nfapi.msg_id", NFAPI_PNF_START_RESPONSE_MSG_ID, handle);
11680         dissector_add_uint("nfapi.msg_id", NFAPI_PNF_STOP_RESPONSE_MSG_ID, handle);
11681         dissector_add_uint("nfapi.msg_id", NFAPI_CONFIG_RESPONSE_MSG_ID, handle);
11682         dissector_add_uint("nfapi.msg_id", NFAPI_START_RESPONSE_MSG_ID, handle);
11683         dissector_add_uint("nfapi.msg_id", NFAPI_STOP_RESPONSE_MSG_ID, handle);
11684
11685         handle = create_dissector_handle( dissect_p45_header_with_p4_error, -1 );
11686         dissector_add_uint("nfapi.msg_id", NFAPI_RSSI_RESPONSE_MSG_ID, handle);
11687         dissector_add_uint("nfapi.msg_id", NFAPI_CELL_SEARCH_RESPONSE_MSG_ID, handle);
11688         dissector_add_uint("nfapi.msg_id", NFAPI_BROADCAST_DETECT_RESPONSE_MSG_ID, handle);
11689         dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_SCHEDULE_RESPONSE_MSG_ID, handle);
11690         dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_RESPONSE_MSG_ID, handle);
11691         dissector_add_uint("nfapi.msg_id", NFAPI_NMM_STOP_RESPONSE_MSG_ID, handle);
11692
11693         handle = create_dissector_handle( dissect_p45_header_with_error_and_list, -1 );
11694         dissector_add_uint("nfapi.msg_id", NFAPI_PNF_PARAM_RESPONSE_MSG_ID, handle);
11695         dissector_add_uint("nfapi.msg_id", NFAPI_CONFIG_REQUEST_MSG_ID, handle);
11696         dissector_add_uint("nfapi.msg_id", NFAPI_MEASUREMENT_RESPONSE_MSG_ID, handle);
11697
11698         handle = create_dissector_handle( dissect_p45_header_with_p4_error_and_list, -1 );
11699         dissector_add_uint("nfapi.msg_id", NFAPI_RSSI_INDICATION_MSG_ID, handle);
11700         dissector_add_uint("nfapi.msg_id", NFAPI_CELL_SEARCH_INDICATION_MSG_ID, handle);
11701         dissector_add_uint("nfapi.msg_id", NFAPI_BROADCAST_DETECT_INDICATION_MSG_ID, handle);
11702         dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_SCHEDULE_INDICATION_MSG_ID, handle);
11703         dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_INDICATION_MSG_ID, handle);
11704
11705         handle = create_dissector_handle( dissect_p45_header_with_rat_type_list, -1 );
11706         dissector_add_uint("nfapi.msg_id", NFAPI_RSSI_REQUEST_MSG_ID, handle);
11707         dissector_add_uint("nfapi.msg_id", NFAPI_CELL_SEARCH_REQUEST_MSG_ID, handle);
11708         dissector_add_uint("nfapi.msg_id", NFAPI_BROADCAST_DETECT_REQUEST_MSG_ID, handle);
11709         dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_SCHEDULE_REQUEST_MSG_ID, handle);
11710         dissector_add_uint("nfapi.msg_id", NFAPI_SYSTEM_INFORMATION_REQUEST_MSG_ID, handle);
11711
11712         dissector_add_uint("nfapi.msg_id", NFAPI_PARAM_RESPONSE_MSG_ID, create_dissector_handle( dissect_p45_param_response_msg_id, -1 ));
11713         dissector_add_uint("nfapi.msg_id", NFAPI_DL_NODE_SYNC_MSG_ID, create_dissector_handle( dissect_p7_dl_node_sync_msg_id, -1 ));
11714         dissector_add_uint("nfapi.msg_id", NFAPI_UL_NODE_SYNC_MSG_ID, create_dissector_handle( dissect_p7_ul_node_sync_msg_id, -1 ));
11715         dissector_add_uint("nfapi.msg_id", NFAPI_TIMING_INFO_MSG_ID, create_dissector_handle( dissect_p7_timing_info_msg_id, -1 ));
11716
11717         dissector_add_for_decode_as("sctp.port", nfapi_handle);
11718         dissector_add_for_decode_as("udp.port", nfapi_handle);
11719 }
11720
11721
11722 /*
11723 * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
11724 *
11725 * Local variables:
11726 * c-basic-offset: 8
11727 * tab-width: 8
11728 * indent-tabs-mode: t
11729 * End:
11730 *
11731 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
11732 * :indentSize=8:tabSize=8:noTabs=false:
11733 */