Bug Summary

File:epan/dissectors/packet-oran.c
Warning:line 2810, column 54
Array access (from variable 'trx') results in an undefined pointer dereference

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name packet-oran.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -fno-delete-null-pointer-checks -mframe-pointer=all -relaxed-aliasing -fmath-errno -ffp-contract=on -fno-rounding-math -ffloat16-excess-precision=fast -fbfloat16-excess-precision=fast -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/builds/wireshark/wireshark/build -fcoverage-compilation-dir=/builds/wireshark/wireshark/build -resource-dir /usr/lib/llvm-20/lib/clang/20 -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /builds/wireshark/wireshark/epan/dissectors -isystem /builds/wireshark/wireshark/build/epan/dissectors -isystem /usr/include/mit-krb5 -isystem /usr/include/libxml2 -isystem /builds/wireshark/wireshark/epan -D G_DISABLE_DEPRECATED -D G_DISABLE_SINGLE_INCLUDES -D WS_BUILD_DLL -D WS_DEBUG -D WS_DEBUG_UTF_8 -I /builds/wireshark/wireshark/build -I /builds/wireshark/wireshark -I /builds/wireshark/wireshark/include -D _GLIBCXX_ASSERTIONS -internal-isystem /usr/lib/llvm-20/lib/clang/20/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fmacro-prefix-map=/builds/wireshark/wireshark/= -fmacro-prefix-map=/builds/wireshark/wireshark/build/= -fmacro-prefix-map=../= -Wno-format-truncation -Wno-format-nonliteral -Wno-pointer-sign -std=gnu11 -ferror-limit 19 -fvisibility=hidden -fwrapv -fwrapv-pointer -fstrict-flex-arrays=3 -stack-protector 2 -fstack-clash-protection -fcf-protection=full -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fexceptions -fcolor-diagnostics -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /builds/wireshark/wireshark/sbout/2025-09-09-100415-3933-1 -x c /builds/wireshark/wireshark/epan/dissectors/packet-oran.c
1/* packet-oran.c
2 * Routines for O-RAN fronthaul UC-plane dissection
3 * Copyright 2020, Jan Schiefer, Keysight Technologies, Inc.
4 * Copyright 2020- Martin Mathieson
5 *
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <[email protected]>
8 * Copyright 1998 Gerald Combs
9 *
10 * SPDX-License-Identifier: GPL-2.0-or-later
11 */
12
13 /*
14 * Dissector for the O-RAN Fronthaul CUS protocol specification.
15 * See https://specifications.o-ran.org/specifications, WG4, Fronthaul Interfaces Workgroup
16 * The current implementation is based on the ORAN-WG4.CUS.0-v17.01 specification.
17 * - haven't spotted any differences in v18.00
18 * Note that other eCPRI message types are handled in packet-ecpri.c
19 */
20
21#include <config.h>
22
23#include <math.h>
24
25#include <epan/packet.h>
26#include <epan/expert.h>
27#include <epan/prefs.h>
28#include <epan/tap.h>
29
30#include <epan/tfs.h>
31
32#include <wsutil/ws_roundup.h>
33#include <wsutil/ws_padding_to.h>
34
35#include "epan/dissectors/packet-oran.h"
36
37/* N.B. dissector preferences are taking the place of (some) M-plane parameters, so unfortunately it can be
38 * fiddly to get the preferences into a good state to decode a given capture..
39 * TODO:
40 * - for U-Plane, track back to last C-Plane frame for that eAxC
41 * - use udCompHdr values from C-Plane if not overridden by U-Plane?
42 * N.B. this matching is tricky see 7.8.1 Coupling of C-Plane and U-Plane
43 * - Radio transport layer (eCPRI) fragmentation / reassembly
44 * - Detect/indicate signs of application layer fragmentation?
45 * - Not handling M-plane setting for "little endian byte order" as applied to IQ samples and beam weights
46 * - for section extensions, check more constraints (which other extension types appear with them, order)
47 * - when some section extensions are present, some section header fields are effectively ignored - flag any remaining ("ignored, "shall")?
48 * - re-order items (decl and hf definitions) to match spec order?
49 */
50
51/* Prototypes */
52void proto_reg_handoff_oran(void);
53void proto_register_oran(void);
54
55/* Initialize the protocol and registered fields */
56static int proto_oran;
57
58static int oran_tap = -1;
59
60static int hf_oran_du_port_id;
61static int hf_oran_bandsector_id;
62static int hf_oran_cc_id;
63static int hf_oran_ru_port_id;
64static int hf_oran_sequence_id;
65static int hf_oran_e_bit;
66static int hf_oran_subsequence_id;
67static int hf_oran_previous_frame;
68
69
70static int hf_oran_data_direction;
71static int hf_oran_payload_version;
72static int hf_oran_filter_index;
73static int hf_oran_frame_id;
74static int hf_oran_subframe_id;
75static int hf_oran_slot_id;
76static int hf_oran_slot_within_frame;
77static int hf_oran_start_symbol_id;
78static int hf_oran_numberOfSections;
79static int hf_oran_sectionType;
80
81static int hf_oran_udCompHdr;
82static int hf_oran_udCompHdrIqWidth;
83static int hf_oran_udCompHdrIqWidth_pref;
84static int hf_oran_udCompHdrMeth;
85static int hf_oran_udCompHdrMeth_pref;
86static int hf_oran_udCompLen;
87static int hf_oran_numberOfUEs;
88static int hf_oran_timeOffset;
89static int hf_oran_frameStructure_fft;
90static int hf_oran_frameStructure_subcarrier_spacing;
91static int hf_oran_cpLength;
92static int hf_oran_timing_header;
93static int hf_oran_section_id;
94static int hf_oran_rb;
95static int hf_oran_symInc;
96static int hf_oran_startPrbc;
97static int hf_oran_reMask_re1;
98static int hf_oran_reMask_re2;
99static int hf_oran_reMask_re3;
100static int hf_oran_reMask_re4;
101static int hf_oran_reMask_re5;
102static int hf_oran_reMask_re6;
103static int hf_oran_reMask_re7;
104static int hf_oran_reMask_re8;
105static int hf_oran_reMask_re9;
106static int hf_oran_reMask_re10;
107static int hf_oran_reMask_re11;
108static int hf_oran_reMask_re12;
109static int hf_oran_reMask;
110static int hf_oran_numPrbc;
111static int hf_oran_numSymbol;
112static int hf_oran_ef;
113static int hf_oran_beamId;
114
115static int hf_oran_sinrCompHdrIqWidth_pref;
116static int hf_oran_sinrCompHdrMeth_pref;
117
118static int hf_oran_ciCompHdr;
119static int hf_oran_ciCompHdrIqWidth;
120static int hf_oran_ciCompHdrMeth;
121static int hf_oran_ciCompOpt;
122
123static int hf_oran_extension;
124static int hf_oran_exttype;
125static int hf_oran_extlen;
126
127static int hf_oran_bfw_bundle;
128static int hf_oran_bfw_bundle_id;
129static int hf_oran_bfw;
130static int hf_oran_bfw_i;
131static int hf_oran_bfw_q;
132
133static int hf_oran_ueId;
134static int hf_oran_freqOffset;
135static int hf_oran_regularizationFactor;
136static int hf_oran_laaMsgType;
137static int hf_oran_laaMsgLen;
138static int hf_oran_lbtHandle;
139static int hf_oran_lbtDeferFactor;
140static int hf_oran_lbtBackoffCounter;
141static int hf_oran_lbtOffset;
142static int hf_oran_MCOT;
143static int hf_oran_lbtMode;
144static int hf_oran_sfnSfEnd;
145static int hf_oran_lbtPdschRes;
146static int hf_oran_sfStatus;
147static int hf_oran_initialPartialSF;
148static int hf_oran_lbtDrsRes;
149static int hf_oran_lbtBufErr;
150static int hf_oran_lbtTrafficClass;
151static int hf_oran_lbtCWConfig_H;
152static int hf_oran_lbtCWConfig_T;
153static int hf_oran_lbtCWR_Rst;
154
155static int hf_oran_reserved;
156static int hf_oran_reserved_1bit;
157static int hf_oran_reserved_2bits;
158static int hf_oran_reserved_3bits;
159static int hf_oran_reserved_4bits;
160static int hf_oran_reserved_last_4bits;
161static int hf_oran_reserved_last_5bits;
162static int hf_oran_reserved_6bits;
163static int hf_oran_reserved_last_6bits;
164static int hf_oran_reserved_7bits;
165static int hf_oran_reserved_last_7bits;
166static int hf_oran_reserved_8bits;
167static int hf_oran_reserved_16bits;
168static int hf_oran_reserved_15bits;
169static int hf_oran_reserved_bit1;
170static int hf_oran_reserved_bit2;
171static int hf_oran_reserved_bit4;
172static int hf_oran_reserved_bit5;
173static int hf_oran_reserved_bits123;
174static int hf_oran_reserved_bits456;
175
176static int hf_oran_bundle_offset;
177static int hf_oran_cont_ind;
178
179static int hf_oran_bfwCompHdr;
180static int hf_oran_bfwCompHdr_iqWidth;
181static int hf_oran_bfwCompHdr_compMeth;
182static int hf_oran_symbolId;
183static int hf_oran_startPrbu;
184static int hf_oran_numPrbu;
185
186static int hf_oran_udCompParam;
187static int hf_oran_sReSMask;
188static int hf_oran_sReSMask_re12;
189static int hf_oran_sReSMask_re11;
190static int hf_oran_sReSMask_re10;
191static int hf_oran_sReSMask_re9;
192static int hf_oran_sReSMask_re8;
193static int hf_oran_sReSMask_re7;
194static int hf_oran_sReSMask_re6;
195static int hf_oran_sReSMask_re5;
196static int hf_oran_sReSMask_re4;
197static int hf_oran_sReSMask_re3;
198static int hf_oran_sReSMask_re2;
199static int hf_oran_sReSMask_re1;
200
201static int hf_oran_sReSMask1;
202static int hf_oran_sReSMask2;
203static int hf_oran_sReSMask1_2_re12;
204static int hf_oran_sReSMask1_2_re11;
205static int hf_oran_sReSMask1_2_re10;
206static int hf_oran_sReSMask1_2_re9;
207
208static int hf_oran_bfwCompParam;
209
210static int hf_oran_iSample;
211static int hf_oran_qSample;
212
213static int hf_oran_ciCompParam;
214
215static int hf_oran_blockScaler;
216static int hf_oran_compBitWidth;
217static int hf_oran_compShift;
218
219static int hf_oran_active_beamspace_coefficient_n1;
220static int hf_oran_active_beamspace_coefficient_n2;
221static int hf_oran_active_beamspace_coefficient_n3;
222static int hf_oran_active_beamspace_coefficient_n4;
223static int hf_oran_active_beamspace_coefficient_n5;
224static int hf_oran_active_beamspace_coefficient_n6;
225static int hf_oran_active_beamspace_coefficient_n7;
226static int hf_oran_active_beamspace_coefficient_n8;
227static int hf_oran_activeBeamspaceCoefficientMask;
228static int hf_oran_activeBeamspaceCoefficientMask_bits_set;
229
230static int hf_oran_se6_repetition;
231
232static int hf_oran_rbgSize;
233static int hf_oran_rbgMask;
234static int hf_oran_noncontig_priority;
235
236static int hf_oran_symbol_mask;
237static int hf_oran_symbol_mask_s13;
238static int hf_oran_symbol_mask_s12;
239static int hf_oran_symbol_mask_s11;
240static int hf_oran_symbol_mask_s10;
241static int hf_oran_symbol_mask_s9;
242static int hf_oran_symbol_mask_s8;
243static int hf_oran_symbol_mask_s7;
244static int hf_oran_symbol_mask_s6;
245static int hf_oran_symbol_mask_s5;
246static int hf_oran_symbol_mask_s4;
247static int hf_oran_symbol_mask_s3;
248static int hf_oran_symbol_mask_s2;
249static int hf_oran_symbol_mask_s1;
250static int hf_oran_symbol_mask_s0;
251
252static int hf_oran_exponent;
253static int hf_oran_iq_user_data;
254
255static int hf_oran_disable_bfws;
256static int hf_oran_rad;
257static int hf_oran_num_bund_prbs;
258static int hf_oran_beam_id;
259static int hf_oran_num_weights_per_bundle;
260
261static int hf_oran_ack_nack_req_id;
262
263static int hf_oran_frequency_range;
264static int hf_oran_off_start_prb;
265static int hf_oran_num_prb;
266
267static int hf_oran_samples_prb;
268static int hf_oran_ciSample;
269static int hf_oran_ciIsample;
270static int hf_oran_ciQsample;
271
272static int hf_oran_beamGroupType;
273static int hf_oran_numPortc;
274
275static int hf_oran_csf;
276static int hf_oran_modcompscaler;
277
278static int hf_oran_modcomp_param_set;
279static int hf_oran_mc_scale_re_mask;
280static int hf_oran_mc_scale_offset;
281
282static int hf_oran_eAxC_mask;
283static int hf_oran_technology;
284static int hf_oran_nullLayerInd;
285
286static int hf_oran_se19_repetition;
287static int hf_oran_portReMask;
288static int hf_oran_portSymbolMask;
289
290static int hf_oran_ext19_port;
291
292static int hf_oran_prb_allocation;
293static int hf_oran_nextSymbolId;
294static int hf_oran_nextStartPrbc;
295
296static int hf_oran_puncPattern;
297static int hf_oran_numPuncPatterns;
298static int hf_oran_symbolMask_ext20;
299static int hf_oran_startPuncPrb;
300static int hf_oran_numPuncPrb;
301static int hf_oran_puncReMask;
302static int hf_oran_multiSDScope;
303static int hf_oran_RbgIncl;
304
305static int hf_oran_ci_prb_group_size;
306static int hf_oran_prg_size_st5;
307static int hf_oran_prg_size_st6;
308
309static int hf_oran_num_ueid;
310
311static int hf_oran_antMask;
312
313static int hf_oran_transmissionWindowOffset;
314static int hf_oran_transmissionWindowSize;
315static int hf_oran_toT;
316
317static int hf_oran_bfaCompHdr;
318static int hf_oran_bfAzPtWidth;
319static int hf_oran_bfZePtWidth;
320static int hf_oran_bfAz3ddWidth;
321static int hf_oran_bfZe3ddWidth;
322static int hf_oran_bfAzPt;
323static int hf_oran_bfZePt;
324static int hf_oran_bfAz3dd;
325static int hf_oran_bfZe3dd;
326static int hf_oran_bfAzSl;
327static int hf_oran_bfZeSl;
328
329static int hf_oran_cmd_scope;
330static int hf_oran_number_of_st4_cmds;
331
332static int hf_oran_st4_cmd_header;
333static int hf_oran_st4_cmd_type;
334static int hf_oran_st4_cmd_len;
335static int hf_oran_st4_cmd_num_slots;
336static int hf_oran_st4_cmd_ack_nack_req_id;
337
338static int hf_oran_st4_cmd;
339
340static int hf_oran_sleepmode_trx;
341static int hf_oran_sleepmode_asm;
342static int hf_oran_log2maskbits;
343static int hf_oran_num_slots_ext;
344static int hf_oran_antMask_trx_control;
345
346static int hf_oran_ready;
347static int hf_oran_number_of_acks;
348static int hf_oran_number_of_nacks;
349static int hf_oran_ackid;
350static int hf_oran_nackid;
351
352static int hf_oran_acknack_request_frame;
353static int hf_oran_acknack_request_time;
354static int hf_oran_acknack_request_type;
355static int hf_oran_acknack_response_frame;
356static int hf_oran_acknack_response_time;
357
358static int hf_oran_disable_tdbfns;
359static int hf_oran_td_beam_group;
360static int hf_oran_disable_tdbfws;
361static int hf_oran_td_beam_num;
362
363static int hf_oran_dir_pattern;
364static int hf_oran_guard_pattern;
365
366static int hf_oran_ecpri_pcid;
367static int hf_oran_ecpri_rtcid;
368static int hf_oran_ecpri_seqid;
369
370static int hf_oran_num_sym_prb_pattern;
371static int hf_oran_prb_mode;
372static int hf_oran_sym_prb_pattern;
373static int hf_oran_sym_mask;
374static int hf_oran_num_mc_scale_offset;
375static int hf_oran_prb_pattern;
376static int hf_oran_prb_block_offset;
377static int hf_oran_prb_block_size;
378
379static int hf_oran_codebook_index;
380static int hf_oran_layerid;
381static int hf_oran_numlayers;
382static int hf_oran_txscheme;
383static int hf_oran_crs_remask;
384static int hf_oran_crs_shift;
385static int hf_oran_crs_symnum;
386static int hf_oran_beamid_ap1;
387static int hf_oran_beamid_ap2;
388static int hf_oran_beamid_ap3;
389
390static int hf_oran_port_list_index;
391static int hf_oran_alpn_per_sym;
392static int hf_oran_ant_dmrs_snr;
393static int hf_oran_user_group_size;
394static int hf_oran_user_group_id;
395static int hf_oran_entry_type;
396static int hf_oran_dmrs_port_number;
397static int hf_oran_ueid_reset;
398
399static int hf_oran_dmrs_symbol_mask;
400static int hf_oran_dmrs_symbol_mask_s13;
401static int hf_oran_dmrs_symbol_mask_s12;
402static int hf_oran_dmrs_symbol_mask_s11;
403static int hf_oran_dmrs_symbol_mask_s10;
404static int hf_oran_dmrs_symbol_mask_s9;
405static int hf_oran_dmrs_symbol_mask_s8;
406static int hf_oran_dmrs_symbol_mask_s7;
407static int hf_oran_dmrs_symbol_mask_s6;
408static int hf_oran_dmrs_symbol_mask_s5;
409static int hf_oran_dmrs_symbol_mask_s4;
410static int hf_oran_dmrs_symbol_mask_s3;
411static int hf_oran_dmrs_symbol_mask_s2;
412static int hf_oran_dmrs_symbol_mask_s1;
413static int hf_oran_dmrs_symbol_mask_s0;
414
415static int hf_oran_scrambling;
416static int hf_oran_nscid;
417static int hf_oran_dtype;
418static int hf_oran_cmd_without_data;
419static int hf_oran_lambda;
420static int hf_oran_first_prb;
421static int hf_oran_last_prb;
422static int hf_oran_low_papr_type;
423static int hf_oran_hopping_mode;
424
425static int hf_oran_tx_win_for_on_air_symbol_l;
426static int hf_oran_tx_win_for_on_air_symbol_r;
427
428static int hf_oran_num_fo_fb;
429static int hf_oran_freq_offset_fb;
430
431static int hf_oran_num_sinr_per_prb;
432static int hf_oran_num_sinr_per_prb_right;
433
434static int hf_oran_sinr_value;
435
436static int hf_oran_measurement_report;
437static int hf_oran_mf;
438static int hf_oran_meas_data_size;
439static int hf_oran_meas_type_id;
440static int hf_oran_ipn_power;
441static int hf_oran_ue_tae;
442static int hf_oran_ue_layer_power;
443static int hf_oran_num_elements;
444static int hf_oran_ant_dmrs_snr_val;
445static int hf_oran_ue_freq_offset;
446
447static int hf_oran_measurement_command;
448
449static int hf_oran_beam_type;
450static int hf_oran_meas_cmd_size;
451
452static int hf_oran_symbol_reordering_layer;
453static int hf_oran_dmrs_entry;
454
455static int hf_oran_c_section_common;
456static int hf_oran_c_section;
457static int hf_oran_u_section;
458
459static int hf_oran_u_section_ul_symbol_time;
460static int hf_oran_u_section_ul_symbol_frames;
461static int hf_oran_u_section_ul_symbol_first_frame;
462static int hf_oran_u_section_ul_symbol_last_frame;
463
464/* Computed fields */
465static int hf_oran_c_eAxC_ID;
466static int hf_oran_refa;
467
468/* Convenient fields for filtering, mostly shown as hidden */
469static int hf_oran_cplane;
470static int hf_oran_uplane;
471static int hf_oran_bf; /* to match frames that configure beamforming in any way */
472static int hf_oran_zero_prb;
473
474static int hf_oran_ul_cplane_ud_comp_hdr_frame;
475
476/* Initialize the subtree pointers */
477static int ett_oran;
478static int ett_oran_ecpri_rtcid;
479static int ett_oran_ecpri_pcid;
480static int ett_oran_ecpri_seqid;
481static int ett_oran_section;
482static int ett_oran_section_type;
483static int ett_oran_u_timing;
484static int ett_oran_u_section;
485static int ett_oran_u_prb;
486static int ett_oran_iq;
487static int ett_oran_bfw_bundle;
488static int ett_oran_bfw;
489static int ett_oran_frequency_range;
490static int ett_oran_prb_cisamples;
491static int ett_oran_cisample;
492static int ett_oran_udcomphdr;
493static int ett_oran_udcompparam;
494static int ett_oran_cicomphdr;
495static int ett_oran_cicompparam;
496static int ett_oran_bfwcomphdr;
497static int ett_oran_bfwcompparam;
498static int ett_oran_ext19_port;
499static int ett_oran_prb_allocation;
500static int ett_oran_punc_pattern;
501static int ett_oran_bfacomphdr;
502static int ett_oran_modcomp_param_set;
503static int ett_oran_st4_cmd_header;
504static int ett_oran_st4_cmd;
505static int ett_oran_sym_prb_pattern;
506static int ett_oran_measurement_report;
507static int ett_oran_measurement_command;
508static int ett_oran_sresmask;
509static int ett_oran_c_section_common;
510static int ett_oran_c_section;
511static int ett_oran_remask;
512static int ett_oran_symbol_reordering_layer;
513static int ett_oran_dmrs_entry;
514static int ett_oran_dmrs_symbol_mask;
515static int ett_oran_symbol_mask;
516static int ett_active_beamspace_coefficient_mask;
517
518
519/* Don't want all extensions to open and close together. Use extType-1 entry */
520static int ett_oran_c_section_extension[HIGHEST_EXTTYPE28];
521
522/* Expert info */
523static expert_field ei_oran_unsupported_bfw_compression_method;
524static expert_field ei_oran_invalid_sample_bit_width;
525static expert_field ei_oran_reserved_numBundPrb;
526static expert_field ei_oran_extlen_wrong;
527static expert_field ei_oran_invalid_eaxc_bit_width;
528static expert_field ei_oran_extlen_zero;
529static expert_field ei_oran_rbg_size_reserved;
530static expert_field ei_oran_frame_length;
531static expert_field ei_oran_numprbc_ext21_zero;
532static expert_field ei_oran_ci_prb_group_size_reserved;
533static expert_field ei_oran_st8_nackid;
534static expert_field ei_oran_st4_no_cmds;
535static expert_field ei_oran_st4_zero_len_cmd;
536static expert_field ei_oran_st4_wrong_len_cmd;
537static expert_field ei_oran_st4_unknown_cmd;
538static expert_field ei_oran_mcot_out_of_range;
539static expert_field ei_oran_se10_unknown_beamgrouptype;
540static expert_field ei_oran_se10_not_allowed;
541static expert_field ei_oran_start_symbol_id_not_zero;
542static expert_field ei_oran_trx_control_cmd_scope;
543static expert_field ei_oran_unhandled_se;
544static expert_field ei_oran_bad_symbolmask;
545static expert_field ei_oran_numslots_not_zero;
546static expert_field ei_oran_version_unsupported;
547static expert_field ei_oran_laa_msg_type_unsupported;
548static expert_field ei_oran_se_on_unsupported_st;
549static expert_field ei_oran_cplane_unexpected_sequence_number_ul;
550static expert_field ei_oran_cplane_unexpected_sequence_number_dl;
551static expert_field ei_oran_uplane_unexpected_sequence_number_ul;
552static expert_field ei_oran_uplane_unexpected_sequence_number_dl;
553static expert_field ei_oran_acknack_no_request;
554static expert_field ei_oran_udpcomphdr_should_be_zero;
555static expert_field ei_oran_radio_fragmentation_c_plane;
556static expert_field ei_oran_radio_fragmentation_u_plane;
557static expert_field ei_oran_lastRbdid_out_of_range;
558static expert_field ei_oran_rbgMask_beyond_last_rbdid;
559static expert_field ei_oran_unexpected_measTypeId;
560static expert_field ei_oran_unsupported_compression_method;
561static expert_field ei_oran_ud_comp_len_wrong_size;
562static expert_field ei_oran_sresmask2_not_zero_with_rb;
563static expert_field ei_oran_st6_rb_shall_be_0;
564static expert_field ei_oran_st9_not_ul;
565static expert_field ei_oran_st10_numsymbol_not_14;
566static expert_field ei_oran_st10_startsymbolid_not_0;
567static expert_field ei_oran_st10_not_ul;
568static expert_field ei_oran_se24_nothing_to_inherit;
569static expert_field ei_oran_num_sinr_per_prb_unknown;
570static expert_field ei_oran_start_symbol_id_bits_ignored;
571static expert_field ei_oran_user_group_id_reserved_value;
572static expert_field ei_oran_port_list_index_zero;
573static expert_field ei_oran_ul_uplane_symbol_too_long;
574
575
576/* These are the message types handled by this dissector */
577#define ECPRI_MT_IQ_DATA0 0
578#define ECPRI_MT_RT_CTRL_DATA2 2
579
580
581/* Preference settings - try to set reasonable defaults */
582static unsigned pref_du_port_id_bits = 4;
583static unsigned pref_bandsector_id_bits = 4;
584static unsigned pref_cc_id_bits = 4;
585static unsigned pref_ru_port_id_bits = 4;
586
587/* TODO: ideally should be per-flow */
588static unsigned pref_sample_bit_width_uplink = 14;
589static unsigned pref_sample_bit_width_downlink = 14;
590static unsigned pref_sample_bit_width_sinr = 14;
591
592/* 8.3.3.15 Compression schemes */
593#define COMP_NONE0 0
594#define COMP_BLOCK_FP1 1
595#define COMP_BLOCK_SCALE2 2
596#define COMP_U_LAW3 3
597#define COMP_MODULATION4 4
598#define BFP_AND_SELECTIVE_RE5 5
599#define MOD_COMPR_AND_SELECTIVE_RE6 6
600#define BFP_AND_SELECTIVE_RE_WITH_MASKS7 7
601#define MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8 8
602
603/* TODO: these ideally should be per-flow too */
604static int pref_iqCompressionUplink = COMP_BLOCK_FP1;
605static int pref_iqCompressionDownlink = COMP_BLOCK_FP1;
606
607static int pref_iqCompressionSINR = COMP_BLOCK_FP1;
608
609
610/* Is udCompHeader present (both directions) */
611static int pref_includeUdCompHeaderUplink = 2; /* start heuristic */
612static int pref_includeUdCompHeaderDownlink = 2; /* start heuristic */
613
614static unsigned pref_data_plane_section_total_rbs = 273;
615static unsigned pref_num_weights_per_bundle = 32;
616static unsigned pref_num_bf_antennas = 32;
617static bool_Bool pref_showIQSampleValues = true1;
618
619/* Based upon m-plane param, so will be system-wide */
620static int pref_support_udcompLen = 2; /* start heuristic, can force other settings if necessary */
621static bool_Bool udcomplen_heuristic_result_set = false0;
622static bool_Bool udcomplen_heuristic_result = false0;
623
624/* st6-4byte-alignment-required */
625static bool_Bool st6_4byte_alignment = false0;
626
627/* Requested, allows I/Q to be stored as integers.. */
628static bool_Bool show_unscaled_values = false0;
629
630/* Initialized off. Timing is in microseconds. */
631static unsigned us_allowed_for_ul_in_symbol = 0;
632
633/* K (number of digital antenna ports support by the O-RU) */
634static unsigned k_antenna_ports = 64;
635
636static const enum_val_t dl_compression_options[] = {
637 { "COMP_NONE", "No Compression", COMP_NONE0 },
638 { "COMP_BLOCK_FP", "Block Floating Point Compression", COMP_BLOCK_FP1 },
639 { "COMP_BLOCK_SCALE", "Block Scaling Compression", COMP_BLOCK_SCALE2 },
640 { "COMP_U_LAW", "u-Law Compression", COMP_U_LAW3 },
641 { "COMP_MODULATION", "Modulation Compression", COMP_MODULATION4 },
642 { "BFP_AND_SELECTIVE_RE", "Block Floating Point + selective RE sending", BFP_AND_SELECTIVE_RE5 },
643 { "MOD_COMPR_AND_SELECTIVE_RE", "Modulation Compression + selective RE sending", MOD_COMPR_AND_SELECTIVE_RE6 },
644 { "BFP_AND_SELECTIVE_RE_WITH_MASKS", "Block Floating Point + selective RE sending with masks in section header", BFP_AND_SELECTIVE_RE_WITH_MASKS7 },
645 { "MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS", "Modulation Compression + selective RE sending with masks in section header", MOD_COMPR_AND_SELECTIVE_RE6 },
646 { NULL((void*)0), NULL((void*)0), 0 }
647};
648
649static const enum_val_t ul_compression_options[] = {
650 { "COMP_NONE", "No Compression", COMP_NONE0 },
651 { "COMP_BLOCK_FP", "Block Floating Point Compression", COMP_BLOCK_FP1 },
652 { "COMP_BLOCK_SCALE", "Block Scaling Compression", COMP_BLOCK_SCALE2 },
653 { "COMP_U_LAW", "u-Law Compression", COMP_U_LAW3 },
654 { "BFP_AND_SELECTIVE_RE", "Block Floating Point + selective RE sending", BFP_AND_SELECTIVE_RE5 },
655 { "BFP_AND_SELECTIVE_RE_WITH_MASKS", "Block Floating Point + selective RE sending with masks in section header", BFP_AND_SELECTIVE_RE_WITH_MASKS7 },
656 { NULL((void*)0), NULL((void*)0), 0 }
657};
658
659static const enum_val_t udcomplen_support_options[] = {
660 { "NOT_SUPPORTED", "Not Supported", 0 },
661 { "SUPPORTED", "Supported", 1 },
662 { "HEURISTIC", "Attempt Heuristic", 2 },
663 { NULL((void*)0), NULL((void*)0), 0 }
664};
665
666static const enum_val_t udcomphdr_present_options[] = {
667 { "NOT_PRESENT", "Not Present", 0 },
668 { "PRESENT", "Present", 1 },
669 { "HEURISTIC", "Attempt Heuristic", 2 },
670 { NULL((void*)0), NULL((void*)0), 0 }
671};
672
673
674
675static const value_string e_bit[] = {
676 { 0, "More fragments follow" },
677 { 1, "Last fragment" },
678 { 0, NULL((void*)0)}
679};
680
681#define DIR_UPLINK0 0
682#define DIR_DOWNLINK1 1
683
684
685static const value_string data_direction_vals[] = {
686 { DIR_UPLINK0, "Uplink" }, /* gNB Rx */
687 { DIR_DOWNLINK1, "Downlink" }, /* gNB Tx */
688 { 0, NULL((void*)0)}
689};
690
691static const value_string rb_vals[] = {
692 { 0, "Every RB used" },
693 { 1, "Every other RB used" },
694 { 0, NULL((void*)0)}
695};
696
697static const value_string sym_inc_vals[] = {
698 { 0, "Use the current symbol number" },
699 { 1, "Increment the current symbol number" },
700 { 0, NULL((void*)0)}
701};
702
703static const value_string lbtMode_vals[] = {
704 { 0, "Full LBT (regular LBT, sending reservation signal until the beginning of the SF/slot)" },
705 { 1, "Partial LBT (looking back 25 usec prior to transmission" },
706 { 2, "Partial LBT (looking back 34 usec prior to transmission" },
707 { 3, "Full LBT and stop (regular LBT, without sending reservation signal" },
708 { 0, NULL((void*)0)}
709};
710
711static const range_string filter_indices[] = {
712 {0, 0, "standard channel filter"},
713 {1, 1, "UL filter for PRACH preamble formats 0, 1, 2; min. passband 839 x 1.25kHz = 1048.75 kHz"},
714 {2, 2, "UL filter for PRACH preamble format 3, min. passband 839 x 5 kHz = 4195 kHz"},
715 {3, 3, "UL filter for PRACH preamble formats A1, A2, A3, B1, B2, B3, B4, C0, C2; min. passband 139 x \u0394fRA"},
716 {4, 4, "UL filter for NPRACH 0, 1; min. passband 48 x 3.75KHz = 180 KHz"},
717 {5, 5, "UL filter for PRACH preamble formats"},
718 {8, 8, "UL filter NPUSCH"},
719 {9, 9, "Mixed numerology and other channels except PRACH and NB-IoT"},
720 {9, 15, "Reserved"},
721 {0, 0, NULL((void*)0)}
722};
723
724static const range_string section_types[] = {
725 { SEC_C_UNUSED_RB, SEC_C_UNUSED_RB, "Unused Resource Blocks or symbols in Downlink or Uplink" },
726 { SEC_C_NORMAL, SEC_C_NORMAL, "Most DL/UL radio channels" },
727 { SEC_C_RSVD2, SEC_C_RSVD2, "Reserved for future use" },
728 { SEC_C_PRACH, SEC_C_PRACH, "PRACH and mixed-numerology channels" },
729 { SEC_C_SLOT_CONTROL, SEC_C_SLOT_CONTROL, "Slot Configuration Control" },
730 { SEC_C_UE_SCHED, SEC_C_UE_SCHED, "UE scheduling information (UE-ID assignment to section)" },
731 { SEC_C_CH_INFO, SEC_C_CH_INFO, "Channel information" },
732 { SEC_C_LAA, SEC_C_LAA, "LAA (License Assisted Access)" },
733 { SEC_C_ACK_NACK_FEEDBACK, SEC_C_ACK_NACK_FEEDBACK, "ACK/NACK Feedback" },
734 { SEC_C_SINR_REPORTING, SEC_C_SINR_REPORTING, "SINR Reporting" },
735 { SEC_C_RRM_MEAS_REPORTS, SEC_C_RRM_MEAS_REPORTS, "RRM Measurement Reports" },
736 { SEC_C_REQUEST_RRM_MEAS, SEC_C_REQUEST_RRM_MEAS, "Request RRM Measurements" },
737 { 12, 255, "Reserved for future use" },
738 { 0, 0, NULL((void*)0)} };
739
740static const range_string section_types_short[] = {
741 { SEC_C_UNUSED_RB, SEC_C_UNUSED_RB, "(Unused RBs) " },
742 { SEC_C_NORMAL, SEC_C_NORMAL, "(Most channels) " },
743 { SEC_C_RSVD2, SEC_C_RSVD2, "(reserved) " },
744 { SEC_C_PRACH, SEC_C_PRACH, "(PRACH/mixed-\u03bc)" },
745 { SEC_C_SLOT_CONTROL, SEC_C_SLOT_CONTROL, "(Slot info) " },
746 { SEC_C_UE_SCHED, SEC_C_UE_SCHED, "(UE scheduling info)" },
747 { SEC_C_CH_INFO, SEC_C_CH_INFO, "(Channel info) " },
748 { SEC_C_LAA, SEC_C_LAA, "(LAA) " },
749 { SEC_C_ACK_NACK_FEEDBACK, SEC_C_ACK_NACK_FEEDBACK, "(ACK/NACK) " },
750 { SEC_C_SINR_REPORTING, SEC_C_SINR_REPORTING, "(SINR Reporting) " },
751 { SEC_C_RRM_MEAS_REPORTS, SEC_C_RRM_MEAS_REPORTS, "(RRM Meas Reports) " },
752 { SEC_C_REQUEST_RRM_MEAS, SEC_C_REQUEST_RRM_MEAS, "(Req RRM Meas) " },
753 { 12, 255, "Reserved for future use" },
754 { 0, 0, NULL((void*)0) }
755};
756
757static const range_string ud_comp_header_width[] = {
758 {0, 0, "I and Q are each 16 bits wide"},
759 {1, 15, "Bit width of I and Q"},
760 {0, 0, NULL((void*)0)} };
761
762/* Table 8.3.3.13-3 */
763static const range_string ud_comp_header_meth[] = {
764 {COMP_NONE0, COMP_NONE0, "No compression" },
765 {COMP_BLOCK_FP1, COMP_BLOCK_FP1, "Block floating point compression" },
766 {COMP_BLOCK_SCALE2, COMP_BLOCK_SCALE2, "Block scaling" },
767 {COMP_U_LAW3, COMP_U_LAW3, "Mu - law" },
768 {COMP_MODULATION4, COMP_MODULATION4, "Modulation compression" },
769 {BFP_AND_SELECTIVE_RE5, BFP_AND_SELECTIVE_RE5, "BFP + selective RE sending" },
770 {MOD_COMPR_AND_SELECTIVE_RE6, MOD_COMPR_AND_SELECTIVE_RE6, "mod-compr + selective RE sending" },
771 {BFP_AND_SELECTIVE_RE_WITH_MASKS7, BFP_AND_SELECTIVE_RE_WITH_MASKS7, "BFP + selective RE sending with masks in section header" },
772 {MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8, MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8, "mod-compr + selective RE sending with masks in section header"},
773 {9, 15, "Reserved"},
774 {0, 0, NULL((void*)0)}
775};
776
777/* Table 7.5.2.13-2 */
778static const range_string frame_structure_fft[] = {
779 {0, 0, "Reserved (no FFT/iFFT processing)"},
780 {1, 3, "Reserved"},
781 {4, 4, "FFT size 16"},
782 {5, 5, "FFT size 32"},
783 {6, 6, "FFT size 64"},
784 {7, 7, "FFT size 128"},
785 {8, 8, "FFT size 256"},
786 {9, 9, "FFT size 512"},
787 {10, 10, "FFT size 1024"},
788 {11, 11, "FFT size 2048"},
789 {12, 12, "FFT size 4096"},
790 {13, 13, "FFT size 1536"},
791 {14, 14, "FFT size 3072"},
792 {15, 15, "Reserved"},
793 {0, 0, NULL((void*)0)}
794};
795
796/* Table 7.5.2.13-3 */
797static const range_string subcarrier_spacings[] = {
798 { 0, 0, "SCS 15 kHz, 1 slot/subframe, slot length 1 ms" },
799 { 1, 1, "SCS 30 kHz, 2 slots/subframe, slot length 500 \u03bcs" },
800 { 2, 2, "SCS 60 kHz, 4 slots/subframe, slot length 250 \u03bcs" },
801 { 3, 3, "SCS 120 kHz, 8 slots/subframe, slot length 125 \u03bcs" },
802 { 4, 4, "SCS 240 kHz, 16 slots/subframe, slot length 62.5 \u03bcs" },
803 { 5, 11, "Reserved" }, /* N.B., 5 was 480kHz in early spec versions */
804 { 12, 12, "SCS 1.25 kHz, 1 slot/subframe, slot length 1 ms" },
805 { 13, 13, "SCS 3.75 kHz(LTE - specific), 1 slot/subframe, slot length 1 ms" },
806 { 14, 14, "SCS 5 kHz, 1 slot/subframe, slot length 1 ms" },
807 { 15, 15, "SCS 7.5 kHz(LTE - specific), 1 slot/subframe, slot length 1 ms" },
808 { 0, 0, NULL((void*)0) }
809};
810
811/* Table 7.5.3.14-1 laaMsgType definition */
812static const range_string laaMsgTypes[] = {
813 {0, 0, "LBT_PDSCH_REQ - lls - O-DU to O-RU request to obtain a PDSCH channel"},
814 {1, 1, "LBT_DRS_REQ - lls - O-DU to O-RU request to obtain the channel and send DRS"},
815 {2, 2, "LBT_PDSCH_RSP - O-RU to O-DU response, channel acq success or failure"},
816 {3, 3, "LBT_DRS_RSP - O-RU to O-DU response, DRS sending success or failure"},
817 {4, 4, "LBT_Buffer_Error - O-RU to O-DU response, reporting buffer overflow"},
818 {5, 5, "LBT_CWCONFIG_REQ - O-DU to O-RU request, congestion window configuration"},
819 {6, 6, "LBT_CWCONFIG_RST - O-RU to O-DU request, congestion window config, response"},
820 {7, 15, "reserved for future methods"},
821 {0, 0, NULL((void*)0)}
822};
823
824static const range_string freq_offset_fb_values[] = {
825 {0, 0, "no frequency offset"},
826 {8000, 8000, "value not provided"},
827 {1, 30000, "positive frequency offset, (0, +0.5] subcarrier"},
828 {0x8ad0, 0xffff, "negative frequency offset, [-0.5, 0) subcarrier"},
829 {0x0, 0xffff, "reserved"},
830 {0, 0, NULL((void*)0)}
831};
832
833static const value_string num_sinr_per_prb_vals[] = {
834 { 0, "1" },
835 { 1, "2" },
836 { 2, "3" },
837 { 3, "4" },
838 { 4, "6" },
839 { 5, "12" },
840 { 6, "reserved" },
841 { 7, "reserved" },
842 { 0, NULL((void*)0)}
843};
844
845static const value_string meas_type_id_vals[] = {
846 { 1, "UE Timing Advance Error" },
847 { 2, "UE Layer power" },
848 { 3, "UE frequency offset" },
849 { 4, "Interference plus Noise for allocated PRBs" },
850 { 5, "Interference plus Noise for unallocated PRBs" },
851 { 6, "DMRS SNR per antenna" },
852 { 0, NULL((void*)0)}
853};
854
855static const value_string beam_type_vals[] = {
856 { 0, "List of beamId values" },
857 { 1, "Range of beamId values" },
858 { 0, NULL((void*)0)}
859};
860
861/* 7.7.24.3 */
862static const value_string entry_type_vals[] = {
863 { 0, "inherit config from preceding entry (2 or 3) ueIdReset=0" },
864 { 1, "inherit config from preceding entry (2 or 3) ueIdReset=1" },
865 { 2, "related parameters if have transform precoding disabled " },
866 { 3, "related parameters if have transform precoding enabled " },
867 { 0, NULL((void*)0)}
868};
869
870
871/* Table 7.6.1-1 */
872static const value_string exttype_vals[] = {
873 {0, "Reserved"},
874 {1, "Beamforming weights"},
875 {2, "Beamforming attributes"},
876 {3, "DL Precoding configuration parameters and indications"},
877 {4, "Modulation compr. params"},
878 {5, "Modulation compression additional scaling parameters"},
879 {6, "Non-contiguous PRB allocation"},
880 {7, "Multiple-eAxC designation"},
881 {8, "Regularization factor"},
882 {9, "Dynamic Spectrum Sharing parameters"},
883 {10, "Multiple ports grouping"},
884 {11, "Flexible BF weights"},
885 {12, "Non-Contiguous PRB Allocation with Frequency Ranges"},
886 {13, "PRB Allocation with Frequency Hopping"},
887 {14, "Nulling-layer Info. for ueId-based beamforming"},
888 {15, "Mixed-numerology Info. for ueId-based beamforming"},
889 {16, "Section description for antenna mapping in UE channel information based UL beamforming"},
890 {17, "Section description for indication of user port group"},
891 {18, "Section description for Uplink Transmission Management"},
892 {19, "Compact beamforming information for multiple port"},
893 {20, "Puncturing extension"},
894 {21, "Variable PRB group size for channel information"},
895 {22, "ACK/NACK request"},
896 {23, "Multiple symbol modulation compression parameters"},
897 {24, "PUSCH DMRS configuration"},
898 {25, "Symbol reordering for DMRS-BF"},
899 {26, "Frequency offset feedback"},
900 {27, "O-DU controlled dimensionality reduction"},
901 {28, "O-DU controlled frequency resolution for SINR reporting"},
902 {0, NULL((void*)0)}
903};
904
905/**************************************************************************************/
906/* Keep track for each Section Extension, which section types are allowed to carry it */
907typedef struct {
908 bool_Bool ST0;
909 bool_Bool ST1;
910 bool_Bool ST3;
911 bool_Bool ST5;
912 bool_Bool ST6;
913 bool_Bool ST10;
914 bool_Bool ST11;
915} AllowedCTs_t;
916
917
918static AllowedCTs_t ext_cts[HIGHEST_EXTTYPE28] = {
919 /* ST0 ST1 ST3 ST5 ST6 ST10 ST11 */
920 { false0, true1, true1, false0, false0, false0, false0}, // SE 1 (1,3)
921 { false0, true1, true1, false0, false0, false0, false0}, // SE 2 (1,3)
922 { false0, true1, true1, false0, false0, false0, false0}, // SE 3 (1,3)
923 { false0, true1, true1, true1, false0, false0, false0}, // SE 4 (1,3,5)
924 { false0, true1, true1, true1, false0, false0, false0}, // SE 5 (1,3,5)
925 { false0, true1, true1, true1, false0, true1, true1 }, // SE 6 (1,3,5,10,11)
926 { true1, false0, false0, false0, false0, false0, false0}, // SE 7 (0)
927 { false0, false0, false0, true1, false0, false0, false0}, // SE 8 (5)
928 { true1, true1, true1, true1, true1, true1, true1 }, // SE 9 (all)
929 { false0, true1, true1, true1, false0, false0, false0}, // SE 10 (1,3,5)
930 { false0, true1, true1, false0, false0, false0, false0}, // SE 11 (1,3)
931 { false0, true1, true1, true1, false0, true1, true1 }, // SE 12 (1,3,5,10,11)
932 { false0, true1, true1, true1, false0, false0, false0}, // SE 13 (1,3,5)
933 { false0, false0, false0, true1, false0, false0, false0}, // SE 14 (5)
934 { false0, false0, false0, true1, true1, false0, false0}, // SE 15 (5,6)
935 { false0, false0, false0, true1, false0, false0, false0}, // SE 16 (5)
936 { false0, false0, false0, true1, false0, false0, false0}, // SE 17 (5)
937 { false0, true1, true1, true1, false0, false0, false0}, // SE 18 (1,3,5)
938 { false0, true1, true1, false0, false0, false0, false0}, // SE 19 (1,3)
939 { true1, true1, true1, true1, true1, true1, true1 }, // SE 20 (0,1,3,5,10,11)
940 { false0, false0, false0, true1, true1, false0, false0}, // SE 21 (5,6)
941 { true1, true1, true1, true1, true1, true1, true1 }, // SE 22 (all)
942 { false0, true1, true1, true1, false0, false0, false0}, // SE 23 (1,3,5)
943 { false0, false0, false0, true1, false0, false0, false0}, // SE 24 (5)
944 { false0, false0, false0, true1, false0, false0, false0}, // SE 25 (5)
945 { false0, false0, false0, true1, false0, false0, false0}, // SE 26 (5)
946 { false0, false0, false0, true1, false0, false0, false0}, // SE 27 (5)
947 { false0, false0, false0, true1, false0, false0, false0}, // SE 28 (5)
948};
949
950static bool_Bool se_allowed_in_st(unsigned se, unsigned ct)
951{
952 if (se==0 || se>HIGHEST_EXTTYPE28) {
953 /* Don't know about new SE, so don't complain.. */
954 return true1;
955 }
956
957 switch (ct) {
958 case 1:
959 return ext_cts[se-1].ST1;
960 case 3:
961 return ext_cts[se-1].ST3;
962 case 5:
963 return ext_cts[se-1].ST5;
964 case 6:
965 return ext_cts[se-1].ST6;
966 case 10:
967 return ext_cts[se-1].ST10;
968 case 11:
969 return ext_cts[se-1].ST11;
970 default:
971 /* New/unknown section type that includes 'ef'.. assume ok */
972 return true1;
973 }
974}
975
976/************************************************************************************/
977
978/* Table 7.7.1.2-2 */
979static const value_string bfw_comp_headers_iq_width[] = {
980 {0, "I and Q are 16 bits wide"},
981 {1, "I and Q are 1 bit wide"},
982 {2, "I and Q are 2 bits wide"},
983 {3, "I and Q are 3 bits wide"},
984 {4, "I and Q are 4 bits wide"},
985 {5, "I and Q are 5 bits wide"},
986 {6, "I and Q are 6 bits wide"},
987 {7, "I and Q are 7 bits wide"},
988 {8, "I and Q are 8 bits wide"},
989 {9, "I and Q are 9 bits wide"},
990 {10, "I and Q are 10 bits wide"},
991 {11, "I and Q are 11 bits wide"},
992 {12, "I and Q are 12 bits wide"},
993 {13, "I and Q are 13 bits wide"},
994 {14, "I and Q are 14 bits wide"},
995 {15, "I and Q are 15 bits wide"},
996 {0, NULL((void*)0)}
997};
998
999/* Table 7.7.1.2-3 */
1000static const value_string bfw_comp_headers_comp_meth[] = {
1001 {COMP_NONE0, "no compression"},
1002 {COMP_BLOCK_FP1, "block floating point"},
1003 {COMP_BLOCK_SCALE2, "block scaling"},
1004 {COMP_U_LAW3, "u-law"},
1005 {4, "beamspace compression type I"},
1006 {5, "beamspace compression type II"},
1007 {0, NULL((void*)0)}
1008};
1009
1010/* 7.7.6.2 rbgSize (resource block group size) */
1011static const value_string rbg_size_vals[] = {
1012 {0, "reserved"},
1013 {1, "1"},
1014 {2, "2"},
1015 {3, "3"},
1016 {4, "4"},
1017 {5, "6"},
1018 {6, "8"},
1019 {7, "16"},
1020 {0, NULL((void*)0)}
1021};
1022
1023/* 7.7.6.5 */
1024static const value_string priority_vals[] = {
1025 {0, "0"},
1026 {1, "+1"},
1027 {2, "-2 (reserved, should not be used)"},
1028 {3, "-1"},
1029 {0, NULL((void*)0)}
1030};
1031
1032/* 7.7.10.2 beamGroupType */
1033static const value_string beam_group_type_vals[] = {
1034 {0x0, "common beam"},
1035 {0x1, "beam matrix indication"},
1036 {0x2, "beam vector listing"},
1037 {0x3, "beamId/ueId listing with associated port-list index"},
1038 {0, NULL((void*)0)}
1039};
1040
1041/* 7.7.9.2 technology (interface name) */
1042static const value_string interface_name_vals[] = {
1043 {0x0, "LTE"},
1044 {0x1, "NR"},
1045 {0, NULL((void*)0)}
1046};
1047
1048/* 7.7.18.4 toT (type of transmission) */
1049static const value_string type_of_transmission_vals[] = {
1050 {0x0, "normal transmission mode, data can be distributed in any way the O-RU is implemented to transmit data"},
1051 {0x1, "uniformly distributed over the transmission window"},
1052 {0x2, "Reserved"},
1053 {0x3, "Reserved"},
1054 {0, NULL((void*)0)}
1055};
1056
1057/* 7.7.2.2 (width of bfa parameters) */
1058static const value_string bfa_bw_vals[] = {
1059 {0, "no bits, the field is not applicable (e.g., O-RU does not support it) or the default value shall be used"},
1060 {1, "2-bit bitwidth"},
1061 {2, "3-bit bitwidth"},
1062 {3, "4-bit bitwidth"},
1063 {4, "5-bit bitwidth"},
1064 {5, "6-bit bitwidth"},
1065 {6, "7-bit bitwidth"},
1066 {7, "8-bit bitwidth"},
1067 {0, NULL((void*)0)}
1068};
1069
1070/* 7.7.2.7 & 7.7.2.8 */
1071static const value_string sidelobe_suppression_vals[] = {
1072 {0, "10 dB"},
1073 {1, "15 dB"},
1074 {2, "20 dB"},
1075 {3, "25 dB"},
1076 {4, "30 dB"},
1077 {5, "35 dB"},
1078 {6, "40 dB"},
1079 {7, ">= 45 dB"},
1080 {0, NULL((void*)0)}
1081};
1082
1083static const value_string lbtTrafficClass_vals[] = {
1084 {1, "Priority 1"},
1085 {2, "Priority 2"},
1086 {3, "Priority 3"},
1087 {4, "Priority 4"},
1088 {0, NULL((void*)0)}
1089};
1090
1091/* 7.5.3.22 */
1092static const value_string lbtPdschRes_vals[] = {
1093 {0, "not sensing – indicates that the O-RU is transmitting data"},
1094 {1, "currently sensing – indicates the O-RU has not yet acquired the channel"},
1095 {2, "success – indicates that the channel was successfully acquired"},
1096 {3, "Failure – indicates expiration of the LBT timer. The LBT process should be reset"},
1097 {0, NULL((void*)0)}
1098};
1099
1100/* Table 7.5.2.15-3 */
1101static const value_string ci_comp_opt_vals[] = {
1102 {0, "compression per UE, one ciCompParam exists before the I/Q value of each UE"},
1103 {1, "compression per PRB, one ciCompParam exists before the I/Q value of each PRB"},
1104 {0, NULL((void*)0)}
1105};
1106
1107/* 7.5.2.17 */
1108static const range_string cmd_scope_vals[] = {
1109 {0, 0, "ARRAY-COMMAND"},
1110 {1, 1, "CARRIER-COMMAND"},
1111 {2, 2, "O-RU-COMMAND"},
1112 {3, 15, "reserved"},
1113 {0, 0, NULL((void*)0)}
1114};
1115
1116/* N.B., table in 7.5.3.38 is truncated.. */
1117static const range_string st4_cmd_type_vals[] = {
1118 {0, 0, "reserved for future command types"},
1119 {1, 1, "TIME_DOMAIN_BEAM_CONFIG"},
1120 {2, 2, "TDD_CONFIG_PATTERN"},
1121 {3, 3, "TRX_CONTROL"},
1122 {4, 4, "ASM"},
1123 {5, 255, "reserved for future command types"},
1124 {0, 0, NULL((void*)0)}
1125};
1126
1127/* Table 7.5.3.51-1 */
1128static const value_string log2maskbits_vals[] = {
1129 {0, "reserved"},
1130 {1, "min antMask size is 16 bits.."},
1131 {2, "min antMask size is 16 bits.."},
1132 {3, "min antMask size is 16 bits.."},
1133 {4, "16 bits"},
1134 {5, "32 bits"},
1135 {6, "64 bits"},
1136 {7, "128 bits"},
1137 {8, "256 bits"},
1138 {9, "512 bits"},
1139 {10, "1024 bits"},
1140 {11, "2048 bits"},
1141 {12, "4096 bits"},
1142 {13, "8192 bits"},
1143 {14, "16384 bits"},
1144 {15, "reserved"},
1145 {0, NULL((void*)0)}
1146};
1147
1148/* Table 16.1-1 Sleep modes */
1149static const value_string sleep_mode_trx_vals[] = {
1150 { 0, "TRXC-mode0-wake-up-duration (symbol)"},
1151 { 1, "TRXC-mode1-wake-up-duration (L)"},
1152 { 2, "TRXC-mode2-wake-up-duration (M)"},
1153 { 3, "TRXC-mode3-wake-up-duration (N)"},
1154 { 0, NULL((void*)0)}
1155};
1156
1157static const value_string sleep_mode_asm_vals[] = {
1158 { 0, "ASM-mode0-wake-up-duration (symbol)"},
1159 { 1, "ASM-mode1-wake-up-duration (L)"},
1160 { 2, "ASM-mode2-wake-up-duration (M)"},
1161 { 3, "ASM-mode3-wake-up-duration (N)"},
1162 { 0, NULL((void*)0)}
1163};
1164
1165/* 7.7.21.3.1 */
1166static const value_string prg_size_st5_vals[] = {
1167 { 0, "reserved"},
1168 { 1, "Precoding resource block group size as WIDEBAND"},
1169 { 2, "Precoding resource block group size 2"},
1170 { 3, "Precoding resource block group size 4"},
1171 { 0, NULL((void*)0)}
1172};
1173
1174/* 7.7.21.3.2 */
1175static const value_string prg_size_st6_vals[] = {
1176 { 0, "if ciPrbGroupSize is 2 or 4, then ciPrbGroupSize, else WIDEBAND"},
1177 { 1, "Precoding resource block group size as WIDEBAND"},
1178 { 2, "Precoding resource block group size 2"},
1179 { 3, "Precoding resource block group size 4"},
1180 { 0, NULL((void*)0)}
1181};
1182
1183/* 7.7.24.4 */
1184static const value_string alpn_per_sym_vals[] = {
1185 { 0, "report one allocated IPN value per all allocated symbols with DMRS"},
1186 { 1, "report one allocated IPN value per group of consecutive DMRS symbols"},
1187 { 0, NULL((void*)0)}
1188};
1189
1190/* 7.7.24.5 */
1191static const value_string ant_dmrs_snr_vals[] = {
1192 { 0, "O-RU shall not report the MEAS_ANT_DMRS_SNR"},
1193 { 1, "O-RU shall report the MEAS_ANT_DMRS_SNR"},
1194 { 0, NULL((void*)0)}
1195};
1196
1197/* 7.7.24.14 */
1198static const value_string dtype_vals[] = {
1199 { 0, "assume DMRS configuration type 1"},
1200 { 1, "assume DMRS configuration type 2"},
1201 { 0, NULL((void*)0)}
1202};
1203
1204/* 7.7.24.17 */
1205static const value_string papr_type_vals[] = {
1206 { 0, "sequence generator type 1 for short sequence lengths"},
1207 { 1, "sequence generator type 1 for long sequence lengths"},
1208 { 2, "sequence generator type 2 for short sequence lengths"},
1209 { 3, "sequence generator type 2 for long sequence lengths"},
1210 { 0, NULL((void*)0)}
1211};
1212
1213/* 7.7.24.18 */
1214static const value_string hopping_mode_vals[] = {
1215 { 0, "neither group, nor sequence hopping is enabled"},
1216 { 1, "group hopping is enabled and sequence hopping is disabled"},
1217 { 2, "sequence hopping is enabled and group hopping is disabled"},
1218 { 3, "reserved"},
1219 { 0, NULL((void*)0)}
1220};
1221
1222
1223static const true_false_string tfs_sfStatus =
1224{
1225 "subframe was transmitted",
1226 "subframe was dropped"
1227};
1228
1229static const true_false_string tfs_lbtBufErr =
1230{
1231 "buffer overflow – data received at O-RU is larger than the available buffer size",
1232 "reserved"
1233};
1234
1235static const true_false_string tfs_partial_full_sf = {
1236 "partial SF",
1237 "full SF"
1238};
1239
1240static const true_false_string disable_tdbfns_tfs = {
1241 "beam numbers excluded",
1242 "beam numbers included"
1243};
1244
1245static const true_false_string continuity_indication_tfs = {
1246 "continuity between current and next bundle",
1247 "discontinuity between current and next bundle"
1248};
1249
1250static const true_false_string prb_mode_tfs = {
1251 "PRB-BLOCK mode",
1252 "PRB-MASK mode"
1253};
1254
1255static const true_false_string symbol_direction_tfs = {
1256 "DL symbol",
1257 "UL symbol"
1258};
1259
1260static const true_false_string symbol_guard_tfs = {
1261 "guard symbol",
1262 "non-guard symbol"
1263};
1264
1265static const true_false_string beam_numbers_included_tfs = {
1266 "time-domain beam numbers excluded in this command",
1267 "time-domain beam numbers included in this command"
1268};
1269
1270static const true_false_string measurement_flag_tfs = {
1271 "at least one additional measurement report or command after the current one",
1272 "no additional measurement report or command"
1273};
1274
1275static const true_false_string repetition_se6_tfs = {
1276 "repeated highest priority data section in the C-Plane message",
1277 "no repetition"
1278};
1279
1280static const true_false_string repetition_se19_tfs = {
1281 "per port information not present in the extension",
1282 "per port info present in the extension"
1283};
1284
1285
1286
1287/* Forward declaration */
1288static int dissect_udcompparam(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree, unsigned offset,
1289 unsigned comp_meth,
1290 uint32_t *exponent, uint16_t *sReSMask, bool_Bool for_sinr);
1291
1292
1293static const true_false_string ready_tfs = {
1294 "message is a \"ready\" message",
1295 "message is a ACK message"
1296};
1297
1298static const true_false_string multi_sd_scope_tfs = {
1299 "Puncturing pattern applies to current and following sections",
1300 "Puncturing pattern applies to current section"
1301};
1302
1303static const true_false_string tfs_ueid_reset = {
1304 "cannot assume same UE as in preceding slot",
1305 "can assume same UE as in preceding slot"
1306};
1307
1308
1309/* Config for (and later, worked-out allocations) bundles for ext11 (dynamic BFW) */
1310typedef struct {
1311 /* Ext 6 config */
1312 bool_Bool ext6_set;
1313 uint8_t ext6_rbg_size; /* number of PRBs allocated by bitmask */
1314
1315 uint8_t ext6_num_bits_set;
1316 uint8_t ext6_bits_set[28]; /* Which bit position this entry has */
1317 /* TODO: store an f value for each bit position? */
1318
1319 /* Ext 12 config */
1320 bool_Bool ext12_set;
1321 unsigned ext12_num_pairs;
1322#define MAX_BFW_EXT12_PAIRS128 128
1323 struct {
1324 uint8_t off_start_prb;
1325 uint8_t num_prb;
1326 } ext12_pairs[MAX_BFW_EXT12_PAIRS128];
1327
1328 /* Ext 13 config */
1329 bool_Bool ext13_set;
1330 unsigned ext13_num_start_prbs;
1331#define MAX_BFW_EXT13_ALLOCATIONS128 128
1332 unsigned ext13_start_prbs[MAX_BFW_EXT13_ALLOCATIONS128];
1333 /* TODO: store nextSymbolId here too? */
1334
1335 /* Ext 21 config */
1336 bool_Bool ext21_set;
1337 uint8_t ext21_ci_prb_group_size;
1338
1339 /* Results/settings (after calling ext11_work_out_bundles()) */
1340 uint32_t num_bundles;
1341#define MAX_BFW_BUNDLES512 512
1342 struct {
1343 uint32_t start; /* first prb of bundle */
1344 uint32_t end; /* last prb of bundle*/
1345 bool_Bool is_orphan; /* true if not complete (i.e., end-start < numBundPrb) */
1346 } bundles[MAX_BFW_BUNDLES512];
1347} ext11_settings_t;
1348
1349
1350/* Work out bundle allocation for ext 11. Take into account ext6/ext21, ext12 or ext13 in this section before ext 11. */
1351/* Won't be called with numBundPrb=0 */
1352static void ext11_work_out_bundles(unsigned startPrbc,
1353 unsigned numPrbc,
1354 unsigned numBundPrb, /* number of PRBs pre (full) bundle */
1355 ext11_settings_t *settings)
1356{
1357 /* Allocation configured by ext 6 */
1358 if (settings->ext6_set) {
1359 unsigned bundles_per_entry = (settings->ext6_rbg_size / numBundPrb);
1360
1361 /* Need to cope with these not dividing exactly, or even having more PRbs in a bundle that
1362 rbg size. i.e. each bundle gets the correct number of PRBs until
1363 all rbg entries are consumed... */
1364
1365 /* TODO: need to check 7.9.4.2. Different cases depending upon value of RAD */
1366
1367 if (bundles_per_entry == 0) {
1368 bundles_per_entry = 1;
1369 }
1370
1371 /* Maybe also be affected by ext 21 */
1372 if (settings->ext21_set) {
1373 /* N.B., have already checked that numPrbc is not 0 */
1374
1375 /* ciPrbGroupSize overrides number of contiguous PRBs in group */
1376 bundles_per_entry = (settings->ext6_rbg_size / settings->ext21_ci_prb_group_size);
1377
1378 /* numPrbc is the number of PRB groups per antenna - handled in call to dissect_bfw_bundle() */
1379 }
1380
1381 unsigned bundles_set = 0;
1382 for (unsigned n=0;
1383 n < (settings->ext6_num_bits_set * settings->ext6_rbg_size) / numBundPrb;
1384 n++) {
1385
1386 /* Watch out for array bound */
1387 if (n >= 28) {
1388 break;
1389 }
1390
1391 /* For each bundle... */
1392
1393 /* TODO: Work out where first PRB is */
1394 /* May not be the start of an rbg block... */
1395 uint32_t prb_start = (settings->ext6_bits_set[n] * settings->ext6_rbg_size);
1396
1397 /* For each bundle within identified rbgSize block */
1398 for (unsigned m=0; m < bundles_per_entry; m++) {
1399 settings->bundles[bundles_set].start = startPrbc+prb_start+(m*numBundPrb);
1400 /* Start already beyond end, so doesn't count. */
1401 if (settings->bundles[bundles_set].start > (startPrbc+numPrbc-1)) {
1402 break;
1403 }
1404 /* Bundle consists of numBundPrb bundles */
1405 /* TODO: may involve PRBs from >1 rbg blocks.. */
1406 settings->bundles[bundles_set].end = startPrbc+prb_start+((m+1)*numBundPrb)-1;
1407 if (settings->bundles[bundles_set].end > (startPrbc+numPrbc-1)) {
1408 /* Extends beyond end, so counts but is an orphan bundle */
1409 settings->bundles[bundles_set].end = numPrbc;
1410 settings->bundles[bundles_set].is_orphan = true1;
1411 }
1412
1413 /* Get out if have reached array bound */
1414 if (++bundles_set == MAX_BFW_BUNDLES512) {
1415 return;
1416 }
1417 }
1418 }
1419 settings->num_bundles = bundles_set;
1420 }
1421
1422 /* Allocation configured by ext 12 */
1423 else if (settings->ext12_set) {
1424 /* First, allocate normally from startPrbc, numPrbc */
1425 settings->num_bundles = (numPrbc+numBundPrb-1) / numBundPrb;
1426
1427 /* Don't overflow settings->bundles[] ! */
1428 settings->num_bundles = MIN(MAX_BFW_BUNDLES, settings->num_bundles)(((512) < (settings->num_bundles)) ? (512) : (settings->
num_bundles))
;
1429
1430 for (uint32_t n=0; n < settings->num_bundles; n++) {
1431 settings->bundles[n].start = startPrbc + n*numBundPrb;
1432 settings->bundles[n].end = settings->bundles[n].start + numBundPrb-1;
1433 /* Does it go beyond the end? */
1434 if (settings->bundles[n].end > startPrbc+numPrbc) {
1435 settings->bundles[n].end = numPrbc+numPrbc;
1436 settings->bundles[n].is_orphan = true1;
1437 }
1438 }
1439 if (settings->num_bundles == MAX_BFW_BUNDLES512) {
1440 return;
1441 }
1442
1443 unsigned prb_offset = startPrbc + numPrbc;
1444
1445 /* Loop over pairs, adding bundles for each */
1446 for (unsigned p=0; p < settings->ext12_num_pairs; p++) {
1447 prb_offset += settings->ext12_pairs[p].off_start_prb;
1448 unsigned pair_bundles = (settings->ext12_pairs[p].num_prb+numBundPrb-1) / numBundPrb;
1449
1450 for (uint32_t n=0; n < pair_bundles; n++) {
1451 unsigned idx = settings->num_bundles;
1452
1453 settings->bundles[idx].start = prb_offset + n*numBundPrb;
1454 settings->bundles[idx].end = settings->bundles[idx].start + numBundPrb-1;
1455 /* Does it go beyond the end? */
1456 if (settings->bundles[idx].end > prb_offset + settings->ext12_pairs[p].num_prb) {
1457 settings->bundles[idx].end = prb_offset + settings->ext12_pairs[p].num_prb;
1458 settings->bundles[idx].is_orphan = true1;
1459 }
1460 /* Range check / return */
1461 settings->num_bundles++;
1462 if (settings->num_bundles == MAX_BFW_BUNDLES512) {
1463 return;
1464 }
1465 }
1466
1467 prb_offset += settings->ext12_pairs[p].num_prb;
1468 }
1469 }
1470
1471 /* Allocation configured by ext 13 */
1472 else if (settings->ext13_set) {
1473 unsigned alloc_size = (numPrbc+numBundPrb-1) / numBundPrb;
1474 settings->num_bundles = alloc_size * settings->ext13_num_start_prbs;
1475
1476 /* Don't overflow settings->bundles[] ! */
1477 settings->num_bundles = MIN(MAX_BFW_BUNDLES, settings->num_bundles)(((512) < (settings->num_bundles)) ? (512) : (settings->
num_bundles))
;
1478
1479 for (unsigned alloc=0; alloc < settings->ext13_num_start_prbs; alloc++) {
1480 unsigned alloc_start = alloc * alloc_size;
1481 for (uint32_t n=0; n < alloc_size; n++) {
1482 if ((alloc_start+n) >= MAX_BFW_BUNDLES512) {
1483 /* ERROR */
1484 return;
1485 }
1486 settings->bundles[alloc_start+n].start = settings->ext13_start_prbs[alloc] + startPrbc + n*numBundPrb;
1487 settings->bundles[alloc_start+n].end = settings->bundles[alloc_start+n].start + numBundPrb-1;
1488 if (settings->bundles[alloc_start+n].end > settings->ext13_start_prbs[alloc] + numPrbc) {
1489 settings->bundles[alloc_start+n].end = settings->ext13_start_prbs[alloc] + numPrbc;
1490 settings->bundles[alloc_start+n].is_orphan = true1;
1491 }
1492 }
1493 }
1494 }
1495
1496 /* Case where bundles are not controlled by other extensions - just divide up range into bundles we have */
1497 else {
1498 settings->num_bundles = (numPrbc+numBundPrb-1) / numBundPrb; /* rounded up */
1499
1500 /* Don't overflow settings->bundles[] */
1501 settings->num_bundles = MIN(MAX_BFW_BUNDLES, settings->num_bundles)(((512) < (settings->num_bundles)) ? (512) : (settings->
num_bundles))
;
1502
1503 /* For each bundle.. */
1504 for (uint32_t n=0; n < settings->num_bundles; n++) {
1505 /* Allocate start and end */
1506 settings->bundles[n].start = startPrbc + n*numBundPrb;
1507 settings->bundles[n].end = settings->bundles[n].start + numBundPrb - 1;
1508 /* If would go beyond end of PRBs, limit and identify as orphan */
1509 if (settings->bundles[n].end > startPrbc+numPrbc) {
1510 settings->bundles[n].end = startPrbc+numPrbc;
1511 settings->bundles[n].is_orphan = true1;
1512 }
1513 }
1514 }
1515}
1516
1517
1518/*******************************************************/
1519/* Overall state of a flow (eAxC/plane) */
1520typedef struct {
1521 /* State for sequence analysis [each direction] */
1522 bool_Bool last_frame_seen[2];
1523 uint32_t last_frame[2];
1524 uint8_t next_expected_sequence_number[2];
1525
1526 /* Table recording ackNack requests (ackNackId -> ack_nack_request_t*)
1527 Note that this assumes that the same ackNackId will not be reused within a state,
1528 which may well not be valid */
1529 wmem_tree_t *ack_nack_requests;
1530
1531 /* Store udCompHdr seen in C-Plane for UL - can be looked up and used by U-PLane.
1532 Note that this appears in the common section header parts of ST1, ST3, ST5,
1533 so can still be over-written per sectionId in the U-Plane */
1534 unsigned ul_ud_comp_hdr_frame;
1535 bool_Bool ul_ud_comp_hdr_set;
1536 unsigned ul_ud_comp_hdr_bit_width;
1537 int ul_ud_comp_hdr_compression;
1538
1539 bool_Bool udcomphdrDownlink_heuristic_result_set;
1540 bool_Bool udcomphdrDownlink_heuristic_result;
1541 bool_Bool udcomphdrUplink_heuristic_result_set;
1542 bool_Bool udcomphdrUplink_heuristic_result;
1543
1544 /* Modulation compression params */
1545 /* TODO: incomplete (see SE4, SE5, SE23), and needs to be per section! */
1546 //uint16_t mod_comp_re_mask;
1547 //bool mod_compr_csf;
1548 //double mod_compr_mod_comp_scaler;
1549} flow_state_t;
1550
1551typedef struct {
1552 uint32_t request_frame_number;
1553 nstime_t request_frame_time;
1554 enum {
1555 SE22,
1556 ST4Cmd1,
1557 ST4Cmd2,
1558 ST4Cmd3,
1559 ST4Cmd4
1560 } requestType;
1561
1562 uint32_t response_frame_number;
1563 nstime_t response_frame_time;
1564} ack_nack_request_t;
1565
1566static const value_string acknack_type_vals[] = {
1567 { SE22, "SE 22" },
1568 { ST4Cmd1, "ST4 (TIME_DOMAIN_BEAM_CONFIG)" },
1569 { ST4Cmd2, "ST4 (TDD_CONFIG_PATTERN)" },
1570 { ST4Cmd3, "ST4 (TRX_CONTROL)" },
1571 { ST4Cmd4, "ST4 (ASM)" },
1572 { 0, NULL((void*)0)}
1573};
1574
1575#define ORAN_C_PLANE0 0
1576#define ORAN_U_PLANE1 1
1577
1578/* Using parts of src/dst MAC address, so don't confuse UL messages with DL messages configuring UL.. */
1579static uint32_t make_flow_key(packet_info *pinfo, uint16_t eaxc_id, uint8_t plane, bool_Bool opposite_dir)
1580{
1581 uint16_t eth_bits = 0;
1582 if (pinfo->dl_src.len == 6 && pinfo->dl_dst.len == 6) {
1583 /* Only using (most of) 2 bytes from addresses for now, but reluctant to make key longer.. */
1584 uint8_t *src_eth = (uint8_t*)pinfo->dl_src.data;
1585 uint8_t *dst_eth = (uint8_t*)pinfo->dl_dst.data;
1586 if (!opposite_dir) {
1587 eth_bits = (src_eth[0]<<8) | dst_eth[5];
1588 }
1589 else {
1590 eth_bits = (dst_eth[0]<<8) | src_eth[5];
1591 }
1592 }
1593 return eaxc_id | (plane << 16) | (eth_bits << 17);
1594}
1595
1596
1597/* Table maintained on first pass from flow_key(uint32_t) -> flow_state_t* */
1598static wmem_tree_t *flow_states_table;
1599
1600/* Table consulted on subsequent passes: frame_num -> flow_result_t* */
1601static wmem_tree_t *flow_results_table;
1602
1603typedef struct {
1604 /* Sequence analysis */
1605 bool_Bool unexpected_seq_number;
1606 uint8_t expected_sequence_number;
1607 uint32_t previous_frame;
1608} flow_result_t;
1609
1610
1611/* Uplink timing */
1612/* For a given symbol, track first to last UL frame to find out first-last time */
1613/* frameId (8) + subframeId (4) + slotId (6) + symbolId (6) = 24 bits */
1614/* N.B. if a capture lasts > 2.5s, may see same timing come around again... */
1615static uint32_t get_timing_key(uint8_t frameId, uint8_t subframeId, uint8_t slotId, uint8_t symbolId)
1616{
1617 return symbolId + (slotId<<8) + (subframeId<<14) + (frameId<<18);
1618}
1619
1620typedef struct {
1621 uint32_t first_frame;
1622 nstime_t first_frame_time;
1623 uint32_t frames_seen_in_symbol;
1624 uint32_t last_frame_in_symbol;
1625} ul_timing_for_slot;
1626
1627/* Set during first pass. timing_key -> ul_timing_for_slot* */
1628static wmem_tree_t *ul_symbol_timing;
1629
1630
1631static void show_link_to_acknack_response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
1632 ack_nack_request_t *response);
1633
1634
1635
1636
1637static void write_pdu_label_and_info(proto_item *ti1, proto_item *ti2,
1638 packet_info *pinfo, const char *format, ...) G_GNUC_PRINTF(4, 5)__attribute__((__format__ (__printf__, 4, 5)));
1639
1640 /* Write the given formatted text to:
1641 - the info column (if pinfo != NULL)
1642 - 1 or 2 other labels (optional)
1643 */
1644static void write_pdu_label_and_info(proto_item *ti1, proto_item *ti2,
1645 packet_info *pinfo, const char *format, ...)
1646{
1647#define MAX_INFO_BUFFER256 256
1648 char info_buffer[MAX_INFO_BUFFER256];
1649 va_list ap;
1650
1651 if ((ti1 == NULL((void*)0)) && (ti2 == NULL((void*)0)) && (pinfo == NULL((void*)0))) {
1652 return;
1653 }
1654
1655 va_start(ap, format)__builtin_va_start(ap, format);
1656 vsnprintf(info_buffer, MAX_INFO_BUFFER256, format, ap);
1657 va_end(ap)__builtin_va_end(ap);
1658
1659 /* Add to indicated places */
1660 if (pinfo != NULL((void*)0)) {
1661 col_append_str(pinfo->cinfo, COL_INFO, info_buffer);
1662 }
1663 if (ti1 != NULL((void*)0)) {
1664 proto_item_append_text(ti1, "%s", info_buffer);
1665 }
1666 if (ti2 != NULL((void*)0)) {
1667 proto_item_append_text(ti2, "%s", info_buffer);
1668 }
1669}
1670
1671/* Add section labels (type + PRB range) for C-Plane, U-Plane */
1672static void
1673write_section_info(proto_item *section_heading, packet_info *pinfo, proto_item *protocol_item,
1674 uint32_t section_id, uint32_t start_prbx, uint32_t num_prbx, uint32_t rb)
1675{
1676 switch (num_prbx) {
1677 case 0:
1678 /* None -> all */
1679 write_pdu_label_and_info(section_heading, protocol_item, pinfo, ", Id: %4d (all PRBs)", section_id);
1680 break;
1681 case 1:
1682 /* Single PRB */
1683 write_pdu_label_and_info(section_heading, protocol_item, pinfo, ", Id: %4d (PRB: %7u)", section_id, start_prbx);
1684 break;
1685 default:
1686 /* Range */
1687 write_pdu_label_and_info(section_heading, protocol_item, pinfo, ", Id: %4d (PRB: %3u-%3u%s)", section_id, start_prbx,
1688 start_prbx + (num_prbx-1)*(1+rb), rb ? " (every-other)" : "");
1689 }
1690}
1691
1692static void
1693write_channel_section_info(proto_item *section_heading, packet_info *pinfo,
1694 uint32_t section_id, uint32_t ueId, uint32_t start_prbx, uint32_t num_prbx,
1695 uint32_t num_trx)
1696{
1697 switch (num_prbx) {
1698 case 0:
1699 /* TODO: ?? */
1700 break;
1701 case 1:
1702 /* Single PRB */
1703 write_pdu_label_and_info(section_heading, NULL((void*)0), pinfo,
1704 ", Id: %4d (UEId=%5u PRB %7u, %2u antennas)",
1705 section_id, ueId, start_prbx, num_trx);
1706 break;
1707 default:
1708 /* Range */
1709 write_pdu_label_and_info(section_heading, NULL((void*)0), pinfo,
1710 ", Id: %4d (UEId=%5u PRBs %3u-%3u, %2u antennas)",
1711 section_id, ueId, start_prbx, start_prbx+num_prbx-1, num_trx);
1712 }
1713}
1714
1715
1716/* 5.1.3.2.7 (real time control data / IQ data transfer message series identifier) */
1717static void
1718addPcOrRtcid(tvbuff_t *tvb, proto_tree *tree, int *offset, int hf, uint16_t *eAxC)
1719{
1720 /* Subtree */
1721 proto_item *oran_pcid_ti = proto_tree_add_item(tree, hf,
1722 tvb, *offset, 2, ENC_NA0x00000000);
1723 proto_tree *oran_pcid_tree = proto_item_add_subtree(oran_pcid_ti, ett_oran_ecpri_pcid);
1724
1725 uint64_t duPortId, bandSectorId, ccId, ruPortId = 0;
1726 int id_offset = *offset;
1727
1728 /* All parts of eAxC should be above 0, and should total 16 bits (breakdown controlled by preferences) */
1729 if (!((pref_du_port_id_bits > 0) && (pref_bandsector_id_bits > 0) && (pref_cc_id_bits > 0) && (pref_ru_port_id_bits > 0) &&
1730 ((pref_du_port_id_bits + pref_bandsector_id_bits + pref_cc_id_bits + pref_ru_port_id_bits) == 16))) {
1731 expert_add_info(NULL((void*)0), tree, &ei_oran_invalid_eaxc_bit_width);
1732 *eAxC = 0;
1733 *offset += 2;
1734 return;
1735 }
1736
1737 unsigned bit_offset = *offset * 8;
1738
1739 /* N.B. For sequence analysis / tapping, just interpret these 2 bytes as eAxC ID... */
1740 *eAxC = tvb_get_uint16(tvb, *offset, ENC_BIG_ENDIAN0x00000000);
1741
1742 /* DU Port ID */
1743 proto_tree_add_bits_ret_val(oran_pcid_tree, hf_oran_du_port_id, tvb, bit_offset, pref_du_port_id_bits, &duPortId, ENC_BIG_ENDIAN0x00000000);
1744 bit_offset += pref_du_port_id_bits;
1745 /* BandSector ID */
1746 proto_tree_add_bits_ret_val(oran_pcid_tree, hf_oran_bandsector_id, tvb, bit_offset, pref_bandsector_id_bits, &bandSectorId, ENC_BIG_ENDIAN0x00000000);
1747 bit_offset += pref_bandsector_id_bits;
1748 /* CC ID */
1749 proto_tree_add_bits_ret_val(oran_pcid_tree, hf_oran_cc_id, tvb, bit_offset, pref_cc_id_bits, &ccId, ENC_BIG_ENDIAN0x00000000);
1750 bit_offset += pref_cc_id_bits;
1751 /* RU Port ID */
1752 proto_tree_add_bits_ret_val(oran_pcid_tree, hf_oran_ru_port_id, tvb, bit_offset, pref_ru_port_id_bits, &ruPortId, ENC_BIG_ENDIAN0x00000000);
1753 *offset += 2;
1754
1755 proto_item_append_text(oran_pcid_ti, " (DU_Port_ID: %d, BandSector_ID: %d, CC_ID: %d, RU_Port_ID: %d)",
1756 (int)duPortId, (int)bandSectorId, (int)ccId, (int)ruPortId);
1757 char id[16];
1758 snprintf(id, 16, "%x:%x:%x:%x", (int)duPortId, (int)bandSectorId, (int)ccId, (int)ruPortId);
1759 proto_item *pi = proto_tree_add_string(oran_pcid_tree, hf_oran_c_eAxC_ID, tvb, id_offset, 2, id);
1760 proto_item_set_generated(pi);
1761}
1762
1763/* 5.1.3.2.8 ecpriSeqid (message identifier) */
1764static int
1765addSeqid(tvbuff_t *tvb, proto_tree *oran_tree, int offset, int plane, uint8_t *seq_id, proto_item **seq_id_ti, packet_info *pinfo)
1766{
1767 /* Subtree */
1768 proto_item *seqIdItem = proto_tree_add_item(oran_tree, hf_oran_ecpri_seqid, tvb, offset, 2, ENC_NA0x00000000);
1769 proto_tree *oran_seqid_tree = proto_item_add_subtree(seqIdItem, ett_oran_ecpri_seqid);
1770 uint32_t seqId, subSeqId, e = 0;
1771
1772 /* Sequence ID (8 bits) */
1773 *seq_id_ti = proto_tree_add_item_ret_uint(oran_seqid_tree, hf_oran_sequence_id, tvb, offset, 1, ENC_NA0x00000000, &seqId);
1774 *seq_id = seqId;
1775 offset += 1;
1776
1777 /* Show link back to previous sequence ID, if set */
1778 flow_result_t *result = wmem_tree_lookup32(flow_results_table, pinfo->num);
1779 if (result) {
1780 proto_item *prev_ti = proto_tree_add_uint(oran_seqid_tree, hf_oran_previous_frame, tvb, 0, 0, result->previous_frame);
1781 proto_item_set_generated(prev_ti);
1782 }
1783
1784 /* E bit */
1785 proto_tree_add_item_ret_uint(oran_seqid_tree, hf_oran_e_bit, tvb, offset, 1, ENC_NA0x00000000, &e);
1786 /* Subsequence ID (7 bits) */
1787 proto_tree_add_item_ret_uint(oran_seqid_tree, hf_oran_subsequence_id, tvb, offset, 1, ENC_NA0x00000000, &subSeqId);
1788 offset += 1;
1789
1790 /* radio-transport fragmentation not allowed for C-Plane messages */
1791 if (plane == ORAN_C_PLANE0) {
1792 if (e !=1 || subSeqId != 0) {
1793 expert_add_info(NULL((void*)0), seqIdItem, &ei_oran_radio_fragmentation_c_plane);
1794 }
1795 }
1796 else {
1797 if (e !=1 || subSeqId != 0) {
1798 /* TODO: Re-assembly of any radio-fragmentation on U-Plane */
1799 expert_add_info(NULL((void*)0), seqIdItem, &ei_oran_radio_fragmentation_u_plane);
1800 }
1801 }
1802
1803 /* Summary */
1804 proto_item_append_text(seqIdItem, " (SeqId: %3d, E: %d, SubSeqId: %d)", seqId, e, subSeqId);
1805 return offset;
1806}
1807
1808static int dissect_symbolmask(tvbuff_t *tvb, proto_tree *tree, int offset, uint32_t *symbol_mask, proto_item **ti)
1809{
1810 uint64_t temp_val;
1811
1812 static int * const symbol_mask_flags[] = {
1813 &hf_oran_symbol_mask_s13,
1814 &hf_oran_symbol_mask_s12,
1815 &hf_oran_symbol_mask_s11,
1816 &hf_oran_symbol_mask_s10,
1817 &hf_oran_symbol_mask_s9,
1818 &hf_oran_symbol_mask_s8,
1819 &hf_oran_symbol_mask_s7,
1820 &hf_oran_symbol_mask_s6,
1821 &hf_oran_symbol_mask_s5,
1822 &hf_oran_symbol_mask_s4,
1823 &hf_oran_symbol_mask_s3,
1824 &hf_oran_symbol_mask_s2,
1825 &hf_oran_symbol_mask_s1,
1826 &hf_oran_symbol_mask_s0,
1827 NULL((void*)0)
1828 };
1829
1830 proto_item *temp_ti = proto_tree_add_bitmask_ret_uint64(tree, tvb, offset,
1831 hf_oran_symbol_mask,
1832 ett_oran_symbol_mask, symbol_mask_flags,
1833 ENC_BIG_ENDIAN0x00000000, &temp_val);
1834 /* Set out parameters */
1835 if (symbol_mask) {
1836 *symbol_mask = (uint32_t)temp_val;
1837 }
1838 if (ti) {
1839 *ti = temp_ti;
1840 }
1841 return offset+2;
1842}
1843
1844/* 7.7.1.2 bfwCompHdr (beamforming weight compression header) */
1845static int dissect_bfwCompHdr(tvbuff_t *tvb, proto_tree *tree, int offset,
1846 uint32_t *iq_width, uint32_t *comp_meth, proto_item **comp_meth_ti)
1847{
1848 /* Subtree */
1849 proto_item *bfwcomphdr_ti = proto_tree_add_string_format(tree, hf_oran_bfwCompHdr,
1850 tvb, offset, 1, "",
1851 "bfwCompHdr");
1852 proto_tree *bfwcomphdr_tree = proto_item_add_subtree(bfwcomphdr_ti, ett_oran_bfwcomphdr);
1853
1854 /* Width and method */
1855 proto_tree_add_item_ret_uint(bfwcomphdr_tree, hf_oran_bfwCompHdr_iqWidth,
1856 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, iq_width);
1857 /* Special case: 0 -> 16 */
1858 *iq_width = (*iq_width==0) ? 16 : *iq_width;
1859 *comp_meth_ti = proto_tree_add_item_ret_uint(bfwcomphdr_tree, hf_oran_bfwCompHdr_compMeth,
1860 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, comp_meth);
1861 offset++;
1862
1863 /* Summary */
1864 proto_item_append_text(bfwcomphdr_ti, " (IqWidth=%u, compMeth=%s)",
1865 *iq_width,
1866 val_to_str_const(*comp_meth, bfw_comp_headers_comp_meth, "reserved"));
1867
1868 return offset;
1869}
1870
1871/* Return offset */
1872/* Returning number of entries set - would be good to also return an array of set TRX# so could show which array element
1873 each BFW is actually for.. */
1874static int dissect_active_beamspace_coefficient_mask(tvbuff_t *tvb, proto_tree *tree, int offset, unsigned *num_trx_entries, uint16_t **trx_entries)
1875{
1876 /* activeBeamspaceCoefficientMask - ceil(K/8) octets */
1877 /* K is the number of elements in uncompressed beamforming weight vector.
1878 * Calculated from parameters describing tx-array or tx-array */
1879 unsigned k_octets = (k_antenna_ports + 7) / 8;
1880
1881 static uint16_t trx_enabled[1024];
1882
1883 /* TODO: could use a bigger bitmask array, but for now just uses this bytes-worth for each byte */
1884 static int * const mask_bits[] = {
1885 &hf_oran_active_beamspace_coefficient_n1,
1886 &hf_oran_active_beamspace_coefficient_n2,
1887 &hf_oran_active_beamspace_coefficient_n3,
1888 &hf_oran_active_beamspace_coefficient_n4,
1889 &hf_oran_active_beamspace_coefficient_n5,
1890 &hf_oran_active_beamspace_coefficient_n6,
1891 &hf_oran_active_beamspace_coefficient_n7,
1892 &hf_oran_active_beamspace_coefficient_n8,
1893 NULL((void*)0)
1894 };
1895
1896 *num_trx_entries = 0;
1897 guint64 val;
1898 for (unsigned n=0; n < k_octets; n++) {
1899 proto_tree_add_bitmask_ret_uint64(tree, tvb, offset,
1900 hf_oran_activeBeamspaceCoefficientMask,
1901 ett_active_beamspace_coefficient_mask, mask_bits,
1902 ENC_BIG_ENDIAN0x00000000, &val);
1903 offset++;
1904 /* Add up the set bits for this byte (but be careful not to count beyond last real K bit..) */
1905 for (unsigned b=0; b < 8; b++) {
1906 if ((1 << b) & (unsigned)val) {
1907 if (((n*8)+b) < k_antenna_ports) {
1908 if (*num_trx_entries < 1024-1) { /* Don't write beyond array (which should be plenty big) */
1909 trx_enabled[(*num_trx_entries)++] = (n*8) + b + 1;
1910 }
1911 }
1912 }
1913 }
1914 }
1915 /* Set pointer to static array */
1916 *trx_entries = trx_enabled;
1917
1918 /* Show how many bits set */
1919 proto_item *ti = proto_tree_add_uint(tree, hf_oran_activeBeamspaceCoefficientMask_bits_set, tvb,
1920 offset-k_octets, k_octets, *num_trx_entries);
1921 proto_item_set_generated(ti);
1922
1923 return offset;
1924}
1925
1926/* 7.7.1.3 bfwCompParam (beamforming weight compression parameter).
1927 * Depends upon passed-in bfwCompMeth (field may be empty) */
1928static int dissect_bfwCompParam(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset,
1929 proto_item *meth_ti, uint32_t *bfw_comp_method,
1930 uint32_t *exponent, bool_Bool *supported, unsigned *num_trx_entries, uint16_t **trx_entries)
1931{
1932 if (bfw_comp_method
26.1
'bfw_comp_method' is not equal to COMP_NONE
== COMP_NONE0) {
27
Taking false branch
1933 /* Absent! */
1934 *supported = true1;
1935 return offset;
1936 }
1937
1938 /* Subtree */
1939 proto_item *bfwcompparam_ti = proto_tree_add_string_format(tree, hf_oran_bfwCompParam,
1940 tvb, offset, 1, "",
1941 "bfwCompParam");
1942 proto_tree *bfwcompparam_tree = proto_item_add_subtree(bfwcompparam_ti, ett_oran_bfwcompparam);
1943
1944 proto_item_append_text(bfwcompparam_ti,
1945 " (meth=%s)", val_to_str_const(*bfw_comp_method, bfw_comp_headers_comp_meth, "reserved"));
1946
1947 *num_trx_entries = 0;
1948 *supported = false0;
1949 switch (*bfw_comp_method) {
28
Control jumps to 'case 1:' at line 1950
1950 case COMP_BLOCK_FP1: /* block floating point */
1951 /* 4 reserved bits + exponent */
1952 proto_tree_add_item_ret_uint(bfwcompparam_tree, hf_oran_exponent,
1953 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, exponent);
1954 proto_item_append_text(bfwcompparam_ti, " exponent=%u", *exponent);
1955 *supported = true1;
29
The value 1 is assigned to 'compression_method_supported', which participates in a condition later
1956 offset++;
1957 break;
30
Execution continues on line 1995
1958 case COMP_BLOCK_SCALE2: /* block scaling */
1959 /* Separate into integer and fractional bits? */
1960 proto_tree_add_item(bfwcompparam_tree, hf_oran_blockScaler,
1961 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1962 offset++;
1963 break;
1964 case COMP_U_LAW3: /* u-law */
1965 /* compBitWidth, compShift */
1966 proto_tree_add_item(bfwcompparam_tree, hf_oran_compBitWidth,
1967 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1968 proto_tree_add_item(bfwcompparam_tree, hf_oran_compShift,
1969 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1970 offset++;
1971 break;
1972 case 4: /* beamspace I (BLOCK SCALING) */
1973 /* activeBeamspaceCoefficientMask */
1974 offset = dissect_active_beamspace_coefficient_mask(tvb, bfwcompparam_tree, offset, num_trx_entries, trx_entries);
1975 *bfw_comp_method = COMP_BLOCK_SCALE2;
1976 *supported = false0; /* TODO: true once BLOCK SCALE is supported */
1977 break;
1978 case 5: /* beamspace II (BLOCK FLOATING POINT) */
1979 /* activeBeamspaceCoefficientMask */
1980 offset = dissect_active_beamspace_coefficient_mask(tvb, bfwcompparam_tree, offset, num_trx_entries, trx_entries);
1981 /* reserved (4 bits) + exponent (4 bits) */
1982 proto_tree_add_item(bfwcompparam_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_NA0x00000000);
1983 proto_tree_add_item_ret_uint(bfwcompparam_tree, hf_oran_exponent, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, exponent);
1984 offset += 1;
1985 *bfw_comp_method = COMP_BLOCK_FP1;
1986 *supported = true1;
1987 break;
1988
1989 default:
1990 /* Not handled */
1991 break;
1992 }
1993
1994 /* Can't go on if compression scheme not supported */
1995 if (!(*supported) && meth_ti) {
1996 expert_add_info_format(pinfo, meth_ti, &ei_oran_unsupported_bfw_compression_method,
1997 "BFW Compression method %u (%s) not decompressed by dissector",
1998 *bfw_comp_method,
1999 val_to_str_const(*bfw_comp_method, bfw_comp_headers_comp_meth, "reserved"));
2000 }
2001 return offset;
31
Returning without writing to '*trx_entries'
2002}
2003
2004
2005/* Special case for uncompressed/16-bit value */
2006static float uncompressed_to_float(uint32_t h)
2007{
2008 int16_t i16 = h & 0x0000ffff;
2009 if (show_unscaled_values) {
2010 return (float)i16;
2011 }
2012 return ((float)i16) / 0x7fff;
2013}
2014
2015/* Decompress I/Q value, taking into account method, width, exponent, other input-specific methods */
2016/* TODO: pass in info needed for Modulation methods (reMask, csf, mcScaler values) gleaned from SE 4,5,23 */
2017static float decompress_value(uint32_t bits, uint32_t comp_method, uint8_t iq_width, uint32_t exponent)
2018{
2019 switch (comp_method) {
2020 case COMP_NONE0: /* no compression */
2021 return uncompressed_to_float(bits);
2022
2023 case COMP_BLOCK_FP1: /* block floating point */
2024 case BFP_AND_SELECTIVE_RE5:
2025 {
2026 /* A.1.3 Block Floating Point Decompression Algorithm */
2027 int32_t cPRB = bits;
2028 uint32_t scaler = 1 << exponent; /* i.e. 2^exponent */
2029
2030 /* Check last bit, in case we need to flip to -ve */
2031 if (cPRB >= (1<<(iq_width-1))) {
2032 cPRB -= (1<<iq_width);
2033 }
2034
2035 /* Unscale (8.1.3.1) */
2036 cPRB *= scaler;
2037 if (show_unscaled_values) {
2038 return (float)cPRB;
2039 }
2040
2041 uint32_t mantissa_scale_factor = 1 << (iq_width-1); /* 2^(mantissabits-1) */
2042 uint32_t exp_scale_factor = 1 << 15; /* 2^(2^exponentbits - 1 ) The exponent bit width is fixed to 4, so the maximum exponent is 15 */
2043
2044 float ret = cPRB / ((float)(mantissa_scale_factor*exp_scale_factor));
2045 return ret;
2046 }
2047
2048 case COMP_BLOCK_SCALE2:
2049 case COMP_U_LAW3:
2050 /* Not supported! But will be reported as expert info outside of this function! */
2051 return 0.0;
2052
2053 case COMP_MODULATION4:
2054 case MOD_COMPR_AND_SELECTIVE_RE6:
2055 /* TODO: ! */
2056 return 0.0;
2057
2058
2059 default:
2060 /* Not supported! But will be reported as expert info outside of this function! */
2061 return 0.0;
2062 }
2063}
2064
2065/* Out-of-range value used for special case */
2066#define ORPHAN_BUNDLE_NUMBER999 999
2067
2068/* Bundle of PRBs/TRX I/Q samples (ext 11) */
2069static uint32_t dissect_bfw_bundle(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, unsigned offset,
2070 proto_item *comp_meth_ti, uint32_t bfwcomphdr_comp_meth,
2071 uint32_t num_weights_per_bundle,
2072 uint8_t iq_width,
2073 unsigned bundle_number,
2074 unsigned first_prb, unsigned last_prb, bool_Bool is_orphan)
2075{
2076 /* Set bundle name */
2077 char bundle_name[32];
2078 if (!is_orphan) {
2079 snprintf(bundle_name, 32, "Bundle %3u", bundle_number);
2080 }
2081 else {
2082 g_strlcpy(bundle_name, "Orphaned ", 32);
2083 }
2084
2085 /* Create Bundle root */
2086 proto_item *bundle_ti;
2087 if (first_prb != last_prb) {
2088 bundle_ti = proto_tree_add_string_format(tree, hf_oran_bfw_bundle,
2089 tvb, offset, 0, "",
2090 "%s: (PRBs %3u-%3u)",
2091 bundle_name,
2092 first_prb, last_prb);
2093 }
2094 else {
2095 bundle_ti = proto_tree_add_string_format(tree, hf_oran_bfw_bundle,
2096 tvb, offset, 0, "",
2097 "%s: (PRB %3u)",
2098 bundle_name,
2099 first_prb);
2100 }
2101 proto_tree *bundle_tree = proto_item_add_subtree(bundle_ti, ett_oran_bfw_bundle);
2102
2103 /* Generated bundle id */
2104 proto_item *bundleid_ti = proto_tree_add_uint(bundle_tree, hf_oran_bfw_bundle_id, tvb, 0, 0,
2105 bundle_number);
2106 proto_item_set_generated(bundleid_ti);
2107 proto_item_set_hidden(bundleid_ti);
2108
2109 /* bfwCompParam */
2110 bool_Bool compression_method_supported = false0;
2111 unsigned exponent = 0;
2112 unsigned num_trx_entries = 0;
2113 uint16_t *trx_entries;
2114 offset = dissect_bfwCompParam(tvb, bundle_tree, pinfo, offset, comp_meth_ti,
2115 &bfwcomphdr_comp_meth, &exponent, &compression_method_supported,
2116 &num_trx_entries, &trx_entries);
2117
2118 /* Can't show details of unsupported compression method */
2119 if (!compression_method_supported) {
2120 /* Don't know how to show, so give up */
2121 return offset;
2122 }
2123
2124 /* Create Bundle subtree */
2125 int bit_offset = offset*8;
2126 int bfw_offset;
2127 int prb_offset = offset;
2128
2129 /* contInd */
2130 proto_tree_add_item(bundle_tree, hf_oran_cont_ind,
2131 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2132 /* beamId */
2133 uint32_t beam_id;
2134 proto_tree_add_item_ret_uint(bundle_tree, hf_oran_beam_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &beam_id);
2135 proto_item_append_text(bundle_ti, " (beamId:%u) ", beam_id);
2136 bit_offset += 16;
2137
2138 /* Number of weights per bundle (from preference) */
2139 proto_item *wpb_ti = proto_tree_add_uint(bundle_tree, hf_oran_num_weights_per_bundle, tvb, 0, 0,
2140 num_weights_per_bundle);
2141 proto_item_set_generated(wpb_ti);
2142
2143 /* Add the weights for this bundle. Overwrite with what was seen in bfwCompParam if beamspace */
2144 if (num_trx_entries != 0) {
2145 num_weights_per_bundle = num_trx_entries;
2146 }
2147 for (unsigned w=0; w < num_weights_per_bundle; w++) {
2148
2149 uint16_t trx_index = (num_trx_entries) ? trx_entries[w] : w+1;
2150
2151 /* Create subtree */
2152 bfw_offset = bit_offset / 8;
2153 uint8_t bfw_extent = ((bit_offset + (iq_width*2)) / 8) - bfw_offset;
2154 proto_item *bfw_ti = proto_tree_add_string_format(bundle_tree, hf_oran_bfw,
2155 tvb, bfw_offset, bfw_extent,
2156 "", "TRX %3u: (", trx_index);
2157 proto_tree *bfw_tree = proto_item_add_subtree(bfw_ti, ett_oran_bfw);
2158
2159 /* I */
2160 /* Get bits, and convert to float. */
2161 uint32_t bits = tvb_get_bits32(tvb, bit_offset, iq_width, ENC_BIG_ENDIAN0x00000000);
2162 float value = decompress_value(bits, bfwcomphdr_comp_meth, iq_width, exponent);
2163 /* Add to tree. */
2164 proto_tree_add_float_format_value(bfw_tree, hf_oran_bfw_i, tvb, bit_offset/8, (iq_width+7)/8, value, "#%u=%f", w, value);
2165 bit_offset += iq_width;
2166 proto_item_append_text(bfw_ti, "I%u=%f ", w, value);
2167
2168 /* Q */
2169 /* Get bits, and convert to float. */
2170 bits = tvb_get_bits32(tvb, bit_offset, iq_width, ENC_BIG_ENDIAN0x00000000);
2171 value = decompress_value(bits, bfwcomphdr_comp_meth, iq_width, exponent);
2172 /* Add to tree. */
2173 proto_tree_add_float_format_value(bfw_tree, hf_oran_bfw_q, tvb, bit_offset/8, (iq_width+7)/8, value, "#%u=%f", w, value);
2174 bit_offset += iq_width;
2175 proto_item_append_text(bfw_ti, "Q%u=%f)", w, value);
2176 }
2177
2178 /* Set extent of bundle */
2179 proto_item_set_len(bundle_ti, (bit_offset+7)/8 - prb_offset);
2180
2181 return (bit_offset+7)/8;
2182}
2183
2184/* Return new bit offset. in/out will always be byte-aligned.. */
2185static int dissect_ciCompParam(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U___attribute__((unused)), unsigned bit_offset,
2186 unsigned comp_meth, uint8_t *exponent)
2187{
2188 if (comp_meth == COMP_NONE0) {
2189 /* Nothing in frame so don't even create subtree */
2190 return bit_offset;
2191 }
2192
2193 /* Subtree */
2194 proto_item *cicompparam_ti = proto_tree_add_string_format(tree, hf_oran_ciCompParam,
2195 tvb, bit_offset/8, 1, "",
2196 "ciCompParam");
2197 proto_tree *cicompparam_tree = proto_item_add_subtree(cicompparam_ti, ett_oran_cicompparam);
2198 uint32_t ci_exponent;
2199
2200 /* Contents differ by compression method */
2201 switch (comp_meth) {
2202 case COMP_BLOCK_FP1:
2203 proto_tree_add_item(cicompparam_tree, hf_oran_reserved_4bits, tvb, bit_offset/8, 1, ENC_NA0x00000000);
2204 proto_tree_add_item_ret_uint(cicompparam_tree, hf_oran_exponent,
2205 tvb, bit_offset/8, 1, ENC_BIG_ENDIAN0x00000000, &ci_exponent);
2206 *exponent = ci_exponent;
2207 proto_item_append_text(cicompparam_ti, " (Exponent=%u)", ci_exponent);
2208 bit_offset += 8; /* one byte */
2209 break;
2210 case COMP_BLOCK_SCALE2:
2211 /* Separate into integer (1) and fractional (7) bits? */
2212 proto_tree_add_item(cicompparam_tree, hf_oran_blockScaler,
2213 tvb, bit_offset/8, 1, ENC_BIG_ENDIAN0x00000000);
2214 bit_offset += 8;
2215 break;
2216 case COMP_U_LAW3:
2217 /* compBitWidth, compShift (4 bits each) */
2218 proto_tree_add_item(cicompparam_tree, hf_oran_compBitWidth,
2219 tvb, bit_offset/8, 1, ENC_BIG_ENDIAN0x00000000);
2220 proto_tree_add_item(cicompparam_tree, hf_oran_compShift,
2221 tvb, bit_offset/8, 1, ENC_BIG_ENDIAN0x00000000);
2222 bit_offset += 8;
2223 break;
2224
2225 default:
2226 /* reserved, ? bytes of zeros.. */
2227 break;
2228 }
2229
2230 return bit_offset;
2231}
2232
2233/* frameStructure (7.5.2.13) */
2234static unsigned dissect_frame_structure(proto_item *tree, tvbuff_t *tvb, unsigned offset,
2235 uint32_t subframeId, uint32_t slotId)
2236{
2237 uint32_t scs;
2238 /* FFT Size (4 bits) */
2239 proto_tree_add_item(tree, hf_oran_frameStructure_fft, tvb, offset, 1, ENC_NA0x00000000);
2240 /* Subcarrier spacing (SCS) */
2241 proto_tree_add_item_ret_uint(tree, hf_oran_frameStructure_subcarrier_spacing, tvb, offset, 1, ENC_NA0x00000000, &scs);
2242
2243 /* Show slot within frame as a generated field. See table 7.5.13-3 */
2244 uint32_t slots_per_subframe = 1;
2245 if (scs <= 4) {
2246 slots_per_subframe = 1 << scs;
2247 }
2248 if (scs <= 4 || scs >= 12) {
2249 proto_item *ti = proto_tree_add_uint(tree, hf_oran_slot_within_frame, tvb, 0, 0,
2250 (slots_per_subframe*subframeId) + slotId);
2251 proto_item_set_generated(ti);
2252 }
2253 return offset + 1;
2254}
2255
2256static unsigned dissect_csf(proto_item *tree, tvbuff_t *tvb, unsigned bit_offset,
2257 unsigned iq_width, bool_Bool *p_csf)
2258{
2259 proto_item *csf_ti;
2260 uint64_t csf;
2261 csf_ti = proto_tree_add_bits_ret_val(tree, hf_oran_csf, tvb, bit_offset, 1, &csf, ENC_BIG_ENDIAN0x00000000);
2262 if (csf) {
2263 /* Table 7.7.4.2-1 Constellation shift definition (index is udIqWidth) */
2264 const char* shift_value[] = { "n/a", "1/2", "1/4", "1/8", "1/16", "1/32" };
2265 if (iq_width >=1 && iq_width <= 5) {
2266 proto_item_append_text(csf_ti, " (Shift Value is %s)", shift_value[iq_width]);
2267 }
2268 }
2269
2270 /* Set out parameter */
2271 if (p_csf != NULL((void*)0)) {
2272 *p_csf = (csf!=0);
2273 }
2274 return bit_offset+1;
2275}
2276
2277
2278/* Section 7.
2279 * N.B. these are the green parts of the tables showing Section Types, differing by section Type */
2280static int dissect_oran_c_section(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
2281 flow_state_t* state,
2282 uint32_t sectionType, oran_tap_info *tap_info, proto_item *protocol_item,
2283 uint32_t subframeId, uint32_t slotId,
2284 uint8_t ci_iq_width, uint8_t ci_comp_meth, unsigned ci_comp_opt,
2285 unsigned num_sinr_per_prb)
2286{
2287 unsigned offset = 0;
2288 proto_tree *c_section_tree = NULL((void*)0);
2289 proto_item *sectionHeading = NULL((void*)0);
2290
2291 /* Section subtree */
2292 sectionHeading = proto_tree_add_string_format(tree, hf_oran_c_section,
2293 tvb, offset, 0, "", "Section");
2294 c_section_tree = proto_item_add_subtree(sectionHeading, ett_oran_c_section);
2295
2296 uint32_t sectionId = 0;
2297
2298 uint32_t startPrbc=0, startPrbu=0;
2299 uint32_t numPrbc=0, numPrbu=0;
2300 uint32_t ueId = 0;
2301 proto_item *ueId_ti = NULL((void*)0);
2302 uint32_t beamId = 0;
2303 proto_item *beamId_ti = NULL((void*)0);
2304 bool_Bool beamId_ignored = false0;
2305
2306 proto_item *numsymbol_ti = NULL((void*)0);
2307 bool_Bool numsymbol_ignored = false0;
2308
2309 proto_item *numprbc_ti = NULL((void*)0);
2310
2311 /* Config affecting ext11 bundles (initially unset) */
2312 ext11_settings_t ext11_settings;
2313 memset(&ext11_settings, 0, sizeof(ext11_settings));
2314
2315 /* Section Type 10 needs to keep track of PRB range that should be reported
2316 for msgTypeId=5 (Interference plus Noise for unallocated PRBs) */
2317 /* All PRBs start as false */
2318#define MAX_PRBS273 273
2319 bool_Bool prbs_for_st10_type5[MAX_PRBS273];
2320 memset(&prbs_for_st10_type5, 0, sizeof(prbs_for_st10_type5));
2321
2322
2323#define MAX_UEIDS16 16
2324 uint32_t ueids[MAX_UEIDS16];
2325 uint32_t number_of_ueids = 0;
2326
2327 bool_Bool extension_flag = false0;
2328
2329 /* These sections (ST0, ST1, ST2, ST3, ST5, ST9, ST10, ST11) are similar, so handle as common with per-type differences */
2330 if (((sectionType <= SEC_C_UE_SCHED) || (sectionType >= SEC_C_SINR_REPORTING)) &&
1
Assuming 'sectionType' is > SEC_C_UE_SCHED
2
Assuming 'sectionType' is < SEC_C_SINR_REPORTING
2331 (sectionType != SEC_C_SLOT_CONTROL)) {
2332
2333 /* sectionID */
2334 proto_item *ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_section_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &sectionId);
2335 if (sectionId == 4095) {
2336 proto_item_append_text(ti, " (not default coupling C/U planes using sectionId)");
2337 }
2338 offset++;
2339
2340 if (tap_info->num_section_ids < MAX_SECTION_IDs32) {
2341 tap_info->section_ids[tap_info->num_section_ids++] = sectionId;
2342 }
2343
2344 /* rb */
2345 uint32_t rb;
2346 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_rb, tvb, offset, 1, ENC_NA0x00000000, &rb);
2347 /* symInc (1 bit) */
2348 if (sectionType != SEC_C_RRM_MEAS_REPORTS && /* Section Type 10 */
2349 sectionType != SEC_C_REQUEST_RRM_MEAS) { /* Section Type 11 */
2350 unsigned int sym_inc;
2351 proto_item *sym_inc_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_symInc, tvb, offset, 1, ENC_NA0x00000000, &sym_inc);
2352 if (sym_inc !=0 && (sectionType == SEC_C_SINR_REPORTING)) { /* Section Type 9 */
2353 /* "0 shall be used" */
2354 proto_item_append_text(sym_inc_ti, " (should be 0)");
2355 }
2356 }
2357 else {
2358 /* reserved (1 bit) */
2359 proto_tree_add_item(c_section_tree, hf_oran_reserved_bit5, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2360 }
2361
2362 /* startPrbx and numPrbx */
2363 if (sectionType == SEC_C_SINR_REPORTING) {
2364 /* startPrbu (10 bits) */
2365 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_startPrbu, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPrbu);
2366 offset += 2;
2367 /* numPrbu */
2368 numprbc_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numPrbu, tvb, offset, 1, ENC_NA0x00000000, &numPrbu);
2369 if (numPrbu == 0) {
2370 proto_item_append_text(numprbc_ti, " (all PRBs - configured as %u)", pref_data_plane_section_total_rbs);
2371 numPrbu = pref_data_plane_section_total_rbs;
2372 }
2373 offset += 1;
2374 }
2375 else {
2376 /* startPrbc (10 bits) */
2377 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_startPrbc, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPrbc);
2378 offset += 2;
2379 /* numPrbc */
2380 numprbc_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numPrbc, tvb, offset, 1, ENC_NA0x00000000, &numPrbc);
2381 if (numPrbc == 0) {
2382 proto_item_append_text(numprbc_ti, " (all PRBs - configured as %u)", pref_data_plane_section_total_rbs);
2383 /* TODO: should probably set to pref_data_plane_section_total_rbs, and define MAX_PRBS to > 273 ? */
2384 numPrbc = MAX_PRBS273;
2385 }
2386 offset += 1;
2387 }
2388
2389 /* Start with range from section. May get changed by SE6, SE12, SE20 */
2390 for (unsigned n=startPrbc; n < startPrbc+numPrbc; n++) {
2391 if (n < MAX_PRBS273) {
2392 prbs_for_st10_type5[n] = true1;
2393 }
2394 }
2395
2396 if (sectionType != SEC_C_SINR_REPORTING) { /* Section Type 9 */
2397 static int * const remask_flags[] = {
2398 &hf_oran_reMask_re1,
2399 &hf_oran_reMask_re2,
2400 &hf_oran_reMask_re3,
2401 &hf_oran_reMask_re4,
2402 &hf_oran_reMask_re5,
2403 &hf_oran_reMask_re6,
2404 &hf_oran_reMask_re7,
2405 &hf_oran_reMask_re8,
2406 &hf_oran_reMask_re9,
2407 &hf_oran_reMask_re10,
2408 &hf_oran_reMask_re11,
2409 &hf_oran_reMask_re12,
2410 NULL((void*)0)
2411 };
2412
2413 /* reMask */
2414 uint64_t remask;
2415 proto_tree_add_bitmask_ret_uint64(c_section_tree, tvb, offset,
2416 hf_oran_reMask, ett_oran_remask, remask_flags, ENC_BIG_ENDIAN0x00000000, &remask);
2417 offset++;
2418 /* numSymbol */
2419 /* TODO: should warn if startSymbol + numSymbol would be > 14? */
2420 uint32_t numSymbol;
2421 numsymbol_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numSymbol, tvb, offset, 1, ENC_NA0x00000000, &numSymbol);
2422 if ((sectionType == SEC_C_RRM_MEAS_REPORTS) && (numSymbol != 14)) { /* Section type 10 */
2423 proto_item_append_text(numsymbol_ti, " (for ST10, should be 14!)");
2424 expert_add_info_format(pinfo, numsymbol_ti, &ei_oran_st10_numsymbol_not_14,
2425 "numSymbol should be 14 for ST10 - found %u", numSymbol);
2426 }
2427 offset++;
2428
2429 /* [ef] (extension flag) */
2430 switch (sectionType) {
2431 case SEC_C_UNUSED_RB: /* Section Type 0 */
2432 case SEC_C_NORMAL: /* Section Type 1 */
2433 case SEC_C_PRACH: /* Section Type 3 */
2434 case SEC_C_UE_SCHED: /* Section Type 5 */
2435 case SEC_C_RRM_MEAS_REPORTS: /* Section Type 10 */
2436 case SEC_C_REQUEST_RRM_MEAS: /* Section Type 11 */
2437 proto_tree_add_item_ret_boolean(c_section_tree, hf_oran_ef, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &extension_flag);
2438 break;
2439 default:
2440 /* Other section types don't support extensions */
2441 break;
2442 }
2443
2444 write_section_info(sectionHeading, pinfo, protocol_item, sectionId, startPrbc, numPrbc, rb);
2445 proto_item_append_text(sectionHeading, ", Symbols: %2u", numSymbol);
2446
2447 if (numPrbc == 0) {
2448 /* Special case for all PRBs */
2449 numPrbc = pref_data_plane_section_total_rbs;
2450 startPrbc = 0; /* may already be 0... */
2451 }
2452 }
2453 else {
2454 /* Section Type 9 */
2455 write_section_info(sectionHeading, pinfo, protocol_item, sectionId, startPrbu, numPrbu, rb);
2456 proto_item_append_text(sectionHeading, ", numSinrPerPrb: %2u", num_sinr_per_prb);
2457 }
2458
2459 /* Section type specific fields (after 'numSymbol') */
2460 switch (sectionType) {
2461 case SEC_C_UNUSED_RB: /* Section Type 0 - Table 7.4.2-1 */
2462 /* reserved (15 bits) */
2463 proto_tree_add_item(c_section_tree, hf_oran_reserved_15bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2464 offset += 2;
2465 break;
2466
2467 case SEC_C_NORMAL: /* Section Type 1 - Table 7.4.3-1 */
2468 /* beamId */
2469 beamId_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &beamId);
2470 offset += 2;
2471
2472 proto_item_append_text(sectionHeading, ", BeamId: %d", beamId);
2473 break;
2474
2475 case SEC_C_PRACH: /* Section Type 3 - Table 7.4.5-1 */
2476 {
2477 /* beamId */
2478 beamId_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &beamId);
2479 offset += 2;
2480
2481 /* freqOffset */
2482 int32_t freqOffset; /* Yes, this is signed, so the implicit cast is intentional. */
2483 proto_item *freq_offset_item = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_freqOffset, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000, &freqOffset);
2484 freqOffset |= 0xff000000; /* Must sign-extend */
2485 proto_item_set_text(freq_offset_item, "Frequency offset: %d \u0394f", freqOffset);
2486 offset += 3;
2487
2488 /* reserved */
2489 proto_tree_add_item(c_section_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_NA0x00000000);
2490 offset += 1;
2491
2492 proto_item_append_text(sectionHeading, ", BeamId: %d, FreqOffset: %d \u0394f", beamId, freqOffset);
2493 break;
2494 }
2495
2496 case SEC_C_UE_SCHED: /* Section Type 5 - Table 7.4.7-1 */
2497 case SEC_C_RRM_MEAS_REPORTS: /* Section Type 10 - Table 7.4.12-1 */
2498 /* ueId */
2499 ueId_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_ueId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ueId);
2500 offset += 2;
2501 if (ueId == 0x7fff) {
2502 proto_item_append_text(ueId_ti, " (PRBs not scheduled for eAxC ID in transport header)");
2503 }
2504 else {
2505 ueids[number_of_ueids++] = ueId;
2506 }
2507
2508 proto_item_append_text(sectionHeading, ", UEId: %d", ueId);
2509 break;
2510
2511 case SEC_C_SINR_REPORTING: /* Section Type 9 - SINR Reporting */
2512 {
2513 /* Hidden filter for bf (DMFS-BF) */
2514 proto_item *bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
2515 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
2516
2517 unsigned bit_offset = offset*8;
2518
2519 /* sinr iqWidth */
2520 proto_item *iq_width_item = proto_tree_add_uint(c_section_tree, hf_oran_sinrCompHdrIqWidth_pref, tvb, 0, 0, pref_sample_bit_width_sinr);
2521 proto_item_append_text(iq_width_item, " (from preferences)");
2522 proto_item_set_generated(iq_width_item);
2523
2524 /* sinr compMethod */
2525 proto_item *sinr_comp_meth_item = proto_tree_add_uint(c_section_tree, hf_oran_sinrCompHdrMeth_pref, tvb, 0, 0, pref_iqCompressionSINR);
2526 proto_item_append_text(sinr_comp_meth_item, " (from preferences)");
2527 proto_item_set_generated(sinr_comp_meth_item);
2528
2529 /* Add SINR entries for each PRB */
2530 for (unsigned prb=0; prb < numPrbu; prb++) {
2531 /* TODO: create a subtree for each PRB entry with good summary? */
2532
2533 /* Each prb starts byte-aligned */
2534 bit_offset = ((bit_offset+7)/8) * 8;
2535
2536 /* N.B., using width/method from UL U-plane preferences, not certain that this is correct.. */
2537
2538 /* sinrCompParam (udCompParam format, may be empty) */
2539 uint32_t exponent = 0; /* N.B. init to silence warnings, but will always be set if read in COMP_BLOCK_FP case */
2540 uint16_t sReSMask;
2541 bit_offset = dissect_udcompparam(tvb, pinfo, c_section_tree, bit_offset/8,
2542 pref_iqCompressionSINR, &exponent, &sReSMask,
2543 true1) * 8; /* last param is for_sinr */
2544
2545 /* sinrValues for this PRB. */
2546 /* TODO: not sure how numSinrPerPrb interacts with rb==1... */
2547 for (unsigned n=0; n < num_sinr_per_prb; n++) {
2548 unsigned sinr_bits = tvb_get_bits32(tvb, bit_offset, pref_sample_bit_width_sinr, ENC_BIG_ENDIAN0x00000000);
2549
2550 /* Using SINR compression settings from preferences */
2551 float value = decompress_value(sinr_bits,
2552 pref_iqCompressionSINR, pref_sample_bit_width_sinr,
2553 exponent);
2554 unsigned sample_len_in_bytes = ((bit_offset%8)+pref_sample_bit_width_sinr+7)/8;
2555 proto_item *val_ti = proto_tree_add_float(c_section_tree, hf_oran_sinr_value, tvb,
2556 bit_offset/8, sample_len_in_bytes, value);
2557
2558 /* Show here which subcarriers share which values (they all divide 12..) */
2559 if (num_sinr_per_prb == 12) {
2560 proto_item_append_text(val_ti, " (PRB=%u, subcarrier %u)",
2561 startPrbu+(prb*(rb+1)),
2562 n*(12/num_sinr_per_prb));
2563 }
2564 else {
2565 proto_item_append_text(val_ti, " (PRB=%u, subcarriers %u-%u)",
2566 startPrbu+(prb*(rb+1)),
2567 n*(12/num_sinr_per_prb), (n+1)*(12/num_sinr_per_prb)-1);
2568 }
2569 bit_offset += pref_sample_bit_width_sinr;
2570 }
2571
2572 /* 1-byte alignment per PRB (7.2.11) */
2573 offset = (bit_offset+7)/8;
2574 bit_offset = offset*8;
2575 }
2576 break;
2577 }
2578 case SEC_C_REQUEST_RRM_MEAS: /* Section Type 11 - Request RRM Measurements */
2579 /* Reserved (15 bits) */
2580 proto_tree_add_item(c_section_tree, hf_oran_reserved_15bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2581 offset += 2;
2582 break;
2583
2584 default:
2585 break;
2586 }
2587 }
2588 else if (sectionType == SEC_C_CH_INFO) { /* Section Type 6 */
3
Assuming 'sectionType' is equal to SEC_C_CH_INFO
4
Taking true branch
2589 /* ef */
2590 proto_tree_add_item_ret_boolean(c_section_tree, hf_oran_ef, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &extension_flag);
2591 /* ueId */
2592 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_ueId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ueId);
2593 offset += 2;
2594 /* regularizationFactor */
2595 proto_tree_add_item(c_section_tree, hf_oran_regularizationFactor, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2596 offset += 2;
2597 /* reserved (4 bits) */
2598 proto_tree_add_item(c_section_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_NA0x00000000);
2599 /* rb ("Value=0 shall be set") */
2600 uint32_t rb;
2601 proto_item *rb_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_rb, tvb, offset, 1, ENC_NA0x00000000, &rb);
2602 if (rb != 0) {
5
Assuming 'rb' is equal to 0
6
Taking false branch
2603 proto_item_append_text(rb_ti, " (should be set to 0)");
2604 expert_add_info(pinfo, rb_ti, &ei_oran_st6_rb_shall_be_0);
2605 }
2606 /* symInc */
2607 proto_tree_add_item(c_section_tree, hf_oran_symInc, tvb, offset, 1, ENC_NA0x00000000);
2608 /* startPrbc */
2609 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_startPrbc, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPrbc);
2610 offset += 2;
2611 /* numPrbc */
2612 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numPrbc, tvb, offset, 1, ENC_NA0x00000000, &numPrbc);
2613 offset += 1;
2614
2615 /* Hidden filter for bf */
2616 proto_item *bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
2617 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
2618
2619 /* ciIsample,ciQsample pairs */
2620 unsigned m;
2621 unsigned prb;
2622 uint32_t bit_offset = offset*8;
2623
2624 /* Antenna count from preference */
2625 unsigned num_trx = pref_num_bf_antennas;
2626
2627 write_channel_section_info(sectionHeading, pinfo,
2628 sectionId, ueId, startPrbc, numPrbc, num_trx);
2629
2630 bool_Bool first_prb = true1;
2631 uint8_t exponent = 0;
2632 for (prb=startPrbc; prb < startPrbc+numPrbc; prb++) {
7
Assuming the condition is false
8
Loop condition is false. Execution continues on line 2683
2633
2634 /* PRB subtree */
2635 unsigned prb_start_offset = bit_offset;
2636 proto_item *prb_ti = proto_tree_add_string_format(c_section_tree, hf_oran_samples_prb,
2637 tvb, bit_offset/8, 0,
2638 "", "PRB=%u", prb);
2639 proto_tree *prb_tree = proto_item_add_subtree(prb_ti, ett_oran_prb_cisamples);
2640
2641 /* There may be a ciCompParam here.. */
2642 if (first_prb || ci_comp_opt==1) {
2643 bit_offset = dissect_ciCompParam(tvb, prb_tree, pinfo, bit_offset, ci_comp_meth, &exponent);
2644 }
2645 first_prb = false0;
2646
2647 /* Antennas */
2648 for (m=0; m < num_trx; m++) {
2649
2650 unsigned sample_offset = bit_offset / 8;
2651 uint8_t sample_extent = ((bit_offset + (ci_iq_width*2)) / 8) - sample_offset;
2652
2653 /* Create subtree for antenna */
2654 proto_item *sample_ti = proto_tree_add_string_format(prb_tree, hf_oran_ciSample,
2655 tvb, sample_offset, sample_extent,
2656 "", "TRX=%2u: ", m);
2657 proto_tree *sample_tree = proto_item_add_subtree(sample_ti, ett_oran_cisample);
2658
2659 /* I */
2660 /* Get bits, and convert to float. */
2661 uint32_t bits = tvb_get_bits32(tvb, bit_offset, ci_iq_width, ENC_BIG_ENDIAN0x00000000);
2662 float value = decompress_value(bits, ci_comp_meth, ci_iq_width, exponent);
2663
2664 /* Add to tree. */
2665 proto_tree_add_float_format_value(sample_tree, hf_oran_ciIsample, tvb, bit_offset/8, (ci_iq_width+7)/8, value, "#%u=%f", m, value);
2666 bit_offset += ci_iq_width;
2667 proto_item_append_text(sample_ti, "I%u=%f ", m, value);
2668
2669 /* Q */
2670 /* Get bits, and convert to float. */
2671 bits = tvb_get_bits32(tvb, bit_offset, ci_iq_width, ENC_BIG_ENDIAN0x00000000);
2672 value = decompress_value(bits, ci_comp_meth, ci_iq_width, exponent);
2673
2674 /* Add to tree. */
2675 proto_tree_add_float_format_value(sample_tree, hf_oran_ciQsample, tvb, bit_offset/8, (ci_iq_width+7)/8, value, "#%u=%f", m, value);
2676 bit_offset += ci_iq_width;
2677 proto_item_append_text(sample_ti, "Q%u=%f ", m, value);
2678 }
2679 proto_item_set_len(prb_ti, (bit_offset-prb_start_offset+7)/8);
2680 }
2681
2682 /* Pad out by 1 or 4 bytes, according to preference */
2683 if (!st6_4byte_alignment) {
9
Assuming 'st6_4byte_alignment' is true
10
Taking false branch
2684 offset = (bit_offset + 7) / 8;
2685 }
2686 else {
2687 int mode = bit_offset % 32;
2688 if (mode
10.1
'mode' is not equal to 0
!= 0) {
11
Taking true branch
2689 offset = (bit_offset + (32-mode))/8;
2690 }
2691 else {
2692 offset = bit_offset/8;
2693 }
2694 }
2695 proto_item_set_end(c_section_tree, tvb, offset);
2696 }
2697
2698 bool_Bool seen_se10 = false0;
2699 uint32_t numPortc = 0;
2700 proto_item *bf_ti = NULL((void*)0);
2701
2702 /* Section extension commands */
2703 while (extension_flag) {
12
Loop condition is true. Entering loop body
2704 int extension_start_offset = offset;
2705
2706 /* Prefetch extType so can use specific extension type ett */
2707 uint32_t exttype = tvb_get_uint8(tvb, offset) & 0x7f;
2708 uint32_t exttype_ett_index = exttype;
2709 if (exttype == 0 || exttype > HIGHEST_EXTTYPE28) {
13
Assuming 'exttype' is not equal to 0
14
Assuming 'exttype' is <= HIGHEST_EXTTYPE
15
Taking false branch
2710 /* Just use first one if out of range */
2711 exttype_ett_index = 1;
2712 }
2713
2714 /* Create subtree for each extension (with summary) */
2715 proto_item *extension_ti = proto_tree_add_string_format(c_section_tree, hf_oran_extension,
2716 tvb, offset, 0, "", "Extension");
2717 proto_tree *extension_tree = proto_item_add_subtree(extension_ti, ett_oran_c_section_extension[exttype_ett_index-1]);
2718
2719 /* ef (i.e. another extension after this one?) */
2720 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_ef, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &extension_flag);
2721
2722 /* extType */
2723 proto_item *exttype_ti;
2724 exttype_ti = proto_tree_add_item(extension_tree, hf_oran_exttype, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2725 offset++;
2726 proto_item_append_text(sectionHeading, " (ext-%u)", exttype);
2727
2728 proto_item_append_text(extension_ti, " (ext-%u: %s)", exttype, val_to_str_const(exttype, exttype_vals, "Reserved"));
2729
2730 /* Don't tap if out of range. */
2731 if (exttype
15.1
'exttype' is > 0
> 0 && exttype
15.2
'exttype' is <= HIGHEST_EXTTYPE
<= HIGHEST_EXTTYPE28) {
16
Taking true branch
2732 tap_info->extensions[exttype] = true1;
2733 }
2734
2735 /* Is this SE allowed for this section type? */
2736 if (!se_allowed_in_st(exttype, sectionType)) {
17
Assuming the condition is false
2737 expert_add_info_format(pinfo, extension_tree, &ei_oran_se_on_unsupported_st,
2738 "SE %u (%s) should not appear in ST %u (%s)!",
2739 exttype, val_to_str_const(exttype, exttype_vals, "Reserved"),
2740 sectionType, rval_to_str_const(sectionType, section_types, "Unknown"));
2741 }
2742
2743
2744 /* extLen (number of 32-bit words) */
2745 uint32_t extlen_len = ((exttype==11)||(exttype==19)||(exttype==20)) ? 2 : 1; /* Extensions 11/19/20 are special */
18
Assuming 'exttype' is not equal to 11
19
Assuming 'exttype' is not equal to 19
20
Assuming 'exttype' is not equal to 20
21
'?' condition is false
2746 uint32_t extlen;
2747 proto_item *extlen_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_extlen, tvb,
2748 offset, extlen_len, ENC_BIG_ENDIAN0x00000000, &extlen);
2749 proto_item_append_text(extlen_ti, " (%u bytes)", extlen*4);
2750 offset += extlen_len;
2751 if (extlen == 0) {
22
Assuming 'extlen' is not equal to 0
23
Taking false branch
2752 expert_add_info_format(pinfo, extlen_ti, &ei_oran_extlen_zero,
2753 "extlen value of 0 is reserved");
2754 /* Break out to avoid infinitely looping! */
2755 break;
2756 }
2757
2758 bool_Bool ext_unhandled = false0;
2759
2760 switch (exttype) {
24
Control jumps to 'case 1:' at line 2762
2761
2762 case 1: /* SE 1: Beamforming Weights */
2763 {
2764 uint32_t bfwcomphdr_iq_width, bfwcomphdr_comp_meth;
2765 proto_item *comp_meth_ti = NULL((void*)0);
2766
2767 /* Hidden filter for bf */
2768 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
2769 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
2770
2771 /* bfwCompHdr (2 subheaders - bfwIqWidth and bfwCompMeth)*/
2772 offset = dissect_bfwCompHdr(tvb, extension_tree, offset,
2773 &bfwcomphdr_iq_width, &bfwcomphdr_comp_meth, &comp_meth_ti);
2774
2775 /* bfwCompParam */
2776 uint32_t exponent = 0;
2777 bool_Bool compression_method_supported = false0;
2778 unsigned num_trx = 0;
2779 uint16_t *trx;
25
'trx' declared without an initial value
2780 offset = dissect_bfwCompParam(tvb, extension_tree, pinfo, offset, comp_meth_ti,
26
Calling 'dissect_bfwCompParam'
32
Returning from 'dissect_bfwCompParam'
2781 &bfwcomphdr_comp_meth, &exponent, &compression_method_supported,
2782 &num_trx, &trx);
2783
2784 /* Can't show details of unsupported compression method */
2785 if (!compression_method_supported
32.1
'compression_method_supported' is true
) {
33
Taking false branch
2786 break;
2787 }
2788
2789 /* We know:
2790 - iq_width (above)
2791 - numBfWeights (taken from preference)
2792 - remaining bytes in extension
2793 We can therefore derive TRX (number of antennas).
2794 */
2795
2796 /* I & Q samples
2797 May know how many entries from activeBeamspaceCoefficientMask. */
2798 if (num_trx
33.1
'num_trx' is equal to 0
== 0) {
34
Taking true branch
2799 /* Don't know how many there will be, so just fill available bytes... */
2800 unsigned weights_bytes = (extlen*4)-3;
2801 unsigned num_weights_pairs = (weights_bytes*8) / (bfwcomphdr_iq_width*2);
2802 num_trx = num_weights_pairs;
2803 }
2804 int bit_offset = offset*8;
2805
2806 for (unsigned n=0; n < num_trx; n++) {
35
Assuming 'n' is < 'num_trx'
36
Loop condition is true. Entering loop body
2807 /* Create antenna subtree */
2808 int bfw_offset = bit_offset / 8;
2809
2810 uint16_t trx_index = (num_trx
36.1
'num_trx' is not equal to 0
) ? trx[n] : n+1;
37
'?' condition is true
38
Array access (from variable 'trx') results in an undefined pointer dereference
2811
2812 proto_item *bfw_ti = proto_tree_add_string_format(extension_tree, hf_oran_bfw,
2813 tvb, bfw_offset, 0, "", "TRX %3u: (", trx_index);
2814 proto_tree *bfw_tree = proto_item_add_subtree(bfw_ti, ett_oran_bfw);
2815
2816 /* I value */
2817 /* Get bits, and convert to float. */
2818 uint32_t bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
2819 float value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent);
2820 /* Add to tree. */
2821 proto_tree_add_float_format_value(bfw_tree, hf_oran_bfw_i, tvb, bit_offset/8,
2822 (bfwcomphdr_iq_width+7)/8, value, "%f", value);
2823 bit_offset += bfwcomphdr_iq_width;
2824 proto_item_append_text(bfw_ti, "I=%f ", value);
2825
2826 /* Leave a gap between I and Q values */
2827 proto_item_append_text(bfw_ti, " ");
2828
2829 /* Q value */
2830 /* Get bits, and convert to float. */
2831 bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
2832 value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent);
2833 /* Add to tree. */
2834 proto_tree_add_float_format_value(bfw_tree, hf_oran_bfw_q, tvb, bit_offset/8,
2835 (bfwcomphdr_iq_width+7)/8, value, "%f", value);
2836 bit_offset += bfwcomphdr_iq_width;
2837 proto_item_append_text(bfw_ti, "Q=%f", value);
2838
2839 proto_item_append_text(bfw_ti, ")");
2840 proto_item_set_len(bfw_ti, (bit_offset+7)/8 - bfw_offset);
2841 }
2842 /* Need to round to next byte */
2843 offset = (bit_offset+7)/8;
2844
2845 break;
2846 }
2847
2848 case 2: /* SE 2: Beamforming attributes */
2849 {
2850 /* Hidden filter for bf */
2851 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
2852 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
2853
2854 /* bfaCompHdr (get widths of fields to follow) */
2855 uint32_t bfAzPtWidth, bfZePtWidth, bfAz3ddWidth, bfZe3ddWidth;
2856 /* subtree */
2857 proto_item *bfa_ti = proto_tree_add_string_format(extension_tree, hf_oran_bfaCompHdr,
2858 tvb, offset, 2, "", "bfaCompHdr");
2859 proto_tree *bfa_tree = proto_item_add_subtree(bfa_ti, ett_oran_bfacomphdr);
2860
2861 /* reserved (2 bits) */
2862 proto_tree_add_item(bfa_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2863 /* bfAzPtWidth (3 bits) */
2864 proto_tree_add_item_ret_uint(bfa_tree, hf_oran_bfAzPtWidth, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &bfAzPtWidth);
2865 /* bfZePtWidth (3 bits) */
2866 proto_tree_add_item_ret_uint(bfa_tree, hf_oran_bfZePtWidth, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &bfZePtWidth);
2867 offset += 1;
2868
2869 /* reserved (2 bits) */
2870 proto_tree_add_item(bfa_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2871 /* bfAz3ddWidth (3 bits) */
2872 proto_tree_add_item_ret_uint(bfa_tree, hf_oran_bfAz3ddWidth, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &bfAz3ddWidth);
2873 /* bfZe3ddWidth (3 bits) */
2874 proto_tree_add_item_ret_uint(bfa_tree, hf_oran_bfZe3ddWidth, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &bfZe3ddWidth);
2875 offset += 1;
2876
2877 unsigned bit_offset = offset*8;
2878
2879 /* bfAzPt */
2880 if (bfAzPtWidth > 0) {
2881 proto_tree_add_bits_item(extension_tree, hf_oran_bfAzPt, tvb, bit_offset, bfAzPtWidth+1, ENC_BIG_ENDIAN0x00000000);
2882 bit_offset += (bfAzPtWidth+1);
2883 }
2884 /* bfZePt */
2885 if (bfZePtWidth > 0) {
2886 proto_tree_add_bits_item(extension_tree, hf_oran_bfZePt, tvb, bit_offset, bfZePtWidth+1, ENC_BIG_ENDIAN0x00000000);
2887 bit_offset += (bfZePtWidth+1);
2888 }
2889 /* bfAz3dd */
2890 if (bfAz3ddWidth > 0) {
2891 proto_tree_add_bits_item(extension_tree, hf_oran_bfAz3dd, tvb, bit_offset, bfAz3ddWidth+1, ENC_BIG_ENDIAN0x00000000);
2892 bit_offset += (bfAz3ddWidth+1);
2893 }
2894 /* bfZe3dd */
2895 if (bfZe3ddWidth > 0) {
2896 proto_tree_add_bits_item(extension_tree, hf_oran_bfZe3dd, tvb, bit_offset, bfZe3ddWidth+1, ENC_BIG_ENDIAN0x00000000);
2897 bit_offset += (bfZe3ddWidth+1);
2898 }
2899
2900 /* Pad to next byte (unless last 2 fields already fit in this one) */
2901 if ((bit_offset % 8) > 2) {
2902 offset = (bit_offset+7) / 8;
2903 }
2904 else {
2905 offset = bit_offset / 8;
2906 }
2907
2908 /* bfAzSl (3 bits) */
2909 proto_tree_add_item(extension_tree, hf_oran_bfAzSl, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2910 /* bfZeSl (3 bits) */
2911 proto_tree_add_item(extension_tree, hf_oran_bfZeSl, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2912 offset += 1;
2913 break;
2914 }
2915
2916 case 3: /* SE 3: DL precoding parameters */
2917 {
2918 /* codebookindex (8 bits) */
2919 /* "This parameter is not used and shall be set to zero." */
2920 proto_tree_add_item(extension_tree, hf_oran_codebook_index, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2921 offset += 1;
2922 /* layerid */
2923 uint32_t layerid;
2924 proto_tree_add_item_ret_uint(extension_tree, hf_oran_layerid, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &layerid);
2925 /* numLayers */
2926 proto_tree_add_item(extension_tree, hf_oran_numlayers, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2927 offset += 1;
2928
2929 /* Stop here for non-first data layer */
2930 if (layerid != 0 && layerid != 0xf) {
2931 break;
2932 }
2933
2934 /* First data layer case */
2935 /* txScheme */
2936 proto_tree_add_item(extension_tree, hf_oran_txscheme, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2937 /* crsReMask */
2938 proto_tree_add_item(extension_tree, hf_oran_crs_remask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2939 offset += 2;
2940
2941 /* crsShift (1 bit) */
2942 proto_tree_add_item(extension_tree, hf_oran_crs_shift, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2943 /* reserved (3 bits) */
2944 proto_tree_add_item(extension_tree, hf_oran_reserved_bits123, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2945 /* crsSymNum (4 bits) */
2946 proto_tree_add_item(extension_tree, hf_oran_crs_symnum, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2947 offset += 1;
2948 /* reserved */
2949 proto_tree_add_item(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2950 offset += 1;
2951
2952 /* reserved (1 bit) */
2953 proto_tree_add_item(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2954 /* beamIdAP1 (15 bits) */
2955 proto_tree_add_item(extension_tree, hf_oran_beamid_ap1, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2956 offset += 2;
2957 /* reserved (1 bit) */
2958 proto_tree_add_item(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2959 /* beamIdAP2 (15 bits) */
2960 proto_tree_add_item(extension_tree, hf_oran_beamid_ap2, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2961 offset += 2;
2962 /* reserved (1 bit) */
2963 proto_tree_add_item(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2964 /* beamIdAP3 (15 bits) */
2965 proto_tree_add_item(extension_tree, hf_oran_beamid_ap3, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2966 offset += 2;
2967 break;
2968 }
2969
2970 case 4: /* SE 4: Modulation compression params (5.4.7.4) */
2971 {
2972 /* csf */
2973 dissect_csf(extension_tree, tvb, offset*8, ci_iq_width, NULL((void*)0));
2974
2975 /* modCompScaler */
2976 uint32_t modCompScaler;
2977 proto_item *ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_modcompscaler,
2978 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &modCompScaler);
2979 offset += 2;
2980
2981 /* Work out and show floating point value too. exponent and mantissa are both unsigned */
2982 uint16_t exponent = (modCompScaler >> 11) & 0x000f; /* m.s. 4 bits */
2983 uint16_t mantissa = modCompScaler & 0x07ff; /* l.s. 11 bits */
2984 double value = ((double)mantissa/(1<<11)) * (1.0 / (1 << exponent));
2985 proto_item_append_text(ti, " (%f)", value);
2986
2987 /* TODO: need to store these in per-section data in state that gets looked up by U-Plane */
2988 break;
2989 }
2990
2991 case 5: /* SE 5: Modulation Compression Additional Parameters (7.7.5) */
2992 {
2993 /* Applies only to section types 1,3 and 5 */
2994 /* N.B. there may be multiple instances of this SE in the same frame */
2995
2996 /* There may be one or 2 entries, depending upon extlen */
2997 int sets = 1, reserved_bits = 0;
2998 switch (extlen) {
2999 case 2:
3000 sets = 1;
3001 reserved_bits = 20;
3002 break;
3003 case 3:
3004 sets = 2;
3005 reserved_bits = 24;
3006 break;
3007 case 4:
3008 /* sets can be 3 or 4, depending upon whether last 28 bits are 0.. */
3009 if ((tvb_get_ntohl(tvb, offset+10) & 0x0fffffff) == 0) {
3010 sets = 3;
3011 reserved_bits = 28;
3012 }
3013 else {
3014 sets = 4;
3015 reserved_bits = 0;
3016 }
3017 break;
3018
3019 default:
3020 /* Malformed error!!! */
3021 expert_add_info_format(pinfo, extlen_ti, &ei_oran_extlen_wrong,
3022 "For section 5, extlen must be 2, 3 or 4, but %u was dissected",
3023 extlen);
3024 break;
3025 }
3026
3027 unsigned bit_offset = offset*8;
3028
3029 for (int n=0; n < sets; n++) {
3030 /* Subtree for each set */
3031 unsigned set_start_offset = bit_offset/8;
3032 proto_item *set_ti = proto_tree_add_string(extension_tree, hf_oran_modcomp_param_set,
3033 tvb, set_start_offset, 0, "");
3034 proto_tree *set_tree = proto_item_add_subtree(set_ti, ett_oran_modcomp_param_set);
3035
3036 uint64_t mcScaleReMask, mcScaleOffset;
3037 bool_Bool csf;
3038
3039 /* mcScaleReMask (12 bits) */
3040 proto_tree_add_bits_ret_val(set_tree, hf_oran_mc_scale_re_mask, tvb, bit_offset, 12, &mcScaleReMask, ENC_BIG_ENDIAN0x00000000);
3041 bit_offset += 12;
3042 /* csf (1 bit) */
3043 bit_offset = dissect_csf(set_tree, tvb, bit_offset, ci_iq_width, &csf);
3044 /* mcScaleOffset (15 bits) */
3045 proto_item *ti = proto_tree_add_bits_ret_val(set_tree, hf_oran_mc_scale_offset, tvb, bit_offset, 15, &mcScaleOffset, ENC_BIG_ENDIAN0x00000000);
3046 uint16_t exponent = (mcScaleOffset >> 11) & 0x000f; /* m.s. 4 bits */
3047 uint16_t mantissa = mcScaleOffset & 0x07ff; /* l.s. 11 bits */
3048 double mcScaleOffset_value = ((double)mantissa/(1<<11)) * (1.0 / (1 << exponent));
3049 proto_item_append_text(ti, " (%f)", mcScaleOffset_value);
3050 bit_offset += 15;
3051
3052 /* Summary */
3053 proto_item_set_len(set_ti, (bit_offset+7)/8 - set_start_offset);
3054 proto_item_append_text(set_ti, " (mcScaleReMask=0x%03x csf=%5s mcScaleOffset=%f)",
3055 (unsigned)mcScaleReMask, tfs_get_true_false(csf)tfs_get_string(csf, ((void*)0)), mcScaleOffset_value);
3056 }
3057
3058 proto_item_append_text(extension_ti, " (%u sets)", sets);
3059
3060 /* Reserved (variable-length) */
3061 if (reserved_bits) {
3062 proto_tree_add_bits_item(extension_tree, hf_oran_reserved, tvb, bit_offset, reserved_bits, ENC_BIG_ENDIAN0x00000000);
3063 bit_offset += reserved_bits;
3064 }
3065
3066 offset = bit_offset/8;
3067 break;
3068 }
3069
3070 case 6: /* SE 6: Non-contiguous PRB allocation in time and frequency domain */
3071 {
3072 /* numSymbol not used in this case */
3073 if (numsymbol_ti && !numsymbol_ignored) {
3074 proto_item_append_text(numsymbol_ti, " (ignored)");
3075 numsymbol_ignored = true1;
3076 }
3077
3078 /* Will update ext6 recorded info */
3079 ext11_settings.ext6_set = true1;
3080
3081 /* repetition */
3082 proto_tree_add_bits_item(extension_tree, hf_oran_se6_repetition, tvb, offset*8, 1, ENC_BIG_ENDIAN0x00000000);
3083 /* rbgSize (PRBs per bit set in rbgMask) */
3084 uint32_t rbgSize;
3085 proto_item *rbg_size_ti;
3086 rbg_size_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_rbgSize, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rbgSize);
3087 if (rbgSize == 0) {
3088 /* N.B. this is only true if "se6-rb-bit-supported" is set... */
3089 expert_add_info_format(pinfo, rbg_size_ti, &ei_oran_rbg_size_reserved,
3090 "rbgSize value of 0 is reserved");
3091 }
3092 /* rbgMask (28 bits) */
3093 uint32_t rbgMask;
3094 proto_item *rbgmask_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_rbgMask, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000, &rbgMask);
3095 if (rbgSize == 0) {
3096 proto_item_append_text(rbgmask_ti, " (value ignored since rbgSize is 0)");
3097 }
3098
3099 /* TODO: if receiver detects non-zero bits outside the valid range, those shall be ignored. */
3100 offset += 4;
3101 /* priority */
3102 proto_tree_add_item(extension_tree, hf_oran_noncontig_priority, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3103 /* symbolMask */
3104 offset = dissect_symbolmask(tvb, extension_tree, offset, NULL((void*)0), NULL((void*)0));
3105
3106 /* Look up rbg_size enum -> value */
3107 switch (rbgSize) {
3108 case 0:
3109 /* N.B. reserved, but covered above with expert info (would remain 0) */
3110 break;
3111 case 1:
3112 ext11_settings.ext6_rbg_size = 1; break;
3113 case 2:
3114 ext11_settings.ext6_rbg_size = 2; break;
3115 case 3:
3116 ext11_settings.ext6_rbg_size = 3; break;
3117 case 4:
3118 ext11_settings.ext6_rbg_size = 4; break;
3119 case 5:
3120 ext11_settings.ext6_rbg_size = 6; break;
3121 case 6:
3122 ext11_settings.ext6_rbg_size = 8; break;
3123 case 7:
3124 ext11_settings.ext6_rbg_size = 16; break;
3125 /* N.B., encoded in 3 bits, so no other values are possible */
3126 }
3127
3128 /* Set to looked-up value */
3129 rbgSize = ext11_settings.ext6_rbg_size;
3130
3131 uint32_t lastRbgid = 0;
3132 if (rbgSize != 0) {
3133 /* The O-DU shall not use combinations of startPrbc, numPrbc and rbgSize leading to a value of lastRbgid larger than 27 */
3134 /* i.e., leftmost bit used should not need to go off left end of rbgMask! */
3135 lastRbgid = (uint32_t)ceil((numPrbc + (startPrbc % rbgSize)) / (float)rbgSize) - 1;
3136 if (lastRbgid > 27) {
3137 expert_add_info_format(pinfo, rbg_size_ti, &ei_oran_lastRbdid_out_of_range,
3138 "SE6: rbgSize (%u) not compatible with startPrbc(%u) and numPrbc(%u)",
3139 rbgSize, startPrbc, numPrbc);
3140 break;
3141 }
3142 }
3143
3144 /* Record (and count) which bits are set in rbgMask */
3145 bool_Bool first_seen = false0;
3146 unsigned first_seen_pos=0, last_seen_pos=0;
3147 for (unsigned n=0; n < 28 && ext11_settings.ext6_num_bits_set < 28; n++) {
3148 if ((rbgMask >> n) & 0x01) {
3149 ext11_settings.ext6_bits_set[ext11_settings.ext6_num_bits_set++] = n;
3150 if (!first_seen) {
3151 first_seen = true1;
3152 first_seen_pos = n;
3153 }
3154 last_seen_pos = n;
3155 }
3156 }
3157
3158 /* Show how many bits were set in rbgMask */
3159 proto_item_append_text(rbgmask_ti, " (%u bits set)", ext11_settings.ext6_num_bits_set);
3160 /* Also, that is the range of bits */
3161 if (first_seen) {
3162 proto_item_append_text(rbgmask_ti, " (%u bits spread)", last_seen_pos-first_seen_pos+1);
3163 }
3164
3165 /* Complain if last set bit is beyond lastRbgid */
3166 if (first_seen) {
3167 if (last_seen_pos > lastRbgid) {
3168 expert_add_info_format(pinfo, rbgmask_ti, &ei_oran_rbgMask_beyond_last_rbdid,
3169 "SE6: rbgMask (0x%07x) has bit %u set, but lastRbgId is %u",
3170 rbgMask, last_seen_pos, lastRbgid);
3171 }
3172 }
3173
3174 /* Also update prbs_for_st10_type5[] */
3175 if (sectionType == 10 && rbgSize != 0) {
3176 /* Unset all entries */
3177 memset(&prbs_for_st10_type5, 0, sizeof(prbs_for_st10_type5));
3178
3179 /* Work out which PRB first bit corresponds to */
3180 unsigned firstPrbStart = (startPrbc/rbgSize) * rbgSize;
3181
3182 /* Add PRBs corresponding to each bit set */
3183 for (unsigned n=0; n < 28 ; n++) {
3184 if ((rbgMask >> n) & 0x01) {
3185 /* Lazy way to clip any values that lie outside of range for section */
3186 for (unsigned p=0; p < rbgSize; p++) {
3187 unsigned start = firstPrbStart + (n*rbgSize);
3188 if ((start+p < MAX_PRBS273) && (start+p >= startPrbc) && (start+p <= startPrbc+numPrbc-1)) {
3189 prbs_for_st10_type5[start+p] = true1;
3190 }
3191 }
3192 }
3193 }
3194 }
3195
3196 break;
3197 }
3198
3199 case 7: /* SE 7: eAxC mask */
3200 /* Allow ST0 to address multiple eAxC_ID values for transmission blanking */
3201 proto_tree_add_item(extension_tree, hf_oran_eAxC_mask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3202 offset += 2;
3203 break;
3204
3205 case 8: /* SE 8: Regularization factor */
3206 proto_tree_add_item(extension_tree, hf_oran_regularizationFactor, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3207 offset += 2;
3208 break;
3209
3210 case 9: /* SE 9: Dynamic Spectrum Sharing parameters */
3211 proto_tree_add_item(extension_tree, hf_oran_technology, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3212 offset += 1;
3213 proto_tree_add_item(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3214 offset += 1;
3215 break;
3216
3217 case 10: /* SE 10: Group configuration of multiple ports */
3218 {
3219 seen_se10 = true1;
3220
3221 /* beamGroupType */
3222 uint32_t beam_group_type = 0;
3223 proto_item *bgt_ti;
3224 bgt_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_beamGroupType,
3225 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &beam_group_type);
3226 proto_item_append_text(extension_ti, " (%s)", val_to_str_const(beam_group_type, beam_group_type_vals, "Unknown"));
3227
3228 /* numPortc */
3229 proto_tree_add_item_ret_uint(extension_tree, hf_oran_numPortc,
3230 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numPortc);
3231 offset++;
3232
3233 /* Will append all beamId values to extension_ti, regardless of beamGroupType */
3234 unsigned n;
3235
3236 switch (beam_group_type) {
3237 case 0x0: /* common beam */
3238 case 0x1: /* beam matrix indication */
3239 /* Reserved byte */
3240 proto_tree_add_item(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_NA0x00000000);
3241 offset++;
3242
3243 /* Explain how entries are allocated */
3244 if (beam_group_type == 0x0) {
3245 proto_item_append_text(extension_ti, " (all %u ueid/Beam entries are %u)", numPortc, ueId);
3246 }
3247 else {
3248 /* 'numPortc' consecutive BeamIds from section header */
3249 proto_item_append_text(extension_ti, " (ueId/beam entries are %u -> %u)", ueId, ueId+numPortc);
3250 }
3251
3252 if (sectionType == 5) {
3253 /* These types are not allowed */
3254 expert_add_info_format(pinfo, bgt_ti, &ei_oran_se10_not_allowed,
3255 "SE10: beamGroupType %u is not allowed for section type 5", beam_group_type);
3256 }
3257 break;
3258
3259 case 0x2: /* beam vector listing */
3260 {
3261 proto_item_append_text(extension_ti, " [ ");
3262
3263 /* Beam listing vector case */
3264 /* Work out how many port beam entries there is room for */
3265 /* Using numPortC as visible in issue 18116 */
3266 for (n=0; n < numPortc; n++) {
3267 /* 1 reserved bit */
3268 proto_tree_add_item(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3269
3270 /* port beam ID (or UEID) (15 bits) */
3271 uint32_t id;
3272 proto_item *beamid_or_ueid_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_beamId,
3273 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &id);
3274 proto_item_append_text(beamid_or_ueid_ti, " port #%u beam ID (or UEId) %u", n, id);
3275 offset += 2;
3276
3277 if (id != 0x7fff) {
3278 if (number_of_ueids < MAX_UEIDS16) {
3279 ueids[number_of_ueids++] = id;
3280 }
3281 }
3282
3283 proto_item_append_text(extension_ti, "%u ", id);
3284 }
3285
3286 proto_item_append_text(extension_ti, "]");
3287 break;
3288 }
3289 case 0x3: /* beamId/ueId listing with associated port-list index */
3290 {
3291 proto_item_append_text(extension_ti, " [ ");
3292
3293 if (numPortc > 0) {
3294 /* first portListIndex is outside loop */
3295 uint32_t port_list_index;
3296 proto_item *pli_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_port_list_index, tvb,
3297 offset, 1, ENC_BIG_ENDIAN0x00000000, &port_list_index);
3298 if (port_list_index == 0) {
3299 /* Value 0 is reserved */
3300 expert_add_info(pinfo, pli_ti, &ei_oran_port_list_index_zero);
3301 }
3302 offset += 1;
3303
3304 for (n=0; n < numPortc-1; n++) {
3305 /* 1 reserved bit */
3306 proto_tree_add_item(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3307
3308 /* port beam ID (or UEID) */
3309 uint32_t id;
3310 proto_item *beamid_or_ueid_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_beamId,
3311 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &id);
3312 proto_item_append_text(beamid_or_ueid_ti, " port #%u beam ID (or UEId) %u", n, id);
3313 offset += 2;
3314
3315 if (id != 0x7fff) {
3316 if (number_of_ueids < MAX_UEIDS16) {
3317 ueids[number_of_ueids++] = id;
3318 }
3319 }
3320
3321 /* subsequent portListIndex */
3322 pli_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_port_list_index, tvb,
3323 offset, 1, ENC_BIG_ENDIAN0x00000000, &port_list_index);
3324 if (port_list_index == 0) {
3325 /* Value 0 is reserved */
3326 expert_add_info(pinfo, pli_ti, &ei_oran_port_list_index_zero);
3327 }
3328 offset += 1;
3329
3330 proto_item_append_text(extension_ti, "%u:%u ", port_list_index, id);
3331 }
3332 }
3333
3334 proto_item_append_text(extension_ti, "]");
3335 break;
3336 }
3337
3338
3339 default:
3340 /* Warning for unsupported/reserved value */
3341 expert_add_info(NULL((void*)0), bgt_ti, &ei_oran_se10_unknown_beamgrouptype);
3342 break;
3343 }
3344 break;
3345 }
3346
3347 case 11: /* SE 11: Flexible Weights Extension Type */
3348 {
3349 /* Hidden filter for bf */
3350 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
3351 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
3352
3353 /* beamId in section header should be ignored. Guard against appending multiple times.. */
3354 if (beamId_ti && !beamId_ignored) {
3355 proto_item_append_text(beamId_ti, " (ignored)");
3356 beamId_ignored = true1;
3357 }
3358
3359 bool_Bool disableBFWs;
3360 uint32_t numBundPrb;
3361 bool_Bool rad;
3362
3363 /* disableBFWs */
3364 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_disable_bfws,
3365 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &disableBFWs);
3366 if (disableBFWs) {
3367 proto_item_append_text(extension_ti, " (disableBFWs)");
3368 }
3369
3370 /* RAD */
3371 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_rad,
3372 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rad);
3373 /* bundleOffset (6 bits) */
3374 proto_tree_add_item(extension_tree, hf_oran_bundle_offset, tvb,
3375 offset, 1, ENC_BIG_ENDIAN0x00000000);
3376 offset++;
3377
3378 /* numBundPrb (number of prbs in each bundle) */
3379 proto_item *num_bund_prb_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_bund_prbs,
3380 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numBundPrb);
3381 offset++;
3382 /* value zero is reserved.. */
3383 if (numBundPrb == 0) {
3384 expert_add_info_format(pinfo, num_bund_prb_ti, &ei_oran_reserved_numBundPrb,
3385 "Reserved value 0 for numBundPrb seen - not valid");
3386 }
3387
3388 uint32_t num_bundles;
3389 bool_Bool orphaned_prbs = false0;
3390
3391 if (!disableBFWs) {
3392 /********************************************/
3393 /* Table 7.7.1.1-1 */
3394 /********************************************/
3395
3396 uint32_t bfwcomphdr_iq_width, bfwcomphdr_comp_meth;
3397 proto_item *comp_meth_ti = NULL((void*)0);
3398
3399 /* bfwCompHdr (2 subheaders - bfwIqWidth and bfwCompMeth)*/
3400 offset = dissect_bfwCompHdr(tvb, extension_tree, offset,
3401 &bfwcomphdr_iq_width, &bfwcomphdr_comp_meth, &comp_meth_ti);
3402
3403 /* Work out number of bundles, but take care not to divide by zero. */
3404 if (numBundPrb == 0) {
3405 break;
3406 }
3407
3408 /* Work out bundles! */
3409 ext11_work_out_bundles(startPrbc, numPrbc, numBundPrb, &ext11_settings);
3410 num_bundles = ext11_settings.num_bundles;
3411
3412 /* Add (complete) bundles */
3413 for (unsigned b=0; b < num_bundles; b++) {
3414
3415 offset = dissect_bfw_bundle(tvb, extension_tree, pinfo, offset,
3416 comp_meth_ti, bfwcomphdr_comp_meth,
3417 (ext11_settings.ext21_set) ?
3418 numPrbc :
3419 pref_num_weights_per_bundle,
3420 bfwcomphdr_iq_width,
3421 b, /* bundle number */
3422 ext11_settings.bundles[b].start,
3423 ext11_settings.bundles[b].end,
3424 ext11_settings.bundles[b].is_orphan);
3425 if (!offset) {
3426 break;
3427 }
3428 }
3429 if (num_bundles > 0) {
3430 /* Set flag from last bundle entry */
3431 orphaned_prbs = ext11_settings.bundles[num_bundles-1].is_orphan;
3432 }
3433 }
3434 else {
3435 /********************************************/
3436 /* Table 7.7.1.1-2 */
3437 /* No weights in this case */
3438 /********************************************/
3439
3440 /* Work out number of bundles, but take care not to divide by zero. */
3441 if (numBundPrb == 0) {
3442 break;
3443 }
3444
3445 ext11_work_out_bundles(startPrbc, numPrbc, numBundPrb, &ext11_settings);
3446 num_bundles = ext11_settings.num_bundles;
3447
3448 for (unsigned n=0; n < num_bundles; n++) {
3449 /* contInd */
3450 proto_tree_add_item(extension_tree, hf_oran_cont_ind,
3451 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3452 /* beamId */
3453 proto_item *ti = proto_tree_add_item(extension_tree, hf_oran_beam_id,
3454 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3455 if (!ext11_settings.bundles[n].is_orphan) {
3456 proto_item_append_text(ti, " (PRBs %3u-%3u) (Bundle %2u)",
3457 ext11_settings.bundles[n].start,
3458 ext11_settings.bundles[n].end,
3459 n);
3460 }
3461 else {
3462 orphaned_prbs = true1;
3463 proto_item_append_text(ti, " (PRBs %3u-%3u) (Orphaned PRBs)",
3464 ext11_settings.bundles[n].start,
3465 ext11_settings.bundles[n].end);
3466 }
3467 offset += 2;
3468 }
3469 }
3470
3471 /* Add summary to extension root */
3472 if (orphaned_prbs) {
3473 proto_item_append_text(extension_ti, " (%u full bundles + orphaned)", num_bundles-1);
3474 }
3475 else {
3476 proto_item_append_text(extension_ti, " (%u bundles)", num_bundles);
3477 }
3478 }
3479
3480 break;
3481
3482 case 12: /* SE 12: Non-Contiguous PRB Allocation with Frequency Ranges */
3483 {
3484 /* numSymbol not used in this case */
3485 if (numsymbol_ti && !numsymbol_ignored) {
3486 proto_item_append_text(numsymbol_ti, " (ignored)");
3487 numsymbol_ignored = true1;
3488 }
3489
3490 ext11_settings.ext12_set = true1;
3491
3492 /* priority */
3493 proto_tree_add_item(extension_tree, hf_oran_noncontig_priority, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3494
3495 /* symbolMask */
3496 offset = dissect_symbolmask(tvb, extension_tree, offset, NULL((void*)0), NULL((void*)0));
3497
3498 /* There are now 'R' pairs of (offStartPrb, numPrb) values. Fill extlen bytes with values. If last one is not set,
3499 should be populated with 0s. */
3500 uint32_t extlen_remaining_bytes = (extlen*4) - 4;
3501 uint8_t prb_index;
3502
3503 /* This is for ST10/ST11. First pair starts after frames signalled there */
3504 uint16_t st10_st11_offset = startPrbc + numPrbc;
3505
3506 for (prb_index = 1; extlen_remaining_bytes > 0; prb_index++)
3507 {
3508 /* Create a subtree for each pair */
3509 proto_item *pair_ti = proto_tree_add_string(extension_tree, hf_oran_frequency_range,
3510 tvb, offset, 2, "");
3511 proto_tree *pair_tree = proto_item_add_subtree(pair_ti, ett_oran_frequency_range);
3512
3513 /* offStartPrb */
3514 uint32_t off_start_prb;
3515 proto_tree_add_item_ret_uint(pair_tree, hf_oran_off_start_prb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &off_start_prb);
3516 offset++;
3517
3518 /* numPrb */
3519 uint32_t num_prb;
3520 proto_tree_add_item_ret_uint(pair_tree, hf_oran_num_prb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_prb);
3521 offset++;
3522
3523 extlen_remaining_bytes -= 2;
3524
3525 /* Last pair may be 0,0 if not used. Check for this */
3526 if ((extlen_remaining_bytes == 0) && (off_start_prb == 0) && (num_prb == 0)) {
3527 proto_item_append_text(pair_ti, " (not used)");
3528 }
3529 /* Add summary to pair root item, and configure details in ext11_settings */
3530 else {
3531 proto_item_append_text(pair_ti, "(%u) [%u : %u]",
3532 prb_index, off_start_prb, num_prb);
3533 proto_item_append_text(extension_ti, "[%u : %u]",
3534 off_start_prb, num_prb);
3535 if (ext11_settings.ext12_num_pairs < MAX_BFW_EXT12_PAIRS128) {
3536 ext11_settings.ext12_pairs[ext11_settings.ext12_num_pairs].off_start_prb = off_start_prb;
3537 ext11_settings.ext12_pairs[ext11_settings.ext12_num_pairs++].num_prb = num_prb;
3538 }
3539
3540 /* Also update PRBs to be covered for ST10 type 5 */
3541 /* Original range from section is added to.. */
3542 /* TODO: I don't think this is quite right.. */
3543 for (unsigned prb=st10_st11_offset+off_start_prb; prb < st10_st11_offset+off_start_prb+num_prb; prb++) {
3544 if (prb < MAX_PRBS273) {
3545 prbs_for_st10_type5[prb] = true1;
3546 }
3547 }
3548
3549 /* Any next pair will begin after this one */
3550 st10_st11_offset += (off_start_prb + num_prb);
3551 }
3552 }
3553 break;
3554 }
3555
3556 case 13: /* SE 13: PRB Allocation with Frequency Hopping */
3557 {
3558 /* Will update settings for ext11 */
3559 ext11_settings.ext13_set = true1;
3560
3561 uint32_t extlen_remaining_bytes = (extlen*4) - 2;
3562 uint8_t allocation_index;
3563
3564 unsigned prev_next_symbol_id = 0, prev_next_start_prbc = 0;
3565
3566 for (allocation_index = 1; extlen_remaining_bytes > 0; allocation_index++)
3567 {
3568 /* Subtree for allocation */
3569 proto_item *allocation_ti = proto_tree_add_string(extension_tree, hf_oran_prb_allocation,
3570 tvb, offset, 2, "");
3571 proto_tree *allocation_tree = proto_item_add_subtree(allocation_ti, ett_oran_prb_allocation);
3572
3573 /* Reserved (2 bits) */
3574 proto_tree_add_item(allocation_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3575
3576 /* nextSymbolId (4 bits) */
3577 uint32_t next_symbol_id;
3578 proto_tree_add_item_ret_uint(allocation_tree, hf_oran_nextSymbolId, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &next_symbol_id);
3579
3580 /* nextStartPrbc (10 bits) */
3581 uint32_t next_start_prbc;
3582 proto_tree_add_item_ret_uint(allocation_tree, hf_oran_nextStartPrbc, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &next_start_prbc);
3583 offset += 2;
3584
3585 /* Add summary to allocation root item */
3586 proto_item_append_text(allocation_ti, "(%u) nextSymbolId=%3u, nextStartPrbc=%u",
3587 allocation_index, next_symbol_id, next_start_prbc);
3588
3589 /* Checking for duplicates (expected if e.g. had only 2 entries but extlen bytes still to fill */
3590 if ((allocation_index > 1) && (next_symbol_id == prev_next_symbol_id) && (next_start_prbc == prev_next_start_prbc)) {
3591 proto_item_append_text(allocation_ti, " (repeated - to fill up extlen)");
3592 }
3593 else {
3594 /* Add entry for configuring ext11. don't store out of range */
3595 if (ext11_settings.ext13_num_start_prbs < MAX_BFW_EXT13_ALLOCATIONS128) {
3596 ext11_settings.ext13_start_prbs[ext11_settings.ext13_num_start_prbs++] = next_start_prbc;
3597 }
3598 }
3599 prev_next_symbol_id = next_symbol_id;
3600 prev_next_start_prbc = next_start_prbc;
3601
3602 extlen_remaining_bytes -= 2;
3603 }
3604 break;
3605 }
3606
3607 case 14: /* SE 14: Nulling-layer Info. for ueId-based beamforming */
3608 /* Hidden filter for bf (DMRS BF) */
3609 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
3610 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
3611
3612 if (!seen_se10) {
3613 proto_tree_add_item(extension_tree, hf_oran_nullLayerInd, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3614 offset += 1;
3615 proto_tree_add_item(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3616 offset += 1;
3617 }
3618 else {
3619 /* Loop over numPortc++1 (from SE 10) nullLayerInd fields */
3620 for (unsigned port=0; port < numPortc+1; port++) {
3621 proto_tree_add_item(extension_tree, hf_oran_nullLayerInd, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3622 offset += 1;
3623 }
3624 }
3625 break;
3626
3627 case 15: /* SE 15: Mixed-numerology Info. for ueId-based beamforming */
3628 {
3629 /* frameStructure */
3630 offset = dissect_frame_structure(extension_tree, tvb, offset,
3631 subframeId, slotId);
3632 /* freqOffset */
3633 proto_tree_add_item(extension_tree, hf_oran_freqOffset, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000);
3634 offset += 3;
3635 /* cpLength */
3636 proto_item *cplength_ti = proto_tree_add_item(extension_tree, hf_oran_cpLength, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3637 if (sectionType != 0 && sectionType != 3) {
3638 proto_item_append_text(cplength_ti, " (ignored - used only with ST0 and ST3)");
3639 }
3640 offset += 2;
3641 break;
3642 }
3643
3644 case 16: /* SE 16: Antenna mapping in UE channel information based UL beamforming */
3645 {
3646 /* Just filling available bytes with antMask entries.
3647 N.B., if SE 10 also used, could associate each antMask with (beamId or UEId) RX eAxC */
3648 uint32_t extlen_remaining_bytes = (extlen*4) - 2;
3649 unsigned num_ant_masks = extlen_remaining_bytes / 8;
3650 for (unsigned n=0; n < num_ant_masks; n++) {
3651 proto_item *ti = proto_tree_add_item(extension_tree, hf_oran_antMask, tvb, offset, 8, ENC_BIG_ENDIAN0x00000000);
3652 proto_item_append_text(ti, " (RX eAxC #%u)", n+1);
3653 offset += 8;
3654 }
3655 break;
3656 }
3657
3658 case 17: /* SE 17: Indication of user port group */
3659 {
3660 uint32_t extlen_remaining_bytes = (extlen*4) - 2;
3661 uint32_t end_bit = (offset+extlen_remaining_bytes) * 8;
3662 uint32_t ueid_index = 1;
3663 /* TODO: just filling up all available bytes - some may actually be padding.. */
3664 /* "the preceding Section Type and extension messages implicitly provide the number of scheduled users" */
3665 for (uint32_t bit_offset=offset*8; bit_offset < end_bit; bit_offset+=4, ueid_index++) {
3666 proto_item *ti = proto_tree_add_bits_item(extension_tree, hf_oran_num_ueid, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000);
3667 proto_item_append_text(ti, " (user #%u)", ueid_index);
3668 }
3669 break;
3670 }
3671
3672 case 18: /* SE 18: Uplink transmission management */
3673 /* transmissionWindowOffset */
3674 proto_tree_add_item(extension_tree, hf_oran_transmissionWindowOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3675 offset += 2;
3676 /* reserved (2 bits) */
3677 proto_tree_add_item(extension_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3678 /* transmissionWindowSize (14 bits) */
3679 proto_tree_add_item(extension_tree, hf_oran_transmissionWindowSize, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3680 offset += 2;
3681
3682 /* reserved (6 bits) */
3683 proto_tree_add_item(extension_tree, hf_oran_reserved_6bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3684 /* toT (2 bits) */
3685 proto_tree_add_item(extension_tree, hf_oran_toT, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3686 offset += 1;
3687 break;
3688
3689 case 19: /* SE 19: Compact beamforming information for multiple port */
3690 {
3691 /* beamId in section header should be ignored. Guard against appending multiple times.. */
3692 if (beamId_ti && !beamId_ignored) {
3693 proto_item_append_text(beamId_ti, " (ignored)");
3694 beamId_ignored = true1;
3695 }
3696
3697 /* numSymbol not used in this case */
3698 if (numsymbol_ti && !numsymbol_ignored) {
3699 proto_item_append_text(numsymbol_ti, " (ignored)");
3700 numsymbol_ignored = true1;
3701 }
3702
3703 /* disableBFWs */
3704 bool_Bool disableBFWs;
3705 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_disable_bfws,
3706 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &disableBFWs);
3707 if (disableBFWs) {
3708 proto_item_append_text(extension_ti, " (disableBFWs)");
3709 }
3710 /* repetition (1 bit) */
3711 uint64_t repetition;
3712 proto_tree_add_bits_ret_val(extension_tree, hf_oran_se19_repetition, tvb, (offset*8)+1, 1, &repetition, ENC_BIG_ENDIAN0x00000000);
3713 /* numPortc (6 bits) */
3714 proto_tree_add_item_ret_uint(extension_tree, hf_oran_numPortc,
3715 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numPortc);
3716 offset++;
3717
3718 /* priority (2 bits) */
3719 proto_tree_add_item(extension_tree, hf_oran_noncontig_priority, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3720 /* symbolMask (14 bits) */
3721 offset = dissect_symbolmask(tvb, extension_tree, offset, NULL((void*)0), NULL((void*)0));
3722
3723 uint32_t bfwcomphdr_iq_width, bfwcomphdr_comp_meth;
3724 proto_item *comp_meth_ti = NULL((void*)0);
3725
3726 if (!repetition) {
3727
3728 if (!disableBFWs) {
3729 /* bfwCompHdr */
3730 offset = dissect_bfwCompHdr(tvb, extension_tree, offset,
3731 &bfwcomphdr_iq_width, &bfwcomphdr_comp_meth, &comp_meth_ti);
3732 }
3733
3734 /* Add entries for each port */
3735 for (unsigned port=0; port < numPortc; port++) {
3736
3737 /* Create subtree for port entry*/
3738 int port_start_offset = offset;
3739 proto_item *port_ti = proto_tree_add_string_format(extension_tree, hf_oran_ext19_port,
3740 tvb, offset, 0,
3741 "", "Port %u: ", port);
3742 proto_tree *port_tree = proto_item_add_subtree(port_ti, ett_oran_ext19_port);
3743
3744 /* Reserved (4 bits) */
3745 proto_tree_add_item(port_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3746 /* portReMask (12 bits) */
3747 proto_tree_add_item(port_tree, hf_oran_portReMask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3748 offset += 2;
3749
3750 /* Reserved (2 bits) */
3751 proto_tree_add_item(port_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3752 /* portSymbolMask (14 bits) */
3753 proto_tree_add_item(port_tree, hf_oran_portSymbolMask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3754 offset += 2;
3755
3756 /* Reserved (1 bit) */
3757 proto_tree_add_item(port_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3758 /* beamID (15 bits) */
3759 proto_tree_add_item_ret_uint(port_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &beamId);
3760 proto_item_append_text(port_ti, " (beamId=%u)", beamId);
3761 offset += 2;
3762
3763 /* No weights present */
3764 if (!disableBFWs) {
3765 /*******************************************************************/
3766 /* Table 7.7.19.1-1 (there is no part -2 for disableBFWs case...), */
3767 /* but for SE 11, bfwCompParam was only present for !disableBFWs */
3768 /*******************************************************************/
3769
3770 /* bfwCompParam */
3771 bool_Bool compression_method_supported = false0;
3772 uint32_t exponent = 0;
3773 unsigned num_trx_entries;
3774 uint16_t *trx;
3775 offset = dissect_bfwCompParam(tvb, port_tree, pinfo, offset, comp_meth_ti,
3776 &bfwcomphdr_comp_meth, &exponent, &compression_method_supported,
3777 &num_trx_entries, &trx);
3778
3779 int bit_offset = offset*8;
3780 int bfw_offset;
3781
3782 /* Add weights for each TRX */
3783 unsigned trx_to_add = (num_trx_entries==0) ? pref_num_bf_antennas : num_trx_entries;
3784 for (unsigned b=0; b < trx_to_add; b++) {
3785
3786 uint16_t trx_index = (num_trx_entries) ? trx[b] : b+1;
3787
3788 /* Create BFW subtree */
3789 bfw_offset = bit_offset / 8;
3790 uint8_t bfw_extent = ((bit_offset + (bfwcomphdr_iq_width*2)) / 8) - bfw_offset;
3791 proto_item *bfw_ti = proto_tree_add_string_format(port_tree, hf_oran_bfw,
3792 tvb, bfw_offset, bfw_extent,
3793 "", "TRX %u: (", trx_index);
3794 proto_tree *bfw_tree = proto_item_add_subtree(bfw_ti, ett_oran_bfw);
3795
3796 /* I */
3797 uint32_t bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
3798 float value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent);
3799 /* Add to tree. */
3800 proto_tree_add_float_format_value(bfw_tree, hf_oran_bfw_i, tvb, bit_offset/8,
3801 (bfwcomphdr_iq_width+7)/8, value, "#%u=%f", b, value);
3802 bit_offset += bfwcomphdr_iq_width;
3803 proto_item_append_text(bfw_ti, "I%u=%f ", b, value);
3804
3805 /* Q */
3806 bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
3807 value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent);
3808 /* Add to tree. */
3809 proto_tree_add_float_format_value(bfw_tree, hf_oran_bfw_q, tvb, bit_offset/8,
3810 (bfwcomphdr_iq_width+7)/8, value, "#%u=%f", b, value);
3811 bit_offset += bfwcomphdr_iq_width;
3812 proto_item_append_text(bfw_ti, "Q%u=%f)", b, value);
3813 }
3814
3815 offset = (bit_offset+7)/8;
3816 }
3817 else {
3818 /* No weights... */
3819 }
3820
3821 /* Set length of this port entry */
3822 proto_item_set_len(port_ti, offset-port_start_offset);
3823 }
3824 }
3825 break;
3826 }
3827
3828 case 20: /* SE 20: Puncturing extension */
3829 {
3830 /* numPuncPatterns */
3831 uint32_t numPuncPatterns;
3832 proto_tree_add_item_ret_uint(extension_tree, hf_oran_numPuncPatterns, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numPuncPatterns);
3833 offset += 1;
3834
3835 /* Add each puncturing pattern */
3836 for (uint32_t n=0; n < numPuncPatterns; n++) {
3837 unsigned pattern_start_offset = offset;
3838
3839 /* Subtree for this puncturing pattern */
3840 proto_item *pattern_ti = proto_tree_add_string_format(extension_tree, hf_oran_puncPattern,
3841 tvb, offset, 0,
3842 "", "Puncturing Pattern: %u/%u", n+1, numPuncPatterns);
3843 proto_tree *pattern_tree = proto_item_add_subtree(pattern_ti, ett_oran_punc_pattern);
3844
3845 /* SymbolMask (14 bits) */
3846 proto_tree_add_item(pattern_tree, hf_oran_symbolMask_ext20, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3847 offset += 1;
3848
3849 uint32_t startPuncPrb, numPuncPrb;
3850
3851 /* startPuncPrb (10 bits) */
3852 proto_tree_add_item_ret_uint(pattern_tree, hf_oran_startPuncPrb, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPuncPrb);
3853 offset += 2;
3854 /* numPuncPrb (8 bits) */
3855 proto_tree_add_item_ret_uint(pattern_tree, hf_oran_numPuncPrb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numPuncPrb);
3856 offset += 1;
3857
3858 proto_item_append_text(pattern_ti, " [%u->%u]", startPuncPrb, startPuncPrb+numPuncPrb-1);
3859
3860 /* Make a hole in range of PRBs to report */
3861 for (unsigned p=startPuncPrb; p < startPuncPrb+numPuncPrb; p++) {
3862 if (p < MAX_PRBS273) {
3863 prbs_for_st10_type5[p] = false0;
3864 }
3865 }
3866
3867 /* puncReMask (12 bits) */
3868 proto_tree_add_item(pattern_tree, hf_oran_puncReMask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3869 offset += 1;
3870 /* rb (1 bit) */
3871 proto_item *rb_ti = proto_tree_add_item(pattern_tree, hf_oran_rb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3872 /* reserved (1 bit) */
3873 proto_tree_add_item(pattern_tree, hf_oran_reserved_bit5, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3874 /* multiSDScope (1 bit) */
3875 proto_tree_add_item(pattern_tree, hf_oran_multiSDScope, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3876 /* rbgIncl (1 bit) */
3877 bool_Bool rbgIncl;
3878 proto_tree_add_item_ret_boolean(pattern_tree, hf_oran_RbgIncl, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rbgIncl);
3879 offset += 1;
3880
3881 if (rbgIncl) {
3882 /* reserved (1 bit) */
3883 proto_tree_add_item(pattern_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3884 /* rbgSize(3 bits) */
3885 proto_tree_add_item(pattern_tree, hf_oran_rbgSize, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3886 /* rbgMask (28 bits) */
3887 proto_tree_add_item(pattern_tree, hf_oran_rbgMask, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
3888 offset += 4;
3889
3890 proto_item_append_text(rb_ti, " (ignored)");
3891 }
3892
3893 proto_item_set_len(pattern_ti, offset-pattern_start_offset);
3894 }
3895
3896 break;
3897 }
3898 case 21: /* SE 21: Variable PRB group size for channel information */
3899 {
3900 /* ciPrbGroupSize */
3901 uint32_t ci_prb_group_size;
3902 proto_item *prb_group_size_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_ci_prb_group_size, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &ci_prb_group_size);
3903 offset += 1;
3904
3905 switch (ci_prb_group_size) {
3906 case 0:
3907 case 1:
3908 case 255:
3909 /* Reserved value */
3910 expert_add_info_format(pinfo, prb_group_size_ti, &ei_oran_ci_prb_group_size_reserved,
3911 "SE 11 ciPrbGroupSize is reserved value %u - must be 2-254",
3912 ci_prb_group_size);
3913 break;
3914 default:
3915 /* This value affects how SE 11 is interpreted */
3916 ext11_settings.ext21_set = true1;
3917 ext11_settings.ext21_ci_prb_group_size = ci_prb_group_size;
3918
3919 if (numPrbc == 0) {
3920 expert_add_info(pinfo, numprbc_ti, &ei_oran_numprbc_ext21_zero);
3921 }
3922 break;
3923 }
3924
3925 /* reserved (6 bits) */
3926 proto_tree_add_item(extension_tree, hf_oran_reserved_6bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3927
3928 /* prgSize (2 bits). Interpretation depends upon section type (5 or 6), but also mplane parameters? */
3929 if (sectionType == SEC_C_UE_SCHED) { /* Section Type 5 */
3930 proto_tree_add_item(extension_tree, hf_oran_prg_size_st5, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3931 }
3932 else if (sectionType == SEC_C_CH_INFO) { /* Section Type 6 */
3933 proto_tree_add_item(extension_tree, hf_oran_prg_size_st6, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3934 }
3935 offset += 1;
3936 break;
3937 }
3938
3939 case 22: /* SE 22: ACK/NACK request */
3940 {
3941 uint32_t ack_nack_req_id;
3942 proto_tree_add_item_ret_uint(extension_tree, hf_oran_ack_nack_req_id, tvb, offset, 2,
3943 ENC_BIG_ENDIAN0x00000000, &ack_nack_req_id);
3944 offset += 2;
3945
3946 if (state) {
3947 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
3948 /* Add this request into conversation state on first pass */
3949 ack_nack_request_t *request_details = wmem_new0(wmem_file_scope(), ack_nack_request_t)((ack_nack_request_t*)wmem_alloc0((wmem_file_scope()), sizeof
(ack_nack_request_t)))
;
3950 request_details->request_frame_number = pinfo->num;
3951 request_details->request_frame_time = pinfo->abs_ts;
3952 request_details->requestType = SE22;
3953 /* Insert into flow's tree */
3954 wmem_tree_insert32(state->ack_nack_requests, ack_nack_req_id, request_details);
3955 }
3956 else {
3957 /* Try to link forward to ST8 response */
3958 ack_nack_request_t *response = wmem_tree_lookup32(state->ack_nack_requests,
3959 ack_nack_req_id);
3960 if (response) {
3961 show_link_to_acknack_response(extension_tree, tvb, pinfo, response);
3962 }
3963 }
3964 }
3965 break;
3966 }
3967
3968 case 23: /* SE 23: Arbitrary symbol pattern modulation compression parameters */
3969 {
3970 /* Green common header */
3971
3972 /* numSymPrbPattern (4 bits) */
3973 uint32_t num_sym_prb_pattern;
3974 proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_sym_prb_pattern, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_sym_prb_pattern);
3975 /* reserved (3 bits) */
3976 proto_tree_add_item(extension_tree, hf_oran_reserved_bits456, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3977 /* prbMode (1 bit) */
3978 bool_Bool prb_mode;
3979 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_prb_mode, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &prb_mode);
3980 offset += 1;
3981
3982 /* reserved (8 bits) */
3983 proto_tree_add_item(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3984 offset += 1;
3985
3986 /* Dissect each SymPrbPattern */
3987 for (uint32_t n=0; n < num_sym_prb_pattern; n++) {
3988
3989 /* Subtree */
3990 proto_item *pattern_ti = proto_tree_add_string_format(extension_tree, hf_oran_sym_prb_pattern,
3991 tvb, offset, 1, "",
3992 prb_mode ? "PRB-BLOCK" : "PRB-MASK");
3993 proto_tree *pattern_tree = proto_item_add_subtree(pattern_ti, ett_oran_sym_prb_pattern);
3994
3995
3996 /* Orange part */
3997
3998 /* Reserved (2 bits) */
3999 proto_tree_add_item(pattern_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4000 /* symMask (14 bits) */
4001 proto_tree_add_item(pattern_tree, hf_oran_sym_mask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4002 offset += 2;
4003 /* numMcScaleOffset (4 bits) */
4004 proto_tree_add_item(pattern_tree, hf_oran_num_mc_scale_offset, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4005
4006 if (!prb_mode) { /* PRB-MASK */
4007 /* prbPattern (4 bits) */
4008 proto_tree_add_item(pattern_tree, hf_oran_prb_pattern, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4009 offset += 1;
4010 /* reserved (8 bits) */
4011 proto_tree_add_item(pattern_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4012 offset += 1;
4013 }
4014 else { /* PRB-BLOCK */
4015 /* prbBlkOffset (8 bits) */
4016 proto_tree_add_item(pattern_tree, hf_oran_prb_block_offset, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4017 offset += 1;
4018 /* prbBlkSize (4 bits) */
4019 proto_tree_add_item(pattern_tree, hf_oran_prb_block_size, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4020 offset += 1;
4021 }
4022
4023 /* Yellowish part */
4024 if (prb_mode) { /* PRB-BLOCK */
4025 /* prbBlkSize (4 bits) */
4026 proto_tree_add_item(pattern_tree, hf_oran_prb_block_size, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4027 }
4028 else {
4029 /* reserved (4 bits) */
4030 proto_tree_add_item(pattern_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4031 }
4032
4033 /* mcScaleReMask (12 bits) */
4034 uint64_t mcScaleReMask, mcScaleOffset;
4035 proto_tree_add_bits_ret_val(pattern_tree, hf_oran_mc_scale_re_mask, tvb, offset*8 + 4, 12, &mcScaleReMask, ENC_BIG_ENDIAN0x00000000);
4036 offset += 2;
4037 /* csf */
4038 dissect_csf(pattern_tree, tvb, offset*8, ci_iq_width, NULL((void*)0));
4039 /* mcScaleOffset (15 bits) */
4040 proto_tree_add_bits_ret_val(pattern_tree, hf_oran_mc_scale_offset, tvb, offset*8 + 1, 15, &mcScaleOffset, ENC_BIG_ENDIAN0x00000000);
4041 offset += 2;
4042
4043 proto_item_set_end(pattern_ti, tvb, offset);
4044 }
4045 break;
4046 }
4047
4048 case 24: /* SE 24: PUSCH DMRS configuration */
4049 {
4050 /* Hidden filter for bf (DMRS BF) */
4051 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
4052 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
4053
4054 /* alpnPerSym (1 bit) */
4055 proto_tree_add_item(extension_tree, hf_oran_alpn_per_sym, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4056 /* antDmrsSnr (1 bit) */
4057 proto_tree_add_item(extension_tree, hf_oran_ant_dmrs_snr, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4058 /* reserved (1 bit) */
4059 proto_tree_add_item(extension_tree, hf_oran_reserved_bit2, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4060 /* userGroupSize (5 bits) */
4061 uint32_t user_group_size;
4062 proto_item *ugs_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_user_group_size, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &user_group_size);
4063 if (user_group_size == 0) {
4064 proto_item_append_text(ugs_ti, " (not used)");
4065 }
4066 else if (user_group_size > 12) {
4067 proto_item_append_text(ugs_ti, " (reserved)");
4068 }
4069 offset += 1;
4070 /* userGroupId (8 bits)*/
4071 uint32_t user_group_id;
4072 proto_item *ugi_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_user_group_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &user_group_id);
4073 if (user_group_id == 0) {
4074 /* TODO: Value 0 can happen in several cases, described in 7.7.24.7.. */
4075 }
4076 if (user_group_id == 255) {
4077 /* Value 255 is reserved */
4078 expert_add_info(pinfo, ugi_ti, &ei_oran_user_group_id_reserved_value);
4079 }
4080 offset += 1;
4081
4082 bool_Bool seen_value_to_inherit = false0;
4083 bool_Bool inherited_config_has_transform_precoding = false0;
4084 int dmrs_configs_seen = 0;
4085
4086 /* Dissect each entry until reach number of configured ueIds (or run out of extlen bytes..) */
4087 uint32_t ueid_index = 0;
4088 while ((offset < (extension_start_offset + extlen*4)) && (ueid_index < number_of_ueids)) {
4089 dmrs_configs_seen++;
4090
4091 /* Subtree */
4092 proto_item *entry_ti = proto_tree_add_string_format(extension_tree, hf_oran_dmrs_entry,
4093 tvb, offset, 0, "",
4094 "Entry");
4095 proto_tree *entry_tree = proto_item_add_subtree(entry_ti, ett_oran_dmrs_entry);
4096
4097 /* entryType (3 bits) */
4098 uint32_t entry_type;
4099 proto_item *entry_type_ti;
4100 entry_type_ti = proto_tree_add_item_ret_uint(entry_tree, hf_oran_entry_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &entry_type);
4101 if (entry_type > 3) {
4102 proto_item_append_text(entry_type_ti, " (reserved)");
4103 }
4104
4105 /* dmrsPortNumber (5 bits). Values 0-11 allowed */
4106 unsigned int dmrs_port_number;
4107 proto_item *dpn_ti = proto_tree_add_item_ret_uint(entry_tree, hf_oran_dmrs_port_number, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &dmrs_port_number);
4108 if (dmrs_port_number > 11) {
4109 proto_item_append_text(dpn_ti, " (12-31 are reserved)");
4110 }
4111 offset += 1;
4112
4113 /* What follows depends upon entryType */
4114 switch (entry_type) {
4115 case 0: /* dmrsPortNumber config same as previous, ueId ueIdReset=0 */
4116 case 1: /* dmrsPortNumber config same as previous, ueId ueIdReset=1 */
4117 /* No further fields for these */
4118 /* Error here if no previous values to inherit!! */
4119 if (!seen_value_to_inherit) {
4120 expert_add_info_format(pinfo, entry_type_ti, &ei_oran_se24_nothing_to_inherit,
4121 "SE24: have seen entry type %u, but no previous config (type 2 or 3) to inherit config from", entry_type);
4122
4123 }
4124 /* TODO: would be useful to repeat inherited config here? */
4125 break;
4126
4127 case 2: /* transform precoding disabled */
4128 case 3: /* transform precoding enabled */
4129 {
4130 /* Type 2/3 are very similar.. */
4131
4132 /* ueIdReset (1 bit) */
4133 proto_tree_add_item(entry_tree, hf_oran_ueid_reset, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4134 /* reserved (1 bit) */
4135 proto_tree_add_item(entry_tree, hf_oran_reserved_bit1, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4136
4137 /* dmrsSymbolMask (14 bits) */
4138 static int * const dmrs_symbol_mask_flags[] = {
4139 &hf_oran_dmrs_symbol_mask_s13,
4140 &hf_oran_dmrs_symbol_mask_s12,
4141 &hf_oran_dmrs_symbol_mask_s11,
4142 &hf_oran_dmrs_symbol_mask_s10,
4143 &hf_oran_dmrs_symbol_mask_s9,
4144 &hf_oran_dmrs_symbol_mask_s8,
4145 &hf_oran_dmrs_symbol_mask_s7,
4146 &hf_oran_dmrs_symbol_mask_s6,
4147 &hf_oran_dmrs_symbol_mask_s5,
4148 &hf_oran_dmrs_symbol_mask_s4,
4149 &hf_oran_dmrs_symbol_mask_s3,
4150 &hf_oran_dmrs_symbol_mask_s2,
4151 &hf_oran_dmrs_symbol_mask_s1,
4152 &hf_oran_dmrs_symbol_mask_s0,
4153 NULL((void*)0)
4154 };
4155 proto_tree_add_bitmask(entry_tree, tvb, offset,
4156 hf_oran_dmrs_symbol_mask, ett_oran_dmrs_symbol_mask, dmrs_symbol_mask_flags, ENC_BIG_ENDIAN0x00000000);
4157 offset += 2;
4158
4159 /* scrambling */
4160 proto_tree_add_item(entry_tree, hf_oran_scrambling, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4161 offset += 2;
4162
4163 /* nscid (1 bit) */
4164 proto_tree_add_item(entry_tree, hf_oran_nscid, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4165
4166 /* These 5 bits differ depending upon entry type */
4167 if (entry_type == 2) { /* type 2 */
4168 /* dType (1 bit) */
4169 proto_tree_add_item(entry_tree, hf_oran_dtype, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4170 /* cdmWithoutData (2 bits) */
4171 proto_tree_add_item(entry_tree, hf_oran_cmd_without_data, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4172 /* lambda (2 bits) */
4173 proto_tree_add_item(entry_tree, hf_oran_lambda, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4174 }
4175 else { /* type 3 */
4176 /* reserved (1 bit) */
4177 proto_tree_add_item(entry_tree, hf_oran_reserved_bit1, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4178 /* lowPaprType (2 bits) */
4179 proto_tree_add_item(entry_tree, hf_oran_low_papr_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4180 /* hoppingMode (2 bits) */
4181 proto_tree_add_item(entry_tree, hf_oran_hopping_mode, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4182 }
4183
4184 /* firstPrb (9 bits) */
4185 proto_tree_add_item(entry_tree, hf_oran_first_prb, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4186 offset += 1;
4187 /* lastPrb (9 bits) */
4188 proto_tree_add_item(entry_tree, hf_oran_last_prb, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4189 offset += 2;
4190 /* Reserved (16 bits) */
4191 proto_tree_add_item(entry_tree, hf_oran_reserved_16bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4192 offset += 2;
4193
4194 /* Could now see entry types 0 or 1 - they have these values to inherit */
4195 seen_value_to_inherit = true1;
4196 inherited_config_has_transform_precoding = (entry_type == 3);
4197 break;
4198 }
4199
4200 default:
4201 /* reserved - expert info */
4202 break;
4203 }
4204
4205 proto_item_append_text(entry_ti, " [UEId=%u] (dmrsPortNumber=%2u) (type %u - %s) ",
4206 ueids[ueid_index++], dmrs_port_number, entry_type, val_to_str_const(entry_type, entry_type_vals, "Unknown"));
4207 proto_item_set_end(entry_ti, tvb, offset);
4208
4209 if (entry_type <= 1) {
4210 proto_item_append_text(entry_ti, " [transform-precoding %s]",
4211 inherited_config_has_transform_precoding ? "enabled" : "disabled");
4212 }
4213 }
4214
4215 proto_item_append_text(extension_ti, " (%d DMRS configs seen)", dmrs_configs_seen);
4216 break;
4217 }
4218
4219 case 25: /* SE 25: Symbol reordering for DMRS-BF */
4220 /* Just dissect each available block of 7 bytes as the 14 symbols for a layer,
4221 where each layer could be one or apply to all layers. */
4222 {
4223 /* TODO: should only appear in one section of a message - check? */
4224 unsigned layer = 0;
4225 proto_item *layer_ti;
4226 while (offset+7 <= (extension_start_offset + extlen*4)) {
4227 /* Layer subtree */
4228 layer_ti = proto_tree_add_string_format(extension_tree, hf_oran_symbol_reordering_layer,
4229 tvb, offset, 7, "",
4230 "Layer");
4231 proto_tree *layer_tree = proto_item_add_subtree(layer_ti, ett_oran_symbol_reordering_layer);
4232
4233 /* All 14 symbols for a layer (or all layers) */
4234 for (unsigned s=0; s < 14; s++) {
4235 proto_item *sym_ti;
4236 /* txWinForOnAirSymbol */
4237 unsigned int tx_win_for_on_air_symbol;
4238 sym_ti = proto_tree_add_item_ret_uint(layer_tree,
4239 (s % 2) ? hf_oran_tx_win_for_on_air_symbol_r : hf_oran_tx_win_for_on_air_symbol_l,
4240 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &tx_win_for_on_air_symbol);
4241 if (tx_win_for_on_air_symbol == 0x0F) {
4242 /* Ordering not affected */
4243 proto_item_append_text(sym_ti, " (sym %u - no info)", s);
4244 }
4245 else {
4246 proto_item_append_text(sym_ti, " (sym %u)", s);
4247 }
4248 if (s % 2) {
4249 offset += 1;
4250 }
4251 }
4252
4253 proto_item_append_text(layer_ti, " (layer %u)", ++layer);
4254 proto_item_append_text(extension_ti, " (layer %u)", layer);
4255 }
4256 /* Set layer subtree label */
4257 if (layer == 1) {
4258 proto_item_append_text(layer_ti, " (all)");
4259 proto_item_append_text(extension_ti, " (all)");
4260 }
4261 if (layer == 0) {
4262 /* TODO: are no layers valid? What does it mean? */
4263 proto_item_append_text(extension_ti, " (none)");
4264 }
4265 break;
4266 }
4267
4268 case 26: /* SE 26: Frequency offset feedback */
4269 /* Reserved (8 bits). N.B., added after draft? */
4270 proto_tree_add_item(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4271 offset += 1;
4272 /* Reserved (1 bit) */
4273 proto_tree_add_item(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4274 /* numFoFb (7 bits) */
4275 unsigned num_fo_fb;
4276 proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_fo_fb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_fo_fb);
4277 offset += 1;
4278
4279 /* Add each freqOffsetFb value */
4280 for (unsigned n=0; n < num_fo_fb; n++) {
4281 unsigned freq_offset_fb;
4282 /* freqOffsetFb (16 bits) */
4283 proto_item *offset_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_freq_offset_fb,
4284 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &freq_offset_fb);
4285 /* Show if maps onto a -ve number */
4286 if ((freq_offset_fb >= 0x8ad0) && (freq_offset_fb <= 0xffff)) {
4287 proto_item_append_text(offset_ti, "(value %d)", -1 - (0xffff-freq_offset_fb));
4288 }
4289 proto_item_append_text(offset_ti, " [#%u]", n+1);
4290 offset += 2;
4291 }
4292 break;
4293
4294 case 27: /* SE 27: O-DU controlled dimensionality reduction */
4295 {
4296 /* Hidden filter for bf (DMRS BF) */
4297 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
4298 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
4299
4300 /* beamType (2 bits) */
4301 unsigned beam_type;
4302 proto_tree_add_item_ret_uint(extension_tree, hf_oran_beam_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &beam_type);
4303 /* reserved (6 bits) */
4304 proto_tree_add_item(extension_tree, hf_oran_reserved_last_6bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4305 offset += 1;
4306
4307 /* numElements */
4308 unsigned num_elements;
4309 proto_item *num_elements_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_elements, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_elements);
4310 if (num_elements == 0) {
4311 num_elements = 256;
4312 proto_item_append_text(num_elements_ti, " (256");
4313 }
4314
4315 offset += 1;
4316
4317 /* beamId value(s) */
4318 switch (beam_type) {
4319 case 0:
4320 for (unsigned n=0; n < num_elements; n++) {
4321 /* reserved (1 bit) + beamId */
4322 proto_tree_add_item(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4323 proto_tree_add_item(c_section_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4324 offset += 2;
4325 }
4326 break;
4327 case 1:
4328 /* reserved (1 bit) + beamId */
4329 proto_tree_add_item(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4330 proto_tree_add_item(c_section_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4331 offset += 2;
4332 break;
4333 default:
4334 /* Unknown type... */
4335 break;
4336 }
4337 break;
4338 }
4339
4340 case 28: /* SE 28: O-DU controlled frequency resolution for SINR reporting */
4341 {
4342 /* reserved (3 bits) */
4343 proto_tree_add_item(extension_tree, hf_oran_reserved_3bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4344 /* numUeSinrRpt */
4345 uint32_t num_ue_sinr_rpt;
4346 proto_tree_add_item_ret_uint(extension_tree, hf_oran_reserved_3bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_ue_sinr_rpt);
4347 offset += 1;
4348
4349 for (uint32_t n=0; n < num_ue_sinr_rpt; n++) {
4350 /* reserved (1 bit) */
4351 proto_tree_add_item(extension_tree, (n % 2) ? hf_oran_reserved_1bit : hf_oran_reserved_bit4,
4352 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4353
4354 /* numSinrPerPrb (3 bits). Taken from alternate nibbles within byte. */
4355 proto_tree_add_item(extension_tree, (n % 2) ? hf_oran_num_sinr_per_prb : hf_oran_num_sinr_per_prb_right,
4356 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4357 if (n % 2) {
4358 offset += 1;
4359 }
4360 }
4361
4362 /* May need to skip beyond half-used byte */
4363 if (num_ue_sinr_rpt % 2) {
4364 offset += 1;
4365 }
4366 break;
4367 }
4368
4369
4370 default:
4371 /* Other/unexpected extension types */
4372 expert_add_info_format(pinfo, exttype_ti, &ei_oran_unhandled_se,
4373 "SE %u (%s) not supported by dissector",
4374 exttype, val_to_str_const(exttype, exttype_vals, "Reserved"));
4375 ext_unhandled = true1;
4376 break;
4377 }
4378
4379 /* Check offset compared with extlen. There should be 0-3 bytes of padding */
4380 int num_padding_bytes = (extension_start_offset + (extlen*4) - offset);
4381 if (!ext_unhandled && ((num_padding_bytes<0) || (num_padding_bytes>3))) {
4382 expert_add_info_format(pinfo, extlen_ti, &ei_oran_extlen_wrong,
4383 "extlen signalled %u bytes (+ 0-3 bytes padding), but %u were dissected",
4384 extlen*4, offset-extension_start_offset);
4385 }
4386
4387 /* Move offset to beyond signalled length of extension */
4388 offset = extension_start_offset + (extlen*4);
4389
4390 /* Set length of extension header. */
4391 proto_item_set_len(extension_ti, extlen*4);
4392 }
4393 /* End of section extension handling */
4394
4395
4396
4397 /* RRM measurement reports have measurement reports *after* extensions */
4398 if (sectionType == SEC_C_RRM_MEAS_REPORTS) /* Section Type 10 */
4399 {
4400 /* Hidden filter for bf (DMFS-BF). No BF weights though.. */
4401 bf_ti = proto_tree_add_item(c_section_tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
4402 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
4403
4404 bool_Bool mf;
4405 do {
4406 /* Measurement report subtree */
4407 proto_item *mr_ti = proto_tree_add_string_format(c_section_tree, hf_oran_measurement_report,
4408 tvb, offset, 1, "", "Measurement Report");
4409 proto_tree *mr_tree = proto_item_add_subtree(mr_ti, ett_oran_measurement_report);
4410 unsigned report_start_offset = offset;
4411
4412 /* more fragments (after this one) (1 bit) */
4413 proto_tree_add_item_ret_boolean(mr_tree, hf_oran_mf, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &mf);
4414
4415 /* measTypeId (7 bits) */
4416 uint32_t meas_type_id;
4417 proto_item *meas_type_id_ti;
4418 meas_type_id_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_meas_type_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &meas_type_id);
4419 offset += 1;
4420
4421 /* Common to all measurement types */
4422 unsigned num_elements = 0;
4423 if (meas_type_id == 6) {
4424 /* numElements */
4425 proto_tree_add_item_ret_uint(mr_tree, hf_oran_num_elements, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_elements);
4426 }
4427 else {
4428 /* All other meas ids have a reserved byte */
4429 proto_tree_add_item(mr_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4430 }
4431 offset += 1;
4432
4433 /* measDataSize (16 bits). N.B. begins at mf field, i.e. 2 bytes before this one */
4434 unsigned meas_data_size;
4435 proto_item *meas_data_size_ti;
4436 meas_data_size_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_meas_data_size, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &meas_data_size);
4437 meas_data_size *= 4;
4438 proto_item_append_text(meas_data_size_ti, " (%u bytes)", meas_data_size);
4439 offset += 2;
4440
4441 /* Summary for measurement report root */
4442 proto_item_append_text(mr_ti, " (measTypeId=%u - %s)",
4443 meas_type_id, val_to_str_const(meas_type_id, meas_type_id_vals, "unknown"));
4444 /* And section header */
4445 proto_item_append_text(tree, " (%s)", val_to_str_const(meas_type_id, meas_type_id_vals, "unknown"));
4446 /* And Info column */
4447 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", val_to_str_const(meas_type_id, meas_type_id_vals, "unknown"));
4448
4449 /* Handle specific message type fields */
4450 switch (meas_type_id) {
4451 case 1:
4452 {
4453 /* ueTae */
4454 unsigned ue_tae;
4455 proto_item *ue_tae_ti;
4456 ue_tae_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_ue_tae, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ue_tae);
4457 /* Show if maps onto a -ve number */
4458 if ((ue_tae >= 0x8ad0) && (ue_tae <= 0xffff)) {
4459 proto_item_append_text(ue_tae_ti, "(value %d)", -1 - (0xffff-ue_tae));
4460 }
4461 offset += 2;
4462
4463 /* Reserved (16 bits) */
4464 proto_tree_add_item(mr_tree, hf_oran_reserved_16bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4465 offset += 2;
4466 break;
4467 }
4468 case 2:
4469 /* ueLayerPower entries (how many? for now just use up meas_data_size..) */
4470 /* TODO: add number of distinct dmrsPortNumber entries seen in SE24 and save in state? */
4471 /* Or would it make sense to use the preference 'pref_num_bf_antennas' (currently used for ST 6)? */
4472 for (unsigned n=0; n < (meas_data_size-4)/2; n++) {
4473 unsigned ue_layer_power;
4474 proto_item *ue_layer_power_ti;
4475 ue_layer_power_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_ue_layer_power, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ue_layer_power);
4476 /* Show if maps onto a -ve number */
4477 if ((ue_layer_power >= 0x8ad0) && (ue_layer_power <= 0xffff)) {
4478 proto_item_append_text(ue_layer_power_ti, "(value %d)", -1 - (0xffff-ue_layer_power));
4479 }
4480 offset += 2;
4481 }
4482 /* padding out to 4 bytes */
4483 break;
4484 case 3:
4485 {
4486 /* ueFreqOffset */
4487 unsigned ue_freq_offset;
4488 proto_item *ue_freq_offset_ti;
4489 ue_freq_offset_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_ue_freq_offset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ue_freq_offset);
4490 /* Show if maps onto a -ve number */
4491 if ((ue_freq_offset >= 0x8ad0) && (ue_freq_offset <= 0xffff)) {
4492 proto_item_append_text(ue_freq_offset_ti, "(value %d)", -1 - (0xffff-ue_freq_offset));
4493 }
4494 offset += 2;
4495
4496 /* Reserved (16 bits) */
4497 proto_tree_add_item(mr_tree, hf_oran_reserved_16bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4498 offset += 2;
4499 break;
4500 }
4501 case 4:
4502 case 5:
4503 /* reserved (2 bits) */
4504 proto_tree_add_item(mr_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4505 /* symbolMask (14 bits) */
4506 offset = dissect_symbolmask(tvb, mr_tree, offset, NULL((void*)0), NULL((void*)0));
4507
4508 /* 2 bytes for each PRB ipnPower */
4509 for (unsigned prb=0; prb<MAX_PRBS273; prb++) {
4510 /* Skip if should not be reported */
4511 if (!prbs_for_st10_type5[prb]) {
4512 continue;
4513 }
4514 unsigned ipn_power;
4515 proto_item *ipn_power_ti;
4516 /* ipnPower (2 bytes) */
4517 ipn_power_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_ipn_power, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ipn_power);
4518 proto_item_append_text(ipn_power_ti, " (PRB %3d)", prb);
4519 /* Show if maps onto a -ve number */
4520 if ((ipn_power >= 0x8ad0) && (ipn_power <= 0xffff)) {
4521 proto_item_append_text(ipn_power_ti, " (value %d)", -1 - (0xffff-ipn_power));
4522 }
4523 offset += 2;
4524 }
4525 /* padding out to 4 bytes */
4526 break;
4527 case 6:
4528 /* antDmrsSnrVal entries */
4529 for (unsigned n=0; n < num_elements; n++) {
4530 unsigned snr_value;
4531 proto_item *snr_value_ti;
4532 /* antDmrsSnrVal (2 bytes) */
4533 snr_value_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_ant_dmrs_snr_val, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &snr_value);
4534 proto_item_append_text(snr_value_ti, " (elem %2u)", n+1);
4535 /* Show if maps onto a -ve number */
4536 if ((snr_value >= 0x8ad0) && (snr_value <= 0xffff)) {
4537 proto_item_append_text(snr_value_ti, " (value %d)", -1 - (0xffff-snr_value));
4538 }
4539 offset += 2;
4540 }
4541 break;
4542
4543 default:
4544 /* Anything else is not expected */
4545 expert_add_info_format(pinfo, meas_type_id_ti, &ei_oran_unexpected_measTypeId,
4546 "measTypeId %u (%s) not supported - only 1-6 are expected",
4547 meas_type_id,
4548 val_to_str_const(meas_type_id, meas_type_id_vals, "reserved"));
4549 break;
4550
4551 }
4552
4553 /* Pad out to next 4 bytes */
4554 offset += WS_PADDING_TO_4(offset-report_start_offset)((4U - ((offset-report_start_offset) % 4U)) % 4U);
4555
4556 /* TODO: verify dissected size of report vs meas_data_size? */
4557
4558 /* End of measurement report tree */
4559 proto_item_set_end(mr_ti, tvb, offset);
4560 } while (mf);
4561 }
4562
4563 /* Request for RRM Measurements has measurement commands after extensions */
4564 else if (sectionType == SEC_C_REQUEST_RRM_MEAS) /* Section Type 11 */
4565 {
4566 bool_Bool mf = true1;
4567 do {
4568 /* Measurement command subtree */
4569 proto_item *mc_ti = proto_tree_add_string_format(c_section_tree, hf_oran_measurement_command,
4570 tvb, offset, 8, "", "Measurement Command");
4571 proto_tree *mc_tree = proto_item_add_subtree(mc_ti, ett_oran_measurement_command);
4572
4573 /* mf (1 bit). 1st measurement command is always preset */
4574 proto_tree_add_item_ret_boolean(mc_tree, hf_oran_mf, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &mf);
4575
4576 /* measTypeId (7 bits) */
4577 uint32_t meas_type_id;
4578 proto_item *meas_type_id_ti;
4579 meas_type_id_ti = proto_tree_add_item_ret_uint(mc_tree, hf_oran_meas_type_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &meas_type_id);
4580 offset += 1;
4581
4582 proto_item *meas_command_ti;
4583 uint32_t meas_command_size;
4584
4585 switch (meas_type_id) {
4586 case 5: /* command for IpN for unallocated PRBs */
4587 /* reserved (1 byte) */
4588 proto_tree_add_item(mc_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4589 offset += 1;
4590 /* measCmdSize. Presumably number of words so in future could skip unrecognised command types.. */
4591 meas_command_ti = proto_tree_add_item_ret_uint(mc_tree, hf_oran_meas_cmd_size, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &meas_command_size);
4592 proto_item_append_text(meas_command_ti, " (%u bytes)", meas_command_size*4);
4593 offset += 2;
4594 /* reserved (2 bits) */
4595 proto_tree_add_item(mc_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4596 /* symbolMask (14 bits) */
4597 offset = dissect_symbolmask(tvb, mc_tree, offset, NULL((void*)0), NULL((void*)0));
4598 /* reserved (16 bits) */
4599 proto_tree_add_item(mc_tree, hf_oran_reserved_16bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4600 offset += 2;
4601 break;
4602
4603 default:
4604 /* Anything else is not expected */
4605 expert_add_info_format(pinfo, meas_type_id_ti, &ei_oran_unexpected_measTypeId,
4606 "measTypeId %u (%s) not supported - only 5 is expected",
4607 meas_type_id,
4608 val_to_str_const(meas_type_id, meas_type_id_vals, "reserved"));
4609 break;
4610 }
4611 proto_item_append_text(mc_ti, " (%s)", val_to_str_const(meas_type_id, meas_type_id_vals, "unknown"));
4612
4613 } while (mf);
4614 }
4615
4616 /* Set extent of overall section */
4617 proto_item_set_len(sectionHeading, offset);
4618
4619 return offset;
4620}
4621
4622/* Dissect udCompHdr (user data compression header, 7.5.2.10) */
4623/* bit_width and comp_meth are out params */
4624static int dissect_udcomphdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset,
4625 bool_Bool ignore,
4626 unsigned *bit_width, unsigned *comp_meth, proto_item **comp_meth_ti)
4627{
4628 /* Subtree */
4629 proto_item *udcomphdr_ti = proto_tree_add_string_format(tree, hf_oran_udCompHdr,
4630 tvb, offset, 1, "",
4631 "udCompHdr");
4632 proto_tree *udcomphdr_tree = proto_item_add_subtree(udcomphdr_ti, ett_oran_udcomphdr);
4633
4634 /* udIqWidth */
4635 uint32_t hdr_iq_width;
4636 proto_item *iq_width_item = proto_tree_add_item_ret_uint(udcomphdr_tree, hf_oran_udCompHdrIqWidth , tvb, offset, 1, ENC_NA0x00000000, &hdr_iq_width);
4637 *bit_width = (hdr_iq_width) ? hdr_iq_width : 16;
4638 proto_item_append_text(iq_width_item, " (%u bits)", *bit_width);
4639
4640 /* udCompMeth */
4641 uint32_t ud_comp_meth;
4642 *comp_meth_ti = proto_tree_add_item_ret_uint(udcomphdr_tree, hf_oran_udCompHdrMeth, tvb, offset, 1, ENC_NA0x00000000, &ud_comp_meth);
4643 if (comp_meth) {
4644 *comp_meth = ud_comp_meth;
4645 }
4646
4647 /* Summary */
4648 if (!ignore) {
4649 proto_item_append_text(udcomphdr_ti, " (IqWidth=%u, udCompMeth=%s)",
4650 *bit_width, rval_to_str_const(ud_comp_meth, ud_comp_header_meth, "Unknown"));
4651 }
4652 else {
4653 proto_item_append_text(udcomphdr_ti, " (ignored)");
4654 if (hdr_iq_width || ud_comp_meth) {
4655 expert_add_info_format(pinfo, udcomphdr_ti, &ei_oran_udpcomphdr_should_be_zero,
4656 "udCompHdr in C-Plane for DL should be 0 - found 0x%02x",
4657 tvb_get_uint8(tvb, offset));
4658 }
4659
4660 }
4661 return offset+1;
4662}
4663
4664/* Dissect udCompParam (user data compression parameter, 8.3.3.15) */
4665/* bit_width and comp_meth are out params */
4666static int dissect_udcompparam(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree, unsigned offset,
4667 unsigned comp_meth,
4668 uint32_t *exponent, uint16_t *sReSMask,
4669 bool_Bool for_sinr)
4670{
4671 if (for_sinr && (comp_meth != COMP_BLOCK_FP1)) {
4672 /* sinrCompParam only present when bfp is used */
4673 return offset;
4674 }
4675
4676 if (comp_meth == COMP_NONE0 ||
4677 comp_meth == COMP_MODULATION4 ||
4678 comp_meth == MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8) {
4679
4680 /* Not even creating a subtree for udCompMeth 0, 4, 8 */
4681 return offset;
4682 }
4683
4684 /* Subtree */
4685 unsigned start_offset = offset;
4686 proto_item *udcompparam_ti = proto_tree_add_string_format(tree, hf_oran_udCompParam,
4687 tvb, offset, 1, "",
4688 (for_sinr) ? "sinrCompParam" : "udCompParam");
4689 proto_tree *udcompparam_tree = proto_item_add_subtree(udcompparam_ti, ett_oran_udcompparam);
4690
4691 /* Show comp_meth as a generated field */
4692 proto_item *meth_ti = proto_tree_add_uint(udcompparam_tree, hf_oran_udCompHdrMeth_pref, tvb, 0, 0, comp_meth);
4693 proto_item_set_generated(meth_ti);
4694
4695 uint32_t param_exponent;
4696 uint64_t param_sresmask;
4697
4698 static int * const sres_mask_flags[] = {
4699 &hf_oran_sReSMask_re12,
4700 &hf_oran_sReSMask_re11,
4701 &hf_oran_sReSMask_re10,
4702 &hf_oran_sReSMask_re9,
4703 &hf_oran_sReSMask_re8,
4704 &hf_oran_sReSMask_re7,
4705 &hf_oran_sReSMask_re6,
4706 &hf_oran_sReSMask_re5,
4707 &hf_oran_sReSMask_re4,
4708 &hf_oran_sReSMask_re3,
4709 &hf_oran_sReSMask_re2,
4710 &hf_oran_sReSMask_re1,
4711 NULL((void*)0)
4712 };
4713
4714 switch (comp_meth) {
4715 case COMP_BLOCK_FP1: /* 1 */
4716 case BFP_AND_SELECTIVE_RE_WITH_MASKS7: /* 7 */
4717 /* reserved (4 bits) */
4718 proto_tree_add_item(udcompparam_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_NA0x00000000);
4719 /* exponent (4 bits) */
4720 proto_tree_add_item_ret_uint(udcompparam_tree, hf_oran_exponent,
4721 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &param_exponent);
4722 *exponent = param_exponent;
4723 proto_item_append_text(udcompparam_ti, " (Exponent=%u)", param_exponent);
4724 offset += 1;
4725 break;
4726
4727 case COMP_BLOCK_SCALE2: /* 2 */
4728 /* Separate into integer and fractional bits? */
4729 proto_tree_add_item(udcompparam_tree, hf_oran_blockScaler,
4730 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4731 offset++;
4732 break;
4733
4734 case COMP_U_LAW3: /* 3 */
4735 /* compBitWidth, compShift */
4736 proto_tree_add_item(udcompparam_tree, hf_oran_compBitWidth,
4737 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4738 proto_tree_add_item(udcompparam_tree, hf_oran_compShift,
4739 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4740 offset += 1;
4741 break;
4742
4743 case BFP_AND_SELECTIVE_RE5: /* 5 */
4744 {
4745 /* sReSMask (exponent in middle!) */
4746 proto_item *sresmask_ti;
4747 sresmask_ti = proto_tree_add_bitmask_ret_uint64(udcompparam_tree, tvb, offset,
4748 hf_oran_sReSMask,
4749 ett_oran_sresmask,
4750 sres_mask_flags,
4751 ENC_NA0x00000000,
4752 &param_sresmask);
4753
4754 /* Get rid of exponent-shaped gap */
4755 param_sresmask = ((param_sresmask >> 4) & 0x0f00) | (param_sresmask & 0xff);
4756 unsigned res = 0;
4757 for (unsigned n=0; n < 12; n++) {
4758 if ((param_sresmask >> n) & 0x1) {
4759 res++;
4760 }
4761 }
4762 proto_item_append_text(sresmask_ti, " (%2u REs)", res);
4763
4764 /* exponent */
4765 proto_tree_add_item_ret_uint(udcompparam_tree, hf_oran_exponent,
4766 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &param_exponent);
4767 *sReSMask = (uint16_t)param_sresmask;
4768 *exponent = param_exponent;
4769
4770 proto_item_append_text(udcompparam_ti, " (exponent=%u, %u REs)", *exponent, res);
4771 offset += 2;
4772 break;
4773 }
4774
4775 case MOD_COMPR_AND_SELECTIVE_RE6: /* 6 */
4776 {
4777 /* sReSMask (exponent in middle!) */
4778 proto_item *sresmask_ti;
4779
4780 sresmask_ti = proto_tree_add_bitmask_ret_uint64(udcompparam_tree, tvb, offset,
4781 hf_oran_sReSMask,
4782 ett_oran_sresmask,
4783 sres_mask_flags,
4784 ENC_NA0x00000000,
4785 &param_sresmask);
4786
4787 /* Get rid of reserved-shaped gap */
4788 param_sresmask = ((param_sresmask >> 4) & 0x0f00) | (param_sresmask & 0xff);
4789 unsigned res = 0;
4790 for (unsigned n=0; n < 12; n++) {
4791 if ((param_sresmask >> n) & 0x1) {
4792 res++;
4793 }
4794 }
4795 proto_item_append_text(sresmask_ti, " (%u REs)", res);
4796
4797 /* reserved (4 bits) */
4798 proto_tree_add_item(udcompparam_tree, hf_oran_reserved_last_4bits,
4799 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4800 *sReSMask = (uint16_t)param_sresmask;
4801
4802 proto_item_append_text(udcompparam_ti, " (%u REs)", res);
4803 offset += 2;
4804 break;
4805 }
4806
4807 default:
4808 /* reserved (set to all zeros), but how many bytes?? */
4809 break;
4810 }
4811
4812 proto_item_set_len(udcompparam_ti, offset-start_offset);
4813 return offset;
4814}
4815
4816
4817/* Dissect ciCompHdr (channel information compression header, 7.5.2.15) */
4818/* bit_width and comp_meth are out params */
4819static int dissect_cicomphdr(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree, unsigned offset,
4820 unsigned *bit_width, unsigned *comp_meth, uint8_t *comp_opt)
4821{
4822 /* Subtree */
4823 proto_item *cicomphdr_ti = proto_tree_add_string_format(tree, hf_oran_ciCompHdr,
4824 tvb, offset, 1, "",
4825 "ciCompHdr");
4826 proto_tree *cicomphdr_tree = proto_item_add_subtree(cicomphdr_ti, ett_oran_cicomphdr);
4827
4828 /* ciIqWidth */
4829 uint32_t hdr_iq_width;
4830 proto_item *iq_width_item = proto_tree_add_item_ret_uint(cicomphdr_tree, hf_oran_ciCompHdrIqWidth , tvb, offset, 1, ENC_NA0x00000000, &hdr_iq_width);
4831 hdr_iq_width = (hdr_iq_width) ? hdr_iq_width : 16;
4832 if (bit_width) {
4833 *bit_width = hdr_iq_width;
4834 }
4835 proto_item_append_text(iq_width_item, " (%u bits)", hdr_iq_width);
4836
4837 /* ciCompMeth */
4838 uint32_t ci_comp_meth;
4839 proto_tree_add_item_ret_uint(cicomphdr_tree, hf_oran_ciCompHdrMeth, tvb, offset, 1, ENC_NA0x00000000, &ci_comp_meth);
4840 if (comp_meth) {
4841 *comp_meth = ci_comp_meth;
4842 }
4843
4844 /* ciCompOpt */
4845 uint32_t opt;
4846 proto_tree_add_item_ret_uint(cicomphdr_tree, hf_oran_ciCompOpt, tvb, offset, 1, ENC_NA0x00000000, &opt);
4847 *comp_opt = opt;
4848 offset += 1;
4849
4850 /* Summary */
4851 proto_item_append_text(cicomphdr_ti, " (IqWidth=%u, ciCompMeth=%s, ciCompOpt=%s)",
4852 hdr_iq_width,
4853 rval_to_str_const(ci_comp_meth, ud_comp_header_meth, "Unknown"),
4854 (*comp_opt) ? "compression per PRB" : "compression per UE");
4855 return offset;
4856}
4857
4858static void dissect_payload_version(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, unsigned offset)
4859{
4860 unsigned version;
4861 proto_item *ti = proto_tree_add_item_ret_uint(tree, hf_oran_payload_version, tvb, offset, 1, ENC_NA0x00000000, &version);
4862 if (version != 1) {
4863 expert_add_info_format(pinfo, ti, &ei_oran_version_unsupported,
4864 "PayloadVersion %u not supported by dissector (only 1 is known)",
4865 version);
4866 /* TODO: should throw an exception? */
4867 }
4868}
4869
4870static void show_link_to_acknack_request(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
4871 ack_nack_request_t *request)
4872{
4873 /* Request frame */
4874 proto_item *ti = proto_tree_add_uint(tree, hf_oran_acknack_request_frame,
4875 tvb, 0, 0, request->request_frame_number);
4876 PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
4877
4878 /* Work out gap between frames (in ms) */
4879 int seconds_between_packets = (int)
4880 (pinfo->abs_ts.secs - request->request_frame_time.secs);
4881 int nseconds_between_packets =
4882 pinfo->abs_ts.nsecs - request->request_frame_time.nsecs;
4883
4884 int total_gap = (seconds_between_packets*1000) +
4885 ((nseconds_between_packets+500000) / 1000000);
4886
4887 ti = proto_tree_add_uint(tree, hf_oran_acknack_request_time,
4888 tvb, 0, 0, total_gap);
4889 PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
4890
4891 /* Type of request */
4892 ti = proto_tree_add_uint(tree, hf_oran_acknack_request_type,
4893 tvb, 0, 0, request->requestType);
4894 PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
4895}
4896
4897static void show_link_to_acknack_response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
4898 ack_nack_request_t *response)
4899{
4900 if (response->response_frame_number == 0) {
4901 /* Requests may not get a response, and can't always tell when to expect one */
4902 return;
4903 }
4904
4905 /* Response frame */
4906 proto_item *ti = proto_tree_add_uint(tree, hf_oran_acknack_response_frame,
4907 tvb, 0, 0, response->response_frame_number);
4908 PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
4909
4910 /* Work out gap between frames (in ms) */
4911 int seconds_between_packets = (int)
4912 (response->response_frame_time.secs - pinfo->abs_ts.secs);
4913 int nseconds_between_packets =
4914 response->response_frame_time.nsecs - pinfo->abs_ts.nsecs;
4915
4916 int total_gap = (seconds_between_packets*1000) +
4917 ((nseconds_between_packets+500000) / 1000000);
4918
4919 ti = proto_tree_add_uint(tree, hf_oran_acknack_response_time,
4920 tvb, 0, 0, total_gap);
4921 PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
4922}
4923
4924
4925
4926/* Control plane dissector (section 7). */
4927static int dissect_oran_c(tvbuff_t *tvb, packet_info *pinfo,
4928 proto_tree *tree, oran_tap_info *tap_info, void *data _U___attribute__((unused)))
4929{
4930 /* Hidden filter for plane */
4931 proto_item *plane_ti = proto_tree_add_item(tree, hf_oran_cplane, tvb, 0, 0, ENC_NA0x00000000);
4932 PROTO_ITEM_SET_HIDDEN(plane_ti)proto_item_set_hidden((plane_ti));
4933
4934 /* Set up structures needed to add the protocol subtree and manage it */
4935 unsigned offset = 0;
4936
4937 col_set_str(pinfo->cinfo, COL_PROTOCOL, "O-RAN-FH-C");
4938 col_set_str(pinfo->cinfo, COL_INFO, "C-Plane");
4939
4940 tap_info->userplane = false0;
4941
4942 /* Create display subtree for the protocol */
4943 proto_item *protocol_item = proto_tree_add_item(tree, proto_oran, tvb, 0, -1, ENC_NA0x00000000);
4944 proto_item_append_text(protocol_item, "-C");
4945 proto_tree *oran_tree = proto_item_add_subtree(protocol_item, ett_oran);
4946
4947 /* ecpriRtcid (eAxC ID) */
4948 uint16_t eAxC;
4949 addPcOrRtcid(tvb, oran_tree, &offset, hf_oran_ecpri_rtcid, &eAxC);
4950 tap_info->eaxc = eAxC;
4951
4952 /* Look up any existing conversation state for eAxC+plane */
4953 uint32_t key = make_flow_key(pinfo, eAxC, ORAN_C_PLANE0, false0);
4954 flow_state_t* state = (flow_state_t*)wmem_tree_lookup32(flow_states_table, key);
4955
4956 /* Message identifier */
4957 uint8_t seq_id;
4958 proto_item *seq_id_ti;
4959 offset = addSeqid(tvb, oran_tree, offset, ORAN_C_PLANE0, &seq_id, &seq_id_ti, pinfo);
4960
4961 /* Section common subtree */
4962 int section_tree_offset = offset;
4963 proto_item *sectionHeading = proto_tree_add_string_format(oran_tree, hf_oran_c_section_common,
4964 tvb, offset, 0, "", "C-Plane Section Type ");
4965 proto_tree *section_tree = proto_item_add_subtree(sectionHeading, ett_oran_c_section_common);
4966
4967 /* Peek ahead at the section type */
4968 uint32_t sectionType = 0;
4969 sectionType = tvb_get_uint8(tvb, offset+5);
4970
4971 uint32_t scs = 0;
4972 proto_item *scs_ti = NULL((void*)0);
4973
4974 /* dataDirection */
4975 uint32_t direction = 0;
4976 proto_item *datadir_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_data_direction, tvb, offset, 1, ENC_NA0x00000000, &direction);
4977 tap_info->uplink = (direction==0);
4978
4979 /* Update/report status of conversation */
4980 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
4981
4982 if (state == NULL((void*)0)) {
4983 /* Allocate new state */
4984 state = wmem_new0(wmem_file_scope(), flow_state_t)((flow_state_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_state_t
)))
;
4985 state->ack_nack_requests = wmem_tree_new(wmem_epan_scope());
4986 wmem_tree_insert32(flow_states_table, key, state);
4987 }
4988
4989 /* Check sequence analysis status */
4990 if (state->last_frame_seen[direction] && (seq_id != state->next_expected_sequence_number[direction])) {
4991 /* Store this result */
4992 flow_result_t *result = wmem_new0(wmem_file_scope(), flow_result_t)((flow_result_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_result_t
)))
;
4993 result->unexpected_seq_number = true1;
4994 result->expected_sequence_number = state->next_expected_sequence_number[direction];
4995 result->previous_frame = state->last_frame[direction];
4996 wmem_tree_insert32(flow_results_table, pinfo->num, result);
4997 }
4998 /* Update conversation info */
4999 state->last_frame[direction] = pinfo->num;
5000 state->last_frame_seen[direction] = true1;
5001 state->next_expected_sequence_number[direction] = (seq_id+1) % 256;
5002 }
5003
5004 /* Show any issues associated with this frame number */
5005 flow_result_t *result = wmem_tree_lookup32(flow_results_table, pinfo->num);
5006 if (result!=NULL((void*)0) && result->unexpected_seq_number) {
5007 expert_add_info_format(pinfo, seq_id_ti,
5008 (direction == DIR_UPLINK0) ?
5009 &ei_oran_cplane_unexpected_sequence_number_ul :
5010 &ei_oran_cplane_unexpected_sequence_number_dl,
5011 "Sequence number %u expected, but got %u",
5012 result->expected_sequence_number, seq_id);
5013
5014 /* Update tap info */
5015 uint32_t missing_sns = (256 + seq_id - result->expected_sequence_number) % 256;
5016 /* Don't get confused by being slightly out of order.. */
5017 if (missing_sns < 128) {
5018 tap_info->missing_sns = missing_sns;
5019 }
5020 else {
5021 tap_info->missing_sns = 0;
5022 }
5023
5024 /* TODO: could add previous/next frames (in seqId tree?) ? */
5025 }
5026
5027 /* payloadVersion */
5028 dissect_payload_version(section_tree, tvb, pinfo, offset);
5029
5030 /* filterIndex */
5031 if (sectionType == SEC_C_SLOT_CONTROL || sectionType == SEC_C_ACK_NACK_FEEDBACK) {
5032 /* scs (for ST4 and ST8) */
5033 scs_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_frameStructure_subcarrier_spacing, tvb, offset, 1, ENC_NA0x00000000, &scs);
5034 }
5035 else if (sectionType == SEC_C_RRM_MEAS_REPORTS || sectionType == SEC_C_REQUEST_RRM_MEAS) {
5036 /* reserved (4 bits) */
5037 proto_tree_add_item(section_tree, hf_oran_reserved_last_4bits, tvb, offset, 1, ENC_NA0x00000000);
5038 }
5039 else if (sectionType != SEC_C_LAA) {
5040 /* filterIndex (most common case) */
5041 proto_tree_add_item(section_tree, hf_oran_filter_index, tvb, offset, 1, ENC_NA0x00000000);
5042 }
5043 offset += 1;
5044
5045 unsigned ref_a_offset = offset;
5046 /* frameId */
5047 uint32_t frameId = 0;
5048 proto_tree_add_item_ret_uint(section_tree, hf_oran_frame_id, tvb, offset, 1, ENC_NA0x00000000, &frameId);
5049 offset += 1;
5050
5051 /* subframeId */
5052 uint32_t subframeId = 0;
5053 proto_tree_add_item_ret_uint(section_tree, hf_oran_subframe_id, tvb, offset, 1, ENC_NA0x00000000, &subframeId);
5054 /* slotId */
5055 uint32_t slotId = 0;
5056 proto_tree_add_item_ret_uint(section_tree, hf_oran_slot_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &slotId);
5057 tap_info->slot = slotId;
5058 offset++;
5059
5060 /* startSymbolId */
5061 uint32_t startSymbolId = 0;
5062 proto_item *ssid_ti = NULL((void*)0);
5063 if ((sectionType == SEC_C_ACK_NACK_FEEDBACK) || /* Section Type 8 */
5064 (sectionType == SEC_C_SINR_REPORTING)) { /* Section Type 9 */
5065 /* symbolId */
5066 proto_tree_add_item_ret_uint(section_tree, hf_oran_symbolId, tvb, offset, 1, ENC_NA0x00000000, &startSymbolId);
5067 }
5068 else if (sectionType != SEC_C_LAA) {
5069 /* startSymbolId is in most section types */
5070 ssid_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_start_symbol_id, tvb, offset, 1, ENC_NA0x00000000, &startSymbolId);
5071 if (startSymbolId && (sectionType == SEC_C_RRM_MEAS_REPORTS)) { /* Section Type 10 */
5072 proto_item_append_text(ssid_ti, " (should be 0 for ST10!)");
5073 expert_add_info_format(pinfo, ssid_ti, &ei_oran_st10_startsymbolid_not_0,
5074 "startSymbolId should be 0 for ST10 - found %u", startSymbolId);
5075 }
5076 }
5077 else {
5078 /* reserved (6 bits) */
5079 proto_tree_add_item(section_tree, hf_oran_reserved_last_6bits, tvb, offset, 1, ENC_NA0x00000000);
5080 }
5081 offset++;
5082
5083 char id[16];
5084 snprintf(id, 16, "%d-%d-%d-%d", frameId, subframeId, slotId, startSymbolId);
5085 proto_item *pi = proto_tree_add_string(section_tree, hf_oran_refa, tvb, ref_a_offset, 3, id);
5086 proto_item_set_generated(pi);
5087
5088 uint32_t cmd_scope = 0;
5089 bool_Bool st8_ready = false0;
5090
5091 /* numberOfSections (or whatever section has instead) */
5092 uint32_t nSections = 0;
5093 if (sectionType == SEC_C_SLOT_CONTROL) { /* Section Type 4 */
5094 /* Slot Control has these fields instead */
5095 /* reserved (4 bits) */
5096 proto_tree_add_item(section_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_NA0x00000000);
5097 /* cmdScope (4 bits) */
5098 proto_tree_add_item_ret_uint(section_tree, hf_oran_cmd_scope, tvb, offset, 1, ENC_NA0x00000000, &cmd_scope);
5099 }
5100 else if (sectionType == SEC_C_ACK_NACK_FEEDBACK) { /* Section Type 8 */
5101 /* reserved (7 bits) */
5102 proto_tree_add_item(section_tree, hf_oran_reserved_7bits, tvb, offset, 1, ENC_NA0x00000000);
5103 /* ready (1 bit) */
5104 /* TODO: when set, ready in slotId+1.. */
5105 proto_tree_add_item_ret_boolean(section_tree, hf_oran_ready, tvb, offset, 1, ENC_NA0x00000000, &st8_ready);
5106 if (!st8_ready) {
5107 /* SCS value is ignored, and may be set to any value by O-RU */
5108 proto_item_append_text(scs_ti, " (ignored)");
5109 }
5110 }
5111 else if (sectionType != SEC_C_LAA) {
5112 proto_tree_add_item_ret_uint(section_tree, hf_oran_numberOfSections, tvb, offset, 1, ENC_NA0x00000000, &nSections);
5113 }
5114 else {
5115 proto_tree_add_item(section_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_NA0x00000000);
5116 }
5117 offset++;
5118
5119 /* sectionType */
5120 proto_tree_add_item_ret_uint(section_tree, hf_oran_sectionType, tvb, offset, 1, ENC_NA0x00000000, &sectionType);
5121 offset += 1;
5122
5123 /* Check that dataDirection is consistent with section type */
5124 if (sectionType == SEC_C_SINR_REPORTING && direction != 0) { /* Section Type 9 */
5125 expert_add_info(pinfo, datadir_ti, &ei_oran_st9_not_ul);
5126 }
5127 if (sectionType == SEC_C_RRM_MEAS_REPORTS && direction != 0) { /* Section Type 10 */
5128 expert_add_info(pinfo, datadir_ti, &ei_oran_st10_not_ul);
5129 }
5130
5131 /* Note this section type in stats */
5132 if (sectionType < SEC_C_MAX_INDEX) {
5133 tap_info->section_types[sectionType] = true1;
5134 }
5135
5136 /* Section-type-specific fields following common header (white entries in Section Type diagrams) */
5137 unsigned bit_width = 0;
5138 int comp_meth = 0;
5139 proto_item *comp_meth_ti;
5140 unsigned ci_comp_method = 0;
5141 uint8_t ci_comp_opt = 0;
5142
5143 uint32_t num_ues = 0;
5144 uint32_t number_of_acks = 0, number_of_nacks = 0;
5145
5146 uint32_t num_sinr_per_prb = 0;
5147
5148 switch (sectionType) {
5149 case SEC_C_UNUSED_RB: /* Section Type 0 */
5150 /* timeOffset */
5151 proto_tree_add_item(section_tree, hf_oran_timeOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5152 offset += 2;
5153 /* frameStructure */
5154 offset = dissect_frame_structure(section_tree, tvb, offset,
5155 subframeId, slotId);
5156
5157 /* cpLength */
5158 proto_tree_add_item(section_tree, hf_oran_cpLength, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5159 offset += 2;
5160 /* reserved */
5161 proto_tree_add_item(section_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_NA0x00000000);
5162 offset += 1;
5163 break;
5164
5165 case SEC_C_NORMAL: /* Section Type 1 */
5166 case SEC_C_UE_SCHED: /* Section Type 5 */
5167 /* udCompHdr */
5168 offset = dissect_udcomphdr(tvb, pinfo, section_tree, offset,
5169 (direction==1), /* ignore for DL */
5170 &bit_width, &comp_meth, &comp_meth_ti);
5171 /* reserved */
5172 proto_tree_add_item(section_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_NA0x00000000);
5173 offset += 1;
5174 break;
5175
5176 case SEC_C_SLOT_CONTROL: /* Section Type 4 */
5177 break;
5178
5179 case SEC_C_PRACH: /* Section Type 3 */
5180 /* timeOffset */
5181 proto_tree_add_item(section_tree, hf_oran_timeOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5182 offset += 2;
5183 /* frameStructure */
5184 offset = dissect_frame_structure(section_tree, tvb, offset,
5185 subframeId, slotId);
5186 /* cpLength */
5187 proto_tree_add_item(section_tree, hf_oran_cpLength, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5188 offset += 2;
5189 /* udCompHdr */
5190 offset = dissect_udcomphdr(tvb, pinfo, section_tree, offset,
5191 (direction==1), /* ignore for DL */
5192 &bit_width, &comp_meth, &comp_meth_ti);
5193 break;
5194
5195 case SEC_C_CH_INFO: /* Section Type 6 */
5196 /* numberOfUEs */
5197 proto_tree_add_item_ret_uint(section_tree, hf_oran_numberOfUEs, tvb, offset, 1, ENC_NA0x00000000, &num_ues);
5198 offset += 1;
5199 /* ciCompHdr (was reserved) */
5200 offset = dissect_cicomphdr(tvb, pinfo, section_tree, offset, &bit_width, &ci_comp_method, &ci_comp_opt);
5201
5202 /* Number of sections may not be filled in (at all, or correctly), so set to the number of UEs.
5203 The data entries are per-UE... they don't have a sectionID, but they could have section extensions... */
5204 if (nSections == 0 || num_ues > nSections) {
5205 nSections = num_ues;
5206 }
5207 break;
5208
5209 case SEC_C_RSVD2:
5210 break;
5211
5212 case SEC_C_LAA: /* Section Type 7 */
5213 proto_tree_add_item(section_tree, hf_oran_reserved_16bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5214 offset += 2;
5215 break;
5216
5217 case SEC_C_ACK_NACK_FEEDBACK: /* Section Type 8 */
5218 /* numberOfAcks (1 byte) */
5219 proto_tree_add_item_ret_uint(section_tree, hf_oran_number_of_acks, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &number_of_acks);
5220 offset += 1;
5221 /* numberOfNacks (1 byte) */
5222 proto_tree_add_item_ret_uint(section_tree, hf_oran_number_of_nacks, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &number_of_nacks);
5223 offset += 1;
5224
5225 /* Show ACKs and NACKs. For both, try to link back to request. */
5226 for (unsigned int n=1; n <= number_of_acks; n++) {
5227 uint32_t ackid;
5228 proto_item *ack_ti;
5229 ack_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_ackid, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ackid);
5230 offset += 2;
5231
5232 /* Look up request table in state (which really should be set by now, but test anyway). */
5233 if (state && state->ack_nack_requests) {
5234 ack_nack_request_t *request = wmem_tree_lookup32(state->ack_nack_requests, ackid);
5235 if (request != NULL((void*)0)) {
5236 /* On first pass, update with this response */
5237 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
5238 request->response_frame_number = pinfo->num;
5239 request->response_frame_time = pinfo->abs_ts;
5240 }
5241
5242 /* Show request details */
5243 show_link_to_acknack_request(section_tree, tvb, pinfo, request);
5244 }
5245 else {
5246 /* Request not found */
5247 expert_add_info_format(pinfo, ack_ti, &ei_oran_acknack_no_request,
5248 "Response for ackId=%u received, but no request found",
5249 ackid);
5250 }
5251 }
5252 }
5253 for (unsigned int m=1; m <= number_of_nacks; m++) {
5254 uint32_t nackid;
5255 proto_item *nack_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_nackid, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &nackid);
5256 offset += 2;
5257
5258 expert_add_info_format(pinfo, nack_ti, &ei_oran_st8_nackid,
5259 "Received Nack for ackNackId=%u",
5260 nackid);
5261
5262 /* Look up request table in state. */
5263 if (state && state->ack_nack_requests) {
5264 ack_nack_request_t *request = wmem_tree_lookup32(state->ack_nack_requests, nackid);
5265 if (request) {
5266 /* On first pass, update with this response */
5267 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
5268 request->response_frame_number = pinfo->num;
5269 request->response_frame_time = pinfo->abs_ts;
5270 }
5271
5272 /* Show request details */
5273 show_link_to_acknack_request(section_tree, tvb, pinfo, request);
5274 }
5275 else {
5276 /* Request not found */
5277 expert_add_info_format(pinfo, nack_ti, &ei_oran_acknack_no_request,
5278 "Response for nackId=%u received, but no request found",
5279 nackid);
5280 }
5281 }
5282 }
5283 break;
5284
5285 case SEC_C_SINR_REPORTING: /* Section Type 9 */
5286 {
5287 /* numSinrPerPrb (3 bits) */
5288 proto_item *nspp_ti;
5289 nspp_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_num_sinr_per_prb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_sinr_per_prb);
5290 switch (num_sinr_per_prb) {
5291 case 0:
5292 num_sinr_per_prb = 1; break;
5293 case 1:
5294 num_sinr_per_prb = 2; break;
5295 case 2:
5296 num_sinr_per_prb = 3; break;
5297 case 3:
5298 num_sinr_per_prb = 4; break;
5299 case 4:
5300 num_sinr_per_prb = 6; break;
5301 case 5:
5302 num_sinr_per_prb = 12; break;
5303
5304 default:
5305 proto_item_append_text(nspp_ti, " (invalid)");
5306 num_sinr_per_prb = 1;
5307 expert_add_info_format(pinfo, nspp_ti, &ei_oran_num_sinr_per_prb_unknown,
5308 "Invalid numSinrPerPrb value (%u)",
5309 num_sinr_per_prb);
5310 }
5311
5312 /* reserved (13 bits) */
5313 proto_tree_add_item(section_tree, hf_oran_reserved_last_5bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5314 offset += 1;
5315 proto_tree_add_item(section_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5316 offset += 1;
5317 break;
5318 }
5319
5320 case SEC_C_RRM_MEAS_REPORTS: /* Section Type 10 */
5321 case SEC_C_REQUEST_RRM_MEAS: /* Section Type 11 */
5322 /* reserved (16 bits) */
5323 proto_tree_add_item(section_tree, hf_oran_reserved_16bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5324 offset += 2;
5325 break;
5326 };
5327
5328 /* Update udCompHdr details in state for UL U-Plane */
5329 if (state && direction==0) {
5330 switch (sectionType) {
5331 case SEC_C_NORMAL: /* Section Type 1 */
5332 case SEC_C_PRACH: /* Section Type 3 */
5333 case SEC_C_UE_SCHED: /* Section Type 5 */
5334 state->ul_ud_comp_hdr_set = true1;
5335 state->ul_ud_comp_hdr_bit_width = bit_width;
5336 state->ul_ud_comp_hdr_compression = comp_meth;
5337 state->ul_ud_comp_hdr_frame = pinfo->num;
5338 break;
5339 default:
5340 break;
5341 }
5342 }
5343
5344
5345 proto_item_append_text(sectionHeading, "%d, %s, Frame: %d, Subframe: %d, Slot: %d, StartSymbol: %d",
5346 sectionType, val_to_str_const(direction, data_direction_vals, "Unknown"),
5347 frameId, subframeId, slotId, startSymbolId);
5348 write_pdu_label_and_info(protocol_item, NULL((void*)0), pinfo, ", Type: %2d %s", sectionType,
5349 rval_to_str_const(sectionType, section_types_short, "Unknown"));
5350
5351 /* Set actual length of C-Plane section header */
5352 proto_item_set_len(section_tree, offset - section_tree_offset);
5353
5354 if (sectionType == SEC_C_ACK_NACK_FEEDBACK) {
5355 write_pdu_label_and_info(oran_tree, section_tree, pinfo,
5356 (st8_ready) ? " (Ready)" : " (ACK)");
5357 }
5358
5359
5360 /* Section type 4 doesn't have normal sections, so deal with here before normal sections */
5361 if (sectionType == SEC_C_SLOT_CONTROL) {
5362 /* numberOfST4Cmds */
5363 uint32_t no_st4_cmds, st4_cmd_len, num_slots, ack_nack_req_id, st4_cmd_type;
5364 proto_item *no_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_number_of_st4_cmds,
5365 tvb, offset, 1, ENC_NA0x00000000, &no_st4_cmds);
5366 if (no_st4_cmds == 0) {
5367 expert_add_info_format(pinfo, no_ti, &ei_oran_st4_no_cmds,
5368 "Not valid for ST4 to carry no commands");
5369 }
5370 offset += 1;
5371
5372 /* reserved (1 byte) */
5373 proto_tree_add_item(section_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5374 offset += 1;
5375
5376 /* Loop over commands. Each has 8-byte common header, followed by cmd-specific payload */
5377 proto_item *len_ti;
5378 for (uint32_t n=0; n < no_st4_cmds; n++) {
5379 /* Table 7.4.6-2: Section Type 4 Command common header format */
5380 proto_item *hdr_ti = proto_tree_add_string_format(section_tree, hf_oran_st4_cmd_header,
5381 tvb, offset, 8, "",
5382 "Type 4 Command common header");
5383 proto_tree *hdr_tree = proto_item_add_subtree(hdr_ti, ett_oran_st4_cmd_header);
5384
5385 /* st4CmdType */
5386 proto_tree_add_item_ret_uint(hdr_tree, hf_oran_st4_cmd_type, tvb, offset, 1, ENC_NA0x00000000, &st4_cmd_type);
5387 offset += 1;
5388
5389 /* st4CmdLen */
5390 len_ti = proto_tree_add_item_ret_uint(hdr_tree, hf_oran_st4_cmd_len, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &st4_cmd_len);
5391 if (st4_cmd_len == 0) {
5392 /* Meaning of 0 not yet defined (v15.00) */
5393 proto_item_append_text(len_ti, " (reserved)");
5394 expert_add_info(pinfo, len_ti, &ei_oran_st4_zero_len_cmd);
5395 }
5396 else {
5397 proto_item_append_text(len_ti, " (%u bytes)", st4_cmd_len*4);
5398 }
5399 offset += 2;
5400
5401 /* numSlots */
5402 proto_item *slots_ti = proto_tree_add_item_ret_uint(hdr_tree, hf_oran_st4_cmd_num_slots, tvb, offset, 1, ENC_NA0x00000000, &num_slots);
5403 if (num_slots == 0) {
5404 proto_item_append_text(slots_ti, " (until changed)");
5405 }
5406 offset += 1;
5407
5408 /* ackNackReqId */
5409 proto_item *ack_nack_req_id_ti;
5410 ack_nack_req_id_ti = proto_tree_add_item_ret_uint(hdr_tree, hf_oran_st4_cmd_ack_nack_req_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ack_nack_req_id);
5411 offset += 2;
5412 if (ack_nack_req_id == 0) {
5413 proto_item_append_text(ack_nack_req_id_ti, " (no Section type 8 response expected)");
5414 }
5415
5416 /* reserved (16 bits) */
5417 proto_tree_add_item(hdr_tree, hf_oran_reserved_16bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5418 offset += 2;
5419
5420 /* Set common header summary */
5421 proto_item_append_text(hdr_ti, " (cmd=%s, len=%u, slots=%u, ackNackReqId=%u)",
5422 rval_to_str_const(st4_cmd_type, st4_cmd_type_vals, "Unknown"),
5423 st4_cmd_len, num_slots, ack_nack_req_id);
5424
5425 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
5426 rval_to_str_const(st4_cmd_type, st4_cmd_type_vals, "Unknown"));
5427
5428
5429 /* Subtree for this command body */
5430 proto_item *command_ti = proto_tree_add_string_format(section_tree, hf_oran_st4_cmd,
5431 tvb, offset, 0, "",
5432 "Type 4 Command (%s)", rval_to_str_const(st4_cmd_type, st4_cmd_type_vals, "Unknown"));
5433 proto_tree *command_tree = proto_item_add_subtree(command_ti, ett_oran_st4_cmd);
5434
5435 unsigned command_start_offset = offset;
5436
5437 /* Check fields compatible with chosen command. */
5438 if (st4_cmd_type==1) {
5439 if (num_slots != 0) {
5440 /* "the value of numSlots should be set to zero for this command type" */
5441 expert_add_info_format(pinfo, slots_ti, &ei_oran_numslots_not_zero,
5442 "numSlots should be zero for ST4 command 1 - found %u",
5443 num_slots);
5444 }
5445 }
5446
5447 if (st4_cmd_type==3 || st4_cmd_type==4) {
5448 if (startSymbolId != 0) {
5449 /* "expected reception window for the commands is the symbol zero reception window" */
5450 expert_add_info_format(pinfo, ssid_ti, &ei_oran_start_symbol_id_not_zero,
5451 "startSymbolId should be zero for ST4 commands 3&4 - found %u",
5452 startSymbolId);
5453 }
5454 }
5455
5456 /* Add format for this command */
5457 switch (st4_cmd_type) {
5458 case 1: /* TIME_DOMAIN_BEAM_CONFIG */
5459 {
5460 bool_Bool disable_tdbfns;
5461 uint32_t bfwcomphdr_iq_width, bfwcomphdr_comp_meth;
5462
5463 /* Hidden filter for bf */
5464 proto_item *bf_ti = proto_tree_add_item(command_tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
5465 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
5466
5467 /* reserved (2 bits) */
5468 proto_tree_add_item(command_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5469 /* symbolMask (14 bits) */
5470 uint32_t symbol_mask;
5471 proto_item *symbol_mask_ti;
5472 offset = dissect_symbolmask(tvb, command_tree, offset, &symbol_mask, &symbol_mask_ti);
5473 /* Symbol bits before 'startSymbolId' in Section Type 4 common header should be set to 0 by O-DU and shall be ignored by O-RU */
5474 /* lsb is symbol 0 */
5475 for (unsigned s=0; s < 14; s++) {
5476 if ((startSymbolId & (1 << s)) && (startSymbolId > s)) {
5477 proto_item_append_text(symbol_mask_ti, " (startSymbolId is %u, so some lower symbol bits ignored!)", startSymbolId);
5478 expert_add_info(pinfo, symbol_mask_ti, &ei_oran_start_symbol_id_bits_ignored);
5479 break;
5480 }
5481 }
5482
5483 /* disableTDBFNs (1 bit) */
5484 proto_tree_add_item_ret_boolean(command_tree, hf_oran_disable_tdbfns, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &disable_tdbfns);
5485
5486 /* tdBeamNum (15 bits) */
5487 proto_tree_add_item(command_tree, hf_oran_td_beam_num, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5488 offset += 2;
5489
5490 /* bfwCompHdr (2 subheaders - bfwIqWidth and bfwCompMeth)*/
5491 offset = dissect_bfwCompHdr(tvb, command_tree, offset,
5492 &bfwcomphdr_iq_width, &bfwcomphdr_comp_meth, &comp_meth_ti);
5493 /* reserved (3 bytes) */
5494 proto_tree_add_bits_item(command_tree, hf_oran_reserved, tvb, offset*8, 24, ENC_BIG_ENDIAN0x00000000);
5495 offset += 3;
5496
5497 if (disable_tdbfns) {
5498 /* No beamnum information to show so get out. */
5499 break;
5500 }
5501
5502 /* Read beam entries until reach end of command length */
5503 while ((offset - command_start_offset) < (st4_cmd_len * 4)) {
5504
5505 /* disableTDBFWs (1 bit) */
5506 bool_Bool disable_tdbfws;
5507 proto_tree_add_item_ret_boolean(command_tree, hf_oran_disable_tdbfws, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &disable_tdbfws);
5508
5509 /* tdBeamNum (15 bits) */
5510 proto_tree_add_item(command_tree, hf_oran_td_beam_num, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5511 offset += 2;
5512
5513 /* Showing BFWs? */
5514 if (!disable_tdbfws) {
5515
5516 /* bfwCompParam */
5517 unsigned exponent = 0;
5518 bool_Bool supported = false0;
5519 unsigned num_trx_entries;
5520 uint16_t *trx_entries;
5521 offset = dissect_bfwCompParam(tvb, command_tree, pinfo, offset, comp_meth_ti,
5522 &bfwcomphdr_comp_meth, &exponent, &supported,
5523 &num_trx_entries, &trx_entries);
5524
5525 /* Antenna count from preference */
5526 unsigned num_trx = pref_num_bf_antennas;
5527 int bit_offset = offset*8;
5528
5529 for (unsigned trx=0; trx < num_trx; trx++) {
5530 /* Create antenna subtree */
5531 int bfw_offset = bit_offset / 8;
5532 proto_item *bfw_ti = proto_tree_add_string_format(command_tree, hf_oran_bfw,
5533 tvb, bfw_offset, 0, "", "TRX %3u: (", trx);
5534 proto_tree *bfw_tree = proto_item_add_subtree(bfw_ti, ett_oran_bfw);
5535
5536 /* I value */
5537 /* Get bits, and convert to float. */
5538 uint32_t bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
5539 float value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent);
5540 /* Add to tree. */
5541 proto_tree_add_float_format_value(bfw_tree, hf_oran_bfw_i, tvb, bit_offset/8,
5542 (bfwcomphdr_iq_width+7)/8, value, "%f", value);
5543 bit_offset += bfwcomphdr_iq_width;
5544 proto_item_append_text(bfw_ti, "I=%f ", value);
5545
5546 /* Leave a gap between I and Q values */
5547 proto_item_append_text(bfw_ti, " ");
5548
5549 /* Q value */
5550 /* Get bits, and convert to float. */
5551 bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
5552 value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent);
5553 /* Add to tree. */
5554 proto_tree_add_float_format_value(bfw_tree, hf_oran_bfw_q, tvb, bit_offset/8,
5555 (bfwcomphdr_iq_width+7)/8, value, "%f", value);
5556 bit_offset += bfwcomphdr_iq_width;
5557 proto_item_append_text(bfw_ti, "Q=%f", value);
5558
5559 proto_item_append_text(bfw_ti, ")");
5560 proto_item_set_len(bfw_ti, (bit_offset+7)/8 - bfw_offset);
5561 }
5562 /* Need to round to next byte */
5563 offset = (bit_offset+7)/8;
5564 }
5565 }
5566 break;
5567 }
5568 case 2: /* TDD_CONFIG_PATTERN */
5569 /* reserved (2 bits) */
5570 proto_tree_add_item(command_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5571 /* dirPattern (14 bits) */
5572 proto_tree_add_item(command_tree, hf_oran_dir_pattern, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5573 offset += 2;
5574
5575 /* reserved (2 bits) */
5576 proto_tree_add_item(command_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5577 /* guardPattern (14 bits) */
5578 proto_tree_add_item(command_tree, hf_oran_guard_pattern, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5579 offset += 2;
5580 break;
5581
5582 case 3: /* TRX_CONTROL */
5583 {
5584 /* Only allowed cmdScope is ARRAY-COMMAND */
5585 if (cmd_scope != 0) {
5586 expert_add_info(pinfo, command_tree, &ei_oran_trx_control_cmd_scope);
5587 }
5588
5589 /* reserved (2 bits) */
5590 proto_tree_add_item(command_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5591 /* log2MaskBits (4 bits) */
5592 unsigned log2maskbits;
5593 proto_tree_add_item_ret_uint(command_tree, hf_oran_log2maskbits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &log2maskbits);
5594 /* sleepMode */
5595 uint32_t sleep_mode;
5596 proto_tree_add_item_ret_uint(command_tree, hf_oran_sleepmode_trx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &sleep_mode);
5597 offset += 1;
5598
5599 /* reserved (4 bits) */
5600 proto_tree_add_item(command_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5601 /* numSlotsExt (20 bits) */
5602 uint32_t num_slots_ext;
5603 proto_item *num_slots_ext_ti = proto_tree_add_item_ret_uint(command_tree, hf_oran_num_slots_ext, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000, &num_slots_ext);
5604 if (num_slots==0 && num_slots_ext==0) {
5605 proto_item_append_text(num_slots_ext_ti, " (undefined sleep period)");
5606 }
5607 else {
5608 /* Time should be rounded up according to SCS */
5609 float total = (float)(num_slots + num_slots_ext);
5610 /* From table 7.5.2.13-3 */
5611 float slot_length_by_scs[16] = { 1000, 500, 250, 125, 62.5, 31.25,
5612 0, 0, 0, 0, 0, 0, /* reserved */
5613 1000, 1000, 1000, 1000 };
5614 float slot_length = slot_length_by_scs[scs];
5615 /* Only using valid SCS. TODO: is this test ok? */
5616 if (slot_length != 0) {
5617 /* Round up to next slot */
5618 total = ((int)(total / slot_length) + 1) * slot_length;
5619 proto_item_append_text(num_slots_ext_ti, " (defined sleep period of %f us)", total);
5620 }
5621 }
5622 offset += 3;
5623
5624 /* reserved (2 bits) */
5625 proto_tree_add_item(command_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5626
5627 /* symbolMask (14 bits) */
5628 uint32_t symbol_mask;
5629 proto_item *sm_ti;
5630 offset = dissect_symbolmask(tvb, command_tree, offset, &symbol_mask, &sm_ti);
5631 if (symbol_mask == 0x0) {
5632 proto_item_append_text(sm_ti, " (wake)");
5633 col_append_str(pinfo->cinfo, COL_INFO, " (wake)");
5634 }
5635 else if (symbol_mask == 0x3fff) {
5636 proto_item_append_text(sm_ti, " (sleep)");
5637 col_append_str(pinfo->cinfo, COL_INFO, " (sleep)");
5638 }
5639 else {
5640 expert_add_info_format(pinfo, sm_ti, &ei_oran_bad_symbolmask,
5641 "For non-zero sleepMode (%u), symbolMask should be 0x0 or 0x3fff - found 0x%05x",
5642 sleep_mode, symbol_mask);
5643 }
5644 offset += 2;
5645
5646 /* antMask (16-2048 bits). Size is lookup from log2MaskBits enum.. */
5647 unsigned antmask_length = 2;
5648 if (log2maskbits >= 4) {
5649 antmask_length = (1 << log2maskbits) / 8;
5650 }
5651 proto_item *ant_mask_ti = proto_tree_add_item(command_tree, hf_oran_antMask_trx_control, tvb, offset, antmask_length, ENC_NA0x00000000);
5652 /* show count */
5653 unsigned antenna_count = 0;
5654 for (unsigned b=0; b < antmask_length; b++) {
5655 uint8_t byte = tvb_get_uint8(tvb, offset+b);
5656 for (unsigned bit=0; bit < 8; bit++) {
5657 if ((1 << bit) & byte) {
5658 antenna_count++;
5659 }
5660 }
5661 }
5662 proto_item_append_text(ant_mask_ti, " (%u antennas)", antenna_count);
5663 offset += antmask_length;
5664
5665 /* Pad to next 4-byte boundary */
5666 offset = WS_ROUNDUP_4(offset)(((offset) + ((unsigned)(4U-1U))) & (~((unsigned)(4U-1U))
))
;
5667 break;
5668 }
5669
5670 case 4: /* ASM (advanced sleep mode) */
5671 /* reserved (2+4=6 bits) */
5672 proto_tree_add_item(command_tree, hf_oran_reserved_6bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5673 /* sleepMode (2 bits) */
5674 uint32_t sleep_mode;
5675 proto_tree_add_item_ret_uint(command_tree, hf_oran_sleepmode_asm, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &sleep_mode);
5676 offset += 1;
5677
5678 /* reserved (4 bits) */
5679 proto_tree_add_item(command_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5680 /* numSlotsExt (20 bits) */
5681 proto_tree_add_item(command_tree, hf_oran_num_slots_ext, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000);
5682 offset += 3;
5683
5684 /* reserved (2 bits) */
5685 proto_tree_add_item(command_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5686 /* symbolMask (14 bits) */
5687 uint32_t symbol_mask;
5688 proto_item *sm_ti;
5689 offset = dissect_symbolmask(tvb, command_tree, offset, &symbol_mask, &sm_ti);
5690 if (symbol_mask == 0x0) {
5691 proto_item_append_text(sm_ti, " (wake)");
5692 col_append_str(pinfo->cinfo, COL_INFO, " (wake)");
5693 }
5694 else if (symbol_mask == 0x3fff) {
5695 proto_item_append_text(sm_ti, " (sleep)");
5696 col_append_str(pinfo->cinfo, COL_INFO, " (sleep)");
5697 }
5698 else {
5699 expert_add_info_format(pinfo, sm_ti, &ei_oran_bad_symbolmask,
5700 "For non-zero sleepMode (%u), symbolMask should be 0x0 or 0x3fff - found 0x%05x",
5701 sleep_mode, symbol_mask);
5702 }
5703 offset += 2;
5704
5705 /* reserved (2 bytes) */
5706 proto_tree_add_item(command_tree, hf_oran_reserved_16bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5707 offset += 2;
5708 break;
5709
5710 default:
5711 /* Error! */
5712 expert_add_info_format(pinfo, len_ti, &ei_oran_st4_unknown_cmd,
5713 "Dissected ST4 command (%u) not recognised",
5714 st4_cmd_type);
5715 break;
5716 }
5717
5718 /* Check apparent size of padding (0-3 bytes ok) */
5719 long padding_remaining = command_start_offset + (st4_cmd_len * 4) - offset;
5720 if (padding_remaining < 0 || padding_remaining > 3) {
5721 expert_add_info_format(pinfo, len_ti, &ei_oran_st4_wrong_len_cmd,
5722 "Dissected ST4 command does not match signalled st4CmdLen - set to %u (%u bytes) but dissected %u bytes",
5723 st4_cmd_len, st4_cmd_len*4, offset-command_start_offset);
5724 }
5725
5726 /* Advance by signalled length (needs to be aligned on 4-byte boundary) */
5727 offset = command_start_offset + (st4_cmd_len * 4);
5728
5729 /* Set end of command tree */
5730 proto_item_set_end(command_ti, tvb, offset);
5731
5732 if (ack_nack_req_id != 0 && state && state->ack_nack_requests) {
5733 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
5734 /* Add this request into conversation state on first pass */
5735 ack_nack_request_t *request_details = wmem_new0(wmem_file_scope(), ack_nack_request_t)((ack_nack_request_t*)wmem_alloc0((wmem_file_scope()), sizeof
(ack_nack_request_t)))
;
5736 request_details->request_frame_number = pinfo->num;
5737 request_details->request_frame_time = pinfo->abs_ts;
5738 request_details->requestType = ST4Cmd1+st4_cmd_type-1;
5739
5740 wmem_tree_insert32(state->ack_nack_requests,
5741 ack_nack_req_id,
5742 request_details);
5743 }
5744 else {
5745 /* On later passes, try to link forward to ST8 response */
5746 ack_nack_request_t *response = wmem_tree_lookup32(state->ack_nack_requests,
5747 ack_nack_req_id);
5748 if (response) {
5749 show_link_to_acknack_response(section_tree, tvb, pinfo, response);
5750 }
5751 }
5752 }
5753 }
5754 }
5755 /* LAA doesn't have sections either.. */
5756 else if (sectionType == SEC_C_LAA) { /* Section Type 7 */
5757 /* 7.2.5 Table 6.4-6 */
5758 unsigned mcot;
5759 proto_item *mcot_ti;
5760
5761 /* laaMsgType */
5762 uint32_t laa_msg_type;
5763 proto_item *laa_msg_type_ti;
5764 laa_msg_type_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_laaMsgType, tvb, offset, 1, ENC_NA0x00000000, &laa_msg_type);
5765 /* laaMsgLen */
5766 uint32_t laa_msg_len;
5767 proto_item *len_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_laaMsgLen, tvb, offset, 1, ENC_NA0x00000000, &laa_msg_len);
5768 proto_item_append_text(len_ti, " (%u bytes)", 4*laa_msg_len);
5769 if (laa_msg_len == 0) {
5770 proto_item_append_text(len_ti, " (reserved)");
5771 }
5772 offset += 1;
5773
5774 int payload_offset = offset;
5775
5776 /* Payload */
5777 switch (laa_msg_type) {
5778 case 0:
5779 /* LBT_PDSCH_REQ */
5780 /* lbtHandle (16 bits) */
5781 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5782 offset += 2;
5783 /* lbtOffset (10 bits) */
5784 proto_tree_add_item(section_tree, hf_oran_lbtOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5785 offset += 1;
5786 /* lbtMode (2 bits) */
5787 proto_tree_add_bits_item(section_tree, hf_oran_lbtMode, tvb, offset*8+2, 2, ENC_BIG_ENDIAN0x00000000);
5788 /* reserved (1 bit) */
5789 proto_tree_add_item(section_tree, hf_oran_reserved_bit4, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5790 /* lbtDeferFactor (3 bits) */
5791 proto_tree_add_item(section_tree, hf_oran_lbtDeferFactor, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5792 offset += 1;
5793 /* lbtBackoffCounter (10 bits) */
5794 proto_tree_add_item(section_tree, hf_oran_lbtBackoffCounter, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5795 offset += 1;
5796 /* MCOT (4 bits) */
5797 mcot_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_MCOT, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &mcot);
5798 if (mcot<1 || mcot>10) {
5799 proto_item_append_text(mcot_ti, " (should be in range 1-10!)");
5800 expert_add_info_format(pinfo, mcot_ti, &ei_oran_mcot_out_of_range,
5801 "MCOT seen with value %u (must be 1-10)", mcot);
5802
5803 }
5804 /* reserved (10 bits) */
5805 proto_tree_add_bits_item(section_tree, hf_oran_reserved, tvb, (offset*8)+6, 10, ENC_BIG_ENDIAN0x00000000);
5806 break;
5807 case 1:
5808 /* LBT_DRS_REQ */
5809 /* lbtHandle (16 bits) */
5810 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5811 offset += 2;
5812 /* lbtOffset (10 bits) */
5813 proto_tree_add_item(section_tree, hf_oran_lbtOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5814 offset += 1;
5815 /* lbtMode (2 bits) */
5816 proto_tree_add_bits_item(section_tree, hf_oran_lbtMode, tvb, offset*8+2, 2, ENC_BIG_ENDIAN0x00000000);
5817 /* reserved (28 bits) */
5818 proto_tree_add_bits_item(section_tree, hf_oran_reserved, tvb, (offset*8)+4, 28, ENC_BIG_ENDIAN0x00000000);
5819 break;
5820 case 2:
5821 /* LBT_PDSCH_RSP */
5822 /* lbtHandle (16 bits) */
5823 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5824 offset += 2;
5825 /* lbtPdschRes (2 bits) */
5826 proto_tree_add_item(section_tree, hf_oran_lbtPdschRes, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5827 /* inParSF (1 bit) */
5828 proto_tree_add_item(section_tree, hf_oran_initialPartialSF, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5829 /* sfStatus (1 bit) */
5830 proto_tree_add_item(section_tree, hf_oran_sfStatus, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5831 /* sfnSf (12 bits) */
5832 proto_tree_add_item(section_tree, hf_oran_sfnSfEnd, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5833 offset += 2;
5834 /* reserved (24 bits) */
5835 proto_tree_add_bits_item(section_tree, hf_oran_reserved, tvb, (offset*8), 24, ENC_BIG_ENDIAN0x00000000);
5836 break;
5837 case 3:
5838 /* LBT_DRS_RSP */
5839 /* lbtHandle (16 bits) */
5840 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5841 offset += 2;
5842 /* lbtDrsRes (1 bit) */
5843 proto_tree_add_item(section_tree, hf_oran_lbtDrsRes, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5844 /* reserved (7 bits) */
5845 proto_tree_add_item(section_tree, hf_oran_reserved_last_7bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5846 break;
5847 case 4:
5848 /* LBT_Buffer_Error */
5849 /* lbtHandle (16 bits) */
5850 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5851 offset += 2;
5852 /* lbtBufErr (1 bit) */
5853 proto_tree_add_item(section_tree, hf_oran_lbtBufErr, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5854 /* reserved (7 bits) */
5855 proto_tree_add_item(section_tree, hf_oran_reserved_last_7bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5856 break;
5857 case 5:
5858 /* LBT_CWCONFIG_REQ */
5859 /* lbtHandle (16 bits) */
5860 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5861 offset += 2;
5862 /* lbtCWConfig_H (8 bits) */
5863 proto_tree_add_item(section_tree, hf_oran_lbtCWConfig_H, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5864 offset += 1;
5865 /* lbtCWConfig_T (8 bits) */
5866 proto_tree_add_item(section_tree, hf_oran_lbtCWConfig_T, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5867 offset += 1;
5868 /* lbtMode (2 bits) */
5869 proto_tree_add_bits_item(section_tree, hf_oran_lbtMode, tvb, offset*8, 2, ENC_BIG_ENDIAN0x00000000);
5870 /* lbtTrafficClass (3 bits) */
5871 proto_tree_add_item(section_tree, hf_oran_lbtTrafficClass, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5872 /* reserved (19 bits) */
5873 proto_tree_add_bits_item(section_tree, hf_oran_reserved, tvb, (offset*8)+5, 19, ENC_BIG_ENDIAN0x00000000);
5874 break;
5875 case 6:
5876 /* LBT_CWCONFIG_RSP */
5877 /* lbtHandle (16 bits) */
5878 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5879 offset += 2;
5880 /* lbtCWR_Rst (1 bit) */
5881 proto_tree_add_item(section_tree, hf_oran_lbtCWR_Rst, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5882 /* reserved (7 bits) */
5883 proto_tree_add_item(section_tree, hf_oran_reserved_last_7bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5884 break;
5885
5886 default:
5887 /* Unhandled! */
5888 expert_add_info_format(pinfo, laa_msg_type_ti, &ei_oran_laa_msg_type_unsupported,
5889 "laaMsgType %u not supported by dissector",
5890 laa_msg_type);
5891
5892 break;
5893 }
5894 /* For now just skip indicated length of bytes */
5895 offset = payload_offset + 4*(laa_msg_len+1);
5896 }
5897
5898
5899 /* Dissect each C section */
5900 for (uint32_t i = 0; i < nSections; ++i) {
5901 tvbuff_t *section_tvb = tvb_new_subset_length_caplen(tvb, offset, -1, -1);
5902 offset += dissect_oran_c_section(section_tvb, oran_tree, pinfo, state, sectionType, tap_info,
5903 protocol_item,
5904 subframeId, slotId,
5905 bit_width, ci_comp_method, ci_comp_opt,
5906 num_sinr_per_prb);
5907 }
5908
5909 /* Expert error if we are short of tvb by > 3 bytes */
5910 if (tvb_reported_length_remaining(tvb, offset) > 3) {
5911 expert_add_info_format(pinfo, protocol_item, &ei_oran_frame_length,
5912 "%u bytes remain at end of frame - should be 0-3",
5913 tvb_reported_length_remaining(tvb, offset));
5914 }
5915
5916 return tvb_captured_length(tvb);
5917}
5918
5919static int dissect_oran_u_re(tvbuff_t *tvb, proto_tree *tree,
5920 unsigned sample_number, int samples_offset,
5921 oran_tap_info *tap_info,
5922 unsigned sample_bit_width,
5923 int comp_meth,
5924 uint32_t exponent)
5925{
5926 /* I */
5927 unsigned i_bits = tvb_get_bits32(tvb, samples_offset, sample_bit_width, ENC_BIG_ENDIAN0x00000000);
5928 float i_value = decompress_value(i_bits, comp_meth, sample_bit_width, exponent);
5929 unsigned sample_len_in_bytes = ((samples_offset%8)+sample_bit_width+7)/8;
5930 proto_item *i_ti = proto_tree_add_float(tree, hf_oran_iSample, tvb, samples_offset/8, sample_len_in_bytes, i_value);
5931 proto_item_set_text(i_ti, "iSample: % 0.7f 0x%04x (RE-%2u in the PRB)", i_value, i_bits, sample_number);
5932 samples_offset += sample_bit_width;
5933 /* Q */
5934 unsigned q_bits = tvb_get_bits32(tvb, samples_offset, sample_bit_width, ENC_BIG_ENDIAN0x00000000);
5935 float q_value = decompress_value(q_bits, comp_meth, sample_bit_width, exponent);
5936 sample_len_in_bytes = ((samples_offset%8)+sample_bit_width+7)/8;
5937 proto_item *q_ti = proto_tree_add_float(tree, hf_oran_qSample, tvb, samples_offset/8, sample_len_in_bytes, q_value);
5938 proto_item_set_text(q_ti, "qSample: % 0.7f 0x%04x (RE-%2u in the PRB)", q_value, q_bits, sample_number);
5939 samples_offset += sample_bit_width;
5940
5941 /* Update RE stats */
5942 tap_info->num_res++;
5943 /* if (i_value == 0.0 && q_value == 0.0) { */
5944 /* TODO: is just checking bits from frame good enough - assuming this always corresponds to a zero value? */
5945 if (i_bits == 0 && q_bits == 0) {
5946 tap_info->num_res_zero++;
5947 }
5948 else {
5949 tap_info->non_zero_re_in_current_prb = true1;
5950 }
5951 return samples_offset;
5952}
5953
5954
5955static bool_Bool udcomplen_appears_present(bool_Bool udcomphdr_present, tvbuff_t *tvb, int offset)
5956{
5957 if (!udcomplen_heuristic_result_set) {
5958 /* All sections will start the same way */
5959 unsigned int section_bytes_before_field = (udcomphdr_present) ? 6 : 4;
5960
5961 /* Move offset back to the start of the section */
5962 offset -= section_bytes_before_field;
5963
5964 do {
5965 /* This field appears several bytes into the U-plane section */
5966 uint32_t length_remaining = tvb_reported_length_remaining(tvb, offset);
5967 /* Are there enough bytes to still read the length field? */
5968 if (section_bytes_before_field+2 > length_remaining) {
5969 udcomplen_heuristic_result = false0;
5970 udcomplen_heuristic_result_set = true1;
5971 break;
5972 }
5973
5974 /* Read the length field */
5975 uint16_t udcomplen = tvb_get_ntohs(tvb, offset+section_bytes_before_field);
5976
5977 /* Is this less than a valid section? Realistic minimal section will be bigger than this..
5978 * Could take into account numPrbU, etc */
5979 if (udcomplen < section_bytes_before_field+2) {
5980 udcomplen_heuristic_result = false0;
5981 udcomplen_heuristic_result_set = true1;
5982 break;
5983 }
5984
5985 /* Does this section fit into the frame? */
5986 if (udcomplen > length_remaining) {
5987 udcomplen_heuristic_result = false0;
5988 udcomplen_heuristic_result_set = true1;
5989 break;
5990 }
5991
5992 /* Move past this section */
5993 offset += udcomplen;
5994
5995 /* Are we at the end of the frame? */
5996 /* TODO: if frame is less than 60 bytes, there may be > 4 bytes, likely zeros.. */
5997 if (tvb_reported_length_remaining(tvb, offset) < 4) {
5998 udcomplen_heuristic_result = true1;
5999 udcomplen_heuristic_result_set = true1;
6000 }
6001 } while (!udcomplen_heuristic_result_set);
6002 }
6003 return udcomplen_heuristic_result;
6004}
6005
6006static bool_Bool at_udcomphdr(tvbuff_t *tvb, int offset)
6007{
6008 if (tvb_captured_length_remaining(tvb, offset) < 2) {
6009 return false0;
6010 }
6011 uint8_t first_byte = tvb_get_uint8(tvb, offset);
6012 uint8_t reserved_byte = tvb_get_uint8(tvb, offset+1);
6013
6014 /* - iq width could be anything, though unlikely to be signalled as (say) < 1-3? */
6015 /* - meth should be 0-8 */
6016 /* - reserved byte should be 0 */
6017 return (((first_byte & 0x0f) <= MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8) && (reserved_byte == 0));
6018}
6019
6020static bool_Bool udcomphdr_appears_present(flow_state_t *flow, uint32_t direction, tvbuff_t *tvb, int offset)
6021{
6022 /* Should really not happen, but guard against this anyway. */
6023 if (flow == NULL((void*)0)) {
6024 /* No state to update. */
6025 return false0;
6026 }
6027
6028 if (direction == DIR_UPLINK0) {
6029 if (flow->udcomphdrUplink_heuristic_result_set) {
6030 /* Return cached value */
6031 return flow->udcomphdrUplink_heuristic_result;
6032 }
6033 else {
6034 /* Work it out, and save answer for next time */
6035 flow->udcomphdrUplink_heuristic_result_set = true1;
6036 flow->udcomphdrUplink_heuristic_result = at_udcomphdr(tvb, offset);
6037 return flow->udcomphdrUplink_heuristic_result;
6038 }
6039 }
6040 else {
6041 /* Downlink */
6042 if (flow->udcomphdrDownlink_heuristic_result_set) {
6043 /* Return cached value */
6044 return flow->udcomphdrDownlink_heuristic_result;
6045 }
6046 else {
6047 /* Work it out, and save answer for next time */
6048 flow->udcomphdrDownlink_heuristic_result_set = true1;
6049 flow->udcomphdrDownlink_heuristic_result = at_udcomphdr(tvb, offset);
6050 return flow->udcomphdrDownlink_heuristic_result;
6051 }
6052 }
6053}
6054
6055/* User plane dissector (section 8) */
6056static int
6057dissect_oran_u(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
6058 oran_tap_info *tap_info, void *data _U___attribute__((unused)))
6059{
6060 /* Hidden filter for plane */
6061 proto_item *plane_ti = proto_tree_add_item(tree, hf_oran_uplane, tvb, 0, 0, ENC_NA0x00000000);
6062 PROTO_ITEM_SET_HIDDEN(plane_ti)proto_item_set_hidden((plane_ti));
6063
6064 /* Set up structures needed to add the protocol subtree and manage it */
6065 int offset = 0;
6066
6067 col_set_str(pinfo->cinfo, COL_PROTOCOL, "O-RAN-FH-U");
6068 col_set_str(pinfo->cinfo, COL_INFO, "U-Plane");
6069
6070 tap_info->userplane = true1;
6071
6072 /* Create display subtree for the protocol */
6073 proto_item *protocol_item = proto_tree_add_item(tree, proto_oran, tvb, 0, -1, ENC_NA0x00000000);
6074 proto_item_append_text(protocol_item, "-U");
6075 proto_tree *oran_tree = proto_item_add_subtree(protocol_item, ett_oran);
6076
6077 /* Transport header */
6078 /* Real-time control data / IQ data transfer message series identifier */
6079 uint16_t eAxC;
6080 addPcOrRtcid(tvb, oran_tree, &offset, hf_oran_ecpri_pcid, &eAxC);
6081 tap_info->eaxc = eAxC;
6082
6083 /* Update/report status of conversation */
6084 uint32_t key = make_flow_key(pinfo, eAxC, ORAN_U_PLANE1, false0);
6085 flow_state_t* state = (flow_state_t*)wmem_tree_lookup32(flow_states_table, key);
6086
6087 /* Message identifier */
6088 uint8_t seq_id;
6089 proto_item *seq_id_ti;
6090 offset = addSeqid(tvb, oran_tree, offset, ORAN_U_PLANE1, &seq_id, &seq_id_ti, pinfo);
6091
6092 /* Common header for time reference */
6093 proto_item *timingHeader = proto_tree_add_string_format(oran_tree, hf_oran_timing_header,
6094 tvb, offset, 4, "", "Timing Header (");
6095 proto_tree *timing_header_tree = proto_item_add_subtree(timingHeader, ett_oran_u_timing);
6096
6097 /* dataDirection */
6098 uint32_t direction;
6099 proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_data_direction, tvb, offset, 1, ENC_NA0x00000000, &direction);
6100 tap_info->uplink = (direction==0);
6101 /* payloadVersion */
6102 dissect_payload_version(timing_header_tree, tvb, pinfo, offset);
6103 /* filterIndex */
6104 proto_tree_add_item(timing_header_tree, hf_oran_filter_index, tvb, offset, 1, ENC_NA0x00000000);
6105 offset += 1;
6106
6107 int ref_a_offset = offset;
6108
6109 /* frameId */
6110 uint32_t frameId = 0;
6111 proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_frame_id, tvb, offset, 1, ENC_NA0x00000000, &frameId);
6112 offset += 1;
6113
6114 /* subframeId */
6115 uint32_t subframeId = 0;
6116 proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_subframe_id, tvb, offset, 1, ENC_NA0x00000000, &subframeId);
6117 /* slotId */
6118 uint32_t slotId = 0;
6119 proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_slot_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &slotId);
6120 tap_info->slot = slotId;
6121 offset++;
6122 /* symbolId */
6123 uint32_t symbolId = 0;
6124 proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_symbolId, tvb, offset, 1, ENC_NA0x00000000, &symbolId);
6125 offset++;
6126
6127 char id[16];
6128 snprintf(id, 16, "%d-%d-%d-%d", frameId, subframeId, slotId, symbolId);
6129 proto_item *pi = proto_tree_add_string(timing_header_tree, hf_oran_refa, tvb, ref_a_offset, 3, id);
6130 proto_item_set_generated(pi);
6131
6132 proto_item_append_text(timingHeader, "%s, Frame: %d, Subframe: %d, Slot: %d, Symbol: %d)",
6133 val_to_str_const(direction, data_direction_vals, "Unknown"), frameId, subframeId, slotId, symbolId);
6134
6135 unsigned sample_bit_width;
6136 int compression;
6137 int includeUdCompHeader;
6138
6139 /* Also look up C-PLANE state (sent in opposite direction) so may check current compression settings */
6140 uint32_t cplane_key = make_flow_key(pinfo, eAxC, ORAN_C_PLANE0, true1);
6141 flow_state_t* cplane_state = (flow_state_t*)wmem_tree_lookup32(flow_states_table, cplane_key);
6142
6143 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
6144 /* Create conversation if doesn't exist yet */
6145 if (!state) {
6146 /* Allocate new state */
6147 state = wmem_new0(wmem_file_scope(), flow_state_t)((flow_state_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_state_t
)))
;
6148 state->ack_nack_requests = wmem_tree_new(wmem_epan_scope());
6149 wmem_tree_insert32(flow_states_table, key, state);
6150 }
6151
6152 /* Check sequence analysis status */
6153 if (state->last_frame_seen[direction] && (seq_id != state->next_expected_sequence_number[direction])) {
6154 /* Store this result */
6155 flow_result_t *result = wmem_new0(wmem_file_scope(), flow_result_t)((flow_result_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_result_t
)))
;
6156 result->unexpected_seq_number = true1;
6157 result->expected_sequence_number = state->next_expected_sequence_number[direction];
6158 result->previous_frame = state->last_frame[direction];
6159 wmem_tree_insert32(flow_results_table, pinfo->num, result);
6160 }
6161 /* Update sequence analysis state */
6162 state->last_frame[direction] = pinfo->num;
6163 state->last_frame_seen[direction] = true1;
6164 state->next_expected_sequence_number[direction] = (seq_id+1) % 256;
6165 }
6166
6167 /* Show any issues associated with this frame number */
6168 flow_result_t *result = wmem_tree_lookup32(flow_results_table, pinfo->num);
6169 if (result) {
6170 if (result->unexpected_seq_number) {
6171 expert_add_info_format(pinfo, seq_id_ti,
6172 (direction == DIR_UPLINK0) ?
6173 &ei_oran_uplane_unexpected_sequence_number_ul :
6174 &ei_oran_uplane_unexpected_sequence_number_dl,
6175 "Sequence number %u expected, but got %u",
6176 result->expected_sequence_number, seq_id);
6177 tap_info->missing_sns = (256 + seq_id - result->expected_sequence_number) % 256;
6178 /* TODO: could add previous/next frame (in seqId tree?) ? */
6179 }
6180 }
6181
6182 /* Checking UL timing within current slot. Disabled if limit set to 0. */
6183 /* N.B., timing is relative to first seen frame,
6184 not some notion of the beginning of the slot from sync, offset by some timing.. */
6185 if (direction == DIR_UPLINK0 && us_allowed_for_ul_in_symbol > 0) {
6186 uint32_t timing_key = get_timing_key(frameId, subframeId, slotId, symbolId);
6187 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
6188 /* Set state on first pass */
6189 ul_timing_for_slot* timing = (ul_timing_for_slot*)wmem_tree_lookup32(ul_symbol_timing, timing_key);
6190 if (!timing) {
6191 /* Allocate new state */
6192 timing = wmem_new0(wmem_file_scope(), ul_timing_for_slot)((ul_timing_for_slot*)wmem_alloc0((wmem_file_scope()), sizeof
(ul_timing_for_slot)))
;
6193 timing->first_frame = pinfo->num;
6194 timing->first_frame_time = pinfo->abs_ts;
6195 timing->frames_seen_in_symbol = 1;
6196 timing->last_frame_in_symbol = pinfo->num;
6197 wmem_tree_insert32(ul_symbol_timing, timing_key, timing);
6198 }
6199 else {
6200 /* Update existing state */
6201 timing->frames_seen_in_symbol++;
6202 timing->last_frame_in_symbol = pinfo->num;
6203 }
6204 }
6205 else {
6206 /* Subsequent passes - look up result */
6207 ul_timing_for_slot* timing = (ul_timing_for_slot*)wmem_tree_lookup32(ul_symbol_timing, timing_key);
6208 if (timing) { /* Really shouldn't fail! */
6209 if (timing->frames_seen_in_symbol > 1) {
6210 /* Work out gap between frames (in microseconds) back to frame carrying first seen symbol */
6211 int seconds_between_packets = (int)
6212 (pinfo->abs_ts.secs - timing->first_frame_time.secs);
6213 int nseconds_between_packets =
6214 pinfo->abs_ts.nsecs - timing->first_frame_time.nsecs;
6215
6216 /* Round to nearest microsecond. */
6217 uint32_t total_gap = (seconds_between_packets*1000000) +
6218 ((nseconds_between_packets+500) / 1000);
6219
6220 proto_item *ti = NULL((void*)0);
6221
6222 /* Show how long it has been */
6223 if (pinfo->num != timing->first_frame) {
6224 ti = proto_tree_add_uint(timingHeader, hf_oran_u_section_ul_symbol_time, tvb, 0, 0, total_gap);
6225 proto_item_set_generated(ti);
6226 }
6227
6228 if (total_gap > us_allowed_for_ul_in_symbol) {
6229 expert_add_info_format(pinfo, ti, &ei_oran_ul_uplane_symbol_too_long,
6230 "UL U-Plane Tx took longer (%u us) than limit set in preferences (%u us)",
6231 total_gap, us_allowed_for_ul_in_symbol);
6232 }
6233
6234 /* Show how many frames were received */
6235 ti = proto_tree_add_uint(timingHeader, hf_oran_u_section_ul_symbol_frames, tvb, 0, 0, timing->frames_seen_in_symbol);
6236 proto_item_set_generated(ti);
6237
6238 /* Link to first frame for this symbol */
6239 if (pinfo->num != timing->first_frame) {
6240 ti = proto_tree_add_uint(timingHeader, hf_oran_u_section_ul_symbol_first_frame, tvb, 0, 0, timing->first_frame);
6241 proto_item_set_generated(ti);
6242 }
6243
6244 /* And also last frame */
6245 if (pinfo->num != timing->last_frame_in_symbol) {
6246 ti = proto_tree_add_uint(timingHeader, hf_oran_u_section_ul_symbol_last_frame, tvb, 0, 0, timing->last_frame_in_symbol);
6247 proto_item_set_generated(ti);
6248 }
6249 }
6250 }
6251 }
6252 }
6253
6254
6255 /* Look up preferences for samples */
6256 if (direction == DIR_UPLINK0) {
6257 sample_bit_width = pref_sample_bit_width_uplink;
6258 compression = pref_iqCompressionUplink;
6259 includeUdCompHeader = pref_includeUdCompHeaderUplink;
6260 } else {
6261 sample_bit_width = pref_sample_bit_width_downlink;
6262 compression = pref_iqCompressionDownlink;
6263 includeUdCompHeader = pref_includeUdCompHeaderDownlink;
6264 }
6265
6266 /* If uplink, load any udCompHdr settings written by C-Plane */
6267 bool_Bool ud_cmp_hdr_cplane = false0;
6268 if (cplane_state && direction == 0) {
6269 /* Initialise settings from udpCompHdr from C-Plane */
6270 if (cplane_state->ul_ud_comp_hdr_set) {
6271 sample_bit_width = cplane_state->ul_ud_comp_hdr_bit_width;
6272 compression = cplane_state->ul_ud_comp_hdr_compression;
6273 ud_cmp_hdr_cplane = true1;
6274 }
6275 }
6276
6277 /* Need a valid value (e.g. 9, 14). 0 definitely won't work, as won't progress around loop! */
6278 /* N.B. may yet be overwritten by udCompHdr settings in sections below! */
6279 if (sample_bit_width == 0) {
6280 expert_add_info_format(pinfo, protocol_item, &ei_oran_invalid_sample_bit_width,
6281 "%cL Sample bit width from %s (%u) not valid, so can't decode sections",
6282 (direction == DIR_UPLINK0) ? 'U' : 'D',
6283 !ud_cmp_hdr_cplane ? "preference" : "C-Plane",
6284 sample_bit_width);
6285 return offset;
6286 }
6287
6288 unsigned bytesLeft;
6289 unsigned number_of_sections = 0;
6290 unsigned nBytesPerPrb =0;
6291
6292 /* Add each section (not from count, just keep parsing until payload used) */
6293 do {
6294 /* Section subtree */
6295 unsigned section_start_offset = offset;
6296 proto_item *sectionHeading = proto_tree_add_string_format(oran_tree, hf_oran_u_section,
6297 tvb, offset, 0, "", "Section");
6298 proto_tree *section_tree = proto_item_add_subtree(sectionHeading, ett_oran_u_section);
6299
6300 /* Section Header fields (darker green part) */
6301
6302 /* sectionId */
6303 uint32_t sectionId = 0;
6304 proto_item *ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_section_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &sectionId);
6305 if (sectionId == 4095) {
6306 proto_item_append_text(ti, " (not default coupling C/U planes using sectionId)");
6307 }
6308 offset++;
6309
6310 if (tap_info->num_section_ids < MAX_SECTION_IDs32) {
6311 tap_info->section_ids[tap_info->num_section_ids++] = sectionId;
6312 }
6313
6314 /* rb */
6315 uint32_t rb;
6316 proto_tree_add_item_ret_uint(section_tree, hf_oran_rb, tvb, offset, 1, ENC_NA0x00000000, &rb);
6317 /* symInc */
6318 proto_tree_add_item(section_tree, hf_oran_symInc, tvb, offset, 1, ENC_NA0x00000000);
6319 /* startPrbu */
6320 uint32_t startPrbu = 0;
6321 proto_tree_add_item_ret_uint(section_tree, hf_oran_startPrbu, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPrbu);
6322 offset += 2;
6323
6324 /* numPrbu */
6325 uint32_t numPrbu = 0;
6326 proto_tree_add_item_ret_uint(section_tree, hf_oran_numPrbu, tvb, offset, 1, ENC_NA0x00000000, &numPrbu);
6327 offset += 1;
6328
6329 proto_item *ud_comp_meth_item, *ud_comp_len_ti=NULL((void*)0);
6330 uint32_t ud_comp_len;
6331
6332 /* udCompHdr (if preferences indicate will be present) */
6333 bool_Bool included = (includeUdCompHeader==1) || /* 1 means present.. */
6334 (includeUdCompHeader==2 && udcomphdr_appears_present(state, direction, tvb, offset));
6335 if (included) {
6336 /* 7.5.2.10 */
6337 /* Extract these values to inform how wide IQ samples in each PRB will be. */
6338 offset = dissect_udcomphdr(tvb, pinfo, section_tree, offset, false0, &sample_bit_width,
6339 &compression, &ud_comp_meth_item);
6340
6341 /* Not part of udCompHdr */
6342 proto_tree_add_item(section_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_NA0x00000000);
6343 offset += 1;
6344 }
6345 else {
6346 /* No fields to dissect - just showing comp values from prefs */
6347 /* iqWidth */
6348 proto_item *iq_width_item = proto_tree_add_uint(section_tree, hf_oran_udCompHdrIqWidth_pref, tvb, 0, 0, sample_bit_width);
6349 proto_item_append_text(iq_width_item, (ud_cmp_hdr_cplane) ? " (from c-plane)" : " (from preferences)");
6350 proto_item_set_generated(iq_width_item);
6351
6352 /* udCompMethod */
6353 ud_comp_meth_item = proto_tree_add_uint(section_tree, hf_oran_udCompHdrMeth_pref, tvb, 0, 0, compression);
6354 proto_item_append_text(ud_comp_meth_item, (ud_cmp_hdr_cplane) ? " (from c-plane)" : " (from preferences)");
6355 proto_item_set_generated(ud_comp_meth_item);
6356
6357 /* Point back to C-Plane, if used */
6358 /* TODO: doesn't work with multiple port mappings using SE10.. */
6359 if (ud_cmp_hdr_cplane) {
6360 proto_item *cplane_ti = proto_tree_add_uint(section_tree, hf_oran_ul_cplane_ud_comp_hdr_frame, tvb, offset, 0, cplane_state->ul_ud_comp_hdr_frame);
6361 proto_item_set_generated(cplane_ti);
6362 }
6363 }
6364
6365 /* Not supported! TODO: other places where comp method is looked up (e.g., bfw?) */
6366 switch (compression) {
6367 case COMP_NONE0:
6368 case COMP_BLOCK_FP1:
6369 case BFP_AND_SELECTIVE_RE5:
6370 break;
6371 default:
6372 expert_add_info_format(pinfo, ud_comp_meth_item, &ei_oran_unsupported_compression_method,
6373 "Compression method %u (%s) not supported by dissector",
6374 compression,
6375 rval_to_str_const(compression, ud_comp_header_meth, "reserved"));
6376 }
6377
6378 /* udCompLen (when supported, methods 5,6,7,8) */
6379 if (compression >= BFP_AND_SELECTIVE_RE5) {
6380 bool_Bool supported = (pref_support_udcompLen==1) || /* supported */
6381 (pref_support_udcompLen==2 && udcomplen_appears_present(includeUdCompHeader, tvb, offset));
6382
6383 if (supported) {
6384 ud_comp_len_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_udCompLen, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ud_comp_len);
6385 if (ud_comp_len <= 1) {
6386 proto_item_append_text(ud_comp_len_ti, " (reserved)");
6387 }
6388 /* TODO: report if less than a viable section in frame? */
6389 /* Check that there is this much length left in the frame */
6390 if ((int)ud_comp_len > tvb_reported_length_remaining(tvb, section_start_offset)) {
6391 expert_add_info_format(pinfo, ud_comp_len_ti, &ei_oran_ud_comp_len_wrong_size,
6392 "udCompLen indicates %u bytes in section, but only %u are left in frame",
6393 ud_comp_len, tvb_reported_length_remaining(tvb, section_start_offset));
6394 }
6395 /* Actual length of section will be checked below, at the end of the section */
6396 offset += 2;
6397 }
6398 }
6399
6400 /* sReSMask1 + sReSMask2 (depends upon compression method) */
6401 uint64_t sresmask1=0, sresmask2=0;
6402 if (compression == BFP_AND_SELECTIVE_RE_WITH_MASKS7 ||
6403 compression == MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8)
6404 {
6405 static int * const sres_mask1_2_flags[] = {
6406 &hf_oran_sReSMask1_2_re12,
6407 &hf_oran_sReSMask1_2_re11,
6408 &hf_oran_sReSMask1_2_re10,
6409 &hf_oran_sReSMask1_2_re9,
6410 &hf_oran_sReSMask_re8,
6411 &hf_oran_sReSMask_re7,
6412 &hf_oran_sReSMask_re6,
6413 &hf_oran_sReSMask_re5,
6414 &hf_oran_sReSMask_re4,
6415 &hf_oran_sReSMask_re3,
6416 &hf_oran_sReSMask_re2,
6417 &hf_oran_sReSMask_re1,
6418 NULL((void*)0)
6419 };
6420
6421 /* reserved (4 bits) */
6422 proto_tree_add_item(section_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_NA0x00000000);
6423 /* sReSMask1 (12 bits) */
6424 proto_item *sresmask_ti;
6425 sresmask_ti = proto_tree_add_bitmask_ret_uint64(section_tree, tvb, offset,
6426 hf_oran_sReSMask1,
6427 ett_oran_sresmask,
6428 sres_mask1_2_flags,
6429 ENC_NA0x00000000,
6430 &sresmask1);
6431 offset += 2;
6432 /* Count REs present */
6433 unsigned res = 0;
6434 for (unsigned n=0; n < 12; n++) {
6435 if ((sresmask1 >> n) & 0x1) {
6436 res++;
6437 }
6438 }
6439 proto_item_append_text(sresmask_ti, " (%u REs)", res);
6440
6441
6442 /* reserved (4 bits) */
6443 proto_tree_add_item(section_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_NA0x00000000);
6444 /* sReSMask2 (12 bits) */
6445 sresmask_ti = proto_tree_add_bitmask_ret_uint64(section_tree, tvb, offset,
6446 hf_oran_sReSMask2,
6447 ett_oran_sresmask,
6448 sres_mask1_2_flags,
6449 ENC_NA0x00000000,
6450 &sresmask2);
6451 offset += 2;
6452
6453 if (rb == 1) {
6454 proto_item_append_text(sresmask_ti, " (ignored)");
6455 if (sresmask2 != 0) {
6456 expert_add_info(pinfo, ud_comp_len_ti, &ei_oran_sresmask2_not_zero_with_rb);
6457 }
6458 }
6459 else {
6460 /* Count REs present */
6461 res = 0;
6462 for (unsigned n=0; n < 12; n++) {
6463 if ((sresmask2 >> n) & 0x1) {
6464 res++;
6465 }
6466 }
6467 proto_item_append_text(sresmask_ti, " (%u REs)", res);
6468 }
6469 }
6470
6471 write_section_info(sectionHeading, pinfo, protocol_item, sectionId, startPrbu, numPrbu, rb);
6472
6473 /* TODO: should this use the same pref as c-plane? */
6474 if (numPrbu == 0) {
6475 /* Special case for all PRBs (NR: the total number of PRBs may be > 255) */
6476 numPrbu = pref_data_plane_section_total_rbs;
6477 startPrbu = 0; /* may already be 0... */
6478 }
6479
6480 /* Add each PRB */
6481 for (unsigned i = 0; i < numPrbu; i++) {
6482 /* Create subtree */
6483 proto_item *prbHeading = proto_tree_add_string_format(section_tree, hf_oran_samples_prb,
6484 tvb, offset, 0,
6485 "", "PRB");
6486 proto_tree *rb_tree = proto_item_add_subtree(prbHeading, ett_oran_u_prb);
6487 uint32_t exponent = 0;
6488 uint16_t sresmask = 0;
6489
6490 /* udCompParam (depends upon compression method) */
6491 int before = offset;
6492 offset = dissect_udcompparam(tvb, pinfo, rb_tree, offset, compression, &exponent, &sresmask, false0);
6493 int udcompparam_len = offset-before;
6494
6495 /* Show PRB number in root */
6496 proto_item_append_text(prbHeading, " %3u", startPrbu + i*(1+rb));
6497
6498 /* Work out how many REs / PRB */
6499 unsigned res_per_prb = 12;
6500 uint16_t sresmask_to_use = 0x0fff;
6501
6502 if (compression >= BFP_AND_SELECTIVE_RE5) {
6503 /* Work out which mask should be used */
6504 if (compression==BFP_AND_SELECTIVE_RE5 || compression==MOD_COMPR_AND_SELECTIVE_RE6) {
6505 /* Selective RE cases, use value from compModParam */
6506 sresmask_to_use = (uint16_t)sresmask;
6507 }
6508 else {
6509 /* With masks (in section). Choose between sresmask1 and sresmask2 */
6510 if (rb==1 || (i%1)==0) {
6511 /* Even values */
6512 sresmask_to_use = (uint16_t)sresmask1;
6513 }
6514 else {
6515 /* Odd values */
6516 sresmask_to_use = (uint16_t)sresmask2;
6517 }
6518 }
6519
6520 /* Count REs present using sresmask */
6521 res_per_prb = 0;
6522 /* Use sresmask to pick out which REs are present */
6523 for (unsigned n=0; n<12; n++) {
6524 if (sresmask_to_use & (1<<n)) {
6525 res_per_prb++;
6526 }
6527 }
6528 }
6529
6530 /* N.B. bytes for samples need to be padded out to next byte
6531 (certainly where there aren't 12 REs in PRB..) */
6532 unsigned nBytesForSamples = (sample_bit_width * res_per_prb * 2 + 7) / 8;
6533 nBytesPerPrb = nBytesForSamples + udcompparam_len;
6534
6535 proto_tree_add_item(rb_tree, hf_oran_iq_user_data, tvb, offset, nBytesForSamples, ENC_NA0x00000000);
6536
6537 tap_info->non_zero_re_in_current_prb = false0;
6538
6539 /* Optionally trying to show I/Q RE values */
6540 if (pref_showIQSampleValues) {
6541 /* Individual values */
6542 unsigned samples_offset = offset*8;
6543 unsigned samples = 0;
6544
6545 if (compression >= BFP_AND_SELECTIVE_RE5) {
6546 /* Use sresmask to pick out which REs are present */
6547 for (unsigned n=1; n<=12; n++) {
6548 if (sresmask_to_use & (1<<(n-1))) {
6549 samples_offset = dissect_oran_u_re(tvb, rb_tree,
6550 n, samples_offset, tap_info, sample_bit_width, compression, exponent);
6551 samples++;
6552 }
6553 }
6554 }
6555 else {
6556 /* All 12 REs are present */
6557 for (unsigned n=1; n<=12; n++) {
6558 samples_offset = dissect_oran_u_re(tvb, rb_tree,
6559 n, samples_offset, tap_info, sample_bit_width, compression, exponent);
6560 samples++;
6561 }
6562 }
6563 proto_item_append_text(prbHeading, " (%u REs)", samples);
6564
6565 /* Was this PRB all zeros? */
6566 if (!tap_info->non_zero_re_in_current_prb) {
6567 tap_info->num_prbs_zero++;
6568 /* Add a filter to make zero-valued PRBs more findable */
6569 proto_tree_add_item(rb_tree, hf_oran_zero_prb, tvb,
6570 samples_offset/8, nBytesForSamples, ENC_NA0x00000000);
6571 proto_item_append_text(prbHeading, " (all zeros)");
6572 }
6573 }
6574
6575 tap_info->num_prbs++;
6576
6577
6578 /* Advance past samples */
6579 offset += nBytesForSamples;
6580
6581 /* Set end of prb subtree */
6582 proto_item_set_end(prbHeading, tvb, offset);
6583 }
6584
6585 /* Set extent of section */
6586 proto_item_set_len(sectionHeading, offset-section_start_offset);
6587 if (ud_comp_len_ti != NULL((void*)0) && ((offset-section_start_offset != ud_comp_len))) {
6588 expert_add_info_format(pinfo, ud_comp_len_ti, &ei_oran_ud_comp_len_wrong_size,
6589 "udCompLen indicates %u bytes in section, but dissected %u instead",
6590 ud_comp_len, offset-section_start_offset);
6591 }
6592
6593 bytesLeft = tvb_captured_length(tvb) - offset;
6594 number_of_sections++;
6595 } while (bytesLeft >= (4 + nBytesPerPrb)); /* FIXME: bad heuristic */
6596
6597 /* Show number of sections found */
6598 proto_item *ti = proto_tree_add_uint(oran_tree, hf_oran_numberOfSections, tvb, 0, 0, number_of_sections);
6599 proto_item_set_generated(ti);
6600
6601 /* Expert error if we are short of tvb by > 3 bytes */
6602 if (tvb_reported_length_remaining(tvb, offset) > 3) {
6603 expert_add_info_format(pinfo, protocol_item, &ei_oran_frame_length,
6604 "%u bytes remain at end of frame - should be 0-3",
6605 tvb_reported_length_remaining(tvb, offset));
6606 }
6607
6608 return tvb_captured_length(tvb);
6609}
6610
6611
6612/**********************************************************************/
6613/* Main dissection function. */
6614/* N.B. ecpri message type passed in as 'data' arg by eCPRI dissector */
6615static int
6616dissect_oran(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
6617{
6618 uint32_t ecpri_message_type = *(uint32_t *)data;
6619 int offset = 0;
6620
6621 /* Allocate and zero tap struct */
6622 oran_tap_info *tap_info = wmem_new0(wmem_file_scope(), oran_tap_info)((oran_tap_info*)wmem_alloc0((wmem_file_scope()), sizeof(oran_tap_info
)))
;
6623 tap_info->pdu_size = pinfo->fd->pkt_len;
6624
6625 switch (ecpri_message_type) {
6626 case ECPRI_MT_IQ_DATA0:
6627 offset = dissect_oran_u(tvb, pinfo, tree, tap_info, data);
6628 break;
6629 case ECPRI_MT_RT_CTRL_DATA2:
6630 offset = dissect_oran_c(tvb, pinfo, tree, tap_info, data);
6631 break;
6632 default:
6633 /* Not dissecting other types - assume these are handled by eCPRI dissector */
6634 return 0;
6635 }
6636
6637 tap_queue_packet(oran_tap, pinfo, tap_info);
6638
6639 return offset;
6640}
6641
6642static void oran_init_protocol(void)
6643{
6644 udcomplen_heuristic_result_set = false0;
6645 udcomplen_heuristic_result = false0;
6646}
6647
6648
6649/* Register the protocol with Wireshark. */
6650void
6651proto_register_oran(void)
6652{
6653 static hf_register_info hf[] = {
6654
6655 /* Section 5.1.3.2.7 */
6656 { &hf_oran_du_port_id,
6657 { "DU Port ID", "oran_fh_cus.du_port_id",
6658 FT_UINT16, BASE_DEC,
6659 NULL((void*)0), 0x0,
6660 "Processing unit at O-RU - width set in dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6661 },
6662
6663 /* Section 5.1.3.2.7 */
6664 { &hf_oran_bandsector_id,
6665 { "BandSector ID", "oran_fh_cus.bandsector_id",
6666 FT_UINT16, BASE_DEC,
6667 NULL((void*)0), 0x0,
6668 "Aggregated cell identified - width set in dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6669 },
6670
6671 /* Section 5.1.3.2.7 */
6672 { &hf_oran_cc_id,
6673 { "CC ID", "oran_fh_cus.cc_id",
6674 FT_UINT16, BASE_DEC,
6675 NULL((void*)0), 0x0,
6676 "Component Carrier - width set in dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6677 },
6678
6679 /* Section 5.1.3.2.7 */
6680 { &hf_oran_ru_port_id,
6681 { "RU Port ID", "oran_fh_cus.ru_port_id",
6682 FT_UINT16, BASE_DEC,
6683 NULL((void*)0), 0x0,
6684 "Logical flow - width set in dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6685 },
6686
6687 /* Section 5.1.3.2.8 */
6688 { &hf_oran_sequence_id,
6689 { "Sequence ID", "oran_fh_cus.sequence_id",
6690 FT_UINT8, BASE_DEC,
6691 NULL((void*)0), 0x0,
6692 "The Sequence ID wraps around individually per eAxC", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6693 },
6694
6695 /* Section 5.1.3.2.8 */
6696 { &hf_oran_e_bit,
6697 { "E Bit", "oran_fh_cus.e_bit",
6698 FT_UINT8, BASE_DEC,
6699 VALS(e_bit)((0 ? (const struct _value_string*)0 : ((e_bit)))), 0x80,
6700 "Indicate the last message of a subsequence (U-Plane only)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6701 },
6702
6703 /* Section 5.1.3.2.8 */
6704 { &hf_oran_subsequence_id,
6705 { "Subsequence ID", "oran_fh_cus.subsequence_id",
6706 FT_UINT8, BASE_DEC,
6707 NULL((void*)0), 0x7f,
6708 "The subsequence ID (for eCPRI layer fragmentation)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6709 },
6710
6711 { &hf_oran_previous_frame,
6712 { "Previous frame in stream", "oran_fh_cus.previous-frame",
6713 FT_FRAMENUM, BASE_NONE,
6714 FRAMENUM_TYPE(FT_FRAMENUM_NONE)((gpointer) (glong) (FT_FRAMENUM_NONE)), 0x0,
6715 "Previous frame in sequence", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6716 },
6717
6718 /* Section 7.5.2.1 */
6719 { &hf_oran_data_direction,
6720 { "Data Direction", "oran_fh_cus.data_direction",
6721 FT_UINT8, BASE_DEC,
6722 VALS(data_direction_vals)((0 ? (const struct _value_string*)0 : ((data_direction_vals)
)))
, 0x80,
6723 "gNB data direction", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6724 },
6725
6726 /* Section 7.5.2.2 */
6727 { &hf_oran_payload_version,
6728 { "Payload Version", "oran_fh_cus.payloadVersion",
6729 FT_UINT8, BASE_DEC,
6730 NULL((void*)0), 0x70,
6731 "Payload protocol version the following IEs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6732 },
6733
6734 /* Section 7.5.2.3 */
6735 { &hf_oran_filter_index,
6736 { "Filter Index", "oran_fh_cus.filterIndex",
6737 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
6738 RVALS(filter_indices)((0 ? (const struct _range_string*)0 : ((filter_indices)))), 0x0f,
6739 "used between IQ data and air interface, both in DL and UL", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6740 },
6741
6742 /* Section 7.5.2.4 */
6743 { &hf_oran_frame_id,
6744 { "Frame ID", "oran_fh_cus.frameId",
6745 FT_UINT8, BASE_DEC,
6746 NULL((void*)0), 0x0,
6747 "A counter for 10 ms frames (wrapping period 2.56 seconds)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6748 },
6749
6750 /* Section 7.5.2.5 */
6751 { &hf_oran_subframe_id,
6752 { "Subframe ID", "oran_fh_cus.subframe_id",
6753 FT_UINT8, BASE_DEC,
6754 NULL((void*)0), 0xf0,
6755 "A counter for 1 ms sub-frames within 10ms frame", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6756 },
6757
6758 /* Section 7.5.2.6 */
6759 { &hf_oran_slot_id,
6760 { "Slot ID", "oran_fh_cus.slotId",
6761 FT_UINT16, BASE_DEC,
6762 NULL((void*)0), 0x0fc0,
6763 "Slot number within a 1ms sub-frame", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6764 },
6765
6766 /* Generated for convenience */
6767 { &hf_oran_slot_within_frame,
6768 { "Slot within frame", "oran_fh_cus.slot-within-frame",
6769 FT_UINT16, BASE_DEC,
6770 NULL((void*)0), 0x0,
6771 "Slot within frame, to match DCT logs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6772 },
6773
6774 /* Section 7.5.2.7 */
6775 { &hf_oran_start_symbol_id,
6776 { "Start Symbol ID", "oran_fh_cus.startSymbolId",
6777 FT_UINT8, BASE_DEC,
6778 NULL((void*)0), 0x3f,
6779 "The first symbol number within slot affected", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6780 },
6781
6782 /* Section 7.5.2.8 */
6783 { &hf_oran_numberOfSections,
6784 { "Number of Sections", "oran_fh_cus.numberOfSections",
6785 FT_UINT8, BASE_DEC,
6786 NULL((void*)0), 0x0,
6787 "The number of section IDs included in this C-Plane message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6788 },
6789
6790 /* Section 7.5.2.9 */
6791 { &hf_oran_sectionType,
6792 { "Section Type", "oran_fh_cus.sectionType",
6793 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
6794 RVALS(section_types)((0 ? (const struct _range_string*)0 : ((section_types)))), 0x0,
6795 "Determines the characteristics of U-plane data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6796 },
6797
6798 /* Section 7.5.2.10 */
6799 { &hf_oran_udCompHdr,
6800 { "udCompHdr", "oran_fh_cus.udCompHdr",
6801 FT_STRING, BASE_NONE,
6802 NULL((void*)0), 0x0,
6803 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6804 },
6805
6806 /* Section 7.5.2.11 */
6807 { &hf_oran_numberOfUEs,
6808 { "Number Of UEs", "oran_fh_cus.numberOfUEs",
6809 FT_UINT8, BASE_DEC,
6810 NULL((void*)0), 0x0,
6811 "Indicates number of UEs for which channel info is provided", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6812 },
6813
6814 /* Section 7.5.2.12 */
6815 { &hf_oran_timeOffset,
6816 { "Time Offset", "oran_fh_cus.timeOffset",
6817 FT_UINT16, BASE_DEC,
6818 NULL((void*)0), 0x0,
6819 "from start of the slot to start of CP in samples", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6820 },
6821
6822 /* Section 7.5.2.13 */
6823 { &hf_oran_frameStructure_fft,
6824 { "FFT Size", "oran_fh_cus.frameStructure.fft",
6825 FT_UINT8, BASE_HEX | BASE_RANGE_STRING0x00000100,
6826 RVALS(frame_structure_fft)((0 ? (const struct _range_string*)0 : ((frame_structure_fft)
)))
, 0xf0,
6827 "The FFT/iFFT size being used for all IQ data processing related to this message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6828 },
6829
6830 /* Section 7.5.2.13 */
6831 { &hf_oran_frameStructure_subcarrier_spacing,
6832 { "Subcarrier Spacing", "oran_fh_cus.frameStructure.spacing",
6833 FT_UINT8, BASE_HEX | BASE_RANGE_STRING0x00000100,
6834 RVALS(subcarrier_spacings)((0 ? (const struct _range_string*)0 : ((subcarrier_spacings)
)))
, 0x0f,
6835 "The sub carrier spacing as well as the number of slots per 1ms sub-frame",
6836 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6837 },
6838
6839 /* Section 7.5.2.14 */
6840 { &hf_oran_cpLength,
6841 { "cpLength", "oran_fh_cus.cpLength",
6842 FT_UINT16, BASE_DEC,
6843 NULL((void*)0), 0x0,
6844 "cyclic prefix length", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6845 },
6846
6847 { &hf_oran_timing_header,
6848 { "Timing Header", "oran_fh_cus.timingHeader",
6849 FT_STRING, BASE_NONE,
6850 NULL((void*)0), 0x0,
6851 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6852 },
6853
6854 /* Section 7.5.3.1 */
6855 { &hf_oran_section_id,
6856 { "sectionId", "oran_fh_cus.sectionId",
6857 FT_UINT16, BASE_DEC,
6858 NULL((void*)0), 0xfff0,
6859 "section identifier of data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6860 },
6861
6862 /* Section 7.5.3.2 */
6863 { &hf_oran_rb,
6864 { "rb", "oran_fh_cus.rb",
6865 FT_UINT8, BASE_DEC,
6866 VALS(rb_vals)((0 ? (const struct _value_string*)0 : ((rb_vals)))), 0x08,
6867 "resource block indicator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6868 },
6869
6870 /* Section 7.5.5.3 */
6871 { &hf_oran_symInc,
6872 { "symInc", "oran_fh_cus.symInc",
6873 FT_UINT8, BASE_DEC,
6874 VALS(sym_inc_vals)((0 ? (const struct _value_string*)0 : ((sym_inc_vals)))), 0x04,
6875 "Symbol Number Increment Command", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6876 },
6877
6878 /* Section 7.5.3.4 */
6879 { &hf_oran_startPrbc,
6880 { "startPrbc", "oran_fh_cus.startPrbc",
6881 FT_UINT16, BASE_DEC,
6882 NULL((void*)0), 0x03ff,
6883 "Starting PRB of Control Plane Section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6884 },
6885
6886 /* Section 7.5.3.5 */
6887 { &hf_oran_reMask_re1,
6888 { "RE 1", "oran_fh_cus.reMask-RE1",
6889 FT_BOOLEAN, 16,
6890 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x8000,
6891 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6892 },
6893 { &hf_oran_reMask_re2,
6894 { "RE 2", "oran_fh_cus.reMask-RE2",
6895 FT_BOOLEAN, 16,
6896 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x4000,
6897 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6898 },
6899 { &hf_oran_reMask_re3,
6900 { "RE 3", "oran_fh_cus.reMask-RE3",
6901 FT_BOOLEAN, 16,
6902 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x2000,
6903 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6904 },
6905 { &hf_oran_reMask_re4,
6906 { "RE 4", "oran_fh_cus.reMask-RE4",
6907 FT_BOOLEAN, 16,
6908 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x1000,
6909 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6910 },
6911 { &hf_oran_reMask_re5,
6912 { "RE 5", "oran_fh_cus.reMask-RE5",
6913 FT_BOOLEAN, 16,
6914 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0800,
6915 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6916 },
6917 { &hf_oran_reMask_re6,
6918 { "RE 6", "oran_fh_cus.reMask-RE6",
6919 FT_BOOLEAN, 16,
6920 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0400,
6921 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6922 },
6923 { &hf_oran_reMask_re7,
6924 { "RE 7", "oran_fh_cus.reMask-RE7",
6925 FT_BOOLEAN, 16,
6926 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0200,
6927 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6928 },
6929 { &hf_oran_reMask_re8,
6930 { "RE 8", "oran_fh_cus.reMask-RE8",
6931 FT_BOOLEAN, 16,
6932 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0100,
6933 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6934 },
6935 { &hf_oran_reMask_re9,
6936 { "RE 9", "oran_fh_cus.reMask-RE9",
6937 FT_BOOLEAN, 16,
6938 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0080,
6939 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6940 },
6941 { &hf_oran_reMask_re10,
6942 { "RE 10", "oran_fh_cus.reMask-RE10",
6943 FT_BOOLEAN, 16,
6944 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0040,
6945 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6946 },
6947 { &hf_oran_reMask_re11,
6948 { "RE 11", "oran_fh_cus.reMask-RE11",
6949 FT_BOOLEAN, 16,
6950 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0020,
6951 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6952 },
6953 { &hf_oran_reMask_re12,
6954 { "RE 12", "oran_fh_cus.reMask-RE12",
6955 FT_BOOLEAN, 16,
6956 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0010,
6957 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6958 },
6959 { &hf_oran_reMask,
6960 { "RE Mask", "oran_fh_cus.reMask",
6961 FT_UINT16, BASE_HEX,
6962 NULL((void*)0), 0xfff0,
6963 "The Resource Element (RE) mask within a PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6964 },
6965
6966 /* Section 7.5.3.6 */
6967 { &hf_oran_numPrbc,
6968 { "numPrbc", "oran_fh_cus.numPrbc",
6969 FT_UINT8, BASE_DEC,
6970 NULL((void*)0), 0x0,
6971 "Number of contiguous PRBs per data section description", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6972 },
6973
6974 /* Section 7.5.3.7 */
6975 { &hf_oran_numSymbol,
6976 { "Number of Symbols", "oran_fh_cus.numSymbol",
6977 FT_UINT8, BASE_DEC,
6978 NULL((void*)0), 0x0f,
6979 "Defines number of symbols to which the section control is applicable", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6980 },
6981
6982 /* Section 7.5.3.8 */
6983 { &hf_oran_ef,
6984 { "Extension Flag", "oran_fh_cus.ef",
6985 FT_BOOLEAN, 8,
6986 NULL((void*)0), 0x80,
6987 "Indicates if more section extensions follow", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6988 },
6989
6990 /* Section 7.5.3.9 */
6991 { &hf_oran_beamId,
6992 { "Beam ID", "oran_fh_cus.beamId",
6993 FT_UINT16, BASE_DEC,
6994 NULL((void*)0), 0x7fff,
6995 "Defines the beam pattern to be applied to the U-Plane data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6996 },
6997
6998 { &hf_oran_extension,
6999 { "Extension", "oran_fh_cus.extension",
7000 FT_STRING, BASE_NONE,
7001 NULL((void*)0), 0x0,
7002 "Section extension", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7003 },
7004
7005 /* Section 7.6.2.1 */
7006 { &hf_oran_exttype,
7007 { "extType", "oran_fh_cus.extType",
7008 FT_UINT8, BASE_DEC,
7009 VALS(exttype_vals)((0 ? (const struct _value_string*)0 : ((exttype_vals)))), 0x7f,
7010 "The extension type, which provides additional parameters specific to subject data extension", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7011 },
7012
7013 /* Section 7.6.2.3 */
7014 { &hf_oran_extlen,
7015 { "extLen", "oran_fh_cus.extLen",
7016 FT_UINT16, BASE_DEC,
7017 NULL((void*)0), 0x0,
7018 "Extension length in 32-bit words", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7019 },
7020
7021 /* Section 7.7.1 */
7022 { &hf_oran_bfw,
7023 { "bfw", "oran_fh_cus.bfw",
7024 FT_STRING, BASE_NONE,
7025 NULL((void*)0), 0x0,
7026 "Set of weights for a particular antenna", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7027 },
7028 { &hf_oran_bfw_bundle,
7029 { "Bundle", "oran_fh_cus.bfw.bundle",
7030 FT_STRING, BASE_NONE,
7031 NULL((void*)0), 0x0,
7032 "Bundle of BFWs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7033 },
7034 { &hf_oran_bfw_bundle_id,
7035 { "Bundle Id", "oran_fh_cus.bfw.bundleId",
7036 FT_UINT32, BASE_DEC,
7037 NULL((void*)0), 0x0,
7038 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7039 },
7040 /* Section 7.7.1.4 */
7041 { &hf_oran_bfw_i,
7042 { "bfwI", "oran_fh_cus.bfwI",
7043 FT_FLOAT, BASE_NONE,
7044 NULL((void*)0), 0x0,
7045 "In-phase", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7046 },
7047 /* Section 7.7.1.5 */
7048 { &hf_oran_bfw_q,
7049 { "bfwQ", "oran_fh_cus.bfwQ",
7050 FT_FLOAT, BASE_NONE,
7051 NULL((void*)0), 0x0,
7052 "Quadrature", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7053 },
7054
7055 /* Section 7.5.3.10 */
7056 { &hf_oran_ueId,
7057 { "UE ID", "oran_fh_cus.ueId",
7058 FT_UINT16, BASE_DEC,
7059 NULL((void*)0), 0x7fff,
7060 "logical identifier for set of channel info", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7061 },
7062
7063 /* Section 7.5.3.11 */
7064 { &hf_oran_freqOffset,
7065 { "Frequency Offset", "oran_fh_cus.freqOffset",
7066 FT_UINT24, BASE_DEC,
7067 NULL((void*)0), 0x0,
7068 "with respect to the carrier center frequency before additional filtering", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7069 },
7070
7071 /* Section 7.5.3.12 */
7072 { &hf_oran_regularizationFactor,
7073 { "Regularization Factor", "oran_fh_cus.regularizationFactor",
7074 FT_INT16, BASE_DEC,
7075 NULL((void*)0), 0x0,
7076 "Signed value to support MMSE operation within O-RU", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7077 },
7078
7079 /* Section 7.5.3.14 */
7080 { &hf_oran_laaMsgType,
7081 { "LAA Message Type", "oran_fh_cus.laaMsgType",
7082 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
7083 RVALS(laaMsgTypes)((0 ? (const struct _range_string*)0 : ((laaMsgTypes)))), 0xf0,
7084 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7085 },
7086
7087 /* Section 7.5.3.15 */
7088 { &hf_oran_laaMsgLen,
7089 { "LAA Message Length", "oran_fh_cus.laaMsgLen",
7090 FT_UINT8, BASE_DEC,
7091 NULL((void*)0), 0x0f,
7092 "number of 32-bit words in the LAA section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7093 },
7094
7095 /* Section 7.5.3.16 */
7096 { &hf_oran_lbtHandle,
7097 { "LBT Handle", "oran_fh_cus.lbtHandle",
7098 FT_UINT16, BASE_HEX,
7099 NULL((void*)0), 0x0,
7100 "label to identify transaction", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7101 },
7102
7103 /* Section 7.5.3.17 */
7104 { &hf_oran_lbtDeferFactor,
7105 { "Defer Factor", "oran_fh_cus.lbtDeferFactor",
7106 FT_UINT8, BASE_DEC,
7107 NULL((void*)0), 0x07,
7108 "Defer factor in sensing slots as described in 3GPP TS 36.213 Section 15.1.1", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7109 },
7110
7111 /* Section 7.5.3.18 */
7112 { &hf_oran_lbtBackoffCounter,
7113 { "Backoff Counter", "oran_fh_cus.lbtBackoffCounter",
7114 FT_UINT16, BASE_DEC,
7115 NULL((void*)0), 0xffc0,
7116 "LBT backoff counter in sensing slots as described in 3GPP TS 36.213 Section 15.1.1", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7117 },
7118
7119 /* Section 7.5.3.19 */
7120 { &hf_oran_lbtOffset,
7121 { "LBT Offset", "oran_fh_cus.lbtOffset",
7122 FT_UINT16, BASE_DEC,
7123 NULL((void*)0), 0xffc0,
7124 "LBT start time in microseconds from the beginning of the subframe scheduled by this message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7125 },
7126
7127 /* Section 7.5.3.20 */
7128 { &hf_oran_MCOT,
7129 { "Maximum Channel Occupancy Time", "oran_fh_cus.MCOT",
7130 FT_UINT8, BASE_DEC,
7131 NULL((void*)0), 0x3c,
7132 "LTE TXOP duration in subframes as described in 3GPP TS 36.213 Section 15.1.1", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7133 },
7134
7135 /* Section 7.5.3.21 */
7136 { &hf_oran_lbtMode,
7137 { "LBT Mode", "oran_fh_cus.lbtMode",
7138 FT_UINT8, BASE_DEC,
7139 VALS(lbtMode_vals)((0 ? (const struct _value_string*)0 : ((lbtMode_vals)))), 0x0,
7140 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7141 },
7142
7143 /* Section 7.5.3.22 */
7144 { &hf_oran_lbtPdschRes,
7145 { "lbtPdschRes", "oran_fh_cus.lbtPdschRes",
7146 FT_UINT8, BASE_DEC,
7147 VALS(lbtPdschRes_vals)((0 ? (const struct _value_string*)0 : ((lbtPdschRes_vals)))), 0xc0,
7148 "LBT result of SFN/SF", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7149 },
7150
7151 /* Section 7.5.3.23 */
7152 { &hf_oran_sfStatus,
7153 { "sfStatus", "oran_fh_cus.sfStatus",
7154 FT_BOOLEAN, 8,
7155 TFS(&tfs_sfStatus)((0 ? (const struct true_false_string*)0 : ((&tfs_sfStatus
))))
, 0x10,
7156 "Indicates whether the subframe was dropped or transmitted", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7157 },
7158
7159 /* Section 7.5.3.22 */
7160 { &hf_oran_lbtDrsRes,
7161 { "lbtDrsRes", "oran_fh_cus.lbtDrsRes",
7162 FT_BOOLEAN, 8,
7163 TFS(&tfs_fail_success)((0 ? (const struct true_false_string*)0 : ((&tfs_fail_success
))))
, 0x80,
7164 "Indicates whether the subframe was dropped or transmitted", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7165 },
7166
7167 /* Section 7.5.3.25 */
7168 { &hf_oran_initialPartialSF,
7169 { "Initial partial SF", "oran_fh_cus.initialPartialSF",
7170 FT_BOOLEAN, 8,
7171 TFS(&tfs_partial_full_sf)((0 ? (const struct true_false_string*)0 : ((&tfs_partial_full_sf
))))
, 0x40,
7172 "Indicates whether the initial SF in the LBT process is full or partial", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7173 },
7174
7175 /* Section 7.5.3.26. */
7176 { &hf_oran_lbtBufErr,
7177 { "lbtBufErr", "oran_fh_cus.lbtBufErr",
7178 FT_BOOLEAN, 8,
7179 TFS(&tfs_lbtBufErr)((0 ? (const struct true_false_string*)0 : ((&tfs_lbtBufErr
))))
, 0x80,
7180 "LBT buffer error", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7181 },
7182
7183 /* Section 7.5.3.27 */
7184 { &hf_oran_sfnSfEnd,
7185 { "SFN/SF End", "oran_fh_cus.sfnSfEnd",
7186 FT_UINT16, BASE_DEC,
7187 NULL((void*)0), 0x0fff,
7188 "SFN/SF by which the DRS window must end", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7189 },
7190
7191 /* Section 7.5.3.28 */
7192 { &hf_oran_lbtCWConfig_H,
7193 { "lbtCWConfig_H", "oran_fh_cus.lbtCWConfig_H",
7194 FT_UINT8, BASE_DEC,
7195 NULL((void*)0), 0x0,
7196 "HARQ parameters for congestion window management", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7197 },
7198
7199 /* Section 7.5.3.29 */
7200 { &hf_oran_lbtCWConfig_T,
7201 { "lbtCWConfig_T", "oran_fh_cus.lbtCWConfig_T",
7202 FT_UINT8, BASE_DEC,
7203 NULL((void*)0), 0x0,
7204 "TB parameters for congestion window management", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7205 },
7206
7207 /* Section 7.5.3.30 */
7208 { &hf_oran_lbtTrafficClass,
7209 { "lbtTrafficClass", "oran_fh_cus.lbtTrafficClass",
7210 FT_UINT8, BASE_DEC,
7211 VALS(lbtTrafficClass_vals)((0 ? (const struct _value_string*)0 : ((lbtTrafficClass_vals
))))
, 0x38,
7212 "Traffic class priority for congestion window management", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7213 },
7214
7215 /* Section 7.5.3.31 */
7216 { &hf_oran_lbtCWR_Rst,
7217 { "lbtCWR_Rst", "oran_fh_cus.lbtCWR_Rst",
7218 FT_BOOLEAN, 8,
7219 TFS(&tfs_fail_success)((0 ? (const struct true_false_string*)0 : ((&tfs_fail_success
))))
, 0x80,
7220 "notification about packet reception successful or not", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7221 },
7222
7223 /* Reserved fields */
7224 { &hf_oran_reserved,
7225 { "reserved", "oran_fh_cus.reserved",
7226 FT_UINT64, BASE_HEX,
7227 NULL((void*)0), 0x0,
7228 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7229 },
7230
7231 { &hf_oran_reserved_1bit,
7232 { "reserved", "oran_fh_cus.reserved",
7233 FT_UINT8, BASE_HEX,
7234 NULL((void*)0), 0x80,
7235 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7236 },
7237 { &hf_oran_reserved_2bits,
7238 { "reserved", "oran_fh_cus.reserved",
7239 FT_UINT8, BASE_HEX,
7240 NULL((void*)0), 0xc0,
7241 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7242 },
7243 { &hf_oran_reserved_3bits,
7244 { "reserved", "oran_fh_cus.reserved",
7245 FT_UINT8, BASE_HEX,
7246 NULL((void*)0), 0xe0,
7247 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7248 },
7249 { &hf_oran_reserved_4bits,
7250 { "reserved", "oran_fh_cus.reserved",
7251 FT_UINT8, BASE_HEX,
7252 NULL((void*)0), 0xf0,
7253 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7254 },
7255 { &hf_oran_reserved_last_4bits,
7256 { "reserved", "oran_fh_cus.reserved",
7257 FT_UINT8, BASE_HEX,
7258 NULL((void*)0), 0x0f,
7259 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7260 },
7261 { &hf_oran_reserved_last_5bits,
7262 { "reserved", "oran_fh_cus.reserved",
7263 FT_UINT8, BASE_HEX,
7264 NULL((void*)0), 0x1f,
7265 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7266 },
7267 { &hf_oran_reserved_6bits,
7268 { "reserved", "oran_fh_cus.reserved",
7269 FT_UINT8, BASE_HEX,
7270 NULL((void*)0), 0xfc,
7271 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7272 },
7273 { &hf_oran_reserved_last_6bits,
7274 { "reserved", "oran_fh_cus.reserved",
7275 FT_UINT8, BASE_HEX,
7276 NULL((void*)0), 0x3f,
7277 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7278 },
7279 { &hf_oran_reserved_7bits,
7280 { "reserved", "oran_fh_cus.reserved",
7281 FT_UINT8, BASE_HEX,
7282 NULL((void*)0), 0xfe,
7283 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7284 },
7285 { &hf_oran_reserved_last_7bits,
7286 { "reserved", "oran_fh_cus.reserved",
7287 FT_UINT8, BASE_HEX,
7288 NULL((void*)0), 0x7f,
7289 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7290 },
7291 { &hf_oran_reserved_8bits,
7292 { "reserved", "oran_fh_cus.reserved",
7293 FT_UINT8, BASE_HEX,
7294 NULL((void*)0), 0x0,
7295 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7296 },
7297 { &hf_oran_reserved_16bits,
7298 { "reserved", "oran_fh_cus.reserved",
7299 FT_UINT16, BASE_HEX,
7300 NULL((void*)0), 0x0,
7301 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7302 },
7303 { &hf_oran_reserved_15bits,
7304 { "reserved", "oran_fh_cus.reserved",
7305 FT_UINT16, BASE_HEX,
7306 NULL((void*)0), 0x7fff,
7307 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7308 },
7309 { &hf_oran_reserved_bit1,
7310 { "reserved", "oran_fh_cus.reserved",
7311 FT_UINT8, BASE_HEX,
7312 NULL((void*)0), 0x40,
7313 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7314 },
7315 { &hf_oran_reserved_bit2,
7316 { "reserved", "oran_fh_cus.reserved",
7317 FT_UINT8, BASE_HEX,
7318 NULL((void*)0), 0x20,
7319 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7320 },
7321 { &hf_oran_reserved_bit4,
7322 { "reserved", "oran_fh_cus.reserved",
7323 FT_UINT8, BASE_HEX,
7324 NULL((void*)0), 0x08,
7325 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7326 },
7327 { &hf_oran_reserved_bit5,
7328 { "reserved", "oran_fh_cus.reserved",
7329 FT_UINT8, BASE_HEX,
7330 NULL((void*)0), 0x04,
7331 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7332 },
7333 { &hf_oran_reserved_bits123,
7334 { "reserved", "oran_fh_cus.reserved",
7335 FT_UINT8, BASE_HEX,
7336 NULL((void*)0), 0x70,
7337 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7338 },
7339 { &hf_oran_reserved_bits456,
7340 { "reserved", "oran_fh_cus.reserved",
7341 FT_UINT8, BASE_HEX,
7342 NULL((void*)0), 0x0e,
7343 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7344 },
7345
7346
7347 /* 7.7.11.10 */
7348 { &hf_oran_bundle_offset,
7349 { "BundleOffset", "oran_fh_cus.bundleOffset",
7350 FT_UINT8, BASE_DEC,
7351 NULL((void*)0), 0x3f,
7352 "offset between start of first PRB bundle and startPrbc", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7353 },
7354 /* 7.7.11.9 */
7355 { &hf_oran_cont_ind,
7356 { "contInd", "oran_fh_cus.contInd",
7357 FT_BOOLEAN, 8,
7358 TFS(&continuity_indication_tfs)((0 ? (const struct true_false_string*)0 : ((&continuity_indication_tfs
))))
, 0x80,
7359 "PRB region continuity flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7360 },
7361
7362 /* 7.7.1.2 bfwCompHdr (beamforming weight compression header) */
7363 { &hf_oran_bfwCompHdr,
7364 { "bfwCompHdr", "oran_fh_cus.bfwCompHdr",
7365 FT_STRING, BASE_NONE,
7366 NULL((void*)0), 0x0,
7367 "Compression method and IQ bit width for beamforming weights", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7368 },
7369 { &hf_oran_bfwCompHdr_iqWidth,
7370 { "IQ Bit Width", "oran_fh_cus.bfwCompHdr_iqWidth",
7371 FT_UINT8, BASE_HEX,
7372 VALS(bfw_comp_headers_iq_width)((0 ? (const struct _value_string*)0 : ((bfw_comp_headers_iq_width
))))
, 0xf0,
7373 "IQ bit width for the beamforming weights", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7374 },
7375 { &hf_oran_bfwCompHdr_compMeth,
7376 { "Compression Method", "oran_fh_cus.bfwCompHdr_compMeth",
7377 FT_UINT8, BASE_HEX,
7378 VALS(bfw_comp_headers_comp_meth)((0 ? (const struct _value_string*)0 : ((bfw_comp_headers_comp_meth
))))
, 0x0f,
7379 "compression method for the beamforming weights", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7380 },
7381
7382 /* 7.5.3.32 */
7383 { &hf_oran_ciCompParam,
7384 { "ciCompParam", "oran_fh_cus.ciCompParam",
7385 FT_STRING, BASE_NONE,
7386 NULL((void*)0), 0x0,
7387 "channel information compression parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7388 },
7389
7390 /* Table 7.5.3.32-1 */
7391 { &hf_oran_blockScaler,
7392 { "blockScaler", "oran_fh_cus.blockScaler",
7393 FT_UINT8, BASE_HEX,
7394 NULL((void*)0), 0x0,
7395 "unsigned, 1 integer bit, 7 fractional bits", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7396 },
7397 { &hf_oran_compBitWidth,
7398 { "compBitWidth", "oran_fh_cus.compBitWidth",
7399 FT_UINT8, BASE_DEC,
7400 NULL((void*)0), 0xf0,
7401 "Length of I bits and length of Q bits after compression over entire PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7402 },
7403 { &hf_oran_compShift,
7404 { "compShift", "oran_fh_cus.compShift",
7405 FT_UINT8, BASE_DEC,
7406 NULL((void*)0), 0x0f,
7407 "The shift applied to the entire PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7408 },
7409
7410 { &hf_oran_active_beamspace_coefficient_n1,
7411 { "N1", "oran_fh_cus.activeBeamspace_Coefficient_n1",
7412 FT_BOOLEAN, 8,
7413 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x80,
7414 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7415 },
7416 { &hf_oran_active_beamspace_coefficient_n2,
7417 { "N2", "oran_fh_cus.activeBeamspace_Coefficient_n2",
7418 FT_BOOLEAN, 8,
7419 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x40,
7420 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7421 },
7422 { &hf_oran_active_beamspace_coefficient_n3,
7423 { "N3", "oran_fh_cus.activeBeamspace_Coefficient_n3",
7424 FT_BOOLEAN, 8,
7425 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x20,
7426 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7427 },
7428 { &hf_oran_active_beamspace_coefficient_n4,
7429 { "N4", "oran_fh_cus.activeBeamspace_Coefficient_n4",
7430 FT_BOOLEAN, 8,
7431 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x10,
7432 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7433 },
7434 { &hf_oran_active_beamspace_coefficient_n5,
7435 { "N5", "oran_fh_cus.activeBeamspace_Coefficient_n5",
7436 FT_BOOLEAN, 8,
7437 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x08,
7438 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7439 },
7440 { &hf_oran_active_beamspace_coefficient_n6,
7441 { "N6", "oran_fh_cus.activeBeamspace_Coefficient_n6",
7442 FT_BOOLEAN, 8,
7443 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x04,
7444 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7445 },
7446 { &hf_oran_active_beamspace_coefficient_n7,
7447 { "N7", "oran_fh_cus.activeBeamspace_Coefficient_n7",
7448 FT_BOOLEAN, 8,
7449 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x02,
7450 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7451 },
7452 { &hf_oran_active_beamspace_coefficient_n8,
7453 { "N8", "oran_fh_cus.activeBeamspace_Coefficient_n8",
7454 FT_BOOLEAN, 8,
7455 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x01,
7456 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7457 },
7458
7459 { &hf_oran_activeBeamspaceCoefficientMask,
7460 { "activeBeamspaceCoefficientMask", "oran_fh_cus.activeBeamspaceCoefficientMask",
7461 FT_UINT8, BASE_HEX,
7462 NULL((void*)0), 0xff,
7463 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7464 },
7465 { &hf_oran_activeBeamspaceCoefficientMask_bits_set,
7466 { "Array elements set", "oran_fh_cus.activeBeamspaceCoefficientMask.bits-set",
7467 FT_UINT32, BASE_DEC,
7468 NULL((void*)0), 0x0,
7469 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7470 },
7471
7472 /* Section 7.7.6.6 */
7473 { &hf_oran_se6_repetition,
7474 { "repetition", "oran_fh_cus.repetition",
7475 FT_BOOLEAN, BASE_NONE,
7476 TFS(&repetition_se6_tfs)((0 ? (const struct true_false_string*)0 : ((&repetition_se6_tfs
))))
, 0x0,
7477 "Repetition of a highest priority data section for C-Plane", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7478 },
7479 /* 7.7.20.9 */
7480 { &hf_oran_rbgSize,
7481 { "rbgSize", "oran_fh_cus.rbgSize",
7482 FT_UINT8, BASE_HEX,
7483 VALS(rbg_size_vals)((0 ? (const struct _value_string*)0 : ((rbg_size_vals)))), 0x70,
7484 "Number of PRBs of the resource block groups allocated by the bit mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7485 },
7486 /* 7.7.20.10 */
7487 { &hf_oran_rbgMask,
7488 { "rbgMask", "oran_fh_cus.rbgMask",
7489 FT_UINT32, BASE_HEX,
7490 NULL((void*)0), 0x0fffffff,
7491 "Each bit indicates whether a corresponding resource block group is present", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7492 },
7493 /* 7.7.6.5. Also 7.7.12.3 and 7.7.19.5 */
7494 { &hf_oran_noncontig_priority,
7495 { "priority", "oran_fh_cus.priority",
7496 FT_UINT8, BASE_HEX,
7497 VALS(priority_vals)((0 ? (const struct _value_string*)0 : ((priority_vals)))), 0xc0,
7498 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7499 },
7500
7501 /* 7.7.6.4 */
7502 { &hf_oran_symbol_mask,
7503 { "symbolMask", "oran_fh_cus.symbolMask",
7504 FT_UINT16, BASE_HEX,
7505 NULL((void*)0), 0x3fff,
7506 "Each bit indicates whether the rbgMask applies to a given symbol in the slot", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7507 },
7508 { &hf_oran_symbol_mask_s13,
7509 { "symbol 13", "oran_fh_cus.symbolMask.symbol-13",
7510 FT_BOOLEAN, 16,
7511 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x2000,
7512 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7513 },
7514 { &hf_oran_symbol_mask_s12,
7515 { "symbol 12", "oran_fh_cus.symbolMask.symbol-12",
7516 FT_BOOLEAN, 16,
7517 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x1000,
7518 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7519 },
7520 { &hf_oran_symbol_mask_s11,
7521 { "symbol 11", "oran_fh_cus.symbolMask.symbol-11",
7522 FT_BOOLEAN, 16,
7523 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0800,
7524 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7525 },
7526 { &hf_oran_symbol_mask_s10,
7527 { "symbol 10", "oran_fh_cus.symbolMask.symbol-10",
7528 FT_BOOLEAN, 16,
7529 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0400,
7530 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7531 },
7532 { &hf_oran_symbol_mask_s9,
7533 { "symbol 9", "oran_fh_cus.symbolMask.symbol-9",
7534 FT_BOOLEAN, 16,
7535 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0200,
7536 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7537 },
7538 { &hf_oran_symbol_mask_s8,
7539 { "symbol 8", "oran_fh_cus.symbolMask.symbol-8",
7540 FT_BOOLEAN, 16,
7541 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0100,
7542 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7543 },
7544 { &hf_oran_symbol_mask_s7,
7545 { "symbol 7", "oran_fh_cus.symbolMask.symbol-7",
7546 FT_BOOLEAN, 16,
7547 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0080,
7548 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7549 },
7550 { &hf_oran_symbol_mask_s6,
7551 { "symbol 6", "oran_fh_cus.symbolMask.symbol-6",
7552 FT_BOOLEAN, 16,
7553 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0040,
7554 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7555 },
7556 { &hf_oran_symbol_mask_s5,
7557 { "symbol 5", "oran_fh_cus.symbolMask.symbol-5",
7558 FT_BOOLEAN, 16,
7559 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0020,
7560 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7561 },
7562 { &hf_oran_symbol_mask_s4,
7563 { "symbol 4", "oran_fh_cus.symbolMask.symbol-4",
7564 FT_BOOLEAN, 16,
7565 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0010,
7566 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7567 },
7568 { &hf_oran_symbol_mask_s3,
7569 { "symbol 3", "oran_fh_cus.symbolMask.symbol-3",
7570 FT_BOOLEAN, 16,
7571 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0008,
7572 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7573 },
7574 { &hf_oran_symbol_mask_s2,
7575 { "symbol 2", "oran_fh_cus.symbolMask.symbol-2",
7576 FT_BOOLEAN, 16,
7577 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0004,
7578 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7579 },
7580 { &hf_oran_symbol_mask_s1,
7581 { "symbol 1", "oran_fh_cus.symbolMask.symbol-1",
7582 FT_BOOLEAN, 16,
7583 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0002,
7584 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7585 },
7586 { &hf_oran_symbol_mask_s0,
7587 { "symbol 0", "oran_fh_cus.symbolMask.symbol-0",
7588 FT_BOOLEAN, 16,
7589 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0001,
7590 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7591 },
7592
7593
7594 /* 7.7.22.2 */
7595 { &hf_oran_ack_nack_req_id,
7596 { "ackNackReqId", "oran_fh_cus.ackNackReqId",
7597 FT_UINT16, BASE_HEX,
7598 NULL((void*)0), 0x0,
7599 "Indicates the ACK/NACK request ID of a section description", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7600 },
7601
7602 /* Subtree for next 2 items */
7603 { &hf_oran_frequency_range,
7604 { "Frequency Range", "oran_fh_cus.frequencyRange",
7605 FT_STRING, BASE_NONE,
7606 NULL((void*)0), 0x0,
7607 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7608 },
7609
7610 /* 7.7.12.4 */
7611 { &hf_oran_off_start_prb,
7612 { "offStartPrb", "oran_fh_cus.offStartPrb",
7613 FT_UINT8, BASE_DEC,
7614 NULL((void*)0), 0x0,
7615 "Offset of PRB range start", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7616 },
7617 /* 7.7.12.5 */
7618 { &hf_oran_num_prb,
7619 { "numPrb", "oran_fh_cus.numPrb",
7620 FT_UINT8, BASE_DEC,
7621 NULL((void*)0), 0x0,
7622 "Number of PRBs in PRB range", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7623 },
7624
7625 /* symbolId 8.3.3.7 */
7626 { &hf_oran_symbolId,
7627 { "Symbol Identifier", "oran_fh_cus.symbolId",
7628 FT_UINT8, BASE_DEC,
7629 NULL((void*)0), 0x3f,
7630 "Identifies a symbol number within a slot", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7631 },
7632
7633 /* startPrbu 8.3.3.11 */
7634 { &hf_oran_startPrbu,
7635 { "startPrbu", "oran_fh_cus.startPrbu",
7636 FT_UINT16, BASE_DEC,
7637 NULL((void*)0), 0x03ff,
7638 "starting PRB of user plane section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7639 },
7640
7641 /* numPrbu 8.3.3.12 */
7642 { &hf_oran_numPrbu,
7643 { "numPrbu", "oran_fh_cus.numPrbu",
7644 FT_UINT8, BASE_DEC,
7645 NULL((void*)0), 0x0,
7646 "number of PRBs per user plane section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7647 },
7648
7649 /* 7.7.1.3 */
7650 { &hf_oran_bfwCompParam,
7651 { "bfwCompParam", "oran_fh_cus.bfwCompParam",
7652 FT_STRING, BASE_NONE,
7653 NULL((void*)0), 0x0,
7654 "Beamforming weight compression parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7655 },
7656
7657 /* 6.3.3.13 */
7658 { &hf_oran_udCompHdrMeth,
7659 { "User Data Compression Method", "oran_fh_cus.udCompHdrMeth",
7660 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
7661 RVALS(ud_comp_header_meth)((0 ? (const struct _range_string*)0 : ((ud_comp_header_meth)
)))
, 0x0f,
7662 "Defines the compression method for the user data in every section in the C-Plane message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7663 },
7664 { &hf_oran_udCompHdrMeth_pref,
7665 { "User Data Compression Method", "oran_fh_cus.udCompHdrMeth",
7666 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
7667 RVALS(ud_comp_header_meth)((0 ? (const struct _range_string*)0 : ((ud_comp_header_meth)
)))
, 0x0,
7668 "Defines the compression method for the user data in every section in the C-Plane message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7669 },
7670 /* 8.3.3.18 */
7671 { &hf_oran_udCompLen,
7672 { "udCompLen", "oran_fh_cus.udCompLen",
7673 FT_UINT16, BASE_DEC,
7674 NULL((void*)0), 0x0,
7675 "PRB field length in octets", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7676 },
7677
7678 /* 6.3.3.13 */
7679 { &hf_oran_udCompHdrIqWidth,
7680 { "User Data IQ width", "oran_fh_cus.udCompHdrWidth",
7681 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
7682 RVALS(ud_comp_header_width)((0 ? (const struct _range_string*)0 : ((ud_comp_header_width
))))
, 0xf0,
7683 "Defines the IQ bit width for the user data in every section in the C-Plane message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7684 },
7685 { &hf_oran_udCompHdrIqWidth_pref,
7686 { "User Data IQ width", "oran_fh_cus.udCompHdrWidth",
7687 FT_UINT8, BASE_DEC,
7688 NULL((void*)0), 0x0,
7689 "Defines the IQ bit width for the user data in every section in the C-Plane message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7690 },
7691
7692 { &hf_oran_sinrCompHdrIqWidth_pref,
7693 { "SINR IQ width", "oran_fh_cus.sinrCompHdrWidth",
7694 FT_UINT8, BASE_DEC,
7695 NULL((void*)0), 0x0,
7696 "Defines the IQ bit width for SINR data in section type 9", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7697 },
7698 { &hf_oran_sinrCompHdrMeth_pref,
7699 { "SINR Compression Method", "oran_fh_cus.sinrCompHdrMeth",
7700 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
7701 RVALS(ud_comp_header_meth)((0 ? (const struct _range_string*)0 : ((ud_comp_header_meth)
)))
, 0x0,
7702 "Defines the compression method for SINR data in section type 9", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7703 },
7704
7705 /* Section 8.3.3.15 (not always present - depends upon meth) */
7706 { &hf_oran_udCompParam,
7707 { "User Data Compression Parameter", "oran_fh_cus.udCompParam",
7708 FT_STRING, BASE_NONE,
7709 NULL((void*)0), 0x0,
7710 "Applies to whatever compression method is specified by the associated sectionID's compMeth value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7711 },
7712 /* 8.3.3.18 */
7713 { &hf_oran_sReSMask,
7714 { "sReSMask", "oran_fh_cus.sReSMask",
7715 FT_UINT16, BASE_HEX,
7716 NULL((void*)0), 0xf0ff,
7717 "selective RE sending mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7718 },
7719
7720 { &hf_oran_sReSMask_re12,
7721 { "RE-12", "oran_fh_cus.sReSMask-re12",
7722 FT_BOOLEAN, 16,
7723 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x8000,
7724 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7725 },
7726 { &hf_oran_sReSMask_re11,
7727 { "RE-11", "oran_fh_cus.sReSMask-re11",
7728 FT_BOOLEAN, 16,
7729 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x4000,
7730 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7731 },
7732 { &hf_oran_sReSMask_re10,
7733 { "RE-10", "oran_fh_cus.sReSMask-re10",
7734 FT_BOOLEAN, 16,
7735 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x2000,
7736 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7737 },
7738 { &hf_oran_sReSMask_re9,
7739 { "RE-9", "oran_fh_cus.sReSMask-re9",
7740 FT_BOOLEAN, 16,
7741 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x1000,
7742 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7743 },
7744 { &hf_oran_sReSMask_re8,
7745 { "RE-8", "oran_fh_cus.sReSMask-re8",
7746 FT_BOOLEAN, 16,
7747 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0080,
7748 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7749 },
7750 { &hf_oran_sReSMask_re7,
7751 { "RE-7", "oran_fh_cus.sReSMask-re7",
7752 FT_BOOLEAN, 16,
7753 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0040,
7754 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7755 },
7756 { &hf_oran_sReSMask_re6,
7757 { "RE-6", "oran_fh_cus.sReSMask-re6",
7758 FT_BOOLEAN, 16,
7759 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0020,
7760 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7761 },
7762 { &hf_oran_sReSMask_re5,
7763 { "RE-5", "oran_fh_cus.sReSMask-re5",
7764 FT_BOOLEAN, 16,
7765 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0010,
7766 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7767 },
7768 { &hf_oran_sReSMask_re4,
7769 { "RE-4", "oran_fh_cus.sReSMask-re4",
7770 FT_BOOLEAN, 16,
7771 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0008,
7772 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7773 },
7774 { &hf_oran_sReSMask_re3,
7775 { "RE-3", "oran_fh_cus.sReSMask-re3",
7776 FT_BOOLEAN, 16,
7777 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0004,
7778 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7779 },
7780 { &hf_oran_sReSMask_re2,
7781 { "RE-2", "oran_fh_cus.sReSMask-re2",
7782 FT_BOOLEAN, 16,
7783 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0002,
7784 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7785 },
7786 { &hf_oran_sReSMask_re1,
7787 { "RE-1", "oran_fh_cus.sReSMask-re1",
7788 FT_BOOLEAN, 16,
7789 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0001,
7790 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7791 },
7792
7793 /* 8.3.3.20 */
7794 { &hf_oran_sReSMask1,
7795 { "sReSMask1", "oran_fh_cus.sReSMask1",
7796 FT_UINT16, BASE_HEX,
7797 NULL((void*)0), 0x0fff,
7798 "selective RE sending mask 1", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7799 },
7800 /* 8.3.3.21 */
7801 { &hf_oran_sReSMask2,
7802 { "sReSMask2", "oran_fh_cus.sReSMask2",
7803 FT_UINT16, BASE_HEX,
7804 NULL((void*)0), 0x0fff,
7805 "selective RE sending mask 2", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7806 },
7807
7808 { &hf_oran_sReSMask1_2_re12,
7809 { "RE-12", "oran_fh_cus.sReSMask-re12",
7810 FT_BOOLEAN, 16,
7811 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0800,
7812 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7813 },
7814 { &hf_oran_sReSMask1_2_re11,
7815 { "RE-11", "oran_fh_cus.sReSMask-re11",
7816 FT_BOOLEAN, 16,
7817 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0400,
7818 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7819 },
7820 { &hf_oran_sReSMask1_2_re10,
7821 { "RE-10", "oran_fh_cus.sReSMask-re10",
7822 FT_BOOLEAN, 16,
7823 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0200,
7824 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7825 },
7826 { &hf_oran_sReSMask1_2_re9,
7827 { "RE-9", "oran_fh_cus.sReSMask-re9",
7828 FT_BOOLEAN, 16,
7829 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0100,
7830 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7831 },
7832
7833 /* Section 6.3.3.15 */
7834 { &hf_oran_iSample,
7835 { "iSample", "oran_fh_cus.iSample",
7836 FT_FLOAT, BASE_NONE,
7837 NULL((void*)0), 0x0,
7838 "In-phase Sample value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7839 },
7840
7841 /* Section 6.3.3.16 */
7842 { &hf_oran_qSample,
7843 { "qSample", "oran_fh_cus.qSample",
7844 FT_FLOAT, BASE_NONE,
7845 NULL((void*)0), 0x0,
7846 "Quadrature Sample value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7847 },
7848
7849 { &hf_oran_exponent,
7850 { "Exponent", "oran_fh_cus.exponent",
7851 FT_UINT8, BASE_DEC,
7852 NULL((void*)0), 0x0f,
7853 "Exponent applicable to the I & Q mantissas", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7854 },
7855
7856 { &hf_oran_iq_user_data,
7857 { "IQ User Data", "oran_fh_cus.iq_user_data",
7858 FT_BYTES, BASE_NONE,
7859 NULL((void*)0), 0x0,
7860 "Used for the In-phase and Quadrature sample mantissa", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7861 },
7862
7863
7864 { &hf_oran_u_section_ul_symbol_time,
7865 { "Microseconds since first UL U-plane frame for this symbol", "oran_fh_cus.us-since-first-ul-frame",
7866 FT_UINT32, BASE_DEC,
7867 NULL((void*)0), 0x0,
7868 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7869 },
7870 { &hf_oran_u_section_ul_symbol_frames,
7871 { "Number of UL frames sent for this symbol", "oran_fh_cus.number-ul-frames-in-symbol",
7872 FT_UINT32, BASE_DEC,
7873 NULL((void*)0), 0x0,
7874 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7875 },
7876 { &hf_oran_u_section_ul_symbol_first_frame,
7877 { "First UL frame for this symbol", "oran_fh_cus.first-ul-frame-in-symbol",
7878 FT_FRAMENUM, BASE_NONE,
7879 FRAMENUM_TYPE(FT_FRAMENUM_NONE)((gpointer) (glong) (FT_FRAMENUM_NONE)), 0x0,
7880 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7881 },
7882 { &hf_oran_u_section_ul_symbol_last_frame,
7883 { "Last UL frame for this symbol", "oran_fh_cus.last-ul-frame-in-symbol",
7884 FT_FRAMENUM, BASE_NONE,
7885 FRAMENUM_TYPE(FT_FRAMENUM_NONE)((gpointer) (glong) (FT_FRAMENUM_NONE)), 0x0,
7886 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7887 },
7888
7889 { &hf_oran_c_eAxC_ID,
7890 { "c_eAxC_ID", "oran_fh_cus.c_eaxc_id",
7891 FT_STRING, BASE_NONE,
7892 NULL((void*)0), 0x0,
7893 "This is a calculated field for the c_eAxC ID, which identifies the message stream", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7894 },
7895
7896 { &hf_oran_refa,
7897 { "RefA", "oran_fh_cus.refa",
7898 FT_STRING, BASE_NONE,
7899 NULL((void*)0), 0x0,
7900 "This is a calculated field for the RefA ID, which provides a reference in time", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7901 },
7902
7903
7904 /* Section 7.5.2.15 */
7905 { &hf_oran_ciCompHdr,
7906 { "ciCompHdr", "oran_fh_cus.ciCompHdr",
7907 FT_STRING, BASE_NONE,
7908 NULL((void*)0), 0x0,
7909 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7910 },
7911 { &hf_oran_ciCompHdrMeth,
7912 { "User Data Compression Method", "oran_fh_cus.ciCompHdrMeth",
7913 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
7914 RVALS(ud_comp_header_meth)((0 ? (const struct _range_string*)0 : ((ud_comp_header_meth)
)))
, 0x0e,
7915 "Defines the compression method for the user data in every section in the C-Plane message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7916 },
7917 { &hf_oran_ciCompHdrIqWidth,
7918 { "User Data IQ width", "oran_fh_cus.udCompHdrWidth",
7919 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
7920 RVALS(ud_comp_header_width)((0 ? (const struct _range_string*)0 : ((ud_comp_header_width
))))
, 0xf0,
7921 "Defines the IQ bit width for the user data in every section in the C-Plane message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7922 },
7923 { &hf_oran_ciCompOpt,
7924 { "ciCompOpt", "oran_fh_cus.ciCompOpt",
7925 FT_UINT8, BASE_DEC,
7926 VALS(ci_comp_opt_vals)((0 ? (const struct _value_string*)0 : ((ci_comp_opt_vals)))), 0x01,
7927 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7928 },
7929
7930 /* 7.7.11.7 */
7931 { &hf_oran_disable_bfws,
7932 { "disableBFWs", "oran_fh_cus.disableBFWs",
7933 FT_BOOLEAN, 8,
7934 NULL((void*)0), 0x80,
7935 "Indicate if BFWs under section extension are disabled", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7936 },
7937 /* 7.7.11.8 */
7938 { &hf_oran_rad,
7939 { "RAD", "oran_fh_cus.rad",
7940 FT_BOOLEAN, 8,
7941 NULL((void*)0), 0x40,
7942 "Reset After PRB Discontinuity", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7943 },
7944 /* 7.7.11.4 */
7945 { &hf_oran_num_bund_prbs,
7946 { "numBundPrb", "oran_fh_cus.numBundPrb",
7947 FT_UINT8, BASE_DEC,
7948 NULL((void*)0), 0x0,
7949 "Number of bundled PRBs per BFWs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7950 },
7951 { &hf_oran_beam_id,
7952 { "beamId", "oran_fh_cus.beamId",
7953 FT_UINT16, BASE_DEC,
7954 NULL((void*)0), 0x7fff,
7955 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7956 },
7957 { &hf_oran_num_weights_per_bundle,
7958 { "Num weights per bundle", "oran_fh_cus.num_weights_per_bundle",
7959 FT_UINT16, BASE_DEC,
7960 NULL((void*)0), 0x0,
7961 "From dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7962 },
7963
7964 { &hf_oran_samples_prb,
7965 {"PRB", "oran_fh_cus.prb",
7966 FT_STRING, BASE_NONE,
7967 NULL((void*)0), 0x0,
7968 "Grouping of samples for a particular Physical Resource Block", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7969 },
7970
7971 /* 7.5.3.13 */
7972 { &hf_oran_ciSample,
7973 { "ciSample", "oran_fh_cus.ciSample",
7974 FT_STRING, BASE_NONE,
7975 NULL((void*)0), 0x0,
7976 "Sample (I and Q values)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7977 },
7978 { &hf_oran_ciIsample,
7979 { "ciIsample", "oran_fh_cus.ciISample",
7980 FT_FLOAT, BASE_NONE,
7981 NULL((void*)0), 0x0,
7982 "Channel information complex value - I part", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7983 },
7984 { &hf_oran_ciQsample,
7985 { "ciQsample", "oran_fh_cus.ciQSample",
7986 FT_FLOAT, BASE_NONE,
7987 NULL((void*)0), 0x0,
7988 "Channel information complex value - Q part", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7989 },
7990
7991 /* 7.7.10.2 */
7992 { &hf_oran_beamGroupType,
7993 { "beamGroupType", "oran_fh_cus.beamGroupType",
7994 FT_UINT8, BASE_DEC,
7995 VALS(beam_group_type_vals)((0 ? (const struct _value_string*)0 : ((beam_group_type_vals
))))
, 0xc0,
7996 "The type of beam grouping", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7997 },
7998 /* 7.7.10.3 */
7999 { &hf_oran_numPortc,
8000 { "numPortc", "oran_fh_cus.numPortc",
8001 FT_UINT8, BASE_DEC,
8002 NULL((void*)0), 0x3f,
8003 "The number of eAxC ports", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8004 },
8005
8006 /* 7.7.4.2 (1 bit) */
8007 { &hf_oran_csf,
8008 { "csf", "oran_fh_cus.csf",
8009 FT_BOOLEAN, BASE_NONE,
8010 NULL((void*)0), 0x0,
8011 "constellation shift flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8012 },
8013 /* 7.7.4.3 */
8014 { &hf_oran_modcompscaler,
8015 { "modCompScaler", "oran_fh_cus.modcompscaler",
8016 FT_UINT16, BASE_DEC,
8017 NULL((void*)0), 0x7fff,
8018 "modulation compression scaler value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8019 },
8020
8021 /* 7.7.5.1 */
8022 { &hf_oran_modcomp_param_set,
8023 { "Set", "oran_fh_cus.modcomp-param-set",
8024 FT_STRING, BASE_NONE,
8025 NULL((void*)0), 0x0,
8026 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8027 },
8028
8029 /* mcScaleReMask 7.7.5.2 (12 bits) */
8030 { &hf_oran_mc_scale_re_mask,
8031 { "mcScaleReMask", "oran_fh_cus.mcscaleremask",
8032 FT_BOOLEAN, BASE_NONE,
8033 NULL((void*)0), 0x0,
8034 "modulation compression power scale RE mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8035 },
8036 /* mcScaleOffset 7.7.5.4 (15 bits) */
8037 { &hf_oran_mc_scale_offset,
8038 { "mcScaleOffset", "oran_fh_cus.mcscaleoffset",
8039 FT_UINT24, BASE_DEC,
8040 NULL((void*)0), 0x0,
8041 "scaling value for modulation compression", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8042 },
8043 /* eAxCmask (7.7.7.2) */
8044 { &hf_oran_eAxC_mask,
8045 { "eAxC Mask", "oran_fh_cus.eaxcmask",
8046 FT_UINT16, BASE_HEX,
8047 NULL((void*)0), 0xffff,
8048 "Which eAxC_ID values the C-Plane message applies to", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8049 },
8050 /* technology (interface name) 7.7.9.2 */
8051 { &hf_oran_technology,
8052 { "Technology", "oran_fh_cus.technology",
8053 FT_UINT8, BASE_DEC,
8054 VALS(interface_name_vals)((0 ? (const struct _value_string*)0 : ((interface_name_vals)
)))
, 0x0,
8055 "Interface name (that C-PLane section applies to)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8056 },
8057 /* Exttype 14 (7.7.14.2) */
8058 { &hf_oran_nullLayerInd,
8059 { "nullLayerInd", "oran_fh_cus.nulllayerind",
8060 FT_BOOLEAN, BASE_NONE,
8061 NULL((void*)0), 0x0,
8062 "Whether corresponding layer is nulling-layer or not", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8063 },
8064
8065 /* Exttype 19 */
8066 /* 7.7.19.3 */
8067 { &hf_oran_se19_repetition,
8068 { "repetition", "oran_fh_cus.repetition",
8069 FT_BOOLEAN, BASE_NONE,
8070 TFS(&repetition_se19_tfs)((0 ? (const struct true_false_string*)0 : ((&repetition_se19_tfs
))))
, 0x0,
8071 "repeat port info flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8072 },
8073 /* 7.7.19.8 */
8074 /* TODO: break down into each RE as done for 7.5.3.5 ? */
8075 { &hf_oran_portReMask,
8076 { "portReMask", "oran_fh_cus.portReMask",
8077 FT_BOOLEAN, 16,
8078 TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0fff,
8079 "RE bitmask per port", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8080 },
8081 /* 7.7.19.9 */
8082 { &hf_oran_portSymbolMask,
8083 { "portSymbolMask", "oran_fh_cus.portSymbolMask",
8084 FT_BOOLEAN, 16,
8085 TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x3fff,
8086 "Symbol bitmask port port", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8087 },
8088
8089 { &hf_oran_ext19_port,
8090 {"Port", "oran_fh_cus.ext19.port",
8091 FT_STRING, BASE_NONE,
8092 NULL((void*)0), 0x0,
8093 "Entry for a given port in ext19", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8094 },
8095
8096 /* Ext 13 */
8097 { &hf_oran_prb_allocation,
8098 {"PRB allocation", "oran_fh_cus.prb-allocation",
8099 FT_STRING, BASE_NONE,
8100 NULL((void*)0), 0x0,
8101 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8102 },
8103 /* 7.7.13.2 */
8104 { &hf_oran_nextSymbolId,
8105 { "nextSymbolId", "oran_fh_cus.nextSymbolId",
8106 FT_UINT8, BASE_DEC,
8107 NULL((void*)0), 0x3c,
8108 "offset of PRB range start", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8109 },
8110 /* 7.7.13.3 */
8111 { &hf_oran_nextStartPrbc,
8112 { "nextStartPrbc", "oran_fh_cus.nextStartPrbc",
8113 FT_UINT16, BASE_DEC,
8114 NULL((void*)0), 0x03ff,
8115 "number of PRBs in PRB range", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8116 },
8117
8118 /* Puncturing patters as appears in SE 20 */
8119 { &hf_oran_puncPattern,
8120 { "puncPattern", "oran_fh_cus.puncPattern",
8121 FT_STRING, BASE_NONE,
8122 NULL((void*)0), 0x0,
8123 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8124 },
8125
8126 /* 7.7.20.2 numPuncPatterns */
8127 { &hf_oran_numPuncPatterns,
8128 { "numPuncPatterns", "oran_fh_cus.numPuncPatterns",
8129 FT_UINT8, BASE_DEC,
8130 NULL((void*)0), 0x0,
8131 "number of puncturing patterns", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8132 },
8133 /* 7.7.20.3 symbolMask */
8134 { &hf_oran_symbolMask_ext20,
8135 { "symbolMask", "oran_fh_cus.symbolMask",
8136 FT_UINT16, BASE_HEX,
8137 NULL((void*)0), 0xfffc,
8138 "Bitmask where each bit indicates the symbols associated with the puncturing pattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8139 },
8140 /* 7.7.20.4 startPuncPrb */
8141 { &hf_oran_startPuncPrb,
8142 { "startPuncPrb", "oran_fh_cus.startPuncPrb",
8143 FT_UINT16, BASE_DEC,
8144 NULL((void*)0), 0x03ff,
8145 "starting PRB to which one puncturing pattern applies", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8146 },
8147 /* 7.7.20.5 numPuncPrb */
8148 { &hf_oran_numPuncPrb,
8149 { "numPuncPrb", "oran_fh_cus.numPuncPrb",
8150 FT_UINT8, BASE_DEC,
8151 NULL((void*)0), 0x0,
8152 "the number of PRBs of the puncturing pattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8153 },
8154 /* 7.7.20.6 puncReMask */
8155 { &hf_oran_puncReMask,
8156 { "puncReMask", "oran_fh_cus.puncReMask",
8157 FT_UINT16, BASE_DEC,
8158 NULL((void*)0), 0xffc0,
8159 "puncturing pattern RE mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8160 },
8161 /* 7.7.20.12 multiSDScope */
8162 { &hf_oran_multiSDScope,
8163 { "multiSDScope", "oran_fh_cus.multiSDScope",
8164 FT_BOOLEAN, 8,
8165 TFS(&multi_sd_scope_tfs)((0 ? (const struct true_false_string*)0 : ((&multi_sd_scope_tfs
))))
, 0x02,
8166 "multiple section description scope flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8167 },
8168 /* 7.7.20.4 rbgIncl */
8169 { &hf_oran_RbgIncl,
8170 { "rbgIncl", "oran_fh_cus.rbgIncl",
8171 FT_BOOLEAN, 8,
8172 NULL((void*)0), 0x01,
8173 "rbg included flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8174 },
8175
8176 /* 7.7.21.2 ciPrbGroupSize */
8177 { &hf_oran_ci_prb_group_size,
8178 { "ciPrbGroupSize", "oran_fh_cus.ciPrbGroupSize",
8179 FT_UINT8, BASE_DEC,
8180 NULL((void*)0), 0x0,
8181 "channel information PRB group size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8182 },
8183 /* 7.21.3 */
8184 { &hf_oran_prg_size_st5,
8185 { "prgSize", "oran_fh_cus.prgSize",
8186 FT_UINT8, BASE_DEC,
8187 VALS(prg_size_st5_vals)((0 ? (const struct _value_string*)0 : ((prg_size_st5_vals)))
)
, 0x03,
8188 "precoding resource block group size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8189 },
8190 { &hf_oran_prg_size_st6,
8191 { "prgSize", "oran_fh_cus.prgSize",
8192 FT_UINT8, BASE_DEC,
8193 VALS(prg_size_st6_vals)((0 ? (const struct _value_string*)0 : ((prg_size_st6_vals)))
)
, 0x03,
8194 "precoding resource block group size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8195 },
8196
8197 /* 7.7.17.2 numUeID */
8198 { &hf_oran_num_ueid,
8199 { "numUeID", "oran_fh_cus.numUeID",
8200 FT_UINT8, BASE_DEC,
8201 NULL((void*)0), 0x0,
8202 "number of ueIDs per user", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8203 },
8204
8205 /* 7.7.16.2 antMask */
8206 { &hf_oran_antMask,
8207 { "antMask", "oran_fh_cus.antMask",
8208 FT_UINT64, BASE_HEX,
8209 NULL((void*)0), 0xffffffffffffffff,
8210 "indices of antennas to be pre-combined per RX endpoint", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8211 },
8212
8213 /* 7.7.18.2 transmissionWindowOffset */
8214 { &hf_oran_transmissionWindowOffset,
8215 { "transmissionWindowOffset", "oran_fh_cus.transmissionWindowOffset",
8216 FT_UINT16, BASE_DEC,
8217 NULL((void*)0), 0x0,
8218 "start of the transmission window as an offset to when the transmission window would have been without this parameter, i.e. (Ta3_max - Ta3_min)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8219 },
8220 /* 7.7.18.3 transmissionWindowSize */
8221 { &hf_oran_transmissionWindowSize,
8222 { "transmissionWindowSize", "oran_fh_cus.transmissionWindowSize",
8223 FT_UINT16, BASE_DEC,
8224 NULL((void*)0), 0x3fff,
8225 "size of the transmission window in resolution µs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8226 },
8227 /* 7.7.18.4 toT */
8228 { &hf_oran_toT,
8229 { "toT", "oran_fh_cus.toT",
8230 FT_UINT8, BASE_DEC,
8231 VALS(type_of_transmission_vals)((0 ? (const struct _value_string*)0 : ((type_of_transmission_vals
))))
, 0x03,
8232 "type of transmission", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8233 },
8234
8235 /* 7.7.2.2 bfaCompHdr */
8236 { &hf_oran_bfaCompHdr,
8237 { "bfaCompHdr", "oran_fh_cus.bfaCompHdr",
8238 FT_STRING, BASE_NONE,
8239 NULL((void*)0), 0x0,
8240 "beamforming attributes compression header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8241 },
8242 /* 7.7.2.2-2: bfAzPtWidth */
8243 { &hf_oran_bfAzPtWidth,
8244 { "bfAzPtWidth", "oran_fh_cus.bfAzPtWidth",
8245 FT_UINT8, BASE_DEC,
8246 VALS(bfa_bw_vals)((0 ? (const struct _value_string*)0 : ((bfa_bw_vals)))), 0x38,
8247 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8248 },
8249 /* 7.7.2.2-3: bfZePtWidth */
8250 { &hf_oran_bfZePtWidth,
8251 { "bfZePtWidth", "oran_fh_cus.bfZePtWidth",
8252 FT_UINT8, BASE_DEC,
8253 VALS(bfa_bw_vals)((0 ? (const struct _value_string*)0 : ((bfa_bw_vals)))), 0x07,
8254 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8255 },
8256 /* 7.7.2.2-4: bfAz3ddWidth */
8257 { &hf_oran_bfAz3ddWidth,
8258 { "bfAz3ddWidth", "oran_fh_cus.bfAz3ddWidth",
8259 FT_UINT8, BASE_DEC,
8260 VALS(bfa_bw_vals)((0 ? (const struct _value_string*)0 : ((bfa_bw_vals)))), 0x38,
8261 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8262 },
8263 /* 7.7.2.2-5: bfZe3ddWidth */
8264 { &hf_oran_bfZe3ddWidth,
8265 { "bfZe3ddWidth", "oran_fh_cus.bfZe3ddWidth",
8266 FT_UINT8, BASE_DEC,
8267 VALS(bfa_bw_vals)((0 ? (const struct _value_string*)0 : ((bfa_bw_vals)))), 0x07,
8268 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8269 },
8270
8271 /* 7.7.2.3 bfAzPt */
8272 { &hf_oran_bfAzPt,
8273 { "bfAzPt", "oran_fh_cus.bfAzPt",
8274 FT_UINT8, BASE_DEC,
8275 NULL((void*)0), 0x0,
8276 "beamforming azimuth pointing parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8277 },
8278 /* 7.7.2.4 bfZePt */
8279 { &hf_oran_bfZePt,
8280 { "bfZePt", "oran_fh_cus.bfZePt",
8281 FT_UINT8, BASE_DEC,
8282 NULL((void*)0), 0x0,
8283 "beamforming zenith pointing parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8284 },
8285 /* 7.7.2.5 bfAz3dd */
8286 { &hf_oran_bfAz3dd,
8287 { "bfAz3dd", "oran_fh_cus.bfAz3dd",
8288 FT_UINT8, BASE_DEC,
8289 NULL((void*)0), 0x0,
8290 "beamforming azimuth beamwidth parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8291 },
8292 /* 7.7.2.6 bfZe3dd */
8293 { &hf_oran_bfZe3dd,
8294 { "bfZe3dd", "oran_fh_cus.bfZe3dd",
8295 FT_UINT8, BASE_DEC,
8296 NULL((void*)0), 0x0,
8297 "beamforming zenith beamwidth parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8298 },
8299
8300 /* 7.7.2.7 bfAzSl */
8301 { &hf_oran_bfAzSl,
8302 { "bfAzSl", "oran_fh_cus.bfAzSl",
8303 FT_UINT8, BASE_DEC,
8304 VALS(sidelobe_suppression_vals)((0 ? (const struct _value_string*)0 : ((sidelobe_suppression_vals
))))
, 0x38,
8305 "beamforming azimuth sidelobe parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8306 },
8307 /* 7.7.2.8 bfZeSl */
8308 { &hf_oran_bfZeSl,
8309 { "bfZeSl", "oran_fh_cus.bfZeSl",
8310 FT_UINT8, BASE_DEC,
8311 VALS(sidelobe_suppression_vals)((0 ? (const struct _value_string*)0 : ((sidelobe_suppression_vals
))))
, 0x07,
8312 "beamforming zenith sidelobe parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8313 },
8314
8315 /* 7.5.2.17 */
8316 { &hf_oran_cmd_scope,
8317 { "cmdScope", "oran_fh_cus.cmdScope",
8318 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
8319 RVALS(cmd_scope_vals)((0 ? (const struct _range_string*)0 : ((cmd_scope_vals)))), 0x0f,
8320 "command scope", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8321 },
8322 /* 7.5.2.18 */
8323 { &hf_oran_number_of_st4_cmds,
8324 { "numberOfST4Cmds", "oran_fh_cus.numberOfST4Cmds",
8325 FT_UINT8, BASE_DEC,
8326 NULL((void*)0), 0x0,
8327 "Number of Section Type 4 commands", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8328 },
8329
8330 { &hf_oran_st4_cmd_header,
8331 { "Command common header", "oran_fh_cus.st4CmdCommonHeader",
8332 FT_STRING, BASE_NONE,
8333 NULL((void*)0), 0x0,
8334 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8335 },
8336
8337 /* 7.5.3.38 */
8338 { &hf_oran_st4_cmd_type,
8339 { "st4CmdType", "oran_fh_cus.st4CmdType",
8340 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
8341 RVALS(st4_cmd_type_vals)((0 ? (const struct _range_string*)0 : ((st4_cmd_type_vals)))
)
, 0x0,
8342 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8343 },
8344 /* 7.5.3.39 */
8345 { &hf_oran_st4_cmd_len,
8346 { "st4CmdLen", "oran_fh_cus.st4CmdLen",
8347 FT_UINT16, BASE_DEC,
8348 NULL((void*)0), 0x0,
8349 "Length of command in 32-bit words", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8350 },
8351 /* 7.5.3.40 */
8352 { &hf_oran_st4_cmd_num_slots,
8353 { "numSlots", "oran_fh_cus.st4NumSlots",
8354 FT_UINT8, BASE_DEC,
8355 NULL((void*)0), 0x0,
8356 "Contiguous slots for which command is applicable", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8357 },
8358 /* 7.5.3.41 */
8359 { &hf_oran_st4_cmd_ack_nack_req_id,
8360 { "ackNackReqId", "oran_fh_cus.ackNackReqId",
8361 FT_UINT16, BASE_DEC,
8362 NULL((void*)0), 0x0,
8363 "ACK/NACK Request Id", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8364 },
8365
8366 { &hf_oran_st4_cmd,
8367 { "Command", "oran_fh_cus.st4Cmd",
8368 FT_STRING, BASE_NONE,
8369 NULL((void*)0), 0x0,
8370 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8371 },
8372
8373 /* 7.5.3.52 */
8374 { &hf_oran_sleepmode_trx,
8375 { "sleepMode", "oran_fh_cus.sleepMode",
8376 FT_UINT8, BASE_HEX,
8377 VALS(sleep_mode_trx_vals)((0 ? (const struct _value_string*)0 : ((sleep_mode_trx_vals)
)))
, 0x03,
8378 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8379 },
8380 { &hf_oran_sleepmode_asm,
8381 { "sleepMode", "oran_fh_cus.sleepMode",
8382 FT_UINT8, BASE_HEX,
8383 VALS(sleep_mode_asm_vals)((0 ? (const struct _value_string*)0 : ((sleep_mode_asm_vals)
)))
, 0x03,
8384 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8385 },
8386
8387 /* 7.5.3.51 */
8388 { &hf_oran_log2maskbits,
8389 { "log2MaskBits", "oran_fh_cus.log2MaskBits",
8390 FT_UINT8, BASE_HEX,
8391 VALS(log2maskbits_vals)((0 ? (const struct _value_string*)0 : ((log2maskbits_vals)))
)
, 0x3c,
8392 "Number of bits to appear in antMask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8393 },
8394 /* 7.5.3.53 */
8395 { &hf_oran_num_slots_ext,
8396 { "numSlotsExt", "oran_fh_cus.numSlotsExt",
8397 FT_UINT24, BASE_HEX,
8398 NULL((void*)0), 0x0fffff,
8399 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8400 },
8401 /* 7.5.3.54 */
8402 { &hf_oran_antMask_trx_control,
8403 { "antMask", "oran_fh_cus.trxControl.antMask",
8404 FT_BYTES, BASE_NONE,
8405 NULL((void*)0), 0x0,
8406 "which antennas should sleep or wake-up", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8407 },
8408 /* 7.5.3.55 */
8409 { &hf_oran_ready,
8410 { "ready", "oran_fh_cus.ready",
8411 FT_BOOLEAN, 8,
8412 TFS(&ready_tfs)((0 ? (const struct true_false_string*)0 : ((&ready_tfs))
))
, 0x01,
8413 "wake-up ready indicator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8414 },
8415 /* 7.5.3.34 */
8416 { &hf_oran_number_of_acks,
8417 { "numberOfAcks", "oran_fh_cus.numberOfAcks",
8418 FT_UINT8, BASE_DEC,
8419 NULL((void*)0), 0x0,
8420 "number of ACKs for one eAxC_ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8421 },
8422 /* 7.5.3.35 */
8423 { &hf_oran_number_of_nacks,
8424 { "numberOfNacks", "oran_fh_cus.numberOfNacks",
8425 FT_UINT8, BASE_DEC,
8426 NULL((void*)0), 0x0,
8427 "number of NACKs for one eAxC_ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8428 },
8429 /* 7.5.3.36 */
8430 { &hf_oran_ackid,
8431 { "ackId", "oran_fh_cus.ackId",
8432 FT_UINT16, BASE_DEC,
8433 NULL((void*)0), 0x0,
8434 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8435 },
8436 /* 7.5.3.37 */
8437 { &hf_oran_nackid,
8438 { "nackId", "oran_fh_cus.nackId",
8439 FT_UINT16, BASE_DEC,
8440 NULL((void*)0), 0x0,
8441 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8442 },
8443
8444 /* Links between acknack requests & responses */
8445 { &hf_oran_acknack_request_frame,
8446 { "Request Frame", "oran_fh_cus.ackNackId.request-frame",
8447 FT_FRAMENUM, BASE_NONE,
8448 FRAMENUM_TYPE(FT_FRAMENUM_REQUEST)((gpointer) (glong) (FT_FRAMENUM_REQUEST)), 0x0,
8449 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8450 },
8451 { &hf_oran_acknack_request_time,
8452 { "Time since request in ms", "oran_fh_cus.ackNackId.time-since-request",
8453 FT_UINT32, BASE_DEC,
8454 NULL((void*)0), 0x0,
8455 "Time between request and response", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8456 },
8457 { &hf_oran_acknack_request_type,
8458 { "Request Type", "oran_fh_cus.ackNackId.request-type",
8459 FT_UINT32, BASE_DEC,
8460 VALS(acknack_type_vals)((0 ? (const struct _value_string*)0 : ((acknack_type_vals)))
)
, 0x0,
8461 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8462 },
8463 { &hf_oran_acknack_response_frame,
8464 { "Response Frame", "oran_fh_cus.ackNackId.response-frame",
8465 FT_FRAMENUM, BASE_NONE,
8466 FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE)((gpointer) (glong) (FT_FRAMENUM_RESPONSE)), 0x0,
8467 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8468 },
8469 { &hf_oran_acknack_response_time,
8470 { "Time to response in ms", "oran_fh_cus.ackNackId.time-to-response",
8471 FT_UINT32, BASE_DEC,
8472 NULL((void*)0), 0x0,
8473 "Time between request and response", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8474 },
8475
8476 /* 7.5.3.43 */
8477 { &hf_oran_disable_tdbfns,
8478 { "disableTDBFNs", "oran_fh_cus.disableTDBFNs",
8479 FT_BOOLEAN, 8,
8480 TFS(&disable_tdbfns_tfs)((0 ? (const struct true_false_string*)0 : ((&disable_tdbfns_tfs
))))
, 0x80,
8481 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8482 },
8483
8484 /* 7.5.3.44 */
8485 { &hf_oran_td_beam_group,
8486 { "tdBeamGrp", "oran_fh_cus.tdBeamGrp",
8487 FT_UINT16, BASE_HEX,
8488 NULL((void*)0), 0x7fff,
8489 "Applies to symbolMask in command header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8490 },
8491 /* 7.5.3.43 */
8492 { &hf_oran_disable_tdbfws,
8493 { "disableTDBFWs", "oran_fh_cus.disableTDBFWs",
8494 FT_BOOLEAN, 8,
8495 TFS(&beam_numbers_included_tfs)((0 ? (const struct true_false_string*)0 : ((&beam_numbers_included_tfs
))))
, 0x80,
8496 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8497 },
8498
8499 /* 7.5.3.56 */
8500 { &hf_oran_td_beam_num,
8501 { "tdBeamNum", "oran_fh_cus.tdBeamNum",
8502 FT_UINT16, BASE_HEX,
8503 NULL((void*)0), 0x7fff,
8504 "time-domain beam number", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8505 },
8506
8507 /* 7.5.3.49 */
8508 { &hf_oran_dir_pattern,
8509 { "dirPattern", "oran_fh_cus.dirPattern",
8510 FT_BOOLEAN, 16,
8511 TFS(&symbol_direction_tfs)((0 ? (const struct true_false_string*)0 : ((&symbol_direction_tfs
))))
, 0x3fff,
8512 "symbol data direction (gNB Tx/Rx) pattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8513 },
8514 /* 7.5.3.50 */
8515 { &hf_oran_guard_pattern,
8516 { "guardPattern", "oran_fh_cus.guardPattern",
8517 FT_BOOLEAN, 16,
8518 TFS(&symbol_guard_tfs)((0 ? (const struct true_false_string*)0 : ((&symbol_guard_tfs
))))
, 0x3fff,
8519 "guard pattern bitmask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8520 },
8521
8522 /* For convenient filtering */
8523 { &hf_oran_cplane,
8524 { "C-Plane", "oran_fh_cus.c-plane",
8525 FT_NONE, BASE_NONE,
8526 NULL((void*)0), 0x0,
8527 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8528 },
8529 { &hf_oran_uplane,
8530 { "U-Plane", "oran_fh_cus.u-plane",
8531 FT_NONE, BASE_NONE,
8532 NULL((void*)0), 0x0,
8533 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8534 },
8535 { &hf_oran_bf,
8536 { "BeamForming", "oran_fh_cus.bf",
8537 FT_NONE, BASE_NONE,
8538 NULL((void*)0), 0x0,
8539 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8540 },
8541 { &hf_oran_zero_prb,
8542 { "Zero PRB", "oran_fh_cus.zero-prb",
8543 FT_NONE, BASE_NONE,
8544 NULL((void*)0), 0x0,
8545 "All of the REs in this PRB are zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8546 },
8547
8548 /* 5.1.3.2.7 */
8549 { &hf_oran_ecpri_pcid,
8550 { "ecpriPcid", "oran_fh_cus.ecpriPcid",
8551 FT_NONE, BASE_NONE,
8552 NULL((void*)0), 0x0,
8553 "IQ data transfer message series identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8554 },
8555 { &hf_oran_ecpri_rtcid,
8556 { "ecpriRtcid", "oran_fh_cus.ecpriRtcid",
8557 FT_NONE, BASE_NONE,
8558 NULL((void*)0), 0x0,
8559 "Real time control data identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8560 },
8561 /* 5.1.3.2.8 */
8562 { &hf_oran_ecpri_seqid,
8563 { "ecpriSeqid", "oran_fh_cus.ecpriSeqid",
8564 FT_NONE, BASE_NONE,
8565 NULL((void*)0), 0x0,
8566 "message identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8567 },
8568
8569 /* 7.7.23.2 */
8570 { &hf_oran_num_sym_prb_pattern,
8571 { "numSymPrbPattern", "oran_fh_cus.numSymPrbPattern",
8572 FT_UINT8, BASE_DEC,
8573 NULL((void*)0), 0xf0,
8574 "number of symbol and resource block patterns", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8575 },
8576 /* 7.7.23.11 */
8577 { &hf_oran_prb_mode,
8578 { "prbMode", "oran_fh_cus.prbMode",
8579 FT_BOOLEAN, 8,
8580 TFS(&prb_mode_tfs)((0 ? (const struct true_false_string*)0 : ((&prb_mode_tfs
))))
, 0x01,
8581 "PRB Mode", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8582 },
8583
8584 { &hf_oran_sym_prb_pattern,
8585 { "symPrbPattern", "oran_fh_cus.symPrbPattern",
8586 FT_STRING, BASE_NONE,
8587 NULL((void*)0), 0x0,
8588 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8589 },
8590
8591 /* 7.7.23.3 */
8592 { &hf_oran_sym_mask,
8593 { "symMask", "oran_fh_cus.symMask",
8594 FT_UINT16, BASE_HEX,
8595 NULL((void*)0), 0x3fff,
8596 "symbol mask part of symPrbPattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8597 },
8598 /* 7.7.23.5 */
8599 {&hf_oran_num_mc_scale_offset,
8600 {"numMcScaleOffset", "oran_fh_cus.numMcScaleOffset",
8601 FT_UINT8, BASE_DEC,
8602 NULL((void*)0), 0xf0,
8603 "number of modulation compression scaling value per symPrbPattern",
8604 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8605 },
8606 /* 7.7.23.4 */
8607 { &hf_oran_prb_pattern,
8608 { "prbPattern", "oran_fh_cus.prbPattern",
8609 FT_UINT8, BASE_DEC,
8610 NULL((void*)0), 0x0f,
8611 "resource block pattern part of symPrbPattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8612 },
8613
8614 /* 7.7.3.2 */
8615 { &hf_oran_codebook_index,
8616 { "codebookIndex", "oran_fh_cus.codebookIndex",
8617 FT_UINT8, BASE_DEC,
8618 NULL((void*)0), 0x0,
8619 "precoder codebook used for transmission", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8620 },
8621 /* 7.7.3.3 */
8622 { &hf_oran_layerid,
8623 { "layerID", "oran_fh_cus.layerID",
8624 FT_UINT8, BASE_DEC,
8625 NULL((void*)0), 0xf0,
8626 "Layer ID for DL transmission", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8627 },
8628 /* 7.7.3.5 */
8629 { &hf_oran_numlayers,
8630 { "numLayers", "oran_fh_cus.numLayers",
8631 FT_UINT8, BASE_DEC,
8632 NULL((void*)0), 0x0f,
8633 "number of layers for DL transmission", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8634 },
8635 /* 7.7.3.4 */
8636 { &hf_oran_txscheme,
8637 { "txScheme", "oran_fh_cus.txScheme",
8638 FT_UINT8, BASE_DEC,
8639 NULL((void*)0), 0xf0,
8640 "transmission scheme", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8641 },
8642 /* 7.7.3.6 */
8643 { &hf_oran_crs_remask,
8644 { "crsReMask", "oran_fh_cus.crsReMask",
8645 FT_UINT16, BASE_HEX,
8646 NULL((void*)0), 0x0fff,
8647 "CRS resource element mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8648 },
8649 /* 7.7.3.8 */
8650 { &hf_oran_crs_shift,
8651 { "crsShift", "oran_fh_cus.crsShift",
8652 FT_UINT8, BASE_HEX,
8653 NULL((void*)0), 0x80,
8654 "CRS resource element mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8655 },
8656 /* 7.7.3.7 */
8657 { &hf_oran_crs_symnum,
8658 { "crsSymNum", "oran_fh_cus.crsSymNum",
8659 FT_UINT8, BASE_DEC,
8660 NULL((void*)0), 0x0f,
8661 "CRS symbol number indication", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8662 },
8663 /* 7.7.3.9 */
8664 { &hf_oran_beamid_ap1,
8665 { "beamIdAP1", "oran_fh_cus.beamIdAP1",
8666 FT_UINT16, BASE_DEC,
8667 NULL((void*)0), 0x7f,
8668 "beam id to be used for antenna port 1", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8669 },
8670 /* 7.7.3.10 */
8671 { &hf_oran_beamid_ap2,
8672 { "beamIdAP2", "oran_fh_cus.beamIdAP2",
8673 FT_UINT16, BASE_DEC,
8674 NULL((void*)0), 0x7f,
8675 "beam id to be used for antenna port 2", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8676 },
8677 /* 7.7.3.11 */
8678 { &hf_oran_beamid_ap3,
8679 { "beamIdAP3", "oran_fh_cus.beamIdAP3",
8680 FT_UINT16, BASE_DEC,
8681 NULL((void*)0), 0x7f,
8682 "beam id to be used for antenna port 3", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8683 },
8684
8685 /* 7.7.10.3a */
8686 { &hf_oran_port_list_index,
8687 { "portListIndex", "oran_fh_cus.portListIndex",
8688 FT_UINT8, BASE_DEC,
8689 NULL((void*)0), 0x0,
8690 "the index of an eAxC_ID in the port-list", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8691 },
8692
8693 { &hf_oran_alpn_per_sym,
8694 { "alpnPerSym", "oran_fh_cus.alpnPerSym",
8695 FT_UINT8, BASE_HEX,
8696 VALS(alpn_per_sym_vals)((0 ? (const struct _value_string*)0 : ((alpn_per_sym_vals)))
)
, 0x80,
8697 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8698 },
8699 { &hf_oran_ant_dmrs_snr,
8700 { "antDmrsSnr", "oran_fh_cus.antDmrsSnr",
8701 FT_UINT8, BASE_HEX,
8702 VALS(ant_dmrs_snr_vals)((0 ? (const struct _value_string*)0 : ((ant_dmrs_snr_vals)))
)
, 0x40,
8703 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8704 },
8705
8706 /* 7.7.24.6 */
8707 { &hf_oran_user_group_size,
8708 { "userGroupSize", "oran_fh_cus.userGroupSize",
8709 FT_UINT8, BASE_DEC,
8710 NULL((void*)0), 0x1f,
8711 "number of UE data layers in the user group identified by userGroupId", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8712 },
8713 /* 7.7.24.7 */
8714 { &hf_oran_user_group_id,
8715 { "userGroupId", "oran_fh_cus.userGroupId",
8716 FT_UINT8, BASE_DEC,
8717 NULL((void*)0), 0x0,
8718 "indicates user group described by the section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8719 },
8720 /* 7.7.24.8 */
8721 { &hf_oran_entry_type,
8722 { "entryType", "oran_fh_cus.entryType",
8723 FT_UINT8, BASE_DEC,
8724 VALS(entry_type_vals)((0 ? (const struct _value_string*)0 : ((entry_type_vals)))), 0xe0,
8725 "indicates format of the entry", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8726 },
8727 /* 7.7.24.9 */
8728 { &hf_oran_dmrs_port_number,
8729 { "dmrsPortNumber", "oran_fh_cus.dmrsPortNumber",
8730 FT_UINT8, BASE_DEC,
8731 NULL((void*)0), 0x1f,
8732 "DMRS antenna port number for the associated ueId", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8733 },
8734 /* 7.7.24.10 */
8735 { &hf_oran_ueid_reset,
8736 { "ueidReset", "oran_fh_cus.ueidReset",
8737 FT_BOOLEAN, 8,
8738 TFS(&tfs_ueid_reset)((0 ? (const struct true_false_string*)0 : ((&tfs_ueid_reset
))))
, 0x80,
8739 "same UEID as the previous slot", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8740 },
8741 /* 7.7.24.11 */
8742 { &hf_oran_dmrs_symbol_mask,
8743 { "dmrsSymbolMask", "oran_fh_cus.dmrsSymbolMask",
8744 FT_UINT16, BASE_HEX,
8745 NULL((void*)0), 0x3fff,
8746 "symbols within the slot containing DMRS", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8747 },
8748 { &hf_oran_dmrs_symbol_mask_s13,
8749 { "symbol 13", "oran_fh_cus.dmrsSymbolMask.symbol-13",
8750 FT_BOOLEAN, 16,
8751 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x2000,
8752 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8753 },
8754 { &hf_oran_dmrs_symbol_mask_s12,
8755 { "symbol 12", "oran_fh_cus.dmrsSymbolMask.symbol-12",
8756 FT_BOOLEAN, 16,
8757 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x1000,
8758 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8759 },
8760 { &hf_oran_dmrs_symbol_mask_s11,
8761 { "symbol 11", "oran_fh_cus.dmrsSymbolMask.symbol-11",
8762 FT_BOOLEAN, 16,
8763 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0800,
8764 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8765 },
8766 { &hf_oran_dmrs_symbol_mask_s10,
8767 { "symbol 10", "oran_fh_cus.dmrsSymbolMask.symbol-10",
8768 FT_BOOLEAN, 16,
8769 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0400,
8770 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8771 },
8772 { &hf_oran_dmrs_symbol_mask_s9,
8773 { "symbol 9", "oran_fh_cus.dmrsSymbolMask.symbol-9",
8774 FT_BOOLEAN, 16,
8775 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0200,
8776 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8777 },
8778 { &hf_oran_dmrs_symbol_mask_s8,
8779 { "symbol 8", "oran_fh_cus.dmrsSymbolMask.symbol-8",
8780 FT_BOOLEAN, 16,
8781 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0100,
8782 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8783 },
8784 { &hf_oran_dmrs_symbol_mask_s7,
8785 { "symbol 7", "oran_fh_cus.dmrsSymbolMask.symbol-7",
8786 FT_BOOLEAN, 16,
8787 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0080,
8788 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8789 },
8790 { &hf_oran_dmrs_symbol_mask_s6,
8791 { "symbol 6", "oran_fh_cus.dmrsSymbolMask.symbol-6",
8792 FT_BOOLEAN, 16,
8793 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0040,
8794 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8795 },
8796 { &hf_oran_dmrs_symbol_mask_s5,
8797 { "symbol 5", "oran_fh_cus.dmrsSymbolMask.symbol-5",
8798 FT_BOOLEAN, 16,
8799 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0020,
8800 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8801 },
8802 { &hf_oran_dmrs_symbol_mask_s4,
8803 { "symbol 4", "oran_fh_cus.dmrsSymbolMask.symbol-4",
8804 FT_BOOLEAN, 16,
8805 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0010,
8806 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8807 },
8808 { &hf_oran_dmrs_symbol_mask_s3,
8809 { "symbol 3", "oran_fh_cus.dmrsSymbolMask.symbol-3",
8810 FT_BOOLEAN, 16,
8811 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0008,
8812 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8813 },
8814 { &hf_oran_dmrs_symbol_mask_s2,
8815 { "symbol 2", "oran_fh_cus.dmrsSymbolMask.symbol-2",
8816 FT_BOOLEAN, 16,
8817 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0004,
8818 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8819 },
8820 { &hf_oran_dmrs_symbol_mask_s1,
8821 { "symbol 1", "oran_fh_cus.dmrsSymbolMask.symbol-1",
8822 FT_BOOLEAN, 16,
8823 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0002,
8824 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8825 },
8826 { &hf_oran_dmrs_symbol_mask_s0,
8827 { "symbol 0", "oran_fh_cus.dmrsSymbolMask.symbol-0",
8828 FT_BOOLEAN, 16,
8829 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0001,
8830 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8831 },
8832
8833 /* 7.7.24.12 */
8834 { &hf_oran_scrambling,
8835 { "scrambling", "oran_fh_cus.scrambling",
8836 FT_UINT16, BASE_HEX,
8837 NULL((void*)0), 0x0,
8838 "used to calculate the seed value required to initialize pseudo-random generator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8839 },
8840 /* 7.7.24.13 */
8841 { &hf_oran_nscid,
8842 { "nscid", "oran_fh_cus.nscid",
8843 FT_UINT8, BASE_HEX,
8844 NULL((void*)0), 0x80,
8845 "used to calculate the seed value for pseudo-random generator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8846 },
8847 /* 7.7.24.14 */
8848 { &hf_oran_dtype,
8849 { "dType", "oran_fh_cus.dType",
8850 FT_UINT8, BASE_HEX,
8851 VALS(dtype_vals)((0 ? (const struct _value_string*)0 : ((dtype_vals)))), 0x40,
8852 "PUSCH DMRS configuration type", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8853 },
8854 /* 7.7.24.15 */
8855 { &hf_oran_cmd_without_data,
8856 { "cmdWithoutData", "oran_fh_cus.cmdWithoutData",
8857 FT_UINT8, BASE_HEX,
8858 NULL((void*)0), 0x30,
8859 "number of DMRS CDM groups without data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8860 },
8861 /* 7.7.24.16 */
8862 { &hf_oran_lambda,
8863 { "lambda", "oran_fh_cus.lambda",
8864 FT_UINT8, BASE_HEX,
8865 NULL((void*)0), 0x0c,
8866 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8867 },
8868 /* 7.7.24.19 */
8869 { &hf_oran_first_prb,
8870 { "firstPrb", "oran_fh_cus.firstPrb",
8871 FT_UINT16, BASE_DEC,
8872 NULL((void*)0), 0x03fe,
8873 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8874 },
8875 /* 7.7.24.20 */
8876 { &hf_oran_last_prb,
8877 { "lastPrb", "oran_fh_cus.lastPrb",
8878 FT_UINT16, BASE_DEC,
8879 NULL((void*)0), 0x01ff,
8880 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8881 },
8882
8883 /* 7.7.24.17 */
8884 /* TODO: add value_string */
8885 { &hf_oran_low_papr_type,
8886 { "lowPaprType", "oran_fh_cus.lowPaprType",
8887 FT_UINT8, BASE_HEX,
8888 VALS(papr_type_vals)((0 ? (const struct _value_string*)0 : ((papr_type_vals)))), 0x30,
8889 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8890 },
8891 /* 7.7.24.18 */
8892 { &hf_oran_hopping_mode,
8893 { "hoppingMode", "oran_fh_cus.hoppingMode",
8894 FT_UINT8, BASE_HEX,
8895 VALS(hopping_mode_vals)((0 ? (const struct _value_string*)0 : ((hopping_mode_vals)))
)
, 0x0c,
8896 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8897 },
8898
8899 { &hf_oran_tx_win_for_on_air_symbol_l,
8900 { "txWinForOnAirSymbol", "oran_fh_cus.txWinForOnAirSymbol",
8901 FT_UINT8, BASE_DEC,
8902 NULL((void*)0), 0xf0,
8903 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8904 },
8905 { &hf_oran_tx_win_for_on_air_symbol_r,
8906 { "txWinForOnAirSymbol", "oran_fh_cus.txWinForOnAirSymbol",
8907 FT_UINT8, BASE_DEC,
8908 NULL((void*)0), 0x0f,
8909 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8910 },
8911 /* 7.7.26.2 */
8912 { &hf_oran_num_fo_fb,
8913 { "numFoFb", "oran_fh_cus.numFoFb",
8914 FT_UINT8, BASE_DEC,
8915 NULL((void*)0), 0x7f,
8916 "number of frequency offset feedback", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8917 },
8918 /* 7.7.26.3 */
8919 { &hf_oran_freq_offset_fb,
8920 { "freqOffsetFb", "oran_fh_cus.freqOffsetFb",
8921 FT_UINT16, BASE_HEX_DEC | BASE_RANGE_STRING0x00000100,
8922 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
8923 "UE frequency offset feedback", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8924 },
8925
8926 /* 7.5.2.19 */
8927 { &hf_oran_num_sinr_per_prb,
8928 { "numSinrPerPrb", "oran_fh_cus.numSinrPerPrb",
8929 FT_UINT8, BASE_DEC,
8930 VALS(num_sinr_per_prb_vals)((0 ? (const struct _value_string*)0 : ((num_sinr_per_prb_vals
))))
, 0xe0,
8931 "number of SINR values per PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8932 },
8933 { &hf_oran_num_sinr_per_prb_right,
8934 { "numSinrPerPrb", "oran_fh_cus.numSinrPerPrb",
8935 FT_UINT8, BASE_DEC,
8936 VALS(num_sinr_per_prb_vals)((0 ? (const struct _value_string*)0 : ((num_sinr_per_prb_vals
))))
, 0x0e,
8937 "number of SINR values per PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8938 },
8939
8940 /* 7.5.3.68 */
8941 { &hf_oran_sinr_value,
8942 { "sinrValue", "oran_fh_cus.sinrValue",
8943 FT_FLOAT, BASE_NONE,
8944 NULL((void*)0), 0x0,
8945 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8946 },
8947
8948 { &hf_oran_measurement_report,
8949 { "Measurement Report", "oran_fh_cus.measurement-report",
8950 FT_STRING, BASE_NONE,
8951 NULL((void*)0), 0x0,
8952 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8953 },
8954 /* 7.5.3.57 */
8955 { &hf_oran_mf,
8956 { "mf", "oran_fh_cus.mf",
8957 FT_BOOLEAN, 8,
8958 TFS(&measurement_flag_tfs)((0 ? (const struct true_false_string*)0 : ((&measurement_flag_tfs
))))
, 0x80,
8959 "measurement flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8960 },
8961 /* 7.5.3.59 */
8962 { &hf_oran_meas_data_size,
8963 { "measDataSize", "oran_fh_cus.measDataSize",
8964 FT_UINT16, BASE_DEC,
8965 NULL((void*)0), 0x0,
8966 "measurement data size (in words)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8967 },
8968
8969 /* 7.5.3.58 */
8970 { &hf_oran_meas_type_id,
8971 { "measTypeId", "oran_fh_cus.measTypeId",
8972 FT_UINT8, BASE_DEC,
8973 VALS(meas_type_id_vals)((0 ? (const struct _value_string*)0 : ((meas_type_id_vals)))
)
, 0x7F,
8974 "measurement report type identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8975 },
8976 /* 7.5.3.66 */
8977 { &hf_oran_num_elements,
8978 { "numElements", "oran_fh_cus.numElements",
8979 FT_UINT8, BASE_DEC,
8980 NULL((void*)0), 0x0,
8981 "measurement report type identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8982 },
8983 /* 7.5.3.60 */
8984 { &hf_oran_ue_tae,
8985 { "ueTae", "oran_fh_cus.ueTae",
8986 FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
8987 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
8988 "UE Timing Advance Error", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8989 },
8990 /* 7.5.3.61 */
8991 { &hf_oran_ue_layer_power,
8992 { "ueLayerPower", "oran_fh_cus.ueLayerPower",
8993 FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
8994 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
8995 "UE Layer Power", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8996 },
8997
8998 /* 7.5.3.62 */
8999 { &hf_oran_ue_freq_offset,
9000 { "ueFreqOffset", "oran_fh_cus.ueFreqOffset",
9001 FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
9002 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
9003 "UE frequency offset", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9004 },
9005 /* 7.5.3.63 */
9006 { &hf_oran_ipn_power,
9007 { "ipnPower", "oran_fh_cus.ipnPower",
9008 FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
9009 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
9010 "Interference plus Noise power", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9011 },
9012 /* 7.5.3.64 */
9013 { &hf_oran_ant_dmrs_snr_val,
9014 { "antDmrsSnrVal", "oran_fh_cus.antDmrsSnrVal",
9015 FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
9016 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
9017 "antenna DMRS-SNR", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9018 },
9019
9020 { &hf_oran_measurement_command,
9021 { "Measurement Command", "oran_fh_cus.measurement-command",
9022 FT_STRING, BASE_NONE,
9023 NULL((void*)0), 0x0,
9024 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9025 },
9026
9027 /* 7.5.27.2 */
9028 { &hf_oran_beam_type,
9029 {"beamType", "oran_fh_cus.beamType",
9030 FT_UINT16, BASE_DEC,
9031 VALS(beam_type_vals)((0 ? (const struct _value_string*)0 : ((beam_type_vals)))), 0xc0,
9032 NULL((void*)0),
9033 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9034 },
9035 /* 7.5.3.65 */
9036 { &hf_oran_meas_cmd_size,
9037 {"measCmdSize", "oran_fh_cus.measCmdSize",
9038 FT_UINT16, BASE_DEC,
9039 NULL((void*)0), 0x0,
9040 "measurement command size in words",
9041 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9042 },
9043
9044 { &hf_oran_symbol_reordering_layer,
9045 { "Layer", "oran_fh_cus.layer",
9046 FT_STRING, BASE_NONE,
9047 NULL((void*)0), 0x0,
9048 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9049 },
9050 { &hf_oran_dmrs_entry,
9051 { "Entry", "oran_fh_cus.dmrs-entry",
9052 FT_STRING, BASE_NONE,
9053 NULL((void*)0), 0x0,
9054 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9055 },
9056
9057 { &hf_oran_c_section_common,
9058 { "Common Section", "oran_fh_cus.c-plane.section.common",
9059 FT_STRING, BASE_NONE,
9060 NULL((void*)0), 0x0,
9061 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9062 },
9063 { &hf_oran_c_section,
9064 { "Section", "oran_fh_cus.c-plane.section",
9065 FT_STRING, BASE_NONE,
9066 NULL((void*)0), 0x0,
9067 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9068 },
9069 { &hf_oran_u_section,
9070 { "Section", "oran_fh_cus.u-plane.section",
9071 FT_STRING, BASE_NONE,
9072 NULL((void*)0), 0x0,
9073 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9074 },
9075
9076 /* Link back to UL C-plane where udCompHdr was recorded */
9077 { &hf_oran_ul_cplane_ud_comp_hdr_frame,
9078 { "C-Plane UL udCompHdr frame", "oran_fh_cus.ul-cplane.udCompHdr",
9079 FT_FRAMENUM, BASE_NONE,
9080 FRAMENUM_TYPE(FT_FRAMENUM_REQUEST)((gpointer) (glong) (FT_FRAMENUM_REQUEST)), 0x0,
9081 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9082 },
9083 };
9084
9085 /* Setup protocol subtree array */
9086 static int *ett[] = {
9087 &ett_oran,
9088 &ett_oran_ecpri_pcid,
9089 &ett_oran_ecpri_rtcid,
9090 &ett_oran_ecpri_seqid,
9091 &ett_oran_section_type,
9092 &ett_oran_u_timing,
9093 &ett_oran_u_section,
9094 &ett_oran_u_prb,
9095 &ett_oran_section,
9096 &ett_oran_iq,
9097 &ett_oran_bfw_bundle,
9098 &ett_oran_bfw,
9099 &ett_oran_frequency_range,
9100 &ett_oran_prb_cisamples,
9101 &ett_oran_cisample,
9102 &ett_oran_udcomphdr,
9103 &ett_oran_udcompparam,
9104 &ett_oran_cicomphdr,
9105 &ett_oran_cicompparam,
9106 &ett_oran_bfwcomphdr,
9107 &ett_oran_bfwcompparam,
9108 &ett_oran_ext19_port,
9109 &ett_oran_prb_allocation,
9110 &ett_oran_punc_pattern,
9111 &ett_oran_bfacomphdr,
9112 &ett_oran_modcomp_param_set,
9113 &ett_oran_st4_cmd_header,
9114 &ett_oran_st4_cmd,
9115 &ett_oran_sym_prb_pattern,
9116 &ett_oran_measurement_report,
9117 &ett_oran_measurement_command,
9118 &ett_oran_sresmask,
9119 &ett_oran_c_section_common,
9120 &ett_oran_c_section,
9121 &ett_oran_remask,
9122 &ett_oran_symbol_reordering_layer,
9123 &ett_oran_dmrs_entry,
9124 &ett_oran_dmrs_symbol_mask,
9125 &ett_oran_symbol_mask,
9126 &ett_active_beamspace_coefficient_mask
9127 };
9128
9129 static int *ext_ett[HIGHEST_EXTTYPE28];
9130 for (unsigned extno=0; extno<HIGHEST_EXTTYPE28; extno++) {
9131 ext_ett[extno] = &ett_oran_c_section_extension[extno];
9132 }
9133
9134 expert_module_t* expert_oran;
9135
9136 static ei_register_info ei[] = {
9137 { &ei_oran_unsupported_bfw_compression_method, { "oran_fh_cus.unsupported_bfw_compression_method", PI_UNDECODED0x05000000, PI_WARN0x00600000, "Unsupported BFW Compression Method", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9138 { &ei_oran_invalid_sample_bit_width, { "oran_fh_cus.invalid_sample_bit_width", PI_UNDECODED0x05000000, PI_ERROR0x00800000, "Unsupported sample bit width", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9139 { &ei_oran_reserved_numBundPrb, { "oran_fh_cus.reserved_numBundPrb", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "Reserved value of numBundPrb", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9140 { &ei_oran_extlen_wrong, { "oran_fh_cus.extlen_wrong", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "extlen doesn't match number of dissected bytes", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9141 { &ei_oran_invalid_eaxc_bit_width, { "oran_fh_cus.invalid_eaxc_bit_width", PI_UNDECODED0x05000000, PI_ERROR0x00800000, "Inconsistent eAxC bit width", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9142 { &ei_oran_extlen_zero, { "oran_fh_cus.extlen_zero", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "extlen - zero is reserved value", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9143 { &ei_oran_rbg_size_reserved, { "oran_fh_cus.rbg_size_reserved", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "rbgSize - zero is reserved value", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9144 { &ei_oran_frame_length, { "oran_fh_cus.frame_length", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "there should be 0-3 bytes remaining after PDU in frame", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9145 { &ei_oran_numprbc_ext21_zero, { "oran_fh_cus.numprbc_ext21_zero", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "numPrbc shall not be set to 0 when ciPrbGroupSize is configured", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9146 { &ei_oran_ci_prb_group_size_reserved, { "oran_fh_cus.ci_prb_group_size_reserved", PI_MALFORMED0x07000000, PI_WARN0x00600000, "ciPrbGroupSize should be 2-254", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9147 { &ei_oran_st8_nackid, { "oran_fh_cus.st8_nackid", PI_SEQUENCE0x02000000, PI_WARN0x00600000, "operation for this ackId failed", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9148 { &ei_oran_st4_no_cmds, { "oran_fh_cus.st4_nackid", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "Not valid to have no commands in ST4", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9149 { &ei_oran_st4_zero_len_cmd, { "oran_fh_cus.st4_zero_len_cmd", PI_MALFORMED0x07000000, PI_WARN0x00600000, "ST4 cmd with length 0 is reserved", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9150 { &ei_oran_st4_wrong_len_cmd, { "oran_fh_cus.st4_wrong_len_cmd", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "ST4 cmd with length not matching contents", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9151 { &ei_oran_st4_unknown_cmd, { "oran_fh_cus.st4_unknown_cmd", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "ST4 cmd with unknown command code", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9152 { &ei_oran_mcot_out_of_range, { "oran_fh_cus.mcot_out_of_range", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "MCOT should be 1-10", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9153 { &ei_oran_se10_unknown_beamgrouptype, { "oran_fh_cus.se10_unknown_beamgrouptype", PI_MALFORMED0x07000000, PI_WARN0x00600000, "SE10 - unknown BeamGroupType value", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9154 { &ei_oran_se10_not_allowed, { "oran_fh_cus.se10_not_allowed", PI_MALFORMED0x07000000, PI_WARN0x00600000, "SE10 - type not allowed for sectionType", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9155 { &ei_oran_start_symbol_id_not_zero, { "oran_fh_cus.startsymbolid_shall_be_zero", PI_MALFORMED0x07000000, PI_WARN0x00600000, "For ST4 commands 3&4, startSymbolId shall be 0", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9156 { &ei_oran_trx_control_cmd_scope, { "oran_fh_cus.trx_command.bad_cmdscope", PI_MALFORMED0x07000000, PI_WARN0x00600000, "TRX command must have cmdScope of ARRAY-COMMAND", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9157 { &ei_oran_unhandled_se, { "oran_fh_cus.se_not_handled", PI_UNDECODED0x05000000, PI_WARN0x00600000, "SE not recognised/handled by dissector", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9158 { &ei_oran_bad_symbolmask, { "oran_fh_cus.bad_symbol_mask", PI_MALFORMED0x07000000, PI_WARN0x00600000, "For non-zero sleepMode, symbolMask must be 0x0 or 0x3ffff", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9159 { &ei_oran_numslots_not_zero, { "oran_fh_cus.numslots_not_zero", PI_MALFORMED0x07000000, PI_WARN0x00600000, "For ST4 TIME_DOMAIN_BEAM_WEIGHTS, numSlots should be 0", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9160 { &ei_oran_version_unsupported, { "oran_fh_cus.version_unsupported", PI_UNDECODED0x05000000, PI_WARN0x00600000, "Protocol version unsupported", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9161 { &ei_oran_laa_msg_type_unsupported, { "oran_fh_cus.laa_msg_type_unsupported", PI_UNDECODED0x05000000, PI_WARN0x00600000, "laaMsgType unsupported", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9162 { &ei_oran_se_on_unsupported_st, { "oran_fh_cus.se_on_unsupported_st", PI_MALFORMED0x07000000, PI_WARN0x00600000, "Section Extension should not appear on this Section Type", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9163 { &ei_oran_cplane_unexpected_sequence_number_ul, { "oran_fh_cus.unexpected_seq_no_cplane.ul", PI_SEQUENCE0x02000000, PI_WARN0x00600000, "Unexpected sequence number seen in C-Plane UL", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9164 { &ei_oran_cplane_unexpected_sequence_number_dl, { "oran_fh_cus.unexpected_seq_no_cplane.dl", PI_SEQUENCE0x02000000, PI_WARN0x00600000, "Unexpected sequence number seen in C-Plane DL", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9165 { &ei_oran_uplane_unexpected_sequence_number_ul, { "oran_fh_cus.unexpected_seq_no_uplane.ul", PI_SEQUENCE0x02000000, PI_WARN0x00600000, "Unexpected sequence number seen in U-Plane UL", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9166 { &ei_oran_uplane_unexpected_sequence_number_dl, { "oran_fh_cus.unexpected_seq_no_uplane.dl", PI_SEQUENCE0x02000000, PI_WARN0x00600000, "Unexpected sequence number seen in U-Plane DL", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9167 { &ei_oran_acknack_no_request, { "oran_fh_cus.acknack_no_request", PI_SEQUENCE0x02000000, PI_WARN0x00600000, "Have ackNackId response, but no request", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9168 { &ei_oran_udpcomphdr_should_be_zero, { "oran_fh_cus.udcomphdr_should_be_zero", PI_MALFORMED0x07000000, PI_WARN0x00600000, "C-Plane udCompHdr in DL should be set to 0", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9169 { &ei_oran_radio_fragmentation_c_plane, { "oran_fh_cus.radio_fragmentation_c_plane", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "Radio fragmentation not allowed in C-PLane", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9170 { &ei_oran_radio_fragmentation_u_plane, { "oran_fh_cus.radio_fragmentation_u_plane", PI_UNDECODED0x05000000, PI_WARN0x00600000, "Radio fragmentation in C-PLane not yet supported", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9171 { &ei_oran_lastRbdid_out_of_range, { "oran_fh_cus.lastrbdid_out_of_range", PI_MALFORMED0x07000000, PI_WARN0x00600000, "SE 6 has bad rbgSize", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9172 { &ei_oran_rbgMask_beyond_last_rbdid, { "oran_fh_cus.rbgmask_beyond_lastrbdid", PI_MALFORMED0x07000000, PI_WARN0x00600000, "rbgMask has bits set beyond lastRbgId", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9173 { &ei_oran_unexpected_measTypeId, { "oran_fh_cus.unexpected_meastypeid", PI_MALFORMED0x07000000, PI_WARN0x00600000, "unexpected measTypeId", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9174 { &ei_oran_unsupported_compression_method, { "oran_fh_cus.compression_type_unsupported", PI_UNDECODED0x05000000, PI_WARN0x00600000, "Unsupported compression type", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9175 { &ei_oran_ud_comp_len_wrong_size, { "oran_fh_cus.ud_comp_len_wrong_size", PI_MALFORMED0x07000000, PI_WARN0x00600000, "udCompLen does not match length of U-Plane section", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9176 { &ei_oran_sresmask2_not_zero_with_rb, { "oran_fh_cus.sresmask2_not_zero", PI_MALFORMED0x07000000, PI_WARN0x00600000, "sReSMask2 should be zero when rb set", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9177 { &ei_oran_st6_rb_shall_be_0, { "oran_fh_cus.st6_rb_set", PI_MALFORMED0x07000000, PI_WARN0x00600000, "rb should not be set for Section Type 6", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9178 { &ei_oran_st9_not_ul, { "oran_fh_cus.st9_not_ul", PI_MALFORMED0x07000000, PI_WARN0x00600000, "Section Type 9 should only be sent in uplink direction", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9179 { &ei_oran_st10_numsymbol_not_14, { "oran_fh_cus.st10_numsymbol_not_14", PI_MALFORMED0x07000000, PI_WARN0x00600000, "numSymbol should be 14 for Section Type 10", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9180 { &ei_oran_st10_startsymbolid_not_0, { "oran_fh_cus.st10_startsymbolid_not_0", PI_MALFORMED0x07000000, PI_WARN0x00600000, "startSymbolId should be 0 for Section Type 10", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9181 { &ei_oran_st10_not_ul, { "oran_fh_cus.st10_not_ul", PI_MALFORMED0x07000000, PI_WARN0x00600000, "Section Type 10 should only be sent in uplink direction", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9182 { &ei_oran_se24_nothing_to_inherit, { "oran_fh_cus.se24_nothing_to_inherit", PI_MALFORMED0x07000000, PI_WARN0x00600000, "SE10 doesn't have type 2 or 3 before trying to inherit", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9183 { &ei_oran_num_sinr_per_prb_unknown, { "oran_fh_cus.unexpected_num_sinr_per_prb", PI_MALFORMED0x07000000, PI_WARN0x00600000, "invalid numSinrPerPrb value", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9184 { &ei_oran_start_symbol_id_bits_ignored, { "oran_fh_cus.start_symbol_id_bits_ignored", PI_MALFORMED0x07000000, PI_WARN0x00600000, "some startSymbolId lower bits ignored", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9185 { &ei_oran_user_group_id_reserved_value, { "oran_fh_cus.user_group_id.reserved_value", PI_MALFORMED0x07000000, PI_WARN0x00600000, "userGroupId value 255 is reserved", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9186 { &ei_oran_port_list_index_zero, { "oran_fh_cus.port_list_index.zero", PI_MALFORMED0x07000000, PI_WARN0x00600000, "portListIndex should not be zero", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9187 { &ei_oran_ul_uplane_symbol_too_long, { "oran_fh_cus.ul_uplane_symbol_tx_too_slow", PI_RECEIVE0x0f000000, PI_WARN0x00600000, "UL U-Plane Tx took too long for symbol (limit set in preference)", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},
9188 };
9189
9190 /* Register the protocol name and description */
9191 proto_oran = proto_register_protocol("O-RAN Fronthaul CUS", "O-RAN FH CUS", "oran_fh_cus");
9192
9193 /* Allow dissector to find be found by name. */
9194 register_dissector("oran_fh_cus", dissect_oran, proto_oran);
9195
9196 /* Register the tap name. */
9197 oran_tap = register_tap("oran-fh-cus");
9198
9199 /* Required function calls to register the header fields and subtrees */
9200 proto_register_field_array(proto_oran, hf, array_length(hf)(sizeof (hf) / sizeof (hf)[0]));
9201 proto_register_subtree_array(ett, array_length(ett)(sizeof (ett) / sizeof (ett)[0]));
9202 proto_register_subtree_array(ext_ett, array_length(ext_ett)(sizeof (ext_ett) / sizeof (ext_ett)[0]));
9203
9204
9205 expert_oran = expert_register_protocol(proto_oran);
9206 expert_register_field_array(expert_oran, ei, array_length(ei)(sizeof (ei) / sizeof (ei)[0]));
9207
9208 module_t * oran_module = prefs_register_protocol(proto_oran, NULL((void*)0));
9209
9210 /* prefs_register_static_text_preference(oran_module, "oran.stream", "", ""); */
9211
9212 /* Register bit width/compression preferences separately by direction. */
9213 prefs_register_uint_preference(oran_module, "oran.du_port_id_bits", "DU Port ID bits [a]",
9214 "The bit width of DU Port ID - sum of a,b,c&d (eAxC) must be 16", 10, &pref_du_port_id_bits);
9215 prefs_register_uint_preference(oran_module, "oran.bandsector_id_bits", "BandSector ID bits [b]",
9216 "The bit width of BandSector ID - sum of a,b,c&d (eAxC) must be 16", 10, &pref_bandsector_id_bits);
9217 prefs_register_uint_preference(oran_module, "oran.cc_id_bits", "CC ID bits [c]",
9218 "The bit width of CC ID - sum of a,b,c&d (eAxC) must be 16", 10, &pref_cc_id_bits);
9219 prefs_register_uint_preference(oran_module, "oran.ru_port_id_bits", "RU Port ID bits [d]",
9220 "The bit width of RU Port ID - sum of a,b,c&d (eAxC) must be 16", 10, &pref_ru_port_id_bits);
9221
9222 prefs_register_static_text_preference(oran_module, "oran.ul", "", "");
9223
9224 /* Uplink userplane */
9225 prefs_register_uint_preference(oran_module, "oran.iq_bitwidth_up", "IQ Bitwidth Uplink",
9226 "The bit width of a sample in the Uplink (if no udcompHdr and no C-Plane)", 10, &pref_sample_bit_width_uplink);
9227 prefs_register_enum_preference(oran_module, "oran.ud_comp_up", "Uplink User Data Compression",
9228 "Uplink User Data Compression (if no udcompHdr and no C-Plane)", &pref_iqCompressionUplink, ul_compression_options, false0);
9229 prefs_register_enum_preference(oran_module, "oran.ud_comp_hdr_up", "udCompHdr field is present for uplink",
9230 "The udCompHdr field in U-Plane messages may or may not be present, depending on the "
9231 "configuration of the O-RU. This preference instructs the dissector to expect "
9232 "this field to be present in uplink messages",
9233 &pref_includeUdCompHeaderUplink, udcomphdr_present_options, false0);
9234 prefs_register_uint_preference(oran_module, "oran.ul_slot_us_limit", "Microseconds allowed for UL tx in symbol",
9235 "Maximum number of microseconds allowed for UL slot transmission before expert warning (zero to disable). N.B. timing relative to first frame seen for same symbol",
9236 10, &us_allowed_for_ul_in_symbol);
9237
9238
9239
9240 prefs_register_static_text_preference(oran_module, "oran.dl", "", "");
9241
9242 /* Downlink userplane */
9243 prefs_register_uint_preference(oran_module, "oran.iq_bitwidth_down", "IQ Bitwidth Downlink",
9244 "The bit width of a sample in the Downlink (if no udcompHdr)", 10, &pref_sample_bit_width_downlink);
9245 prefs_register_enum_preference(oran_module, "oran.ud_comp_down", "Downlink User Data Compression",
9246 "Downlink User Data Compression", &pref_iqCompressionDownlink, dl_compression_options, false0);
9247 prefs_register_enum_preference(oran_module, "oran.ud_comp_hdr_down", "udCompHdr field is present for downlink",
9248 "The udCompHdr field in U-Plane messages may or may not be present, depending on the "
9249 "configuration of the O-RU. This preference instructs the dissector to expect "
9250 "this field to be present in downlink messages",
9251 &pref_includeUdCompHeaderDownlink, udcomphdr_present_options, false0);
9252
9253 prefs_register_static_text_preference(oran_module, "oran.sinr", "", "");
9254
9255 /* SINR */
9256 prefs_register_uint_preference(oran_module, "oran.iq_bitwidth_sinr", "IQ Bitwidth SINR",
9257 "The bit width of a sample in SINR", 10, &pref_sample_bit_width_sinr);
9258 prefs_register_enum_preference(oran_module, "oran.ud_comp_sinr", "SINR Compression",
9259 "SINR Compression", &pref_iqCompressionSINR, ul_compression_options, false0);
9260
9261
9262 /* BF-related */
9263 prefs_register_static_text_preference(oran_module, "oran.bf", "", "");
9264
9265 prefs_register_uint_preference(oran_module, "oran.num_weights_per_bundle", "Number of weights per bundle",
9266 "Used in decoding of section extension type 11 (Flexible BF weights)", 10, &pref_num_weights_per_bundle);
9267
9268 prefs_register_uint_preference(oran_module, "oran.num_bf_antennas", "Number of BF Antennas",
9269 "Number of BF Antennas (used for C section type 6)", 10, &pref_num_bf_antennas);
9270
9271 prefs_register_obsolete_preference(oran_module, "oran.num_bf_weights");
9272
9273 prefs_register_bool_preference(oran_module, "oran.st6_4byte_alignment_required", "Use 4-byte alignment for ST6 sections",
9274 "Default is 1-byte alignment", &st6_4byte_alignment);
9275
9276
9277 /* Misc (and will seldom need to be accessed) */
9278 prefs_register_static_text_preference(oran_module, "oran.misc", "", "");
9279
9280 prefs_register_bool_preference(oran_module, "oran.show_iq_samples", "Show IQ Sample values",
9281 "When enabled, for U-Plane frames show each I and Q value in PRB", &pref_showIQSampleValues);
9282
9283 prefs_register_enum_preference(oran_module, "oran.support_udcomplen", "udCompLen supported",
9284 "When enabled, U-Plane messages with relevant compression schemes will include udCompLen",
9285 &pref_support_udcompLen, udcomplen_support_options, false0);
9286
9287 prefs_register_uint_preference(oran_module, "oran.rbs_in_uplane_section", "Total RBs in User-Plane data section",
9288 "This is used if numPrbu is signalled as 0", 10, &pref_data_plane_section_total_rbs);
9289
9290 prefs_register_bool_preference(oran_module, "oran.unscaled_iq", "Show unscaled I/Q values",
9291 "", &show_unscaled_values);
9292
9293 prefs_register_uint_preference(oran_module, "oran.k_antenna_ports", "K - number of antenna ports",
9294 "Used in bfwCompParam", 10, &k_antenna_ports);
9295
9296
9297 flow_states_table = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
9298 flow_results_table = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
9299 ul_symbol_timing = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
9300
9301 register_init_routine(&oran_init_protocol);
9302}
9303
9304/* Simpler form of proto_reg_handoff_oran which can be used if there are
9305 * no prefs-dependent registration function calls. */
9306void
9307proto_reg_handoff_oran(void)
9308{
9309}
9310
9311/*
9312* Editor modelines - http://www.wireshark.org/tools/modelines.html
9313*
9314* Local Variables:
9315* c-basic-offset: 4
9316* tab-width: 8
9317* indent-tabs-mode: nil
9318* End:
9319*
9320* ex: set shiftwidth=4 tabstop=8 expandtab:
9321* :indentSize=4:tabSize=8:noTabs=true:
9322*/