Bug Summary

File:builds/wireshark/wireshark/epan/dissectors/packet-oran.c
Warning:line 2860, column 5
Value stored to 'offset' is never read

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-22/lib/clang/22 -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 /builds/wireshark/wireshark/epan -isystem /usr/include/libxml2 -D CARES_NO_DEPRECATED -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-22/lib/clang/22/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/16/../../../../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-nonliteral -std=gnu17 -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 -fdwarf2-cfi-asm -o /builds/wireshark/wireshark/sbout/2026-12-01-100332-3661-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 <gerald@wireshark.org>
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-v21.00 specification.
17 * Note that other eCPRI message types are handled in packet-ecpri.c
18 */
19
20#include <config.h>
21#define _USE_MATH_DEFINES
22#include <math.h>
23
24#include <epan/packet.h>
25#include <epan/expert.h>
26#include <epan/prefs.h>
27#include <epan/tap.h>
28#include <epan/tfs.h>
29#include <epan/reassemble.h>
30
31#include <epan/unit_strings.h>
32
33#include <wsutil/ws_roundup.h>
34#include <wsutil/ws_padding_to.h>
35
36#include "epan/dissectors/packet-oran.h"
37
38/* N.B. dissector preferences are taking the place of (some) M-plane parameters,
39 * so unfortunately it can be fiddly to get the preferences into a good state to
40 * decode a given capture..
41 * TODO:
42 * - Detect/indicate signs of application layer fragmentation?
43 * same eAxC in same symbol (same/different section ID?)
44 * - Not handling M-plane setting for "little endian byte order" as applied to
45 * IQ samples and beam weights does anyone use this?
46 * - for section extensions, check more constraints (which other extension types
47 * appear with them, order, repeated)
48 * - re-order items (decl and hf definitions) to match spec order?
49 * - track energy-saving status, and identify TRX or ASM commands as 'Sleep extension'
50 * - when tracking between C-plane and U-plane, indicated in C-plane any missing sectionIds/PRBs/REs
51 */
52
53/* Prototypes */
54void proto_register_oran(void);
55
56/* Initialize the protocol and registered fields */
57static int proto_oran;
58
59static int oran_tap = -1;
60static int oran_bfws_tap = -1;
61
62static int hf_oran_du_port_id;
63static int hf_oran_bandsector_id;
64static int hf_oran_cc_id;
65static int hf_oran_ru_port_id;
66static int hf_oran_sequence_id;
67static int hf_oran_e_bit;
68static int hf_oran_subsequence_id;
69static int hf_oran_previous_frame;
70
71static int hf_oran_data_direction;
72static int hf_oran_payload_version;
73static int hf_oran_filter_index;
74static int hf_oran_frame_id;
75static int hf_oran_subframe_id;
76static int hf_oran_slot_id;
77static int hf_oran_slot_within_frame;
78static int hf_oran_start_symbol_id;
79static int hf_oran_numberOfSections;
80static int hf_oran_sectionType;
81
82static int hf_oran_udCompHdr;
83static int hf_oran_udCompHdrIqWidth;
84static int hf_oran_udCompHdrIqWidth_pref;
85static int hf_oran_udCompHdrMeth;
86static int hf_oran_udCompHdrMeth_pref;
87static int hf_oran_udCompLen;
88static int hf_oran_numberOfUEs;
89static int hf_oran_timeOffset;
90static int hf_oran_frameStructure_fft;
91static int hf_oran_frameStructure_subcarrier_spacing;
92static int hf_oran_cpLength;
93static int hf_oran_timing_header;
94static int hf_oran_section_id;
95static int hf_oran_rb;
96static int hf_oran_symInc;
97static int hf_oran_startPrbc;
98static int hf_oran_reMask_re1;
99static int hf_oran_reMask_re2;
100static int hf_oran_reMask_re3;
101static int hf_oran_reMask_re4;
102static int hf_oran_reMask_re5;
103static int hf_oran_reMask_re6;
104static int hf_oran_reMask_re7;
105static int hf_oran_reMask_re8;
106static int hf_oran_reMask_re9;
107static int hf_oran_reMask_re10;
108static int hf_oran_reMask_re11;
109static int hf_oran_reMask_re12;
110static int hf_oran_reMask;
111static int hf_oran_numPrbc;
112static int hf_oran_numSymbol;
113static int hf_oran_ef;
114static int hf_oran_beamId;
115
116static int hf_oran_sinrCompHdrIqWidth_pref;
117static int hf_oran_sinrCompHdrMeth_pref;
118
119static int hf_oran_ciCompHdr;
120static int hf_oran_ciCompHdrIqWidth;
121static int hf_oran_ciCompHdrMeth;
122static int hf_oran_ciCompOpt;
123
124static int hf_oran_extension;
125static int hf_oran_exttype;
126static int hf_oran_extlen;
127
128static int hf_oran_bfw_bundle;
129static int hf_oran_bfw_bundle_id;
130static int hf_oran_bfw;
131static int hf_oran_bfw_i;
132static int hf_oran_bfw_q;
133
134static int hf_oran_ueId;
135static int hf_oran_freqOffset;
136static int hf_oran_regularizationFactor;
137static int hf_oran_laaMsgType;
138static int hf_oran_laaMsgLen;
139static int hf_oran_lbtHandle;
140static int hf_oran_lbtDeferFactor;
141static int hf_oran_lbtBackoffCounter;
142static int hf_oran_lbtOffset;
143static int hf_oran_MCOT;
144static int hf_oran_lbtMode;
145static int hf_oran_sfnSfEnd;
146static int hf_oran_lbtPdschRes;
147static int hf_oran_sfStatus;
148static int hf_oran_initialPartialSF;
149static int hf_oran_lbtDrsRes;
150static int hf_oran_lbtBufErr;
151static int hf_oran_lbtTrafficClass;
152static int hf_oran_lbtCWConfig_H;
153static int hf_oran_lbtCWConfig_T;
154static int hf_oran_lbtCWR_Rst;
155
156static int hf_oran_reserved;
157static int hf_oran_reserved_1bit;
158static int hf_oran_reserved_2bits;
159static int hf_oran_reserved_3bits;
160static int hf_oran_reserved_4bits;
161static int hf_oran_reserved_last_4bits;
162static int hf_oran_reserved_last_5bits;
163static int hf_oran_reserved_6bits;
164static int hf_oran_reserved_last_6bits;
165static int hf_oran_reserved_7bits;
166static int hf_oran_reserved_last_7bits;
167static int hf_oran_reserved_8bits;
168static int hf_oran_reserved_16bits;
169static int hf_oran_reserved_15bits;
170static int hf_oran_reserved_24bits;
171static int hf_oran_reserved_bit1;
172static int hf_oran_reserved_bit2;
173static int hf_oran_reserved_bit3;
174static int hf_oran_reserved_bit4;
175static int hf_oran_reserved_bit5;
176static int hf_oran_reserved_bits123;
177static int hf_oran_reserved_bits1234;
178static int hf_oran_reserved_bits456;
179
180static int hf_oran_bundle_offset;
181static int hf_oran_cont_ind;
182
183static int hf_oran_bfwCompHdr;
184static int hf_oran_bfwCompHdr_iqWidth;
185static int hf_oran_bfwCompHdr_compMeth;
186static int hf_oran_symbolId;
187static int hf_oran_startPrbu;
188static int hf_oran_numPrbu;
189
190static int hf_oran_udCompParam;
191static int hf_oran_sReSMask;
192static int hf_oran_sReSMask_re12;
193static int hf_oran_sReSMask_re11;
194static int hf_oran_sReSMask_re10;
195static int hf_oran_sReSMask_re9;
196static int hf_oran_sReSMask_re8;
197static int hf_oran_sReSMask_re7;
198static int hf_oran_sReSMask_re6;
199static int hf_oran_sReSMask_re5;
200static int hf_oran_sReSMask_re4;
201static int hf_oran_sReSMask_re3;
202static int hf_oran_sReSMask_re2;
203static int hf_oran_sReSMask_re1;
204
205static int hf_oran_sReSMask1;
206static int hf_oran_sReSMask2;
207static int hf_oran_sReSMask1_2_re12;
208static int hf_oran_sReSMask1_2_re11;
209static int hf_oran_sReSMask1_2_re10;
210static int hf_oran_sReSMask1_2_re9;
211
212static int hf_oran_bfwCompParam;
213
214static int hf_oran_iSample;
215static int hf_oran_qSample;
216
217static int hf_oran_ciCompParam;
218
219static int hf_oran_blockScaler;
220static int hf_oran_compBitWidth;
221static int hf_oran_compShift;
222
223static int hf_oran_active_beamspace_coefficient_n1;
224static int hf_oran_active_beamspace_coefficient_n2;
225static int hf_oran_active_beamspace_coefficient_n3;
226static int hf_oran_active_beamspace_coefficient_n4;
227static int hf_oran_active_beamspace_coefficient_n5;
228static int hf_oran_active_beamspace_coefficient_n6;
229static int hf_oran_active_beamspace_coefficient_n7;
230static int hf_oran_active_beamspace_coefficient_n8;
231static int hf_oran_activeBeamspaceCoefficientMask;
232static int hf_oran_activeBeamspaceCoefficientMask_bits_set;
233
234static int hf_oran_se6_repetition;
235
236static int hf_oran_rbgSize;
237static int hf_oran_rbgMask;
238static int hf_oran_noncontig_priority;
239
240static int hf_oran_symbol_mask;
241static int hf_oran_symbol_mask_s13;
242static int hf_oran_symbol_mask_s12;
243static int hf_oran_symbol_mask_s11;
244static int hf_oran_symbol_mask_s10;
245static int hf_oran_symbol_mask_s9;
246static int hf_oran_symbol_mask_s8;
247static int hf_oran_symbol_mask_s7;
248static int hf_oran_symbol_mask_s6;
249static int hf_oran_symbol_mask_s5;
250static int hf_oran_symbol_mask_s4;
251static int hf_oran_symbol_mask_s3;
252static int hf_oran_symbol_mask_s2;
253static int hf_oran_symbol_mask_s1;
254static int hf_oran_symbol_mask_s0;
255
256static int hf_oran_rbg_mask_27;
257static int hf_oran_rbg_mask_26;
258static int hf_oran_rbg_mask_25;
259static int hf_oran_rbg_mask_24;
260static int hf_oran_rbg_mask_23;
261static int hf_oran_rbg_mask_22;
262static int hf_oran_rbg_mask_21;
263static int hf_oran_rbg_mask_20;
264static int hf_oran_rbg_mask_19;
265static int hf_oran_rbg_mask_18;
266static int hf_oran_rbg_mask_17;
267static int hf_oran_rbg_mask_16;
268static int hf_oran_rbg_mask_15;
269static int hf_oran_rbg_mask_14;
270static int hf_oran_rbg_mask_13;
271static int hf_oran_rbg_mask_12;
272static int hf_oran_rbg_mask_11;
273static int hf_oran_rbg_mask_10;
274static int hf_oran_rbg_mask_9;
275static int hf_oran_rbg_mask_8;
276static int hf_oran_rbg_mask_7;
277static int hf_oran_rbg_mask_6;
278static int hf_oran_rbg_mask_5;
279static int hf_oran_rbg_mask_4;
280static int hf_oran_rbg_mask_3;
281static int hf_oran_rbg_mask_2;
282static int hf_oran_rbg_mask_1;
283static int hf_oran_rbg_mask_0;
284
285static int hf_oran_exponent;
286static int hf_oran_iq_user_data;
287
288static int hf_oran_disable_bfws;
289static int hf_oran_rad;
290static int hf_oran_num_bund_prbs;
291static int hf_oran_beam_id;
292static int hf_oran_num_weights_per_bundle;
293
294static int hf_oran_ack_nack_req_id;
295
296static int hf_oran_frequency_range;
297static int hf_oran_off_start_prb;
298static int hf_oran_num_prb;
299
300static int hf_oran_samples_prb;
301static int hf_oran_ciSample;
302static int hf_oran_ciIsample;
303static int hf_oran_ciQsample;
304
305static int hf_oran_se10_port;
306static int hf_oran_beamGroupType;
307static int hf_oran_numPortc;
308
309static int hf_oran_csf;
310static int hf_oran_modcompscaler;
311
312static int hf_oran_modcomp_param_set;
313static int hf_oran_mc_scale_re_mask_re1;
314static int hf_oran_mc_scale_re_mask_re2;
315static int hf_oran_mc_scale_re_mask_re3;
316static int hf_oran_mc_scale_re_mask_re4;
317static int hf_oran_mc_scale_re_mask_re5;
318static int hf_oran_mc_scale_re_mask_re6;
319static int hf_oran_mc_scale_re_mask_re7;
320static int hf_oran_mc_scale_re_mask_re8;
321static int hf_oran_mc_scale_re_mask_re9;
322static int hf_oran_mc_scale_re_mask_re10;
323static int hf_oran_mc_scale_re_mask_re11;
324static int hf_oran_mc_scale_re_mask_re12;
325static int hf_oran_mc_scale_re_mask_re1_even;
326static int hf_oran_mc_scale_re_mask_re2_even;
327static int hf_oran_mc_scale_re_mask_re3_even;
328static int hf_oran_mc_scale_re_mask_re4_even;
329static int hf_oran_mc_scale_re_mask_re5_even;
330static int hf_oran_mc_scale_re_mask_re6_even;
331static int hf_oran_mc_scale_re_mask_re7_even;
332static int hf_oran_mc_scale_re_mask_re8_even;
333static int hf_oran_mc_scale_re_mask_re9_even;
334static int hf_oran_mc_scale_re_mask_re10_even;
335static int hf_oran_mc_scale_re_mask_re11_even;
336static int hf_oran_mc_scale_re_mask_re12_even;
337
338static int hf_oran_mc_scale_re_mask;
339static int hf_oran_mc_scale_re_mask_even;
340
341static int hf_oran_mc_scale_offset;
342
343static int hf_oran_eAxC_mask;
344static int hf_oran_technology;
345static int hf_oran_nullLayerInd;
346
347static int hf_oran_se19_repetition;
348static int hf_oran_portReMask;
349static int hf_oran_portSymbolMask;
350
351static int hf_oran_ext19_port;
352
353static int hf_oran_prb_allocation;
354static int hf_oran_nextSymbolId;
355static int hf_oran_nextStartPrbc;
356
357static int hf_oran_puncPattern;
358static int hf_oran_numPuncPatterns;
359static int hf_oran_symbolMask_ext20;
360static int hf_oran_startPuncPrb;
361static int hf_oran_numPuncPrb;
362static int hf_oran_puncReMask;
363static int hf_oran_multiSDScope;
364static int hf_oran_RbgIncl;
365
366static int hf_oran_ci_prb_group_size;
367static int hf_oran_prg_size_st5;
368static int hf_oran_prg_size_st6;
369
370static int hf_oran_num_ueid;
371
372static int hf_oran_antMask;
373
374static int hf_oran_transmissionWindowOffset;
375static int hf_oran_transmissionWindowSize;
376static int hf_oran_toT;
377
378static int hf_oran_bfaCompHdr;
379static int hf_oran_bfAzPtWidth;
380static int hf_oran_bfZePtWidth;
381static int hf_oran_bfAz3ddWidth;
382static int hf_oran_bfZe3ddWidth;
383static int hf_oran_bfAzPt;
384static int hf_oran_bfZePt;
385static int hf_oran_bfAz3dd;
386static int hf_oran_bfZe3dd;
387static int hf_oran_bfAzSl;
388static int hf_oran_bfZeSl;
389
390static int hf_oran_cmd_scope;
391static int hf_oran_number_of_st4_cmds;
392
393static int hf_oran_st4_cmd_header;
394static int hf_oran_st4_cmd_type;
395static int hf_oran_st4_cmd_len;
396static int hf_oran_st4_cmd_num_slots;
397static int hf_oran_st4_cmd_ack_nack_req_id;
398
399static int hf_oran_st4_cmd;
400
401static int hf_oran_sleepmode_trx;
402static int hf_oran_sleepmode_asm;
403static int hf_oran_log2maskbits;
404static int hf_oran_num_slots_ext;
405static int hf_oran_antMask_trx_control;
406
407static int hf_oran_max_pwr_lvl_ind;
408static int hf_oran_array_carrier_max_pwr_reduction;
409static int hf_oran_port_list_en;
410static int hf_oran_tpmi_mode;
411static int hf_oran_num_ueid_se34;
412static int hf_oran_ueid_se34;
413static int hf_oran_num_port_list_index;
414static int hf_oran_chan_srs_port_mask;
415static int hf_oran_tpmi_phase_7;
416static int hf_oran_tpmi_phase_6;
417static int hf_oran_tpmi_phase_5;
418static int hf_oran_tpmi_phase_4;
419static int hf_oran_tpmi_phase_3;
420static int hf_oran_tpmi_phase_2;
421static int hf_oran_tpmi_phase_1;
422static int hf_oran_tpmi_phase_0;
423
424
425static int hf_oran_ready;
426static int hf_oran_number_of_acks;
427static int hf_oran_number_of_nacks;
428static int hf_oran_ackid;
429static int hf_oran_nackid;
430
431static int hf_oran_acknack_request_frame;
432static int hf_oran_acknack_request_time;
433static int hf_oran_acknack_request_type;
434static int hf_oran_acknack_response_frame;
435static int hf_oran_acknack_response_time;
436
437static int hf_oran_disable_tdbfns;
438static int hf_oran_td_beam_group;
439static int hf_oran_disable_tdbfws;
440static int hf_oran_td_beam_num;
441
442static int hf_oran_dir_pattern;
443static int hf_oran_guard_pattern;
444
445static int hf_oran_ecpri_pcid;
446static int hf_oran_ecpri_rtcid;
447static int hf_oran_ecpri_seqid;
448
449static int hf_oran_num_sym_prb_pattern;
450static int hf_oran_prb_mode;
451static int hf_oran_sym_prb_pattern;
452static int hf_oran_sym_mask;
453static int hf_oran_num_mc_scale_offset;
454static int hf_oran_prb_pattern;
455static int hf_oran_prb_blk_offset;
456static int hf_oran_prb_blk_size;
457
458static int hf_oran_codebook_index;
459static int hf_oran_layerid;
460static int hf_oran_numlayers;
461static int hf_oran_txscheme;
462static int hf_oran_crs_remask;
463static int hf_oran_crs_shift;
464static int hf_oran_crs_symnum;
465static int hf_oran_beamid_ap1;
466static int hf_oran_beamid_ap2;
467static int hf_oran_beamid_ap3;
468
469static int hf_oran_port_list_index;
470static int hf_oran_alpn_per_sym;
471static int hf_oran_ant_dmrs_snr;
472static int hf_oran_user_group_size;
473static int hf_oran_user_group_id;
474static int hf_oran_entry_type;
475static int hf_oran_dmrs_port_number;
476static int hf_oran_ueid_reset;
477
478static int hf_oran_dmrs_symbol_mask;
479static int hf_oran_dmrs_symbol_mask_s13;
480static int hf_oran_dmrs_symbol_mask_s12;
481static int hf_oran_dmrs_symbol_mask_s11;
482static int hf_oran_dmrs_symbol_mask_s10;
483static int hf_oran_dmrs_symbol_mask_s9;
484static int hf_oran_dmrs_symbol_mask_s8;
485static int hf_oran_dmrs_symbol_mask_s7;
486static int hf_oran_dmrs_symbol_mask_s6;
487static int hf_oran_dmrs_symbol_mask_s5;
488static int hf_oran_dmrs_symbol_mask_s4;
489static int hf_oran_dmrs_symbol_mask_s3;
490static int hf_oran_dmrs_symbol_mask_s2;
491static int hf_oran_dmrs_symbol_mask_s1;
492static int hf_oran_dmrs_symbol_mask_s0;
493
494static int hf_oran_scrambling;
495static int hf_oran_nscid;
496static int hf_oran_dtype;
497static int hf_oran_cmd_without_data;
498static int hf_oran_lambda;
499static int hf_oran_first_prb;
500static int hf_oran_last_prb;
501static int hf_oran_low_papr_type;
502static int hf_oran_hopping_mode;
503
504static int hf_oran_tx_win_for_on_air_symbol_l;
505static int hf_oran_tx_win_for_on_air_symbol_r;
506
507static int hf_oran_num_fo_fb;
508static int hf_oran_freq_offset_fb;
509
510static int hf_oran_num_ue_sinr_rpt;
511static int hf_oran_num_sinr_per_prb;
512static int hf_oran_num_sinr_per_prb_right;
513static int hf_oran_num_sinr_per_prb_st9;
514
515static int hf_oran_sinr_value;
516
517static int hf_oran_measurement_report;
518static int hf_oran_mf;
519static int hf_oran_meas_data_size;
520static int hf_oran_meas_type_id;
521static int hf_oran_ipn_power;
522static int hf_oran_ue_tae;
523static int hf_oran_ue_layer_power;
524static int hf_oran_num_elements;
525static int hf_oran_ant_dmrs_snr_val;
526static int hf_oran_ue_freq_offset;
527static int hf_oran_curr_ue_freq_offset;
528
529static int hf_oran_measurement_command;
530
531static int hf_oran_beam_type;
532static int hf_oran_meas_cmd_size;
533
534static int hf_oran_symbol_reordering_layer;
535static int hf_oran_dmrs_entry;
536
537static int hf_oran_c_section_common;
538static int hf_oran_c_section;
539static int hf_oran_u_section;
540
541static const unit_name_string units_decibelfs = { " dBFS", NULL((void*)0) };
542static int hf_oran_u_prb_power;
543static int hf_oran_u_total_power;
544static int hf_oran_u_peak_power;
545
546static int hf_oran_u_section_ul_symbol_time;
547static int hf_oran_u_section_ul_symbol_frames;
548static int hf_oran_u_section_ul_symbol_first_frame;
549static int hf_oran_u_section_ul_symbol_last_frame;
550
551static int hf_oran_cd_scg_size;
552static int hf_oran_cd_scg_phase_step;
553
554static int hf_oran_sinr_prb;
555static int hf_oran_oru_control_sinr_slot_mask_id;
556static int hf_oran_pos_meas;
557
558static int hf_oran_ue_radial_speed;
559static int hf_oran_ue_az_aoa;
560static int hf_oran_ue_ze_aoa;
561static int hf_oran_ue_pos_toa_offset;
562
563static int hf_oran_num_rep_ue;
564static int hf_oran_rep_ueid;
565static int hf_oran_is_last_rep;
566static int hf_oran_rep_index;
567static int hf_oran_num_reps;
568
569static int hf_oran_mcs_table;
570static int hf_oran_mcs_index;
571
572static int hf_oran_num_meas_req;
573static int hf_oran_num_of_ue_ant_ports;
574static int hf_oran_ue_rank;
575static int hf_oran_codebook_subset;
576static int hf_oran_full_pwr_mode;
577static int hf_oran_full_pwr_mode_2_tpmi_group;
578
579static int hf_oran_num_cand_ranks;
580static int hf_oran_ue_pref_rank;
581static int hf_oran_ue_tpmi_rank_y;
582static int hf_oran_ue_tpmi_rank_y_sinr_lx;
583static int hf_oran_ue_layer_pre_eq_sinr;
584
585static int hf_oran_chan_type_sel;
586static int hf_oran_srs_meas_port_mask;
587static int hf_oran_srs_ue_port_wb_power;
588static int hf_oran_srs_ue_port_wb_sinr;
589
590static int hf_oran_srsRbgSize;
591static int hf_oran_srsNumRbg;
592static int hf_oran_srsTxComb;
593static int hf_oran_srsSymId;
594static int hf_oran_srsNumUe;
595
596/* Computed fields */
597static int hf_oran_c_eAxC_ID;
598static int hf_oran_refa;
599
600static int hf_oran_bfws_frame_defined;
601static int hf_oran_bfws_symbols_since_defined;
602
603static int hf_oran_corresponding_cplane_frame;
604static int hf_oran_corresponding_cplane_frame_time_delta;
605static int hf_oran_corresponding_uplane_frame;
606static int hf_oran_corresponding_uplane_frames_total;
607
608
609/* Convenient fields for filtering, mostly shown as hidden */
610static int hf_oran_cplane;
611static int hf_oran_uplane;
612static int hf_oran_bf; /* to match frames that configure beamforming in any way */
613static int hf_oran_zero_prb;
614static int hf_oran_nonzero_prb;
615static int hf_oran_bundle_weights_all_zero;
616static int hf_oran_ul_cplane_ud_comp_hdr_frame;
617static int hf_oran_delta_to_expected_ul_symbol_time;
618static int hf_oran_delta_to_expected_dl_symbol_time;
619
620/* For reassembly */
621static int hf_oran_fragments;
622static int hf_oran_fragment;
623static int hf_oran_fragment_overlap;
624static int hf_oran_fragment_overlap_conflict;
625static int hf_oran_fragment_multiple_tails;
626static int hf_oran_fragment_too_long_fragment;
627static int hf_oran_fragment_error;
628static int hf_oran_fragment_count;
629static int hf_oran_reassembled_in;
630static int hf_oran_reassembled_length;
631static int hf_oran_reassembled_data;
632
633static int hf_oran_payload;
634
635/* Subtrees */
636static int ett_oran;
637static int ett_oran_ecpri_rtcid;
638static int ett_oran_ecpri_pcid;
639static int ett_oran_ecpri_seqid;
640static int ett_oran_section;
641static int ett_oran_section_type;
642static int ett_oran_u_timing;
643static int ett_oran_u_section;
644static int ett_oran_u_prb;
645static int ett_oran_iq;
646static int ett_oran_bfw_bundle;
647static int ett_oran_bfw;
648static int ett_oran_frequency_range;
649static int ett_oran_prb_cisamples;
650static int ett_oran_cisample;
651static int ett_oran_udcomphdr;
652static int ett_oran_udcompparam;
653static int ett_oran_cicomphdr;
654static int ett_oran_cicompparam;
655static int ett_oran_bfwcomphdr;
656static int ett_oran_bfwcompparam;
657static int ett_oran_ext19_port;
658static int ett_oran_prb_allocation;
659static int ett_oran_punc_pattern;
660static int ett_oran_bfacomphdr;
661static int ett_oran_modcomp_param_set;
662static int ett_oran_st4_cmd_header;
663static int ett_oran_st4_cmd;
664static int ett_oran_sym_prb_pattern;
665static int ett_oran_measurement_report;
666static int ett_oran_measurement_command;
667static int ett_oran_sresmask;
668static int ett_oran_c_section_common;
669static int ett_oran_c_section;
670static int ett_oran_remask;
671static int ett_oran_mc_scale_remask;
672static int ett_oran_symbol_reordering_layer;
673static int ett_oran_dmrs_entry;
674static int ett_oran_dmrs_symbol_mask;
675static int ett_oran_symbol_mask;
676static int ett_oran_active_beamspace_coefficient_mask;
677static int ett_oran_sinr_prb;
678static int ett_oran_rbgMask;
679static int ett_oran_se10_port;
680
681static int ett_oran_fragment;
682static int ett_oran_fragments;
683
684/* Dissector table for Section Extensions not in the standard, keyed by exttype. */
685static dissector_table_t oran_sectionextension_table;
686
687/* Reassembly table. */
688static reassembly_table oran_reassembly_table;
689
690static void *oran_key(const packet_info *pinfo _U___attribute__((unused)), const uint32_t id _U___attribute__((unused)), const void *data)
691{
692 return (void *)data;
693}
694
695static void oran_free_key(void *ptr _U___attribute__((unused)))
696{
697}
698
699static reassembly_table_functions oran_reassembly_table_functions =
700{
701 g_direct_hash,
702 g_direct_equal,
703 oran_key,
704 oran_key,
705 oran_free_key,
706 oran_free_key
707};
708
709static const fragment_items oran_frag_items = {
710 &ett_oran_fragment,
711 &ett_oran_fragments,
712 &hf_oran_fragments,
713 &hf_oran_fragment,
714 &hf_oran_fragment_overlap,
715 &hf_oran_fragment_overlap_conflict,
716 &hf_oran_fragment_multiple_tails,
717 &hf_oran_fragment_too_long_fragment,
718 &hf_oran_fragment_error,
719 &hf_oran_fragment_count,
720 &hf_oran_reassembled_in,
721 &hf_oran_reassembled_length,
722 &hf_oran_reassembled_data,
723 "O-RAN FH CUS fragments"
724};
725
726
727/* Don't want all extensions to open and close together. Use [extType-1] entry */
728static int ett_oran_c_section_extension[HIGHEST_EXTTYPE35];
729
730/* Expert info */
731static expert_field ei_oran_unsupported_bfw_compression_method;
732static expert_field ei_oran_invalid_sample_bit_width;
733static expert_field ei_oran_reserved_numBundPrb;
734static expert_field ei_oran_extlen_wrong;
735static expert_field ei_oran_invalid_eaxc_bit_width;
736static expert_field ei_oran_extlen_zero;
737static expert_field ei_oran_rbg_size_reserved;
738static expert_field ei_oran_frame_length;
739static expert_field ei_oran_numprbc_ext21_zero;
740static expert_field ei_oran_ci_prb_group_size_reserved;
741static expert_field ei_oran_st8_nackid;
742static expert_field ei_oran_st4_no_cmds;
743static expert_field ei_oran_st4_zero_len_cmd;
744static expert_field ei_oran_st4_wrong_len_cmd;
745static expert_field ei_oran_st4_unknown_cmd;
746static expert_field ei_oran_mcot_out_of_range;
747static expert_field ei_oran_se10_unknown_beamgrouptype;
748static expert_field ei_oran_se10_not_allowed;
749static expert_field ei_oran_start_symbol_id_not_zero;
750static expert_field ei_oran_trx_control_cmd_scope;
751static expert_field ei_oran_unhandled_se;
752static expert_field ei_oran_bad_symbolmask;
753static expert_field ei_oran_numslots_not_zero;
754static expert_field ei_oran_version_unsupported;
755static expert_field ei_oran_laa_msg_type_unsupported;
756static expert_field ei_oran_se_on_unsupported_st;
757static expert_field ei_oran_cplane_unexpected_sequence_number_ul;
758static expert_field ei_oran_cplane_unexpected_sequence_number_dl;
759static expert_field ei_oran_uplane_unexpected_sequence_number_ul;
760static expert_field ei_oran_uplane_unexpected_sequence_number_dl;
761static expert_field ei_oran_acknack_no_request;
762static expert_field ei_oran_udcomphdr_should_be_zero;
763static expert_field ei_oran_radio_fragmentation_c_plane;
764static expert_field ei_oran_lastRbdid_out_of_range;
765static expert_field ei_oran_rbgMask_beyond_last_rbdid;
766static expert_field ei_oran_unexpected_measTypeId;
767static expert_field ei_oran_unsupported_compression_method;
768static expert_field ei_oran_ud_comp_len_wrong_size;
769static expert_field ei_oran_sresmask2_not_zero_with_rb;
770static expert_field ei_oran_st6_rb_shall_be_0;
771static expert_field ei_oran_st9_not_ul;
772static expert_field ei_oran_st10_numsymbol_not_14;
773static expert_field ei_oran_st10_startsymbolid_not_0;
774static expert_field ei_oran_st10_not_ul;
775static expert_field ei_oran_se24_nothing_to_inherit;
776static expert_field ei_oran_num_sinr_per_prb_unknown;
777static expert_field ei_oran_start_symbol_id_bits_ignored;
778static expert_field ei_oran_user_group_id_reserved_value;
779static expert_field ei_oran_port_list_index_zero;
780static expert_field ei_oran_ul_uplane_symbol_too_long;
781static expert_field ei_oran_reserved_not_zero;
782static expert_field ei_oran_too_many_symbols;
783static expert_field ei_oran_se30_not_ul;
784static expert_field ei_oran_se30_unknown_ueid;
785static expert_field ei_oran_beamid_bfws_not_found;
786static expert_field ei_oran_syminc_set_for_uplane;
787static expert_field ei_oran_cplane_entry_not_found;
788static expert_field ei_oran_se12_rb_set;
789static expert_field ei_oran_se5_re_mask_bits_not_covered;
790static expert_field ei_oran_se5_re_mask_bit_repeated;
791static expert_field ei_oran_se5_re_mask_bit_not_in_re_mask;
792static expert_field ei_oran_se5_re_zero_re_mask;
793
794
795/* These are the message types handled by this dissector. Others have handling in packet-ecpri.c */
796#define ECPRI_MT_IQ_DATA0 0
797#define ECPRI_MT_RT_CTRL_DATA2 2
798
799
800/* Preference settings - try to set reasonable defaults */
801static unsigned pref_du_port_id_bits = 4;
802static unsigned pref_bandsector_id_bits = 4;
803static unsigned pref_cc_id_bits = 4;
804static unsigned pref_ru_port_id_bits = 4;
805
806/* TODO: ideally should be per-flow */
807static unsigned pref_sample_bit_width_uplink = 14;
808static unsigned pref_sample_bit_width_downlink = 14;
809static unsigned pref_sample_bit_width_sinr = 14;
810
811/* TODO: these ideally should be per-flow too */
812static int pref_iqCompressionUplink = COMP_BLOCK_FP1;
813static int pref_iqCompressionDownlink = COMP_BLOCK_FP1;
814
815static int pref_iqCompressionSINR = COMP_BLOCK_FP1;
816
817
818/* Is udCompHeader present (both directions) */
819static int pref_includeUdCompHeaderUplink = 2; /* start using heuristic */
820static int pref_includeUdCompHeaderDownlink = 2; /* start using heuristic */
821
822/* Are we ignoring UL C-Plane udCompHdr? */
823static bool_Bool pref_override_ul_compression = false0;
824
825static unsigned pref_data_plane_section_total_rbs = 273;
826static unsigned pref_num_bf_antennas = 32;
827static bool_Bool pref_showIQSampleValues = true1;
828
829/* Based upon m-plane param, so will be system-wide */
830static int pref_support_udcompLen = 2; /* start heuristic, can force other settings if necessary */
831static bool_Bool udcomplen_heuristic_result_set = false0;
832static bool_Bool udcomplen_heuristic_result = false0;
833
834/* st6-4byte-alignment-required */
835static bool_Bool st6_4byte_alignment = false0;
836
837/* Requested, allows I/Q to be stored as integers.. */
838static bool_Bool show_unscaled_values = false0;
839
840/* Initialized off. Timing is in microseconds. */
841static unsigned us_allowed_for_ul_in_symbol = 0;
842
843/* Reassemble U-Plane (at Radio Transport layer) */
844static bool_Bool do_radio_transport_layer_reassembly = true1;
845
846/* Expected symbol duration. Initialize to 100MHz case (Mu=1) */
847static unsigned pref_symbol_time = 36;
848
849/* Link U-plane back to C-plane using sectionIds */
850static bool_Bool link_planes_together = true1;
851
852static const enum_val_t dl_compression_options[] = {
853 { "COMP_NONE", "No Compression", COMP_NONE0 },
854 { "COMP_BLOCK_FP", "Block Floating Point Compression", COMP_BLOCK_FP1 },
855 { "COMP_BLOCK_SCALE", "Block Scaling Compression", COMP_BLOCK_SCALE2 },
856 { "COMP_U_LAW", "u-Law Compression", COMP_U_LAW3 },
857 { "COMP_MODULATION", "Modulation Compression", COMP_MODULATION4 },
858 { "BFP_AND_SELECTIVE_RE", "Block Floating Point + selective RE sending", BFP_AND_SELECTIVE_RE5 },
859 { "MOD_COMPR_AND_SELECTIVE_RE", "Modulation Compression + selective RE sending", MOD_COMPR_AND_SELECTIVE_RE6 },
860 { "BFP_AND_SELECTIVE_RE_WITH_MASKS", "Block Floating Point + selective RE sending with masks in section header", BFP_AND_SELECTIVE_RE_WITH_MASKS7 },
861 { "MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS", "Modulation Compression + selective RE sending with masks in section header", MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8 },
862 { NULL((void*)0), NULL((void*)0), 0 }
863};
864
865/* No Modulation compression in UL.. */
866static const enum_val_t ul_compression_options[] = {
867 { "COMP_NONE", "No Compression", COMP_NONE0 },
868 { "COMP_BLOCK_FP", "Block Floating Point Compression", COMP_BLOCK_FP1 },
869 { "COMP_BLOCK_SCALE", "Block Scaling Compression", COMP_BLOCK_SCALE2 },
870 { "COMP_U_LAW", "u-Law Compression", COMP_U_LAW3 },
871 { "BFP_AND_SELECTIVE_RE", "Block Floating Point + selective RE sending", BFP_AND_SELECTIVE_RE5 },
872 { "BFP_AND_SELECTIVE_RE_WITH_MASKS", "Block Floating Point + selective RE sending with masks in section header", BFP_AND_SELECTIVE_RE_WITH_MASKS7 },
873 { NULL((void*)0), NULL((void*)0), 0 }
874};
875
876static const enum_val_t udcomplen_support_options[] = {
877 { "NOT_SUPPORTED", "Not Supported", 0 },
878 { "SUPPORTED", "Supported", 1 },
879 { "HEURISTIC", "Attempt Heuristic", 2 },
880 { NULL((void*)0), NULL((void*)0), 0 }
881};
882
883static const enum_val_t udcomphdr_present_options[] = {
884 { "NOT_PRESENT", "Not Present", 0 },
885 { "PRESENT", "Present", 1 },
886 { "HEURISTIC", "Attempt Heuristic", 2 },
887 { NULL((void*)0), NULL((void*)0), 0 }
888};
889
890
891
892static const value_string e_bit[] = {
893 { 0, "More fragments follow" },
894 { 1, "Last fragment" },
895 { 0, NULL((void*)0)}
896};
897
898#define DIR_UPLINK0 0
899#define DIR_DOWNLINK1 1
900
901
902static const value_string data_direction_vals[] = {
903 { DIR_UPLINK0, "Uplink" }, /* gNB Rx */
904 { DIR_DOWNLINK1, "Downlink" }, /* gNB Tx */
905 { 0, NULL((void*)0)}
906};
907
908static const value_string rb_vals[] = {
909 { 0, "Every RB used" },
910 { 1, "Every other RB used" },
911 { 0, NULL((void*)0)}
912};
913
914static const value_string sym_inc_vals[] = {
915 { 0, "Use the current symbol number" },
916 { 1, "Increment the current symbol number" },
917 { 0, NULL((void*)0)}
918};
919
920static const value_string lbtMode_vals[] = {
921 { 0, "Full LBT (regular LBT, sending reservation signal until the beginning of the SF/slot)" },
922 { 1, "Partial LBT (looking back 25 usec prior to transmission" },
923 { 2, "Partial LBT (looking back 34 usec prior to transmission" },
924 { 3, "Full LBT and stop (regular LBT, without sending reservation signal" },
925 { 0, NULL((void*)0)}
926};
927
928static const value_string ue_rank_vals[] = {
929 { 1, "1" },
930 { 2, "2" },
931 { 3, "3" },
932 { 4, "4" },
933 { 0, NULL((void*)0)}
934};
935
936static const value_string num_of_ue_ant_ports_vals[] = {
937 { 2, "2" },
938 { 4, "4" },
939 { 0, NULL((void*)0)}
940};
941
942static const value_string codebook_subset_vals[] = {
943 { 0, "nonCoherent" },
944 { 1, "partialAndNonCoherent" },
945 { 2, "fullyAndPartialAndNonCoherent" },
946 { 3, "reserved" },
947 { 0, NULL((void*)0)}
948};
949
950
951static const range_string filter_indices[] = {
952 {0, 0, "standard channel filter"},
953 {1, 1, "UL filter for PRACH preamble formats 0, 1, 2; min. passband 839 x 1.25kHz = 1048.75 kHz"},
954 {2, 2, "UL filter for PRACH preamble format 3, min. passband 839 x 5 kHz = 4195 kHz"},
955 {3, 3, "UL filter for PRACH preamble formats A1, A2, A3, B1, B2, B3, B4, C0, C2; min. passband 139 x \u0394fRA"},
956 {4, 4, "UL filter for NPRACH 0, 1; min. passband 48 x 3.75KHz = 180 KHz"},
957 {5, 5, "UL filter for PRACH preamble formats"},
958 {8, 8, "UL filter NPUSCH"},
959 {9, 9, "Mixed numerology and other channels except PRACH and NB-IoT"},
960 {9, 15, "Reserved"},
961 {0, 0, NULL((void*)0)}
962};
963
964/* 7.3.1-1 */
965static const range_string section_types[] = {
966 { SEC_C_UNUSED_RB, SEC_C_UNUSED_RB, "Unused Resource Blocks or symbols in Downlink or Uplink" },
967 { SEC_C_NORMAL, SEC_C_NORMAL, "Most DL/UL radio channels" },
968 { SEC_C_RSVD2, SEC_C_RSVD2, "Reserved for future use" },
969 { SEC_C_PRACH, SEC_C_PRACH, "PRACH and mixed-numerology channels" },
970 { SEC_C_SLOT_CONTROL, SEC_C_SLOT_CONTROL, "Slot Configuration Control" },
971 { SEC_C_UE_SCHED, SEC_C_UE_SCHED, "UE scheduling information (UE-ID assignment to section)" },
972 { SEC_C_CH_INFO, SEC_C_CH_INFO, "Channel information" },
973 { SEC_C_LAA, SEC_C_LAA, "LAA (License Assisted Access)" },
974 { SEC_C_ACK_NACK_FEEDBACK, SEC_C_ACK_NACK_FEEDBACK, "ACK/NACK Feedback" },
975 { SEC_C_SINR_REPORTING, SEC_C_SINR_REPORTING, "SINR Reporting" },
976 { SEC_C_RRM_MEAS_REPORTS, SEC_C_RRM_MEAS_REPORTS, "RRM Measurement Reports" },
977 { SEC_C_REQUEST_RRM_MEAS, SEC_C_REQUEST_RRM_MEAS, "Request RRM Measurements" },
978 { SEC_C_SRS_DESCRIPTION, SEC_C_SRS_DESCRIPTION, "SRS Description" },
979 { SEC_C_RRM_MEAS_REPORTS_NON_TIMING, SEC_C_RRM_MEAS_REPORTS_NON_TIMING, "RRM Measurement reports - no-timing-controller" },
980 { SEC_C_CO_SCHEDULING_INFO, SEC_C_CO_SCHEDULING_INFO, "Co-scheduling information" },
981 { SEC_C_MAX_INDEX, 255, "Reserved for future use" },
982 { 0, 0, NULL((void*)0)} };
983
984static const range_string section_types_short[] = {
985 { SEC_C_UNUSED_RB, SEC_C_UNUSED_RB, "(Unused RBs)" },
986 { SEC_C_NORMAL, SEC_C_NORMAL, "(Most channels)" },
987 { SEC_C_RSVD2, SEC_C_RSVD2, "(reserved)" },
988 { SEC_C_PRACH, SEC_C_PRACH, "(PRACH/mixed-\u03bc)" },
989 { SEC_C_SLOT_CONTROL, SEC_C_SLOT_CONTROL, "(Slot info)" },
990 { SEC_C_UE_SCHED, SEC_C_UE_SCHED, "(UE scheduling info)" },
991 { SEC_C_CH_INFO, SEC_C_CH_INFO, "(Channel info)" },
992 { SEC_C_LAA, SEC_C_LAA, "(LAA)" },
993 { SEC_C_ACK_NACK_FEEDBACK, SEC_C_ACK_NACK_FEEDBACK, "(ACK/NACK)" },
994 { SEC_C_SINR_REPORTING, SEC_C_SINR_REPORTING, "(SINR Reporting)" },
995 { SEC_C_RRM_MEAS_REPORTS, SEC_C_RRM_MEAS_REPORTS, "(RRM Meas Reports)" },
996 { SEC_C_REQUEST_RRM_MEAS, SEC_C_REQUEST_RRM_MEAS, "(Req RRM Meas)" },
997 { SEC_C_SRS_DESCRIPTION, SEC_C_SRS_DESCRIPTION, "(SRS Description)" },
998 { SEC_C_RRM_MEAS_REPORTS_NON_TIMING, SEC_C_RRM_MEAS_REPORTS_NON_TIMING, "(RRM Meas reports - NT)" },
999 { SEC_C_CO_SCHEDULING_INFO, SEC_C_CO_SCHEDULING_INFO, "(Co-scheduling)" },
1000 { SEC_C_MAX_INDEX, 255, "Reserved for future use" },
1001 { 0, 0, NULL((void*)0) }
1002};
1003
1004static const range_string ud_comp_header_width[] = {
1005 {0, 0, "I and Q are each 16 bits wide"},
1006 {1, 15, "Bit width of I and Q"},
1007 {0, 0, NULL((void*)0)} };
1008
1009/* Table 8.3.3.13-3 */
1010static const range_string ud_comp_header_meth[] = {
1011 {COMP_NONE0, COMP_NONE0, "No compression" },
1012 {COMP_BLOCK_FP1, COMP_BLOCK_FP1, "Block floating point compression" },
1013 {COMP_BLOCK_SCALE2, COMP_BLOCK_SCALE2, "Block scaling" },
1014 {COMP_U_LAW3, COMP_U_LAW3, "Mu - law" },
1015 {COMP_MODULATION4, COMP_MODULATION4, "Modulation compression" },
1016 {BFP_AND_SELECTIVE_RE5, BFP_AND_SELECTIVE_RE5, "BFP + selective RE sending" },
1017 {MOD_COMPR_AND_SELECTIVE_RE6, MOD_COMPR_AND_SELECTIVE_RE6, "mod-compr + selective RE sending" },
1018 {BFP_AND_SELECTIVE_RE_WITH_MASKS7, BFP_AND_SELECTIVE_RE_WITH_MASKS7, "BFP + selective RE sending with masks in section header" },
1019 {MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8, MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8, "mod-compr + selective RE sending with masks in section header"},
1020 {9, 15, "Reserved"},
1021 {0, 0, NULL((void*)0)}
1022};
1023
1024/* Table 7.5.2.13-2 */
1025static const range_string frame_structure_fft[] = {
1026 {0, 0, "Reserved (no FFT/iFFT processing)"},
1027 {1, 3, "Reserved"},
1028 {4, 4, "FFT size 16"},
1029 {5, 5, "FFT size 32"},
1030 {6, 6, "FFT size 64"},
1031 {7, 7, "FFT size 128"},
1032 {8, 8, "FFT size 256"},
1033 {9, 9, "FFT size 512"},
1034 {10, 10, "FFT size 1024"},
1035 {11, 11, "FFT size 2048"},
1036 {12, 12, "FFT size 4096"},
1037 {13, 13, "FFT size 1536"},
1038 {14, 14, "FFT size 3072"},
1039 {15, 15, "Reserved"},
1040 {0, 0, NULL((void*)0)}
1041};
1042
1043/* Table 7.5.2.13-3 */
1044static const range_string subcarrier_spacings[] = {
1045 { 0, 0, "SCS 15 kHz, 1 slot/subframe, slot length 1 ms" },
1046 { 1, 1, "SCS 30 kHz, 2 slots/subframe, slot length 500 \u03bcs" },
1047 { 2, 2, "SCS 60 kHz, 4 slots/subframe, slot length 250 \u03bcs" },
1048 { 3, 3, "SCS 120 kHz, 8 slots/subframe, slot length 125 \u03bcs" },
1049 { 4, 4, "SCS 240 kHz, 16 slots/subframe, slot length 62.5 \u03bcs" },
1050 { 5, 11, "Reserved" }, /* N.B., 5 was 480kHz in early spec versions */
1051 { 12, 12, "SCS 1.25 kHz, 1 slot/subframe, slot length 1 ms" },
1052 { 13, 13, "SCS 3.75 kHz(LTE - specific), 1 slot/subframe, slot length 1 ms" },
1053 { 14, 14, "SCS 5 kHz, 1 slot/subframe, slot length 1 ms" },
1054 { 15, 15, "SCS 7.5 kHz(LTE - specific), 1 slot/subframe, slot length 1 ms" },
1055 { 0, 0, NULL((void*)0) }
1056};
1057
1058/* Table 7.5.3.14-1 laaMsgType definition */
1059static const range_string laaMsgTypes[] = {
1060 {0, 0, "LBT_PDSCH_REQ - lls - O-DU to O-RU request to obtain a PDSCH channel"},
1061 {1, 1, "LBT_DRS_REQ - lls - O-DU to O-RU request to obtain the channel and send DRS"},
1062 {2, 2, "LBT_PDSCH_RSP - O-RU to O-DU response, channel acq success or failure"},
1063 {3, 3, "LBT_DRS_RSP - O-RU to O-DU response, DRS sending success or failure"},
1064 {4, 4, "LBT_Buffer_Error - O-RU to O-DU response, reporting buffer overflow"},
1065 {5, 5, "LBT_CWCONFIG_REQ - O-DU to O-RU request, congestion window configuration"},
1066 {6, 6, "LBT_CWCONFIG_RST - O-RU to O-DU request, congestion window config, response"},
1067 {7, 15, "reserved for future methods"},
1068 {0, 0, NULL((void*)0)}
1069};
1070
1071/* 7.7.26.3 */
1072static const range_string freq_offset_fb_values[] = {
1073 {0, 0, "no frequency offset"},
1074 {8000, 8000, "value not provided"},
1075 {1, 30000, "positive frequency offset, (0, +0.5] subcarrier"},
1076 {0x8ad0, 0xffff, "negative frequency offset, [-0.5, 0) subcarrier"},
1077 {0x0, 0xffff, "reserved"},
1078 {0, 0, NULL((void*)0)}
1079};
1080
1081/* 7.5.3.78 */
1082static const range_string ue_tmpi_rank_sinr_vals[] = {
1083 {0, 0, "0 dB SINR"},
1084 {0x0001, 0x07ff, "positive SINR"},
1085 {0xf800, 0xffff, "-ve SINR"},
1086 {0x8000, 0x8000, "invalid measurement result"},
1087 {0x0, 0xffff, "reserved"},
1088 {0, 0, NULL((void*)0)}
1089};
1090
1091
1092
1093/* Table 7.5.2.19-1 */
1094static const value_string num_sinr_per_prb_vals[] = {
1095 { 0, "1" },
1096 { 1, "2" },
1097 { 2, "3" },
1098 { 3, "4" },
1099 { 4, "6" },
1100 { 5, "12" },
1101 { 6, "1 SINR value per section for DFT-s-OFDM" },
1102 { 7, "reserved" },
1103 { 0, NULL((void*)0)}
1104};
1105
1106static const value_string meas_type_id_vals[] = {
1107 { 1, "UE Timing Advance Error" },
1108 { 2, "UE Layer power" },
1109 { 3, "UE frequency offset" },
1110 { 4, "Interference plus Noise for allocated PRBs" },
1111 { 5, "Interference plus Noise for unallocated PRBs" },
1112 { 6, "DMRS-SNR per antenna" },
1113 { 7, "UE positioning measurement report" },
1114 { 8, "UE radial speed measurement report" },
1115 { 9, "UE post-equalization MU interference measurement" },
1116 { 10, "UE TPMI and rank recommendation measurement" },
1117 { 11, "UE layer pre-equalization SINR report" },
1118 { 12, "SRS UE port wideband signal power measurement report" },
1119 { 13, "SRS UE port wideband SINR measurement report" },
1120 { 14, "SRS wideband T-Matrix measurement report" },
1121 { 15, "SRS available port for beamforming measurement report" },
1122 { 16, "SRS discontinuous transmission measurement report" },
1123 { 17, "SRS UE port timing advance error measurement report" },
1124 { 18, "SRS UE port subband signal power measurement report" },
1125 { 19, "SRS UE port subband SINR measurement report" },
1126 { 20, "SRS port ordering measurement report" },
1127 { 21, "DMRS discontinuous transmission measurement report" },
1128 { 22, "Downlink post-equalization SINR measurement report" },
1129 { 23, "UE normalized beam power report" },
1130 { 24, "SRS unallocated comb offset IpN" },
1131 { 0, NULL((void*)0)}
1132};
1133
1134static const value_string beam_type_vals[] = {
1135 { 0, "List of beamId values" },
1136 { 1, "Range of beamId values" },
1137 { 0, NULL((void*)0)}
1138};
1139
1140/* 7.7.3.4 */
1141static const value_string txscheme_vals[] = {
1142 { 0, "Spatial Multiplexing with Large Delay CDD" },
1143 { 1, "Reserved" },
1144 { 2, "Transmit Diversity" },
1145 /* 3-15 reserved */
1146 { 0, NULL((void*)0)}
1147};
1148
1149
1150/* 7.7.24.3 */
1151static const value_string entry_type_vals[] = {
1152 { 0, "inherit config from preceding entry (2 or 3) ueIdReset=0" },
1153 { 1, "inherit config from preceding entry (2 or 3) ueIdReset=1" },
1154 { 2, "related parameters if have transform precoding disabled " },
1155 { 3, "related parameters if have transform precoding enabled " },
1156 { 0, NULL((void*)0)}
1157};
1158
1159/* Table 7.7.29.3-1 */
1160static const range_string cd_scg_size_vals[] = {
1161 { 0, 0, "1 subcarrier" },
1162 { 1, 1, "1 RB x N subcarriers" },
1163 { 2, 2, "2 RB x N subcarriers" },
1164 { 3, 3, "4 RB x N subcarriers" },
1165 { 4, 4, "8 RB x N subcarriers" },
1166 { 5, 5, "16 RB x N subcarriers" },
1167 { 6, 6, "32 RB x N subcarriers" },
1168 { 7, 15, "reserved"},
1169 { 0, 0, NULL((void*)0)}
1170};
1171
1172/* 7.7.33.3 */
1173static const value_string chan_type_sel_vals[] = {
1174 { 0, "port channel index" },
1175 { 1, "layer channel index" },
1176 { 2, "reserved" },
1177 { 3, "reserved" },
1178 { 0, NULL((void*)0)}
1179};
1180
1181/* 7.7.34.4 */
1182static const value_string tpmi_mode_vals[] = {
1183 { 0, "Port selection mode" },
1184 { 1, "Explicit codebook mode" },
1185 { 0, NULL((void*)0)}
1186};
1187
1188/* 7.7.34.7.3 */
1189static const value_string tpmi_phase_vals[] = {
1190 { 0, "no rotation applied" },
1191 { 1, "rotation by pi/2 radians" },
1192 { 2, "rotation by pi radians" },
1193 { 3, "rotation by 3pi/2 radians" },
1194 { 0, NULL((void*)0)}
1195};
1196
1197/* Table 7.6.1-1 */
1198static const value_string exttype_vals[] = {
1199 {0, "Reserved"},
1200 {1, "Beamforming weights"},
1201 {2, "Beamforming attributes"},
1202 {3, "DL Precoding configuration parameters and indications"},
1203 {4, "Modulation compr. params"},
1204 {5, "Modulation compression additional scaling parameters"},
1205 {6, "Non-contiguous PRB allocation"},
1206 {7, "Multiple-eAxC designation"},
1207 {8, "Regularization factor"},
1208 {9, "Dynamic Spectrum Sharing parameters"},
1209 {10, "Multiple ports grouping"},
1210 {11, "Flexible BF weights"},
1211 {12, "Non-Contiguous PRB Allocation with Frequency Ranges"},
1212 {13, "PRB Allocation with Frequency Hopping"},
1213 {14, "Nulling-layer Info. for ueId-based beamforming"},
1214 {15, "Mixed-numerology Info. for ueId-based beamforming"},
1215 {16, "Section description for antenna mapping in UE channel information based UL beamforming"},
1216 {17, "Section description for indication of user port group"},
1217 {18, "Section description for Uplink Transmission Management"},
1218 {19, "Compact beamforming information for multiple port"},
1219 {20, "Puncturing extension"},
1220 {21, "Variable PRB group size for channel information"},
1221 {22, "ACK/NACK request"},
1222 {23, "Multiple symbol modulation compression parameters"},
1223 {24, "PUSCH DMRS configuration"},
1224 {25, "Symbol reordering for DMRS-BF"},
1225 {26, "Frequency offset feedback"},
1226 {27, "O-DU controlled dimensionality reduction"},
1227 {28, "O-DU controlled frequency resolution for SINR reporting"},
1228 {29, "Cyclic delay adjustment"},
1229 {30, "PUSCH repetition indication"},
1230 {31, "MCS Information"},
1231 {32, "Rank and TPMI measurement request"},
1232 {33, "Dynamic channel type selection for SRS-BF-DL"},
1233 {34, "SRS-BF-UL Control"},
1234 {35, "Codebook-based beamforming parameters"},
1235 {0, NULL((void*)0)}
1236};
1237static value_string_ext exttype_vals_ext = VALUE_STRING_EXT_INIT(exttype_vals){ _try_val_to_str_ext_init, 0, (sizeof (exttype_vals) / sizeof
((exttype_vals)[0]))-1, exttype_vals, "exttype_vals", ((void
*)0) }
;
1238
1239
1240/**************************************************************************************/
1241/* Keep track for each Section Extension, which section types are allowed to carry it */
1242typedef struct {
1243 bool_Bool ST0;
1244 bool_Bool ST1;
1245 bool_Bool ST3;
1246 bool_Bool ST5;
1247 bool_Bool ST6;
1248 bool_Bool ST10;
1249 bool_Bool ST11;
1250 bool_Bool ST12;
1251 bool_Bool ST13;
1252 bool_Bool ST14;
1253} AllowedCTs_t;
1254
1255
1256static const AllowedCTs_t ext_cts[HIGHEST_EXTTYPE35] = {
1257 /* ST0 ST1 ST3 ST5 ST6 ST10 ST11 ST12 ST13 ST14 */
1258 { false0, true1, true1, false0, false0, false0, false0, false0, false0, false0 }, // SE 1 (1,3)
1259 { false0, true1, true1, false0, false0, false0, false0, false0, false0, false0 }, // SE 2 (1,3)
1260 { false0, true1, true1, false0, false0, false0, false0, false0, false0, false0 }, // SE 3 (1,3)
1261 { false0, true1, true1, true1, false0, false0, false0, false0, false0, false0 }, // SE 4 (1,3,5)
1262 { false0, true1, true1, true1, false0, false0, false0, false0, false0, false0 }, // SE 5 (1,3,5)
1263 { false0, true1, true1, true1, false0, true1, true1, false0, true1, false0 }, // SE 6 (1,3,5,10,11)
1264 { true1, false0, false0, false0, false0, false0, false0, false0, false0, false0 }, // SE 7 (0)
1265 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 8 (5)
1266 { true1, true1, true1, true1, true1, true1, true1, false0, true1, false0 }, // SE 9 (all)
1267 { false0, true1, true1, true1, false0, false0, false0, false0, false0, false0 }, // SE 10 (1,3,5)
1268 { false0, true1, true1, false0, false0, false0, false0, false0, false0, false0 }, // SE 11 (1,3)
1269 { false0, true1, true1, true1, false0, true1, true1, false0, true1, false0 }, // SE 12 (1,3,5,10,11)
1270 { false0, true1, true1, true1, false0, false0, false0, false0, false0, false0 }, // SE 13 (1,3,5)
1271 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 14 (5)
1272 { false0, false0, false0, true1, true1, false0, false0, false0, false0, false0 }, // SE 15 (5,6)
1273 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 16 (5)
1274 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 17 (5)
1275 { false0, true1, true1, true1, false0, false0, false0, false0, false0, false0 }, // SE 18 (1,3,5)
1276 { false0, true1, true1, false0, false0, false0, false0, false0, false0, false0 }, // SE 19 (1,3)
1277 { true1, true1, true1, true1, true1, true1, true1, false0, true1, false0 }, // SE 20 (0,1,3,5,10,11)
1278 { false0, false0, false0, true1, true1, false0, false0, false0, false0, false0 }, // SE 21 (5,6)
1279 { true1, true1, true1, true1, true1, true1, true1, false0, true1, false0 }, // SE 22 (all)
1280 { false0, true1, true1, true1, false0, false0, false0, false0, false0, false0 }, // SE 23 (1,3,5)
1281 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 24 (5)
1282 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 25 (5)
1283 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 26 (5)
1284 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 27 (5)
1285 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 28 (5)
1286 { false0, true1, true1, true1, false0, false0, false0, false0, false0, false0 }, // SE 29 (1,3,5)
1287 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 30 (5)
1288 { false0, true1, true1, true1, false0, false0, false0, false0, false0, false0 }, // SE 31 (1,3,5)
1289 { false0, false0, false0, true1, false0, false0, false0, true1 , false0, false0 }, // SE 32 (5, 14)
1290 { false0, false0, false0, true1, false0, false0, false0, false0, false0, true1 }, // SE 33 (5,14)
1291 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 34 (5)
1292 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 35 (5)
1293};
1294
1295static bool_Bool se_allowed_in_st(unsigned se, unsigned st)
1296{
1297 if (se==0 || se>HIGHEST_EXTTYPE35) {
1298 /* Don't know about new SE, so don't complain.. */
1299 return true1;
1300 }
1301
1302 switch (st) {
1303 case 0:
1304 return ext_cts[se-1].ST0;
1305 case 1:
1306 return ext_cts[se-1].ST1;
1307 case 3:
1308 return ext_cts[se-1].ST3;
1309 case 5:
1310 return ext_cts[se-1].ST5;
1311 case 6:
1312 return ext_cts[se-1].ST6;
1313 case 10:
1314 return ext_cts[se-1].ST10;
1315 case 11:
1316 return ext_cts[se-1].ST11;
1317 case 12:
1318 return ext_cts[se-1].ST12;
1319 case 13:
1320 return ext_cts[se-1].ST13;
1321 case 14:
1322 return ext_cts[se-1].ST14;
1323
1324 default:
1325 /* New/unknown section type that includes 'ef'.. assume ok */
1326 return true1;
1327 }
1328}
1329
1330/************************************************************************************/
1331
1332/* Table 7.7.1.2-2 */
1333static const value_string bfw_comp_headers_iq_width[] = {
1334 {0, "I and Q are 16 bits wide"},
1335 {1, "I and Q are 1 bit wide"},
1336 {2, "I and Q are 2 bits wide"},
1337 {3, "I and Q are 3 bits wide"},
1338 {4, "I and Q are 4 bits wide"},
1339 {5, "I and Q are 5 bits wide"},
1340 {6, "I and Q are 6 bits wide"},
1341 {7, "I and Q are 7 bits wide"},
1342 {8, "I and Q are 8 bits wide"},
1343 {9, "I and Q are 9 bits wide"},
1344 {10, "I and Q are 10 bits wide"},
1345 {11, "I and Q are 11 bits wide"},
1346 {12, "I and Q are 12 bits wide"},
1347 {13, "I and Q are 13 bits wide"},
1348 {14, "I and Q are 14 bits wide"},
1349 {15, "I and Q are 15 bits wide"},
1350 {0, NULL((void*)0)}
1351};
1352
1353/* Table 7.7.1.2-3 */
1354static const value_string bfw_comp_headers_comp_meth[] = {
1355 {COMP_NONE0, "no compression"},
1356 {COMP_BLOCK_FP1, "block floating point"},
1357 {COMP_BLOCK_SCALE2, "block scaling"},
1358 {COMP_U_LAW3, "u-law"},
1359 {4, "beamspace compression type I"},
1360 {5, "beamspace compression type II"},
1361 {0, NULL((void*)0)}
1362};
1363
1364/* 7.7.6.2 rbgSize (resource block group size) */
1365static const value_string rbg_size_vals[] = {
1366 {0, "reserved"},
1367 {1, "1"},
1368 {2, "2"},
1369 {3, "3"},
1370 {4, "4"},
1371 {5, "6"},
1372 {6, "8"},
1373 {7, "16"},
1374 {0, NULL((void*)0)}
1375};
1376
1377/* 7.7.6.5 */
1378static const value_string priority_vals[] = {
1379 {0, "0"},
1380 {1, "+1"},
1381 {2, "-2 (reserved, should not be used)"},
1382 {3, "-1"},
1383 {0, NULL((void*)0)}
1384};
1385
1386/* 7.7.10.2 beamGroupType */
1387static const value_string beam_group_type_vals[] = {
1388 {0x0, "common beam"},
1389 {0x1, "beam matrix indication"},
1390 {0x2, "beam vector listing"},
1391 {0x3, "beamId/ueId listing with associated port-list index"},
1392 {0, NULL((void*)0)}
1393};
1394
1395/* 7.7.9.2 technology (interface name) */
1396static const value_string interface_name_vals[] = {
1397 {0x0, "LTE"},
1398 {0x1, "NR"},
1399 {0, NULL((void*)0)}
1400};
1401
1402/* 7.7.18.4 toT (type of transmission) */
1403static const value_string type_of_transmission_vals[] = {
1404 {0x0, "normal transmission mode, data can be distributed in any way the O-RU is implemented to transmit data"},
1405 {0x1, "uniformly distributed over the transmission window"},
1406 {0x2, "Reserved"},
1407 {0x3, "Reserved"},
1408 {0, NULL((void*)0)}
1409};
1410
1411/* 7.7.2.2 (width of bfa parameters) */
1412static const value_string bfa_bw_vals[] = {
1413 {0, "no bits, the field is not applicable (e.g., O-RU does not support it) or the default value shall be used"},
1414 {1, "2-bit bitwidth"},
1415 {2, "3-bit bitwidth"},
1416 {3, "4-bit bitwidth"},
1417 {4, "5-bit bitwidth"},
1418 {5, "6-bit bitwidth"},
1419 {6, "7-bit bitwidth"},
1420 {7, "8-bit bitwidth"},
1421 {0, NULL((void*)0)}
1422};
1423
1424/* 7.7.2.7 & 7.7.2.8 */
1425static const value_string sidelobe_suppression_vals[] = {
1426 {0, "10 dB"},
1427 {1, "15 dB"},
1428 {2, "20 dB"},
1429 {3, "25 dB"},
1430 {4, "30 dB"},
1431 {5, "35 dB"},
1432 {6, "40 dB"},
1433 {7, ">= 45 dB"},
1434 {0, NULL((void*)0)}
1435};
1436
1437static const value_string lbtTrafficClass_vals[] = {
1438 {1, "Priority 1"},
1439 {2, "Priority 2"},
1440 {3, "Priority 3"},
1441 {4, "Priority 4"},
1442 {0, NULL((void*)0)}
1443};
1444
1445/* 7.5.3.22 */
1446static const value_string lbtPdschRes_vals[] = {
1447 {0, "not sensing – indicates that the O-RU is transmitting data"},
1448 {1, "currently sensing – indicates the O-RU has not yet acquired the channel"},
1449 {2, "success – indicates that the channel was successfully acquired"},
1450 {3, "Failure – indicates expiration of the LBT timer. The LBT process should be reset"},
1451 {0, NULL((void*)0)}
1452};
1453
1454/* Table 7.5.2.15-3 */
1455static const value_string ci_comp_opt_vals[] = {
1456 {0, "compression per UE, one ciCompParam exists before the I/Q value of each UE"},
1457 {1, "compression per PRB, one ciCompParam exists before the I/Q value of each PRB"},
1458 {0, NULL((void*)0)}
1459};
1460
1461/* 7.5.2.17 */
1462static const range_string cmd_scope_vals[] = {
1463 {0, 0, "ARRAY-COMMAND"},
1464 {1, 1, "CARRIER-COMMAND"},
1465 {2, 2, "O-RU-COMMAND"},
1466 {3, 15, "reserved"},
1467 {0, 0, NULL((void*)0)}
1468};
1469
1470/* N.B., table in 7.5.3.38 is truncated.. */
1471static const range_string st4_cmd_type_vals[] = {
1472 {0, 0, "reserved for future command types"},
1473 {1, 1, "TIME_DOMAIN_BEAM_CONFIG"},
1474 {2, 2, "TDD_CONFIG_PATTERN"},
1475 {3, 3, "TRX_CONTROL"},
1476 {4, 4, "ASM"},
1477 {5, 5, "TRX_CONTROL_BIDIR"},
1478 {6, 6, "MAX_POWER_CONTROL"},
1479 {7, 255, "reserved for future command types"},
1480 {0, 0, NULL((void*)0)}
1481};
1482
1483/* Table 7.5.3.51-1 */
1484static const value_string log2maskbits_vals[] = {
1485 {0, "reserved"},
1486 {1, "min antMask size is 16 bits.."},
1487 {2, "min antMask size is 16 bits.."},
1488 {3, "min antMask size is 16 bits.."},
1489 {4, "16 bits"},
1490 {5, "32 bits"},
1491 {6, "64 bits"},
1492 {7, "128 bits"},
1493 {8, "256 bits"},
1494 {9, "512 bits"},
1495 {10, "1024 bits"},
1496 {11, "2048 bits"},
1497 {12, "4096 bits"},
1498 {13, "8192 bits"},
1499 {14, "16384 bits"},
1500 {15, "reserved"},
1501 {0, NULL((void*)0)}
1502};
1503
1504/* Table 16.1-1 Sleep modes */
1505static const value_string sleep_mode_trx_vals[] = {
1506 { 0, "TRXC-mode0-wake-up-duration (symbol)"},
1507 { 1, "TRXC-mode1-wake-up-duration (L)"},
1508 { 2, "TRXC-mode2-wake-up-duration (M)"},
1509 { 3, "TRXC-mode3-wake-up-duration (N)"},
1510 { 0, NULL((void*)0)}
1511};
1512
1513static const value_string sleep_mode_asm_vals[] = {
1514 { 0, "ASM-mode0-wake-up-duration (symbol)"},
1515 { 1, "ASM-mode1-wake-up-duration (L)"},
1516 { 2, "ASM-mode2-wake-up-duration (M)"},
1517 { 3, "ASM-mode3-wake-up-duration (N)"},
1518 { 0, NULL((void*)0)}
1519};
1520
1521/* 7.7.21.3.1 */
1522static const value_string prg_size_st5_vals[] = {
1523 { 0, "reserved"},
1524 { 1, "Precoding resource block group size as WIDEBAND"},
1525 { 2, "Precoding resource block group size 2"},
1526 { 3, "Precoding resource block group size 4"},
1527 { 0, NULL((void*)0)}
1528};
1529
1530/* 7.7.21.3.2 */
1531static const value_string prg_size_st6_vals[] = {
1532 { 0, "if ciPrbGroupSize is 2 or 4, then ciPrbGroupSize, else WIDEBAND"},
1533 { 1, "Precoding resource block group size as WIDEBAND"},
1534 { 2, "Precoding resource block group size 2"},
1535 { 3, "Precoding resource block group size 4"},
1536 { 0, NULL((void*)0)}
1537};
1538
1539/* 7.7.24.4 */
1540static const value_string alpn_per_sym_vals[] = {
1541 { 0, "report one allocated IPN value per all allocated symbols with DMRS"},
1542 { 1, "report one allocated IPN value per group of consecutive DMRS symbols"},
1543 { 0, NULL((void*)0)}
1544};
1545
1546/* 7.7.24.5 */
1547static const value_string ant_dmrs_snr_vals[] = {
1548 { 0, "O-RU shall not report the MEAS_ANT_DMRS_SNR"},
1549 { 1, "O-RU shall report the MEAS_ANT_DMRS_SNR"},
1550 { 0, NULL((void*)0)}
1551};
1552
1553/* 7.7.24.14 */
1554static const value_string dtype_vals[] = {
1555 { 0, "assume DMRS configuration type 1"},
1556 { 1, "assume DMRS configuration type 2"},
1557 { 0, NULL((void*)0)}
1558};
1559
1560/* 7.7.24.17 */
1561static const value_string papr_type_vals[] = {
1562 { 0, "sequence generator type 1 for short sequence lengths"},
1563 { 1, "sequence generator type 1 for long sequence lengths"},
1564 { 2, "sequence generator type 2 for short sequence lengths"},
1565 { 3, "sequence generator type 2 for long sequence lengths"},
1566 { 0, NULL((void*)0)}
1567};
1568
1569/* 7.7.24.18 */
1570static const value_string hopping_mode_vals[] = {
1571 { 0, "neither group, nor sequence hopping is enabled"},
1572 { 1, "group hopping is enabled and sequence hopping is disabled"},
1573 { 2, "sequence hopping is enabled and group hopping is disabled"},
1574 { 3, "reserved"},
1575 { 0, NULL((void*)0)}
1576};
1577
1578/* Table 7.7.31.2-1 */
1579static const value_string mcs_table_vals[] = {
1580 { 0, "MCS index table 1 for PDSCH and PUSCH without transform precoding" },
1581 { 1, "MCS index table 2 for PDSCH and PUSCH without transform precoding" },
1582 { 2, "MCS index table 3 for PDSCH and PUSCH without transform precoding" },
1583 { 3, "MCS index table 4 for PDSCH" },
1584 { 4, "MCS index table for PUSCH with transform precoding and 64QAM" },
1585 { 5, "MCS index table 2 for PUSCH with transform precoding and 64QAM" },
1586 { 0, NULL((void*)0)}
1587};
1588
1589/* 7.7.32.9 */
1590static const value_string full_pwr_mode_vals[] = {
1591 { 0, "not configured"},
1592 { 1, "full power mode 0"},
1593 { 2, "full power mode 1"},
1594 { 3, "full power mode 2"},
1595 { 0, NULL((void*)0)}
1596};
1597
1598static const value_string srs_rbg_size_vals[] = {
1599 { 0, "4 PRBs"},
1600 { 1, "1 PRB"},
1601 { 2, "2 PRBs"},
1602 { 3, "reserved"},
1603 { 0, NULL((void*)0)}
1604};
1605
1606static const value_string srs_tx_comb_vals[] = {
1607 { 0, "2 REs"},
1608 { 1, "4 REs"},
1609 { 2, "reserved"},
1610 { 3, "reserved"},
1611 { 0, NULL((void*)0)}
1612};
1613
1614
1615static const true_false_string tfs_sfStatus =
1616{
1617 "subframe was transmitted",
1618 "subframe was dropped"
1619};
1620
1621static const true_false_string tfs_lbtBufErr =
1622{
1623 "buffer overflow – data received at O-RU is larger than the available buffer size",
1624 "reserved"
1625};
1626
1627static const true_false_string tfs_partial_full_sf = {
1628 "partial SF",
1629 "full SF"
1630};
1631
1632static const true_false_string disable_tdbfns_tfs = {
1633 "beam numbers excluded",
1634 "beam numbers included"
1635};
1636
1637static const true_false_string continuity_indication_tfs = {
1638 "continuity between current and next bundle",
1639 "discontinuity between current and next bundle"
1640};
1641
1642static const true_false_string prb_mode_tfs = {
1643 "PRB-BLOCK mode",
1644 "PRB-MASK mode"
1645};
1646
1647static const true_false_string symbol_direction_tfs = {
1648 "DL symbol",
1649 "UL symbol"
1650};
1651
1652static const true_false_string symbol_guard_tfs = {
1653 "guard symbol",
1654 "non-guard symbol"
1655};
1656
1657static const true_false_string beam_numbers_included_tfs = {
1658 "time-domain beam numbers excluded in this command",
1659 "time-domain beam numbers included in this command"
1660};
1661
1662static const true_false_string measurement_flag_tfs = {
1663 "at least one additional measurement report or command after the current one",
1664 "no additional measurement report or command"
1665};
1666
1667static const true_false_string repetition_se6_tfs = {
1668 "repeated highest priority data section in the C-Plane message",
1669 "no repetition"
1670};
1671
1672static const true_false_string repetition_se19_tfs = {
1673 "per port information not present in the extension",
1674 "per port info present in the extension"
1675};
1676
1677static const true_false_string tfs_report_no_report_pos_meas =
1678{
1679 "Report MEAS_UE_POS for UE",
1680 "Do not report UE_POS for UE"
1681};
1682
1683static const true_false_string tfs_allocated_not_allocated =
1684{
1685 "allocated",
1686 "not allocated"
1687};
1688
1689
1690
1691/* Forward declaration */
1692static int dissect_udcompparam(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree, unsigned offset,
1693 unsigned comp_meth,
1694 uint32_t *exponent, uint16_t *sReSMask, bool_Bool for_sinr);
1695
1696
1697static const true_false_string ready_tfs = {
1698 "message is a \"ready\" message",
1699 "message is a ACK message"
1700};
1701
1702static const true_false_string multi_sd_scope_tfs = {
1703 "Puncturing pattern applies to current and following sections",
1704 "Puncturing pattern applies to current section"
1705};
1706
1707static const true_false_string tfs_ueid_reset = {
1708 "cannot assume same UE as in preceding slot",
1709 "can assume same UE as in preceding slot"
1710};
1711
1712
1713typedef struct {
1714 uint32_t start; /* first prb of bundle */
1715 uint32_t end; /* last prb of bundle*/
1716 bool_Bool is_orphan; /* true if not complete (i.e., end-start < numBundPrb) */
1717 uint8_t bit_from_rbg_mask; /* 0 means not set, other bits offset by 1 */
1718} bundle_t;
1719
1720
1721/* Config for (and later, worked-out allocations) bundles for ext11 (dynamic BFW) */
1722typedef struct {
1723 /* Ext 6 config */
1724 bool_Bool ext6_set;
1725 uint8_t ext6_rbg_size; /* number of PRBs in resource block group (i.e., one bit in bitmask) */
1726
1727 uint8_t ext6_num_bits_set; /* Total number of rbgMask bits set */
1728 uint8_t ext6_bits_set[28]; /* Which bit position this entry has */
1729 /* TODO: store an f value for each bit position? */
1730
1731 /* Ext 12 config */
1732 bool_Bool ext12_set;
1733 unsigned ext12_num_pairs;
1734#define MAX_BFW_EXT12_PAIRS128 128
1735 struct {
1736 uint8_t off_start_prb;
1737 uint8_t num_prb;
1738 } ext12_pairs[MAX_BFW_EXT12_PAIRS128];
1739
1740 /* Ext 13 config */
1741 bool_Bool ext13_set;
1742 unsigned ext13_num_start_prbs;
1743#define MAX_BFW_EXT13_ALLOCATIONS128 128
1744 unsigned ext13_start_prbs[MAX_BFW_EXT13_ALLOCATIONS128];
1745 /* TODO: store nextSymbolId here too? */
1746
1747 /* Ext 21 config */
1748 bool_Bool ext21_set;
1749 uint8_t ext21_ci_prb_group_size;
1750
1751 /* Results/settings (after calling ext11_work_out_bundles()) */
1752 uint32_t num_bundles;
1753#define MAX_BFW_BUNDLES512 512
1754 bundle_t bundles[MAX_BFW_BUNDLES512];
1755} ext11_settings_t;
1756
1757
1758/* Work out bundle allocation for ext 11. Take into account ext6/ext21, ext12 or ext13 in this section before ext 11. */
1759/* Won't be called with numBundPrb=0 */
1760static void ext11_work_out_bundles(unsigned startPrbc,
1761 unsigned numPrbc,
1762 unsigned numBundPrb, /* number of PRBs per (full) bundle */
1763 ext11_settings_t *settings)
1764{
1765 /* Allocation configured by ext 6 */
1766 if (settings->ext6_set) {
1767 unsigned bundles_per_mask_bit = (settings->ext6_rbg_size / numBundPrb);
1768
1769 /* Need to cope with these not dividing exactly, or even having more PRbs in a bundle that
1770 rbg size. i.e. each bundle gets the correct number of PRBs until
1771 all rbg entries are consumed... */
1772
1773 /* TODO: need to check 7.9.4.2. Different cases depending upon value of RAD */
1774
1775 if (bundles_per_mask_bit == 0) {
1776 bundles_per_mask_bit = 1;
1777 }
1778
1779 /* Ext6 behaviour may also be affected by ext 21 */
1780 if (settings->ext21_set) {
1781 /* N.B., have already checked that numPrbc is not 0 */
1782
1783 /* ciPrbGroupSize overrides number of contiguous PRBs in group */
1784 bundles_per_mask_bit = (settings->ext6_rbg_size / settings->ext21_ci_prb_group_size);
1785
1786 /* numPrbc is the number of PRB groups per antenna - handled in call to dissect_bfw_bundle() */
1787 }
1788
1789 unsigned bundles_set = 0;
1790 bool_Bool reached_orphan = false0;
1791
1792 /* For each bit set in ext6 rbg mask.. */
1793 for (unsigned n=0;
1794 !reached_orphan && n < 28 && n < settings->ext6_num_bits_set;
1795 n++) {
1796
1797 /* For each bundle... */
1798
1799 /* TODO: Work out where first PRB is */
1800 /* May not be the start of an rbg block... */
1801 uint32_t prb_start = (settings->ext6_bits_set[n] * settings->ext6_rbg_size);
1802
1803 /* For each bundle within identified rbgSize block */
1804 for (unsigned m=0; !reached_orphan && m < bundles_per_mask_bit; m++) {
1805
1806 settings->bundles[bundles_set].start = startPrbc+prb_start+(m*numBundPrb);
1807
1808 /* Start already beyond end, so doesn't count. */
1809 if (settings->bundles[bundles_set].start > (startPrbc+numPrbc-1)) {
1810 settings->num_bundles = bundles_set;
1811 return;
1812 }
1813
1814 /* Bundle consists of numBundPrb bundles */
1815 /* TODO: may involve PRBs from >1 rbg blocks.. */
1816 settings->bundles[bundles_set].end = startPrbc+prb_start+((m+1)*numBundPrb)-1;
1817 if (settings->bundles[bundles_set].end > (startPrbc+numPrbc-1)) {
1818 /* Extends beyond end, so counts but is an orphan bundle */
1819 settings->bundles[bundles_set].end = startPrbc+numPrbc-1;
1820 settings->bundles[bundles_set].is_orphan = true1;
1821 reached_orphan = true1;
1822 }
1823
1824 /* Record which rbg this bundle comes from (+1) */
1825 settings->bundles[bundles_set].bit_from_rbg_mask = settings->ext6_bits_set[n]+1;
1826
1827 /* Get out if have reached array bound */
1828 if (++bundles_set == MAX_BFW_BUNDLES512) {
1829 return;
1830 }
1831 }
1832 }
1833 settings->num_bundles = bundles_set;
1834 }
1835
1836 /* Allocation configured by ext 12 */
1837 else if (settings->ext12_set) {
1838 /* First, allocate normally from startPrbc, numPrbc */
1839 settings->num_bundles = (numPrbc+numBundPrb-1) / numBundPrb;
1840
1841 /* Don't overflow settings->bundles[] ! */
1842 settings->num_bundles = MIN(MAX_BFW_BUNDLES, settings->num_bundles)(((512) < (settings->num_bundles)) ? (512) : (settings->
num_bundles))
;
1843
1844 for (uint32_t n=0; n < settings->num_bundles; n++) {
1845 settings->bundles[n].start = startPrbc + n*numBundPrb;
1846 settings->bundles[n].end = settings->bundles[n].start + numBundPrb-1;
1847 /* Does it go beyond the end? */
1848 if (settings->bundles[n].end > startPrbc+numPrbc-1) {
1849 settings->bundles[n].end = startPrbc+numPrbc-1;
1850 settings->bundles[n].is_orphan = true1;
1851 }
1852 }
1853 if (settings->num_bundles == MAX_BFW_BUNDLES512) {
1854 return;
1855 }
1856
1857 unsigned prb_offset = startPrbc + numPrbc;
1858
1859 /* Loop over pairs, adding bundles for each */
1860 for (unsigned p=0; p < settings->ext12_num_pairs; p++) {
1861 prb_offset += settings->ext12_pairs[p].off_start_prb;
1862 unsigned pair_bundles = (settings->ext12_pairs[p].num_prb+numBundPrb-1) / numBundPrb;
1863
1864 for (uint32_t n=0; n < pair_bundles; n++) {
1865 unsigned idx = settings->num_bundles;
1866
1867 settings->bundles[idx].start = prb_offset + n*numBundPrb;
1868 settings->bundles[idx].end = settings->bundles[idx].start + numBundPrb-1;
1869 /* Does it go beyond the end? */
1870 if (settings->bundles[idx].end > prb_offset + settings->ext12_pairs[p].num_prb - 1) {
1871 settings->bundles[idx].end = prb_offset + settings->ext12_pairs[p].num_prb - 1;
1872 settings->bundles[idx].is_orphan = true1;
1873 }
1874 /* Range check / return */
1875 settings->num_bundles++;
1876 if (settings->num_bundles == MAX_BFW_BUNDLES512) {
1877 return;
1878 }
1879 }
1880
1881 prb_offset += settings->ext12_pairs[p].num_prb;
1882 }
1883 }
1884
1885 /* Allocation configured by ext 13 */
1886 else if (settings->ext13_set) {
1887 unsigned alloc_size = (numPrbc+numBundPrb-1) / numBundPrb;
1888 settings->num_bundles = alloc_size * settings->ext13_num_start_prbs;
1889
1890 /* Don't overflow settings->bundles[] ! */
1891 settings->num_bundles = MIN(MAX_BFW_BUNDLES, settings->num_bundles)(((512) < (settings->num_bundles)) ? (512) : (settings->
num_bundles))
;
1892
1893 for (unsigned alloc=0; alloc < settings->ext13_num_start_prbs; alloc++) {
1894 unsigned alloc_start = alloc * alloc_size;
1895 for (uint32_t n=0; n < alloc_size; n++) {
1896 if ((alloc_start+n) >= MAX_BFW_BUNDLES512) {
1897 /* ERROR */
1898 return;
1899 }
1900 settings->bundles[alloc_start+n].start = settings->ext13_start_prbs[alloc] + startPrbc + n*numBundPrb;
1901 settings->bundles[alloc_start+n].end = settings->bundles[alloc_start+n].start + numBundPrb-1;
1902 if (settings->bundles[alloc_start+n].end > settings->ext13_start_prbs[alloc] + startPrbc + numPrbc - 1) {
1903 settings->bundles[alloc_start+n].end = settings->ext13_start_prbs[alloc] + startPrbc + numPrbc - 1;
1904 settings->bundles[alloc_start+n].is_orphan = true1;
1905 }
1906 }
1907 }
1908 }
1909
1910 /* Case where bundles are not controlled by other extensions - just divide up range into bundles we have */
1911 else {
1912 settings->num_bundles = (numPrbc+numBundPrb-1) / numBundPrb; /* rounded up */
1913
1914 /* Don't overflow settings->bundles[] */
1915 settings->num_bundles = MIN(MAX_BFW_BUNDLES, settings->num_bundles)(((512) < (settings->num_bundles)) ? (512) : (settings->
num_bundles))
;
1916
1917 /* For each bundle.. */
1918 for (uint32_t n=0; n < settings->num_bundles; n++) {
1919 /* Allocate start and end */
1920 settings->bundles[n].start = startPrbc + n*numBundPrb;
1921 settings->bundles[n].end = settings->bundles[n].start + numBundPrb - 1;
1922 /* If would go beyond end of PRBs, limit and identify as orphan */
1923 if (settings->bundles[n].end > startPrbc+numPrbc-1) {
1924 settings->bundles[n].end = startPrbc+numPrbc-1;
1925 settings->bundles[n].is_orphan = true1;
1926 }
1927 }
1928 }
1929}
1930
1931
1932/* Modulation Compression configuration */
1933typedef struct {
1934 /* Application of each entry is filtered by RE.
1935 * TODO: should also be filtered by PRB + symbol... */
1936 uint16_t mod_compr_re_mask;
1937
1938 /* Settings to apply */
1939 bool_Bool mod_compr_csf;
1940 float mod_compr_scaler;
1941} mod_compr_config_t;
1942
1943/* Multiple configs with a section */
1944typedef struct {
1945 uint16_t section_id;
1946 uint32_t num_configs;
1947
1948 #define MAX_MOD_COMPR_CONFIGS12 12
1949 mod_compr_config_t configs[MAX_MOD_COMPR_CONFIGS12];
1950} section_mod_compr_config_t;
1951
1952/* Flow has separate configs for each section */
1953typedef struct {
1954 uint16_t num_sections;
1955
1956 /* Separate config for each section */
1957 section_mod_compr_config_t sections[MAX_SECTION_IDs32];
1958} mod_compr_params_t;
1959
1960
1961typedef struct {
1962 uint32_t frame_number;
1963 nstime_t frame_time;
1964
1965 /* Timing to match */
1966 uint8_t frame;
1967 uint8_t subframe;
1968 uint8_t slot;
1969 uint8_t startSymbol;
1970
1971 bool_Bool in_use;
1972 uint16_t startPrb;
1973 uint16_t numPrb;
1974 uint16_t numSymbols;
1975 /* beamId of the section, covering startPrb..startPrb+numPrb (and 0 elsewhere) */
1976 uint16_t beamId;
1977 /* Per-PRB beamIds, only allocated (file scope) when an extension sets
1978 * different beamIds for ranges of PRBs. Never modified once a U-plane
1979 * frame may have copied this struct (a new array is allocated for each
1980 * C-plane definition), so the copy can be shallow. */
1981 uint16_t *beamIds;
1982} section_details_t;
1983
1984#define ORAN_MAX_PRBS273 273
1985
1986/* BeamId to use for the given PRB of this section */
1987static uint16_t
1988section_details_get_beam_id(const section_details_t *details, unsigned prb)
1989{
1990 if (details->beamIds) {
1991 return details->beamIds[prb];
1992 }
1993 if (prb >= details->startPrb && prb <= (unsigned)details->startPrb + details->numPrb) {
1994 return details->beamId;
1995 }
1996 return 0;
1997}
1998
1999/* Set beamId of one PRB (C-plane only, on first pass) */
2000static void
2001section_details_set_beam_id(section_details_t *details, unsigned prb, uint16_t beam_id)
2002{
2003 if (prb >= ORAN_MAX_PRBS273) {
2004 return;
2005 }
2006 if (!details->beamIds) {
2007 uint16_t *beam_ids = wmem_alloc_array(wmem_file_scope(), uint16_t, ORAN_MAX_PRBS)((uint16_t*)wmem_alloc((wmem_file_scope()), (((((273)) <= 0
) || ((size_t)sizeof(uint16_t) > (9223372036854775807L / (
size_t)((273))))) ? 0 : (sizeof(uint16_t) * ((273))))))
;
2008 /* Keep the scalar fallback active until every entry is initialized. */
2009 for (unsigned n = 0; n < ORAN_MAX_PRBS273; n++) {
2010 beam_ids[n] = section_details_get_beam_id(details, n);
2011 }
2012 details->beamIds = beam_ids;
2013 }
2014 details->beamIds[prb] = beam_id;
2015}
2016
2017typedef struct {
2018 uint16_t sectionId;
2019 /* For the same sectionId, can have 2 currently active entries.. */
2020 section_details_t details[2];
2021} expected_section_data_t;
2022
2023
2024/*******************************************************/
2025/* Overall state of a flow (eAxC/plane) */
2026typedef struct {
2027 /* State for sequence analysis [each direction] */
2028 bool_Bool last_frame_seen[2];
2029 uint32_t last_frame[2];
2030 uint8_t next_expected_sequence_number[2];
2031
2032 /* expected frames. sectionId -> expected_section_data_t* */
2033 wmem_tree_t *expected_sections[2]; /* [direction] */
2034
2035 /* Table recording ackNack requests (ackNackId -> ack_nack_request_t*)
2036 Note that this assumes that the same ackNackId will not be reused within a state,
2037 which may well not be valid */
2038 wmem_tree_t *ack_nack_requests;
2039
2040 /* Store udCompHdr seen in C-Plane for UL - can be looked up and used by U-PLane.
2041 Note that this appears in the common section header parts of ST1, ST3, ST5,
2042 so can still be over-written per sectionId in the U-Plane */
2043 unsigned ul_ud_comp_hdr_frame;
2044 bool_Bool ul_ud_comp_hdr_set;
2045 unsigned ul_ud_comp_hdr_bit_width;
2046 int ul_ud_comp_hdr_compression;
2047
2048 bool_Bool udcomphdrDownlink_heuristic_result_set;
2049 bool_Bool udcomphdrDownlink_heuristic_result;
2050 bool_Bool udcomphdrUplink_heuristic_result_set;
2051 bool_Bool udcomphdrUplink_heuristic_result;
2052
2053 /* Modulation compression params */
2054 mod_compr_params_t mod_comp_params;
2055} flow_state_t;
2056
2057static section_mod_compr_config_t* get_mod_compr_section_to_write(packet_info *pinfo, flow_state_t *flow,
2058 unsigned sectionId)
2059{
2060 /* Only record configs on the first pass */
2061 if (flow == NULL((void*)0) || PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
2062 return NULL((void*)0);
2063 }
2064
2065 /* Look for this section among existing entries */
2066 for (unsigned s=0; s < flow->mod_comp_params.num_sections; s++) {
2067 if (flow->mod_comp_params.sections[s].section_id == sectionId) {
2068 return &flow->mod_comp_params.sections[s];
2069 }
2070 }
2071
2072 /* Not found, so try to add a new one */
2073 if (flow->mod_comp_params.num_sections >= MAX_SECTION_IDs32) {
2074 /* Can't allocate one! */
2075 return NULL((void*)0);
2076 }
2077 else {
2078 flow->mod_comp_params.sections[flow->mod_comp_params.num_sections].section_id = sectionId;
2079 return &flow->mod_comp_params.sections[flow->mod_comp_params.num_sections++];
2080 }
2081}
2082
2083static section_mod_compr_config_t* get_mod_compr_section_to_read(flow_state_t *flow,
2084 unsigned sectionId)
2085{
2086 if (flow == NULL((void*)0)) {
2087 return NULL((void*)0);
2088 }
2089
2090 /* Look for this section among existing entries */
2091 for (unsigned s=0; s < flow->mod_comp_params.num_sections; s++) {
2092 if (flow->mod_comp_params.sections[s].section_id == sectionId) {
2093 return &flow->mod_comp_params.sections[s];
2094 }
2095 }
2096
2097 /* Not found */
2098 return NULL((void*)0);
2099}
2100
2101
2102
2103typedef struct {
2104 uint32_t request_frame_number;
2105 nstime_t request_frame_time;
2106 enum {
2107 SE22,
2108 ST4Cmd1,
2109 ST4Cmd2,
2110 ST4Cmd3,
2111 ST4Cmd4,
2112 ST4Cmd5,
2113 ST4Cmd6
2114 } requestType;
2115
2116 uint32_t response_frame_number;
2117 nstime_t response_frame_time;
2118} ack_nack_request_t;
2119
2120static const value_string acknack_type_vals[] = {
2121 { SE22, "SE 22" },
2122 { ST4Cmd1, "ST4 (TIME_DOMAIN_BEAM_CONFIG)" },
2123 { ST4Cmd2, "ST4 (TDD_CONFIG_PATTERN)" },
2124 { ST4Cmd3, "ST4 (TRX_CONTROL)" },
2125 { ST4Cmd4, "ST4 (ASM)" },
2126 { ST4Cmd5, "ST4 (TRX_CONTROL_BIDIR)" },
2127 { ST4Cmd6, "ST4 (MAX_POWER_CONTROL)" },
2128 { 0, NULL((void*)0)}
2129};
2130
2131#define ORAN_C_PLANE0 0
2132#define ORAN_U_PLANE1 1
2133
2134
2135
2136/* Table maintained on first pass from flow_key(uint32_t) -> flow_state_t* */
2137static wmem_tree_t *flow_states_table;
2138
2139
2140/* Includes transport details (eth addresses + vlan) */
2141/* First and last bytes of the Ethernet source and destination, in the order of the flow */
2142static uint32_t flow_key_addresses(packet_info *pinfo, bool_Bool opposite_dir)
2143{
2144 uint32_t word = 0;
2145 const uint8_t *src_eth = (pinfo->dl_src.type == AT_ETHER) ? (const uint8_t*)pinfo->dl_src.data : NULL((void*)0);
2146 const uint8_t *dst_eth = (pinfo->dl_dst.type == AT_ETHER) ? (const uint8_t*)pinfo->dl_dst.data : NULL((void*)0);
2147
2148 if (!opposite_dir) {
2149 if (src_eth) {
2150 word |= src_eth[5] | (src_eth[0] << 8);
2151 }
2152 if (dst_eth) {
2153 word |= (dst_eth[5] << 16) | (dst_eth[0] << 24);
2154 }
2155 }
2156 else {
2157 if (src_eth) {
2158 word |= (src_eth[5] << 16) | (src_eth[0] << 24);
2159 }
2160 if (dst_eth) {
2161 word |= dst_eth[5] | (dst_eth[0] << 8);
2162 }
2163 }
2164 return word;
2165}
2166
2167static flow_state_t* lookup_flow(packet_info *pinfo, uint16_t eaxc_id, uint8_t plane, bool_Bool opposite_dir)
2168{
2169 wmem_tree_key_t key[3];
2170 uint32_t word1, word2;
2171
2172 /* 1st value is vlan_id(15) | plane(1) | eaxc_id(16) */
2173 word1 = eaxc_id | (plane << 16) | (pinfo->vlan_id << 17);
2174 key[0].length = 1;
2175 key[0].key = &word1;
2176
2177 /* 2nd word is first/last bytes of eth src/dst */
2178 word2 = flow_key_addresses(pinfo, opposite_dir);
2179 key[1].length = 1;
2180 key[1].key = &word2;
2181 key[2].length = 0;
2182 key[2].key = NULL((void*)0);
2183
2184 return (flow_state_t*)wmem_tree_lookup32_array(flow_states_table, key);
2185}
2186
2187static void store_flow(packet_info *pinfo, uint16_t eaxc_id, uint8_t plane, bool_Bool opposite_dir, flow_state_t *state)
2188{
2189 wmem_tree_key_t key[3];
2190 uint32_t word1, word2;
2191
2192 /* 1st value is vlan_id(15) | plane(1) | eaxc_id(16) */
2193 word1 = eaxc_id | (plane << 16) | (pinfo->vlan_id << 17);
2194 key[0].length = 1;
2195 key[0].key = &word1;
2196
2197 /* 2nd word is first/last bytes of eth src/dst */
2198 word2 = flow_key_addresses(pinfo, opposite_dir);
2199 key[1].length = 1;
2200 key[1].key = &word2;
2201 key[2].length = 0;
2202 key[2].key = NULL((void*)0);
2203
2204 wmem_tree_insert32_array(flow_states_table, key, state);
2205}
2206
2207
2208
2209
2210typedef struct {
2211 uint32_t frame_number;
2212 uint16_t sectionId;
2213 uint32_t gap_in_usecs;
2214 uint8_t symbol;
2215 uint16_t startPrbu;
2216 uint16_t numPrbu;
2217} corresponding_uplane_frame;
2218
2219/* Table consulted on subsequent passes: frame_num -> flow_result_t* */
2220static wmem_tree_t *flow_results_table;
2221
2222typedef struct {
2223 /* Sequence analysis */
2224 bool_Bool unexpected_seq_number;
2225 uint8_t expected_sequence_number;
2226 uint32_t previous_frame;
2227
2228 /* sectionId -> expected_section_data_t* */
2229 /* Frame only covers one downlink (no modulation compression in UL) */
2230 wmem_tree_t *expected_sections;
2231
2232 /* List of u-plane frames (corresponding_uplane_frame*) corresponding to a c-plane frame */
2233 wmem_list_t *u_plane_frames;
2234
2235 /* Whether a C-plane flow had been seen when a u-plane frame was first seen */
2236 bool_Bool cplane_seen;
2237
2238 /* UL udCompHdr settings from the C-plane when a UL u-plane frame was first seen */
2239 bool_Bool ul_ud_comp_hdr_set;
2240 unsigned ul_ud_comp_hdr_bit_width;
2241 int ul_ud_comp_hdr_compression;
2242 unsigned ul_ud_comp_hdr_frame;
2243} flow_result_t;
2244
2245
2246/* Uplink timing */
2247/* For a given symbol, track first to last UL frame to find out first-last time */
2248/* frameId (8) + subframeId (4) + slotId (6) + symbolId (6) = 24 bits */
2249/* N.B. if a capture lasts > 2.5s, may see same timing come around again... */
2250static uint32_t get_timing_key(uint8_t frameId, uint8_t subframeId, uint8_t slotId, uint8_t symbolId)
2251{
2252 return symbolId + (slotId<<8) + (subframeId<<14) + (frameId<<18);
2253}
2254
2255typedef struct {
2256 uint32_t first_frame;
2257 nstime_t first_frame_time;
2258 uint32_t frames_seen_in_symbol;
2259 uint32_t last_frame_in_symbol;
2260} ul_timing_for_slot;
2261
2262/* Set during first pass. timing_key -> ul_timing_for_slot* */
2263static wmem_tree_t *ul_symbol_timing;
2264
2265
2266/* Tracking lifetimes of DL beamIds */
2267typedef struct {
2268 uint32_t frame_defined;
2269 uint32_t symbol_when_defined;
2270} bfw_definition;
2271
2272/* Maintained during first pass: beamId (from ext11) -> bfw_definition */
2273static wmem_tree_t *dl_beam_ids_defined;
2274/* Lookup where/when beamIds were defined (frameid:beamid) -> bfw_definition */
2275static wmem_tree_t *dl_beam_ids_results;
2276
2277
2278static void show_link_to_acknack_response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
2279 ack_nack_request_t *response);
2280
2281
2282
2283
2284static void write_pdu_label_and_info(proto_item *ti1, proto_item *ti2,
2285 packet_info *pinfo, const char *format, ...) G_GNUC_PRINTF(4, 5)__attribute__((__format__ (__printf__, 4, 5)));
2286
2287 /* Write the given formatted text to:
2288 - the info column (if pinfo != NULL)
2289 - 1 or 2 other labels (optional)
2290 */
2291static void write_pdu_label_and_info(proto_item *ti1, proto_item *ti2,
2292 packet_info *pinfo, const char *format, ...)
2293{
2294#define MAX_INFO_BUFFER256 256
2295 char info_buffer[MAX_INFO_BUFFER256];
2296 va_list ap;
2297
2298 if ((ti1 == NULL((void*)0)) && (ti2 == NULL((void*)0)) && (pinfo == NULL((void*)0))) {
2299 return;
2300 }
2301
2302 va_start(ap, format)__builtin_va_start(ap, format);
2303 vsnprintf(info_buffer, MAX_INFO_BUFFER256, format, ap);
2304 va_end(ap)__builtin_va_end(ap);
2305
2306 /* Add to indicated places */
2307 if (pinfo != NULL((void*)0)) {
2308 col_append_str(pinfo->cinfo, COL_INFO, info_buffer);
2309 }
2310 if (ti1 != NULL((void*)0)) {
2311 proto_item_append_text(ti1, "%s", info_buffer);
2312 }
2313 if (ti2 != NULL((void*)0)) {
2314 proto_item_append_text(ti2, "%s", info_buffer);
2315 }
2316}
2317
2318/* Add section labels (type + PRB range) for C-Plane, U-Plane */
2319static void
2320write_section_info(proto_item *section_heading, packet_info *pinfo, proto_item *protocol_item,
2321 uint32_t section_id, uint32_t start_prbx, uint32_t num_prbx, uint32_t rb)
2322{
2323 switch (num_prbx) {
2324 case 0:
2325 /* None -> all */
2326 write_pdu_label_and_info(section_heading, protocol_item, pinfo, ", Id: %4d (all PRBs)", section_id);
2327 break;
2328 case 1:
2329 /* Single PRB */
2330 write_pdu_label_and_info(section_heading, protocol_item, pinfo, ", Id: %4d (PRB: %7u)", section_id, start_prbx);
2331 break;
2332 default:
2333 /* Range */
2334 write_pdu_label_and_info(section_heading, protocol_item, pinfo, ", Id: %4d (PRB: %3u-%3u%s)", section_id, start_prbx,
2335 start_prbx + (num_prbx-1)*(1+rb), rb ? " (every-other)" : "");
2336 }
2337}
2338
2339static void
2340write_channel_section_info(proto_item *section_heading, packet_info *pinfo,
2341 uint32_t section_id, uint32_t ueId, uint32_t start_prbx, uint32_t num_prbx,
2342 uint32_t num_trx)
2343{
2344 switch (num_prbx) {
2345 case 0:
2346 /* TODO: ?? */
2347 break;
2348 case 1:
2349 /* Single PRB */
2350 write_pdu_label_and_info(section_heading, NULL((void*)0), pinfo,
2351 ", Id: %4d (UEId=%5u PRB %7u, %2u antennas)",
2352 section_id, ueId, start_prbx, num_trx);
2353 break;
2354 default:
2355 /* Range */
2356 write_pdu_label_and_info(section_heading, NULL((void*)0), pinfo,
2357 ", Id: %4d (UEId=%5u PRBs %3u-%3u, %2u antennas)",
2358 section_id, ueId, start_prbx, start_prbx+num_prbx-1, num_trx);
2359 }
2360}
2361
2362/* Add a reserved field, and warn if value isn't 0 */
2363/* TODO: maybe add a pref not to output expert warning if becomes too annoying? */
2364static void add_reserved_field(proto_tree *tree, int hf, tvbuff_t *tvb, int offset, int len)
2365{
2366 uint32_t reserved;
2367 proto_item *res_ti = proto_tree_add_item_ret_uint(tree, hf, tvb, offset, len, ENC_NA0x00000000, &reserved);
2368 if (reserved != 0) {
2369 expert_add_info_format(NULL((void*)0), res_ti, &ei_oran_reserved_not_zero,
2370 "reserved field saw value of 0x%x", reserved);
2371 }
2372}
2373
2374/* 5.1.3.2.7 (real time control data / IQ data transfer message series identifier) */
2375static void
2376addPcOrRtcid(tvbuff_t *tvb, proto_tree *tree, unsigned *offset, int hf, uint16_t *eAxC, oran_tap_info *tap_info)
2377{
2378 /* Subtree */
2379 proto_item *oran_pcid_ti = proto_tree_add_item(tree, hf,
2380 tvb, *offset, 2, ENC_NA0x00000000);
2381 proto_tree *oran_pcid_tree = proto_item_add_subtree(oran_pcid_ti, ett_oran_ecpri_pcid);
2382
2383 uint64_t duPortId, bandSectorId, ccId, ruPortId = 0;
2384 int id_offset = *offset;
2385
2386 /* All parts of eAxC should be above 0, and should total 16 bits (breakdown controlled by preferences) */
2387 if (!((pref_du_port_id_bits > 0) && (pref_bandsector_id_bits > 0) && (pref_cc_id_bits > 0) && (pref_ru_port_id_bits > 0) &&
2388 ((pref_du_port_id_bits + pref_bandsector_id_bits + pref_cc_id_bits + pref_ru_port_id_bits) == 16))) {
2389 expert_add_info(NULL((void*)0), tree, &ei_oran_invalid_eaxc_bit_width);
2390 *eAxC = 0;
2391 *offset += 2;
2392 return;
2393 }
2394
2395 unsigned bit_offset = *offset * 8;
2396
2397 /* N.B. For sequence analysis / tapping, just interpret these 2 bytes as eAxC ID... */
2398 *eAxC = tvb_get_uint16(tvb, *offset, ENC_BIG_ENDIAN0x00000000);
2399
2400 /* DU Port ID */
2401 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);
2402 bit_offset += pref_du_port_id_bits;
2403 /* BandSector ID */
2404 proto_tree_add_bits_ret_val(oran_pcid_tree, hf_oran_bandsector_id, tvb, bit_offset, pref_bandsector_id_bits, &bandSectorId, ENC_BIG_ENDIAN0x00000000);
2405 bit_offset += pref_bandsector_id_bits;
2406 /* CC ID */
2407 proto_tree_add_bits_ret_val(oran_pcid_tree, hf_oran_cc_id, tvb, bit_offset, pref_cc_id_bits, &ccId, ENC_BIG_ENDIAN0x00000000);
2408 bit_offset += pref_cc_id_bits;
2409 /* RU Port ID */
2410 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);
2411 *offset += 2;
2412
2413 proto_item_append_text(oran_pcid_ti, " (DU_Port_ID: %d, BandSector_ID: %d, CC_ID: %d, RU_Port_ID: %d)",
2414 (int)duPortId, (int)bandSectorId, (int)ccId, (int)ruPortId);
2415 char id[16];
2416 snprintf(id, 16, "%x:%x:%x:%x", (int)duPortId, (int)bandSectorId, (int)ccId, (int)ruPortId);
2417 proto_item *pi = proto_tree_add_string(oran_pcid_tree, hf_oran_c_eAxC_ID, tvb, id_offset, 2, id);
2418 proto_item_set_generated(pi);
2419
2420 tap_info->eaxc = *eAxC;
2421 tap_info->eaxc_du_port_id = (uint16_t)duPortId;
2422 tap_info->eaxc_bandsector_id = (uint16_t)bandSectorId;
2423 tap_info->eaxc_cc_id = (uint16_t)ccId;
2424 tap_info->eaxc_ru_port_id = (uint16_t)ruPortId;
2425}
2426
2427/* Uniquely identify the U-plane stream that may need to be reassembled */
2428static uint32_t make_reassembly_id(uint32_t seqid, uint16_t eAxC, int direction)
2429{
2430 return ((seqid & 0xff) << 24) | ((direction&1)<<16) | (eAxC & 0xffff);
2431}
2432
2433/* 5.1.3.2.8 ecpriSeqid (message identifier) */
2434/* Return out info that may be used for sequence number analysis and reassembly */
2435static int
2436addSeqid(tvbuff_t *tvb, proto_tree *oran_tree, int offset, int plane, uint32_t *seq_id, proto_item **seq_id_ti,
2437 uint32_t *subseqid, uint32_t *e)
2438{
2439 /* Subtree */
2440 proto_item *seqIdItem = proto_tree_add_item(oran_tree, hf_oran_ecpri_seqid, tvb, offset, 2, ENC_NA0x00000000);
2441 proto_tree *oran_seqid_tree = proto_item_add_subtree(seqIdItem, ett_oran_ecpri_seqid);
2442
2443 /* Sequence ID (8 bits) */
2444 *seq_id_ti = proto_tree_add_item_ret_uint(oran_seqid_tree, hf_oran_sequence_id, tvb, offset, 1, ENC_NA0x00000000, seq_id);
2445 offset += 1;
2446
2447 /* E bit */
2448 proto_tree_add_item_ret_uint(oran_seqid_tree, hf_oran_e_bit, tvb, offset, 1, ENC_NA0x00000000, e);
2449 /* Subsequence ID (7 bits) */
2450 proto_tree_add_item_ret_uint(oran_seqid_tree, hf_oran_subsequence_id, tvb, offset, 1, ENC_NA0x00000000, subseqid);
2451 offset += 1;
2452
2453 /* radio-transport fragmentation not allowed for C-Plane messages */
2454 if (plane == ORAN_C_PLANE0) {
2455 if (*e !=1 || *subseqid != 0) {
2456 expert_add_info(NULL((void*)0), seqIdItem, &ei_oran_radio_fragmentation_c_plane);
2457 }
2458 }
2459
2460 /* Summary */
2461 proto_item_append_text(seqIdItem, " (SeqId: %3d, E: %d, SubSeqId: %d)", *seq_id, *e, *subseqid);
2462 return offset;
2463}
2464
2465static int dissect_symbolmask(tvbuff_t *tvb, proto_tree *tree, int offset, uint32_t *symbol_mask, proto_item **ti)
2466{
2467 uint64_t temp_val;
2468
2469 static int * const symbol_mask_flags[] = {
2470 &hf_oran_symbol_mask_s13,
2471 &hf_oran_symbol_mask_s12,
2472 &hf_oran_symbol_mask_s11,
2473 &hf_oran_symbol_mask_s10,
2474 &hf_oran_symbol_mask_s9,
2475 &hf_oran_symbol_mask_s8,
2476 &hf_oran_symbol_mask_s7,
2477 &hf_oran_symbol_mask_s6,
2478 &hf_oran_symbol_mask_s5,
2479 &hf_oran_symbol_mask_s4,
2480 &hf_oran_symbol_mask_s3,
2481 &hf_oran_symbol_mask_s2,
2482 &hf_oran_symbol_mask_s1,
2483 &hf_oran_symbol_mask_s0,
2484 NULL((void*)0)
2485 };
2486
2487 proto_item *temp_ti = proto_tree_add_bitmask_ret_uint64(tree, tvb, offset,
2488 hf_oran_symbol_mask,
2489 ett_oran_symbol_mask, symbol_mask_flags,
2490 ENC_BIG_ENDIAN0x00000000, &temp_val);
2491 /* Set out parameters */
2492 if (symbol_mask) {
2493 *symbol_mask = (uint32_t)temp_val;
2494 }
2495 if (ti) {
2496 *ti = temp_ti;
2497 }
2498 return offset+2;
2499}
2500
2501/* 7.7.1.2 bfwCompHdr (beamforming weight compression header) */
2502static int dissect_bfwCompHdr(tvbuff_t *tvb, proto_tree *tree, int offset,
2503 uint32_t *iq_width, uint32_t *comp_meth, proto_item **comp_meth_ti)
2504{
2505 /* Subtree */
2506 proto_item *bfwcomphdr_ti = proto_tree_add_string_format(tree, hf_oran_bfwCompHdr,
2507 tvb, offset, 1, "",
2508 "bfwCompHdr");
2509 proto_tree *bfwcomphdr_tree = proto_item_add_subtree(bfwcomphdr_ti, ett_oran_bfwcomphdr);
2510
2511 /* Width and method */
2512 proto_tree_add_item_ret_uint(bfwcomphdr_tree, hf_oran_bfwCompHdr_iqWidth,
2513 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, iq_width);
2514 /* Special case: 0 -> 16 */
2515 *iq_width = (*iq_width==0) ? 16 : *iq_width;
2516 *comp_meth_ti = proto_tree_add_item_ret_uint(bfwcomphdr_tree, hf_oran_bfwCompHdr_compMeth,
2517 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, comp_meth);
2518 offset++;
2519
2520 /* Summary */
2521 proto_item_append_text(bfwcomphdr_ti, " (IqWidth=%u, compMeth=%s)",
2522 *iq_width,
2523 val_to_str_const(*comp_meth, bfw_comp_headers_comp_meth, "reserved"));
2524
2525 return offset;
2526}
2527
2528/* Return offset */
2529/* Returning number of entries set - would be good to also return an array of set TRX# so could show which array element
2530 each BFW is actually for.. */
2531static int dissect_active_beamspace_coefficient_mask(tvbuff_t *tvb, proto_tree *tree, int offset, unsigned *num_trx_entries, uint16_t **trx_entries)
2532{
2533 /* activeBeamspaceCoefficientMask - ceil(K/8) octets */
2534 /* K is the number of elements in uncompressed beamforming weight vector.
2535 * Calculated from parameters describing tx-array or tx-array */
2536 unsigned k_octets = (pref_num_bf_antennas + 7) / 8;
2537
2538 static uint16_t trx_enabled[1024];
2539
2540 /* TODO: could use a bigger bitmask array, but for now just uses this bytes-worth for each byte */
2541 static int * const mask_bits[] = {
2542 &hf_oran_active_beamspace_coefficient_n1,
2543 &hf_oran_active_beamspace_coefficient_n2,
2544 &hf_oran_active_beamspace_coefficient_n3,
2545 &hf_oran_active_beamspace_coefficient_n4,
2546 &hf_oran_active_beamspace_coefficient_n5,
2547 &hf_oran_active_beamspace_coefficient_n6,
2548 &hf_oran_active_beamspace_coefficient_n7,
2549 &hf_oran_active_beamspace_coefficient_n8,
2550 NULL((void*)0)
2551 };
2552
2553 *num_trx_entries = 0;
2554 uint64_t val;
2555 for (unsigned n=0; n < k_octets; n++) {
2556 proto_tree_add_bitmask_ret_uint64(tree, tvb, offset,
2557 hf_oran_activeBeamspaceCoefficientMask,
2558 ett_oran_active_beamspace_coefficient_mask, mask_bits,
2559 ENC_BIG_ENDIAN0x00000000, &val);
2560 offset++;
2561 /* Add up the set bits for this byte (but be careful not to count beyond last real K bit..) */
2562 /* N1 is the most significant bit */
2563 for (unsigned b=0; b < 8; b++) {
2564 if ((0x80 >> b) & (unsigned)val) {
2565 if (((n*8)+b) < pref_num_bf_antennas) {
2566 if (*num_trx_entries < 1024-1) { /* Don't write beyond array (which should be plenty big) */
2567 trx_enabled[(*num_trx_entries)++] = (n*8) + b + 1;
2568 }
2569 }
2570 }
2571 }
2572 }
2573 /* Set pointer to static array */
2574 *trx_entries = trx_enabled;
2575
2576 /* Show how many bits set */
2577 proto_item *ti = proto_tree_add_uint(tree, hf_oran_activeBeamspaceCoefficientMask_bits_set, tvb,
2578 offset-k_octets, k_octets, *num_trx_entries);
2579 proto_item_set_generated(ti);
2580
2581 return offset;
2582}
2583
2584static void add_beam_id_to_tap(oran_tap_info *tap_info, uint16_t beam_id)
2585{
2586 if (tap_info->num_beams < MAX_BEAMS_IN_FRAME32) {
2587 tap_info->beams[tap_info->num_beams++] = beam_id;
2588 }
2589}
2590
2591
2592/* 7.7.1.3 bfwCompParam (beamforming weight compression parameter).
2593 * Depends upon passed-in bfwCompMeth (field may be empty) */
2594static int dissect_bfwCompParam(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset,
2595 proto_item *meth_ti, uint32_t *bfw_comp_method,
2596 uint32_t *exponent, bool_Bool *supported, unsigned *num_trx_entries, uint16_t **trx_entries)
2597{
2598 if (*bfw_comp_method == COMP_NONE0) {
2599 /* Header is absent */
2600 *supported = true1;
2601 return offset;
2602 }
2603
2604 /* Subtree */
2605 proto_item *bfwcompparam_ti = proto_tree_add_string_format(tree, hf_oran_bfwCompParam,
2606 tvb, offset, 1, "",
2607 "bfwCompParam");
2608 proto_tree *bfwcompparam_tree = proto_item_add_subtree(bfwcompparam_ti, ett_oran_bfwcompparam);
2609
2610 proto_item_append_text(bfwcompparam_ti,
2611 " (meth=%s)", val_to_str_const(*bfw_comp_method, bfw_comp_headers_comp_meth, "reserved"));
2612
2613 *num_trx_entries = 0;
2614 *supported = false0;
2615 switch (*bfw_comp_method) {
2616 case COMP_BLOCK_FP1: /* block floating point */
2617 /* 4 reserved bits + exponent */
2618 add_reserved_field(bfwcompparam_tree, hf_oran_reserved_4bits, tvb, offset, 1);
2619 proto_tree_add_item_ret_uint(bfwcompparam_tree, hf_oran_exponent,
2620 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, exponent);
2621 proto_item_append_text(bfwcompparam_ti, " exponent=%u", *exponent);
2622 *supported = true1;
2623 offset++;
2624 break;
2625 case COMP_BLOCK_SCALE2: /* block scaling */
2626 /* Separate into integer and fractional bits? */
2627 proto_tree_add_item(bfwcompparam_tree, hf_oran_blockScaler,
2628 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2629 offset++;
2630 break;
2631 case COMP_U_LAW3: /* u-law */
2632 /* compBitWidth, compShift */
2633 proto_tree_add_item(bfwcompparam_tree, hf_oran_compBitWidth,
2634 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2635 proto_tree_add_item(bfwcompparam_tree, hf_oran_compShift,
2636 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2637 offset++;
2638 break;
2639 case 4: /* beamspace I (BLOCK SCALING) */
2640 /* activeBeamspaceCoefficientMask */
2641 offset = dissect_active_beamspace_coefficient_mask(tvb, bfwcompparam_tree, offset, num_trx_entries, trx_entries);
2642 *bfw_comp_method = COMP_BLOCK_SCALE2;
2643 *supported = false0; /* TODO: true once BLOCK SCALE is supported */
2644 proto_tree_add_item(bfwcompparam_tree, hf_oran_blockScaler,
2645 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2646 offset++;
2647 break;
2648 case 5: /* beamspace II (BLOCK FLOATING POINT) */
2649 /* activeBeamspaceCoefficientMask */
2650 offset = dissect_active_beamspace_coefficient_mask(tvb, bfwcompparam_tree, offset, num_trx_entries, trx_entries);
2651 /* reserved (4 bits) + exponent (4 bits) */
2652 add_reserved_field(bfwcompparam_tree, hf_oran_reserved_4bits, tvb, offset, 1);
2653 proto_tree_add_item_ret_uint(bfwcompparam_tree, hf_oran_exponent, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, exponent);
2654 offset += 1;
2655 *bfw_comp_method = COMP_BLOCK_FP1;
2656 *supported = true1;
2657 break;
2658
2659 default:
2660 /* Not handled */
2661 break;
2662 }
2663
2664 proto_item_set_end(bfwcompparam_ti, tvb, offset);
2665
2666 /* Can't go on if compression scheme not supported */
2667 if (!(*supported) && meth_ti) {
2668 expert_add_info_format(pinfo, meth_ti, &ei_oran_unsupported_bfw_compression_method,
2669 "BFW Compression method %u (%s) not decompressed by dissector",
2670 *bfw_comp_method,
2671 val_to_str_const(*bfw_comp_method, bfw_comp_headers_comp_meth, "reserved"));
2672 }
2673 return offset;
2674}
2675
2676
2677/* Special case for uncompressed value with given iq_width */
2678static float uncompressed_to_float(uint32_t bits, uint32_t iq_width)
2679{
2680 if (iq_width == 0 || iq_width > 16) {
2681 /* Not valid */
2682 return 0.0;
2683 }
2684
2685 uint32_t mask = (1U << (iq_width-1)) - 1;
2686 int32_t i32 = (bits & (1U << (iq_width-1))) ? (int32_t)bits - (int32_t)(1U << iq_width) : (int32_t)bits;
2687
2688 if (show_unscaled_values || mask == 0) {
2689 return (float)i32;
2690 }
2691 return ((float)i32) / (mask);
2692}
2693
2694/* Decompress I/Q value, taking into account method, width, exponent, other input-specific methods */
2695static float decompress_value(uint32_t bits, uint32_t comp_method, uint8_t iq_width,
2696 uint32_t exponent,
2697 /* Modulation compression settings. N.B. should also pass in PRB + symbol? */
2698 section_mod_compr_config_t *m_c_p, uint8_t re)
2699{
2700 switch (comp_method) {
2701 case COMP_NONE0: /* no compression */
2702 return uncompressed_to_float(bits, iq_width);
2703
2704 case COMP_BLOCK_FP1: /* block floating point */
2705 case BFP_AND_SELECTIVE_RE5:
2706 case BFP_AND_SELECTIVE_RE_WITH_MASKS7:
2707 {
2708 /* A.1.3 Block Floating Point Decompression Algorithm */
2709 int32_t cPRB = bits;
2710 uint32_t scaler = 1 << exponent; /* i.e. 2^exponent */
2711
2712 /* Check last bit, in case we need to flip to -ve */
2713 if (cPRB >= (1<<(iq_width-1))) {
2714 cPRB -= (1<<iq_width);
2715 }
2716
2717 /* Unscale (8.1.3.1) */
2718 cPRB *= scaler;
2719 if (show_unscaled_values) {
2720 return (float)cPRB;
2721 }
2722
2723 uint32_t mantissa_scale_factor = 1 << (iq_width-1); /* 2^(mantissabits-1) */
2724 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 */
2725
2726 float ret = cPRB / ((float)(mantissa_scale_factor*exp_scale_factor));
2727 return ret;
2728 }
2729
2730 case COMP_BLOCK_SCALE2:
2731 case COMP_U_LAW3:
2732 /* Not supported! But will be reported as expert info outside of this function! */
2733 return 0.0;
2734
2735 case COMP_MODULATION4:
2736 case MOD_COMPR_AND_SELECTIVE_RE6:
2737 case MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8:
2738 {
2739 /* Described in A.5 (with pseudo code) */
2740 /* N.B., Applies to downlink data only - is not used for BFW */
2741
2742 /* Defaults if not overridden. TODO: what should these be? */
2743 bool_Bool csf = false0;
2744 float mcScaler = (float)(1 << 11);
2745
2746 /* Find csf + mcScaler to use. Non-default configs gleaned from SE 4,5,23 */
2747 /* TODO: should ideally be filtering by symbol and PRB too (as configured from SE23) */
2748 if (re > 0 && m_c_p && m_c_p->num_configs > 0) {
2749 for (unsigned c=0; c<m_c_p->num_configs; c++) {
2750 if (m_c_p->configs[c].mod_compr_re_mask & (1 << (12-re))) {
2751 /* Return first (should be only) found */
2752 csf = m_c_p->configs[c].mod_compr_csf;
2753 mcScaler = m_c_p->configs[c].mod_compr_scaler;
2754 break;
2755 }
2756 }
2757 }
2758
2759 int32_t cPRB = bits;
2760
2761 /* 2) Map iqSample to iqSampleFx */
2762 /* Check last bit, in case we need to flip to -ve */
2763 if (cPRB >= (1<<(iq_width-1))) {
2764 cPRB -= (1<<iq_width);
2765 }
2766 float iqSampleFx = (float)cPRB / (1 << (iq_width-1));
2767
2768
2769 /* 3) or 4) (b) - add unshifted value if csf set */
2770 float csf_to_add = 0.0;
2771 if (csf) {
2772 /* Unshift the constellation point */
2773 csf_to_add = (float)1.0 / (1 << (iq_width));
2774 }
2775 iqSampleFx += csf_to_add;
2776
2777 /* 3) or 4) (c) - unscaling */
2778 float iqSampleScaled = mcScaler * iqSampleFx * (float)sqrt(2);
2779 return iqSampleScaled;
2780 }
2781
2782 default:
2783 /* Not supported! But will be reported as expert info outside of this function! */
2784 return 0.0;
2785 }
2786}
2787
2788/* Out-of-range value used for special case */
2789#define ORPHAN_BUNDLE_NUMBER999 999
2790
2791/* Bundle of PRBs/TRX I/Q samples (ext 11) */
2792static uint32_t dissect_bfw_bundle(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, unsigned offset,
2793 proto_item *comp_meth_ti, uint32_t bfwcomphdr_comp_meth,
2794 section_mod_compr_config_t *mod_compr_params,
2795 uint32_t num_weights_per_bundle,
2796 uint8_t iq_width,
2797 unsigned bundle_number,
2798 bundle_t *bundle,
2799 uint32_t symbol_count,
2800 section_details_t *section_details,
2801 oran_tap_info *tap_info)
2802{
2803 oran_bfws_t *tap_bfws_info = wmem_new0(pinfo->pool, oran_bfws_t)((oran_bfws_t*)wmem_alloc0((pinfo->pool), sizeof(oran_bfws_t
)))
;
2804 tap_bfws_info->method = se11;
2805
2806 /* Set bundle name */
2807 char bundle_name[32];
2808 if (!bundle->is_orphan) {
2809 snprintf(bundle_name, 32, "Bundle %3u", bundle_number);
2810 }
2811 else {
2812 (void) g_strlcpy(bundle_name, "Orphaned ", 32);
2813 }
2814
2815 /* Create Bundle root */
2816 proto_item *bundle_ti;
2817 if (bundle->start != bundle->end) {
2818 bundle_ti = proto_tree_add_string_format(tree, hf_oran_bfw_bundle,
2819 tvb, offset, 0, "",
2820 "%s: (PRBs %3u-%3u)",
2821 bundle_name,
2822 bundle->start, bundle->end);
2823 }
2824 else {
2825 bundle_ti = proto_tree_add_string_format(tree, hf_oran_bfw_bundle,
2826 tvb, offset, 0, "",
2827 "%s: (PRB %3u)",
2828 bundle_name,
2829 bundle->start);
2830 }
2831 proto_tree *bundle_tree = proto_item_add_subtree(bundle_ti, ett_oran_bfw_bundle);
2832
2833 /* Generated bundle id */
2834 proto_item *bundleid_ti = proto_tree_add_uint(bundle_tree, hf_oran_bfw_bundle_id, tvb, 0, 0,
2835 bundle_number);
2836 proto_item_set_generated(bundleid_ti);
2837 proto_item_set_hidden(bundleid_ti);
2838
2839 /* bfwCompParam */
2840 bool_Bool compression_method_supported = false0;
2841 unsigned exponent = 0;
2842 unsigned num_trx_entries = 0;
2843 uint16_t *trx_entries;
2844 offset = dissect_bfwCompParam(tvb, bundle_tree, pinfo, offset, comp_meth_ti,
2845 &bfwcomphdr_comp_meth, &exponent, &compression_method_supported,
2846 &num_trx_entries, &trx_entries);
2847
2848 /* Create Bundle subtree */
2849 int bit_offset = offset*8;
2850 int bfw_offset;
2851
2852 /* contInd */
2853 proto_tree_add_item(bundle_tree, hf_oran_cont_ind,
2854 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2855 /* beamId */
2856 uint32_t beam_id;
2857 proto_tree_add_item_ret_uint(bundle_tree, hf_oran_beam_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &beam_id);
2858 proto_item_append_text(bundle_ti, " (beamId:%5u) ", beam_id);
2859 bit_offset += 16;
2860 offset += 2;
Value stored to 'offset' is never read
2861 add_beam_id_to_tap(tap_info, beam_id);
2862
2863 tap_bfws_info->beam_id = beam_id;
2864 tap_bfws_info->start_prb = bundle->start;
2865 tap_bfws_info->end_prb = bundle->end;
2866
2867 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
2868 if (section_details) {
2869 for (unsigned prb = bundle->start; prb <= bundle->end && prb < ORAN_MAX_PRBS273; prb++) {
2870 section_details_set_beam_id(section_details, prb, (uint16_t)beam_id);
2871 }
2872 }
2873 }
2874
2875 /* On first pass, record that beamId was defined here */
2876 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
2877 bfw_definition *definition = wmem_new0(wmem_file_scope(), bfw_definition)((bfw_definition*)wmem_alloc0((wmem_file_scope()), sizeof(bfw_definition
)))
;
2878 definition->frame_defined = pinfo->num;
2879 definition->symbol_when_defined = symbol_count;
2880 wmem_tree_insert32(dl_beam_ids_defined, beam_id, definition);
2881 }
2882
2883
2884 /* Number of weights per bundle (from preference) */
2885 proto_item *wpb_ti = proto_tree_add_uint(bundle_tree, hf_oran_num_weights_per_bundle, tvb, 0, 0,
2886 num_weights_per_bundle);
2887 proto_item_set_generated(wpb_ti);
2888
2889 /* Add the weights for this bundle. Overwrite with what was seen in bfwCompParam if beamspace */
2890 if (num_trx_entries != 0) {
2891 num_weights_per_bundle = num_trx_entries;
2892 }
2893
2894 bool_Bool non_zero_weights_seen = false0;
2895 int bit_offset_before_weights = bit_offset;
2896 for (unsigned w=0; w < num_weights_per_bundle; w++) {
2897
2898 uint16_t trx_index = (num_trx_entries) ? trx_entries[w] : w+1;
2899
2900 /* Create subtree */
2901 bfw_offset = bit_offset / 8;
2902 uint8_t bfw_extent = ((bit_offset + (iq_width*2)) / 8) - bfw_offset;
2903 proto_item *bfw_ti = proto_tree_add_string_format(bundle_tree, hf_oran_bfw,
2904 tvb, bfw_offset, bfw_extent,
2905 "", "TRX %3u: (", trx_index);
2906 proto_tree *bfw_tree = proto_item_add_subtree(bfw_ti, ett_oran_bfw);
2907
2908 /* I */
2909 /* Get bits, and convert to float. */
2910 uint32_t bits = tvb_get_bits32(tvb, bit_offset, iq_width, ENC_BIG_ENDIAN0x00000000);
2911 if (bits) {
2912 non_zero_weights_seen = true1;
2913 }
2914 float value = decompress_value(bits, bfwcomphdr_comp_meth, iq_width,
2915 exponent, mod_compr_params, 0 /* RE */);
2916 /* Add to tree. */
2917 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);
2918 bit_offset += iq_width;
2919 proto_item_append_text(bfw_ti, "I%u=%f ", w, value);
2920
2921 tap_bfws_info->i[tap_bfws_info->i_count++] = value;
2922
2923 /* Q */
2924 /* Get bits, and convert to float. */
2925 bits = tvb_get_bits32(tvb, bit_offset, iq_width, ENC_BIG_ENDIAN0x00000000);
2926 if (bits) {
2927 non_zero_weights_seen = true1;
2928 }
2929
2930 value = decompress_value(bits, bfwcomphdr_comp_meth, iq_width,
2931 exponent, mod_compr_params, 0 /* RE */);
2932 /* Add to tree. */
2933 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);
2934 bit_offset += iq_width;
2935 proto_item_append_text(bfw_ti, "Q%u=%f)", w, value);
2936
2937 tap_bfws_info->q[tap_bfws_info->q_count++] = value;
2938 }
2939
2940 if (!non_zero_weights_seen) {
2941 proto_tree_add_item(bundle_tree, hf_oran_bundle_weights_all_zero, tvb,
2942 bit_offset_before_weights/8, (bit_offset+7)/8 - (bit_offset_before_weights/8), ENC_NA0x00000000);
2943 }
2944
2945 if (bundle->bit_from_rbg_mask) {
2946 proto_item_append_text(bundle_ti, " (rbg %u)", bundle->bit_from_rbg_mask-1);
2947 }
2948
2949 /* Set extent of bundle */
2950 proto_item_set_end(bundle_ti, tvb, (bit_offset+7)/8);
2951
2952 tap_queue_packet(oran_bfws_tap, pinfo, tap_bfws_info);
2953
2954 return (bit_offset+7)/8;
2955}
2956
2957/* Return new bit offset. in/out will always be byte-aligned.. */
2958static int dissect_ciCompParam(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U___attribute__((unused)), unsigned bit_offset,
2959 unsigned comp_meth, uint8_t *exponent)
2960{
2961 if (comp_meth == COMP_NONE0) {
2962 /* Nothing in frame so don't even create subtree */
2963 return bit_offset;
2964 }
2965
2966 /* Subtree */
2967 proto_item *cicompparam_ti = proto_tree_add_string_format(tree, hf_oran_ciCompParam,
2968 tvb, bit_offset/8, 1, "",
2969 "ciCompParam");
2970 proto_tree *cicompparam_tree = proto_item_add_subtree(cicompparam_ti, ett_oran_cicompparam);
2971 uint32_t ci_exponent;
2972
2973 /* Contents differ by compression method */
2974 switch (comp_meth) {
2975 case COMP_BLOCK_FP1:
2976 add_reserved_field(cicompparam_tree, hf_oran_reserved_4bits, tvb, bit_offset/8, 1);
2977 proto_tree_add_item_ret_uint(cicompparam_tree, hf_oran_exponent,
2978 tvb, bit_offset/8, 1, ENC_BIG_ENDIAN0x00000000, &ci_exponent);
2979 *exponent = ci_exponent;
2980 proto_item_append_text(cicompparam_ti, " (Exponent=%u)", ci_exponent);
2981 bit_offset += 8; /* one byte */
2982 break;
2983 case COMP_BLOCK_SCALE2:
2984 /* Separate into integer (1) and fractional (7) bits? */
2985 proto_tree_add_item(cicompparam_tree, hf_oran_blockScaler,
2986 tvb, bit_offset/8, 1, ENC_BIG_ENDIAN0x00000000);
2987 bit_offset += 8;
2988 break;
2989 case COMP_U_LAW3:
2990 /* compBitWidth, compShift (4 bits each) */
2991 proto_tree_add_item(cicompparam_tree, hf_oran_compBitWidth,
2992 tvb, bit_offset/8, 1, ENC_BIG_ENDIAN0x00000000);
2993 proto_tree_add_item(cicompparam_tree, hf_oran_compShift,
2994 tvb, bit_offset/8, 1, ENC_BIG_ENDIAN0x00000000);
2995 bit_offset += 8;
2996 break;
2997
2998 default:
2999 /* reserved, ? bytes of zeros.. */
3000 break;
3001 }
3002
3003 return bit_offset;
3004}
3005
3006/* frameStructure (7.5.2.13) */
3007static unsigned dissect_frame_structure(proto_item *tree, tvbuff_t *tvb, unsigned offset,
3008 uint32_t subframeId, uint32_t slotId)
3009{
3010 uint32_t scs;
3011 /* FFT Size (4 bits) */
3012 proto_tree_add_item(tree, hf_oran_frameStructure_fft, tvb, offset, 1, ENC_NA0x00000000);
3013 /* Subcarrier spacing (SCS) */
3014 proto_tree_add_item_ret_uint(tree, hf_oran_frameStructure_subcarrier_spacing, tvb, offset, 1, ENC_NA0x00000000, &scs);
3015
3016 /* Show slot within frame as a generated field. See table 7.5.13-3 */
3017 uint32_t slots_per_subframe = 1;
3018 if (scs <= 4) {
3019 slots_per_subframe = 1 << scs;
3020 }
3021 if (scs <= 4 || scs >= 12) {
3022 proto_item *ti = proto_tree_add_uint(tree, hf_oran_slot_within_frame, tvb, 0, 0,
3023 (slots_per_subframe*subframeId) + slotId);
3024 proto_item_set_generated(ti);
3025 }
3026 return offset + 1;
3027}
3028
3029static unsigned dissect_csf(proto_item *tree, tvbuff_t *tvb, unsigned bit_offset,
3030 unsigned iq_width, bool_Bool *p_csf)
3031{
3032 proto_item *csf_ti;
3033 uint64_t csf;
3034 csf_ti = proto_tree_add_bits_ret_val(tree, hf_oran_csf, tvb, bit_offset, 1, &csf, ENC_BIG_ENDIAN0x00000000);
3035 if (csf) {
3036 /* Table 7.7.4.2-1 Constellation shift definition (index is udIqWidth) */
3037 const char* shift_value[] = { "n/a", "1/2", "1/4", "1/8", "1/16", "1/32" };
3038 if (iq_width >=1 && iq_width <= 5) {
3039 proto_item_append_text(csf_ti, " (Shift Value is %s)", shift_value[iq_width]);
3040 }
3041 }
3042
3043 /* Set out parameter */
3044 if (p_csf != NULL((void*)0)) {
3045 *p_csf = (csf!=0);
3046 }
3047 return bit_offset+1;
3048}
3049
3050static unsigned dissect_rbg_mask(proto_item *tree, tvbuff_t *tvb, unsigned offset, uint32_t *rbgMask, proto_item **item)
3051{
3052 uint64_t rbgMask64;
3053
3054 static int * const rbg_mask_bits[] = {
3055 &hf_oran_rbg_mask_27,
3056 &hf_oran_rbg_mask_26,
3057 &hf_oran_rbg_mask_25,
3058 &hf_oran_rbg_mask_24,
3059 &hf_oran_rbg_mask_23,
3060 &hf_oran_rbg_mask_22,
3061 &hf_oran_rbg_mask_21,
3062 &hf_oran_rbg_mask_20,
3063 &hf_oran_rbg_mask_19,
3064 &hf_oran_rbg_mask_18,
3065 &hf_oran_rbg_mask_17,
3066 &hf_oran_rbg_mask_16,
3067 &hf_oran_rbg_mask_15,
3068 &hf_oran_rbg_mask_14,
3069 &hf_oran_rbg_mask_13,
3070 &hf_oran_rbg_mask_12,
3071 &hf_oran_rbg_mask_11,
3072 &hf_oran_rbg_mask_10,
3073 &hf_oran_rbg_mask_9,
3074 &hf_oran_rbg_mask_8,
3075 &hf_oran_rbg_mask_7,
3076 &hf_oran_rbg_mask_6,
3077 &hf_oran_rbg_mask_5,
3078 &hf_oran_rbg_mask_4,
3079 &hf_oran_rbg_mask_3,
3080 &hf_oran_rbg_mask_2,
3081 &hf_oran_rbg_mask_1,
3082 &hf_oran_rbg_mask_0,
3083 NULL((void*)0)
3084 };
3085
3086 *item = proto_tree_add_bitmask_ret_uint64(tree, tvb, offset,
3087 hf_oran_rbgMask, ett_oran_rbgMask,
3088 rbg_mask_bits,
3089 ENC_BIG_ENDIAN0x00000000, &rbgMask64);
3090 *rbgMask = (uint32_t)rbgMask64;
3091 return offset+4;
3092}
3093
3094
3095/* Section 7.
3096 * N.B. these are the green parts of the tables showing Section Types, differing by section Type */
3097static int dissect_oran_c_section(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
3098 flow_state_t* state,
3099 uint32_t sectionType, oran_tap_info *tap_info, proto_item *protocol_item,
3100 uint32_t subframeId, uint32_t frameId, uint32_t slotId, uint32_t startSymbolId,
3101 uint8_t ci_iq_width, uint8_t ci_comp_meth, unsigned ci_comp_opt,
3102 unsigned num_sinr_per_prb)
3103{
3104 unsigned offset = 0;
3105 proto_tree *c_section_tree = NULL((void*)0);
3106 proto_item *sectionHeading = NULL((void*)0);
3107
3108 /* Section subtree */
3109 sectionHeading = proto_tree_add_string_format(tree, hf_oran_c_section,
3110 tvb, offset, 0, "", "Section");
3111 c_section_tree = proto_item_add_subtree(sectionHeading, ett_oran_c_section);
3112
3113 uint32_t sectionId = 0;
3114
3115 uint32_t startPrbc=0, startPrbu=0;
3116 uint32_t numPrbc=0, numPrbu=0;
3117 uint32_t ueId = 0;
3118 proto_item *ueId_ti = NULL((void*)0);
3119 uint32_t section_beamId = 0;
3120 proto_item *section_beamId_ti = NULL((void*)0);
3121 bool_Bool section_beamId_ignored = false0;
3122
3123 proto_item *numsymbol_ti = NULL((void*)0);
3124 bool_Bool numsymbol_ignored = false0;
3125
3126 proto_item *numprbc_ti = NULL((void*)0);
3127
3128 proto_item *rb_ti = NULL((void*)0);
3129 uint32_t rb;
3130
3131 uint64_t re_mask = 0;
3132 proto_item *re_mask_ti = NULL((void*)0);
3133
3134 /* Config affecting ext11 bundles (initially unset) */
3135 ext11_settings_t ext11_settings;
3136 memset(&ext11_settings, 0, sizeof(ext11_settings));
3137
3138 /* Section Type 10 needs to keep track of PRB range that should be reported
3139 for msgTypeId=5 (Interference plus Noise for unallocated PRBs) */
3140 /* All PRBs start as false */
3141#define MAX_PRBS273 273
3142 bool_Bool prbs_for_st10_type5[MAX_PRBS273];
3143 memset(&prbs_for_st10_type5, 0, sizeof(prbs_for_st10_type5));
3144
3145 /* These UEIds are set by ST5, ST10 (single value), and extended by SE10 */
3146#define MAX_UEIDS16 16
3147 uint32_t ueids[MAX_UEIDS16];
3148 uint32_t number_of_ueids = 0;
3149
3150 bool_Bool extension_flag = false0;
3151
3152 /* All remaining symbols for section types without numSymbol */
3153 uint32_t numSymbol = 14;
3154
3155 /* These sections (ST0, ST1, ST2, ST3, ST5, ST9, ST10, ST11) are similar, so handle as common with per-type differences */
3156 if (((sectionType <= SEC_C_UE_SCHED) || (sectionType >= SEC_C_SINR_REPORTING)) &&
3157 (sectionType != SEC_C_SLOT_CONTROL) && (sectionType != SEC_C_SRS_DESCRIPTION)) {
3158
3159 /* sectionID (12 bits) */
3160 proto_item *ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_section_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &sectionId);
3161 if (sectionId == 4095) {
3162 proto_item_append_text(ti, " (not default coupling C/U planes using sectionId)");
3163 }
3164 offset++;
3165
3166 if (tap_info->num_section_ids < MAX_SECTION_IDs32) {
3167 tap_info->section_ids[tap_info->num_section_ids++] = sectionId;
3168 }
3169
3170 /* rb */
3171 rb_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_rb, tvb, offset, 1, ENC_NA0x00000000, &rb);
3172
3173 /* symInc (1 bit) */
3174 /* TODO: mark as ignored if SE6, SE12 or SE19 present */
3175 if (sectionType != SEC_C_RRM_MEAS_REPORTS && /* Section Type 10 */
3176 sectionType != SEC_C_RRM_MEAS_REPORTS_NON_TIMING && /* Section Type 13 */
3177 sectionType != SEC_C_REQUEST_RRM_MEAS) { /* Section Type 11 */
3178
3179 unsigned int sym_inc;
3180 proto_item *sym_inc_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_symInc, tvb, offset, 1, ENC_NA0x00000000, &sym_inc);
3181 if (sym_inc !=0 && (sectionType == SEC_C_SINR_REPORTING)) { /* Section Type 9 */
3182 /* "0 shall be used" */
3183 proto_item_append_text(sym_inc_ti, " (should be 0)");
3184 }
3185 }
3186 else {
3187 /* reserved (1 bit) */
3188 add_reserved_field(c_section_tree, hf_oran_reserved_bit5, tvb, offset, 1);
3189 }
3190
3191 /* startPrbx and numPrbx */
3192 if (sectionType == SEC_C_SINR_REPORTING) {
3193 /* startPrbu (10 bits) */
3194 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_startPrbu, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPrbu);
3195 offset += 2;
3196
3197 /* numPrbu */
3198 numprbc_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numPrbu, tvb, offset, 1, ENC_NA0x00000000, &numPrbu);
3199 if (numPrbu == 0) {
3200 proto_item_append_text(numprbc_ti, " (all PRBs - configured as %u)", pref_data_plane_section_total_rbs);
3201 numPrbu = pref_data_plane_section_total_rbs;
3202 }
3203 offset += 1;
3204 }
3205 else {
3206 /* startPrbc (10 bits) */
3207 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_startPrbc, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPrbc);
3208 offset += 2;
3209
3210 /* numPrbc */
3211 numprbc_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numPrbc, tvb, offset, 1, ENC_NA0x00000000, &numPrbc);
3212 if (numPrbc == 0) {
3213 proto_item_append_text(numprbc_ti, " (all PRBs - configured as %u)", pref_data_plane_section_total_rbs);
3214 /* TODO: should probably set to pref_data_plane_section_total_rbs, and define MAX_PRBS to > 273 ? */
3215 numPrbc = MAX_PRBS273;
3216 }
3217 offset += 1;
3218 }
3219
3220 /* Start with range from section. May get changed by SE6, SE12, SE20 */
3221 for (unsigned n=startPrbc; n < startPrbc+numPrbc; n++) {
3222 if (n < MAX_PRBS273) {
3223 prbs_for_st10_type5[n] = true1;
3224 }
3225 }
3226
3227 if (sectionType != SEC_C_SINR_REPORTING) { /* *NOT* Section Type 9 */
3228 static int * const remask_flags[] = {
3229 &hf_oran_reMask_re1,
3230 &hf_oran_reMask_re2,
3231 &hf_oran_reMask_re3,
3232 &hf_oran_reMask_re4,
3233 &hf_oran_reMask_re5,
3234 &hf_oran_reMask_re6,
3235 &hf_oran_reMask_re7,
3236 &hf_oran_reMask_re8,
3237 &hf_oran_reMask_re9,
3238 &hf_oran_reMask_re10,
3239 &hf_oran_reMask_re11,
3240 &hf_oran_reMask_re12,
3241 NULL((void*)0)
3242 };
3243
3244 /* reMask */
3245 re_mask_ti = proto_tree_add_bitmask_ret_uint64(c_section_tree, tvb, offset,
3246 hf_oran_reMask, ett_oran_remask, remask_flags, ENC_BIG_ENDIAN0x00000000, &re_mask);
3247 offset++;
3248 /* numSymbol */
3249 numsymbol_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numSymbol, tvb, offset, 1, ENC_NA0x00000000, &numSymbol);
3250 if (((sectionType == SEC_C_RRM_MEAS_REPORTS) || (sectionType == SEC_C_RRM_MEAS_REPORTS_NON_TIMING)) && (numSymbol != 14)) { /* Section type 10/13 must have 14 symbols */
3251 proto_item_append_text(numsymbol_ti, " (for ST10, should be 14!)");
3252 expert_add_info_format(pinfo, numsymbol_ti, &ei_oran_st10_numsymbol_not_14,
3253 "numSymbol should be 14 for ST10 - found %u", numSymbol);
3254 }
3255 if ((startSymbolId + numSymbol) > 14) {
3256 /* Warn if startSymbol + numSymbol would be > 14 */
3257 expert_add_info_format(pinfo, numsymbol_ti, &ei_oran_too_many_symbols,
3258 "startSymbolId (%u) + numSymbol (%u) exceeds max of 14",
3259 startSymbolId, numSymbol);
3260 }
3261 offset++;
3262
3263 /* [ef] (extension flag) */
3264 switch (sectionType) {
3265 case SEC_C_UNUSED_RB: /* Section Type 0 */
3266 case SEC_C_NORMAL: /* Section Type 1 */
3267 case SEC_C_PRACH: /* Section Type 3 */
3268 case SEC_C_UE_SCHED: /* Section Type 5 */
3269 case SEC_C_RRM_MEAS_REPORTS: /* Section Type 10 */
3270 case SEC_C_RRM_MEAS_REPORTS_NON_TIMING: /* Section Type 13 */
3271
3272 case SEC_C_REQUEST_RRM_MEAS: /* Section Type 11 */
3273 proto_tree_add_item_ret_boolean(c_section_tree, hf_oran_ef, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &extension_flag);
3274 break;
3275 default:
3276 /* Other section types don't support extensions */
3277 break;
3278 }
3279
3280 write_section_info(sectionHeading, pinfo, protocol_item, sectionId, startPrbc, numPrbc, rb);
3281 proto_item_append_text(sectionHeading, ", Symbols: %2u", numSymbol);
3282
3283 if (numPrbc == 0) {
3284 /* Special case for all PRBs */
3285 numPrbc = pref_data_plane_section_total_rbs;
3286 startPrbc = 0; /* may already be 0... */
3287 }
3288 }
3289 else {
3290 /* Section Type 9 */
3291 write_section_info(sectionHeading, pinfo, protocol_item, sectionId, startPrbu, numPrbu, rb);
3292 proto_item_append_text(sectionHeading, ", numSinrPerPrb: %2u", num_sinr_per_prb);
3293 }
3294
3295 /* Section type specific fields (after 'numSymbol') */
3296 switch (sectionType) {
3297 case SEC_C_UNUSED_RB: /* Section Type 0 - Table 7.4.2-1 */
3298 /* reserved (15 bits) */
3299 add_reserved_field(c_section_tree, hf_oran_reserved_15bits, tvb, offset, 2);
3300 offset += 2;
3301 break;
3302
3303 case SEC_C_NORMAL: /* Section Type 1 - Table 7.4.3-1 */
3304 /* beamId */
3305 section_beamId_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &section_beamId);
3306 offset += 2;
3307
3308 /* beamId might get invalidated by e.g., ext-6, ext-11, so unused value will still be shown here.. */
3309 proto_item_append_text(sectionHeading, ", BeamId: %d", section_beamId);
3310 break;
3311
3312 case SEC_C_PRACH: /* Section Type 3 - Table 7.4.5-1 */
3313 {
3314 /* beamId */
3315 section_beamId_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &section_beamId);
3316 offset += 2;
3317
3318 /* freqOffset */
3319 int32_t freqOffset; /* Yes, this is signed, so the cast is intentional. */
3320 proto_item *freq_offset_item = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_freqOffset, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000, (uint32_t*)&freqOffset);
3321 freqOffset |= 0xff000000; /* Must sign-extend */
3322 proto_item_set_text(freq_offset_item, "Frequency offset: %d \u0394f", freqOffset);
3323 offset += 3;
3324
3325 /* reserved (8 bits) */
3326 add_reserved_field(c_section_tree, hf_oran_reserved_8bits, tvb, offset, 1);
3327 offset += 1;
3328
3329 /* beamId might get invalidated by e.g., ext-6, ext-11, so unused value will still be shown here.. */
3330 proto_item_append_text(sectionHeading, ", BeamId: %d, FreqOffset: %d \u0394f", section_beamId, freqOffset);
3331 break;
3332 }
3333
3334 case SEC_C_UE_SCHED: /* Section Type 5 - Table 7.4.7-1 */
3335 case SEC_C_RRM_MEAS_REPORTS: /* Section Type 10 - Table 7.4.12-1 */
3336 case SEC_C_RRM_MEAS_REPORTS_NON_TIMING: /* Section Type 13 - Table 7.4.12-1 (same frame format) */
3337
3338 /* ueId */
3339 ueId_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_ueId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ueId);
3340 offset += 2;
3341 if (ueId == 0x7fff) {
3342 proto_item_append_text(ueId_ti, " (PRBs not scheduled for eAxC ID in transport header)");
3343 }
3344 else {
3345 ueids[number_of_ueids++] = ueId;
3346 }
3347
3348 proto_item_append_text(sectionHeading, ", UEId: %d", ueId);
3349 break;
3350
3351 case SEC_C_SINR_REPORTING: /* Section Type 9 - SINR Reporting */
3352 {
3353 /* Hidden filter for bf (DMFS-BF) */
3354 proto_item *bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
3355 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
3356
3357 unsigned bit_offset = offset*8;
3358
3359 /* sinr iqWidth */
3360 proto_item *iq_width_item = proto_tree_add_uint(c_section_tree, hf_oran_sinrCompHdrIqWidth_pref, tvb, 0, 0, pref_sample_bit_width_sinr);
3361 proto_item_append_text(iq_width_item, " (from preferences)");
3362 proto_item_set_generated(iq_width_item);
3363 if (pref_sample_bit_width_sinr == 0 || pref_sample_bit_width_sinr > 16) {
3364 expert_add_info_format(pinfo, iq_width_item, &ei_oran_invalid_sample_bit_width,
3365 "SINR sample bit width from preference (%u) not valid, so can't decode SINR",
3366 pref_sample_bit_width_sinr);
3367 break;
3368 }
3369
3370 /* sinr compMethod */
3371 proto_item *sinr_comp_meth_item = proto_tree_add_uint(c_section_tree, hf_oran_sinrCompHdrMeth_pref, tvb, 0, 0, pref_iqCompressionSINR);
3372 proto_item_append_text(sinr_comp_meth_item, " (from preferences)");
3373 proto_item_set_generated(sinr_comp_meth_item);
3374
3375 /* Add SINR entries for each PRB */
3376 for (unsigned prb=startPrbu; prb < startPrbu+numPrbu; prb++) {
3377 /* Create a subtree for each PRB */
3378 proto_item *prb_ti = proto_tree_add_string_format(c_section_tree, hf_oran_sinr_prb,
3379 tvb, offset, 0, "", "PRB %3u (", prb);
3380 proto_tree *prb_tree = proto_item_add_subtree(prb_ti, ett_oran_sinr_prb);
3381
3382 /* Each prb starts byte-aligned */
3383 bit_offset = ((bit_offset+7)/8) * 8;
3384
3385 /* N.B., using width/method from UL U-plane preferences, not certain that this is correct.. */
3386
3387 /* sinrCompParam (udCompParam format, may be empty) */
3388 uint32_t exponent = 0; /* N.B. init to silence warnings, but will always be set if read in COMP_BLOCK_FP case */
3389 uint16_t sReSMask;
3390 bit_offset = dissect_udcompparam(tvb, pinfo, prb_tree, bit_offset/8,
3391 pref_iqCompressionSINR, &exponent, &sReSMask,
3392 true1) * 8; /* last param is for_sinr */
3393
3394 /* sinrValues for this PRB. */
3395 /* TODO: not sure how numSinrPerPrb interacts with rb==1... */
3396 for (unsigned n=0; n < num_sinr_per_prb; n++) {
3397 unsigned sinr_bits = tvb_get_bits32(tvb, bit_offset, pref_sample_bit_width_sinr, ENC_BIG_ENDIAN0x00000000);
3398
3399 /* Using SINR compression settings from preferences */
3400 float value = decompress_value(sinr_bits,
3401 pref_iqCompressionSINR, pref_sample_bit_width_sinr,
3402 exponent,
3403 NULL((void*)0) /* no ModCompr for SINR */, 0 /* RE */);
3404 unsigned sample_len_in_bytes = ((bit_offset%8)+pref_sample_bit_width_sinr+7)/8;
3405 proto_item *val_ti = proto_tree_add_float(prb_tree, hf_oran_sinr_value, tvb,
3406 bit_offset/8, sample_len_in_bytes, value);
3407 proto_item_append_text(prb_ti, " %8f", value);
3408
3409 /* Show here which subcarriers share which values (they all divide 12..) */
3410 if (num_sinr_per_prb == 12) {
3411 proto_item_append_text(val_ti, " (PRB=%u, subcarrier %u)",
3412 startPrbu+((prb-startPrbu)*(rb+1)), n*(12/num_sinr_per_prb));
3413 }
3414 else {
3415 proto_item_append_text(val_ti, " (PRB=%u, subcarriers %u-%u)",
3416 startPrbu+((prb-startPrbu)*(rb+1)),
3417 n*(12/num_sinr_per_prb), (n+1)*(12/num_sinr_per_prb)-1);
3418 }
3419 bit_offset += pref_sample_bit_width_sinr;
3420 }
3421
3422 /* 1-byte alignment per PRB (7.2.11) */
3423 offset = (bit_offset+7)/8;
3424 bit_offset = offset*8;
3425
3426 proto_item_append_text(prb_ti, ")");
3427 proto_item_set_end(prb_ti, tvb, offset);
3428 }
3429 break;
3430 }
3431 case SEC_C_REQUEST_RRM_MEAS: /* Section Type 11 - Request RRM Measurements */
3432 /* Reserved (15 bits) */
3433 add_reserved_field(c_section_tree, hf_oran_reserved_15bits, tvb, offset, 2);
3434 offset += 2;
3435 break;
3436
3437 default:
3438 break;
3439 }
3440 }
3441 else if (sectionType == SEC_C_CH_INFO) { /* Section Type 6 */
3442 /* ef */
3443 proto_tree_add_item_ret_boolean(c_section_tree, hf_oran_ef, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &extension_flag);
3444 /* ueId */
3445 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_ueId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ueId);
3446 offset += 2;
3447 /* regularizationFactor */
3448 proto_tree_add_item(c_section_tree, hf_oran_regularizationFactor, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3449 offset += 2;
3450 /* reserved (4 bits) */
3451 add_reserved_field(c_section_tree, hf_oran_reserved_4bits, tvb, offset, 1);
3452 /* rb ("Value=0 shall be set") */
3453 rb_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_rb, tvb, offset, 1, ENC_NA0x00000000, &rb);
3454 if (rb != 0) {
3455 proto_item_append_text(rb_ti, " (should be set to 0)");
3456 expert_add_info(pinfo, rb_ti, &ei_oran_st6_rb_shall_be_0);
3457 }
3458 /* symInc */
3459 proto_tree_add_item(c_section_tree, hf_oran_symInc, tvb, offset, 1, ENC_NA0x00000000);
3460 /* startPrbc */
3461 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_startPrbc, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPrbc);
3462 offset += 2;
3463 /* numPrbc */
3464 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numPrbc, tvb, offset, 1, ENC_NA0x00000000, &numPrbc);
3465 offset += 1;
3466
3467 /* Hidden filter for bf */
3468 proto_item *bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
3469 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
3470
3471 /* ciIsample,ciQsample pairs */
3472 unsigned m;
3473 unsigned prb;
3474 uint32_t bit_offset = offset*8;
3475
3476 /* Antenna count from preference */
3477 unsigned num_trx = pref_num_bf_antennas;
3478
3479 write_channel_section_info(sectionHeading, pinfo,
3480 sectionId, ueId, startPrbc, numPrbc, num_trx);
3481
3482 bool_Bool first_prb = true1;
3483 uint8_t exponent = 0;
3484 for (prb=startPrbc; prb < startPrbc+numPrbc; prb++) {
3485
3486 /* PRB subtree */
3487 unsigned prb_start_offset = bit_offset;
3488 proto_item *prb_ti = proto_tree_add_string_format(c_section_tree, hf_oran_samples_prb,
3489 tvb, bit_offset/8, 0,
3490 "", "PRB=%u", prb);
3491 proto_tree *prb_tree = proto_item_add_subtree(prb_ti, ett_oran_prb_cisamples);
3492
3493 /* There may be a ciCompParam here.. */
3494 if (first_prb || ci_comp_opt==1) {
3495 bit_offset = dissect_ciCompParam(tvb, prb_tree, pinfo, bit_offset, ci_comp_meth, &exponent);
3496 }
3497 first_prb = false0;
3498
3499 /* Antennas */
3500 for (m=0; m < num_trx; m++) {
3501
3502 unsigned sample_offset = bit_offset / 8;
3503 uint8_t sample_extent = ((bit_offset + (ci_iq_width*2)) / 8) - sample_offset;
3504
3505 /* Create subtree for antenna */
3506 proto_item *sample_ti = proto_tree_add_string_format(prb_tree, hf_oran_ciSample,
3507 tvb, sample_offset, sample_extent,
3508 "", "TRX=%2u: ", m);
3509 proto_tree *sample_tree = proto_item_add_subtree(sample_ti, ett_oran_cisample);
3510
3511 /* I */
3512 /* Get bits, and convert to float. */
3513 uint32_t bits = tvb_get_bits32(tvb, bit_offset, ci_iq_width, ENC_BIG_ENDIAN0x00000000);
3514 float value = decompress_value(bits, ci_comp_meth, ci_iq_width, exponent, NULL((void*)0) /* no ModCompr for ST6 */, 0 /* RE */);
3515
3516 /* Add to tree. */
3517 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);
3518 bit_offset += ci_iq_width;
3519 proto_item_append_text(sample_ti, "I%u=%f ", m, value);
3520
3521 /* Q */
3522 /* Get bits, and convert to float. */
3523 bits = tvb_get_bits32(tvb, bit_offset, ci_iq_width, ENC_BIG_ENDIAN0x00000000);
3524 value = decompress_value(bits, ci_comp_meth, ci_iq_width, exponent, NULL((void*)0) /* no ModCompr for ST6 */, 0 /* RE */);
3525
3526 /* Add to tree. */
3527 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);
3528 bit_offset += ci_iq_width;
3529 proto_item_append_text(sample_ti, "Q%u=%f ", m, value);
3530 }
3531 proto_item_set_len(prb_ti, (bit_offset-prb_start_offset+7)/8);
3532 }
3533
3534 /* Pad out by 1 or 4 bytes, according to preference */
3535 if (!st6_4byte_alignment) {
3536 offset = (bit_offset + 7) / 8;
3537 }
3538 else {
3539 int mode = bit_offset % 32;
3540 if (mode != 0) {
3541 offset = (bit_offset + (32-mode))/8;
3542 }
3543 else {
3544 offset = bit_offset/8;
3545 }
3546 }
3547 proto_item_set_end(c_section_tree, tvb, offset);
3548 }
3549 else if (sectionType == SEC_C_SRS_DESCRIPTION) { /* Section Type 12 */
3550 /* sectionID (12 bits) */
3551 proto_item *ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_section_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &sectionId);
3552 if (sectionId == 4095) {
3553 proto_item_append_text(ti, " (not default coupling C/U planes using sectionId)");
3554 }
3555 offset++;
3556
3557 if (tap_info->num_section_ids < MAX_SECTION_IDs32) {
3558 tap_info->section_ids[tap_info->num_section_ids++] = sectionId;
3559 }
3560
3561 /* srsRbgSize (2 bits) */
3562 proto_tree_add_item(c_section_tree, hf_oran_srsRbgSize, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3563
3564 /* startPrbc (10 bits) */
3565 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_startPrbc, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPrbc);
3566 offset += 2;
3567
3568 /* numPrbc */
3569 numprbc_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numPrbc, tvb, offset, 1, ENC_NA0x00000000, &numPrbc);
3570 if (numPrbc == 0) {
3571 proto_item_append_text(numprbc_ti, " (all PRBs - configured as %u)", pref_data_plane_section_total_rbs);
3572 /* TODO: should probably set to pref_data_plane_section_total_rbs, and define MAX_PRBS to > 273 ? */
3573 numPrbc = MAX_PRBS273;
3574 }
3575 offset += 1;
3576
3577 /* srsNumRbg (8 bits) */
3578 proto_tree_add_item(c_section_tree, hf_oran_srsNumRbg, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3579 offset += 1;
3580 /* srsTxComb (3 bits) */
3581 proto_tree_add_item(c_section_tree, hf_oran_srsTxComb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3582 /* reserved (1 bit) */
3583 add_reserved_field(c_section_tree, hf_oran_reserved_bit3, tvb, offset, 1);
3584 /* srsSymId (4 bits) */
3585 proto_tree_add_item(c_section_tree, hf_oran_srsSymId, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3586 offset += 1;
3587 /* reserved (16 bits) */
3588 add_reserved_field(c_section_tree, hf_oran_reserved_16bits, tvb, offset, 2);
3589 offset += 2;
3590
3591 /* ef (1 bit) */
3592 /* reserved (1 bit) */
3593 add_reserved_field(c_section_tree, hf_oran_reserved_bit1, tvb, offset, 1);
3594 /* srsNumUe (6 bits) */
3595 uint8_t srs_num_ue;
3596 proto_tree_add_item_ret_uint8(c_section_tree, hf_oran_srsNumUe, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &srs_num_ue);
3597 offset += 1;
3598
3599 /* TODO: subsections - one for each UE */
3600 for (uint8_t ss=0; ss < srs_num_ue; ss++) {
3601 /* TODO: create subsection subtree */
3602
3603 /* Reserved-struct (3 bits) */
3604 /* srsUeIdApIdReset (1 bit) */
3605 /* reserved (4 bits) */
3606 add_reserved_field(c_section_tree, hf_oran_reserved_last_4bits, tvb, offset, 1);
3607 offset += 1;
3608 /* srsNumAp (4 bits) */
3609 uint8_t num_ap = tvb_get_uint8(tvb, offset) >> 4;
3610 /* srsTotalAp (4 bits) */
3611 offset += 1;
3612 /* srsSeqIq (2 bytes) */
3613 offset += 2;
3614 /* srsNumMultiSym (4 bits) */
3615 /* srsIndexMultiSym (4 bits) */
3616 offset += 1;
3617 /* srsPatMultiSym (2 bits) */
3618 /* srsCiUse (2 bits) */
3619 /* srsSeqHopType (2 bits) */
3620 /* srsFreqHopType (2 bits) */
3621 offset += 1;
3622 /* reserved (1 bit) */
3623 add_reserved_field(c_section_tree, hf_oran_reserved_1bit, tvb, offset, 1);
3624 /* srsNumFreqHops (7 bits) */
3625 offset += 1;
3626 /* reserved (1 bit) */
3627 add_reserved_field(c_section_tree, hf_oran_reserved_1bit, tvb, offset, 1);
3628 /* srsFreqHopIndex (7 bits) */
3629 offset += 1;
3630 /* reserved (2 bits) */
3631 add_reserved_field(c_section_tree, hf_oran_reserved_2bits, tvb, offset, 1);
3632 /* srsUsage (6 bits) */
3633 offset += 1;
3634 /* reserved (8 bits) */
3635 offset += 1;
3636 /* reserved (1 bit) */
3637 add_reserved_field(c_section_tree, hf_oran_reserved_1bit, tvb, offset, 1);
3638 /* srsPriorityRpt (5 bits) */
3639 /* srsStartPrbCiRpt (9 bits) */
3640 offset += 1;
3641 /* srsStartPrbCiRpt (1 bit) */
3642 offset += 1;
3643 /* srsNumGrpCiRpt (8 bits) */
3644 offset += 1;
3645 /* srsGrpSizeCiRpt (8 bits) */
3646 /* reserved (8 bits) */
3647 add_reserved_field(c_section_tree, hf_oran_reserved_8bits, tvb, offset, 1);
3648 offset += 1;
3649 /* srsRrmMeasTrigger (2 bytes) */
3650 offset += 2;
3651
3652 /* One entry (yellowy-green in Table 7.4.14-1) for each port for this UE */
3653 for (uint8_t port = 0; port < num_ap; port++) {
3654 /* TODO: create port entry subtree */
3655 /* reserved (1 bit) */
3656 add_reserved_field(c_section_tree, hf_oran_reserved_1bit, tvb, offset, 1);
3657 /* srsUeIdApId (15 bits) */
3658 offset += 2;
3659 /* reserved (1 bit) */
3660 add_reserved_field(c_section_tree, hf_oran_reserved_1bit, tvb, offset, 1);
3661 /* srsRECO (3 bits) */
3662 /* srsCR (4 bits) */
3663 offset += 1;
3664 /* reserved (8 bits) */
3665 add_reserved_field(c_section_tree, hf_oran_reserved_8bits, tvb, offset, 1);
3666 offset += 1;
3667 }
3668 }
3669 }
3670
3671
3672 expected_section_data_t *data_section = NULL((void*)0);
3673 unsigned index_to_use = 0;
3674
3675 /* On first pass, allocate a section entry to use */
3676 if (link_planes_together && !PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
3677
3678 /* Look for existing entry for sectionId to overwrite first. */
3679 uint8_t direction = !tap_info->uplink;
3680 data_section = wmem_tree_lookup32(state->expected_sections[direction],
3681 sectionId);
3682 if (data_section == NULL((void*)0)) {
3683 /* None, so create */
3684 data_section = wmem_new0(wmem_file_scope(), expected_section_data_t)((expected_section_data_t*)wmem_alloc0((wmem_file_scope()), sizeof
(expected_section_data_t)))
;
3685 wmem_tree_insert32(state->expected_sections[direction],
3686 sectionId,
3687 data_section);
3688 }
3689
3690 /* TODO: not currently coping with case where >1 C-plane frames define same sectionId (covering different PRBs).
3691 * Ideally would at least update the missing beamIds.. */
3692 if (data_section->details[0].in_use) {
3693 /* If 2nd entry not in use, use that one */
3694 if (!data_section->details[1].in_use) {
3695 index_to_use = 1;
3696 }
3697 else {
3698 /* Both in use, so replace the older of the 2 entries */
3699 if (data_section->details[1].frame_number < data_section->details[0].frame_number) {
3700 index_to_use = 1;
3701 }
3702 }
3703 }
3704
3705 if (data_section) {
3706 section_details_t *details = &data_section->details[index_to_use];
3707
3708 details->in_use = true1;
3709 details->frame = frameId;
3710 details->subframe = subframeId;
3711 details->slot = slotId;
3712 details->startSymbol = startSymbolId;
3713 details->numSymbols = numSymbol;
3714
3715 details->frame_number = pinfo->num;
3716 details->frame_time = pinfo->abs_ts;
3717 data_section->sectionId = sectionId;
3718 details->startPrb = startPrbc;
3719 details->numPrb = numPrbc;
3720 /* Fresh per-PRB array (if any) for this definition, see section_details_t */
3721 details->beamId = (uint16_t)section_beamId;
3722 details->beamIds = NULL((void*)0);
3723 }
3724 }
3725
3726 bool_Bool seen_se10 = false0;
3727 uint32_t numPortc = 0;
3728 proto_item *bf_ti = NULL((void*)0);
3729
3730 /* Section extension commands */
3731 while (extension_flag) {
3732 int extension_start_offset = offset;
3733
3734 /* Prefetch extType so can use specific extension type ett */
3735 uint32_t exttype = tvb_get_uint8(tvb, offset) & 0x7f;
3736 uint32_t exttype_ett_index = exttype;
3737 if (exttype == 0 || exttype > HIGHEST_EXTTYPE35) {
3738 /* Just use first one if out of range */
3739 exttype_ett_index = 1;
3740 }
3741
3742 /* Create subtree for each extension (with summary) */
3743 proto_item *extension_ti = proto_tree_add_string_format(c_section_tree, hf_oran_extension,
3744 tvb, offset, 0, "", "Extension");
3745 proto_tree *extension_tree = proto_item_add_subtree(extension_ti, ett_oran_c_section_extension[exttype_ett_index-1]);
3746
3747 /* ef (i.e. another extension after this one?) */
3748 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_ef, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &extension_flag);
3749
3750 /* extType */
3751 proto_item *exttype_ti;
3752 exttype_ti = proto_tree_add_item(extension_tree, hf_oran_exttype, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3753 offset++;
3754 proto_item_append_text(sectionHeading, " (ext-%u)", exttype);
3755
3756 proto_item_append_text(extension_ti, " (ext-%u: %s)", exttype, val_to_str_ext_const(exttype, &exttype_vals_ext, "Reserved"));
3757
3758 /* Don't tap if out of range. */
3759 if (exttype > 0 && exttype <= HIGHEST_EXTTYPE35) {
3760 tap_info->extensions[exttype] = true1;
3761 }
3762
3763 /* Is this SE allowed for this section type? */
3764 if (!se_allowed_in_st(exttype, sectionType)) {
3765 expert_add_info_format(pinfo, extension_tree, &ei_oran_se_on_unsupported_st,
3766 "SE %u (%s) should not appear in ST %u (%s)!",
3767 exttype, val_to_str_ext_const(exttype, &exttype_vals_ext, "Reserved"),
3768 sectionType, rval_to_str_const(sectionType, section_types, "Unknown"));
3769 }
3770
3771
3772 /* extLen (number of 32-bit words) */
3773 uint32_t extlen_len = ((exttype==11)||(exttype==19)||(exttype==20)) ? 2 : 1; /* Extensions 11/19/20 are special */
3774 uint32_t extlen;
3775 proto_item *extlen_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_extlen, tvb,
3776 offset, extlen_len, ENC_BIG_ENDIAN0x00000000, &extlen);
3777 proto_item_append_text(extlen_ti, " (%u bytes)", extlen*4);
3778 offset += extlen_len;
3779 if (extlen == 0) {
3780 expert_add_info(pinfo, extlen_ti, &ei_oran_extlen_zero);
3781 /* Break out to avoid infinitely looping! */
3782 break;
3783 }
3784
3785 bool_Bool ext_unhandled = false0;
3786
3787 switch (exttype) {
3788
3789 case 1: /* SE 1: Beamforming Weights */
3790 {
3791 uint32_t bfwcomphdr_iq_width, bfwcomphdr_comp_meth;
3792 proto_item *comp_meth_ti = NULL((void*)0);
3793
3794 /* Hidden filter for bf */
3795 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
3796 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
3797
3798 oran_bfws_t *tap_bfws_info = wmem_new0(pinfo->pool, oran_bfws_t)((oran_bfws_t*)wmem_alloc0((pinfo->pool), sizeof(oran_bfws_t
)))
;
3799 tap_bfws_info->method = se1;
3800
3801 /* bfwCompHdr (2 subheaders - bfwIqWidth and bfwCompMeth) */
3802 offset = dissect_bfwCompHdr(tvb, extension_tree, offset,
3803 &bfwcomphdr_iq_width, &bfwcomphdr_comp_meth, &comp_meth_ti);
3804
3805 /* bfwCompParam */
3806 uint32_t exponent = 0;
3807 bool_Bool compression_method_supported = false0;
3808 unsigned num_trx = pref_num_bf_antennas;
3809 uint16_t *trx = NULL((void*)0); /* ptr to array */
3810 offset = dissect_bfwCompParam(tvb, extension_tree, pinfo, offset, comp_meth_ti,
3811 &bfwcomphdr_comp_meth, &exponent, &compression_method_supported,
3812 &num_trx, &trx);
3813
3814 /* Can't show details of unsupported compression method */
3815 if (!compression_method_supported) {
3816 break;
3817 }
3818
3819 bool_Bool using_array = (trx != NULL((void*)0));
3820
3821 /* I & Q samples */
3822
3823 bool_Bool non_zero_weights_seen = false0;
3824 int bit_offset = offset*8;
3825 int offset_before_weights = offset;
3826
3827 for (unsigned n=0; n < num_trx; n++) {
3828 /* Create antenna subtree */
3829 int bfw_offset = bit_offset / 8;
3830
3831 uint16_t trx_index = (using_array) ? trx[n] : n+1;
3832
3833 proto_item *bfw_ti = proto_tree_add_string_format(extension_tree, hf_oran_bfw,
3834 tvb, bfw_offset, 0, "", "TRX %3u: (", trx_index);
3835 proto_tree *bfw_tree = proto_item_add_subtree(bfw_ti, ett_oran_bfw);
3836
3837 /* I value */
3838 /* Get bits, and convert to float. */
3839 uint32_t bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
3840 if (bits) {
3841 non_zero_weights_seen = true1;
3842 }
3843 float value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent,
3844 NULL((void*)0) /* no ModCompr */, 0 /* RE */);
3845 /* Add to tree. */
3846 proto_tree_add_float(bfw_tree, hf_oran_bfw_i, tvb, bit_offset/8,
3847 (bfwcomphdr_iq_width+7)/8, value);
3848 bit_offset += bfwcomphdr_iq_width;
3849 proto_item_append_text(bfw_ti, "I=%f ", value);
3850 tap_bfws_info->i[tap_bfws_info->i_count++] = value;
3851
3852 /* Leave a gap between I and Q values */
3853 proto_item_append_text(bfw_ti, " ");
3854
3855 /* Q value */
3856 /* Get bits, and convert to float. */
3857 bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
3858 if (bits) {
3859 non_zero_weights_seen = true1;
3860 }
3861
3862 value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent,
3863 NULL((void*)0) /* no ModCompr */, 0 /* RE */);
3864 /* Add to tree. */
3865 proto_tree_add_float(bfw_tree, hf_oran_bfw_q, tvb, bit_offset/8,
3866 (bfwcomphdr_iq_width+7)/8, value);
3867 bit_offset += bfwcomphdr_iq_width;
3868 proto_item_append_text(bfw_ti, "Q=%f", value);
3869
3870 proto_item_append_text(bfw_ti, ")");
3871 tap_bfws_info->q[tap_bfws_info->q_count++] = value;
3872
3873 proto_item_set_len(bfw_ti, (bit_offset+7)/8 - bfw_offset);
3874 }
3875
3876 /* Complete BFWs tap details and send */
3877 tap_bfws_info->beam_id = section_beamId;
3878 tap_bfws_info->start_prb = startPrbc;
3879 tap_bfws_info->end_prb = numPrbc;
3880 tap_queue_packet(oran_bfws_tap, pinfo, tap_bfws_info);
3881
3882 /* Need to round to next byte */
3883 offset = (bit_offset+7)/8;
3884
3885 if (!non_zero_weights_seen) {
3886 proto_tree_add_item(extension_tree, hf_oran_bundle_weights_all_zero, tvb,
3887 offset_before_weights, offset-offset_before_weights, ENC_NA0x00000000);
3888 }
3889 break;
3890 }
3891
3892 case 2: /* SE 2: Beamforming attributes */
3893 {
3894 /* Hidden filter for bf */
3895 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
3896 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
3897
3898 /* bfaCompHdr (get widths of fields to follow) */
3899 uint32_t bfAzPtWidth, bfZePtWidth, bfAz3ddWidth, bfZe3ddWidth;
3900 /* subtree */
3901 proto_item *bfa_ti = proto_tree_add_string_format(extension_tree, hf_oran_bfaCompHdr,
3902 tvb, offset, 2, "", "bfaCompHdr");
3903 proto_tree *bfa_tree = proto_item_add_subtree(bfa_ti, ett_oran_bfacomphdr);
3904
3905 /* reserved (2 bits) */
3906 add_reserved_field(bfa_tree, hf_oran_reserved_2bits, tvb, offset, 1);
3907 /* bfAzPtWidth (3 bits) */
3908 proto_tree_add_item_ret_uint(bfa_tree, hf_oran_bfAzPtWidth, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &bfAzPtWidth);
3909 /* bfZePtWidth (3 bits) */
3910 proto_tree_add_item_ret_uint(bfa_tree, hf_oran_bfZePtWidth, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &bfZePtWidth);
3911 offset += 1;
3912
3913 /* reserved (2 bits) */
3914 add_reserved_field(bfa_tree, hf_oran_reserved_2bits, tvb, offset, 1);
3915 /* bfAz3ddWidth (3 bits) */
3916 proto_tree_add_item_ret_uint(bfa_tree, hf_oran_bfAz3ddWidth, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &bfAz3ddWidth);
3917 /* bfZe3ddWidth (3 bits) */
3918 proto_tree_add_item_ret_uint(bfa_tree, hf_oran_bfZe3ddWidth, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &bfZe3ddWidth);
3919 offset += 1;
3920
3921 unsigned bit_offset = offset*8;
3922
3923 /* bfAzPt */
3924 if (bfAzPtWidth > 0) {
3925 proto_tree_add_bits_item(extension_tree, hf_oran_bfAzPt, tvb, bit_offset, bfAzPtWidth+1, ENC_BIG_ENDIAN0x00000000);
3926 bit_offset += (bfAzPtWidth+1);
3927 }
3928 /* bfZePt */
3929 if (bfZePtWidth > 0) {
3930 proto_tree_add_bits_item(extension_tree, hf_oran_bfZePt, tvb, bit_offset, bfZePtWidth+1, ENC_BIG_ENDIAN0x00000000);
3931 bit_offset += (bfZePtWidth+1);
3932 }
3933 /* bfAz3dd */
3934 if (bfAz3ddWidth > 0) {
3935 proto_tree_add_bits_item(extension_tree, hf_oran_bfAz3dd, tvb, bit_offset, bfAz3ddWidth+1, ENC_BIG_ENDIAN0x00000000);
3936 bit_offset += (bfAz3ddWidth+1);
3937 }
3938 /* bfZe3dd */
3939 if (bfZe3ddWidth > 0) {
3940 proto_tree_add_bits_item(extension_tree, hf_oran_bfZe3dd, tvb, bit_offset, bfZe3ddWidth+1, ENC_BIG_ENDIAN0x00000000);
3941 bit_offset += (bfZe3ddWidth+1);
3942 }
3943
3944 /* Pad to next byte (unless last 2 fields already fit in this one) */
3945 if ((bit_offset % 8) > 2) {
3946 offset = (bit_offset+7) / 8;
3947 }
3948 else {
3949 offset = bit_offset / 8;
3950 }
3951
3952 /* bfAzSl (3 bits) */
3953 proto_tree_add_item(extension_tree, hf_oran_bfAzSl, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3954 /* bfZeSl (3 bits) */
3955 proto_tree_add_item(extension_tree, hf_oran_bfZeSl, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3956 offset += 1;
3957 break;
3958 }
3959
3960 case 3: /* SE 3: DL precoding parameters */
3961 {
3962 /* codebookindex (8 bits) */
3963 /* "This parameter is not used and shall be set to zero." */
3964 proto_tree_add_item(extension_tree, hf_oran_codebook_index, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3965 offset += 1;
3966 /* layerid */
3967 uint32_t layerid;
3968 proto_tree_add_item_ret_uint(extension_tree, hf_oran_layerid, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &layerid);
3969 /* numLayers */
3970 proto_tree_add_item(extension_tree, hf_oran_numlayers, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3971 offset += 1;
3972
3973 /* Stop here for non-first data layer */
3974 if (layerid != 0 && layerid != 0xf) {
3975 break;
3976 }
3977
3978 /* First data layer case */
3979 /* txScheme */
3980 proto_tree_add_item(extension_tree, hf_oran_txscheme, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3981 /* crsReMask */
3982 proto_tree_add_item(extension_tree, hf_oran_crs_remask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3983 offset += 2;
3984
3985 /* crsShift (1 bit) */
3986 proto_tree_add_item(extension_tree, hf_oran_crs_shift, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3987 /* reserved (3 bits) */
3988 add_reserved_field(extension_tree, hf_oran_reserved_bits123, tvb, offset, 1);
3989 /* crsSymNum (4 bits) */
3990 proto_tree_add_item(extension_tree, hf_oran_crs_symnum, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3991 offset += 1;
3992 /* reserved (24 bits) */
3993 add_reserved_field(extension_tree, hf_oran_reserved_24bits, tvb, offset, 3);
3994 offset += 3;
3995
3996 /* reserved (1 bit) */
3997 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
3998 /* beamIdAP1 (15 bits) */
3999 proto_tree_add_item(extension_tree, hf_oran_beamid_ap1, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4000 offset += 2;
4001 /* reserved (1 bit) */
4002 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
4003 /* beamIdAP2 (15 bits) */
4004 proto_tree_add_item(extension_tree, hf_oran_beamid_ap2, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4005 offset += 2;
4006 /* reserved (1 bit) */
4007 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
4008 /* beamIdAP3 (15 bits) */
4009 proto_tree_add_item(extension_tree, hf_oran_beamid_ap3, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4010 offset += 2;
4011 break;
4012 }
4013
4014 case 4: /* SE 4: Modulation compression params (5.4.7.4) (single sets) */
4015 {
4016 /* csf */
4017 bool_Bool csf;
4018 dissect_csf(extension_tree, tvb, offset*8, ci_iq_width, &csf);
4019
4020 /* modCompScaler (16 bits) */
4021 uint32_t modCompScaler;
4022 proto_item *ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_modcompscaler,
4023 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &modCompScaler);
4024 offset += 2;
4025
4026 /* Work out and show floating point value too. exponent and mantissa are both unsigned */
4027 uint16_t exponent = (modCompScaler >> 11) & 0x000f; /* m.s. 4 bits */
4028 uint16_t mantissa = modCompScaler & 0x07ff; /* l.s. 11 bits */
4029 float value = ((float)mantissa/(1<<11)) * ((float)1.0 / (1 << exponent));
4030 proto_item_append_text(ti, " (%f)", value);
4031
4032 section_mod_compr_config_t* sect_config = get_mod_compr_section_to_write(pinfo, state, sectionId);
4033
4034 /* Store these params in this flow's state */
4035 if (sect_config && sect_config->num_configs < MAX_MOD_COMPR_CONFIGS12) {
4036 unsigned i = sect_config->num_configs;
4037 sect_config->configs[i].mod_compr_re_mask = 0xfff; /* Covers all REs */
4038 sect_config->configs[i].mod_compr_csf = csf;
4039 sect_config->configs[i].mod_compr_scaler = value;
4040 sect_config->num_configs++;
4041 }
4042 break;
4043 }
4044
4045 case 5: /* SE 5: Modulation Compression Additional Parameters (7.7.5) (multiple sets) */
4046 {
4047 /* Applies only to section types 1,3 and 5 */
4048 /* N.B. there may be multiple instances of this SE in the same frame */
4049
4050 /* There may be one or 2 entries, depending upon extLen */
4051 int sets = 1, reserved_bits = 0;
4052 switch (extlen) {
4053 case 2:
4054 sets = 1;
4055 reserved_bits = 20;
4056 break;
4057 case 3:
4058 sets = 2;
4059 reserved_bits = 24;
4060 break;
4061 case 4:
4062 /* sets can be 3 or 4, depending upon whether last 28 bits are 0.. */
4063 if ((tvb_get_ntohl(tvb, offset+10) & 0x0fffffff) == 0) {
4064 sets = 3;
4065 reserved_bits = 28;
4066 }
4067 else {
4068 sets = 4;
4069 reserved_bits = 0;
4070 }
4071 break;
4072
4073 /* TODO: it seems that it could be longer.. */
4074 default:
4075 /* Malformed error!!! */
4076 expert_add_info_format(pinfo, extlen_ti, &ei_oran_extlen_wrong,
4077 "For SE5 (modCompr additional params), extLen must be 2, 3 or 4, but %u was dissected",
4078 extlen);
4079 break;
4080 }
4081
4082 uint64_t accumulated_mc_scale_re_mask = 0;
4083 unsigned bit_offset = offset*8;
4084 /* Dissect each set */
4085 for (int s=0; s < sets; s++) {
4086 /* Subtree for each set */
4087 unsigned set_start_offset = bit_offset/8;
4088 proto_item *set_ti = proto_tree_add_string(extension_tree, hf_oran_modcomp_param_set,
4089 tvb, set_start_offset, 0, "");
4090 proto_tree *set_tree = proto_item_add_subtree(set_ti, ett_oran_modcomp_param_set);
4091
4092 uint64_t mcScaleReMask, mcScaleOffset;
4093 bool_Bool csf;
4094
4095 /* mcScaleReMask (12 bits). Defines which REs the following csf and mcScaleOffset apply to */
4096 static int * const remask_flags[] = {
4097 &hf_oran_mc_scale_re_mask_re1,
4098 &hf_oran_mc_scale_re_mask_re2,
4099 &hf_oran_mc_scale_re_mask_re3,
4100 &hf_oran_mc_scale_re_mask_re4,
4101 &hf_oran_mc_scale_re_mask_re5,
4102 &hf_oran_mc_scale_re_mask_re6,
4103 &hf_oran_mc_scale_re_mask_re7,
4104 &hf_oran_mc_scale_re_mask_re8,
4105 &hf_oran_mc_scale_re_mask_re9,
4106 &hf_oran_mc_scale_re_mask_re10,
4107 &hf_oran_mc_scale_re_mask_re11,
4108 &hf_oran_mc_scale_re_mask_re12,
4109 NULL((void*)0)
4110 };
4111 /* Same as above, but offset by 4 bits */
4112 static int * const remask_flags_even[] = {
4113 &hf_oran_mc_scale_re_mask_re1_even,
4114 &hf_oran_mc_scale_re_mask_re2_even,
4115 &hf_oran_mc_scale_re_mask_re3_even,
4116 &hf_oran_mc_scale_re_mask_re4_even,
4117 &hf_oran_mc_scale_re_mask_re5_even,
4118 &hf_oran_mc_scale_re_mask_re6_even,
4119 &hf_oran_mc_scale_re_mask_re7_even,
4120 &hf_oran_mc_scale_re_mask_re8_even,
4121 &hf_oran_mc_scale_re_mask_re9_even,
4122 &hf_oran_mc_scale_re_mask_re10_even,
4123 &hf_oran_mc_scale_re_mask_re11_even,
4124 &hf_oran_mc_scale_re_mask_re12_even,
4125 NULL((void*)0)
4126 };
4127
4128 /* RE Mask for set (12 bits) */
4129 proto_item *set_re_mask_ti;
4130 set_re_mask_ti = proto_tree_add_bitmask_ret_uint64(set_tree, tvb, bit_offset / 8,
4131 (s % 2) ? hf_oran_mc_scale_re_mask_even : hf_oran_mc_scale_re_mask,
4132 ett_oran_mc_scale_remask,
4133 (s % 2) ? remask_flags_even : remask_flags, ENC_BIG_ENDIAN0x00000000, &mcScaleReMask);
4134 bit_offset += 12;
4135
4136 if (mcScaleReMask == 0) {
4137 /* Shouldn't expect an entry with an entry that doesn't change anything. */
4138 /* Exception (from Table 7.7.5.1-3) is when extLen=4 and this is the 4th set */
4139 if (!(extlen == 4 && s == 3)) {
4140 expert_add_info(pinfo, set_re_mask_ti, &ei_oran_se5_re_zero_re_mask);
4141 }
4142 }
4143
4144 if (re_mask_ti && (mcScaleReMask & re_mask) != mcScaleReMask) {
4145 /* Bits set that were not in reMask! */
4146 expert_add_info_format(pinfo, set_re_mask_ti, &ei_oran_se5_re_mask_bit_not_in_re_mask,
4147 "SE 5 set references REs (0x%03x) not set in the section reMask (0x%03x)",
4148 (uint16_t)mcScaleReMask, (uint16_t)re_mask);
4149 }
4150
4151 if (accumulated_mc_scale_re_mask & mcScaleReMask) {
4152 /* Bits have already been covered! */
4153 expert_add_info_format(pinfo, set_re_mask_ti, &ei_oran_se5_re_mask_bit_repeated,
4154 "SE 5 set references REs (0x%03x) already covered by an earlier set",
4155 (uint16_t)mcScaleReMask);
4156 }
4157
4158 /* Add RE bits from this set to accumulated */
4159 accumulated_mc_scale_re_mask |= mcScaleReMask;
4160
4161 /* csf (1 bit) */
4162 bit_offset = dissect_csf(set_tree, tvb, bit_offset, ci_iq_width, &csf);
4163 /* mcScaleOffset (15 bits) */
4164 proto_item *ti = proto_tree_add_bits_ret_val(set_tree, hf_oran_mc_scale_offset, tvb, bit_offset, 15, &mcScaleOffset, ENC_BIG_ENDIAN0x00000000);
4165 uint16_t exponent = (mcScaleOffset >> 11) & 0x000f; /* m.s. 4 bits */
4166 uint16_t mantissa = mcScaleOffset & 0x07ff; /* l.s. 11 bits */
4167 float mcScaleOffset_value = ((float)mantissa/(1<<11)) * ((float)1.0 / (1 << exponent));
4168 proto_item_append_text(ti, " (%f)", mcScaleOffset_value);
4169 bit_offset += 15;
4170
4171 section_mod_compr_config_t* sect_config = get_mod_compr_section_to_write(pinfo, state, sectionId);
4172
4173 /* Record this config */
4174 if (sect_config && sect_config->num_configs < MAX_MOD_COMPR_CONFIGS12) {
4175 unsigned i = sect_config->num_configs;
4176 sect_config->configs[i].mod_compr_re_mask = (uint16_t)mcScaleReMask;
4177 sect_config->configs[i].mod_compr_csf = csf;
4178 sect_config->configs[i].mod_compr_scaler = mcScaleOffset_value;
4179 sect_config->num_configs++;
4180 }
4181
4182 /* Summary */
4183 proto_item_set_len(set_ti, (bit_offset+7)/8 - set_start_offset);
4184 proto_item_append_text(set_ti, " (mcScaleReMask=0x%03x csf=%5s mcScaleOffset=%f)",
4185 (unsigned)mcScaleReMask, tfs_get_true_false(csf)tfs_get_string(csf, ((void*)0)), mcScaleOffset_value);
4186 }
4187
4188 proto_item_append_text(extension_ti, " (%u sets)", sets);
4189
4190 if (re_mask_ti && accumulated_mc_scale_re_mask != re_mask) {
4191 /* Complain that not all bits were set */
4192 expert_add_info_format(pinfo, re_mask_ti, &ei_oran_se5_re_mask_bits_not_covered,
4193 "Section reMask (0x%03x) has bits not covered by any sets (covers 0x%03x)",
4194 (uint16_t)re_mask, (uint16_t)accumulated_mc_scale_re_mask);
4195 }
4196
4197 /* Reserved (variable-length) */
4198 if (reserved_bits) {
4199 proto_tree_add_bits_item(extension_tree, hf_oran_reserved, tvb, bit_offset, reserved_bits, ENC_BIG_ENDIAN0x00000000);
4200 bit_offset += reserved_bits;
4201 }
4202
4203 offset = bit_offset/8;
4204 break;
4205 }
4206
4207 case 6: /* SE 6: Non-contiguous PRB allocation in time and frequency domain */
4208 {
4209 /* numSymbol not used in this case */
4210 if (numsymbol_ti && !numsymbol_ignored) {
4211 proto_item_append_text(numsymbol_ti, " (ignored)");
4212 numsymbol_ignored = true1;
4213 }
4214
4215 /* Will update ext6 recorded info */
4216 ext11_settings.ext6_set = true1;
4217
4218 /* TODO: rb bit must be zero (unless "se6-rb-bit-supported" is set) */
4219
4220 /* repetition (only valid to be set if coupling via frequency and time with priorities (optimized) (7.8.1.5) */
4221 proto_tree_add_bits_item(extension_tree, hf_oran_se6_repetition, tvb, offset*8, 1, ENC_BIG_ENDIAN0x00000000);
4222 /* rbgSize (PRBs per bit set in rbgMask) */
4223 uint32_t rbgSize;
4224 proto_item *rbg_size_ti;
4225 rbg_size_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_rbgSize, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rbgSize);
4226 if (rbgSize == 0) {
4227 /* N.B. this is only true if "se6-rb-bit-supported" is set... */
4228 expert_add_info(pinfo, rbg_size_ti, &ei_oran_rbg_size_reserved);
4229 }
4230 /* rbgMask (28 bits) */
4231 uint32_t rbgMask;
4232 proto_item *rbgmask_ti; // = proto_tree_add_item_ret_uint(extension_tree, hf_oran_rbgMask, tvb, offset, 4, ENC_BIG_ENDIAN, &rbgMask);
4233 offset = dissect_rbg_mask(extension_tree, tvb, offset, &rbgMask, &rbgmask_ti);
4234 if (rbgSize == 0) {
4235 proto_item_append_text(rbgmask_ti, " (value ignored since rbgSize is 0)");
4236 }
4237
4238 /* TODO: if receiver detects non-zero bits outside the valid range, those shall be ignored. */
4239 /* priority (only valid to be set if coupling via frequency and time with priorities (7.8.1.3) */
4240 proto_tree_add_item(extension_tree, hf_oran_noncontig_priority, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4241 /* symbolMask */
4242 offset = dissect_symbolmask(tvb, extension_tree, offset, NULL((void*)0), NULL((void*)0));
4243
4244 /* Look up rbg_size enum -> value */
4245 switch (rbgSize) {
4246 case 0:
4247 /* N.B. reserved, but covered above with expert info (would remain 0) */
4248 /* Might also indicate that rb bit is valid */
4249 break;
4250 case 1:
4251 ext11_settings.ext6_rbg_size = 1; break;
4252 case 2:
4253 ext11_settings.ext6_rbg_size = 2; break;
4254 case 3:
4255 ext11_settings.ext6_rbg_size = 3; break;
4256 case 4:
4257 ext11_settings.ext6_rbg_size = 4; break;
4258 case 5:
4259 ext11_settings.ext6_rbg_size = 6; break;
4260 case 6:
4261 ext11_settings.ext6_rbg_size = 8; break;
4262 case 7:
4263 ext11_settings.ext6_rbg_size = 16; break;
4264 /* N.B., encoded in 3 bits, so no other values are possible */
4265 }
4266
4267 /* Set to looked-up value */
4268 rbgSize = ext11_settings.ext6_rbg_size;
4269
4270 uint32_t lastRbgid = 0;
4271 if (rbgSize != 0) {
4272 /* The O-DU shall not use combinations of startPrbc, numPrbc and rbgSize leading to a value of lastRbgid larger than 27 */
4273 /* i.e., leftmost bit used should not need to go off left end of rbgMask! */
4274 lastRbgid = (uint32_t)ceil((numPrbc + (startPrbc % rbgSize)) / (float)rbgSize) - 1;
4275 if (lastRbgid > 27) {
4276 expert_add_info_format(pinfo, rbg_size_ti, &ei_oran_lastRbdid_out_of_range,
4277 "SE6: rbgSize (%u) not compatible with startPrbc(%u) and numPrbc(%u)",
4278 rbgSize, startPrbc, numPrbc);
4279 break;
4280 }
4281 }
4282
4283 /* Record (and count) which bits are set in rbgMask */
4284 bool_Bool first_seen = false0;
4285 unsigned first_seen_pos=0, last_seen_pos=0;
4286 for (unsigned n=0; n < 28 && ext11_settings.ext6_num_bits_set < 28; n++) {
4287 if ((rbgMask >> n) & 0x01) {
4288 ext11_settings.ext6_bits_set[ext11_settings.ext6_num_bits_set++] = n;
4289 if (!first_seen) {
4290 first_seen = true1;
4291 first_seen_pos = n;
4292 }
4293 last_seen_pos = n;
4294 }
4295 }
4296
4297 /* Show how many bits were set in rbgMask */
4298 proto_item_append_text(rbgmask_ti, " (%u bits set)", ext11_settings.ext6_num_bits_set);
4299 /* Also, that is the range of bits */
4300 if (first_seen) {
4301 proto_item_append_text(rbgmask_ti, " (%u bits spread)", last_seen_pos-first_seen_pos+1);
4302
4303 /* Complain if last set bit is beyond lastRbgid */
4304 if (last_seen_pos > lastRbgid) {
4305 expert_add_info_format(pinfo, rbgmask_ti, &ei_oran_rbgMask_beyond_last_rbdid,
4306 "SE6: rbgMask (0x%07x) has bit %u set, but lastRbgId is %u",
4307 rbgMask, last_seen_pos, lastRbgid);
4308 }
4309 }
4310
4311 /* Also update prbs_for_st10_type5[] */
4312 if (sectionType == 10 && rbgSize != 0) {
4313 /* Unset all entries */
4314 memset(&prbs_for_st10_type5, 0, sizeof(prbs_for_st10_type5));
4315
4316 /* Work out which PRB first bit corresponds to */
4317 unsigned firstPrbStart = (startPrbc/rbgSize) * rbgSize;
4318
4319 /* Add PRBs corresponding to each bit set */
4320 for (unsigned n=0; n < 28 ; n++) {
4321 if ((rbgMask >> n) & 0x01) {
4322 /* Lazy way to clip any values that lie outside of range for section */
4323 for (unsigned p=0; p < rbgSize; p++) {
4324 unsigned start = firstPrbStart + (n*rbgSize);
4325 if ((start+p < MAX_PRBS273) && (start+p >= startPrbc) && (start+p <= startPrbc+numPrbc-1)) {
4326 prbs_for_st10_type5[start+p] = true1;
4327 }
4328 }
4329 }
4330 }
4331 }
4332
4333 break;
4334 }
4335
4336 case 7: /* SE 7: eAxC mask */
4337 /* Allow ST0 to address multiple eAxC_ID values for transmission blanking */
4338 proto_tree_add_item(extension_tree, hf_oran_eAxC_mask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4339 offset += 2;
4340 break;
4341
4342 case 8: /* SE 8: Regularization factor */
4343 {
4344 for (unsigned ueid_index=0; ueid_index < number_of_ueids; ueid_index++) {
4345 /* regularizationFactor (2 bytes) */
4346 proto_item *rf_ti = proto_tree_add_item(extension_tree, hf_oran_regularizationFactor, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4347 proto_item_append_text(rf_ti, " (UeId=%u)", ueids[ueid_index]);
4348 offset += 2;
4349 }
4350 break;
4351 }
4352 case 9: /* SE 9: Dynamic Spectrum Sharing parameters */
4353 /* Technology (1 byte) */
4354 proto_tree_add_item(extension_tree, hf_oran_technology, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4355 offset += 1;
4356 /* Reserved (1 byte) */
4357 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
4358 offset += 1;
4359 break;
4360
4361 case 10: /* SE 10: Group configuration of multiple ports */
4362 {
4363 seen_se10 = true1;
4364
4365 /* beamGroupType */
4366 uint32_t beam_group_type = 0;
4367 proto_item *bgt_ti;
4368 bgt_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_beamGroupType,
4369 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &beam_group_type);
4370 proto_item_append_text(extension_ti, " (%s)", val_to_str_const(beam_group_type, beam_group_type_vals, "Unknown"));
4371
4372 /* numPortc */
4373 proto_tree_add_item_ret_uint(extension_tree, hf_oran_numPortc,
4374 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numPortc);
4375 offset++;
4376
4377 /* Will append all beamId values to extension_ti, regardless of beamGroupType */
4378 unsigned n;
4379
4380 switch (beam_group_type) {
4381 case 0x0: /* common beam */
4382 case 0x1: /* beam matrix indication */
4383 /* Reserved byte */
4384 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
4385 offset++;
4386
4387 /* Explain how entries are allocated */
4388 if (beam_group_type == 0x0) {
4389 proto_item_append_text(extension_ti, " (all %u ueid/Beam entries are %u)", numPortc, ueId);
4390 }
4391 else {
4392 /* 'numPortc' consecutive BeamIds from section header */
4393 proto_item_append_text(extension_ti, " (ueId/beam entries are %u -> %u)", ueId, ueId+numPortc);
4394 }
4395
4396 if (sectionType == 5) {
4397 /* These types are not allowed */
4398 expert_add_info_format(pinfo, bgt_ti, &ei_oran_se10_not_allowed,
4399 "SE10: beamGroupType %u is not allowed for section type 5", beam_group_type);
4400 }
4401 break;
4402
4403 case 0x2: /* beam vector listing */
4404 {
4405 proto_item_append_text(extension_ti, " [ ");
4406
4407 /* Beam listing vector case */
4408 /* Work out how many port beam entries there is room for */
4409 /* Using numPortC as visible in issue 18116 */
4410 for (n=0; n < numPortc; n++) {
4411 /* Port subtree */
4412 proto_item *port_ti = proto_tree_add_item(extension_tree, hf_oran_se10_port,
4413 tvb, offset, 2, ENC_NA0x00000000);
4414 proto_tree *port_tree = proto_item_add_subtree(port_ti, ett_oran_se10_port);
4415
4416 /* 1 reserved bit */
4417 add_reserved_field(port_tree, hf_oran_reserved_1bit, tvb, offset, 1);
4418
4419 /* port beam ID (or UEID) (15 bits) */
4420 uint32_t id;
4421 proto_item *beamid_or_ueid_ti = proto_tree_add_item_ret_uint(port_tree, hf_oran_beamId,
4422 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &id);
4423 proto_item_append_text(beamid_or_ueid_ti, " (or UEId) port #%u", n);
4424 offset += 2;
4425
4426 if (id != 0x7fff) {
4427 if (number_of_ueids < MAX_UEIDS16) {
4428 ueids[number_of_ueids++] = id;
4429 }
4430 }
4431
4432 proto_item_append_text(extension_ti, "%u ", id);
4433 proto_item_append_text(port_ti, " (beam/ueid %u)", id);
4434 }
4435
4436 proto_item_append_text(extension_ti, "]");
4437 break;
4438 }
4439 case 0x3: /* beamId/ueId listing with associated port-list index */
4440 {
4441 proto_item_append_text(extension_ti, " [ ");
4442
4443 if (numPortc > 0) {
4444 /* first portListIndex is outside loop */
4445 uint32_t port_list_index;
4446 proto_item *pli_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_port_list_index, tvb,
4447 offset, 1, ENC_BIG_ENDIAN0x00000000, &port_list_index);
4448 if (port_list_index == 0) {
4449 /* Value 0 is reserved */
4450 expert_add_info(pinfo, pli_ti, &ei_oran_port_list_index_zero);
4451 }
4452 offset += 1;
4453
4454 for (n=0; n < numPortc-1; n++) {
4455 /* Port subtree */
4456 proto_item *port_ti = proto_tree_add_item(extension_tree, hf_oran_se10_port,
4457 tvb, offset, 3, ENC_NA0x00000000);
4458 proto_tree *port_tree = proto_item_add_subtree(port_ti, ett_oran_se10_port);
4459
4460 /* 1 reserved bit */
4461 add_reserved_field(port_tree, hf_oran_reserved_1bit, tvb, offset, 1);
4462
4463 /* port beam ID (or UEID) */
4464 uint32_t id;
4465 proto_item *beamid_or_ueid_ti = proto_tree_add_item_ret_uint(port_tree, hf_oran_beamId,
4466 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &id);
4467 proto_item_append_text(beamid_or_ueid_ti, " port #%u beam ID (or UEId) %u", n, id);
4468 offset += 2;
4469
4470 if (id != 0x7fff) {
4471 if (number_of_ueids < MAX_UEIDS16) {
4472 ueids[number_of_ueids++] = id;
4473 }
4474 }
4475
4476 /* subsequent portListIndex */
4477 pli_ti = proto_tree_add_item_ret_uint(port_tree, hf_oran_port_list_index, tvb,
4478 offset, 1, ENC_BIG_ENDIAN0x00000000, &port_list_index);
4479 if (port_list_index == 0) {
4480 /* Value 0 is reserved */
4481 expert_add_info(pinfo, pli_ti, &ei_oran_port_list_index_zero);
4482 }
4483 offset += 1;
4484
4485 proto_item_append_text(extension_ti, "%u:%u ", port_list_index, id);
4486 proto_item_append_text(port_ti, " (beam/ueid %u, portListIndex %u)", id, port_list_index);
4487 }
4488 }
4489
4490 proto_item_append_text(extension_ti, "]");
4491 break;
4492 }
4493
4494
4495 default:
4496 /* Warning for unsupported/reserved value */
4497 expert_add_info(NULL((void*)0), bgt_ti, &ei_oran_se10_unknown_beamgrouptype);
4498 break;
4499 }
4500 break;
4501 }
4502
4503 case 11: /* SE 11: Flexible Weights Extension Type */
4504 {
4505 /* Hidden filter for bf */
4506 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
4507 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
4508
4509 /* beamId in section header should be ignored. Guard against appending multiple times.. */
4510 if (section_beamId_ti && !section_beamId_ignored) {
4511 proto_item_append_text(section_beamId_ti, " (ignored)");
4512 section_beamId_ignored = true1;
4513 }
4514
4515 bool_Bool disableBFWs;
4516 uint32_t numBundPrb;
4517 bool_Bool rad;
4518
4519 /* disableBFWs */
4520 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_disable_bfws,
4521 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &disableBFWs);
4522 if (disableBFWs) {
4523 proto_item_append_text(extension_ti, " (disableBFWs)");
4524 }
4525
4526 /* RAD */
4527 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_rad,
4528 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rad);
4529 /* bundleOffset (6 bits) */
4530 proto_tree_add_item(extension_tree, hf_oran_bundle_offset, tvb,
4531 offset, 1, ENC_BIG_ENDIAN0x00000000);
4532 offset++;
4533
4534 /* numBundPrb (number of prbs in each bundle) */
4535 proto_item *num_bund_prb_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_bund_prbs,
4536 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numBundPrb);
4537 offset++;
4538 /* value zero is reserved.. */
4539 if (numBundPrb == 0) {
4540 expert_add_info(pinfo, num_bund_prb_ti, &ei_oran_reserved_numBundPrb);
4541 }
4542
4543 uint32_t num_bundles;
4544 bool_Bool orphaned_prbs = false0;
4545
4546 /* N.B. glibly assuming that Mu=1 */
4547 uint32_t symbol_count = (frameId*20 + slotId) * 14 + startSymbolId;
4548
4549 if (!disableBFWs) {
4550 /********************************************/
4551 /* Table 7.7.11.1-1 */
4552 /* Weights are present */
4553 /********************************************/
4554
4555 uint32_t bfwcomphdr_iq_width, bfwcomphdr_comp_meth;
4556 proto_item *comp_meth_ti = NULL((void*)0);
4557
4558 /* bfwCompHdr (2 subheaders - bfwIqWidth and bfwCompMeth)*/
4559 offset = dissect_bfwCompHdr(tvb, extension_tree, offset,
4560 &bfwcomphdr_iq_width, &bfwcomphdr_comp_meth, &comp_meth_ti);
4561
4562 /* Work out number of bundles, but take care not to divide by zero. */
4563 if (numBundPrb == 0) {
4564 break;
4565 }
4566
4567 /* Work out bundles! */
4568 /* TODO: assuming that these modifying SEs appear before SE 11, but not sure that this is guaranteed?! */
4569 ext11_work_out_bundles(startPrbc, numPrbc, numBundPrb, &ext11_settings);
4570 num_bundles = ext11_settings.num_bundles;
4571
4572 /* Add (complete) bundles */
4573 for (unsigned b=0; b < num_bundles; b++) {
4574 offset = dissect_bfw_bundle(tvb, extension_tree, pinfo, offset,
4575 comp_meth_ti, bfwcomphdr_comp_meth,
4576 NULL((void*)0) /* no ModCompr */,
4577 (ext11_settings.ext21_set) ?
4578 numPrbc :
4579 pref_num_bf_antennas,
4580 bfwcomphdr_iq_width,
4581 b, /* bundle number */
4582 &ext11_settings.bundles[b],
4583 symbol_count,
4584 (link_planes_together && data_section) ? &data_section->details[index_to_use] : NULL((void*)0),
4585 tap_info);
4586 if (!offset) {
4587 break;
4588 }
4589 }
4590 if (num_bundles > 0) {
4591 /* Set flag from last bundle entry */
4592 orphaned_prbs = ext11_settings.bundles[num_bundles-1].is_orphan;
4593 }
4594 }
4595 else {
4596 /********************************************/
4597 /* Table 7.7.11.1-2 */
4598 /* No weights in this case */
4599 /********************************************/
4600
4601 /* Work out number of bundles, but take care not to divide by zero. */
4602 if (numBundPrb == 0) {
4603 break;
4604 }
4605
4606 ext11_work_out_bundles(startPrbc, numPrbc, numBundPrb, &ext11_settings);
4607 num_bundles = ext11_settings.num_bundles;
4608
4609 for (unsigned n=0; n < num_bundles; n++) {
4610 uint32_t first_prb = ext11_settings.bundles[n].start;
4611 uint32_t last_prb = ext11_settings.bundles[n].end;
4612
4613 /* Still create a bundle subtree */
4614 proto_item *bundle_ti = proto_tree_add_string_format(extension_tree, hf_oran_bfw_bundle,
4615 tvb, offset, 2, "",
4616 "Bundle: (PRBs %3u-%3u)",
4617 first_prb, last_prb);
4618 proto_tree *bundle_tree = proto_item_add_subtree(bundle_ti, ett_oran_bfw_bundle);
4619
4620 /* contInd */
4621 proto_tree_add_item(bundle_tree, hf_oran_cont_ind,
4622 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4623 /* beamId */
4624 /* N.B., only added to tap_info if not 0 or ignored (after SEs seen) */
4625 uint32_t beam_id;
4626 proto_item *beamid_ti = proto_tree_add_item_ret_uint(bundle_tree, hf_oran_beam_id,
4627 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &beam_id);
4628 proto_item_append_text(bundle_ti, " (beamId:%u)", beam_id);
4629
4630
4631 if (!ext11_settings.bundles[n].is_orphan) {
4632 proto_item_append_text(beamid_ti, " (PRBs %3u-%3u) (Bundle %2u)",
4633 ext11_settings.bundles[n].start,
4634 ext11_settings.bundles[n].end,
4635 n);
4636 }
4637 else {
4638 orphaned_prbs = true1;
4639 proto_item_append_text(beamid_ti, " (PRBs %3u-%3u) (Orphaned PRBs)",
4640 ext11_settings.bundles[n].start,
4641 ext11_settings.bundles[n].end);
4642 proto_item_append_text(bundle_ti, " (Orphaned PRBs)");
4643 }
4644 offset += 2;
4645
4646 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
4647 if (data_section) {
4648 /* Set beamId only for range of PRBs */
4649 for (unsigned prb = ext11_settings.bundles[n].start; prb <= ext11_settings.bundles[n].end && prb < ORAN_MAX_PRBS273; prb++) {
4650 section_details_set_beam_id(&data_section->details[index_to_use], prb, (uint16_t)beam_id);
4651 }
4652 }
4653 }
4654
4655 /* Look for where BFWs were sent for this beamId */
4656 bfw_definition *definition;
4657
4658 wmem_tree_key_t key[3];
4659 key[0].length = 1;
4660 key[0].key = &pinfo->num;
4661 key[1].length = 1;
4662 key[1].key = &beam_id;
4663 key[2].length = 0;
4664 key[2].key = NULL((void*)0);
4665
4666 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
4667 /* Look up current result */
4668 definition = wmem_tree_lookup32(dl_beam_ids_defined, beam_id);
4669 if (definition != NULL((void*)0)) {
4670 /* Add to results table for this frame */
4671 wmem_tree_insert32_array(dl_beam_ids_results, key, definition);
4672 }
4673 }
4674 else {
4675 /* Look up from result table */
4676 definition = wmem_tree_lookup32_array(dl_beam_ids_results, key);
4677 }
4678
4679 /* Show link back to frame where/when beamId was defined. Allow linking to self */
4680 if (definition && definition->frame_defined != 0) {
4681 proto_item *defined_ti = proto_tree_add_uint(bundle_tree, hf_oran_bfws_frame_defined, tvb, offset, 0, definition->frame_defined);
4682 proto_item_set_generated(defined_ti);
4683 proto_item *since_ti = proto_tree_add_uint(bundle_tree, hf_oran_bfws_symbols_since_defined, tvb, offset, 0,
4684 symbol_count - definition->symbol_when_defined);
4685 proto_item_set_generated(since_ti);
4686 }
4687 else {
4688 /* TODO: lookup needs to find beam if it was defined in this frame!! */
4689 expert_add_info_format(NULL((void*)0), beamid_ti, &ei_oran_beamid_bfws_not_found,
4690 "ext11 for beamId %u and disableBFWs set, but can't find definition", beam_id);
4691 }
4692 }
4693
4694 }
4695
4696 /* Add summary to extension root */
4697 if (orphaned_prbs) {
4698 proto_item_append_text(extension_ti, " (%u full bundles + orphaned)", num_bundles-1);
4699 }
4700 else {
4701 proto_item_append_text(extension_ti, " (%u bundles)", num_bundles);
4702 }
4703 }
4704
4705 break;
4706
4707 case 12: /* SE 12: Non-Contiguous PRB Allocation with Frequency Ranges */
4708 {
4709 /* numSymbol not used in this case */
4710 if (numsymbol_ti && !numsymbol_ignored) {
4711 proto_item_append_text(numsymbol_ti, " (ignored)");
4712 numsymbol_ignored = true1;
4713 }
4714
4715 /* rb must be zero if this SE is present */
4716 if (rb != 0) {
4717 expert_add_info(NULL((void*)0), rb_ti, &ei_oran_se12_rb_set);
4718 }
4719
4720 ext11_settings.ext12_set = true1;
4721
4722 /* priority */
4723 proto_tree_add_item(extension_tree, hf_oran_noncontig_priority, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4724
4725 /* symbolMask */
4726 offset = dissect_symbolmask(tvb, extension_tree, offset, NULL((void*)0), NULL((void*)0));
4727
4728 /* There are now 'R' pairs of (offStartPrb, numPrb) values. Fill extlen bytes with values. If last one is not set,
4729 should be populated with 0s. */
4730 uint32_t extlen_remaining_bytes = (extlen*4) - 4;
4731 uint8_t prb_index;
4732
4733 /* This is for ST10/ST11. First pair starts after frames signalled there */
4734 uint16_t st10_st11_offset = startPrbc + numPrbc;
4735
4736 for (prb_index = 1; extlen_remaining_bytes > 0; prb_index++)
4737 {
4738 /* Create a subtree for each pair */
4739 proto_item *pair_ti = proto_tree_add_string(extension_tree, hf_oran_frequency_range,
4740 tvb, offset, 2, "");
4741 proto_tree *pair_tree = proto_item_add_subtree(pair_ti, ett_oran_frequency_range);
4742
4743 /* offStartPrb */
4744 uint32_t off_start_prb;
4745 proto_tree_add_item_ret_uint(pair_tree, hf_oran_off_start_prb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &off_start_prb);
4746 offset++;
4747
4748 /* numPrb */
4749 uint32_t num_prb;
4750 proto_tree_add_item_ret_uint(pair_tree, hf_oran_num_prb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_prb);
4751 offset++;
4752
4753 extlen_remaining_bytes -= 2;
4754
4755 /* Last pair may be 0,0 if not used. Check for this */
4756 if ((extlen_remaining_bytes == 0) && (off_start_prb == 0) && (num_prb == 0)) {
4757 proto_item_append_text(pair_ti, " (not used)");
4758 }
4759 /* Add summary to pair root item, and configure details in ext11_settings */
4760 else {
4761 proto_item_append_text(pair_ti, "(%u) [%u : %u]",
4762 prb_index, off_start_prb, num_prb);
4763 proto_item_append_text(extension_ti, "[%u : %u]",
4764 off_start_prb, num_prb);
4765 if (ext11_settings.ext12_num_pairs < MAX_BFW_EXT12_PAIRS128) {
4766 ext11_settings.ext12_pairs[ext11_settings.ext12_num_pairs].off_start_prb = off_start_prb;
4767 ext11_settings.ext12_pairs[ext11_settings.ext12_num_pairs++].num_prb = num_prb;
4768 }
4769
4770 /* Also update PRBs to be covered for ST10 type 5 */
4771 /* Original range from section is added to.. */
4772 /* TODO: I don't think this is quite right.. */
4773 for (unsigned prb=st10_st11_offset+off_start_prb; prb < st10_st11_offset+off_start_prb+num_prb; prb++) {
4774 if (prb < MAX_PRBS273) {
4775 prbs_for_st10_type5[prb] = true1;
4776 }
4777 }
4778
4779 /* Any next pair will begin after this one */
4780 st10_st11_offset += (off_start_prb + num_prb);
4781 }
4782 }
4783 break;
4784 }
4785
4786 case 13: /* SE 13: PRB Allocation with Frequency Hopping */
4787 {
4788 /* Will update settings for ext11 */
4789 ext11_settings.ext13_set = true1;
4790
4791 uint32_t extlen_remaining_bytes = (extlen*4) - 2;
4792 uint8_t allocation_index;
4793
4794 unsigned prev_next_symbol_id = 0, prev_next_start_prbc = 0;
4795
4796 for (allocation_index = 1; extlen_remaining_bytes > 0; allocation_index++)
4797 {
4798 /* Subtree for allocation */
4799 proto_item *allocation_ti = proto_tree_add_string(extension_tree, hf_oran_prb_allocation,
4800 tvb, offset, 2, "");
4801 proto_tree *allocation_tree = proto_item_add_subtree(allocation_ti, ett_oran_prb_allocation);
4802
4803 /* Reserved (2 bits) */
4804 add_reserved_field(allocation_tree, hf_oran_reserved_2bits, tvb, offset, 1);
4805
4806 /* nextSymbolId (4 bits) */
4807 uint32_t next_symbol_id;
4808 proto_tree_add_item_ret_uint(allocation_tree, hf_oran_nextSymbolId, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &next_symbol_id);
4809
4810 /* nextStartPrbc (10 bits) */
4811 uint32_t next_start_prbc;
4812 proto_tree_add_item_ret_uint(allocation_tree, hf_oran_nextStartPrbc, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &next_start_prbc);
4813 offset += 2;
4814
4815 /* Add summary to allocation root item */
4816 proto_item_append_text(allocation_ti, "(%u) nextSymbolId=%3u, nextStartPrbc=%u",
4817 allocation_index, next_symbol_id, next_start_prbc);
4818
4819 /* Checking for duplicates (expected if e.g. had only 2 entries but extlen bytes still to fill */
4820 if ((allocation_index > 1) && (next_symbol_id == prev_next_symbol_id) && (next_start_prbc == prev_next_start_prbc)) {
4821 proto_item_append_text(allocation_ti, " (repeated - to fill up extlen)");
4822 }
4823 else {
4824 /* Add entry for configuring ext11. don't store out of range */
4825 if (ext11_settings.ext13_num_start_prbs < MAX_BFW_EXT13_ALLOCATIONS128) {
4826 ext11_settings.ext13_start_prbs[ext11_settings.ext13_num_start_prbs++] = next_start_prbc;
4827 }
4828 }
4829 prev_next_symbol_id = next_symbol_id;
4830 prev_next_start_prbc = next_start_prbc;
4831
4832 extlen_remaining_bytes -= 2;
4833 }
4834 break;
4835 }
4836
4837 case 14: /* SE 14: Nulling-layer Info. for ueId-based beamforming */
4838 /* Hidden filter for bf (DMRS BF) */
4839 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
4840 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
4841
4842 if (!seen_se10) {
4843 proto_tree_add_item(extension_tree, hf_oran_nullLayerInd, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4844 offset += 1;
4845 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
4846 offset += 1;
4847 }
4848 else {
4849 /* Loop over numPortc++1 (from SE 10) nullLayerInd fields */
4850 for (unsigned port=0; port < numPortc+1; port++) {
4851 proto_tree_add_item(extension_tree, hf_oran_nullLayerInd, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4852 offset += 1;
4853 }
4854 }
4855 break;
4856
4857 case 15: /* SE 15: Mixed-numerology Info. for ueId-based beamforming */
4858 {
4859 /* frameStructure */
4860 offset = dissect_frame_structure(extension_tree, tvb, offset,
4861 subframeId, slotId);
4862 /* freqOffset */
4863 proto_tree_add_item(extension_tree, hf_oran_freqOffset, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000);
4864 offset += 3;
4865 /* cpLength */
4866 proto_item *cplength_ti = proto_tree_add_item(extension_tree, hf_oran_cpLength, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4867 if (sectionType != 0 && sectionType != 3) {
4868 proto_item_append_text(cplength_ti, " (ignored - used only with ST0 and ST3)");
4869 }
4870 offset += 2;
4871 break;
4872 }
4873
4874 case 16: /* SE 16: Antenna mapping in UE channel information based UL beamforming */
4875 {
4876 /* One entry for each UEId */
4877 for (unsigned n=0; n < number_of_ueids; n++) {
4878 /* TODO: want to skip if ueId is 0x7fff and beamGroupType = 10b and 'non-scheduled-ueId-enabled'=TRUE */
4879 /* antMask */
4880 proto_item *ti = proto_tree_add_item(extension_tree, hf_oran_antMask, tvb, offset, 8, ENC_BIG_ENDIAN0x00000000);
4881 proto_item_append_text(ti, " (RX eAxC #%u, UEId=%u)", n+1, ueids[n]);
4882 offset += 8;
4883 }
4884 break;
4885 }
4886
4887 case 17: /* SE 17: Indication of user port group. Applies to ST5 + SE10 with group type 1 (beam matrix indication) */
4888 {
4889 uint32_t extlen_remaining_bytes = (extlen*4) - 2;
4890 uint32_t end_bit = (offset+extlen_remaining_bytes) * 8;
4891 uint32_t ueid_index = 1;
4892
4893 /* "the preceding Section Type and extension messages implicitly provide the number of scheduled users" */
4894 for (uint32_t bit_offset=offset*8; (bit_offset < end_bit) && (ueid_index <= number_of_ueids); bit_offset+=4, ueid_index++) {
4895 /* numUeId (Number of UE Ids per user) */
4896 proto_item *ti = proto_tree_add_bits_item(extension_tree, hf_oran_num_ueid, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000);
4897 /* TODO: show ueids[ueid_index] here too? */
4898 proto_item_append_text(ti, " (user #%u)", ueid_index);
4899 }
4900 break;
4901 }
4902
4903 case 18: /* SE 18: Uplink transmission management */
4904 /* transmissionWindowOffset */
4905 proto_tree_add_item(extension_tree, hf_oran_transmissionWindowOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4906 offset += 2;
4907 /* reserved (2 bits) */
4908 add_reserved_field(extension_tree, hf_oran_reserved_2bits, tvb, offset, 1);
4909 /* transmissionWindowSize (14 bits) */
4910 proto_tree_add_item(extension_tree, hf_oran_transmissionWindowSize, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4911 offset += 2;
4912
4913 /* reserved (6 bits) */
4914 add_reserved_field(extension_tree, hf_oran_reserved_6bits, tvb, offset, 1);
4915 /* toT (2 bits) */
4916 proto_tree_add_item(extension_tree, hf_oran_toT, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4917 offset += 1;
4918 break;
4919
4920 case 19: /* SE 19: Compact beamforming information for multiple port */
4921 {
4922 /* beamId in section header should be ignored. Guard against appending multiple times.. */
4923 if (section_beamId_ti && !section_beamId_ignored) {
4924 proto_item_append_text(section_beamId_ti, " (ignored)");
4925 section_beamId_ignored = true1;
4926 }
4927
4928 /* numSymbol not used in this case */
4929 if (numsymbol_ti && !numsymbol_ignored) {
4930 proto_item_append_text(numsymbol_ti, " (ignored)");
4931 numsymbol_ignored = true1;
4932 }
4933
4934 /* disableBFWs */
4935 bool_Bool disableBFWs;
4936 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_disable_bfws,
4937 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &disableBFWs);
4938 if (disableBFWs) {
4939 proto_item_append_text(extension_ti, " (disableBFWs)");
4940 }
4941 /* repetition (1 bit) */
4942 uint64_t repetition;
4943 proto_tree_add_bits_ret_val(extension_tree, hf_oran_se19_repetition, tvb, (offset*8)+1, 1, &repetition, ENC_BIG_ENDIAN0x00000000);
4944 /* numPortc (6 bits) */
4945 proto_tree_add_item_ret_uint(extension_tree, hf_oran_numPortc,
4946 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numPortc);
4947 offset++;
4948
4949 /* priority (2 bits) */
4950 proto_tree_add_item(extension_tree, hf_oran_noncontig_priority, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4951 /* symbolMask (14 bits) */
4952 offset = dissect_symbolmask(tvb, extension_tree, offset, NULL((void*)0), NULL((void*)0));
4953
4954 uint32_t bfwcomphdr_iq_width, bfwcomphdr_comp_meth;
4955 proto_item *comp_meth_ti = NULL((void*)0);
4956
4957 if (!repetition) {
4958
4959 if (!disableBFWs) {
4960 /* bfwCompHdr */
4961 offset = dissect_bfwCompHdr(tvb, extension_tree, offset,
4962 &bfwcomphdr_iq_width, &bfwcomphdr_comp_meth, &comp_meth_ti);
4963 }
4964
4965 /* Add entries for each port */
4966 for (unsigned port=0; port < numPortc; port++) {
4967
4968 /* Create subtree for port entry*/
4969 int port_start_offset = offset;
4970 proto_item *port_ti = proto_tree_add_string_format(extension_tree, hf_oran_ext19_port,
4971 tvb, offset, 0,
4972 "", "Port %u: ", port);
4973 proto_tree *port_tree = proto_item_add_subtree(port_ti, ett_oran_ext19_port);
4974
4975 /* Reserved (4 bits) */
4976 add_reserved_field(port_tree, hf_oran_reserved_4bits, tvb, offset, 1);
4977 /* portReMask (12 bits) */
4978 proto_tree_add_item(port_tree, hf_oran_portReMask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4979 offset += 2;
4980
4981 /* Reserved (2 bits) */
4982 add_reserved_field(port_tree, hf_oran_reserved_2bits, tvb, offset, 1);
4983 /* portSymbolMask (14 bits) */
4984 proto_tree_add_item(port_tree, hf_oran_portSymbolMask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4985 offset += 2;
4986
4987 /* Reserved (1 bit) */
4988 add_reserved_field(port_tree, hf_oran_reserved_1bit, tvb, offset, 1);
4989 /* beamID (15 bits) */
4990 uint16_t beamId;
4991 proto_tree_add_item_ret_uint16(port_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &beamId);
4992 proto_item_append_text(port_ti, " (beamId=%u)", beamId);
4993 offset += 2;
4994
4995 /* No weights present */
4996 if (!disableBFWs) {
4997 /*******************************************************************/
4998 /* Table 7.7.19.1-1 (there is no part -2 for disableBFWs case...), */
4999 /* but for SE 11, bfwCompParam was only present for !disableBFWs */
5000 /*******************************************************************/
5001
5002 /* bfwCompParam */
5003 bool_Bool compression_method_supported = false0;
5004 uint32_t exponent = 0;
5005 unsigned num_trx_entries = 0;
5006 uint16_t *trx;
5007 offset = dissect_bfwCompParam(tvb, port_tree, pinfo, offset, comp_meth_ti,
5008 &bfwcomphdr_comp_meth, &exponent, &compression_method_supported,
5009 &num_trx_entries, &trx);
5010
5011 int bit_offset = offset*8;
5012 int bfw_offset;
5013
5014 /* Add weights for each TRX */
5015 unsigned trx_to_add = (num_trx_entries==0) ? pref_num_bf_antennas : num_trx_entries;
5016 for (unsigned b=0; b < trx_to_add; b++) {
5017
5018 uint16_t trx_index = (num_trx_entries) ? trx[b] : b+1;
5019
5020 /* Create BFW subtree */
5021 bfw_offset = bit_offset / 8;
5022 uint8_t bfw_extent = ((bit_offset + (bfwcomphdr_iq_width*2)) / 8) - bfw_offset;
5023 proto_item *bfw_ti = proto_tree_add_string_format(port_tree, hf_oran_bfw,
5024 tvb, bfw_offset, bfw_extent,
5025 "", "TRX %u: (", trx_index);
5026 proto_tree *bfw_tree = proto_item_add_subtree(bfw_ti, ett_oran_bfw);
5027
5028 /* I */
5029 uint32_t bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
5030 float value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent, NULL((void*)0) /* no ModCompr */, 0 /* RE */);
5031 /* Add to tree. */
5032 proto_tree_add_float_format_value(bfw_tree, hf_oran_bfw_i, tvb, bit_offset/8,
5033 (bfwcomphdr_iq_width+7)/8, value, "#%u=%f", b, value);
5034 bit_offset += bfwcomphdr_iq_width;
5035 proto_item_append_text(bfw_ti, "I%u=%f ", b, value);
5036
5037 /* Q */
5038 bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
5039 value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent, NULL((void*)0) /* no ModCompr */, 0 /* RE */);
5040 /* Add to tree. */
5041 proto_tree_add_float_format_value(bfw_tree, hf_oran_bfw_q, tvb, bit_offset/8,
5042 (bfwcomphdr_iq_width+7)/8, value, "#%u=%f", b, value);
5043 bit_offset += bfwcomphdr_iq_width;
5044 proto_item_append_text(bfw_ti, "Q%u=%f)", b, value);
5045 }
5046
5047 offset = (bit_offset+7)/8;
5048 }
5049 else {
5050 /* No weights... */
5051 }
5052
5053 /* Set length of this port entry */
5054 proto_item_set_len(port_ti, offset-port_start_offset);
5055 }
5056 }
5057 break;
5058 }
5059
5060 case 20: /* SE 20: Puncturing extension */
5061 {
5062 /* numPuncPatterns */
5063 uint32_t numPuncPatterns;
5064 proto_tree_add_item_ret_uint(extension_tree, hf_oran_numPuncPatterns, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numPuncPatterns);
5065 offset += 1;
5066
5067 /* Add each puncturing pattern */
5068 for (uint32_t n=0; n < numPuncPatterns; n++) {
5069 unsigned pattern_start_offset = offset;
5070
5071 /* Subtree for this puncturing pattern */
5072 proto_item *pattern_ti = proto_tree_add_string_format(extension_tree, hf_oran_puncPattern,
5073 tvb, offset, 0,
5074 "", "Puncturing Pattern: %u/%u", n+1, numPuncPatterns);
5075 proto_tree *pattern_tree = proto_item_add_subtree(pattern_ti, ett_oran_punc_pattern);
5076
5077 /* SymbolMask (14 bits) */
5078 proto_tree_add_item(pattern_tree, hf_oran_symbolMask_ext20, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5079 offset += 1;
5080
5081 uint32_t startPuncPrb, numPuncPrb;
5082
5083 /* startPuncPrb (10 bits) */
5084 proto_tree_add_item_ret_uint(pattern_tree, hf_oran_startPuncPrb, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPuncPrb);
5085 offset += 2;
5086 /* numPuncPrb (8 bits) */
5087 proto_tree_add_item_ret_uint(pattern_tree, hf_oran_numPuncPrb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numPuncPrb);
5088 offset += 1;
5089
5090 proto_item_append_text(pattern_ti, " [%u->%u]", startPuncPrb, startPuncPrb+numPuncPrb-1);
5091
5092 /* Make a hole in range of PRBs to report */
5093 for (unsigned p=startPuncPrb; p < startPuncPrb+numPuncPrb; p++) {
5094 if (p < MAX_PRBS273) {
5095 prbs_for_st10_type5[p] = false0;
5096 }
5097 }
5098
5099 /* puncReMask (12 bits) */
5100 proto_tree_add_item(pattern_tree, hf_oran_puncReMask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5101 offset += 1;
5102 /* rb (1 bit) */
5103 proto_item *se20_rb_ti = proto_tree_add_item(pattern_tree, hf_oran_rb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5104 /* reserved (1 bit) */
5105 add_reserved_field(pattern_tree, hf_oran_reserved_bit5, tvb, offset, 1);
5106 /* multiSDScope (1 bit) */
5107 proto_tree_add_item(pattern_tree, hf_oran_multiSDScope, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5108 /* rbgIncl (1 bit) */
5109 bool_Bool rbgIncl;
5110 proto_tree_add_item_ret_boolean(pattern_tree, hf_oran_RbgIncl, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rbgIncl);
5111 offset += 1;
5112
5113 if (rbgIncl) {
5114 /* reserved (1 bit) */
5115 add_reserved_field(pattern_tree, hf_oran_reserved_1bit, tvb, offset, 1);
5116 /* rbgSize(3 bits) */
5117 proto_tree_add_item(pattern_tree, hf_oran_rbgSize, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5118 /* rbgMask (28 bits) */
5119 proto_item *rbgmask_ti;
5120 uint32_t rbgMask;
5121 offset = dissect_rbg_mask(pattern_tree, tvb, offset, &rbgMask, &rbgmask_ti);
5122
5123 proto_item_append_text(se20_rb_ti, " (ignored)");
5124 }
5125
5126 proto_item_set_len(pattern_ti, offset-pattern_start_offset);
5127 }
5128
5129 break;
5130 }
5131 case 21: /* SE 21: Variable PRB group size for channel information */
5132 {
5133 /* ciPrbGroupSize */
5134 uint32_t ci_prb_group_size;
5135 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);
5136 offset += 1;
5137
5138 switch (ci_prb_group_size) {
5139 case 0:
5140 case 1:
5141 case 255:
5142 /* Reserved value */
5143 expert_add_info_format(pinfo, prb_group_size_ti, &ei_oran_ci_prb_group_size_reserved,
5144 "SE 11 ciPrbGroupSize is reserved value %u - must be 2-254",
5145 ci_prb_group_size);
5146 break;
5147 default:
5148 /* This value affects how SE 11 is interpreted */
5149 ext11_settings.ext21_set = true1;
5150 ext11_settings.ext21_ci_prb_group_size = ci_prb_group_size;
5151
5152 if (numPrbc == 0) {
5153 expert_add_info(pinfo, numprbc_ti, &ei_oran_numprbc_ext21_zero);
5154 }
5155 break;
5156 }
5157
5158 /* reserved (6 bits) */
5159 add_reserved_field(extension_tree, hf_oran_reserved_6bits, tvb, offset, 1);
5160
5161 /* prgSize (2 bits). Interpretation depends upon section type (5 or 6), but also mplane parameters? */
5162 if (sectionType == SEC_C_UE_SCHED) { /* Section Type 5 */
5163 proto_tree_add_item(extension_tree, hf_oran_prg_size_st5, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5164 }
5165 else if (sectionType == SEC_C_CH_INFO) { /* Section Type 6 */
5166 proto_tree_add_item(extension_tree, hf_oran_prg_size_st6, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5167 }
5168 offset += 1;
5169 break;
5170 }
5171
5172 case 22: /* SE 22: ACK/NACK request */
5173 {
5174 uint32_t ack_nack_req_id;
5175 proto_tree_add_item_ret_uint(extension_tree, hf_oran_ack_nack_req_id, tvb, offset, 2,
5176 ENC_BIG_ENDIAN0x00000000, &ack_nack_req_id);
5177 offset += 2;
5178
5179 if (state) {
5180 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
5181 /* Add this request into conversation state on first pass */
5182 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)))
;
5183 request_details->request_frame_number = pinfo->num;
5184 request_details->request_frame_time = pinfo->abs_ts;
5185 request_details->requestType = SE22;
5186 /* Insert into flow's tree */
5187 wmem_tree_insert32(state->ack_nack_requests, ack_nack_req_id, request_details);
5188 }
5189 else {
5190 /* Try to link forward to ST8 response */
5191 ack_nack_request_t *response = wmem_tree_lookup32(state->ack_nack_requests,
5192 ack_nack_req_id);
5193 if (response) {
5194 show_link_to_acknack_response(extension_tree, tvb, pinfo, response);
5195 }
5196 }
5197 }
5198 break;
5199 }
5200
5201 case 23: /* SE 23: Arbitrary symbol pattern modulation compression parameters */
5202 {
5203 /* Green common header */
5204
5205 /* numSymPrbPattern (4 bits) */
5206 uint32_t num_sym_prb_pattern;
5207 proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_sym_prb_pattern, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_sym_prb_pattern);
5208 /* reserved (3 bits) */
5209 add_reserved_field(extension_tree, hf_oran_reserved_bits456, tvb, offset, 1);
5210 /* prbMode (1 bit) */
5211 bool_Bool prb_mode;
5212 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_prb_mode, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &prb_mode);
5213 offset += 1;
5214
5215 /* reserved (8 bits) */
5216 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
5217 offset += 1;
5218
5219 /* Dissect each SymPrbPattern */
5220 for (uint32_t n=0; n < num_sym_prb_pattern; n++) {
5221
5222 /* Subtree */
5223 proto_item *pattern_ti = proto_tree_add_string_format(extension_tree, hf_oran_sym_prb_pattern,
5224 tvb, offset, 1, "",
5225 prb_mode ? "PRB-BLOCK" : "PRB-MASK");
5226 proto_tree *pattern_tree = proto_item_add_subtree(pattern_ti, ett_oran_sym_prb_pattern);
5227
5228
5229 /* Orange part */
5230
5231 /* Reserved (2 bits) */
5232 add_reserved_field(pattern_tree, hf_oran_reserved_2bits, tvb, offset, 1);
5233 /* symMask (14 bits) */
5234 proto_tree_add_item(pattern_tree, hf_oran_sym_mask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5235 offset += 2;
5236 /* numMcScaleOffset (4 bits) */
5237 uint32_t numMcScaleOffset;
5238 proto_tree_add_item_ret_uint(pattern_tree, hf_oran_num_mc_scale_offset, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numMcScaleOffset);
5239
5240 if (!prb_mode) { /* PRB-MASK */
5241 /* prbPattern (4 bits) */
5242 proto_tree_add_item(pattern_tree, hf_oran_prb_pattern, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5243 offset += 1;
5244 /* reserved (8 bits) */
5245 add_reserved_field(pattern_tree, hf_oran_reserved_8bits, tvb, offset, 1);
5246 offset += 1;
5247 /* reserved (4 bits) */
5248 add_reserved_field(pattern_tree, hf_oran_reserved_4bits, tvb, offset, 1);
5249 }
5250 else { /* PRB-BLOCK */
5251 /* prbBlkOffset (8 bits) */
5252 proto_tree_add_item(pattern_tree, hf_oran_prb_blk_offset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5253 offset += 1;
5254 /* prbBlkSize (8 bits) */
5255 proto_tree_add_item(pattern_tree, hf_oran_prb_blk_size, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5256 offset += 1;
5257 }
5258
5259 for (unsigned c=0; c < numMcScaleOffset; c++) {
5260 if (c > 0) {
5261 /* reserved (4 bits) */
5262 add_reserved_field(pattern_tree, hf_oran_reserved_4bits, tvb, offset, 1);
5263 }
5264
5265 static int * const remask_flags_even[] = {
5266 &hf_oran_mc_scale_re_mask_re1_even,
5267 &hf_oran_mc_scale_re_mask_re2_even,
5268 &hf_oran_mc_scale_re_mask_re3_even,
5269 &hf_oran_mc_scale_re_mask_re4_even,
5270 &hf_oran_mc_scale_re_mask_re5_even,
5271 &hf_oran_mc_scale_re_mask_re6_even,
5272 &hf_oran_mc_scale_re_mask_re7_even,
5273 &hf_oran_mc_scale_re_mask_re8_even,
5274 &hf_oran_mc_scale_re_mask_re9_even,
5275 &hf_oran_mc_scale_re_mask_re10_even,
5276 &hf_oran_mc_scale_re_mask_re11_even,
5277 &hf_oran_mc_scale_re_mask_re12_even,
5278 NULL((void*)0)
5279 };
5280
5281 /* mcScaleReMask (12 bits). Defines which REs the following csf and mcScaleOffset apply to */
5282 uint64_t mcScaleReMask, mcScaleOffset;
5283 proto_tree_add_bitmask_ret_uint64(pattern_tree, tvb, offset,
5284 hf_oran_mc_scale_re_mask_even,
5285 ett_oran_mc_scale_remask,
5286 remask_flags_even, ENC_BIG_ENDIAN0x00000000, &mcScaleReMask);
5287 offset += 2;
5288
5289 /* csf (1 bit) */
5290 bool_Bool csf;
5291 dissect_csf(pattern_tree, tvb, offset*8, ci_iq_width, &csf);
5292 /* mcScaleOffset (15 bits) */
5293 proto_item *ti = proto_tree_add_bits_ret_val(pattern_tree, hf_oran_mc_scale_offset, tvb, offset*8 + 1, 15, &mcScaleOffset, ENC_BIG_ENDIAN0x00000000);
5294 uint16_t exponent = (mcScaleOffset >> 11) & 0x000f; /* m.s. 4 bits */
5295 uint16_t mantissa = mcScaleOffset & 0x07ff; /* l.s. 11 bits */
5296 float mcScaleOffset_value = ((float)mantissa/(1<<11)) * ((float)1.0 / (1 << exponent));
5297 proto_item_append_text(ti, " (%f)", mcScaleOffset_value);
5298
5299 offset += 2;
5300
5301 /* Record this config. */
5302 /* TODO: at some point, will also want to store/use PRB + symbol filters */
5303 section_mod_compr_config_t* sect_config = get_mod_compr_section_to_write(pinfo, state, sectionId);
5304
5305 if (sect_config && sect_config->num_configs < MAX_MOD_COMPR_CONFIGS12) {
5306 unsigned i = sect_config->num_configs;
5307 sect_config->configs[i].mod_compr_re_mask = (uint16_t)mcScaleReMask;
5308 sect_config->configs[i].mod_compr_csf = csf;
5309 sect_config->configs[i].mod_compr_scaler = mcScaleOffset_value;
5310 sect_config->num_configs++;
5311 }
5312 }
5313
5314 proto_item_set_end(pattern_ti, tvb, offset);
5315 }
5316 break;
5317 }
5318
5319 case 24: /* SE 24: PUSCH DMRS configuration */
5320 {
5321 /* Hidden filter for bf (DMRS BF) */
5322 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
5323 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
5324
5325 /* alpnPerSym (1 bit) */
5326 proto_tree_add_item(extension_tree, hf_oran_alpn_per_sym, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5327 /* antDmrsSnr (1 bit) */
5328 proto_tree_add_item(extension_tree, hf_oran_ant_dmrs_snr, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5329 /* reserved (1 bit) */
5330 add_reserved_field(extension_tree, hf_oran_reserved_bit2, tvb, offset, 1);
5331 /* userGroupSize (5 bits) */
5332 uint32_t user_group_size;
5333 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);
5334 if (user_group_size == 0) {
5335 proto_item_append_text(ugs_ti, " (not used)");
5336 }
5337 else if (user_group_size > 12) {
5338 proto_item_append_text(ugs_ti, " (reserved)");
5339 }
5340 offset += 1;
5341 /* userGroupId (8 bits)*/
5342 uint32_t user_group_id;
5343 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);
5344 if (user_group_id == 0) {
5345 /* TODO: Value 0 can happen in several cases, described in 7.7.24.7.. */
5346 }
5347 if (user_group_id == 255) {
5348 /* Value 255 is reserved */
5349 expert_add_info(pinfo, ugi_ti, &ei_oran_user_group_id_reserved_value);
5350 }
5351 offset += 1;
5352
5353 bool_Bool seen_value_to_inherit = false0;
5354 bool_Bool inherited_config_has_transform_precoding = false0;
5355 int dmrs_configs_seen = 0;
5356
5357 /* Dissect each entry until reach number of configured ueIds (or run out of extlen bytes..) */
5358 uint32_t ueid_index = 0;
5359 while ((offset < (extension_start_offset + extlen*4)) && (ueid_index < number_of_ueids)) {
5360 dmrs_configs_seen++;
5361
5362 /* Subtree */
5363 proto_item *entry_ti = proto_tree_add_string_format(extension_tree, hf_oran_dmrs_entry,
5364 tvb, offset, 0, "",
5365 "Entry");
5366 proto_tree *entry_tree = proto_item_add_subtree(entry_ti, ett_oran_dmrs_entry);
5367
5368 /* entryType (3 bits) */
5369 uint32_t entry_type;
5370 proto_item *entry_type_ti;
5371 entry_type_ti = proto_tree_add_item_ret_uint(entry_tree, hf_oran_entry_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &entry_type);
5372 if (entry_type > 3) {
5373 proto_item_append_text(entry_type_ti, " (reserved)");
5374 }
5375
5376 /* dmrsPortNumber (5 bits). Values 0-11 allowed */
5377 unsigned int dmrs_port_number;
5378 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);
5379 if (dmrs_port_number > 11) {
5380 proto_item_append_text(dpn_ti, " (12-31 are reserved)");
5381 }
5382 offset += 1;
5383
5384 /* What follows depends upon entryType */
5385 switch (entry_type) {
5386 case 0: /* dmrsPortNumber config same as previous, ueId ueIdReset=0 */
5387 case 1: /* dmrsPortNumber config same as previous, ueId ueIdReset=1 */
5388 /* No further fields for these */
5389 /* Error here if no previous values to inherit!! */
5390 if (!seen_value_to_inherit) {
5391 expert_add_info_format(pinfo, entry_type_ti, &ei_oran_se24_nothing_to_inherit,
5392 "SE24: have seen entry type %u, but no previous config (type 2 or 3) to inherit config from", entry_type);
5393
5394 }
5395 /* TODO: would be useful to repeat whole inherited config here? */
5396 break;
5397
5398 case 2: /* transform precoding disabled */
5399 case 3: /* transform precoding enabled */
5400 {
5401 /* Type 2/3 are very similar.. */
5402
5403 /* ueIdReset (1 bit) */
5404 proto_tree_add_item(entry_tree, hf_oran_ueid_reset, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5405 /* posMeas (1 bit) */
5406 proto_tree_add_item(entry_tree, hf_oran_pos_meas, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5407
5408 /* dmrsSymbolMask (14 bits) */
5409 static int * const dmrs_symbol_mask_flags[] = {
5410 &hf_oran_dmrs_symbol_mask_s13,
5411 &hf_oran_dmrs_symbol_mask_s12,
5412 &hf_oran_dmrs_symbol_mask_s11,
5413 &hf_oran_dmrs_symbol_mask_s10,
5414 &hf_oran_dmrs_symbol_mask_s9,
5415 &hf_oran_dmrs_symbol_mask_s8,
5416 &hf_oran_dmrs_symbol_mask_s7,
5417 &hf_oran_dmrs_symbol_mask_s6,
5418 &hf_oran_dmrs_symbol_mask_s5,
5419 &hf_oran_dmrs_symbol_mask_s4,
5420 &hf_oran_dmrs_symbol_mask_s3,
5421 &hf_oran_dmrs_symbol_mask_s2,
5422 &hf_oran_dmrs_symbol_mask_s1,
5423 &hf_oran_dmrs_symbol_mask_s0,
5424 NULL((void*)0)
5425 };
5426 proto_tree_add_bitmask(entry_tree, tvb, offset,
5427 hf_oran_dmrs_symbol_mask, ett_oran_dmrs_symbol_mask, dmrs_symbol_mask_flags, ENC_BIG_ENDIAN0x00000000);
5428 offset += 2;
5429
5430 /* scrambling */
5431 proto_tree_add_item(entry_tree, hf_oran_scrambling, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5432 offset += 2;
5433
5434 /* nscid (1 bit) */
5435 proto_tree_add_item(entry_tree, hf_oran_nscid, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5436
5437 /* These 5 bits differ depending upon entry type */
5438 if (entry_type == 2) { /* type 2 */
5439 /* dType (1 bit) */
5440 proto_tree_add_item(entry_tree, hf_oran_dtype, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5441 /* cdmWithoutData (2 bits) */
5442 proto_tree_add_item(entry_tree, hf_oran_cmd_without_data, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5443 /* lambda (2 bits) */
5444 proto_tree_add_item(entry_tree, hf_oran_lambda, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5445 }
5446 else { /* type 3 */
5447 /* reserved (1 bit) */
5448 add_reserved_field(entry_tree, hf_oran_reserved_bit1, tvb, offset, 1);
5449 /* lowPaprType (2 bits) */
5450 proto_tree_add_item(entry_tree, hf_oran_low_papr_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5451 /* hoppingMode (2 bits) */
5452 proto_tree_add_item(entry_tree, hf_oran_hopping_mode, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5453 }
5454
5455 /* firstPrb (9 bits) */
5456 proto_tree_add_item(entry_tree, hf_oran_first_prb, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5457 offset += 1;
5458 /* lastPrb (9 bits) */
5459 proto_tree_add_item(entry_tree, hf_oran_last_prb, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5460 offset += 2;
5461 /* Reserved (16 bits) */
5462 add_reserved_field(entry_tree, hf_oran_reserved_16bits, tvb, offset, 2);
5463 offset += 2;
5464
5465 /* Could now see entry types 0 or 1 - they have these values to inherit */
5466 seen_value_to_inherit = true1;
5467 inherited_config_has_transform_precoding = (entry_type == 3);
5468 break;
5469 }
5470
5471 default:
5472 /* reserved - expert info */
5473 break;
5474 }
5475
5476 proto_item_append_text(entry_ti, " [UEId=%u] (dmrsPortNumber=%2u) (type %u - %s) ",
5477 ueids[ueid_index++], dmrs_port_number, entry_type, val_to_str_const(entry_type, entry_type_vals, "Unknown"));
5478 proto_item_set_end(entry_ti, tvb, offset);
5479
5480 if (entry_type <= 1) {
5481 proto_item_append_text(entry_ti, " [transform-precoding %s]",
5482 inherited_config_has_transform_precoding ? "enabled" : "disabled");
5483 }
5484 }
5485
5486 proto_item_append_text(extension_ti, " (%d DMRS configs seen)", dmrs_configs_seen);
5487 break;
5488 }
5489
5490 case 25: /* SE 25: Symbol reordering for DMRS-BF */
5491 /* Just dissect each available block of 7 bytes as the 14 symbols for a layer,
5492 where each layer could be one or apply to all layers. */
5493 {
5494 /* TODO: should only appear in one section of a message - check? */
5495 unsigned layer = 0;
5496 proto_item *layer_ti;
5497 while (offset+7 <= (extension_start_offset + extlen*4)) {
5498 /* Layer subtree */
5499 layer_ti = proto_tree_add_string_format(extension_tree, hf_oran_symbol_reordering_layer,
5500 tvb, offset, 7, "",
5501 "Layer");
5502 proto_tree *layer_tree = proto_item_add_subtree(layer_ti, ett_oran_symbol_reordering_layer);
5503
5504 /* All 14 symbols for a layer (or all layers) */
5505 for (unsigned s=0; s < 14; s++) {
5506 proto_item *sym_ti;
5507 /* txWinForOnAirSymbol */
5508 unsigned int tx_win_for_on_air_symbol;
5509 sym_ti = proto_tree_add_item_ret_uint(layer_tree,
5510 (s % 2) ? hf_oran_tx_win_for_on_air_symbol_r : hf_oran_tx_win_for_on_air_symbol_l,
5511 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &tx_win_for_on_air_symbol);
5512 if (tx_win_for_on_air_symbol == 0x0F) {
5513 /* Ordering not affected */
5514 proto_item_append_text(sym_ti, " (sym %u - no info)", s);
5515 }
5516 else {
5517 proto_item_append_text(sym_ti, " (sym %u)", s);
5518 }
5519 if (s % 2) {
5520 offset += 1;
5521 }
5522 }
5523
5524 proto_item_append_text(layer_ti, " (layer %u)", ++layer);
5525 proto_item_append_text(extension_ti, " (layer %u)", layer);
5526 }
5527 /* Set layer subtree label */
5528 if (layer == 1) {
5529 proto_item_append_text(layer_ti, " (all)");
5530 proto_item_append_text(extension_ti, " (all)");
5531 }
5532 if (layer == 0) {
5533 /* TODO: are no layers valid? What does it mean? */
5534 proto_item_append_text(extension_ti, " (none)");
5535 }
5536 break;
5537 }
5538
5539 case 26: /* SE 26: Frequency offset feedback */
5540 /* Reserved (8 bits) */
5541 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
5542 offset += 1;
5543 /* Reserved (1 bit) */
5544 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
5545 /* numFoFb (7 bits) */
5546 unsigned num_fo_fb;
5547 proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_fo_fb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_fo_fb);
5548 offset += 1;
5549
5550 /* Add each freqOffsetFb value */
5551 for (unsigned n=0; n < num_fo_fb; n++) {
5552 unsigned freq_offset_fb;
5553 /* freqOffsetFb (16 bits) */
5554 proto_item *offset_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_freq_offset_fb,
5555 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &freq_offset_fb);
5556 /* Show if maps onto a -ve number */
5557 if ((freq_offset_fb >= 0x8ad0) && (freq_offset_fb <= 0xffff)) {
5558 proto_item_append_text(offset_ti, "(value %d)", -1 - (0xffff-freq_offset_fb));
5559 }
5560 proto_item_append_text(offset_ti, " [#%u]", n+1);
5561 offset += 2;
5562 }
5563 break;
5564
5565 case 27: /* SE 27: O-DU controlled dimensionality reduction */
5566 {
5567 /* Hidden filter for bf (DMRS BF) */
5568 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
5569 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
5570
5571 /* beamType (2 bits) */
5572 unsigned beam_type;
5573 proto_tree_add_item_ret_uint(extension_tree, hf_oran_beam_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &beam_type);
5574 /* reserved (6 bits) */
5575 add_reserved_field(extension_tree, hf_oran_reserved_last_6bits, tvb, offset, 1);
5576 offset += 1;
5577
5578 /* numElements */
5579 unsigned num_elements;
5580 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);
5581 if (num_elements == 0) {
5582 num_elements = 256;
5583 proto_item_append_text(num_elements_ti, " (256)");
5584 }
5585
5586 offset += 1;
5587
5588 /* beamId value(s) */
5589 switch (beam_type) {
5590 case 0:
5591 for (unsigned n=0; n < num_elements; n++) {
5592 /* reserved (1 bit) + beamId */
5593 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
5594 proto_tree_add_item(extension_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5595 offset += 2;
5596 }
5597 break;
5598 case 1:
5599 /* reserved (1 bit) + beamId */
5600 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
5601 proto_tree_add_item(extension_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5602 offset += 2;
5603 break;
5604 default:
5605 /* Unknown type... */
5606 break;
5607 }
5608 break;
5609 }
5610
5611 case 28: /* SE 28: O-DU controlled frequency resolution for SINR reporting */
5612 {
5613 /* reserved (3 bits) */
5614 add_reserved_field(extension_tree, hf_oran_reserved_3bits, tvb, offset, 1);
5615 /* numUeSinrRpt (5 bits) */
5616 uint32_t num_ue_sinr_rpt;
5617 proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_ue_sinr_rpt, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_ue_sinr_rpt);
5618 offset += 1;
5619
5620 for (uint32_t n=0; n < num_ue_sinr_rpt; n++) {
5621 /* reserved (1 bit) */
5622 add_reserved_field(extension_tree, (n % 2) ? hf_oran_reserved_bit4 : hf_oran_reserved_1bit,
5623 tvb, offset, 1);
5624
5625 /* numSinrPerPrb (3 bits). Taken from alternate nibbles within byte. */
5626 proto_tree_add_item(extension_tree, (n % 2) ? hf_oran_num_sinr_per_prb_right : hf_oran_num_sinr_per_prb,
5627 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5628 if (n % 2) {
5629 offset += 1;
5630 }
5631 }
5632
5633 /* May need to skip beyond half-used byte */
5634 if (num_ue_sinr_rpt % 2) {
5635 offset += 1;
5636 }
5637 break;
5638 }
5639
5640 case 29: /* SE 29: Cyclic delay adjustment */
5641 /* reserved (4 bits) */
5642 add_reserved_field(extension_tree, hf_oran_reserved_4bits, tvb, offset, 1);
5643 /* cdScgSize (4 bits) */
5644 proto_tree_add_item(extension_tree, hf_oran_cd_scg_size, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5645 offset += 1;
5646
5647 /* cdScgPhaseStep */
5648 proto_tree_add_item(extension_tree, hf_oran_cd_scg_phase_step, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5649 offset += 1;
5650 break;
5651
5652 case 30: /* SE 30: PUSCH repetition indication */
5653 {
5654 /* Only valid for UL */
5655 if (!tap_info->uplink) {
5656 expert_add_info(pinfo, extension_ti, &ei_oran_se30_not_ul);
5657 }
5658
5659 /* ueids[], number_of_ueids may have been rewritten by SE10 */
5660
5661 /* reserved (4 bits) */
5662 add_reserved_field(extension_tree, hf_oran_reserved_4bits, tvb, offset, 1);
5663 /* numRepUe (4 bits) */
5664 uint8_t num_rep_ue;
5665 proto_tree_add_item_ret_uint8(extension_tree, hf_oran_num_rep_ue, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_rep_ue);
5666 offset ++;
5667 /* reserved (8 bits) */
5668 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
5669 offset += 1;
5670
5671 if (num_rep_ue == 1) {
5672 /* SE10 *not* present. N.B. this should tally with number_of_ueids being set to only 1? */
5673 /* reserved (1 bit) */
5674 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
5675 /* isLastRep (1 bit). Value meaningless here? */
5676 proto_tree_add_item(extension_tree, hf_oran_is_last_rep, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5677 /* repIndex (6 bits) */
5678 proto_tree_add_item(extension_tree, hf_oran_rep_index, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5679 offset += 1;
5680
5681 /* reserved (2 bits) */
5682 add_reserved_field(extension_tree, hf_oran_reserved_2bits, tvb, offset, 1);
5683 /* numReps (6 bits) */
5684 uint8_t num_reps;
5685 proto_tree_add_item_ret_uint8(extension_tree, hf_oran_num_reps, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_reps);
5686 /* TODO: should numReps be 0 here? */
5687 offset += 1;
5688
5689 /* reserved (2 bits) */
5690 add_reserved_field(extension_tree, hf_oran_reserved_16bits, tvb, offset, 2);
5691 offset += 2;
5692
5693 }
5694 else {
5695 /* SE10 present */
5696 bool_Bool is_last_rep = false0;
5697 /* TODO: should is_last_rep (also) cause loop exit? */
5698 for (uint8_t ue_idx=0; (ue_idx < num_rep_ue) && !is_last_rep; ue_idx++) {
5699 /* reserved (1 bit) */
5700 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
5701 /* isLastRep (1 bit) */
5702 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_is_last_rep, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &is_last_rep);
5703 /* repIndex (6 bits) */
5704 proto_tree_add_item(extension_tree, hf_oran_rep_index, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5705 offset += 1;
5706
5707 /* reserved (2 bits) */
5708 add_reserved_field(extension_tree, hf_oran_reserved_2bits, tvb, offset, 1);
5709 /* numReps (6 bits) */
5710 uint8_t num_reps;
5711 proto_item *num_reps_ti = proto_tree_add_item_ret_uint8(extension_tree, hf_oran_num_reps, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_reps);
5712 /* TODO: values 33-63 are reserved */
5713 if (num_reps > 32) {
5714 proto_item_append_text(num_reps_ti, " (reserved)");
5715 }
5716 offset += 1;
5717
5718 for (uint8_t rep=0; rep < num_reps; rep++) {
5719 /* reserved (1 bit) */
5720 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
5721 /* repUeId (15 bits) */
5722 /* TODO: should be fetching and comparing with ueids[] from SE10? */
5723 uint16_t ueid;
5724 proto_item *ueid_ti = proto_tree_add_item_ret_uint16(extension_tree, hf_oran_rep_ueid, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ueid);
5725
5726 /* Check that this ueid is recognised (among ueids[], number_of_ueids) */
5727 bool_Bool matched = false0;
5728 for (unsigned u=0; u < number_of_ueids; u++) {
5729 if (ueid == ueids[u])
5730 matched = true1;
5731 }
5732 if (!matched) {
5733 expert_add_info_format(pinfo, ueid_ti, &ei_oran_se30_unknown_ueid,
5734 "SE 30 mentions UEId %u - not seen in SE10", ueid);
5735 }
5736 offset += 2;
5737 }
5738 }
5739 }
5740 break;
5741 }
5742 case 31: /* SE 31: MCS Information */
5743 {
5744 /* TODO: show ueid (from ST5 or SE10) as generated field? Maybe add a subtree for each entry? */
5745 for (uint32_t u=0; u < number_of_ueids; u++) {
5746 /* reserved (4 bits) */
5747 add_reserved_field(extension_tree, hf_oran_reserved_4bits, tvb, offset, 1);
5748 /* mcsTable (4 bits) */
5749 proto_tree_add_item(extension_tree, hf_oran_mcs_table, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5750 offset += 1;
5751
5752 /* reserved (2 bits) */
5753 add_reserved_field(extension_tree, hf_oran_reserved_2bits, tvb, offset, 1);
5754 /* mcsIndex (6 bits) */
5755 proto_tree_add_item(extension_tree, hf_oran_mcs_index, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5756 offset += 1;
5757 }
5758 break;
5759 }
5760
5761 case 32: /* SE 32: Rank and TPMI measurement request */
5762 {
5763 /* reserved (3 bits) */
5764 add_reserved_field(extension_tree, hf_oran_reserved_3bits, tvb, offset, 1);
5765 /* numMeasReq (5 bits) */
5766 uint8_t num_meas_req;
5767 proto_tree_add_item_ret_uint8(extension_tree, hf_oran_num_meas_req, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_meas_req);
5768 offset += 1;
5769
5770 /* reserved (8 bits) */
5771 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
5772 offset += 1;
5773
5774 /* Show each measurement request */
5775 for (unsigned r=0; r < num_meas_req; r++) {
5776 /* Reserved (1 bit) */
5777 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
5778 /* ueId (14 bits) */
5779 proto_tree_add_item(extension_tree, hf_oran_ueId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5780 offset += 2;
5781
5782 /* numOfUeAntPorts (4 bits) */
5783 proto_tree_add_item(extension_tree, hf_oran_num_of_ue_ant_ports, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5784 /* ueRank (4 bits) */
5785 proto_tree_add_item(extension_tree, hf_oran_ue_rank, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5786 offset += 1;
5787
5788 /* codebookSubset (2 bits) */
5789 proto_tree_add_item(extension_tree, hf_oran_codebook_subset, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5790 /* TODO: tpmiIndex (6 bits) */
5791 offset += 1;
5792
5793 /* fullPwrMode (2 bits) */
5794 proto_tree_add_item(extension_tree, hf_oran_full_pwr_mode, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5795 /* fullPwrMode2TmpiGroup (14 bits) */
5796 /* TODO: add as a bitset */
5797 proto_tree_add_item(extension_tree, hf_oran_full_pwr_mode_2_tpmi_group, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5798 offset += 2;
5799
5800 /* reserved (2 bytes) */
5801 add_reserved_field(extension_tree, hf_oran_reserved_16bits, tvb, offset, 2);
5802 offset += 2;
5803 }
5804 break;
5805 }
5806
5807 case 33: /* Dynamic channel type selection for SRS-BF-DL */
5808 /* Reserved (6 bits) */
5809 add_reserved_field(extension_tree, hf_oran_reserved_6bits, tvb, offset, 1);
5810 /* chanTypeSel (2 bits) */
5811 proto_tree_add_item(extension_tree, hf_oran_chan_type_sel, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5812 offset += 1;
5813 /* Reserved (8 bits) */
5814 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
5815 offset += 1;
5816 break;
5817
5818 case 34: /* RS-BF-UL Control */
5819 {
5820 /* portListEn (1 bit) */
5821 bool_Bool port_list_en;
5822 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_port_list_en, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &port_list_en);
5823 /* reserved (4 bits) */
5824 add_reserved_field(extension_tree, hf_oran_reserved_bits1234, tvb, offset, 1);
5825 /* tpmiMode (3 bits) */
5826 uint8_t tpmi_mode;
5827 proto_tree_add_item_ret_uint8(extension_tree, hf_oran_tpmi_mode, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &tpmi_mode);
5828 offset += 1;
5829
5830 /* reserved (2 bits) */
5831 add_reserved_field(extension_tree, hf_oran_reserved_2bits, tvb, offset, 1);
5832 /* numUeid (6 bits) */
5833 uint8_t num_ueid;
5834 proto_tree_add_item_ret_uint8(extension_tree, hf_oran_num_ueid_se34, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_ueid);
5835 offset += 1;
5836
5837 for (unsigned layer=0; layer < num_ueid; layer++) {
5838 /* TPMI data for layer */
5839 switch (tpmi_mode) {
5840 case 0:
5841 /* srsPortMask (8 bits) */
5842 proto_tree_add_item(extension_tree, hf_oran_chan_srs_port_mask, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5843 offset += 1;
5844 break;
5845 case 1:
5846 /* srsPortMask (8 bits) */
5847 proto_tree_add_item(extension_tree, hf_oran_chan_srs_port_mask, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5848 offset += 1;
5849 /* tpmiPhaseP7 (2 bits) */
5850 proto_tree_add_item(extension_tree, hf_oran_tpmi_phase_7, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5851 /* tpmiPhaseP6 (2 bits) */
5852 proto_tree_add_item(extension_tree, hf_oran_tpmi_phase_6, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5853 /* tpmiPhaseP5 (2 bits) */
5854 proto_tree_add_item(extension_tree, hf_oran_tpmi_phase_5, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5855 /* tpmiPhaseP4 (2 bits) */
5856 proto_tree_add_item(extension_tree, hf_oran_tpmi_phase_4, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5857 offset += 1;
5858 /* tpmiPhaseP3 (2 bits) */
5859 proto_tree_add_item(extension_tree, hf_oran_tpmi_phase_3, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5860 /* tpmiPhaseP2 (2 bits) */
5861 proto_tree_add_item(extension_tree, hf_oran_tpmi_phase_2, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5862 /* tpmiPhaseP1 (2 bits) */
5863 proto_tree_add_item(extension_tree, hf_oran_tpmi_phase_1, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5864 /* tpmiPhaseP0 (2 bits) */
5865 proto_tree_add_item(extension_tree, hf_oran_tpmi_phase_0, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5866 offset += 1;
5867 }
5868
5869 /* ueId for layer */
5870 proto_tree_add_item(extension_tree, hf_oran_ueid_se34, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5871 offset += 2;
5872 }
5873
5874 if (port_list_en) {
5875 /* numPortListIndex (1 byte) */
5876 uint8_t num_port_list_index;
5877 proto_tree_add_item_ret_uint8(extension_tree, hf_oran_num_port_list_index, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_port_list_index);
5878 offset += 1;
5879
5880 /* portListIndex (1 byte) */
5881 for (unsigned port=0; port < num_port_list_index; port++) {
5882 proto_item *ti = proto_tree_add_item(extension_tree, hf_oran_port_list_index, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5883 proto_item_append_text(ti, " (idx %u)", port+1);
5884 offset += 1;
5885 }
5886 }
5887
5888 break;
5889 }
5890
5891 case 35: /* TODO: Codebook-based beamforming parameters */
5892 /* cqiMode (2 bits) */
5893 /* subbandSize (6 bits) */
5894 offset += 1;
5895 /* codebookId (4 bits) */
5896 /* spatialConfigId (4 bits) */
5897 offset += 1;
5898 /* ueIdReset (1 bit) */
5899 proto_tree_add_item(extension_tree, hf_oran_ueid_reset, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5900 /* reserved (3 bits) */
5901 add_reserved_field(extension_tree, hf_oran_reserved_bits123, tvb, offset, 1);
5902 /* p2aMappingType (4 bits) */
5903 offset += 1;
5904 /* reserved (8 bits) */
5905 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
5906 offset += 1;
5907
5908 /* TODO: p2aMapping.. */
5909 break;
5910
5911
5912
5913 default:
5914 {
5915 /* Not handled above. Offer the SE to an external dissector. */
5916 /* If one handles it, use the number of bytes it dissected; */
5917 /* otherwise fall back to flagging it as unsupported. */
5918 int dissected = 0;
5919 unsigned se_end = extension_start_offset + (extlen*4);
5920 oran_se_info se_info;
5921 se_info.exttype = exttype;
5922 se_info.extlen = extlen;
5923 se_info.startPrbc = startPrbc;
5924 se_info.numPrbc = numPrbc;
5925 se_info.extension_ti = extension_ti;
5926 se_info.exttype_ti = exttype_ti;
5927
5928 /* Subset tvb covering just the SE payload */
5929 tvbuff_t *se_tvb = tvb_new_subset_length(tvb, offset, se_end-offset);
5930 dissected = dissector_try_uint_with_data(oran_sectionextension_table, exttype,
5931 se_tvb, pinfo, extension_tree, true1, &se_info);
5932
5933 if (dissected > 0) {
5934 offset += dissected;
5935 break;
5936 }
5937
5938 /* Other/unexpected extension types */
5939 expert_add_info_format(pinfo, exttype_ti, &ei_oran_unhandled_se,
5940 "SE %u (%s) not supported by dissector",
5941 exttype, val_to_str_ext_const(exttype, &exttype_vals_ext, "Reserved"));
5942 ext_unhandled = true1;
5943 break;
5944 }
5945 }
5946
5947 /* Check offset compared with extlen. There should be 0-3 bytes of padding */
5948 int num_padding_bytes = (extension_start_offset + (extlen*4) - offset);
5949 if (!ext_unhandled && ((num_padding_bytes<0) || (num_padding_bytes>3))) {
5950 expert_add_info_format(pinfo, extlen_ti, &ei_oran_extlen_wrong,
5951 "extlen signalled %u bytes (+ 0-3 bytes padding), but %u were dissected",
5952 extlen*4, offset-extension_start_offset);
5953 }
5954
5955 /* Move offset to beyond signalled length of extension */
5956 offset = extension_start_offset + (extlen*4);
5957
5958 /* Set length of extension header. */
5959 proto_item_set_len(extension_ti, extlen*4);
5960 }
5961 /* End of section extension handling */
5962
5963 /* Tap section beamId if not overwritten by SEs */
5964 if (!section_beamId_ignored && section_beamId != 0) {
5965 add_beam_id_to_tap(tap_info, section_beamId);
5966 }
5967
5968
5969 /* RRM measurement reports have measurement reports *after* extensions */
5970 if ((sectionType == SEC_C_RRM_MEAS_REPORTS) || /* Section Type 10 */
5971 (sectionType == SEC_C_RRM_MEAS_REPORTS_NON_TIMING)) /* Section Type 13 */
5972 {
5973 /* Hidden filter for bf (DMFS-BF). No BF weights though.. */
5974 bf_ti = proto_tree_add_item(c_section_tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
5975 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
5976
5977 bool_Bool mf;
5978 do {
5979 /* Measurement report subtree */
5980 proto_item *mr_ti = proto_tree_add_string_format(c_section_tree, hf_oran_measurement_report,
5981 tvb, offset, 1, "", "Measurement Report");
5982 proto_tree *mr_tree = proto_item_add_subtree(mr_ti, ett_oran_measurement_report);
5983 unsigned report_start_offset = offset;
5984
5985 /* measurement flag (i.e., more reports after this one) (1 bit) */
5986 proto_tree_add_item_ret_boolean(mr_tree, hf_oran_mf, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &mf);
5987
5988 /* measTypeId (7 bits) */
5989 uint32_t meas_type_id;
5990 proto_item *meas_type_id_ti;
5991 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);
5992 offset += 1;
5993
5994 /* Common to all measurement types */
5995 unsigned num_elements = 0;
5996 if (meas_type_id == 6) {
5997 /* numElements */
5998 proto_tree_add_item_ret_uint(mr_tree, hf_oran_num_elements, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_elements);
5999 }
6000 else {
6001 /* All other meas ids have a reserved byte */
6002 add_reserved_field(mr_tree, hf_oran_reserved_8bits, tvb, offset, 1);
6003 }
6004 offset += 1;
6005
6006 /* measDataSize (16 bits). N.B. begins at mf field, i.e. 2 bytes before this one */
6007 unsigned meas_data_size;
6008 proto_item *meas_data_size_ti;
6009 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);
6010 meas_data_size *= 4;
6011 proto_item_append_text(meas_data_size_ti, " (%u bytes)", meas_data_size);
6012 offset += 2;
6013
6014 /* Summary for measurement report root */
6015 proto_item_append_text(mr_ti, " (measTypeId=%u - %s)",
6016 meas_type_id, val_to_str_const(meas_type_id, meas_type_id_vals, "unknown"));
6017 /* And section header */
6018 proto_item_append_text(tree, " (%s)", val_to_str_const(meas_type_id, meas_type_id_vals, "unknown"));
6019 /* And Info column */
6020 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", val_to_str_const(meas_type_id, meas_type_id_vals, "unknown"));
6021
6022 /* Handle specific message type fields */
6023 switch (meas_type_id) {
6024 case 1:
6025 {
6026 /* ueTae */
6027 unsigned ue_tae;
6028 proto_item *ue_tae_ti;
6029 ue_tae_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_ue_tae, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ue_tae);
6030 /* Show if maps onto a -ve number */
6031 if ((ue_tae >= 0x8ad0) && (ue_tae <= 0xffff)) {
6032 proto_item_append_text(ue_tae_ti, "(value %d)", -1 - (0xffff-ue_tae));
6033 }
6034 offset += 2;
6035
6036 /* Reserved (16 bits) */
6037 add_reserved_field(mr_tree, hf_oran_reserved_16bits, tvb, offset, 2);
6038 offset += 2;
6039 break;
6040 }
6041 case 2:
6042 /* ueLayerPower entries, one for each UEId */
6043 /* i.e., should loop over 0-number_of_ues? */
6044 for (unsigned ueid_index=0; ueid_index < number_of_ueids; ueid_index++) {
6045 unsigned ue_layer_power;
6046 proto_item *ue_layer_power_ti;
6047 /* ueLayerPower */
6048 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);
6049 /* Show if maps onto a -ve number */
6050 if ((ue_layer_power >= 0x8ad0) && (ue_layer_power <= 0xffff)) {
6051 proto_item_append_text(ue_layer_power_ti, "(value %d) (ueId=%u)", -1 - (0xffff-ue_layer_power), ueids[ueid_index]);
6052 }
6053 offset += 2;
6054 }
6055 /* padding out to 4 bytes */
6056 break;
6057 case 3:
6058 {
6059 /* ueFreqOffset */
6060 unsigned ue_freq_offset;
6061 proto_item *ue_freq_offset_ti;
6062 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);
6063 /* Show if maps onto a -ve number */
6064 if ((ue_freq_offset >= 0x8ad0) && (ue_freq_offset <= 0xffff)) {
6065 proto_item_append_text(ue_freq_offset_ti, "(value %d)", -1 - (0xffff-ue_freq_offset));
6066 }
6067 offset += 2;
6068
6069 /* currUeFreqOffset (16 bits) */
6070 unsigned curr_ue_freq_offset;
6071 proto_item *curr_ue_freq_offset_ti;
6072 curr_ue_freq_offset_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_curr_ue_freq_offset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &curr_ue_freq_offset);
6073 /* Show if maps onto a -ve number */
6074 if ((curr_ue_freq_offset >= 0x8ad0) && (curr_ue_freq_offset <= 0xffff)) {
6075 proto_item_append_text(curr_ue_freq_offset_ti, "(value %d)", -1 - (0xffff-curr_ue_freq_offset));
6076 }
6077 offset += 2;
6078 break;
6079 }
6080 case 4:
6081 case 5:
6082 /* reserved (2 bits) */
6083 add_reserved_field(mr_tree, hf_oran_reserved_2bits, tvb, offset, 1);
6084 /* symbolMask (14 bits) */
6085 offset = dissect_symbolmask(tvb, mr_tree, offset, NULL((void*)0), NULL((void*)0));
6086
6087 /* 2 bytes for each PRB ipnPower */
6088 for (unsigned prb=0; prb<MAX_PRBS273; prb++) {
6089 /* Skip if should not be reported */
6090 if (!prbs_for_st10_type5[prb]) {
6091 continue;
6092 }
6093 unsigned ipn_power;
6094 proto_item *ipn_power_ti;
6095 /* ipnPower (2 bytes) */
6096 ipn_power_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_ipn_power, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ipn_power);
6097 proto_item_append_text(ipn_power_ti, " (PRB %3d)", prb);
6098 /* Show if maps onto a -ve number */
6099 if ((ipn_power >= 0x8ad0) && (ipn_power <= 0xffff)) {
6100 proto_item_append_text(ipn_power_ti, " (value %d)", -1 - (0xffff-ipn_power));
6101 }
6102 offset += 2;
6103 }
6104 /* padding out to 4 bytes */
6105 break;
6106 case 6:
6107 /* antDmrsSnrVal entries */
6108 for (unsigned n=0; n < num_elements; n++) {
6109 unsigned snr_value;
6110 proto_item *snr_value_ti;
6111 /* antDmrsSnrVal (2 bytes) */
6112 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);
6113 proto_item_append_text(snr_value_ti, " (elem %2u)", n+1);
6114 /* Show if maps onto a -ve number */
6115 if ((snr_value >= 0x8ad0) && (snr_value <= 0xffff)) {
6116 proto_item_append_text(snr_value_ti, " (value %d)", -1 - (0xffff-snr_value));
6117 }
6118 offset += 2;
6119 }
6120 break;
6121 case 7:
6122 {
6123 /* UE positioning measurement report */
6124 float start_value;
6125
6126 /* ueAzAoa (16 bits) */
6127 uint32_t ue_az_aoa;
6128 proto_item *ue_az_aoa_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_ue_az_aoa, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ue_az_aoa);
6129 if (ue_az_aoa <= 0xE0F) {
6130 if (ue_az_aoa >= 0x0708) {
6131 start_value = (ue_az_aoa-0x0708) * (float)0.1;
6132 proto_item_append_text(ue_az_aoa_ti, " (%.1f <= val < %.1f degrees)", start_value, start_value + (float)0.1);
6133 }
6134 else {
6135 start_value = 180 + (ue_az_aoa * (float)0.1);
6136 proto_item_append_text(ue_az_aoa_ti, " (%.1f <= val < %.1f degrees)", start_value, start_value + (float)0.1);
6137 }
6138 }
6139 else if (ue_az_aoa == 0xffff) {
6140 proto_item_append_text(ue_az_aoa_ti, " (invalid measurement result)");
6141 }
6142 else {
6143 proto_item_append_text(ue_az_aoa_ti, " (reserved)");
6144 }
6145 offset += 2;
6146
6147 /* Reserved (16 bits) */
6148 add_reserved_field(mr_tree, hf_oran_reserved_16bits, tvb, offset, 2);
6149 offset += 2;
6150
6151 /* ueZeAoa (16 bits) */
6152 uint32_t ue_ze_aoa;
6153 proto_item *ue_ze_aoa_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_ue_ze_aoa, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ue_ze_aoa);
6154 if (ue_ze_aoa <= 0x707) {
6155 start_value = ue_ze_aoa * (float)0.1;
6156 proto_item_append_text(ue_ze_aoa_ti, " (%.1f <= val < %.1f degrees)", start_value, start_value + (float)0.1);
6157 }
6158 else if (ue_ze_aoa == 0xffff) {
6159 proto_item_append_text(ue_ze_aoa_ti, " (invalid measurement result)");
6160 }
6161 else {
6162 proto_item_append_text(ue_ze_aoa_ti, " (reserved)");
6163 }
6164 offset += 2;
6165
6166 /* Reserved (16 bits) */
6167 add_reserved_field(mr_tree, hf_oran_reserved_16bits, tvb, offset, 2);
6168 offset += 2;
6169
6170 /* uePosToaOffset (16 bits) */
6171 uint32_t ue_pos_toa_offset;
6172 proto_item *ue_pos_toa_offset_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_ue_pos_toa_offset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ue_pos_toa_offset);
6173 if (ue_pos_toa_offset == 0) {
6174 proto_item_append_text(ue_pos_toa_offset_ti, " (no UE ToA offset, 0 symbols)");
6175 }
6176 else if (ue_pos_toa_offset <= 0x7fff) {
6177 proto_item_append_text(ue_pos_toa_offset_ti, " (+ve UE ToA offset)");
6178 }
6179 else if (ue_pos_toa_offset == 0x8000) {
6180 proto_item_append_text(ue_pos_toa_offset_ti, " (invalid measurement result)");
6181 }
6182 else {
6183 proto_item_append_text(ue_pos_toa_offset_ti, " (-ve UE ToA offset)");
6184 }
6185 offset += 2;
6186
6187 /* Reserved (16 bits) */
6188 add_reserved_field(mr_tree, hf_oran_reserved_16bits, tvb, offset, 2);
6189 offset += 2;
6190 break;
6191 }
6192 case 8:
6193 {
6194 /* UE radial speed measurement report */
6195
6196 /* ueRadialSpeed (16 bits) */
6197 uint32_t radial_speed;
6198 proto_item *radial_speed_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_ue_radial_speed, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &radial_speed);
6199 if (radial_speed <= 10000) {
6200 proto_item_append_text(radial_speed_ti, " (%.1f km/h)", radial_speed * (float)0.1);
6201 }
6202 else if (radial_speed == 0x8000) {
6203 proto_item_append_text(radial_speed_ti, " (invalid measurement result)");
6204 }
6205 else {
6206 proto_item_append_text(radial_speed_ti, " (reserved value)");
6207 }
6208 offset += 2;
6209
6210 /* Reserved (16 bits) */
6211 add_reserved_field(mr_tree, hf_oran_reserved_16bits, tvb, offset, 2);
6212 offset += 2;
6213 break;
6214 }
6215 case 9:
6216 {
6217 /* TODO: UE post-equalization MU interference measurement */
6218
6219 /* reserved (16 bits) */
6220 add_reserved_field(mr_tree, hf_oran_reserved_16bits, tvb, offset, 2);
6221 offset += 2;
6222
6223 /* TODO: muInterferenceLevel (all layers * all PRB blocks) */
6224 break;
6225 }
6226 case 10:
6227 {
6228 /* UE TPMI and rank recommendation measurement */
6229
6230 /* numCandRanks (4 bits - only 1-4 valid) */
6231 uint8_t num_cand_ranks;
6232 proto_tree_add_item_ret_uint8(mr_tree, hf_oran_num_cand_ranks, tvb, offset, 1, ENC_NA0x00000000, &num_cand_ranks);
6233 if (num_cand_ranks > 4) {
6234 num_cand_ranks = 4;
6235 }
6236 if (num_cand_ranks < 1) {
6237 num_cand_ranks = 1;
6238 }
6239
6240 /* uePrefRank (4 bits) */
6241 proto_tree_add_item(mr_tree, hf_oran_ue_pref_rank, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
6242 offset += 1;
6243
6244 for (uint8_t cand_rank=1; cand_rank <= num_cand_ranks; cand_rank++) {
6245 /* ueTpmiRankY (1 byte) */
6246 proto_item *rank_y_ti = proto_tree_add_item(mr_tree, hf_oran_ue_tpmi_rank_y,
6247 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
6248 proto_item_append_text(rank_y_ti, " (rank %u)", cand_rank);
6249
6250 offset += 1;
6251
6252 for (uint8_t sinr = 1; sinr <= cand_rank; sinr++) {
6253 /* ueTpmiRankYSinrLX (2 bytes) */
6254 proto_item *rank_y_sinr_x_ti = proto_tree_add_item(mr_tree, hf_oran_ue_tpmi_rank_y_sinr_lx,
6255 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
6256 proto_item_append_text(rank_y_sinr_x_ti, " (rank %u, sinr %u)", cand_rank, sinr);
6257 offset += 2;
6258 }
6259 }
6260 break;
6261 }
6262 case 11:
6263 {
6264 /* UE layer pre-equalization SINR report */
6265 /* TODO: how to know how many layers? Just fill up available data? */
6266 unsigned num_layers = (meas_data_size > 4) ? (meas_data_size - 4) / 2 : 0;
6267 for (unsigned layer=0; layer < num_layers; layer++) {
6268 /* ueLayerPreEqSinr (2 bytes each) */
6269 proto_item *pre_eq_sinr_ti = proto_tree_add_item(mr_tree, hf_oran_ue_layer_pre_eq_sinr,
6270 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
6271 proto_item_append_text(pre_eq_sinr_ti, " (layer %u)", layer);
6272 offset += 2;
6273 }
6274 break;
6275 }
6276 case 12:
6277 {
6278 /* SRS UE port wideband signal power measurement report */
6279 /* srsMeasPortMask (2 bytes) */
6280 uint16_t srs_meas_port_mask;
6281 proto_tree_add_item_ret_uint16(mr_tree, hf_oran_srs_meas_port_mask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &srs_meas_port_mask);
6282 offset += 2;
6283
6284 for (unsigned p=0; p < 16; p++) {
6285 if ((1<<p) & srs_meas_port_mask) {
6286 /* srsUePortWbPower (one for each port mask bit set) */
6287 proto_item *wb_power_ti = proto_tree_add_item(mr_tree, hf_oran_srs_ue_port_wb_power, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
6288 proto_item_append_text(wb_power_ti, " (antenna port %u)", p);
6289 offset += 2;
6290 }
6291 }
6292 break;
6293 }
6294 case 13:
6295 {
6296 /* SRS UE port wideband SINR measurement report */
6297 /* srsMeasPortMask (2 bytes) */
6298 uint16_t srs_meas_port_mask;
6299 proto_tree_add_item_ret_uint16(mr_tree, hf_oran_srs_meas_port_mask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &srs_meas_port_mask);
6300 offset += 2;
6301
6302 for (unsigned p=0; p < 16; p++) {
6303 if ((1<<p) & srs_meas_port_mask) {
6304 /* srsUePortWbSinr (one for each port mask bit set) */
6305 proto_item *sinr_ti = proto_tree_add_item(mr_tree, hf_oran_srs_ue_port_wb_sinr, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
6306 proto_item_append_text(sinr_ti, " (antenna port %u)", p);
6307 offset += 2;
6308 }
6309 }
6310 break;
6311 }
6312 /* TODO: new measurement types */
6313 case 14:
6314 case 15:
6315 case 16:
6316 case 17:
6317 case 18:
6318 case 19:
6319 case 20:
6320 case 21:
6321 case 22:
6322 case 23:
6323 case 24:
6324
6325 default:
6326 /* Anything else is not expected */
6327 expert_add_info_format(pinfo, meas_type_id_ti, &ei_oran_unexpected_measTypeId,
6328 "measTypeId %u (%s) not supported - only 1-24 are expected",
6329 meas_type_id,
6330 val_to_str_const(meas_type_id, meas_type_id_vals, "reserved"));
6331 break;
6332
6333 }
6334
6335 /* Pad out to next 4 bytes */
6336 offset += WS_PADDING_TO_4(offset-report_start_offset)((4U - ((offset-report_start_offset) % 4U)) % 4U);
6337
6338 /* TODO: verify dissected size of report vs meas_data_size? */
6339
6340 /* End of measurement report tree */
6341 proto_item_set_end(mr_ti, tvb, offset);
6342 } while (mf);
6343 }
6344
6345 /* Request for RRM Measurements has measurement commands after extensions */
6346 else if (sectionType == SEC_C_REQUEST_RRM_MEAS) /* Section Type 11 */
6347 {
6348 bool_Bool mf = true1;
6349 do {
6350 /* Measurement command subtree */
6351 proto_item *mc_ti = proto_tree_add_string_format(c_section_tree, hf_oran_measurement_command,
6352 tvb, offset, 8, "", "Measurement Command");
6353 proto_tree *mc_tree = proto_item_add_subtree(mc_ti, ett_oran_measurement_command);
6354
6355 /* mf (1 bit). 1st measurement command is always preset */
6356 proto_tree_add_item_ret_boolean(mc_tree, hf_oran_mf, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &mf);
6357
6358 /* measTypeId (7 bits) */
6359 uint32_t meas_type_id;
6360 proto_item *meas_type_id_ti;
6361 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);
6362 offset += 1;
6363
6364 proto_item *meas_command_ti;
6365 uint32_t meas_command_size;
6366
6367 switch (meas_type_id) {
6368 case 5: /* command for IpN for unallocated PRBs */
6369 /* reserved (1 byte) */
6370 add_reserved_field(mc_tree, hf_oran_reserved_8bits, tvb, offset, 1);
6371 offset += 1;
6372 /* measCmdSize. Presumably number of words so in future could skip unrecognised command types.. */
6373 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);
6374 proto_item_append_text(meas_command_ti, " (%u bytes)", meas_command_size*4);
6375 offset += 2;
6376 /* reserved (2 bits) */
6377 add_reserved_field(mc_tree, hf_oran_reserved_2bits, tvb, offset, 1);
6378 /* symbolMask (14 bits) */
6379 offset = dissect_symbolmask(tvb, mc_tree, offset, NULL((void*)0), NULL((void*)0));
6380 /* reserved (16 bits) */
6381 add_reserved_field(mc_tree, hf_oran_reserved_16bits, tvb, offset, 2);
6382 offset += 2;
6383 break;
6384
6385 default:
6386 /* Anything else is not expected */
6387 expert_add_info_format(pinfo, meas_type_id_ti, &ei_oran_unexpected_measTypeId,
6388 "measTypeId %u (%s) not supported - only 5 is expected",
6389 meas_type_id,
6390 val_to_str_const(meas_type_id, meas_type_id_vals, "reserved"));
6391 break;
6392 }
6393 proto_item_append_text(mc_ti, " (%s)", val_to_str_const(meas_type_id, meas_type_id_vals, "unknown"));
6394
6395 } while (mf);
6396 }
6397
6398 /* Set extent of overall section */
6399 proto_item_set_len(sectionHeading, offset);
6400
6401 return offset;
6402}
6403
6404/* Dissect udCompHdr (user data compression header, 7.5.2.10) */
6405/* bit_width and comp_meth are out params */
6406static int dissect_udcomphdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset,
6407 bool_Bool cplane, bool_Bool ignore,
6408 unsigned *bit_width, unsigned *comp_meth, proto_item **comp_meth_ti,
6409 oran_tap_info *tap_info)
6410{
6411 /* Subtree */
6412 proto_item *udcomphdr_ti = proto_tree_add_string_format(tree, hf_oran_udCompHdr,
6413 tvb, offset, 1, "",
6414 "udCompHdr");
6415 proto_tree *udcomphdr_tree = proto_item_add_subtree(udcomphdr_ti, ett_oran_udcomphdr);
6416
6417 uint8_t byte = tvb_get_uint8(tvb, offset);
6418 uint32_t hdr_iq_width = 0, ud_comp_meth = 0;
6419
6420 /* Don't dissect fields if ignored and correctly set to 0 */
6421 if (!(ignore && byte == 0)) {
6422 /* udIqWidth */
6423
6424 proto_item *iq_width_item = proto_tree_add_item_ret_uint(udcomphdr_tree, hf_oran_udCompHdrIqWidth , tvb, offset, 1, ENC_NA0x00000000, &hdr_iq_width);
6425 proto_item_append_text(iq_width_item, " (%u bits)", (hdr_iq_width) ? hdr_iq_width : 16);
6426
6427 /* udCompMeth */
6428 *comp_meth_ti = proto_tree_add_item_ret_uint(udcomphdr_tree, hf_oran_udCompHdrMeth, tvb, offset, 1, ENC_NA0x00000000, &ud_comp_meth);
6429
6430 /* An ignored header does not change the settings */
6431 if (!ignore) {
6432 *bit_width = (hdr_iq_width) ? hdr_iq_width : 16;
6433 if (comp_meth) {
6434 *comp_meth = ud_comp_meth;
6435 }
6436 }
6437 }
6438
6439 /* Populate tap header with compression settings */
6440 if (!ignore) {
6441 tap_info->compression_methods |= (1 << ud_comp_meth);
6442 tap_info->compression_width = MAX(tap_info->compression_width, hdr_iq_width)(((tap_info->compression_width) > (hdr_iq_width)) ? (tap_info
->compression_width) : (hdr_iq_width))
;
6443 /* Summary */
6444 proto_item_append_text(udcomphdr_ti, " (IqWidth=%u, udCompMeth=%s)",
6445 *bit_width, rval_to_str_const(ud_comp_meth, ud_comp_header_meth, "Unknown"));
6446 }
6447 else {
6448 proto_item_append_text(udcomphdr_ti, " (ignored)");
6449 if (hdr_iq_width || ud_comp_meth) {
6450 if (cplane) {
6451 /* Only ignoring in DL for cplane */
6452 expert_add_info_format(pinfo, udcomphdr_ti, &ei_oran_udcomphdr_should_be_zero,
6453 "udCompHdr in C-Plane for DL should be 0 - found 0x%02x",
6454 tvb_get_uint8(tvb, offset));
6455 }
6456 else {
6457 /* TODO: Ignore UL if using m-plane/preference setting rather than c-plane, but wrong to be set? */
6458 /* expert_add_info_format(pinfo, udcomphdr_ti, &ei_oran_udcomphdr_should_be_zero,
6459 "udCompHdr in C-Plane for UL should be 0 - found 0x%02x",
6460 tvb_get_uint8(tvb, offset));
6461 */
6462 }
6463 }
6464 }
6465 return offset+1;
6466}
6467
6468/* Dissect udCompParam (user data compression parameter, 8.3.3.15) */
6469/* bit_width and comp_meth are out params */
6470static int dissect_udcompparam(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree, unsigned offset,
6471 unsigned comp_meth,
6472 uint32_t *exponent, uint16_t *sReSMask,
6473 bool_Bool for_sinr)
6474{
6475 if (for_sinr && (comp_meth != COMP_BLOCK_FP1)) {
6476 /* sinrCompParam only present when bfp is used */
6477 return offset;
6478 }
6479
6480 if (comp_meth == COMP_NONE0 ||
6481 comp_meth == COMP_MODULATION4 ||
6482 comp_meth == MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8) {
6483
6484 /* Not even creating a subtree for udCompMeth 0, 4, 8 */
6485 return offset;
6486 }
6487
6488 /* Subtree */
6489 unsigned start_offset = offset;
6490 proto_item *udcompparam_ti = proto_tree_add_string_format(tree, hf_oran_udCompParam,
6491 tvb, offset, 1, "",
6492 (for_sinr) ? "sinrCompParam" : "udCompParam");
6493 proto_tree *udcompparam_tree = proto_item_add_subtree(udcompparam_ti, ett_oran_udcompparam);
6494
6495 /* Show comp_meth as a generated field */
6496 proto_item *meth_ti = proto_tree_add_uint(udcompparam_tree, hf_oran_udCompHdrMeth_pref, tvb, 0, 0, comp_meth);
6497 proto_item_set_generated(meth_ti);
6498
6499 uint32_t param_exponent;
6500 uint64_t param_sresmask;
6501
6502 static int * const sres_mask_flags[] = {
6503 &hf_oran_sReSMask_re12,
6504 &hf_oran_sReSMask_re11,
6505 &hf_oran_sReSMask_re10,
6506 &hf_oran_sReSMask_re9,
6507 &hf_oran_sReSMask_re8,
6508 &hf_oran_sReSMask_re7,
6509 &hf_oran_sReSMask_re6,
6510 &hf_oran_sReSMask_re5,
6511 &hf_oran_sReSMask_re4,
6512 &hf_oran_sReSMask_re3,
6513 &hf_oran_sReSMask_re2,
6514 &hf_oran_sReSMask_re1,
6515 NULL((void*)0)
6516 };
6517
6518 switch (comp_meth) {
6519 case COMP_BLOCK_FP1: /* 1 */
6520 case BFP_AND_SELECTIVE_RE_WITH_MASKS7: /* 7 */
6521 /* reserved (4 bits) */
6522 add_reserved_field(udcompparam_tree, hf_oran_reserved_4bits, tvb, offset, 1);
6523 /* exponent (4 bits) */
6524 proto_tree_add_item_ret_uint(udcompparam_tree, hf_oran_exponent,
6525 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &param_exponent);
6526 *exponent = param_exponent;
6527 proto_item_append_text(udcompparam_ti, " (Exponent=%u)", param_exponent);
6528 offset += 1;
6529 break;
6530
6531 case COMP_BLOCK_SCALE2: /* 2 */
6532 /* Separate into integer and fractional bits? */
6533 proto_tree_add_item(udcompparam_tree, hf_oran_blockScaler,
6534 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
6535 offset++;
6536 break;
6537
6538 case COMP_U_LAW3: /* 3 */
6539 /* compBitWidth, compShift */
6540 proto_tree_add_item(udcompparam_tree, hf_oran_compBitWidth,
6541 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
6542 proto_tree_add_item(udcompparam_tree, hf_oran_compShift,
6543 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
6544 offset += 1;
6545 break;
6546
6547 case BFP_AND_SELECTIVE_RE5: /* 5 */
6548 {
6549 /* sReSMask (exponent in middle!) */
6550 proto_item *sresmask_ti;
6551 sresmask_ti = proto_tree_add_bitmask_ret_uint64(udcompparam_tree, tvb, offset,
6552 hf_oran_sReSMask,
6553 ett_oran_sresmask,
6554 sres_mask_flags,
6555 ENC_NA0x00000000,
6556 &param_sresmask);
6557
6558 /* Get rid of exponent-shaped gap */
6559 param_sresmask = ((param_sresmask >> 4) & 0x0f00) | (param_sresmask & 0xff);
6560 unsigned res = 0;
6561 for (unsigned n=0; n < 12; n++) {
6562 if ((param_sresmask >> n) & 0x1) {
6563 res++;
6564 }
6565 }
6566 proto_item_append_text(sresmask_ti, " (%2u REs)", res);
6567
6568 /* exponent */
6569 proto_tree_add_item_ret_uint(udcompparam_tree, hf_oran_exponent,
6570 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &param_exponent);
6571 *sReSMask = (uint16_t)param_sresmask;
6572 *exponent = param_exponent;
6573
6574 proto_item_append_text(udcompparam_ti, " (exponent=%u, %u REs)", *exponent, res);
6575 offset += 2;
6576 break;
6577 }
6578
6579 case MOD_COMPR_AND_SELECTIVE_RE6: /* 6 */
6580 {
6581 /* sReSMask (exponent in middle!) */
6582 proto_item *sresmask_ti;
6583
6584 sresmask_ti = proto_tree_add_bitmask_ret_uint64(udcompparam_tree, tvb, offset,
6585 hf_oran_sReSMask,
6586 ett_oran_sresmask,
6587 sres_mask_flags,
6588 ENC_NA0x00000000,
6589 &param_sresmask);
6590
6591 /* Get rid of reserved-shaped gap */
6592 param_sresmask = ((param_sresmask >> 4) & 0x0f00) | (param_sresmask & 0xff);
6593 unsigned res = 0;
6594 for (unsigned n=0; n < 12; n++) {
6595 if ((param_sresmask >> n) & 0x1) {
6596 res++;
6597 }
6598 }
6599 proto_item_append_text(sresmask_ti, " (%u REs)", res);
6600
6601 /* reserved (4 bits) */
6602 add_reserved_field(udcompparam_tree, hf_oran_reserved_last_4bits, tvb, offset, 1);
6603 *sReSMask = (uint16_t)param_sresmask;
6604
6605 proto_item_append_text(udcompparam_ti, " (%u REs)", res);
6606 offset += 2;
6607 break;
6608 }
6609
6610 default:
6611 /* reserved (set to all zeros), but how many bytes?? */
6612 break;
6613 }
6614
6615 proto_item_set_len(udcompparam_ti, offset-start_offset);
6616 return offset;
6617}
6618
6619
6620/* Dissect ciCompHdr (channel information compression header, 7.5.2.15) */
6621/* bit_width and comp_meth are out params */
6622static int dissect_cicomphdr(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree, unsigned offset,
6623 unsigned *bit_width, unsigned *comp_meth, uint8_t *comp_opt)
6624{
6625 /* Subtree */
6626 proto_item *cicomphdr_ti = proto_tree_add_string_format(tree, hf_oran_ciCompHdr,
6627 tvb, offset, 1, "",
6628 "ciCompHdr");
6629 proto_tree *cicomphdr_tree = proto_item_add_subtree(cicomphdr_ti, ett_oran_cicomphdr);
6630
6631 /* ciIqWidth */
6632 uint32_t hdr_iq_width;
6633 proto_item *iq_width_item = proto_tree_add_item_ret_uint(cicomphdr_tree, hf_oran_ciCompHdrIqWidth , tvb, offset, 1, ENC_NA0x00000000, &hdr_iq_width);
6634 hdr_iq_width = (hdr_iq_width) ? hdr_iq_width : 16;
6635 if (bit_width) {
6636 *bit_width = hdr_iq_width;
6637 }
6638 proto_item_append_text(iq_width_item, " (%u bits)", hdr_iq_width);
6639
6640 /* ciCompMeth */
6641 uint32_t ci_comp_meth;
6642 proto_tree_add_item_ret_uint(cicomphdr_tree, hf_oran_ciCompHdrMeth, tvb, offset, 1, ENC_NA0x00000000, &ci_comp_meth);
6643 if (comp_meth) {
6644 *comp_meth = ci_comp_meth;
6645 }
6646
6647 /* ciCompOpt */
6648 uint32_t opt;
6649 proto_tree_add_item_ret_uint(cicomphdr_tree, hf_oran_ciCompOpt, tvb, offset, 1, ENC_NA0x00000000, &opt);
6650 *comp_opt = opt;
6651 offset += 1;
6652
6653 /* Summary */
6654 proto_item_append_text(cicomphdr_ti, " (IqWidth=%u, ciCompMeth=%s, ciCompOpt=%s)",
6655 hdr_iq_width,
6656 rval_to_str_const(ci_comp_meth, ud_comp_header_meth, "Unknown"),
6657 (*comp_opt) ? "compression per PRB" : "compression per UE");
6658 return offset;
6659}
6660
6661static void dissect_payload_version(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, unsigned offset)
6662{
6663 unsigned version;
6664 proto_item *ti = proto_tree_add_item_ret_uint(tree, hf_oran_payload_version, tvb, offset, 1, ENC_NA0x00000000, &version);
6665 if (version != 1) {
6666 expert_add_info_format(pinfo, ti, &ei_oran_version_unsupported,
6667 "PayloadVersion %u not supported by dissector (only 1 is known)",
6668 version);
6669 /* TODO: should throw an exception? */
6670 }
6671}
6672
6673/* Time from earlier to later in units of unit_ns nanoseconds, rounded.
6674 0 if later is before earlier, and at most UINT32_MAX */
6675static uint32_t time_gap(const nstime_t *later, const nstime_t *earlier, uint32_t unit_ns)
6676{
6677 nstime_t delta;
6678 nstime_delta(&delta, later, earlier);
6679 if (delta.secs < 0 || (delta.secs == 0 && delta.nsecs < 0)) {
6680 return 0;
6681 }
6682 if ((uint64_t)delta.secs >= UINT32_MAX(4294967295U)) {
6683 return UINT32_MAX(4294967295U);
6684 }
6685 uint64_t units = ((uint64_t)delta.secs * (1000000000 / unit_ns)) +
6686 (((uint64_t)delta.nsecs + unit_ns/2) / unit_ns);
6687 return (uint32_t)MIN(units, UINT32_MAX)(((units) < ((4294967295U))) ? (units) : ((4294967295U)));
6688}
6689
6690static void show_link_to_acknack_request(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
6691 ack_nack_request_t *request)
6692{
6693 /* Request frame */
6694 proto_item *ti = proto_tree_add_uint(tree, hf_oran_acknack_request_frame,
6695 tvb, 0, 0, request->request_frame_number);
6696 PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
6697
6698 /* Work out gap between frames (in ms) */
6699 uint32_t total_gap = time_gap(&pinfo->abs_ts, &request->request_frame_time, 1000000);
6700
6701 ti = proto_tree_add_uint(tree, hf_oran_acknack_request_time,
6702 tvb, 0, 0, total_gap);
6703 PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
6704
6705 /* Type of request */
6706 ti = proto_tree_add_uint(tree, hf_oran_acknack_request_type,
6707 tvb, 0, 0, request->requestType);
6708 PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
6709}
6710
6711static void show_link_to_acknack_response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
6712 ack_nack_request_t *response)
6713{
6714 if (response->response_frame_number == 0) {
6715 /* Requests may not get a response, and can't always tell when to expect one */
6716 return;
6717 }
6718
6719 /* Response frame */
6720 proto_item *ti = proto_tree_add_uint(tree, hf_oran_acknack_response_frame,
6721 tvb, 0, 0, response->response_frame_number);
6722 PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
6723
6724 /* Work out gap between frames (in ms) */
6725 uint32_t total_gap = time_gap(&response->response_frame_time, &pinfo->abs_ts, 1000000);
6726
6727 ti = proto_tree_add_uint(tree, hf_oran_acknack_response_time,
6728 tvb, 0, 0, total_gap);
6729 PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
6730}
6731
6732
6733
6734/* Control plane dissector (section 7). */
6735static int dissect_oran_c(tvbuff_t *tvb, packet_info *pinfo,
6736 proto_tree *tree, oran_tap_info *tap_info, void *data _U___attribute__((unused)))
6737{
6738 /* Hidden filter for plane */
6739 proto_item *plane_ti = proto_tree_add_item(tree, hf_oran_cplane, tvb, 0, 0, ENC_NA0x00000000);
6740 PROTO_ITEM_SET_HIDDEN(plane_ti)proto_item_set_hidden((plane_ti));
6741
6742 /* Set up structures needed to add the protocol subtree and manage it */
6743 unsigned offset = 0;
6744
6745 col_set_str(pinfo->cinfo, COL_PROTOCOL, "O-RAN-FH-C");
6746 col_set_str(pinfo->cinfo, COL_INFO, "C-Plane");
6747
6748 tap_info->userplane = false0;
6749
6750 /* Create display subtree for the protocol */
6751 proto_item *protocol_item = proto_tree_add_item(tree, proto_oran, tvb, 0, -1, ENC_NA0x00000000);
6752 proto_item_append_text(protocol_item, "-C");
6753 proto_tree *oran_tree = proto_item_add_subtree(protocol_item, ett_oran);
6754
6755 /* ecpriRtcid (eAxC ID) */
6756 uint16_t eAxC;
6757 addPcOrRtcid(tvb, oran_tree, &offset, hf_oran_ecpri_rtcid, &eAxC, tap_info);
6758 tap_info->eaxc = eAxC;
6759
6760 /* Look up any existing conversation state for eAxC+plane */
6761 flow_state_t* state = lookup_flow(pinfo, eAxC, ORAN_C_PLANE0, false0);
6762
6763 /* Message identifier */
6764 uint32_t seq_id, sub_seq_id, e;
6765 proto_item *seq_id_ti;
6766 offset = addSeqid(tvb, oran_tree, offset, ORAN_C_PLANE0, &seq_id, &seq_id_ti, &sub_seq_id, &e);
6767
6768 /* Section common subtree */
6769 int section_tree_offset = offset;
6770 proto_item *sectionHeading = proto_tree_add_string_format(oran_tree, hf_oran_c_section_common,
6771 tvb, offset, 0, "", "C-Plane Section Type ");
6772 proto_tree *section_tree = proto_item_add_subtree(sectionHeading, ett_oran_c_section_common);
6773
6774 /* Peek ahead at the section type */
6775 uint32_t sectionType = 0;
6776 sectionType = tvb_get_uint8(tvb, offset+5);
6777
6778 uint32_t scs = 0;
6779 proto_item *scs_ti = NULL((void*)0);
6780
6781 /* dataDirection */
6782 uint32_t direction = 0;
6783 proto_item *datadir_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_data_direction, tvb, offset, 1, ENC_NA0x00000000, &direction);
6784 tap_info->uplink = (direction==0);
6785
6786 /* Update/report status of conversation */
6787 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
6788
6789 if (state == NULL((void*)0)) {
6790 /* Allocate state now */
6791 state = wmem_new0(wmem_file_scope(), flow_state_t)((flow_state_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_state_t
)))
;
6792 state->ack_nack_requests = wmem_tree_new(wmem_file_scope());
6793 store_flow(pinfo, eAxC, ORAN_C_PLANE0, false0, state);
6794 /* Tables for each direction */
6795 state->expected_sections[0] = wmem_tree_new(wmem_file_scope());
6796 state->expected_sections[1] = wmem_tree_new(wmem_file_scope());
6797 }
6798
6799 /* Check sequence analysis status */
6800 if (state->last_frame_seen[direction] && (seq_id != state->next_expected_sequence_number[direction])) {
6801 /* Store this result */
6802 flow_result_t *result = wmem_new0(wmem_file_scope(), flow_result_t)((flow_result_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_result_t
)))
;
6803 result->unexpected_seq_number = true1;
6804 result->expected_sequence_number = state->next_expected_sequence_number[direction];
6805 result->previous_frame = state->last_frame[direction];
6806 result->u_plane_frames = wmem_list_new(wmem_file_scope());
6807 wmem_tree_insert32(flow_results_table, pinfo->num, result);
6808 }
6809 /* Update conversation info */
6810 state->last_frame[direction] = pinfo->num;
6811 state->last_frame_seen[direction] = true1;
6812 state->next_expected_sequence_number[direction] = (seq_id+1) % 256;
6813 }
6814
6815 /* Show any issues associated with this frame number */
6816 flow_result_t *result = wmem_tree_lookup32(flow_results_table, pinfo->num);
6817 if (result!=NULL((void*)0) && result->unexpected_seq_number) {
6818 expert_add_info_format(pinfo, seq_id_ti,
6819 (direction == DIR_UPLINK0) ?
6820 &ei_oran_cplane_unexpected_sequence_number_ul :
6821 &ei_oran_cplane_unexpected_sequence_number_dl,
6822 "Sequence number %u expected, but got %u",
6823 result->expected_sequence_number, seq_id);
6824
6825 /* Update tap info */
6826 uint32_t missing_sns = (256 + seq_id - result->expected_sequence_number) % 256;
6827 /* Don't get confused by being slightly out of order.. */
6828 if (missing_sns < 128) {
6829 tap_info->missing_sns = missing_sns;
6830 }
6831 else {
6832 tap_info->missing_sns = 0;
6833 }
6834
6835 /* Show link back to previous frame in stream */
6836 proto_item *prev_ti = proto_tree_add_uint(proto_item_get_subtree(proto_item_get_parent(seq_id_ti)),
6837 hf_oran_previous_frame, tvb, 0, 0, result->previous_frame);
6838 proto_item_set_generated(prev_ti);
6839 }
6840
6841 /* payloadVersion */
6842 dissect_payload_version(section_tree, tvb, pinfo, offset);
6843
6844 /* filterIndex */
6845 if (sectionType == SEC_C_SLOT_CONTROL || sectionType == SEC_C_ACK_NACK_FEEDBACK) {
6846 /* scs (for ST4 and ST8) */
6847 scs_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_frameStructure_subcarrier_spacing, tvb, offset, 1, ENC_NA0x00000000, &scs);
6848 }
6849 else if (sectionType == SEC_C_RRM_MEAS_REPORTS || sectionType == SEC_C_RRM_MEAS_REPORTS_NON_TIMING || sectionType == SEC_C_REQUEST_RRM_MEAS) {
6850 /* reserved (4 bits) */
6851 add_reserved_field(section_tree, hf_oran_reserved_last_4bits, tvb, offset, 1);
6852 }
6853 else if (sectionType != SEC_C_LAA) {
6854 /* filterIndex (most common case) */
6855 proto_tree_add_item(section_tree, hf_oran_filter_index, tvb, offset, 1, ENC_NA0x00000000);
6856 }
6857 offset += 1;
6858
6859 unsigned ref_a_offset = offset;
6860 /* frameId */
6861 uint32_t frameId = 0;
6862 proto_tree_add_item_ret_uint(section_tree, hf_oran_frame_id, tvb, offset, 1, ENC_NA0x00000000, &frameId);
6863 tap_info->frame = frameId;
6864 offset += 1;
6865
6866 /* subframeId */
6867 uint32_t subframeId = 0;
6868 proto_tree_add_item_ret_uint(section_tree, hf_oran_subframe_id, tvb, offset, 1, ENC_NA0x00000000, &subframeId);
6869 /* slotId */
6870 uint32_t slotId = 0;
6871 proto_tree_add_item_ret_uint(section_tree, hf_oran_slot_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &slotId);
6872 tap_info->slot = slotId;
6873 offset++;
6874
6875 /* startSymbolId */
6876 uint32_t startSymbolId = 0;
6877 proto_item *ssid_ti = NULL((void*)0);
6878 if ((sectionType == SEC_C_ACK_NACK_FEEDBACK) || /* Section Type 8 */
6879 (sectionType == SEC_C_SINR_REPORTING)) { /* Section Type 9 */
6880 /* symbolId */
6881 proto_tree_add_item_ret_uint(section_tree, hf_oran_symbolId, tvb, offset, 1, ENC_NA0x00000000, &startSymbolId);
6882 }
6883 else if (sectionType != SEC_C_LAA) {
6884 /* startSymbolId is in most section types */
6885 ssid_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_start_symbol_id, tvb, offset, 1, ENC_NA0x00000000, &startSymbolId);
6886 if (startSymbolId && (sectionType == SEC_C_RRM_MEAS_REPORTS)) { /* Section Type 10 */
6887 proto_item_append_text(ssid_ti, " (should be 0 for ST10!)");
6888 expert_add_info_format(pinfo, ssid_ti, &ei_oran_st10_startsymbolid_not_0,
6889 "startSymbolId should be 0 for ST10 - found %u", startSymbolId);
6890 }
6891 }
6892 else {
6893 /* reserved (6 bits) */
6894 add_reserved_field(section_tree, hf_oran_reserved_last_6bits, tvb, offset, 1);
6895 }
6896 offset++;
6897
6898
6899 char id[16];
6900 snprintf(id, 16, "%u-%u-%u-%u", frameId, subframeId, slotId, startSymbolId);
6901 proto_item *pi = proto_tree_add_string(section_tree, hf_oran_refa, tvb, ref_a_offset, 3, id);
6902 proto_item_set_generated(pi);
6903
6904 uint32_t cmd_scope = 0;
6905 bool_Bool st8_ready = false0;
6906
6907 /* numberOfSections (or whatever section has instead) */
6908 uint32_t nSections = 0;
6909 if (sectionType == SEC_C_SLOT_CONTROL) { /* Section Type 4 */
6910 /* Slot Control has these fields instead */
6911 /* reserved (4 bits) */
6912 add_reserved_field(section_tree, hf_oran_reserved_4bits, tvb, offset, 1);
6913 /* cmdScope (4 bits) */
6914 proto_tree_add_item_ret_uint(section_tree, hf_oran_cmd_scope, tvb, offset, 1, ENC_NA0x00000000, &cmd_scope);
6915 }
6916 else if (sectionType == SEC_C_ACK_NACK_FEEDBACK) { /* Section Type 8 */
6917 /* reserved (7 bits) */
6918 add_reserved_field(section_tree, hf_oran_reserved_7bits, tvb, offset, 1);
6919 /* ready (1 bit) */
6920 /* TODO: when set, ready in slotId+1.. */
6921 proto_tree_add_item_ret_boolean(section_tree, hf_oran_ready, tvb, offset, 1, ENC_NA0x00000000, &st8_ready);
6922 if (!st8_ready) {
6923 /* SCS value is ignored, and may be set to any value by O-RU */
6924 proto_item_append_text(scs_ti, " (ignored)");
6925 }
6926 }
6927 else if (sectionType != SEC_C_LAA) {
6928 /* numberOfSections */
6929 proto_tree_add_item_ret_uint(section_tree, hf_oran_numberOfSections, tvb, offset, 1, ENC_NA0x00000000, &nSections);
6930 }
6931 else {
6932 add_reserved_field(section_tree, hf_oran_reserved_8bits, tvb, offset, 1);
6933 }
6934 offset++;
6935
6936 /* sectionType */
6937 proto_tree_add_item_ret_uint(section_tree, hf_oran_sectionType, tvb, offset, 1, ENC_NA0x00000000, &sectionType);
6938 offset += 1;
6939
6940 /* Check that dataDirection is consistent with section type */
6941 if (sectionType == SEC_C_SINR_REPORTING && direction != 0) { /* Section Type 9 */
6942 expert_add_info(pinfo, datadir_ti, &ei_oran_st9_not_ul);
6943 }
6944 if (sectionType == SEC_C_RRM_MEAS_REPORTS && direction != 0) { /* Section Type 10 */
6945 expert_add_info(pinfo, datadir_ti, &ei_oran_st10_not_ul);
6946 }
6947
6948 /* Note this section type in stats */
6949 if (sectionType < SEC_C_MAX_INDEX) {
6950 tap_info->section_types[sectionType] = true1;
6951 }
6952
6953 /* Section-type-specific fields following common header (white entries in Section Type diagrams) */
6954 unsigned bit_width = 0;
6955 unsigned comp_meth = 0;
6956 proto_item *comp_meth_ti;
6957 unsigned ci_comp_method = 0;
6958 uint8_t ci_comp_opt = 0;
6959
6960 uint32_t num_ues = 0;
6961 uint32_t number_of_acks = 0, number_of_nacks = 0;
6962
6963 uint32_t num_sinr_per_prb = 0;
6964
6965 switch (sectionType) {
6966 case SEC_C_UNUSED_RB: /* Section Type 0 */
6967 /* timeOffset */
6968 proto_tree_add_item(section_tree, hf_oran_timeOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
6969 offset += 2;
6970 /* frameStructure */
6971 offset = dissect_frame_structure(section_tree, tvb, offset,
6972 subframeId, slotId);
6973
6974 /* cpLength */
6975 proto_tree_add_item(section_tree, hf_oran_cpLength, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
6976 offset += 2;
6977 /* reserved (8 bits) */
6978 add_reserved_field(section_tree, hf_oran_reserved_8bits, tvb, offset, 1);
6979 offset += 1;
6980 break;
6981
6982 case SEC_C_NORMAL: /* Section Type 1 */
6983 case SEC_C_UE_SCHED: /* Section Type 5 */
6984 /* udCompHdr */
6985 offset = dissect_udcomphdr(tvb, pinfo, section_tree, offset,
6986 true1, direction==1 || pref_override_ul_compression, /* ignore for DL or if using mplane for UL settings */
6987 &bit_width, &comp_meth, &comp_meth_ti, tap_info);
6988 /* reserved (8 bits) */
6989 add_reserved_field(section_tree, hf_oran_reserved_8bits, tvb, offset, 1);
6990 offset += 1;
6991 break;
6992
6993 case SEC_C_SLOT_CONTROL: /* Section Type 4 */
6994 break;
6995
6996 case SEC_C_PRACH: /* Section Type 3 */
6997 /* timeOffset */
6998 proto_tree_add_item(section_tree, hf_oran_timeOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
6999 offset += 2;
7000 /* frameStructure */
7001 offset = dissect_frame_structure(section_tree, tvb, offset,
7002 subframeId, slotId);
7003 /* cpLength */
7004 proto_tree_add_item(section_tree, hf_oran_cpLength, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7005 offset += 2;
7006 /* udCompHdr */
7007 offset = dissect_udcomphdr(tvb, pinfo, section_tree, offset,
7008 true1, direction==1 || pref_override_ul_compression, /* ignore for DL or if using mplane for UL settings */
7009 &bit_width, &comp_meth, &comp_meth_ti, tap_info);
7010 break;
7011
7012 case SEC_C_CH_INFO: /* Section Type 6 */
7013 /* numberOfUEs */
7014 proto_tree_add_item_ret_uint(section_tree, hf_oran_numberOfUEs, tvb, offset, 1, ENC_NA0x00000000, &num_ues);
7015 offset += 1;
7016 /* ciCompHdr (was reserved) */
7017 offset = dissect_cicomphdr(tvb, pinfo, section_tree, offset, &bit_width, &ci_comp_method, &ci_comp_opt);
7018
7019 /* Number of sections may not be filled in (at all, or correctly), so set to the number of UEs.
7020 The data entries are per-UE... they don't have a sectionID, but they could have section extensions... */
7021 if (nSections == 0 || num_ues > nSections) {
7022 nSections = num_ues;
7023 }
7024 break;
7025
7026 case SEC_C_RSVD2:
7027 break;
7028
7029 case SEC_C_LAA: /* Section Type 7 */
7030 add_reserved_field(section_tree, hf_oran_reserved_16bits, tvb, offset, 2);
7031 offset += 2;
7032 break;
7033
7034 case SEC_C_ACK_NACK_FEEDBACK: /* Section Type 8 */
7035 /* numberOfAcks (1 byte) */
7036 proto_tree_add_item_ret_uint(section_tree, hf_oran_number_of_acks, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &number_of_acks);
7037 offset += 1;
7038 /* numberOfNacks (1 byte) */
7039 proto_tree_add_item_ret_uint(section_tree, hf_oran_number_of_nacks, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &number_of_nacks);
7040 offset += 1;
7041
7042 /* The requests were sent by the O-DU, in the other direction (or the same, if sent by the O-DU) */
7043 flow_state_t *request_state = lookup_flow(pinfo, eAxC, ORAN_C_PLANE0, true1);
7044 if (!request_state || !request_state->ack_nack_requests) {
7045 request_state = state;
7046 }
7047
7048 /* Show ACKs and NACKs. For both, try to link back to request. */
7049 for (unsigned int n=1; n <= number_of_acks; n++) {
7050 uint32_t ackid;
7051 proto_item *ack_ti;
7052 ack_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_ackid, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ackid);
7053 offset += 2;
7054
7055 /* Look up request table in state (which really should be set by now, but test anyway). */
7056 if (request_state && request_state->ack_nack_requests) {
7057 ack_nack_request_t *request = wmem_tree_lookup32(request_state->ack_nack_requests, ackid);
7058 if (!request && state && state->ack_nack_requests) {
7059 request = wmem_tree_lookup32(state->ack_nack_requests, ackid);
7060 }
7061 if (request != NULL((void*)0)) {
7062 /* On first pass, update with this response */
7063 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
7064 request->response_frame_number = pinfo->num;
7065 request->response_frame_time = pinfo->abs_ts;
7066 }
7067
7068 /* Show request details */
7069 show_link_to_acknack_request(section_tree, tvb, pinfo, request);
7070 }
7071 else {
7072 /* Request not found */
7073 expert_add_info_format(pinfo, ack_ti, &ei_oran_acknack_no_request,
7074 "Response for ackId=%u received, but no request found",
7075 ackid);
7076 }
7077 }
7078 }
7079 for (unsigned int m=1; m <= number_of_nacks; m++) {
7080 uint32_t nackid;
7081 proto_item *nack_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_nackid, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &nackid);
7082 offset += 2;
7083
7084 expert_add_info_format(pinfo, nack_ti, &ei_oran_st8_nackid,
7085 "Received Nack for ackNackId=%u",
7086 nackid);
7087
7088 /* Look up request table in state. */
7089 if (request_state && request_state->ack_nack_requests) {
7090 ack_nack_request_t *request = wmem_tree_lookup32(request_state->ack_nack_requests, nackid);
7091 if (!request && state && state->ack_nack_requests) {
7092 request = wmem_tree_lookup32(state->ack_nack_requests, nackid);
7093 }
7094 if (request) {
7095 /* On first pass, update with this response */
7096 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
7097 request->response_frame_number = pinfo->num;
7098 request->response_frame_time = pinfo->abs_ts;
7099 }
7100
7101 /* Show request details */
7102 show_link_to_acknack_request(section_tree, tvb, pinfo, request);
7103 }
7104 else {
7105 /* Request not found */
7106 expert_add_info_format(pinfo, nack_ti, &ei_oran_acknack_no_request,
7107 "Response for nackId=%u received, but no request found",
7108 nackid);
7109 }
7110 }
7111 }
7112 break;
7113
7114 case SEC_C_SINR_REPORTING: /* Section Type 9 */
7115 {
7116 /* numSinrPerPrb (3 bits) */
7117 proto_item *nspp_ti;
7118 nspp_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_num_sinr_per_prb_st9, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_sinr_per_prb);
7119 switch (num_sinr_per_prb) {
7120 case 0:
7121 num_sinr_per_prb = 1; break;
7122 case 1:
7123 num_sinr_per_prb = 2; break;
7124 case 2:
7125 num_sinr_per_prb = 3; break;
7126 case 3:
7127 num_sinr_per_prb = 4; break;
7128 case 4:
7129 num_sinr_per_prb = 6; break;
7130 case 5:
7131 num_sinr_per_prb = 12; break;
7132
7133 default:
7134 proto_item_append_text(nspp_ti, " (invalid)");
7135 expert_add_info_format(pinfo, nspp_ti, &ei_oran_num_sinr_per_prb_unknown,
7136 "Invalid numSinrPerPrb value (%u)",
7137 num_sinr_per_prb);
7138 num_sinr_per_prb = 1;
7139 }
7140
7141 /* oruControlSinrSlotMaskId (5 bits) */
7142 proto_tree_add_item(section_tree, hf_oran_oru_control_sinr_slot_mask_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7143 offset += 1;
7144 /* reserved (8 bits) */
7145 add_reserved_field(section_tree, hf_oran_reserved_8bits, tvb, offset, 1);
7146 offset += 1;
7147 break;
7148 }
7149
7150 case SEC_C_RRM_MEAS_REPORTS: /* Section Type 10 */
7151 case SEC_C_REQUEST_RRM_MEAS: /* Section Type 11 */
7152 case SEC_C_SRS_DESCRIPTION: /* Section Type 12 */
7153 case SEC_C_RRM_MEAS_REPORTS_NON_TIMING: /* Section Type 13 */
7154 case SEC_C_CO_SCHEDULING_INFO: /* Section Type 14 */
7155 /* reserved (16 bits) */
7156 add_reserved_field(section_tree, hf_oran_reserved_16bits, tvb, offset, 2);
7157 offset += 2;
7158 break;
7159 };
7160
7161 /* Update udCompHdr details in state for UL U-Plane */
7162 if (state && direction==0 && !PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
7163 switch (sectionType) {
7164 case SEC_C_NORMAL: /* Section Type 1 */
7165 case SEC_C_PRACH: /* Section Type 3 */
7166 case SEC_C_UE_SCHED: /* Section Type 5 */
7167 state->ul_ud_comp_hdr_set = true1;
7168 state->ul_ud_comp_hdr_bit_width = bit_width;
7169 state->ul_ud_comp_hdr_compression = comp_meth;
7170 state->ul_ud_comp_hdr_frame = pinfo->num;
7171 break;
7172 default:
7173 break;
7174 }
7175 }
7176
7177
7178 proto_item_append_text(sectionHeading, "%d, %s, frameId: %d, subframeId: %d, slotId: %d, startSymbolId: %d",
7179 sectionType, val_to_str_const(direction, data_direction_vals, "Unknown"),
7180 frameId, subframeId, slotId, startSymbolId);
7181 if (nSections) {
7182 proto_item_append_text(sectionHeading, ", numberOfSections=%u", nSections);
7183 }
7184
7185 write_pdu_label_and_info(protocol_item, NULL((void*)0), pinfo, ", Type: %2d %s", sectionType,
7186 rval_to_str_const(sectionType, section_types_short, "Unknown"));
7187
7188 /* Set actual length of C-Plane section header */
7189 proto_item_set_len(section_tree, offset - section_tree_offset);
7190
7191 if (sectionType == SEC_C_ACK_NACK_FEEDBACK) {
7192 write_pdu_label_and_info(oran_tree, section_tree, pinfo,
7193 (st8_ready) ? " (Ready)" : " (ACK)");
7194 }
7195
7196
7197 /* Section type 4 doesn't have normal sections, so deal with here before normal sections */
7198 if (sectionType == SEC_C_SLOT_CONTROL) {
7199 /* numberOfST4Cmds */
7200 uint32_t no_st4_cmds, st4_cmd_len, num_slots, ack_nack_req_id, st4_cmd_type;
7201 proto_item *no_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_number_of_st4_cmds,
7202 tvb, offset, 1, ENC_NA0x00000000, &no_st4_cmds);
7203 if (no_st4_cmds == 0) {
7204 expert_add_info(pinfo, no_ti, &ei_oran_st4_no_cmds);
7205 }
7206 offset += 1;
7207
7208 /* reserved (1 byte) */
7209 add_reserved_field(section_tree, hf_oran_reserved_8bits, tvb, offset, 1);
7210 offset += 1;
7211
7212 /* Loop over commands. Each has 8-byte common header, followed by cmd-specific payload */
7213 proto_item *len_ti;
7214 for (uint32_t n=0; n < no_st4_cmds; n++) {
7215 /* Table 7.4.6-2: Section Type 4 Command common header format */
7216 proto_item *hdr_ti = proto_tree_add_string_format(section_tree, hf_oran_st4_cmd_header,
7217 tvb, offset, 8, "",
7218 "Type 4 Command common header");
7219 proto_tree *hdr_tree = proto_item_add_subtree(hdr_ti, ett_oran_st4_cmd_header);
7220
7221 /* st4CmdType */
7222 proto_tree_add_item_ret_uint(hdr_tree, hf_oran_st4_cmd_type, tvb, offset, 1, ENC_NA0x00000000, &st4_cmd_type);
7223 offset += 1;
7224
7225 /* st4CmdLen */
7226 len_ti = proto_tree_add_item_ret_uint(hdr_tree, hf_oran_st4_cmd_len, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &st4_cmd_len);
7227 if (st4_cmd_len == 0) {
7228 /* Meaning of 0 not yet defined (v15.00) */
7229 proto_item_append_text(len_ti, " (reserved)");
7230 expert_add_info(pinfo, len_ti, &ei_oran_st4_zero_len_cmd);
7231 }
7232 else {
7233 proto_item_append_text(len_ti, " (%u bytes)", st4_cmd_len*4);
7234 }
7235 offset += 2;
7236
7237 /* numSlots */
7238 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);
7239 if (num_slots == 0) {
7240 proto_item_append_text(slots_ti, " (until changed)");
7241 }
7242 offset += 1;
7243
7244 /* ackNackReqId */
7245 proto_item *ack_nack_req_id_ti;
7246 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);
7247 offset += 2;
7248 if (ack_nack_req_id == 0) {
7249 proto_item_append_text(ack_nack_req_id_ti, " (no Section type 8 response expected)");
7250 }
7251
7252 /* reserved (16 bits) */
7253 add_reserved_field(hdr_tree, hf_oran_reserved_16bits, tvb, offset, 2);
7254 offset += 2;
7255
7256 /* Set common header summary */
7257 proto_item_append_text(hdr_ti, " (cmd=%s, len=%u, slots=%u, ackNackReqId=%u)",
7258 rval_to_str_const(st4_cmd_type, st4_cmd_type_vals, "Unknown"),
7259 st4_cmd_len, num_slots, ack_nack_req_id);
7260
7261 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
7262 rval_to_str_const(st4_cmd_type, st4_cmd_type_vals, "Unknown"));
7263
7264
7265 /* Subtree for this command body */
7266 proto_item *command_ti = proto_tree_add_string_format(section_tree, hf_oran_st4_cmd,
7267 tvb, offset, 0, "",
7268 "Type 4 Command (%s)", rval_to_str_const(st4_cmd_type, st4_cmd_type_vals, "Unknown"));
7269 proto_tree *command_tree = proto_item_add_subtree(command_ti, ett_oran_st4_cmd);
7270
7271 unsigned command_start_offset = offset;
7272
7273 /* Check fields compatible with chosen command. */
7274 if (st4_cmd_type==1) {
7275 if (num_slots != 0) {
7276 /* "the value of numSlots should be set to zero for this command type" */
7277 expert_add_info_format(pinfo, slots_ti, &ei_oran_numslots_not_zero,
7278 "numSlots should be zero for ST4 command 1 - found %u",
7279 num_slots);
7280 }
7281 }
7282
7283 if (st4_cmd_type==3 || st4_cmd_type==4) {
7284 if (startSymbolId != 0) {
7285 /* "expected reception window for the commands is the symbol zero reception window" */
7286 expert_add_info_format(pinfo, ssid_ti, &ei_oran_start_symbol_id_not_zero,
7287 "startSymbolId should be zero for ST4 commands 3&4 - found %u",
7288 startSymbolId);
7289 }
7290 }
7291
7292 /* Add format for this command */
7293 switch (st4_cmd_type) {
7294 case 1: /* TIME_DOMAIN_BEAM_CONFIG */
7295 {
7296 bool_Bool disable_tdbfns;
7297 uint32_t bfwcomphdr_iq_width, bfwcomphdr_comp_meth;
7298
7299 /* Hidden filter for bf */
7300 proto_item *bf_ti = proto_tree_add_item(command_tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
7301 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
7302
7303 /* reserved (2 bits) */
7304 add_reserved_field(command_tree, hf_oran_reserved_2bits, tvb, offset, 1);
7305 /* symbolMask (14 bits) */
7306 uint32_t symbol_mask;
7307 proto_item *symbol_mask_ti;
7308 offset = dissect_symbolmask(tvb, command_tree, offset, &symbol_mask, &symbol_mask_ti);
7309 /* 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 */
7310 /* lsb is symbol 0 */
7311 for (unsigned s=0; s < 14; s++) {
7312 if ((symbol_mask & (1 << s)) && (startSymbolId > s)) {
7313 proto_item_append_text(symbol_mask_ti, " (startSymbolId is %u, so some lower symbol bits ignored!)", startSymbolId);
7314 expert_add_info(pinfo, symbol_mask_ti, &ei_oran_start_symbol_id_bits_ignored);
7315 break;
7316 }
7317 }
7318
7319 /* disableTDBFNs (1 bit) */
7320 proto_tree_add_item_ret_boolean(command_tree, hf_oran_disable_tdbfns, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &disable_tdbfns);
7321
7322 /* tdBeamNum (15 bits) */
7323 proto_tree_add_item(command_tree, hf_oran_td_beam_num, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7324 offset += 2;
7325
7326 /* bfwCompHdr (2 subheaders - bfwIqWidth and bfwCompMeth)*/
7327 offset = dissect_bfwCompHdr(tvb, command_tree, offset,
7328 &bfwcomphdr_iq_width, &bfwcomphdr_comp_meth, &comp_meth_ti);
7329 /* reserved (3 bytes) */
7330 proto_tree_add_bits_item(command_tree, hf_oran_reserved, tvb, offset*8, 24, ENC_BIG_ENDIAN0x00000000);
7331 offset += 3;
7332
7333 if (disable_tdbfns) {
7334 /* No beamnum information to show so get out. */
7335 break;
7336 }
7337
7338 /* Read beam entries until reach end of command length */
7339 while ((offset - command_start_offset) < (st4_cmd_len * 4)) {
7340 /* Stop at the padding (fewer than 4 zero bytes) at the end of the command.
7341 An entry with BFWs does not fit there. */
7342 unsigned remaining = command_start_offset + (st4_cmd_len * 4) - offset;
7343 bool_Bool padding = (remaining < 4);
7344 for (unsigned b=0; padding && b < remaining; b++) {
7345 padding = (tvb_get_uint8(tvb, offset+b) == 0);
7346 }
7347 if (padding) {
7348 break;
7349 }
7350
7351 /* disableTDBFWs (1 bit) */
7352 bool_Bool disable_tdbfws;
7353 proto_tree_add_item_ret_boolean(command_tree, hf_oran_disable_tdbfws, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &disable_tdbfws);
7354
7355 /* tdBeamNum (15 bits) */
7356 proto_tree_add_item(command_tree, hf_oran_td_beam_num, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7357 offset += 2;
7358
7359 /* Showing BFWs? */
7360 if (!disable_tdbfws) {
7361
7362 /* bfwCompParam */
7363 unsigned exponent = 0;
7364 bool_Bool supported = false0;
7365 unsigned num_trx_entries;
7366 uint16_t *trx_entries;
7367 offset = dissect_bfwCompParam(tvb, command_tree, pinfo, offset, comp_meth_ti,
7368 &bfwcomphdr_comp_meth, &exponent, &supported,
7369 &num_trx_entries, &trx_entries);
7370
7371 /* Antenna count from preference */
7372 unsigned num_trx = pref_num_bf_antennas;
7373 int bit_offset = offset*8;
7374
7375 for (unsigned trx=0; trx < num_trx; trx++) {
7376 /* Create antenna subtree */
7377 int bfw_offset = bit_offset / 8;
7378 proto_item *bfw_ti = proto_tree_add_string_format(command_tree, hf_oran_bfw,
7379 tvb, bfw_offset, 0, "", "TRX %3u: (", trx+1);
7380 proto_tree *bfw_tree = proto_item_add_subtree(bfw_ti, ett_oran_bfw);
7381
7382 /* I value */
7383 /* Get bits, and convert to float. */
7384 uint32_t bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
7385 float value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent, NULL((void*)0) /* no ModCompr*/, 0 /* RE */);
7386 /* Add to tree. */
7387 proto_tree_add_float(bfw_tree, hf_oran_bfw_i, tvb, bit_offset/8,
7388 (bfwcomphdr_iq_width+7)/8, value);
7389 bit_offset += bfwcomphdr_iq_width;
7390 proto_item_append_text(bfw_ti, "I=%f ", value);
7391
7392 /* Leave a gap between I and Q values */
7393 proto_item_append_text(bfw_ti, " ");
7394
7395 /* Q value */
7396 /* Get bits, and convert to float. */
7397 bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
7398 value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent, NULL((void*)0) /* no ModCompr*/, 0 /* RE */);
7399 /* Add to tree. */
7400 proto_tree_add_float(bfw_tree, hf_oran_bfw_q, tvb, bit_offset/8,
7401 (bfwcomphdr_iq_width+7)/8, value);
7402 bit_offset += bfwcomphdr_iq_width;
7403 proto_item_append_text(bfw_ti, "Q=%f", value);
7404
7405 proto_item_append_text(bfw_ti, ")");
7406 proto_item_set_len(bfw_ti, (bit_offset+7)/8 - bfw_offset);
7407 }
7408 /* Need to round to next byte */
7409 offset = (bit_offset+7)/8;
7410 }
7411 }
7412 break;
7413 }
7414 case 2: /* TDD_CONFIG_PATTERN */
7415 /* reserved (2 bits) */
7416 add_reserved_field(command_tree, hf_oran_reserved_2bits, tvb, offset, 1);
7417 /* dirPattern (14 bits) */
7418 proto_tree_add_item(command_tree, hf_oran_dir_pattern, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7419 offset += 2;
7420
7421 /* reserved (2 bits) */
7422 add_reserved_field(command_tree, hf_oran_reserved_2bits, tvb, offset, 1);
7423 /* guardPattern (14 bits) */
7424 proto_tree_add_item(command_tree, hf_oran_guard_pattern, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7425 offset += 2;
7426 break;
7427
7428 case 3: /* TRX_CONTROL */
7429 case 5: /* TRX_CONTROL_BIDIR */
7430 {
7431 /* Only allowed cmdScope is ARRAY-COMMAND */
7432 if (cmd_scope != 0) {
7433 expert_add_info(pinfo, command_tree, &ei_oran_trx_control_cmd_scope);
7434 }
7435
7436 /* reserved (2 bits) */
7437 add_reserved_field(command_tree, hf_oran_reserved_2bits, tvb, offset, 1);
7438 /* log2MaskBits (4 bits) */
7439 unsigned log2maskbits;
7440 proto_tree_add_item_ret_uint(command_tree, hf_oran_log2maskbits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &log2maskbits);
7441 /* sleepMode (2 bits) */
7442 uint32_t sleep_mode;
7443 proto_tree_add_item_ret_uint(command_tree, hf_oran_sleepmode_trx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &sleep_mode);
7444 offset += 1;
7445
7446 /* reserved (4 bits) */
7447 add_reserved_field(command_tree, hf_oran_reserved_4bits, tvb, offset, 1);
7448 /* numSlotsExt (20 bits) */
7449 uint32_t num_slots_ext;
7450 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);
7451 if (num_slots==0 && num_slots_ext==0) {
7452 proto_item_append_text(num_slots_ext_ti, " (undefined sleep period)");
7453 }
7454 else {
7455 /* Time should be rounded up according to SCS */
7456 float total = (float)(num_slots + num_slots_ext);
7457 /* From table 7.5.2.13-3 */
7458 const float slot_length_by_scs[16] = { 1000, 500, 250, 125, 62.5, 31.25,
7459 0, 0, 0, 0, 0, 0, /* reserved */
7460 1000, 1000, 1000, 1000 };
7461 float slot_length = slot_length_by_scs[scs];
7462 /* Only using valid SCS. TODO: is this test ok? */
7463 if (slot_length != 0) {
7464 /* Round up to next slot */
7465 total = ((int)(total / slot_length) + 1) * slot_length;
7466 proto_item_append_text(num_slots_ext_ti, " (defined sleep period of %f us)", total);
7467 }
7468 }
7469 offset += 3;
7470
7471 /* reserved (2 bits) */
7472 add_reserved_field(command_tree, hf_oran_reserved_2bits, tvb, offset, 1);
7473
7474 /* symbolMask (14 bits) */
7475 uint32_t symbol_mask;
7476 proto_item *sm_ti;
7477 offset = dissect_symbolmask(tvb, command_tree, offset, &symbol_mask, &sm_ti);
7478 if (symbol_mask == 0x0) {
7479 proto_item_append_text(sm_ti, " (wake)");
7480 col_append_str(pinfo->cinfo, COL_INFO, " (wake)");
7481 }
7482 else if (symbol_mask == 0x3fff) {
7483 proto_item_append_text(sm_ti, " (sleep)");
7484 col_append_str(pinfo->cinfo, COL_INFO, " (sleep)");
7485 }
7486 else {
7487 expert_add_info_format(pinfo, sm_ti, &ei_oran_bad_symbolmask,
7488 "For non-zero sleepMode (%u), symbolMask should be 0x0 or 0x3fff - found 0x%05x",
7489 sleep_mode, symbol_mask);
7490 }
7491
7492 /* antMask (16-2048 bits). Size is lookup from log2MaskBits enum.. */
7493 unsigned antmask_length = 2;
7494 if (log2maskbits >= 4) {
7495 antmask_length = (1 << log2maskbits) / 8;
7496 }
7497 proto_item *ant_mask_ti = proto_tree_add_item(command_tree, hf_oran_antMask_trx_control, tvb, offset, antmask_length, ENC_NA0x00000000);
7498 /* show count */
7499 unsigned antenna_count = 0;
7500 for (unsigned b=0; b < antmask_length; b++) {
7501 uint8_t byte = tvb_get_uint8(tvb, offset+b);
7502 for (unsigned bit=0; bit < 8; bit++) {
7503 if ((1 << bit) & byte) {
7504 antenna_count++;
7505 }
7506 }
7507 }
7508 proto_item_append_text(ant_mask_ti, " (%u antennas)", antenna_count);
7509 offset += antmask_length;
7510
7511 /* Pad to next 4-byte boundary */
7512 offset = WS_ROUNDUP_4(offset)(((offset) + ((unsigned)(4U-1U))) & (~((unsigned)(4U-1U))
))
;
7513 break;
7514 }
7515
7516 case 4: /* ASM (advanced sleep mode) */
7517 /* reserved (2+4=6 bits) */
7518 add_reserved_field(command_tree, hf_oran_reserved_6bits, tvb, offset, 1);
7519 /* sleepMode (2 bits) */
7520 uint32_t sleep_mode;
7521 proto_tree_add_item_ret_uint(command_tree, hf_oran_sleepmode_asm, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &sleep_mode);
7522 offset += 1;
7523
7524 /* reserved (4 bits) */
7525 add_reserved_field(command_tree, hf_oran_reserved_4bits, tvb, offset, 1);
7526 /* numSlotsExt (20 bits) */
7527 proto_tree_add_item(command_tree, hf_oran_num_slots_ext, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000);
7528 offset += 3;
7529
7530 /* reserved (2 bits) */
7531 add_reserved_field(command_tree, hf_oran_reserved_2bits, tvb, offset, 1);
7532 /* symbolMask (14 bits) */
7533 uint32_t symbol_mask;
7534 proto_item *sm_ti;
7535 offset = dissect_symbolmask(tvb, command_tree, offset, &symbol_mask, &sm_ti);
7536 if (symbol_mask == 0x0) {
7537 proto_item_append_text(sm_ti, " (wake)");
7538 col_append_str(pinfo->cinfo, COL_INFO, " (wake)");
7539 }
7540 else if (symbol_mask == 0x3fff) {
7541 proto_item_append_text(sm_ti, " (sleep)");
7542 col_append_str(pinfo->cinfo, COL_INFO, " (sleep)");
7543 }
7544 else {
7545 expert_add_info_format(pinfo, sm_ti, &ei_oran_bad_symbolmask,
7546 "For non-zero sleepMode (%u), symbolMask should be 0x0 or 0x3fff - found 0x%05x",
7547 sleep_mode, symbol_mask);
7548 }
7549
7550 /* reserved (2 bytes) */
7551 add_reserved_field(command_tree, hf_oran_reserved_16bits, tvb, offset, 2);
7552 offset += 2;
7553 break;
7554
7555 case 6: /* MAX_POWER_CONTROL */
7556 /* maxPrwLvllnd (8 bits) */
7557 proto_tree_add_item(command_tree, hf_oran_max_pwr_lvl_ind, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7558 offset += 1;
7559 /* arrayCarrierMaxPwrReduction (16 bits) - should be shown in dB */
7560 proto_tree_add_item(command_tree, hf_oran_array_carrier_max_pwr_reduction, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7561 offset += 2;
7562 /* reserved (8 bits) */
7563 add_reserved_field(command_tree, hf_oran_reserved_8bits, tvb, offset, 1);
7564 offset += 1;
7565 break;
7566
7567 default:
7568 /* Error! */
7569 expert_add_info_format(pinfo, len_ti, &ei_oran_st4_unknown_cmd,
7570 "Dissected ST4 command (%u) not recognised",
7571 st4_cmd_type);
7572 break;
7573 }
7574
7575 /* Check apparent size of padding (0-3 bytes ok) */
7576 long padding_remaining = command_start_offset + (st4_cmd_len * 4) - offset;
7577 if (padding_remaining > 3) {
7578 expert_add_info_format(pinfo, len_ti, &ei_oran_st4_wrong_len_cmd,
7579 "Dissected ST4 command does not match signalled st4CmdLen - set to %u (%u bytes) but dissected %u bytes",
7580 st4_cmd_len, st4_cmd_len*4, offset-command_start_offset);
7581 }
7582
7583 /* Advance by signalled length (needs to be aligned on 4-byte boundary) */
7584 offset = command_start_offset + (st4_cmd_len * 4);
7585
7586 /* Set end of command tree */
7587 proto_item_set_end(command_ti, tvb, offset);
7588
7589 if (ack_nack_req_id != 0 && state && state->ack_nack_requests) {
7590 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
7591 /* Add this request into conversation state on first pass */
7592 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)))
;
7593 request_details->request_frame_number = pinfo->num;
7594 request_details->request_frame_time = pinfo->abs_ts;
7595 request_details->requestType = ST4Cmd1+st4_cmd_type-1;
7596
7597 wmem_tree_insert32(state->ack_nack_requests,
7598 ack_nack_req_id,
7599 request_details);
7600 }
7601 else {
7602 /* On later passes, try to link forward to ST8 response */
7603 ack_nack_request_t *response = wmem_tree_lookup32(state->ack_nack_requests,
7604 ack_nack_req_id);
7605 if (response) {
7606 show_link_to_acknack_response(section_tree, tvb, pinfo, response);
7607 }
7608 }
7609 }
7610 }
7611 }
7612 /* LAA doesn't have sections either.. */
7613 else if (sectionType == SEC_C_LAA) { /* Section Type 7 */
7614 /* 7.2.5 Table 6.4-6 */
7615 unsigned mcot;
7616 proto_item *mcot_ti;
7617
7618 /* laaMsgType */
7619 uint32_t laa_msg_type;
7620 proto_item *laa_msg_type_ti;
7621 laa_msg_type_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_laaMsgType, tvb, offset, 1, ENC_NA0x00000000, &laa_msg_type);
7622 /* laaMsgLen */
7623 uint32_t laa_msg_len;
7624 proto_item *len_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_laaMsgLen, tvb, offset, 1, ENC_NA0x00000000, &laa_msg_len);
7625 proto_item_append_text(len_ti, " (%u bytes)", 4*laa_msg_len);
7626 if (laa_msg_len == 0) {
7627 proto_item_append_text(len_ti, " (reserved)");
7628 }
7629 offset += 1;
7630
7631 int payload_offset = offset;
7632
7633 /* Payload */
7634 switch (laa_msg_type) {
7635 case 0:
7636 /* LBT_PDSCH_REQ */
7637 /* lbtHandle (16 bits) */
7638 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7639 offset += 2;
7640 /* lbtOffset (10 bits) */
7641 proto_tree_add_item(section_tree, hf_oran_lbtOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7642 offset += 1;
7643 /* lbtMode (2 bits) */
7644 proto_tree_add_bits_item(section_tree, hf_oran_lbtMode, tvb, offset*8+2, 2, ENC_BIG_ENDIAN0x00000000);
7645 /* reserved (1 bit) */
7646 add_reserved_field(section_tree, hf_oran_reserved_bit4, tvb, offset, 1);
7647 /* lbtDeferFactor (3 bits) */
7648 proto_tree_add_item(section_tree, hf_oran_lbtDeferFactor, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7649 offset += 1;
7650 /* lbtBackoffCounter (10 bits) */
7651 proto_tree_add_item(section_tree, hf_oran_lbtBackoffCounter, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7652 offset += 1;
7653 /* MCOT (4 bits) */
7654 mcot_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_MCOT, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &mcot);
7655 if (mcot<1 || mcot>10) {
7656 proto_item_append_text(mcot_ti, " (should be in range 1-10!)");
7657 expert_add_info_format(pinfo, mcot_ti, &ei_oran_mcot_out_of_range,
7658 "MCOT seen with value %u (must be 1-10)", mcot);
7659
7660 }
7661 /* reserved (10 bits) */
7662 proto_tree_add_bits_item(section_tree, hf_oran_reserved, tvb, (offset*8)+6, 10, ENC_BIG_ENDIAN0x00000000);
7663 break;
7664 case 1:
7665 /* LBT_DRS_REQ */
7666 /* lbtHandle (16 bits) */
7667 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7668 offset += 2;
7669 /* lbtOffset (10 bits) */
7670 proto_tree_add_item(section_tree, hf_oran_lbtOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7671 offset += 1;
7672 /* lbtMode (2 bits) */
7673 proto_tree_add_bits_item(section_tree, hf_oran_lbtMode, tvb, offset*8+2, 2, ENC_BIG_ENDIAN0x00000000);
7674 /* reserved (28 bits) */
7675 proto_tree_add_bits_item(section_tree, hf_oran_reserved, tvb, (offset*8)+4, 28, ENC_BIG_ENDIAN0x00000000);
7676 break;
7677 case 2:
7678 /* LBT_PDSCH_RSP */
7679 /* lbtHandle (16 bits) */
7680 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7681 offset += 2;
7682 /* lbtPdschRes (2 bits) */
7683 proto_tree_add_item(section_tree, hf_oran_lbtPdschRes, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7684 /* inParSF (1 bit) */
7685 proto_tree_add_item(section_tree, hf_oran_initialPartialSF, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7686 /* sfStatus (1 bit) */
7687 proto_tree_add_item(section_tree, hf_oran_sfStatus, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7688 /* sfnSf (12 bits) */
7689 proto_tree_add_item(section_tree, hf_oran_sfnSfEnd, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7690 offset += 2;
7691 /* reserved (24 bits) */
7692 proto_tree_add_bits_item(section_tree, hf_oran_reserved, tvb, (offset*8), 24, ENC_BIG_ENDIAN0x00000000);
7693 break;
7694 case 3:
7695 /* LBT_DRS_RSP */
7696 /* lbtHandle (16 bits) */
7697 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7698 offset += 2;
7699 /* lbtDrsRes (1 bit) */
7700 proto_tree_add_item(section_tree, hf_oran_lbtDrsRes, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7701 /* reserved (7 bits) */
7702 add_reserved_field(section_tree, hf_oran_reserved_last_7bits, tvb, offset, 1);
7703 break;
7704 case 4:
7705 /* LBT_Buffer_Error */
7706 /* lbtHandle (16 bits) */
7707 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7708 offset += 2;
7709 /* lbtBufErr (1 bit) */
7710 proto_tree_add_item(section_tree, hf_oran_lbtBufErr, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7711 /* reserved (7 bits) */
7712 add_reserved_field(section_tree, hf_oran_reserved_last_7bits, tvb, offset, 1);
7713 break;
7714 case 5:
7715 /* LBT_CWCONFIG_REQ */
7716 /* lbtHandle (16 bits) */
7717 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7718 offset += 2;
7719 /* lbtCWConfig_H (8 bits) */
7720 proto_tree_add_item(section_tree, hf_oran_lbtCWConfig_H, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7721 offset += 1;
7722 /* lbtCWConfig_T (8 bits) */
7723 proto_tree_add_item(section_tree, hf_oran_lbtCWConfig_T, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7724 offset += 1;
7725 /* lbtMode (2 bits) */
7726 proto_tree_add_bits_item(section_tree, hf_oran_lbtMode, tvb, offset*8, 2, ENC_BIG_ENDIAN0x00000000);
7727 /* lbtTrafficClass (3 bits) */
7728 proto_tree_add_item(section_tree, hf_oran_lbtTrafficClass, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7729 /* reserved (19 bits) */
7730 proto_tree_add_bits_item(section_tree, hf_oran_reserved, tvb, (offset*8)+5, 19, ENC_BIG_ENDIAN0x00000000);
7731 break;
7732 case 6:
7733 /* LBT_CWCONFIG_RSP */
7734 /* lbtHandle (16 bits) */
7735 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7736 offset += 2;
7737 /* lbtCWR_Rst (1 bit) */
7738 proto_tree_add_item(section_tree, hf_oran_lbtCWR_Rst, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7739 /* reserved (7 bits) */
7740 add_reserved_field(section_tree, hf_oran_reserved_last_7bits, tvb, offset, 1);
7741 break;
7742
7743 default:
7744 /* Unhandled! */
7745 expert_add_info_format(pinfo, laa_msg_type_ti, &ei_oran_laa_msg_type_unsupported,
7746 "laaMsgType %u not supported by dissector",
7747 laa_msg_type);
7748
7749 break;
7750 }
7751 /* For now just skip indicated length of bytes */
7752 offset = payload_offset + 4*(laa_msg_len+1);
7753 }
7754
7755
7756 /* Dissect each C section */
7757 for (uint32_t i = 0; i < nSections; ++i) {
7758 tvbuff_t *section_tvb = tvb_new_subset_remaining(tvb, offset);
7759 offset += dissect_oran_c_section(section_tvb, oran_tree, pinfo, state, sectionType, tap_info,
7760 protocol_item,
7761 subframeId, frameId, slotId, startSymbolId,
7762 bit_width, ci_comp_method, ci_comp_opt,
7763 num_sinr_per_prb);
7764 }
7765
7766 /* Expert error if we are short of tvb by > 3 bytes */
7767 if (tvb_reported_length_remaining(tvb, offset) > 3) {
7768 expert_add_info_format(pinfo, protocol_item, &ei_oran_frame_length,
7769 "%u bytes remain at end of frame - should be 0-3",
7770 tvb_reported_length_remaining(tvb, offset));
7771 }
7772
7773 if (PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited) && result) {
7774 /* Show list of frames that have corresponding U-plane data */
7775 wmem_list_frame_t *list_frame;
7776
7777 /* Some frames may answer > 1 section, so fashion a set using wmem_tree.. */
7778 wmem_tree_t *frames_set = wmem_tree_new(NULL((void*)0));
7779
7780 unsigned first_gap = 0;
7781 unsigned first_symbol = 0;
7782 unsigned first_gap_delta = 0;
7783 bool_Bool first_section = true1;
7784
7785 for (list_frame = wmem_list_head(result->u_plane_frames); list_frame != NULL((void*)0); list_frame = wmem_list_frame_next(list_frame)) {
7786 corresponding_uplane_frame *frame = wmem_list_frame_data(list_frame);
7787
7788 if (!wmem_tree_contains32(frames_set, frame->frame_number)) {
7789 /* Only check/show gap for first section from a given wireshark frame */
7790 if (first_gap == 0) {
7791 first_gap = frame->gap_in_usecs;
7792 first_symbol = frame->symbol;
7793 }
7794 else {
7795 /* Compare calculated vs actual arrival times */
7796 first_gap_delta = frame->gap_in_usecs - first_gap;
7797 unsigned expected_delta = pref_symbol_time * (frame->symbol-first_symbol);
7798 proto_item *delta_ti = proto_tree_add_int(oran_tree,
7799 (direction==0) ? hf_oran_delta_to_expected_ul_symbol_time : hf_oran_delta_to_expected_dl_symbol_time,
7800 tvb, 0, 0, first_gap_delta-expected_delta);
7801 proto_item_append_text (delta_ti, " (%u symbols since first, assuming %u\u03bcs/symbol)", frame->symbol-first_symbol, pref_symbol_time);
7802 proto_item_set_generated(delta_ti);
7803 }
7804 }
7805
7806 /* Show link to U-plane frame */
7807 proto_item *uplane_frame_ti = proto_tree_add_uint(oran_tree, hf_oran_corresponding_uplane_frame, tvb, 0, 0,
7808 frame->frame_number);
7809 proto_item_append_text(uplane_frame_ti, " sectionId:%2u symbol:%2u ", frame->sectionId, frame->symbol);
7810 if (frame->numPrbu > 1) {
7811 proto_item_append_text(uplane_frame_ti, "PRBs %3u->%3u", frame->startPrbu, frame->startPrbu+frame->numPrbu-1);
7812 }
7813 else {
7814 proto_item_append_text(uplane_frame_ti, "PRB: %3u", frame->startPrbu);
7815 }
7816
7817 proto_item_set_generated(uplane_frame_ti);
7818
7819 if (first_section) {
7820 /* Only show timings on first entry for a frame */
7821 proto_item_append_text(uplane_frame_ti, " (in %u\u03bcs)", frame->gap_in_usecs);
7822 first_section = false0;
7823 }
7824
7825 if (first_gap_delta) {
7826 /* Only show timings on first entry for a frame */
7827 proto_item_append_text(uplane_frame_ti, " (in %u\u03bcs) +%u", frame->gap_in_usecs, first_gap_delta);
7828 first_gap_delta = 0;
7829 }
7830
7831 wmem_tree_insert32(frames_set, frame->frame_number, NULL((void*)0));
7832 }
7833 /* Also show total number of corresponding u-plane frames */
7834
7835 proto_item *uplane_frame_count_ti = proto_tree_add_uint(oran_tree, hf_oran_corresponding_uplane_frames_total, tvb, 0, 0, wmem_tree_count(frames_set));
7836 proto_item_set_generated(uplane_frame_count_ti);
7837 /* No longer need this set/tree */
7838 wmem_tree_destroy(frames_set, false0, false0);
7839 }
7840
7841 return tvb_captured_length(tvb);
7842}
7843
7844static int dissect_oran_u_re(tvbuff_t *tvb, proto_tree *tree,
7845 unsigned sample_number, int samples_offset,
7846 oran_tap_info *tap_info,
7847 unsigned sample_bit_width,
7848 int comp_meth,
7849 uint32_t exponent,
7850 section_mod_compr_config_t *mod_compr_params,
7851 uint8_t re, float * const re_power)
7852{
7853 /* I */
7854 unsigned i_bits = tvb_get_bits32(tvb, samples_offset, sample_bit_width, ENC_BIG_ENDIAN0x00000000);
7855 float i_value = decompress_value(i_bits, comp_meth, sample_bit_width, exponent, mod_compr_params, re);
7856 unsigned sample_len_in_bytes = ((samples_offset%8)+sample_bit_width+7)/8;
7857 proto_item *i_ti = proto_tree_add_float(tree, hf_oran_iSample, tvb, samples_offset/8, sample_len_in_bytes, i_value);
7858 proto_item_set_text(i_ti, "iSample: % 0.7f 0x%04x (RE-%2u in the PRB)", i_value, i_bits, sample_number);
7859 samples_offset += sample_bit_width;
7860 /* Q */
7861 unsigned q_bits = tvb_get_bits32(tvb, samples_offset, sample_bit_width, ENC_BIG_ENDIAN0x00000000);
7862 float q_value = decompress_value(q_bits, comp_meth, sample_bit_width, exponent, mod_compr_params, re);
7863 sample_len_in_bytes = ((samples_offset%8)+sample_bit_width+7)/8;
7864 proto_item *q_ti = proto_tree_add_float(tree, hf_oran_qSample, tvb, samples_offset/8, sample_len_in_bytes, q_value);
7865 proto_item_set_text(q_ti, "qSample: % 0.7f 0x%04x (RE-%2u in the PRB)", q_value, q_bits, sample_number);
7866 samples_offset += sample_bit_width;
7867 *re_power = i_value*i_value + q_value*q_value;
7868 /* Update RE stats */
7869 tap_info->num_res++;
7870 /* if (i_value == 0.0 && q_value == 0.0) { */
7871 /* TODO: is just checking bits from frame good enough - assuming this always corresponds to a zero value? */
7872 if (i_bits == 0 && q_bits == 0) {
7873 tap_info->num_res_zero++;
7874 }
7875 else {
7876 tap_info->non_zero_re_in_current_prb = true1;
7877 }
7878 return samples_offset;
7879}
7880
7881
7882static bool_Bool udcomplen_appears_present(bool_Bool udcomphdr_present, tvbuff_t *tvb, int offset)
7883{
7884 if (!udcomplen_heuristic_result_set) {
7885 /* All sections will start the same way */
7886 unsigned int section_bytes_before_field = (udcomphdr_present) ? 6 : 4;
7887
7888 /* Move offset back to the start of the section */
7889 offset -= section_bytes_before_field;
7890
7891 do {
7892 /* This field appears several bytes into the U-plane section */
7893 uint32_t length_remaining = tvb_reported_length_remaining(tvb, offset);
7894 /* Are there enough bytes to still read the length field? */
7895 if (section_bytes_before_field+2 > length_remaining) {
7896 udcomplen_heuristic_result = false0;
7897 udcomplen_heuristic_result_set = true1;
7898 break;
7899 }
7900
7901 /* Read the length field */
7902 uint16_t udcomplen = tvb_get_ntohs(tvb, offset+section_bytes_before_field);
7903
7904 /* Is this less than a valid section? Realistic minimal section will be bigger than this..
7905 * Could take into account numPrbU, etc */
7906 if (udcomplen < section_bytes_before_field+2) {
7907 udcomplen_heuristic_result = false0;
7908 udcomplen_heuristic_result_set = true1;
7909 break;
7910 }
7911
7912 /* Does this section fit into the frame? */
7913 if (udcomplen > length_remaining) {
7914 udcomplen_heuristic_result = false0;
7915 udcomplen_heuristic_result_set = true1;
7916 break;
7917 }
7918
7919 /* Move past this section */
7920 offset += udcomplen;
7921
7922 /* Are we at the end of the frame? */
7923 /* TODO: if frame is less than 60 bytes, there may be > 4 bytes, likely zeros.. */
7924 if (tvb_reported_length_remaining(tvb, offset) < 4) {
7925 udcomplen_heuristic_result = true1;
7926 udcomplen_heuristic_result_set = true1;
7927 }
7928 } while (!udcomplen_heuristic_result_set);
7929 }
7930 return udcomplen_heuristic_result;
7931}
7932
7933static bool_Bool at_udcomphdr(tvbuff_t *tvb, int offset)
7934{
7935 if (tvb_captured_length_remaining(tvb, offset) < 2) {
7936 return false0;
7937 }
7938 uint8_t first_byte = tvb_get_uint8(tvb, offset);
7939 uint8_t reserved_byte = tvb_get_uint8(tvb, offset+1);
7940
7941 /* - iq width could be anything, though unlikely to be signalled as (say) < 1-3? */
7942 /* - meth should be 0-8 */
7943 /* - reserved byte should be 0 */
7944 return (((first_byte & 0x0f) <= MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8) && (reserved_byte == 0));
7945}
7946
7947static bool_Bool udcomphdr_appears_present(flow_state_t *flow, uint32_t direction, tvbuff_t *tvb, int offset)
7948{
7949 /* Should really not happen, but guard against this anyway. */
7950 if (flow == NULL((void*)0)) {
7951 /* No state to update. */
7952 return false0;
7953 }
7954
7955 if (direction == DIR_UPLINK0) {
7956 if (flow->udcomphdrUplink_heuristic_result_set) {
7957 /* Return cached value */
7958 return flow->udcomphdrUplink_heuristic_result;
7959 }
7960 else {
7961 /* Work it out, and save answer for next time */
7962 flow->udcomphdrUplink_heuristic_result_set = true1;
7963 flow->udcomphdrUplink_heuristic_result = at_udcomphdr(tvb, offset);
7964 return flow->udcomphdrUplink_heuristic_result;
7965 }
7966 }
7967 else {
7968 /* Downlink */
7969 if (flow->udcomphdrDownlink_heuristic_result_set) {
7970 /* Return cached value */
7971 return flow->udcomphdrDownlink_heuristic_result;
7972 }
7973 else {
7974 /* Work it out, and save answer for next time */
7975 flow->udcomphdrDownlink_heuristic_result_set = true1;
7976 flow->udcomphdrDownlink_heuristic_result = at_udcomphdr(tvb, offset);
7977 return flow->udcomphdrDownlink_heuristic_result;
7978 }
7979 }
7980}
7981
7982/*
7983 dissect_oran_u_timing_header()
7984 Table 8.3.2-1, octets 9-12..
7985 */
7986static int dissect_oran_u_timing_header(tvbuff_t *tvb, packet_info *pinfo, unsigned offset,
7987 proto_item * timingHeader, oran_tap_info *tap_info, uint32_t * frameIdPtr, uint32_t * subframeIdPtr, uint32_t * slotIdPtr,
7988 uint32_t * symbolIdPtr, uint32_t * directionPtr )
7989{
7990 /* Now does the data combine correctly? */
7991 /* Common header for time reference */
7992 proto_tree *timing_header_tree = proto_item_add_subtree(timingHeader, ett_oran_u_timing);
7993
7994 /* dataDirection */
7995 proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_data_direction, tvb, offset, 1, ENC_NA0x00000000, directionPtr);
7996 tap_info->uplink = ((*directionPtr)==0);
7997 /* payloadVersion */
7998 dissect_payload_version(timing_header_tree, tvb, pinfo, offset);
7999 /* filterIndex */
8000 proto_tree_add_item(timing_header_tree, hf_oran_filter_index, tvb, offset, 1, ENC_NA0x00000000);
8001 offset += 1;
8002
8003 int ref_a_offset = offset;
8004
8005 /* frameId */
8006 proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_frame_id, tvb, offset, 1, ENC_NA0x00000000, frameIdPtr);
8007 tap_info->frame = *frameIdPtr;
8008 offset += 1;
8009
8010 /* subframeId */
8011 proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_subframe_id, tvb, offset, 1, ENC_NA0x00000000, subframeIdPtr);
8012 /* slotId */
8013 proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_slot_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, slotIdPtr);
8014 tap_info->slot = *slotIdPtr;
8015 offset++;
8016 /* symbolId */
8017 proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_symbolId, tvb, offset, 1, ENC_NA0x00000000, symbolIdPtr);
8018 offset++;
8019
8020 char id[16];
8021 snprintf(id, 16, "%u-%u-%u-%u", *frameIdPtr, *subframeIdPtr, *slotIdPtr, *symbolIdPtr);
8022 proto_item *pi = proto_tree_add_string(timing_header_tree, hf_oran_refa, tvb, ref_a_offset, 3, id);
8023 proto_item_set_generated(pi);
8024
8025 proto_item_append_text(timingHeader, "%s, frameId: %d, subframeId: %d, slotId: %d, symbolId: %d)",
8026 val_to_str_const(*directionPtr, data_direction_vals, "Unknown"), *frameIdPtr, *subframeIdPtr, *slotIdPtr, *symbolIdPtr);
8027 return offset;
8028}
8029
8030/*
8031 dissect_oran_u_section_header()
8032 Mandatory Section Header fields (darker green part)
8033 Table 8.3.2-1, octets 13-16. Optional fields handled elsewhere.
8034 */
8035static int dissect_oran_u_section_header(tvbuff_t *tvb, packet_info *pinfo, unsigned offset,
8036 proto_tree * section_tree,
8037 oran_tap_info *tap_info,
8038 flow_result_t *result, flow_state_t *cplane_state,
8039 uint32_t frameId, uint32_t subframeId, uint32_t slotId, uint32_t symbolId,
8040 uint32_t direction, uint32_t * sectionIdPtr, uint32_t * rbPtr, uint32_t *startPrbuPtr, uint32_t *numPrbuPtr,
8041 section_details_t **section_details_ptr)
8042{
8043 proto_item *sectionId_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_section_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, sectionIdPtr);
8044 if (*sectionIdPtr == 4095) {
8045 proto_item_append_text(sectionId_ti, " (not default coupling C/U planes using sectionId)");
8046 }
8047 offset++;
8048
8049 if (tap_info->num_section_ids < MAX_SECTION_IDs32) {
8050 tap_info->section_ids[tap_info->num_section_ids++] = *sectionIdPtr;
8051 }
8052
8053 section_details_t *section_details = NULL((void*)0);
8054 corresponding_uplane_frame *details = NULL((void*)0);
8055
8056 /* Lookup corresponding C-plane frame/info */
8057 if (link_planes_together) {
8058 if (result && result->cplane_seen) {
8059
8060 expected_section_data_t *section_data = NULL((void*)0);
8061 section_data = wmem_tree_lookup32(result->expected_sections, *sectionIdPtr);
8062
8063 if (!section_data && !PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited) && cplane_state) {
8064 /* Take a deep-copy of the C-plane state for this sectionId on first pass */
8065 expected_section_data_t *cplane_data = wmem_tree_lookup32(cplane_state->expected_sections[direction],
8066 *sectionIdPtr);
8067 if (cplane_data) {
8068 /* Shallow copy is fine, see section_details_t */
8069 section_data = wmem_memdup(wmem_file_scope(), cplane_data, sizeof(expected_section_data_t));
8070 wmem_tree_insert32(result->expected_sections, *sectionIdPtr, section_data);
8071 }
8072 }
8073
8074 if (section_data) {
8075 /* Need to work out which of 2 entries is in use for this data frame */
8076 unsigned index_to_use = 0;
8077
8078 /* Does the first entry match the timing for this frame? */
8079 if (section_data->details[0].in_use &&
8080 section_data->details[0].frame == frameId &&
8081 section_data->details[0].subframe == subframeId &&
8082 section_data->details[0].slot == slotId &&
8083 /* Check that symbolId is in range */
8084 section_data->details[0].startSymbol <= symbolId &&
8085 (unsigned)symbolId < (unsigned)(section_data->details[0].startSymbol + section_data->details[0].numSymbols)) {
8086
8087 index_to_use = 0;
8088 }
8089 else if (section_data->details[1].in_use &&
8090 section_data->details[1].frame == frameId &&
8091 section_data->details[1].subframe == subframeId &&
8092 section_data->details[1].slot == slotId &&
8093 /* Check that symbolId is in range */
8094 section_data->details[1].startSymbol <= symbolId &&
8095 (unsigned)symbolId < (unsigned)(section_data->details[1].startSymbol + section_data->details[1].numSymbols)) {
8096
8097 index_to_use = 1;
8098 }
8099 else {
8100 /* There was a sectionId, but timing header didn't exactly match, so neither index may be used.. */
8101 index_to_use = 2; /* invalid value */
8102 /* Expert info */
8103 expert_add_info_format(NULL((void*)0), sectionId_ti,
8104 &ei_oran_cplane_entry_not_found,
8105 "C-plane entry for %s sectionId %u at timing header %u-%u-%u-%u"
8106 " timing didn't match C-plane",
8107 (direction) ? "DL" : "UL", *sectionIdPtr,
8108 frameId, subframeId, slotId, symbolId);
8109 }
8110
8111 if (index_to_use <= 1) {
8112 section_details = &section_data->details[index_to_use];
8113
8114 /* Cplane frame number */
8115 proto_item *cplane_frame_ti = proto_tree_add_uint(section_tree, hf_oran_corresponding_cplane_frame, tvb, 0, 0,
8116 section_details->frame_number);
8117 proto_item_set_generated(cplane_frame_ti);
8118
8119 /* usecs since cplane frame */
8120 time_t total_gap = 0;
8121
8122 if ((pinfo->abs_ts.secs == section_details->frame_time.secs) || (pinfo->abs_ts.secs == section_details->frame_time.secs+1)) {
8123 total_gap = ((pinfo->abs_ts.secs - section_details->frame_time.secs) * 1000000) +
8124 ((pinfo->abs_ts.nsecs - section_details->frame_time.nsecs)/1000);
8125 }
8126
8127 if (total_gap > 0) {
8128 proto_item *cplane_delta_ti = proto_tree_add_uint64(section_tree, hf_oran_corresponding_cplane_frame_time_delta, tvb, 0, 0, (uint64_t)total_gap);
8129 proto_item_set_generated(cplane_delta_ti);
8130 }
8131
8132 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
8133 /* Look up 'result' for c-plane frame, and tell it about this frame.. */
8134 flow_result_t *cplane_result = wmem_tree_lookup32(flow_results_table, section_details->frame_number);
8135 if (!cplane_result) {
8136 cplane_result = wmem_new0(wmem_file_scope(), flow_result_t)((flow_result_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_result_t
)))
;
8137 cplane_result->u_plane_frames = wmem_list_new(wmem_file_scope());
8138 wmem_tree_insert32(flow_results_table, section_details->frame_number, cplane_result);
8139 }
8140 /* PRB range filled in below.. */
8141
8142 details = wmem_new(wmem_file_scope(), corresponding_uplane_frame)((corresponding_uplane_frame*)wmem_alloc((wmem_file_scope()),
sizeof(corresponding_uplane_frame)))
;
8143 details->frame_number = pinfo->num;
8144 details->gap_in_usecs = (uint32_t)total_gap;
8145 details->sectionId = *sectionIdPtr;
8146 details->symbol = symbolId;
8147
8148 wmem_list_append(cplane_result->u_plane_frames, details);
8149 }
8150 }
8151 }
8152 else {
8153 /* No section entry at all */
8154 expert_add_info_format(NULL((void*)0), sectionId_ti,
8155 &ei_oran_cplane_entry_not_found,
8156 "C-plane entry for %s sectionId %u not found",
8157 (direction) ? "DL" : "UL", *sectionIdPtr);
8158 }
8159 }
8160 }
8161
8162 /* rb */
8163 proto_tree_add_item_ret_uint(section_tree, hf_oran_rb, tvb, offset, 1, ENC_NA0x00000000, rbPtr);
8164 /* symInc. "use of symInc=1 shall be prohibited in the U-plane" */
8165 uint8_t syminc;
8166 proto_item *syminc_ti = proto_tree_add_item_ret_uint8(section_tree, hf_oran_symInc, tvb, offset, 1, ENC_NA0x00000000, &syminc);
8167 if (syminc) {
8168 expert_add_info(NULL((void*)0), syminc_ti, &ei_oran_syminc_set_for_uplane);
8169 }
8170 /* startPrbu */
8171 proto_tree_add_item_ret_uint(section_tree, hf_oran_startPrbu, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, startPrbuPtr);
8172 offset += 2;
8173
8174 /* numPrbu */
8175 proto_tree_add_item_ret_uint(section_tree, hf_oran_numPrbu, tvb, offset, 1, ENC_NA0x00000000, numPrbuPtr);
8176 offset += 1;
8177
8178 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited) && details) {
8179 details->startPrbu = *startPrbuPtr;
8180 details->numPrbu = (*numPrbuPtr) ? (*numPrbuPtr) : 273;
8181 }
8182
8183 *section_details_ptr = section_details;
8184 return offset;
8185}
8186
8187/* unscaled_power_correction computes correction required to rescale reported power in order to report dBFS */
8188static float unscaled_power_correction(int sample_bit_width, unsigned compression) {
8189 /* Logic for COMP_NONE and COMP_BLOCK_FP. No adjustment required for COMP_MODULATION */
8190 float correction = 0.0f;
8191 switch(compression) {
8192 case COMP_BLOCK_FP1:
8193 case BFP_AND_SELECTIVE_RE5:
8194 case BFP_AND_SELECTIVE_RE_WITH_MASKS7:
8195 correction = 20.0f*((float)(M_LOG10E0.43429448190325182765/M_LOG2E1.4426950408889634074))*((sample_bit_width-1) + 15);
8196 break;
8197 case COMP_NONE0:
8198 correction = 20.0f*((float)(M_LOG10E0.43429448190325182765/M_LOG2E1.4426950408889634074))*(sample_bit_width-1);
8199 break;
8200 default:
8201 break;
8202 }
8203 return correction;
8204}
8205
8206static int dissect_oran_u_section(tvbuff_t *tvb, packet_info *pinfo, unsigned offset,
8207 proto_tree * oran_tree,
8208 proto_item * protocol_item,
8209 oran_tap_info *tap_info,
8210 flow_state_t *state, flow_result_t *result, flow_state_t *cplane_state,
8211 uint32_t frameId, uint32_t subframeId, uint32_t slotId, uint32_t symbolId,
8212 uint32_t direction, int includeUdCompHeader, unsigned * sample_bit_width_ptr,
8213 unsigned compression, bool_Bool ud_cmp_hdr_cplane, unsigned *nBytesPerPrbPtr)
8214{
8215 /* Section subtree */
8216 unsigned section_start_offset = offset;
8217 proto_item *sectionHeading = proto_tree_add_string_format(oran_tree, hf_oran_u_section,
8218 tvb, offset, 0, "", "Section");
8219 proto_tree *section_tree = proto_item_add_subtree(sectionHeading, ett_oran_u_section);
8220 section_details_t *section_details = NULL((void*)0);
8221
8222 /* Total (section) power and peak power */
8223 float total_power = 0.0f;
8224 float peak_power = 0.0f;
8225 int peak_location = 0;
8226
8227 /* Section Header fields [fixed parts] (darker green part) */
8228 uint32_t sectionId = 0, rb, startPrbu = 0, numPrbu = 0;
8229
8230 offset = dissect_oran_u_section_header(tvb, pinfo, offset, section_tree, tap_info, result, cplane_state,
8231 frameId, subframeId, slotId, symbolId, direction, &sectionId, &rb, &startPrbu, &numPrbu,
8232 &section_details);
8233
8234 proto_item *ud_comp_meth_item, *ud_comp_len_ti=NULL((void*)0);
8235 uint32_t ud_comp_len = 0;
8236
8237 /* udCompHdr (if preferences indicate will be present) */
8238 bool_Bool included = (includeUdCompHeader==1) || /* 1 means present.. */
8239 (includeUdCompHeader==2 && udcomphdr_appears_present(state, direction, tvb, offset)); /* heuristic */
8240 bool_Bool udCompHdr_ignored = direction == 0 && pref_override_ul_compression; /* Ignore UL if configured to */
8241 if (included) {
8242 /* 7.5.2.10 */
8243 /* Extract these values to inform how wide IQ samples in each PRB will be. */
8244 offset = dissect_udcomphdr(tvb, pinfo, section_tree, offset, false0,
8245 udCompHdr_ignored,
8246 sample_bit_width_ptr,
8247 &compression, &ud_comp_meth_item, tap_info);
8248
8249 /* Not part of udCompHdr */
8250 uint32_t reserved;
8251 proto_item *res_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_NA0x00000000, &reserved);
8252 offset += 1;
8253 if (reserved != 0) {
8254 expert_add_info_format(pinfo, res_ti, &ei_oran_reserved_not_zero,
8255 "reserved field (0x%x) not zero - perhaps udCompHdr is not really present?",
8256 reserved);
8257 }
8258 }
8259
8260 if (!included || udCompHdr_ignored) {
8261 /* No fields to dissect - just showing comp values from prefs */
8262 /* iqWidth */
8263 proto_item *iq_width_item = proto_tree_add_uint(section_tree, hf_oran_udCompHdrIqWidth_pref, tvb, 0, 0, *sample_bit_width_ptr);
8264 proto_item_append_text(iq_width_item, (ud_cmp_hdr_cplane) ? " (from c-plane)" : " (from preferences)");
8265 proto_item_set_generated(iq_width_item);
8266
8267 /* udCompMethod */
8268 ud_comp_meth_item = proto_tree_add_uint(section_tree, hf_oran_udCompHdrMeth_pref, tvb, 0, 0, compression);
8269 proto_item_append_text(ud_comp_meth_item, (ud_cmp_hdr_cplane) ? " (from c-plane)" : " (from preferences)");
8270 proto_item_set_generated(ud_comp_meth_item);
8271
8272 /* Point back to C-Plane, if used */
8273 /* TODO: doesn't work with multiple port mappings using SE10.. */
8274 if (ud_cmp_hdr_cplane) {
8275 proto_item *cplane_ti = proto_tree_add_uint(section_tree, hf_oran_ul_cplane_ud_comp_hdr_frame, tvb, offset, 0, result->ul_ud_comp_hdr_frame);
8276 proto_item_set_generated(cplane_ti);
8277 }
8278
8279 /* Still adding these values to tap */
8280 tap_info->compression_methods |= (1 << compression);
8281 tap_info->compression_width = MAX(tap_info->compression_width, *sample_bit_width_ptr)(((tap_info->compression_width) > (*sample_bit_width_ptr
)) ? (tap_info->compression_width) : (*sample_bit_width_ptr
))
;
8282 }
8283
8284 /* Not supported! TODO: other places where comp method is looked up (e.g., bfw?) */
8285 switch (compression) {
8286 case COMP_NONE0:
8287 case COMP_BLOCK_FP1:
8288 case BFP_AND_SELECTIVE_RE5:
8289 case COMP_MODULATION4:
8290 case MOD_COMPR_AND_SELECTIVE_RE6:
8291 case BFP_AND_SELECTIVE_RE_WITH_MASKS7:
8292 case MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8:
8293 break;
8294 default:
8295 expert_add_info_format(pinfo, ud_comp_meth_item, &ei_oran_unsupported_compression_method,
8296 "Compression method %u (%s) not supported by dissector",
8297 compression,
8298 rval_to_str_const(compression, ud_comp_header_meth, "reserved"));
8299 }
8300
8301 /* udCompLen (when supported, methods 5,6,7,8) */
8302 if (compression >= BFP_AND_SELECTIVE_RE5) {
8303 bool_Bool supported = (pref_support_udcompLen==1) || /* supported */
8304 (pref_support_udcompLen==2 && udcomplen_appears_present(included, tvb, offset));
8305
8306 if (supported) {
8307 ud_comp_len_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_udCompLen, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ud_comp_len);
8308 if (ud_comp_len <= 1) {
8309 proto_item_append_text(ud_comp_len_ti, " (reserved)");
8310 }
8311 /* TODO: report if less than a viable section in frame? */
8312 /* Check that there is this much length left in the frame */
8313 if (ud_comp_len > tvb_reported_length_remaining(tvb, section_start_offset)) {
8314 expert_add_info_format(pinfo, ud_comp_len_ti, &ei_oran_ud_comp_len_wrong_size,
8315 "udCompLen indicates %u bytes in section, but only %u are left in frame",
8316 ud_comp_len, tvb_reported_length_remaining(tvb, section_start_offset));
8317 }
8318 /* Actual length of section will be checked below, at the end of the section */
8319 offset += 2;
8320 }
8321 }
8322
8323 /* sReSMask1 + sReSMask2 (depends upon compression method) */
8324 uint64_t sresmask1=0, sresmask2=0;
8325 if (compression == BFP_AND_SELECTIVE_RE_WITH_MASKS7 ||
8326 compression == MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8)
8327 {
8328 static int * const sres_mask1_2_flags[] = {
8329 &hf_oran_sReSMask1_2_re12,
8330 &hf_oran_sReSMask1_2_re11,
8331 &hf_oran_sReSMask1_2_re10,
8332 &hf_oran_sReSMask1_2_re9,
8333 &hf_oran_sReSMask_re8,
8334 &hf_oran_sReSMask_re7,
8335 &hf_oran_sReSMask_re6,
8336 &hf_oran_sReSMask_re5,
8337 &hf_oran_sReSMask_re4,
8338 &hf_oran_sReSMask_re3,
8339 &hf_oran_sReSMask_re2,
8340 &hf_oran_sReSMask_re1,
8341 NULL((void*)0)
8342 };
8343
8344 /* reserved (4 bits) */
8345 add_reserved_field(section_tree, hf_oran_reserved_4bits, tvb, offset, 1);
8346 /* sReSMask1 (12 bits) */
8347 proto_item *sresmask_ti;
8348 sresmask_ti = proto_tree_add_bitmask_ret_uint64(section_tree, tvb, offset,
8349 hf_oran_sReSMask1,
8350 ett_oran_sresmask,
8351 sres_mask1_2_flags,
8352 ENC_NA0x00000000,
8353 &sresmask1);
8354 offset += 2;
8355 /* Count REs present */
8356 unsigned res = 0;
8357 for (unsigned n=0; n < 12; n++) {
8358 if ((sresmask1 >> n) & 0x1) {
8359 res++;
8360 }
8361 }
8362 proto_item_append_text(sresmask_ti, " (%u REs)", res);
8363
8364
8365 /* reserved (4 bits) */
8366 add_reserved_field(section_tree, hf_oran_reserved_4bits, tvb, offset, 1);
8367 /* sReSMask2 (12 bits) */
8368 sresmask_ti = proto_tree_add_bitmask_ret_uint64(section_tree, tvb, offset,
8369 hf_oran_sReSMask2,
8370 ett_oran_sresmask,
8371 sres_mask1_2_flags,
8372 ENC_NA0x00000000,
8373 &sresmask2);
8374 offset += 2;
8375
8376 if (rb == 1) {
8377 proto_item_append_text(sresmask_ti, " (ignored)");
8378 if (sresmask2 != 0) {
8379 expert_add_info(pinfo, ud_comp_len_ti, &ei_oran_sresmask2_not_zero_with_rb);
8380 }
8381 }
8382 else {
8383 /* Count REs present */
8384 res = 0;
8385 for (unsigned n=0; n < 12; n++) {
8386 if ((sresmask2 >> n) & 0x1) {
8387 res++;
8388 }
8389 }
8390 proto_item_append_text(sresmask_ti, " (%u REs)", res);
8391 }
8392 }
8393
8394 write_section_info(sectionHeading, pinfo, protocol_item, sectionId, startPrbu, numPrbu, rb);
8395
8396 /* TODO: should this use the same pref as c-plane? */
8397 if (numPrbu == 0) {
8398 /* Special case for all PRBs (NR: the total number of PRBs may be > 255) */
8399 numPrbu = pref_data_plane_section_total_rbs;
8400 startPrbu = 0; /* may already be 0... */
8401 }
8402
8403 section_mod_compr_config_t* mod_compr_config = get_mod_compr_section_to_read(cplane_state, sectionId);
8404
8405 /* Add each PRB */
8406 for (unsigned i = 0; i < numPrbu; i++) {
8407 /* Create subtree */
8408 proto_item *prbHeading = proto_tree_add_string_format(section_tree, hf_oran_samples_prb,
8409 tvb, offset, 0,
8410 "", "PRB");
8411 proto_tree *rb_tree = proto_item_add_subtree(prbHeading, ett_oran_u_prb);
8412 uint32_t exponent = 0;
8413 uint16_t sresmask = 0;
8414
8415 /* udCompParam (depends upon compression method) */
8416 int before = offset;
8417 offset = dissect_udcompparam(tvb, pinfo, rb_tree, offset, compression, &exponent, &sresmask, false0);
8418 int udcompparam_len = offset-before;
8419
8420 /* Show PRB number in root */
8421 proto_item_append_text(prbHeading, " %3u", startPrbu + i*(1+rb));
8422
8423 /* Work out how many REs / PRB */
8424 unsigned res_per_prb = 12;
8425 uint16_t sresmask_to_use = 0x0fff;
8426 float rb_power = 0.0f;
8427
8428 if (compression >= BFP_AND_SELECTIVE_RE5) {
8429 /* Work out which mask should be used */
8430 if (compression==BFP_AND_SELECTIVE_RE5 || compression==MOD_COMPR_AND_SELECTIVE_RE6) {
8431 /* Selective RE cases, use value from compModParam */
8432 sresmask_to_use = (uint16_t)sresmask;
8433 }
8434 else {
8435 /* With masks (in section). Choose between sresmask1 and sresmask2 */
8436 if (rb==1 || (i%2)==0) {
8437 /* Even values */
8438 sresmask_to_use = (uint16_t)sresmask1;
8439 }
8440 else {
8441 /* Odd values */
8442 sresmask_to_use = (uint16_t)sresmask2;
8443 }
8444 }
8445
8446 /* Count REs present using sresmask */
8447 res_per_prb = 0;
8448 /* Use sresmask to pick out which REs are present */
8449 for (unsigned n=0; n<12; n++) {
8450 if (sresmask_to_use & (1<<n)) {
8451 res_per_prb++;
8452 }
8453 }
8454 }
8455
8456 /* N.B. bytes for samples need to be padded out to next byte
8457 (certainly where there aren't 12 REs in PRB..) */
8458 unsigned nBytesForSamples = ((*sample_bit_width_ptr) * res_per_prb * 2 + 7) / 8;
8459 *nBytesPerPrbPtr = nBytesForSamples + udcompparam_len;
8460
8461 proto_tree_add_item(rb_tree, hf_oran_iq_user_data, tvb, offset, nBytesForSamples, ENC_NA0x00000000);
8462
8463 if (section_details) {
8464 if ((startPrbu + i*(1+rb)) < 273) {
8465 proto_item *beamid_ti = proto_tree_add_uint(rb_tree, hf_oran_beamId, tvb, 0, 0,
8466 section_details_get_beam_id(section_details, startPrbu + i*(1+rb)));
8467 proto_item_set_generated(beamid_ti);
8468 }
8469 }
8470
8471
8472 tap_info->non_zero_re_in_current_prb = false0;
8473
8474 /* Optionally trying to show I/Q RE values */
8475 if (pref_showIQSampleValues) {
8476 /* Individual values */
8477 unsigned samples_offset = offset*8;
8478 unsigned samples_start = offset;
8479 unsigned samples = 0;
8480
8481 float re_power = 0.0f;
8482 if (compression >= BFP_AND_SELECTIVE_RE5) {
8483 /* Use sresmask to pick out which REs are present */
8484 for (unsigned n=1; n<=12; n++) {
8485 if (sresmask_to_use & (1<<(n-1))) {
8486 int new_samples_offset =
8487 dissect_oran_u_re(tvb, rb_tree, n, samples_offset, tap_info, *sample_bit_width_ptr,
8488 compression, exponent, mod_compr_config, n, &re_power);
8489 rb_power += re_power;
8490 if ( re_power > peak_power ) {
8491 peak_power = re_power;
8492 peak_location = samples_offset;
8493 }
8494 samples_offset = new_samples_offset;
8495 samples++;
8496 }
8497 }
8498 }
8499 else {
8500 /* All 12 REs are present */
8501 for (unsigned n=1; n<=12; n++) {
8502 int new_samples_offset =
8503 dissect_oran_u_re(tvb, rb_tree, n, samples_offset, tap_info, *sample_bit_width_ptr,
8504 compression, exponent, mod_compr_config, n, &re_power);
8505 rb_power += re_power;
8506 if ( re_power > peak_power ) {
8507 peak_power = re_power;
8508 peak_location = samples_offset;
8509 }
8510 samples_offset = new_samples_offset;
8511 samples++;
8512 }
8513 }
8514 proto_item_append_text(prbHeading, " (%u REs)", samples);
8515 if (section_details) {
8516 if ((startPrbu + i*(1+rb)) < 273) {
8517 proto_item_append_text(prbHeading, " [BeamId:%u]", section_details_get_beam_id(section_details, startPrbu + i*(1+rb)));
8518 }
8519 }
8520
8521 /* Was this PRB all zeros? */
8522 if (!tap_info->non_zero_re_in_current_prb) {
8523 tap_info->num_prbs_zero++;
8524 /* Add a filter to make zero-valued PRBs more findable */
8525 proto_item *zero_ti = proto_tree_add_item(rb_tree, hf_oran_zero_prb, tvb,
8526 samples_start, nBytesForSamples, ENC_NA0x00000000);
8527 proto_item_set_hidden(zero_ti);
8528 proto_item_append_text(prbHeading, " (all zeros)");
8529 }
8530 else {
8531 proto_item *nonzero_ti = proto_tree_add_item(rb_tree, hf_oran_nonzero_prb, tvb, samples_start, nBytesForSamples, ENC_NA0x00000000);
8532 proto_item_set_hidden(nonzero_ti);
8533 }
8534 if (rb_power > 0.0f ) {
8535 /* Zero bit pattern does not infer zero power (see modComp) */
8536 rb_power = rb_power/samples;
8537 total_power += rb_power;
8538 float rb_power_dB = (float) (10.0*log10(rb_power));
8539 if ( show_unscaled_values ) {
8540 rb_power_dB = rb_power_dB - unscaled_power_correction(*sample_bit_width_ptr,compression);
8541 }
8542 proto_item_append_text(prbHeading, " [%3.2f dBFS]", rb_power_dB);
8543 proto_item * rb_power_ti = proto_tree_add_float(rb_tree, hf_oran_u_prb_power, tvb, samples_start, nBytesForSamples, rb_power_dB);
8544 proto_item_set_generated(rb_power_ti);
8545 }
8546 }
8547
8548 tap_info->num_prbs++;
8549
8550
8551 /* Advance past samples */
8552 offset += nBytesForSamples;
8553
8554 /* Set end of prb subtree */
8555 proto_item_set_end(prbHeading, tvb, offset);
8556 }
8557
8558 /* Set extent of section */
8559 proto_item_set_len(sectionHeading, offset-section_start_offset);
8560 if (ud_comp_len_ti != NULL((void*)0) && ((offset-section_start_offset != ud_comp_len))) {
8561 expert_add_info_format(pinfo, ud_comp_len_ti, &ei_oran_ud_comp_len_wrong_size,
8562 "udCompLen indicates %u bytes in section, but dissected %u instead",
8563 ud_comp_len, offset-section_start_offset);
8564 }
8565 /* Show total power: average over full bandwidth */
8566 if ( pref_showIQSampleValues ) {
8567 if ( total_power > 0.0f ) {
8568 float power_dBFS = (float)(10.0*log10(total_power/numPrbu));
8569 if ( show_unscaled_values ) {
8570 power_dBFS = power_dBFS - unscaled_power_correction(*sample_bit_width_ptr,compression);
8571 }
8572 proto_item *ti = proto_tree_add_float(section_tree, hf_oran_u_total_power, tvb, section_start_offset, offset-section_start_offset, power_dBFS);
8573 proto_item_set_generated(ti);
8574 proto_item_append_text(sectionHeading, " [Mean Power %3.2f dBFS]", power_dBFS);
8575 } else {
8576 proto_item_append_text(sectionHeading, " [all zeros]");
8577 }
8578
8579 if ( peak_power > 0.0 ) {
8580 float peak_to_average = peak_power / ((total_power/numPrbu));
8581 peak_to_average = (float) (10.0*log10(peak_to_average));
8582 unsigned sample_size = (peak_location + 2*(*sample_bit_width_ptr) + 7)/8 - peak_location/8;
8583 proto_item *ti = proto_tree_add_float(section_tree, hf_oran_u_peak_power, tvb, peak_location/8, sample_size, peak_to_average);
8584 proto_item_set_generated(ti);
8585 }
8586 }
8587 return offset;
8588}
8589
8590/* User plane dissector (section 8) */
8591static int
8592dissect_oran_u(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
8593 oran_tap_info *tap_info, void *data _U___attribute__((unused)))
8594{
8595 /* Hidden filter for plane */
8596 proto_item *plane_ti = proto_tree_add_item(tree, hf_oran_uplane, tvb, 0, 0, ENC_NA0x00000000);
8597 PROTO_ITEM_SET_HIDDEN(plane_ti)proto_item_set_hidden((plane_ti));
8598
8599 /* Set up structures needed to add the protocol subtree and manage it */
8600 unsigned offset = 0;
8601
8602 col_set_str(pinfo->cinfo, COL_PROTOCOL, "O-RAN-FH-U");
8603 col_set_str(pinfo->cinfo, COL_INFO, "U-Plane");
8604
8605 tap_info->userplane = true1;
8606
8607 /* Create display subtree for the protocol */
8608 proto_item *protocol_item = proto_tree_add_item(tree, proto_oran, tvb, 0, -1, ENC_NA0x00000000);
8609 proto_item_append_text(protocol_item, "-U");
8610 proto_tree *oran_tree = proto_item_add_subtree(protocol_item, ett_oran);
8611
8612 /* Transport header */
8613 /* Real-time control data / IQ data transfer message series identifier */
8614 uint16_t eAxC;
8615 addPcOrRtcid(tvb, oran_tree, &offset, hf_oran_ecpri_pcid, &eAxC, tap_info);
8616 tap_info->eaxc = eAxC;
8617
8618 /* Update/report status of conversation */
8619 flow_state_t* state = lookup_flow(pinfo, eAxC, ORAN_U_PLANE1, false0);
8620
8621 flow_result_t *result = NULL((void*)0);
8622
8623 /* Message identifier */
8624 proto_item *seqIdItem;
8625 uint32_t seqId, subSeqId, e;
8626 offset = addSeqid(tvb, oran_tree, offset, ORAN_U_PLANE1, &seqId, &seqIdItem, &subSeqId, &e);
8627
8628 uint32_t frameId = 0, subframeId = 0, slotId = 0, symbolId = 0, direction = 0;
8629
8630 /* Add buffer to the reassembly ahead of cycling through the options */
8631 if (do_radio_transport_layer_reassembly && (e !=1 || subSeqId!= 0)) {
8632 /* Set fragmented flag. */
8633 bool_Bool save_fragmented = pinfo->fragmented;
8634 pinfo->fragmented = true1;
8635 fragment_head *fh;
8636 unsigned frag_data_len = tvb_reported_length_remaining(tvb, offset);
8637
8638 /* Add this fragment into reassembly table */
8639 /* In the absence of information from the header [might not be present], use the MAC addresses. */
8640 int dir = cmp_address(&pinfo->src, &pinfo->dst)>0;
8641 uint32_t reassembly_id = make_reassembly_id(seqId, eAxC, dir);
8642 fh = fragment_add_seq(&oran_reassembly_table, tvb, offset, pinfo,
8643 reassembly_id, /* id */
8644 GUINT_TO_POINTER(reassembly_id)((gpointer) (gulong) (reassembly_id)), /* data */
8645 subSeqId, /* frag_number */
8646 frag_data_len, /* frag_data_len */
8647 !e, /* more_frags */
8648 0);
8649
8650 bool_Bool update_col_info = true1;
8651
8652 /* See if this completes an SDU */
8653 tvbuff_t *original_tvb = tvb;
8654 tvbuff_t *next_tvb = process_reassembled_data(tvb, offset, pinfo, "Reassembled O-RAN FH CUS Payload",
8655 fh, &oran_frag_items,
8656 &update_col_info, oran_tree);
8657 if (next_tvb) {
8658 /* Have reassembled data */
8659 proto_tree_add_item(oran_tree, hf_oran_payload, next_tvb, 0, -1, ENC_NA0x00000000);
8660 col_append_fstr(pinfo->cinfo, COL_INFO, " Reassembled Data (%u bytes)", tvb_reported_length(next_tvb));
8661 }
8662 /* Will continue with either reassembled tvb or NULL */
8663 tvb = next_tvb;
8664
8665 /* Restore fragmented flag */
8666 pinfo->fragmented = save_fragmented;
8667
8668 /* Don't dissect any more if not complete yet.. */
8669 if (tvb == NULL((void*)0)) {
8670 /* For subseq=0 it's possible to do a partial decode to display the timing header
8671 and first section header, but not much more */
8672 if ( subSeqId == 0 ) {
8673 if ( tvb_reported_length_remaining(original_tvb, offset) >= 4 ) {
8674 proto_item * timingHeader = proto_tree_add_string_format(oran_tree, hf_oran_timing_header,
8675 original_tvb, offset, 4, "", "Timing Header (");
8676 offset = dissect_oran_u_timing_header(original_tvb, pinfo, offset, timingHeader, tap_info, &frameId, &subframeId, &slotId, &symbolId, &direction);
8677
8678 if ( tvb_reported_length_remaining(original_tvb, offset) >= 4 ) {
8679 uint32_t sectionId, rb, startPrbu, numPrbu;
8680 section_details_t *section_details = NULL((void*)0);
8681 proto_item *sectionHeading = proto_tree_add_string_format(oran_tree, hf_oran_u_section,
8682 original_tvb, offset, 0, "", "Section");
8683 proto_tree *section_tree = proto_item_add_subtree(sectionHeading, ett_oran_u_section);
8684
8685 /* No C-plane linking for a partial decode */
8686 offset = dissect_oran_u_section_header(original_tvb, pinfo, offset, section_tree, tap_info, NULL((void*)0), NULL((void*)0),
8687 frameId, subframeId, slotId, symbolId, direction, &sectionId, &rb,
8688 &startPrbu, &numPrbu, &section_details);
8689 }
8690 }
8691 }
8692 return tvb_captured_length(original_tvb);
8693 }
8694 offset = 0; /* This sorts out the reading of the timing header and the first section header */
8695 }
8696
8697 proto_item * timingHeader = proto_tree_add_string_format(oran_tree, hf_oran_timing_header,
8698 tvb, offset, 4, "", "Timing Header (");
8699 offset = dissect_oran_u_timing_header(tvb, pinfo, offset, timingHeader, tap_info, &frameId, &subframeId, &slotId, &symbolId, &direction);
8700
8701 unsigned sample_bit_width;
8702 unsigned compression;
8703 int includeUdCompHeader;
8704
8705 /* Also lookup C-PLANE state (sent in opposite direction for UL) so may check current compression settings */
8706 flow_state_t* cplane_state = lookup_flow(pinfo, eAxC, ORAN_C_PLANE0, direction == 0);
8707
8708 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
8709 /* Create state/conversation if doesn't exist yet */
8710 if (!state) {
8711 /* Allocate new state */
8712 state = wmem_new0(wmem_file_scope(), flow_state_t)((flow_state_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_state_t
)))
;
8713 state->ack_nack_requests = wmem_tree_new(wmem_file_scope());
8714 state->expected_sections[0] = wmem_tree_new(wmem_file_scope());
8715 state->expected_sections[1] = wmem_tree_new(wmem_file_scope());
8716 store_flow(pinfo, eAxC, ORAN_U_PLANE1, false0, state);
8717 }
8718
8719 result = wmem_new0(wmem_file_scope(), flow_result_t)((flow_result_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_result_t
)))
;
8720 result->expected_sections = wmem_tree_new(wmem_file_scope());
8721 result->u_plane_frames = wmem_list_new(wmem_file_scope());
8722 result->cplane_seen = (cplane_state != NULL((void*)0));
8723
8724 wmem_tree_insert32(flow_results_table, pinfo->num, result);
8725
8726 /* Check sequence analysis status (but not if later part of radio layer fragmentation) */
8727 if (state->last_frame_seen[direction] && (subSeqId==0) && (seqId != state->next_expected_sequence_number[direction])) {
8728 /* Store this result */
8729 result->unexpected_seq_number = true1;
8730 result->expected_sequence_number = state->next_expected_sequence_number[direction];
8731 result->previous_frame = state->last_frame[direction];
8732 }
8733 /* Update sequence analysis state */
8734 state->last_frame[direction] = pinfo->num;
8735 state->last_frame_seen[direction] = true1;
8736 state->next_expected_sequence_number[direction] = (seqId+1) % 256;
8737 }
8738
8739 /* Show any issues associated with this frame number */
8740 result = wmem_tree_lookup32(flow_results_table, pinfo->num);
8741 if (result) {
8742 if (result->unexpected_seq_number) {
8743 expert_add_info_format(pinfo, seqIdItem,
8744 (direction == DIR_UPLINK0) ?
8745 &ei_oran_uplane_unexpected_sequence_number_ul :
8746 &ei_oran_uplane_unexpected_sequence_number_dl,
8747 "Sequence number %u expected, but got %u",
8748 result->expected_sequence_number, seqId);
8749 tap_info->missing_sns = (256 + seqId - result->expected_sequence_number) % 256;
8750
8751 /* Show link back to previous frame in stream */
8752 proto_item *prev_ti = proto_tree_add_uint(proto_item_get_subtree(proto_item_get_parent(seqIdItem)),
8753 hf_oran_previous_frame, tvb, 0, 0, result->previous_frame);
8754 proto_item_set_generated(prev_ti);
8755 }
8756 }
8757
8758 /* Checking UL timing within current slot. Disabled if limit set to 0. */
8759 /* N.B., timing is relative to first seen frame,
8760 not some notion of the beginning of the slot from sync, offset by some timing.. */
8761 if (direction == DIR_UPLINK0 && us_allowed_for_ul_in_symbol > 0) {
8762 uint32_t timing_key = get_timing_key(frameId, subframeId, slotId, symbolId);
8763 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
8764 /* Set state on first pass */
8765 ul_timing_for_slot* timing = (ul_timing_for_slot*)wmem_tree_lookup32(ul_symbol_timing, timing_key);
8766 if (!timing) {
8767 /* Allocate new state */
8768 timing = wmem_new0(wmem_file_scope(), ul_timing_for_slot)((ul_timing_for_slot*)wmem_alloc0((wmem_file_scope()), sizeof
(ul_timing_for_slot)))
;
8769 timing->first_frame = pinfo->num;
8770 timing->first_frame_time = pinfo->abs_ts;
8771 timing->frames_seen_in_symbol = 1;
8772 timing->last_frame_in_symbol = pinfo->num;
8773 wmem_tree_insert32(ul_symbol_timing, timing_key, timing);
8774 }
8775 else {
8776 /* Update existing state */
8777 timing->frames_seen_in_symbol++;
8778 timing->last_frame_in_symbol = pinfo->num;
8779 }
8780 }
8781 else {
8782 /* Subsequent passes - look up result */
8783 ul_timing_for_slot* timing = (ul_timing_for_slot*)wmem_tree_lookup32(ul_symbol_timing, timing_key);
8784 if (timing) { /* Really shouldn't fail! */
8785 if (timing->frames_seen_in_symbol > 1) {
8786 /* Work out gap between frames (in microseconds) back to frame carrying first seen symbol */
8787 uint32_t total_gap = time_gap(&pinfo->abs_ts, &timing->first_frame_time, 1000);
8788
8789 /* Show how long it has been */
8790 proto_item *ti = NULL((void*)0);
8791 if (pinfo->num != timing->first_frame) {
8792 ti = proto_tree_add_uint(timingHeader, hf_oran_u_section_ul_symbol_time, tvb, 0, 0, total_gap);
8793 proto_item_set_generated(ti);
8794 }
8795
8796 if (total_gap > us_allowed_for_ul_in_symbol) {
8797 expert_add_info_format(pinfo, ti, &ei_oran_ul_uplane_symbol_too_long,
8798 "UL U-Plane Tx took longer (%u\u03bcs) than limit set in preferences (%u\u03bcs)",
8799 total_gap, us_allowed_for_ul_in_symbol);
8800 proto_item_append_text(timingHeader, " (%u\u03bcs since first frame seen for symbol)", total_gap);
8801 }
8802
8803 /* Show how many frames were received */
8804 ti = proto_tree_add_uint(timingHeader, hf_oran_u_section_ul_symbol_frames, tvb, 0, 0, timing->frames_seen_in_symbol);
8805 proto_item_set_generated(ti);
8806
8807 /* Link to first frame for this symbol */
8808 if (pinfo->num != timing->first_frame) {
8809 ti = proto_tree_add_uint(timingHeader, hf_oran_u_section_ul_symbol_first_frame, tvb, 0, 0, timing->first_frame);
8810 proto_item_set_generated(ti);
8811 }
8812
8813 /* And also last frame */
8814 if (pinfo->num != timing->last_frame_in_symbol) {
8815 ti = proto_tree_add_uint(timingHeader, hf_oran_u_section_ul_symbol_last_frame, tvb, 0, 0, timing->last_frame_in_symbol);
8816 proto_item_set_generated(ti);
8817 }
8818
8819 tap_info->ul_delay_in_us = total_gap;
8820 }
8821 }
8822 }
8823 }
8824
8825
8826 /* Look up preferences for samples */
8827 if (direction == DIR_UPLINK0) {
8828 sample_bit_width = pref_sample_bit_width_uplink;
8829 compression = pref_iqCompressionUplink;
8830 includeUdCompHeader = pref_includeUdCompHeaderUplink;
8831 }
8832 else {
8833 sample_bit_width = pref_sample_bit_width_downlink;
8834 compression = pref_iqCompressionDownlink;
8835 includeUdCompHeader = pref_includeUdCompHeaderDownlink;
8836 }
8837
8838 /* If uplink, load any udCompHdr settings written by C-Plane */
8839 bool_Bool ud_cmp_hdr_cplane = false0;
8840 if (result && direction == 0) {
8841 /* On first pass, keep the settings the C-Plane has written so far */
8842 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited) && cplane_state && cplane_state->ul_ud_comp_hdr_set) {
8843 result->ul_ud_comp_hdr_set = true1;
8844 result->ul_ud_comp_hdr_bit_width = cplane_state->ul_ud_comp_hdr_bit_width;
8845 result->ul_ud_comp_hdr_compression = cplane_state->ul_ud_comp_hdr_compression;
8846 result->ul_ud_comp_hdr_frame = cplane_state->ul_ud_comp_hdr_frame;
8847 }
8848 /* Initialise settings from udpCompHdr from C-Plane */
8849 if (result->ul_ud_comp_hdr_set && !pref_override_ul_compression) {
8850 sample_bit_width = result->ul_ud_comp_hdr_bit_width;
8851 compression = result->ul_ud_comp_hdr_compression;
8852 ud_cmp_hdr_cplane = true1;
8853 }
8854 }
8855
8856 /* Need a valid value (e.g. 9, 14). 0 definitely won't work, as won't progress around loop! */
8857 /* N.B. may yet be overwritten by udCompHdr settings in sections below! */
8858 if (sample_bit_width == 0 || sample_bit_width > 16) {
8859 expert_add_info_format(pinfo, protocol_item, &ei_oran_invalid_sample_bit_width,
8860 "%cL Sample bit width from %s (%u) not valid, so can't decode sections",
8861 (direction == DIR_UPLINK0) ? 'U' : 'D',
8862 !ud_cmp_hdr_cplane ? "preference" : "C-Plane",
8863 sample_bit_width);
8864 return offset;
8865 }
8866
8867 unsigned bytesLeft;
8868 unsigned number_of_sections = 0;
8869 unsigned nBytesPerPrb =0;
8870
8871 /* Add each section (not from count, just keep parsing until payload used) */
8872 do {
8873 offset = dissect_oran_u_section(tvb, pinfo, offset, oran_tree, protocol_item, tap_info, state, result, cplane_state,
8874 frameId, subframeId, slotId, symbolId, direction, includeUdCompHeader,
8875 &sample_bit_width, compression, ud_cmp_hdr_cplane, &nBytesPerPrb);
8876 bytesLeft = tvb_captured_length(tvb) - offset;
8877 number_of_sections++;
8878 } while (bytesLeft >= 4); /* eCPRI payload ends after the sections and 0-3 bytes of padding */
8879
8880 /* Show number of sections found */
8881 proto_item *ti = proto_tree_add_uint(oran_tree, hf_oran_numberOfSections, tvb, 0, 0, number_of_sections);
8882 proto_item_set_generated(ti);
8883
8884 return tvb_captured_length(tvb);
8885}
8886
8887
8888/**********************************************************************/
8889/* Main dissection function. */
8890/* N.B. ecpri message type passed in as 'data' arg by eCPRI dissector */
8891static int
8892dissect_oran(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
8893{
8894 if (data == NULL((void*)0)) {
8895 return 0;
8896 }
8897 uint32_t ecpri_message_type = *(uint32_t *)data;
8898 unsigned offset = 0;
8899
8900 /* Allocate and zero tap struct */
8901 oran_tap_info *tap_info = wmem_new0(pinfo->pool, oran_tap_info)((oran_tap_info*)wmem_alloc0((pinfo->pool), sizeof(oran_tap_info
)))
;
8902 tap_info->pdu_size = pinfo->fd->pkt_len;
8903 tap_info->ul_delay_configured_max = us_allowed_for_ul_in_symbol;
8904
8905 switch (ecpri_message_type) {
8906 case ECPRI_MT_IQ_DATA0:
8907 offset = dissect_oran_u(tvb, pinfo, tree, tap_info, data);
8908 break;
8909 case ECPRI_MT_RT_CTRL_DATA2:
8910 offset = dissect_oran_c(tvb, pinfo, tree, tap_info, data);
8911 break;
8912 default:
8913 /* Not dissecting other types - assume these are handled by eCPRI dissector */
8914 return 0;
8915 }
8916
8917 tap_queue_packet(oran_tap, pinfo, tap_info);
8918
8919 return offset;
8920}
8921
8922static void oran_init_protocol(void)
8923{
8924 udcomplen_heuristic_result_set = false0;
8925 udcomplen_heuristic_result = false0;
8926}
8927
8928
8929/* Register the protocol with Wireshark. */
8930void
8931proto_register_oran(void)
8932{
8933 static hf_register_info hf[] = {
8934
8935 /* Section 5.1.3.2.7 */
8936 { &hf_oran_du_port_id,
8937 { "DU Port ID", "oran_fh_cus.du_port_id",
8938 FT_UINT16, BASE_DEC,
8939 NULL((void*)0), 0x0,
8940 "Processing unit at O-RU - width set in dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8941 },
8942
8943 /* Section 5.1.3.2.7 */
8944 { &hf_oran_bandsector_id,
8945 { "BandSector ID", "oran_fh_cus.bandsector_id",
8946 FT_UINT16, BASE_DEC,
8947 NULL((void*)0), 0x0,
8948 "Aggregated cell identified - width set in dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8949 },
8950
8951 /* Section 5.1.3.2.7 */
8952 { &hf_oran_cc_id,
8953 { "CC ID", "oran_fh_cus.cc_id",
8954 FT_UINT16, BASE_DEC,
8955 NULL((void*)0), 0x0,
8956 "Component Carrier - width set in dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8957 },
8958
8959 /* Section 5.1.3.2.7 */
8960 { &hf_oran_ru_port_id,
8961 { "RU Port ID", "oran_fh_cus.ru_port_id",
8962 FT_UINT16, BASE_DEC,
8963 NULL((void*)0), 0x0,
8964 "Logical flow - width set in dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8965 },
8966
8967 /* Section 5.1.3.2.8 */
8968 { &hf_oran_sequence_id,
8969 { "Sequence ID", "oran_fh_cus.sequence_id",
8970 FT_UINT8, BASE_DEC,
8971 NULL((void*)0), 0x0,
8972 "The Sequence ID wraps around individually per eAxC", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8973 },
8974
8975 /* Section 5.1.3.2.8 */
8976 { &hf_oran_e_bit,
8977 { "E Bit", "oran_fh_cus.e_bit",
8978 FT_UINT8, BASE_DEC,
8979 VALS(e_bit)((0 ? (const struct _value_string*)0 : ((e_bit)))), 0x80,
8980 "Indicate the last message of a subsequence (U-Plane only)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8981 },
8982
8983 /* Section 5.1.3.2.8 */
8984 { &hf_oran_subsequence_id,
8985 { "Subsequence ID", "oran_fh_cus.subsequence_id",
8986 FT_UINT8, BASE_DEC,
8987 NULL((void*)0), 0x7f,
8988 "The subsequence ID (for eCPRI layer fragmentation)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8989 },
8990
8991 { &hf_oran_previous_frame,
8992 { "Previous frame in stream", "oran_fh_cus.previous-frame",
8993 FT_FRAMENUM, BASE_NONE,
8994 FRAMENUM_TYPE(FT_FRAMENUM_NONE)((gpointer) (glong) (FT_FRAMENUM_NONE)), 0x0,
8995 "Previous frame in sequence", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8996 },
8997
8998 /* Section 7.5.2.1 */
8999 { &hf_oran_data_direction,
9000 { "Data Direction", "oran_fh_cus.data_direction",
9001 FT_UINT8, BASE_DEC,
9002 VALS(data_direction_vals)((0 ? (const struct _value_string*)0 : ((data_direction_vals)
)))
, 0x80,
9003 "gNB data direction", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
9004 },
9005
9006 /* Section 7.5.2.2 */
9007 { &hf_oran_payload_version,
9008 { "Payload Version", "oran_fh_cus.payloadVersion",
9009 FT_UINT8, BASE_DEC,
9010 NULL((void*)0), 0x70,
9011 "Payload protocol version the following IEs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9012 },
9013
9014 /* Section 7.5.2.3 */
9015 { &hf_oran_filter_index,
9016 { "Filter Index", "oran_fh_cus.filterIndex",
9017 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
9018 RVALS(filter_indices)((0 ? (const struct _range_string*)0 : ((filter_indices)))), 0x0f,
9019 "used between IQ data and air interface, both in DL and UL", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9020 },
9021
9022 /* Section 7.5.2.4 */
9023 { &hf_oran_frame_id,
9024 { "Frame ID", "oran_fh_cus.frameId",
9025 FT_UINT8, BASE_DEC,
9026 NULL((void*)0), 0x0,
9027 "A counter for 10 ms frames (wrapping period 2.56 seconds)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9028 },
9029
9030 /* Section 7.5.2.5 */
9031 { &hf_oran_subframe_id,
9032 { "Subframe ID", "oran_fh_cus.subframe_id",
9033 FT_UINT8, BASE_DEC,
9034 NULL((void*)0), 0xf0,
9035 "A counter for 1 ms sub-frames within 10ms frame", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9036 },
9037
9038 /* Section 7.5.2.6 */
9039 { &hf_oran_slot_id,
9040 { "Slot ID", "oran_fh_cus.slotId",
9041 FT_UINT16, BASE_DEC,
9042 NULL((void*)0), 0x0fc0,
9043 "Slot number within a 1ms sub-frame", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9044 },
9045
9046 /* Generated for convenience */
9047 { &hf_oran_slot_within_frame,
9048 { "Slot within frame", "oran_fh_cus.slot-within-frame",
9049 FT_UINT16, BASE_DEC,
9050 NULL((void*)0), 0x0,
9051 "Slot within frame, to match DCT logs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9052 },
9053
9054 /* Section 7.5.2.7 */
9055 { &hf_oran_start_symbol_id,
9056 { "Start Symbol ID", "oran_fh_cus.startSymbolId",
9057 FT_UINT8, BASE_DEC,
9058 NULL((void*)0), 0x3f,
9059 "The first symbol number within slot affected", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9060 },
9061
9062 /* Section 7.5.2.8 */
9063 { &hf_oran_numberOfSections,
9064 { "Number of Sections", "oran_fh_cus.numberOfSections",
9065 FT_UINT8, BASE_DEC,
9066 NULL((void*)0), 0x0,
9067 "The number of section IDs included in this message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9068 },
9069
9070 /* Section 7.5.2.9 */
9071 { &hf_oran_sectionType,
9072 { "Section Type", "oran_fh_cus.sectionType",
9073 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
9074 RVALS(section_types)((0 ? (const struct _range_string*)0 : ((section_types)))), 0x0,
9075 "Determines the characteristics of U-plane data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9076 },
9077
9078 /* Section 7.5.2.10 */
9079 { &hf_oran_udCompHdr,
9080 { "udCompHdr", "oran_fh_cus.udCompHdr",
9081 FT_STRING, BASE_NONE,
9082 NULL((void*)0), 0x0,
9083 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9084 },
9085
9086 /* Section 7.5.2.11 */
9087 { &hf_oran_numberOfUEs,
9088 { "Number Of UEs", "oran_fh_cus.numberOfUEs",
9089 FT_UINT8, BASE_DEC,
9090 NULL((void*)0), 0x0,
9091 "Indicates number of UEs for which channel info is provided", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9092 },
9093
9094 /* Section 7.5.2.12 */
9095 { &hf_oran_timeOffset,
9096 { "Time Offset", "oran_fh_cus.timeOffset",
9097 FT_UINT16, BASE_DEC,
9098 NULL((void*)0), 0x0,
9099 "from start of the slot to start of CP in samples", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9100 },
9101
9102 /* Section 7.5.2.13 */
9103 { &hf_oran_frameStructure_fft,
9104 { "FFT Size", "oran_fh_cus.frameStructure.fft",
9105 FT_UINT8, BASE_HEX | BASE_RANGE_STRING0x00000100,
9106 RVALS(frame_structure_fft)((0 ? (const struct _range_string*)0 : ((frame_structure_fft)
)))
, 0xf0,
9107 "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) }
9108 },
9109
9110 /* Section 7.5.2.13 */
9111 { &hf_oran_frameStructure_subcarrier_spacing,
9112 { "Subcarrier Spacing", "oran_fh_cus.frameStructure.spacing",
9113 FT_UINT8, BASE_HEX | BASE_RANGE_STRING0x00000100,
9114 RVALS(subcarrier_spacings)((0 ? (const struct _range_string*)0 : ((subcarrier_spacings)
)))
, 0x0f,
9115 "The sub carrier spacing as well as the number of slots per 1ms sub-frame",
9116 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
9117 },
9118
9119 /* Section 7.5.2.14 */
9120 { &hf_oran_cpLength,
9121 { "cpLength", "oran_fh_cus.cpLength",
9122 FT_UINT16, BASE_DEC,
9123 NULL((void*)0), 0x0,
9124 "cyclic prefix length", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9125 },
9126
9127 { &hf_oran_timing_header,
9128 { "Timing Header", "oran_fh_cus.timingHeader",
9129 FT_STRING, BASE_NONE,
9130 NULL((void*)0), 0x0,
9131 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9132 },
9133
9134 /* Section 7.5.3.1 */
9135 { &hf_oran_section_id,
9136 { "sectionId", "oran_fh_cus.sectionId",
9137 FT_UINT16, BASE_DEC,
9138 NULL((void*)0), 0xfff0,
9139 "section identifier of data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9140 },
9141
9142 /* Section 7.5.3.2 */
9143 { &hf_oran_rb,
9144 { "rb", "oran_fh_cus.rb",
9145 FT_UINT8, BASE_DEC,
9146 VALS(rb_vals)((0 ? (const struct _value_string*)0 : ((rb_vals)))), 0x08,
9147 "resource block indicator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9148 },
9149
9150 /* Section 7.5.5.3 */
9151 { &hf_oran_symInc,
9152 { "symInc", "oran_fh_cus.symInc",
9153 FT_UINT8, BASE_DEC,
9154 VALS(sym_inc_vals)((0 ? (const struct _value_string*)0 : ((sym_inc_vals)))), 0x04,
9155 "Symbol Number Increment Command", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9156 },
9157
9158 /* Section 7.5.3.4 */
9159 { &hf_oran_startPrbc,
9160 { "startPrbc", "oran_fh_cus.startPrbc",
9161 FT_UINT16, BASE_DEC,
9162 NULL((void*)0), 0x03ff,
9163 "Starting PRB of Control Plane Section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9164 },
9165
9166 /* Section 7.5.3.5 */
9167 { &hf_oran_reMask_re1,
9168 { "RE 1", "oran_fh_cus.reMask-RE1",
9169 FT_BOOLEAN, 16,
9170 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x8000,
9171 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9172 },
9173 { &hf_oran_reMask_re2,
9174 { "RE 2", "oran_fh_cus.reMask-RE2",
9175 FT_BOOLEAN, 16,
9176 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x4000,
9177 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9178 },
9179 { &hf_oran_reMask_re3,
9180 { "RE 3", "oran_fh_cus.reMask-RE3",
9181 FT_BOOLEAN, 16,
9182 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x2000,
9183 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9184 },
9185 { &hf_oran_reMask_re4,
9186 { "RE 4", "oran_fh_cus.reMask-RE4",
9187 FT_BOOLEAN, 16,
9188 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x1000,
9189 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9190 },
9191 { &hf_oran_reMask_re5,
9192 { "RE 5", "oran_fh_cus.reMask-RE5",
9193 FT_BOOLEAN, 16,
9194 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0800,
9195 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9196 },
9197 { &hf_oran_reMask_re6,
9198 { "RE 6", "oran_fh_cus.reMask-RE6",
9199 FT_BOOLEAN, 16,
9200 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0400,
9201 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9202 },
9203 { &hf_oran_reMask_re7,
9204 { "RE 7", "oran_fh_cus.reMask-RE7",
9205 FT_BOOLEAN, 16,
9206 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0200,
9207 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9208 },
9209 { &hf_oran_reMask_re8,
9210 { "RE 8", "oran_fh_cus.reMask-RE8",
9211 FT_BOOLEAN, 16,
9212 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0100,
9213 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9214 },
9215 { &hf_oran_reMask_re9,
9216 { "RE 9", "oran_fh_cus.reMask-RE9",
9217 FT_BOOLEAN, 16,
9218 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0080,
9219 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9220 },
9221 { &hf_oran_reMask_re10,
9222 { "RE 10", "oran_fh_cus.reMask-RE10",
9223 FT_BOOLEAN, 16,
9224 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0040,
9225 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9226 },
9227 { &hf_oran_reMask_re11,
9228 { "RE 11", "oran_fh_cus.reMask-RE11",
9229 FT_BOOLEAN, 16,
9230 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0020,
9231 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9232 },
9233 { &hf_oran_reMask_re12,
9234 { "RE 12", "oran_fh_cus.reMask-RE12",
9235 FT_BOOLEAN, 16,
9236 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0010,
9237 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9238 },
9239 { &hf_oran_reMask,
9240 { "RE Mask", "oran_fh_cus.reMask",
9241 FT_UINT16, BASE_HEX,
9242 NULL((void*)0), 0xfff0,
9243 "The Resource Element (RE) mask within a PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9244 },
9245
9246 /* Section 7.5.3.6 */
9247 { &hf_oran_numPrbc,
9248 { "numPrbc", "oran_fh_cus.numPrbc",
9249 FT_UINT8, BASE_DEC,
9250 NULL((void*)0), 0x0,
9251 "Number of contiguous PRBs per data section description", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9252 },
9253 /* Section 7.5.3.7 */
9254 { &hf_oran_numSymbol,
9255 { "Number of Symbols", "oran_fh_cus.numSymbol",
9256 FT_UINT8, BASE_DEC,
9257 NULL((void*)0), 0x0f,
9258 "Defines number of symbols to which the section control is applicable", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9259 },
9260 /* Section 7.5.3.8 */
9261 { &hf_oran_ef,
9262 { "Extension Flag", "oran_fh_cus.ef",
9263 FT_BOOLEAN, 8,
9264 NULL((void*)0), 0x80,
9265 "Indicates if more section extensions follow", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9266 },
9267 /* Section 7.5.3.9 */
9268 { &hf_oran_beamId,
9269 { "Beam ID", "oran_fh_cus.beamId",
9270 FT_UINT16, BASE_DEC,
9271 NULL((void*)0), 0x7fff,
9272 "Defines the beam pattern to be applied to the U-Plane data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9273 },
9274
9275 { &hf_oran_extension,
9276 { "Extension", "oran_fh_cus.extension",
9277 FT_STRING, BASE_NONE,
9278 NULL((void*)0), 0x0,
9279 "Section extension", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9280 },
9281
9282 /* Section 7.6.2.1 */
9283 { &hf_oran_exttype,
9284 { "extType", "oran_fh_cus.extType",
9285 FT_UINT8, BASE_DEC|BASE_EXT_STRING0x00000200,
9286 &exttype_vals_ext, 0x7f,
9287 "The extension type, which provides additional parameters specific to subject data extension", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9288 },
9289
9290 /* Section 7.6.2.3 */
9291 { &hf_oran_extlen,
9292 { "extLen", "oran_fh_cus.extLen",
9293 FT_UINT16, BASE_DEC,
9294 NULL((void*)0), 0x0,
9295 "Extension length in 32-bit words", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9296 },
9297
9298 /* Section 7.7.1 */
9299 { &hf_oran_bfw,
9300 { "bfw", "oran_fh_cus.bfw",
9301 FT_STRING, BASE_NONE,
9302 NULL((void*)0), 0x0,
9303 "Set of weights for a particular antenna", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9304 },
9305 { &hf_oran_bfw_bundle,
9306 { "Bundle", "oran_fh_cus.bfw.bundle",
9307 FT_STRING, BASE_NONE,
9308 NULL((void*)0), 0x0,
9309 "Bundle of BFWs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9310 },
9311 { &hf_oran_bfw_bundle_id,
9312 { "Bundle Id", "oran_fh_cus.bfw.bundleId",
9313 FT_UINT32, BASE_DEC,
9314 NULL((void*)0), 0x0,
9315 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9316 },
9317 /* Section 7.7.1.4 */
9318 { &hf_oran_bfw_i,
9319 { "bfwI", "oran_fh_cus.bfwI",
9320 FT_FLOAT, BASE_NONE,
9321 NULL((void*)0), 0x0,
9322 "In-phase", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9323 },
9324 /* Section 7.7.1.5 */
9325 { &hf_oran_bfw_q,
9326 { "bfwQ", "oran_fh_cus.bfwQ",
9327 FT_FLOAT, BASE_NONE,
9328 NULL((void*)0), 0x0,
9329 "Quadrature", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9330 },
9331
9332 /* Section 7.5.3.10 */
9333 { &hf_oran_ueId,
9334 { "UE ID", "oran_fh_cus.ueId",
9335 FT_UINT16, BASE_DEC,
9336 NULL((void*)0), 0x7fff,
9337 "logical identifier for set of channel info", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9338 },
9339 /* Section 7.5.3.11 */
9340 { &hf_oran_freqOffset,
9341 { "Frequency Offset", "oran_fh_cus.freqOffset",
9342 FT_UINT24, BASE_DEC,
9343 NULL((void*)0), 0x0,
9344 "with respect to the carrier center frequency before additional filtering", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9345 },
9346
9347 /* Section 7.5.3.12 */
9348 { &hf_oran_regularizationFactor,
9349 { "Regularization Factor", "oran_fh_cus.regularizationFactor",
9350 FT_INT16, BASE_DEC,
9351 NULL((void*)0), 0x0,
9352 "Signed value to support MMSE operation within O-RU", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9353 },
9354 /* Section 7.5.3.14 */
9355 { &hf_oran_laaMsgType,
9356 { "LAA Message Type", "oran_fh_cus.laaMsgType",
9357 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
9358 RVALS(laaMsgTypes)((0 ? (const struct _range_string*)0 : ((laaMsgTypes)))), 0xf0,
9359 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9360 },
9361 /* Section 7.5.3.15 */
9362 { &hf_oran_laaMsgLen,
9363 { "LAA Message Length", "oran_fh_cus.laaMsgLen",
9364 FT_UINT8, BASE_DEC,
9365 NULL((void*)0), 0x0f,
9366 "number of 32-bit words in the LAA section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9367 },
9368 /* Section 7.5.3.16 */
9369 { &hf_oran_lbtHandle,
9370 { "LBT Handle", "oran_fh_cus.lbtHandle",
9371 FT_UINT16, BASE_HEX,
9372 NULL((void*)0), 0x0,
9373 "label to identify transaction", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9374 },
9375 /* Section 7.5.3.17 */
9376 { &hf_oran_lbtDeferFactor,
9377 { "Defer Factor", "oran_fh_cus.lbtDeferFactor",
9378 FT_UINT8, BASE_DEC,
9379 NULL((void*)0), 0x07,
9380 "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)}
9381 },
9382 /* Section 7.5.3.18 */
9383 { &hf_oran_lbtBackoffCounter,
9384 { "Backoff Counter", "oran_fh_cus.lbtBackoffCounter",
9385 FT_UINT16, BASE_DEC,
9386 NULL((void*)0), 0xffc0,
9387 "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)}
9388 },
9389 /* Section 7.5.3.19 */
9390 { &hf_oran_lbtOffset,
9391 { "LBT Offset", "oran_fh_cus.lbtOffset",
9392 FT_UINT16, BASE_DEC,
9393 NULL((void*)0), 0xffc0,
9394 "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)}
9395 },
9396 /* Section 7.5.3.20 */
9397 { &hf_oran_MCOT,
9398 { "Maximum Channel Occupancy Time", "oran_fh_cus.MCOT",
9399 FT_UINT8, BASE_DEC,
9400 NULL((void*)0), 0x3c,
9401 "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)}
9402 },
9403 /* Section 7.5.3.21 */
9404 { &hf_oran_lbtMode,
9405 { "LBT Mode", "oran_fh_cus.lbtMode",
9406 FT_UINT8, BASE_DEC,
9407 VALS(lbtMode_vals)((0 ? (const struct _value_string*)0 : ((lbtMode_vals)))), 0x0,
9408 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9409 },
9410 /* Section 7.5.3.22 */
9411 { &hf_oran_lbtPdschRes,
9412 { "lbtPdschRes", "oran_fh_cus.lbtPdschRes",
9413 FT_UINT8, BASE_DEC,
9414 VALS(lbtPdschRes_vals)((0 ? (const struct _value_string*)0 : ((lbtPdschRes_vals)))), 0xc0,
9415 "LBT result of SFN/SF", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9416 },
9417 /* Section 7.5.3.23 */
9418 { &hf_oran_sfStatus,
9419 { "sfStatus", "oran_fh_cus.sfStatus",
9420 FT_BOOLEAN, 8,
9421 TFS(&tfs_sfStatus)((0 ? (const struct true_false_string*)0 : ((&tfs_sfStatus
))))
, 0x10,
9422 "Indicates whether the subframe was dropped or transmitted", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9423 },
9424 /* Section 7.5.3.24 */
9425 { &hf_oran_lbtDrsRes,
9426 { "lbtDrsRes", "oran_fh_cus.lbtDrsRes",
9427 FT_BOOLEAN, 8,
9428 TFS(&tfs_fail_success)((0 ? (const struct true_false_string*)0 : ((&tfs_fail_success
))))
, 0x80,
9429 "Indicates whether the subframe was dropped or transmitted", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9430 },
9431 /* Section 7.5.3.25 */
9432 { &hf_oran_initialPartialSF,
9433 { "Initial partial SF", "oran_fh_cus.initialPartialSF",
9434 FT_BOOLEAN, 8,
9435 TFS(&tfs_partial_full_sf)((0 ? (const struct true_false_string*)0 : ((&tfs_partial_full_sf
))))
, 0x40,
9436 "Indicates whether the initial SF in the LBT process is full or partial", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9437 },
9438 /* Section 7.5.3.26. */
9439 { &hf_oran_lbtBufErr,
9440 { "lbtBufErr", "oran_fh_cus.lbtBufErr",
9441 FT_BOOLEAN, 8,
9442 TFS(&tfs_lbtBufErr)((0 ? (const struct true_false_string*)0 : ((&tfs_lbtBufErr
))))
, 0x80,
9443 "LBT buffer error", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9444 },
9445 /* Section 7.5.3.27 */
9446 { &hf_oran_sfnSfEnd,
9447 { "SFN/SF End", "oran_fh_cus.sfnSfEnd",
9448 FT_UINT16, BASE_DEC,
9449 NULL((void*)0), 0x0fff,
9450 "SFN/SF by which the DRS window must end", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9451 },
9452 /* Section 7.5.3.28 */
9453 { &hf_oran_lbtCWConfig_H,
9454 { "lbtCWConfig_H", "oran_fh_cus.lbtCWConfig_H",
9455 FT_UINT8, BASE_DEC,
9456 NULL((void*)0), 0x0,
9457 "HARQ parameters for congestion window management", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9458 },
9459 /* Section 7.5.3.29 */
9460 { &hf_oran_lbtCWConfig_T,
9461 { "lbtCWConfig_T", "oran_fh_cus.lbtCWConfig_T",
9462 FT_UINT8, BASE_DEC,
9463 NULL((void*)0), 0x0,
9464 "TB parameters for congestion window management", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9465 },
9466 /* Section 7.5.3.30 */
9467 { &hf_oran_lbtTrafficClass,
9468 { "lbtTrafficClass", "oran_fh_cus.lbtTrafficClass",
9469 FT_UINT8, BASE_DEC,
9470 VALS(lbtTrafficClass_vals)((0 ? (const struct _value_string*)0 : ((lbtTrafficClass_vals
))))
, 0x38,
9471 "Traffic class priority for congestion window management", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9472 },
9473 /* Section 7.5.3.31 */
9474 { &hf_oran_lbtCWR_Rst,
9475 { "lbtCWR_Rst", "oran_fh_cus.lbtCWR_Rst",
9476 FT_BOOLEAN, 8,
9477 TFS(&tfs_fail_success)((0 ? (const struct true_false_string*)0 : ((&tfs_fail_success
))))
, 0x80,
9478 "notification about packet reception successful or not", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9479 },
9480
9481 /* Reserved fields */
9482 { &hf_oran_reserved,
9483 { "reserved", "oran_fh_cus.reserved",
9484 FT_UINT64, BASE_HEX,
9485 NULL((void*)0), 0x0,
9486 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9487 },
9488 { &hf_oran_reserved_1bit,
9489 { "reserved", "oran_fh_cus.reserved",
9490 FT_UINT8, BASE_HEX,
9491 NULL((void*)0), 0x80,
9492 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9493 },
9494 { &hf_oran_reserved_2bits,
9495 { "reserved", "oran_fh_cus.reserved",
9496 FT_UINT8, BASE_HEX,
9497 NULL((void*)0), 0xc0,
9498 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9499 },
9500 { &hf_oran_reserved_3bits,
9501 { "reserved", "oran_fh_cus.reserved",
9502 FT_UINT8, BASE_HEX,
9503 NULL((void*)0), 0xe0,
9504 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9505 },
9506 { &hf_oran_reserved_4bits,
9507 { "reserved", "oran_fh_cus.reserved",
9508 FT_UINT8, BASE_HEX,
9509 NULL((void*)0), 0xf0,
9510 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9511 },
9512 { &hf_oran_reserved_last_4bits,
9513 { "reserved", "oran_fh_cus.reserved",
9514 FT_UINT8, BASE_HEX,
9515 NULL((void*)0), 0x0f,
9516 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9517 },
9518 { &hf_oran_reserved_last_5bits,
9519 { "reserved", "oran_fh_cus.reserved",
9520 FT_UINT8, BASE_HEX,
9521 NULL((void*)0), 0x1f,
9522 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9523 },
9524 { &hf_oran_reserved_6bits,
9525 { "reserved", "oran_fh_cus.reserved",
9526 FT_UINT8, BASE_HEX,
9527 NULL((void*)0), 0xfc,
9528 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9529 },
9530 { &hf_oran_reserved_last_6bits,
9531 { "reserved", "oran_fh_cus.reserved",
9532 FT_UINT8, BASE_HEX,
9533 NULL((void*)0), 0x3f,
9534 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9535 },
9536 { &hf_oran_reserved_7bits,
9537 { "reserved", "oran_fh_cus.reserved",
9538 FT_UINT8, BASE_HEX,
9539 NULL((void*)0), 0xfe,
9540 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9541 },
9542 { &hf_oran_reserved_last_7bits,
9543 { "reserved", "oran_fh_cus.reserved",
9544 FT_UINT8, BASE_HEX,
9545 NULL((void*)0), 0x7f,
9546 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9547 },
9548 { &hf_oran_reserved_8bits,
9549 { "reserved", "oran_fh_cus.reserved",
9550 FT_UINT8, BASE_HEX,
9551 NULL((void*)0), 0x0,
9552 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9553 },
9554 { &hf_oran_reserved_16bits,
9555 { "reserved", "oran_fh_cus.reserved",
9556 FT_UINT16, BASE_HEX,
9557 NULL((void*)0), 0x0,
9558 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9559 },
9560 { &hf_oran_reserved_15bits,
9561 { "reserved", "oran_fh_cus.reserved",
9562 FT_UINT16, BASE_HEX,
9563 NULL((void*)0), 0x7fff,
9564 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9565 },
9566 { &hf_oran_reserved_24bits,
9567 { "reserved", "oran_fh_cus.reserved",
9568 FT_UINT24, BASE_HEX,
9569 NULL((void*)0), 0x0,
9570 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9571 },
9572 { &hf_oran_reserved_bit1,
9573 { "reserved", "oran_fh_cus.reserved",
9574 FT_UINT8, BASE_HEX,
9575 NULL((void*)0), 0x40,
9576 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9577 },
9578 { &hf_oran_reserved_bit2,
9579 { "reserved", "oran_fh_cus.reserved",
9580 FT_UINT8, BASE_HEX,
9581 NULL((void*)0), 0x20,
9582 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9583 },
9584 { &hf_oran_reserved_bit3,
9585 { "reserved", "oran_fh_cus.reserved",
9586 FT_UINT8, BASE_HEX,
9587 NULL((void*)0), 0x10,
9588 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9589 },
9590 { &hf_oran_reserved_bit4,
9591 { "reserved", "oran_fh_cus.reserved",
9592 FT_UINT8, BASE_HEX,
9593 NULL((void*)0), 0x08,
9594 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9595 },
9596 { &hf_oran_reserved_bit5,
9597 { "reserved", "oran_fh_cus.reserved",
9598 FT_UINT8, BASE_HEX,
9599 NULL((void*)0), 0x04,
9600 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9601 },
9602 { &hf_oran_reserved_bits123,
9603 { "reserved", "oran_fh_cus.reserved",
9604 FT_UINT8, BASE_HEX,
9605 NULL((void*)0), 0x70,
9606 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9607 },
9608 { &hf_oran_reserved_bits1234,
9609 { "reserved", "oran_fh_cus.reserved",
9610 FT_UINT8, BASE_HEX,
9611 NULL((void*)0), 0x78,
9612 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9613 },
9614 { &hf_oran_reserved_bits456,
9615 { "reserved", "oran_fh_cus.reserved",
9616 FT_UINT8, BASE_HEX,
9617 NULL((void*)0), 0x0e,
9618 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9619 },
9620
9621 /* 7.7.11.9 */
9622 { &hf_oran_cont_ind,
9623 { "contInd", "oran_fh_cus.contInd",
9624 FT_BOOLEAN, 8,
9625 TFS(&continuity_indication_tfs)((0 ? (const struct true_false_string*)0 : ((&continuity_indication_tfs
))))
, 0x80,
9626 "PRB region continuity flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9627 },
9628 /* 7.7.11.10 */
9629 { &hf_oran_bundle_offset,
9630 { "BundleOffset", "oran_fh_cus.bundleOffset",
9631 FT_UINT8, BASE_DEC,
9632 NULL((void*)0), 0x3f,
9633 "offset between start of first PRB bundle and startPrbc", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9634 },
9635
9636 /* 7.7.1.2 bfwCompHdr (beamforming weight compression header) */
9637 { &hf_oran_bfwCompHdr,
9638 { "bfwCompHdr", "oran_fh_cus.bfwCompHdr",
9639 FT_STRING, BASE_NONE,
9640 NULL((void*)0), 0x0,
9641 "Compression method and IQ bit width for beamforming weights", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9642 },
9643 { &hf_oran_bfwCompHdr_iqWidth,
9644 { "IQ Bit Width", "oran_fh_cus.bfwCompHdr_iqWidth",
9645 FT_UINT8, BASE_HEX,
9646 VALS(bfw_comp_headers_iq_width)((0 ? (const struct _value_string*)0 : ((bfw_comp_headers_iq_width
))))
, 0xf0,
9647 "IQ bit width for the beamforming weights", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9648 },
9649 { &hf_oran_bfwCompHdr_compMeth,
9650 { "Compression Method", "oran_fh_cus.bfwCompHdr_compMeth",
9651 FT_UINT8, BASE_HEX,
9652 VALS(bfw_comp_headers_comp_meth)((0 ? (const struct _value_string*)0 : ((bfw_comp_headers_comp_meth
))))
, 0x0f,
9653 "compression method for the beamforming weights", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9654 },
9655
9656 /* 7.5.3.32 */
9657 { &hf_oran_ciCompParam,
9658 { "ciCompParam", "oran_fh_cus.ciCompParam",
9659 FT_STRING, BASE_NONE,
9660 NULL((void*)0), 0x0,
9661 "channel information compression parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9662 },
9663
9664 /* Table 7.5.3.32-1 */
9665 { &hf_oran_blockScaler,
9666 { "blockScaler", "oran_fh_cus.blockScaler",
9667 FT_UINT8, BASE_HEX,
9668 NULL((void*)0), 0x0,
9669 "unsigned, 1 integer bit, 7 fractional bits", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9670 },
9671 { &hf_oran_compBitWidth,
9672 { "compBitWidth", "oran_fh_cus.compBitWidth",
9673 FT_UINT8, BASE_DEC,
9674 NULL((void*)0), 0xf0,
9675 "Length of I bits and length of Q bits after compression over entire PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9676 },
9677 { &hf_oran_compShift,
9678 { "compShift", "oran_fh_cus.compShift",
9679 FT_UINT8, BASE_DEC,
9680 NULL((void*)0), 0x0f,
9681 "The shift applied to the entire PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9682 },
9683
9684 { &hf_oran_active_beamspace_coefficient_n1,
9685 { "N1", "oran_fh_cus.activeBeamspace_Coefficient_n1",
9686 FT_BOOLEAN, 8,
9687 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x80,
9688 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9689 },
9690 { &hf_oran_active_beamspace_coefficient_n2,
9691 { "N2", "oran_fh_cus.activeBeamspace_Coefficient_n2",
9692 FT_BOOLEAN, 8,
9693 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x40,
9694 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9695 },
9696 { &hf_oran_active_beamspace_coefficient_n3,
9697 { "N3", "oran_fh_cus.activeBeamspace_Coefficient_n3",
9698 FT_BOOLEAN, 8,
9699 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x20,
9700 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9701 },
9702 { &hf_oran_active_beamspace_coefficient_n4,
9703 { "N4", "oran_fh_cus.activeBeamspace_Coefficient_n4",
9704 FT_BOOLEAN, 8,
9705 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x10,
9706 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9707 },
9708 { &hf_oran_active_beamspace_coefficient_n5,
9709 { "N5", "oran_fh_cus.activeBeamspace_Coefficient_n5",
9710 FT_BOOLEAN, 8,
9711 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x08,
9712 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9713 },
9714 { &hf_oran_active_beamspace_coefficient_n6,
9715 { "N6", "oran_fh_cus.activeBeamspace_Coefficient_n6",
9716 FT_BOOLEAN, 8,
9717 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x04,
9718 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9719 },
9720 { &hf_oran_active_beamspace_coefficient_n7,
9721 { "N7", "oran_fh_cus.activeBeamspace_Coefficient_n7",
9722 FT_BOOLEAN, 8,
9723 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x02,
9724 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9725 },
9726 { &hf_oran_active_beamspace_coefficient_n8,
9727 { "N8", "oran_fh_cus.activeBeamspace_Coefficient_n8",
9728 FT_BOOLEAN, 8,
9729 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x01,
9730 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9731 },
9732
9733 { &hf_oran_activeBeamspaceCoefficientMask,
9734 { "activeBeamspaceCoefficientMask", "oran_fh_cus.activeBeamspaceCoefficientMask",
9735 FT_UINT8, BASE_HEX,
9736 NULL((void*)0), 0xff,
9737 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9738 },
9739 { &hf_oran_activeBeamspaceCoefficientMask_bits_set,
9740 { "Array elements set", "oran_fh_cus.activeBeamspaceCoefficientMask.bits-set",
9741 FT_UINT32, BASE_DEC,
9742 NULL((void*)0), 0x0,
9743 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9744 },
9745
9746 /* Section 7.7.6.6 */
9747 { &hf_oran_se6_repetition,
9748 { "repetition", "oran_fh_cus.repetition",
9749 FT_BOOLEAN, BASE_NONE,
9750 TFS(&repetition_se6_tfs)((0 ? (const struct true_false_string*)0 : ((&repetition_se6_tfs
))))
, 0x0,
9751 "Repetition of a highest priority data section for C-Plane", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9752 },
9753 /* 7.7.20.9 */
9754 { &hf_oran_rbgSize,
9755 { "rbgSize", "oran_fh_cus.rbgSize",
9756 FT_UINT8, BASE_HEX,
9757 VALS(rbg_size_vals)((0 ? (const struct _value_string*)0 : ((rbg_size_vals)))), 0x70,
9758 "Number of PRBs of the resource block groups allocated by the bit mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9759 },
9760 /* 7.7.20.10 */
9761 { &hf_oran_rbgMask,
9762 { "rbgMask", "oran_fh_cus.rbgMask",
9763 FT_UINT32, BASE_HEX,
9764 NULL((void*)0), 0x0fffffff,
9765 "Each bit indicates whether a corresponding resource block group is present", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9766 },
9767 /* 7.7.6.5. Also 7.7.12.3 and 7.7.19.5 */
9768 { &hf_oran_noncontig_priority,
9769 { "priority", "oran_fh_cus.priority",
9770 FT_UINT8, BASE_HEX,
9771 VALS(priority_vals)((0 ? (const struct _value_string*)0 : ((priority_vals)))), 0xc0,
9772 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9773 },
9774
9775 /* 7.7.6.4 */
9776 { &hf_oran_symbol_mask,
9777 { "symbolMask", "oran_fh_cus.symbolMask",
9778 FT_UINT16, BASE_HEX,
9779 NULL((void*)0), 0x3fff,
9780 "Each bit indicates whether the rbgMask applies to a given symbol in the slot", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9781 },
9782 { &hf_oran_symbol_mask_s13,
9783 { "symbol 13", "oran_fh_cus.symbolMask.symbol-13",
9784 FT_BOOLEAN, 16,
9785 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x2000,
9786 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9787 },
9788 { &hf_oran_symbol_mask_s12,
9789 { "symbol 12", "oran_fh_cus.symbolMask.symbol-12",
9790 FT_BOOLEAN, 16,
9791 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x1000,
9792 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9793 },
9794 { &hf_oran_symbol_mask_s11,
9795 { "symbol 11", "oran_fh_cus.symbolMask.symbol-11",
9796 FT_BOOLEAN, 16,
9797 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0800,
9798 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9799 },
9800 { &hf_oran_symbol_mask_s10,
9801 { "symbol 10", "oran_fh_cus.symbolMask.symbol-10",
9802 FT_BOOLEAN, 16,
9803 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0400,
9804 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9805 },
9806 { &hf_oran_symbol_mask_s9,
9807 { "symbol 9", "oran_fh_cus.symbolMask.symbol-9",
9808 FT_BOOLEAN, 16,
9809 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0200,
9810 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9811 },
9812 { &hf_oran_symbol_mask_s8,
9813 { "symbol 8", "oran_fh_cus.symbolMask.symbol-8",
9814 FT_BOOLEAN, 16,
9815 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0100,
9816 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9817 },
9818 { &hf_oran_symbol_mask_s7,
9819 { "symbol 7", "oran_fh_cus.symbolMask.symbol-7",
9820 FT_BOOLEAN, 16,
9821 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0080,
9822 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9823 },
9824 { &hf_oran_symbol_mask_s6,
9825 { "symbol 6", "oran_fh_cus.symbolMask.symbol-6",
9826 FT_BOOLEAN, 16,
9827 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0040,
9828 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9829 },
9830 { &hf_oran_symbol_mask_s5,
9831 { "symbol 5", "oran_fh_cus.symbolMask.symbol-5",
9832 FT_BOOLEAN, 16,
9833 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0020,
9834 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9835 },
9836 { &hf_oran_symbol_mask_s4,
9837 { "symbol 4", "oran_fh_cus.symbolMask.symbol-4",
9838 FT_BOOLEAN, 16,
9839 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0010,
9840 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9841 },
9842 { &hf_oran_symbol_mask_s3,
9843 { "symbol 3", "oran_fh_cus.symbolMask.symbol-3",
9844 FT_BOOLEAN, 16,
9845 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0008,
9846 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9847 },
9848 { &hf_oran_symbol_mask_s2,
9849 { "symbol 2", "oran_fh_cus.symbolMask.symbol-2",
9850 FT_BOOLEAN, 16,
9851 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0004,
9852 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9853 },
9854 { &hf_oran_symbol_mask_s1,
9855 { "symbol 1", "oran_fh_cus.symbolMask.symbol-1",
9856 FT_BOOLEAN, 16,
9857 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0002,
9858 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9859 },
9860 { &hf_oran_symbol_mask_s0,
9861 { "symbol 0", "oran_fh_cus.symbolMask.symbol-0",
9862 FT_BOOLEAN, 16,
9863 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0001,
9864 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9865 },
9866
9867 /* 7.7.6.3 */
9868 { &hf_oran_rbg_mask_27,
9869 { "bit 27", "oran_fh_cus.rbgMask.bit27",
9870 FT_BOOLEAN, 32,
9871 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x08000000,
9872 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9873 },
9874 { &hf_oran_rbg_mask_26,
9875 { "bit 26", "oran_fh_cus.rbgMask.bit26",
9876 FT_BOOLEAN, 32,
9877 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x04000000,
9878 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9879 },
9880 { &hf_oran_rbg_mask_25,
9881 { "bit 25", "oran_fh_cus.rbgMask.bit25",
9882 FT_BOOLEAN, 32,
9883 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x02000000,
9884 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9885 },
9886 { &hf_oran_rbg_mask_24,
9887 { "bit 24", "oran_fh_cus.rbgMask.bit24",
9888 FT_BOOLEAN, 32,
9889 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x01000000,
9890 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9891 },
9892 { &hf_oran_rbg_mask_23,
9893 { "bit 23", "oran_fh_cus.rbgMask.bit23",
9894 FT_BOOLEAN, 32,
9895 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00800000,
9896 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9897 },
9898 { &hf_oran_rbg_mask_22,
9899 { "bit 22", "oran_fh_cus.rbgMask.bit22",
9900 FT_BOOLEAN, 32,
9901 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00400000,
9902 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9903 },
9904 { &hf_oran_rbg_mask_21,
9905 { "bit 21", "oran_fh_cus.rbgMask.bit21",
9906 FT_BOOLEAN, 32,
9907 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00200000,
9908 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9909 },
9910 { &hf_oran_rbg_mask_20,
9911 { "bit 20", "oran_fh_cus.rbgMask.bit20",
9912 FT_BOOLEAN, 32,
9913 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00100000,
9914 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9915 },
9916 { &hf_oran_rbg_mask_19,
9917 { "bit 19", "oran_fh_cus.rbgMask.bit19",
9918 FT_BOOLEAN, 32,
9919 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00080000,
9920 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9921 },
9922 { &hf_oran_rbg_mask_18,
9923 { "bit 18", "oran_fh_cus.rbgMask.bit18",
9924 FT_BOOLEAN, 32,
9925 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00040000,
9926 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9927 },
9928 { &hf_oran_rbg_mask_17,
9929 { "bit 17", "oran_fh_cus.rbgMask.bit17",
9930 FT_BOOLEAN, 32,
9931 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00020000,
9932 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9933 },
9934 { &hf_oran_rbg_mask_16,
9935 { "bit 16", "oran_fh_cus.rbgMask.bit16",
9936 FT_BOOLEAN, 32,
9937 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00010000,
9938 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9939 },
9940 { &hf_oran_rbg_mask_15,
9941 { "bit 15", "oran_fh_cus.rbgMask.bit15",
9942 FT_BOOLEAN, 32,
9943 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00008000,
9944 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9945 },
9946 { &hf_oran_rbg_mask_14,
9947 { "bit 14", "oran_fh_cus.rbgMask.bit14",
9948 FT_BOOLEAN, 32,
9949 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00004000,
9950 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9951 },
9952 { &hf_oran_rbg_mask_13,
9953 { "bit 13", "oran_fh_cus.rbgMask.bit13",
9954 FT_BOOLEAN, 32,
9955 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00002000,
9956 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9957 },
9958 { &hf_oran_rbg_mask_12,
9959 { "bit 12", "oran_fh_cus.rbgMask.bit12",
9960 FT_BOOLEAN, 32,
9961 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00001000,
9962 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9963 },
9964 { &hf_oran_rbg_mask_11,
9965 { "bit 11", "oran_fh_cus.rbgMask.bit11",
9966 FT_BOOLEAN, 32,
9967 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000800,
9968 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9969 },
9970 { &hf_oran_rbg_mask_10,
9971 { "bit 10", "oran_fh_cus.rbgMask.bit10",
9972 FT_BOOLEAN, 32,
9973 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000400,
9974 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9975 },
9976 { &hf_oran_rbg_mask_9,
9977 { "bit 9", "oran_fh_cus.rbgMask.bit9",
9978 FT_BOOLEAN, 32,
9979 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000200,
9980 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9981 },
9982 { &hf_oran_rbg_mask_8,
9983 { "bit 8", "oran_fh_cus.rbgMask.bit8",
9984 FT_BOOLEAN, 32,
9985 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000100,
9986 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9987 },
9988 { &hf_oran_rbg_mask_7,
9989 { "bit 7", "oran_fh_cus.rbgMask.bit7",
9990 FT_BOOLEAN, 32,
9991 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000080,
9992 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9993 },
9994 { &hf_oran_rbg_mask_6,
9995 { "bit 6", "oran_fh_cus.rbgMask.bit6",
9996 FT_BOOLEAN, 32,
9997 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000040,
9998 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9999 },
10000 { &hf_oran_rbg_mask_5,
10001 { "bit 5", "oran_fh_cus.rbgMask.bit5",
10002 FT_BOOLEAN, 32,
10003 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000020,
10004 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10005 },
10006 { &hf_oran_rbg_mask_4,
10007 { "bit 4", "oran_fh_cus.rbgMask.bit4",
10008 FT_BOOLEAN, 32,
10009 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000010,
10010 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10011 },
10012 { &hf_oran_rbg_mask_3,
10013 { "bit 3", "oran_fh_cus.rbgMask.bit3",
10014 FT_BOOLEAN, 32,
10015 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000008,
10016 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10017 },
10018 { &hf_oran_rbg_mask_2,
10019 { "bit 2", "oran_fh_cus.rbgMask.bit2",
10020 FT_BOOLEAN, 32,
10021 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000004,
10022 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10023 },
10024 { &hf_oran_rbg_mask_1,
10025 { "bit 1", "oran_fh_cus.rbgMask.bit1",
10026 FT_BOOLEAN, 32,
10027 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000002,
10028 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10029 },
10030 { &hf_oran_rbg_mask_0,
10031 { "bit 0", "oran_fh_cus.rbgMask.bit0",
10032 FT_BOOLEAN, 32,
10033 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000001,
10034 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10035 },
10036
10037
10038 /* 7.7.22.2 */
10039 { &hf_oran_ack_nack_req_id,
10040 { "ackNackReqId", "oran_fh_cus.ackNackReqId",
10041 FT_UINT16, BASE_HEX,
10042 NULL((void*)0), 0x0,
10043 "Indicates the ACK/NACK request ID of a section description", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10044 },
10045
10046 /* Subtree for next 2 items */
10047 { &hf_oran_frequency_range,
10048 { "Frequency Range", "oran_fh_cus.frequencyRange",
10049 FT_STRING, BASE_NONE,
10050 NULL((void*)0), 0x0,
10051 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10052 },
10053
10054 /* 7.7.12.4 */
10055 { &hf_oran_off_start_prb,
10056 { "offStartPrb", "oran_fh_cus.offStartPrb",
10057 FT_UINT8, BASE_DEC,
10058 NULL((void*)0), 0x0,
10059 "Offset of PRB range start", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10060 },
10061 /* 7.7.12.5 */
10062 { &hf_oran_num_prb,
10063 { "numPrb", "oran_fh_cus.numPrb",
10064 FT_UINT8, BASE_DEC,
10065 NULL((void*)0), 0x0,
10066 "Number of PRBs in PRB range", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10067 },
10068
10069 /* symbolId 8.3.3.7 */
10070 { &hf_oran_symbolId,
10071 { "Symbol Identifier", "oran_fh_cus.symbolId",
10072 FT_UINT8, BASE_DEC,
10073 NULL((void*)0), 0x3f,
10074 "Identifies a symbol number within a slot", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10075 },
10076
10077 /* startPrbu 8.3.3.11 */
10078 { &hf_oran_startPrbu,
10079 { "startPrbu", "oran_fh_cus.startPrbu",
10080 FT_UINT16, BASE_DEC,
10081 NULL((void*)0), 0x03ff,
10082 "starting PRB of user plane section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10083 },
10084
10085 /* numPrbu 8.3.3.12 */
10086 { &hf_oran_numPrbu,
10087 { "numPrbu", "oran_fh_cus.numPrbu",
10088 FT_UINT8, BASE_DEC,
10089 NULL((void*)0), 0x0,
10090 "number of PRBs per user plane section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10091 },
10092
10093 /* 7.7.1.3 */
10094 { &hf_oran_bfwCompParam,
10095 { "bfwCompParam", "oran_fh_cus.bfwCompParam",
10096 FT_STRING, BASE_NONE,
10097 NULL((void*)0), 0x0,
10098 "Beamforming weight compression parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10099 },
10100
10101 /* 6.3.3.13 */
10102 { &hf_oran_udCompHdrMeth,
10103 { "User Data Compression Method", "oran_fh_cus.udCompHdrMeth",
10104 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
10105 RVALS(ud_comp_header_meth)((0 ? (const struct _range_string*)0 : ((ud_comp_header_meth)
)))
, 0x0f,
10106 "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)}
10107 },
10108 { &hf_oran_udCompHdrMeth_pref,
10109 { "User Data Compression Method", "oran_fh_cus.udCompHdrMeth",
10110 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
10111 RVALS(ud_comp_header_meth)((0 ? (const struct _range_string*)0 : ((ud_comp_header_meth)
)))
, 0x0,
10112 "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)}
10113 },
10114 /* 8.3.3.18 */
10115 { &hf_oran_udCompLen,
10116 { "udCompLen", "oran_fh_cus.udCompLen",
10117 FT_UINT16, BASE_DEC,
10118 NULL((void*)0), 0x0,
10119 "PRB field length in octets", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10120 },
10121
10122 /* 7.5.2.10 */
10123 { &hf_oran_udCompHdrIqWidth,
10124 { "User Data IQ width", "oran_fh_cus.udCompHdrWidth",
10125 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
10126 RVALS(ud_comp_header_width)((0 ? (const struct _range_string*)0 : ((ud_comp_header_width
))))
, 0xf0,
10127 "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)}
10128 },
10129 { &hf_oran_udCompHdrIqWidth_pref,
10130 { "User Data IQ width", "oran_fh_cus.udCompHdrWidth.pref",
10131 FT_UINT8, BASE_DEC,
10132 NULL((void*)0), 0x0,
10133 "IQ bit width for the user data in every section in the C-Plane message, from preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10134 },
10135
10136 { &hf_oran_sinrCompHdrIqWidth_pref,
10137 { "SINR IQ width", "oran_fh_cus.sinrCompHdrWidth",
10138 FT_UINT8, BASE_DEC,
10139 NULL((void*)0), 0x0,
10140 "Defines the IQ bit width for SINR data in section type 9", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10141 },
10142 { &hf_oran_sinrCompHdrMeth_pref,
10143 { "SINR Compression Method", "oran_fh_cus.sinrCompHdrMeth",
10144 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
10145 RVALS(ud_comp_header_meth)((0 ? (const struct _range_string*)0 : ((ud_comp_header_meth)
)))
, 0x0,
10146 "Defines the compression method for SINR data in section type 9", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10147 },
10148
10149 /* Section 8.3.3.15 (not always present - depends upon meth) */
10150 { &hf_oran_udCompParam,
10151 { "User Data Compression Parameter", "oran_fh_cus.udCompParam",
10152 FT_STRING, BASE_NONE,
10153 NULL((void*)0), 0x0,
10154 "Applies to whatever compression method is specified by the associated sectionID's compMeth value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10155 },
10156 /* 8.3.3.18 */
10157 { &hf_oran_sReSMask,
10158 { "sReSMask", "oran_fh_cus.sReSMask",
10159 FT_UINT16, BASE_HEX,
10160 NULL((void*)0), 0xf0ff,
10161 "selective RE sending mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10162 },
10163
10164 { &hf_oran_sReSMask_re12,
10165 { "RE-12", "oran_fh_cus.sReSMask-re12",
10166 FT_BOOLEAN, 16,
10167 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x8000,
10168 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10169 },
10170 { &hf_oran_sReSMask_re11,
10171 { "RE-11", "oran_fh_cus.sReSMask-re11",
10172 FT_BOOLEAN, 16,
10173 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x4000,
10174 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10175 },
10176 { &hf_oran_sReSMask_re10,
10177 { "RE-10", "oran_fh_cus.sReSMask-re10",
10178 FT_BOOLEAN, 16,
10179 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x2000,
10180 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10181 },
10182 { &hf_oran_sReSMask_re9,
10183 { "RE-9", "oran_fh_cus.sReSMask-re9",
10184 FT_BOOLEAN, 16,
10185 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x1000,
10186 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10187 },
10188 { &hf_oran_sReSMask_re8,
10189 { "RE-8", "oran_fh_cus.sReSMask-re8",
10190 FT_BOOLEAN, 16,
10191 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0080,
10192 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10193 },
10194 { &hf_oran_sReSMask_re7,
10195 { "RE-7", "oran_fh_cus.sReSMask-re7",
10196 FT_BOOLEAN, 16,
10197 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0040,
10198 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10199 },
10200 { &hf_oran_sReSMask_re6,
10201 { "RE-6", "oran_fh_cus.sReSMask-re6",
10202 FT_BOOLEAN, 16,
10203 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0020,
10204 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10205 },
10206 { &hf_oran_sReSMask_re5,
10207 { "RE-5", "oran_fh_cus.sReSMask-re5",
10208 FT_BOOLEAN, 16,
10209 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0010,
10210 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10211 },
10212 { &hf_oran_sReSMask_re4,
10213 { "RE-4", "oran_fh_cus.sReSMask-re4",
10214 FT_BOOLEAN, 16,
10215 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0008,
10216 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10217 },
10218 { &hf_oran_sReSMask_re3,
10219 { "RE-3", "oran_fh_cus.sReSMask-re3",
10220 FT_BOOLEAN, 16,
10221 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0004,
10222 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10223 },
10224 { &hf_oran_sReSMask_re2,
10225 { "RE-2", "oran_fh_cus.sReSMask-re2",
10226 FT_BOOLEAN, 16,
10227 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0002,
10228 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10229 },
10230 { &hf_oran_sReSMask_re1,
10231 { "RE-1", "oran_fh_cus.sReSMask-re1",
10232 FT_BOOLEAN, 16,
10233 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0001,
10234 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10235 },
10236
10237 /* 8.3.3.20 */
10238 { &hf_oran_sReSMask1,
10239 { "sReSMask1", "oran_fh_cus.sReSMask1",
10240 FT_UINT16, BASE_HEX,
10241 NULL((void*)0), 0x0fff,
10242 "selective RE sending mask 1", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10243 },
10244 /* 8.3.3.21 */
10245 { &hf_oran_sReSMask2,
10246 { "sReSMask2", "oran_fh_cus.sReSMask2",
10247 FT_UINT16, BASE_HEX,
10248 NULL((void*)0), 0x0fff,
10249 "selective RE sending mask 2", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10250 },
10251
10252 { &hf_oran_sReSMask1_2_re12,
10253 { "RE-12", "oran_fh_cus.sReSMask-re12",
10254 FT_BOOLEAN, 16,
10255 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0800,
10256 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10257 },
10258 { &hf_oran_sReSMask1_2_re11,
10259 { "RE-11", "oran_fh_cus.sReSMask-re11",
10260 FT_BOOLEAN, 16,
10261 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0400,
10262 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10263 },
10264 { &hf_oran_sReSMask1_2_re10,
10265 { "RE-10", "oran_fh_cus.sReSMask-re10",
10266 FT_BOOLEAN, 16,
10267 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0200,
10268 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10269 },
10270 { &hf_oran_sReSMask1_2_re9,
10271 { "RE-9", "oran_fh_cus.sReSMask-re9",
10272 FT_BOOLEAN, 16,
10273 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0100,
10274 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10275 },
10276
10277 /* Section 6.3.3.15 */
10278 { &hf_oran_iSample,
10279 { "iSample", "oran_fh_cus.iSample",
10280 FT_FLOAT, BASE_NONE,
10281 NULL((void*)0), 0x0,
10282 "In-phase Sample value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10283 },
10284
10285 /* Section 6.3.3.16 */
10286 { &hf_oran_qSample,
10287 { "qSample", "oran_fh_cus.qSample",
10288 FT_FLOAT, BASE_NONE,
10289 NULL((void*)0), 0x0,
10290 "Quadrature Sample value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10291 },
10292
10293 { &hf_oran_exponent,
10294 { "Exponent", "oran_fh_cus.exponent",
10295 FT_UINT8, BASE_DEC,
10296 NULL((void*)0), 0x0f,
10297 "Exponent applicable to the I & Q mantissas", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10298 },
10299
10300 { &hf_oran_iq_user_data,
10301 { "IQ User Data", "oran_fh_cus.iq_user_data",
10302 FT_BYTES, BASE_NONE,
10303 NULL((void*)0), 0x0,
10304 "Used for the In-phase and Quadrature sample mantissa", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10305 },
10306
10307
10308 { &hf_oran_u_section_ul_symbol_time,
10309 { "Microseconds since first UL U-plane frame for this symbol", "oran_fh_cus.us-since-first-ul-frame",
10310 FT_UINT32, BASE_DEC,
10311 NULL((void*)0), 0x0,
10312 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10313 },
10314 { &hf_oran_u_section_ul_symbol_frames,
10315 { "Number of UL frames sent for this symbol", "oran_fh_cus.number-ul-frames-in-symbol",
10316 FT_UINT32, BASE_DEC,
10317 NULL((void*)0), 0x0,
10318 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10319 },
10320 { &hf_oran_u_section_ul_symbol_first_frame,
10321 { "First UL frame for this symbol", "oran_fh_cus.first-ul-frame-in-symbol",
10322 FT_FRAMENUM, BASE_NONE,
10323 FRAMENUM_TYPE(FT_FRAMENUM_NONE)((gpointer) (glong) (FT_FRAMENUM_NONE)), 0x0,
10324 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10325 },
10326 { &hf_oran_u_section_ul_symbol_last_frame,
10327 { "Last UL frame for this symbol", "oran_fh_cus.last-ul-frame-in-symbol",
10328 FT_FRAMENUM, BASE_NONE,
10329 FRAMENUM_TYPE(FT_FRAMENUM_NONE)((gpointer) (glong) (FT_FRAMENUM_NONE)), 0x0,
10330 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10331 },
10332
10333 { &hf_oran_c_eAxC_ID,
10334 { "c_eAxC_ID", "oran_fh_cus.c_eaxc_id",
10335 FT_STRING, BASE_NONE,
10336 NULL((void*)0), 0x0,
10337 "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) }
10338 },
10339
10340 { &hf_oran_refa,
10341 { "RefA", "oran_fh_cus.refa",
10342 FT_STRING, BASE_NONE,
10343 NULL((void*)0), 0x0,
10344 "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) }
10345 },
10346
10347
10348 /* Section 7.5.2.15 */
10349 { &hf_oran_ciCompHdr,
10350 { "ciCompHdr", "oran_fh_cus.ciCompHdr",
10351 FT_STRING, BASE_NONE,
10352 NULL((void*)0), 0x0,
10353 "Channel Information Compression Header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10354 },
10355 { &hf_oran_ciCompHdrMeth,
10356 { "User Data Compression Method", "oran_fh_cus.ciCompHdrMeth",
10357 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
10358 RVALS(ud_comp_header_meth)((0 ? (const struct _range_string*)0 : ((ud_comp_header_meth)
)))
, 0x0e,
10359 "Compression method for Channel Information", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10360 },
10361 { &hf_oran_ciCompHdrIqWidth,
10362 { "User Data IQ width", "oran_fh_cus.ciCompHdrWidth",
10363 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
10364 RVALS(ud_comp_header_width)((0 ? (const struct _range_string*)0 : ((ud_comp_header_width
))))
, 0xf0,
10365 "IQ bit width for Channel Information", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10366 },
10367 { &hf_oran_ciCompOpt,
10368 { "ciCompOpt", "oran_fh_cus.ciCompOpt",
10369 FT_UINT8, BASE_DEC,
10370 VALS(ci_comp_opt_vals)((0 ? (const struct _value_string*)0 : ((ci_comp_opt_vals)))), 0x01,
10371 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10372 },
10373
10374 /* 7.7.11.7 */
10375 { &hf_oran_disable_bfws,
10376 { "disableBFWs", "oran_fh_cus.disableBFWs",
10377 FT_BOOLEAN, 8,
10378 NULL((void*)0), 0x80,
10379 "Indicate if BFWs under section extension are disabled", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10380 },
10381 /* 7.7.11.8 */
10382 { &hf_oran_rad,
10383 { "RAD", "oran_fh_cus.rad",
10384 FT_BOOLEAN, 8,
10385 NULL((void*)0), 0x40,
10386 "Reset After PRB Discontinuity", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10387 },
10388 /* 7.7.11.4 */
10389 { &hf_oran_num_bund_prbs,
10390 { "numBundPrb", "oran_fh_cus.numBundPrb",
10391 FT_UINT8, BASE_DEC,
10392 NULL((void*)0), 0x0,
10393 "Number of bundled PRBs per BFWs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10394 },
10395 { &hf_oran_beam_id,
10396 { "beamId", "oran_fh_cus.beamId",
10397 FT_UINT16, BASE_DEC,
10398 NULL((void*)0), 0x7fff,
10399 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10400 },
10401 { &hf_oran_num_weights_per_bundle,
10402 { "Num weights per bundle", "oran_fh_cus.num_weights_per_bundle",
10403 FT_UINT16, BASE_DEC,
10404 NULL((void*)0), 0x0,
10405 "From dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10406 },
10407
10408 { &hf_oran_samples_prb,
10409 {"PRB", "oran_fh_cus.prb",
10410 FT_STRING, BASE_NONE,
10411 NULL((void*)0), 0x0,
10412 "Grouping of samples for a particular Physical Resource Block", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10413 },
10414
10415 /* 7.5.3.13 */
10416 { &hf_oran_ciSample,
10417 { "ciSample", "oran_fh_cus.ciSample",
10418 FT_STRING, BASE_NONE,
10419 NULL((void*)0), 0x0,
10420 "Sample (I and Q values)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10421 },
10422 { &hf_oran_ciIsample,
10423 { "ciIsample", "oran_fh_cus.ciISample",
10424 FT_FLOAT, BASE_NONE,
10425 NULL((void*)0), 0x0,
10426 "Channel information complex value - I part", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10427 },
10428 { &hf_oran_ciQsample,
10429 { "ciQsample", "oran_fh_cus.ciQSample",
10430 FT_FLOAT, BASE_NONE,
10431 NULL((void*)0), 0x0,
10432 "Channel information complex value - Q part", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10433 },
10434
10435 /* 7.7.10 */
10436 { &hf_oran_se10_port,
10437 { "Port entry", "oran_fh_cus.portEntry",
10438 FT_NONE, BASE_NONE,
10439 NULL((void*)0), 0x0,
10440 "SE10 port entry", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10441 },
10442 /* 7.7.10.2 */
10443 { &hf_oran_beamGroupType,
10444 { "beamGroupType", "oran_fh_cus.beamGroupType",
10445 FT_UINT8, BASE_DEC,
10446 VALS(beam_group_type_vals)((0 ? (const struct _value_string*)0 : ((beam_group_type_vals
))))
, 0xc0,
10447 "The type of beam grouping", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10448 },
10449 /* 7.7.10.3 */
10450 { &hf_oran_numPortc,
10451 { "numPortc", "oran_fh_cus.numPortc",
10452 FT_UINT8, BASE_DEC,
10453 NULL((void*)0), 0x3f,
10454 "The number of eAxC ports", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10455 },
10456
10457 /* 7.7.4.2 (1 bit) */
10458 { &hf_oran_csf,
10459 { "csf", "oran_fh_cus.csf",
10460 FT_BOOLEAN, BASE_NONE,
10461 NULL((void*)0), 0x0,
10462 "constellation shift flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10463 },
10464 /* 7.7.4.3 */
10465 { &hf_oran_modcompscaler,
10466 { "modCompScaler", "oran_fh_cus.modcompscaler",
10467 FT_UINT16, BASE_DEC,
10468 NULL((void*)0), 0x7fff,
10469 "modulation compression scaler value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10470 },
10471
10472 /* 7.7.5.1 */
10473 { &hf_oran_modcomp_param_set,
10474 { "Set", "oran_fh_cus.modcomp-param-set",
10475 FT_STRING, BASE_NONE,
10476 NULL((void*)0), 0x0,
10477 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10478 },
10479
10480
10481
10482 /* mcScaleReMask 7.7.5.2 (12 bits) */
10483
10484 /* First entry (starts with msb within byte) */
10485 { &hf_oran_mc_scale_re_mask_re1,
10486 { "RE 1", "oran_fh_cus.mcscalermask-RE1",
10487 FT_BOOLEAN, 16,
10488 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x8000,
10489 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10490 },
10491 { &hf_oran_mc_scale_re_mask_re2,
10492 { "RE 2", "oran_fh_cus.mcscalermask-RE2",
10493 FT_BOOLEAN, 16,
10494 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x4000,
10495 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10496 },
10497 { &hf_oran_mc_scale_re_mask_re3,
10498 { "RE 3", "oran_fh_cus.mcscalermask-RE3",
10499 FT_BOOLEAN, 16,
10500 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x2000,
10501 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10502 },
10503 { &hf_oran_mc_scale_re_mask_re4,
10504 { "RE 4", "oran_fh_cus.mcscalermask-RE4",
10505 FT_BOOLEAN, 16,
10506 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x1000,
10507 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10508 },
10509 { &hf_oran_mc_scale_re_mask_re5,
10510 { "RE 5", "oran_fh_cus.mcscalermask-RE5",
10511 FT_BOOLEAN, 16,
10512 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0800,
10513 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10514 },
10515 { &hf_oran_mc_scale_re_mask_re6,
10516 { "RE 6", "oran_fh_cus.mcscalermask-RE6",
10517 FT_BOOLEAN, 16,
10518 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0400,
10519 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10520 },
10521 { &hf_oran_mc_scale_re_mask_re7,
10522 { "RE 7", "oran_fh_cus.mcscalermask-RE7",
10523 FT_BOOLEAN, 16,
10524 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0200,
10525 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10526 },
10527 { &hf_oran_mc_scale_re_mask_re8,
10528 { "RE 8", "oran_fh_cus.mcscalermask-RE8",
10529 FT_BOOLEAN, 16,
10530 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0100,
10531 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10532 },
10533 { &hf_oran_mc_scale_re_mask_re9,
10534 { "RE 9", "oran_fh_cus.mcscalermask-RE9",
10535 FT_BOOLEAN, 16,
10536 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0080,
10537 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10538 },
10539 { &hf_oran_mc_scale_re_mask_re10,
10540 { "RE 10", "oran_fh_cus.mcscalermask-RE10",
10541 FT_BOOLEAN, 16,
10542 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0040,
10543 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10544 },
10545 { &hf_oran_mc_scale_re_mask_re11,
10546 { "RE 11", "oran_fh_cus.mcscalermask-RE11",
10547 FT_BOOLEAN, 16,
10548 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0020,
10549 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10550 },
10551 { &hf_oran_mc_scale_re_mask_re12,
10552 { "RE 12", "oran_fh_cus.mcscalermask-RE12",
10553 FT_BOOLEAN, 16,
10554 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0010,
10555 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10556 },
10557
10558 /* Even tries entry (starts with 5th bit within byte) */
10559 { &hf_oran_mc_scale_re_mask_re1_even,
10560 { "RE 1", "oran_fh_cus.mcscalermask-RE1",
10561 FT_BOOLEAN, 16,
10562 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0800,
10563 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10564 },
10565 { &hf_oran_mc_scale_re_mask_re2_even,
10566 { "RE 2", "oran_fh_cus.mcscalermask-RE2",
10567 FT_BOOLEAN, 16,
10568 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0400,
10569 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10570 },
10571 { &hf_oran_mc_scale_re_mask_re3_even,
10572 { "RE 3", "oran_fh_cus.mcscalermask-RE3",
10573 FT_BOOLEAN, 16,
10574 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0200,
10575 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10576 },
10577 { &hf_oran_mc_scale_re_mask_re4_even,
10578 { "RE 4", "oran_fh_cus.mcscalermask-RE4",
10579 FT_BOOLEAN, 16,
10580 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0100,
10581 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10582 },
10583 { &hf_oran_mc_scale_re_mask_re5_even,
10584 { "RE 5", "oran_fh_cus.mcscalermask-RE5",
10585 FT_BOOLEAN, 16,
10586 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0080,
10587 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10588 },
10589 { &hf_oran_mc_scale_re_mask_re6_even,
10590 { "RE 6", "oran_fh_cus.mcscalermask-RE6",
10591 FT_BOOLEAN, 16,
10592 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0040,
10593 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10594 },
10595 { &hf_oran_mc_scale_re_mask_re7_even,
10596 { "RE 7", "oran_fh_cus.mcscalermask-RE7",
10597 FT_BOOLEAN, 16,
10598 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0020,
10599 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10600 },
10601 { &hf_oran_mc_scale_re_mask_re8_even,
10602 { "RE 8", "oran_fh_cus.mcscalermask-RE8",
10603 FT_BOOLEAN, 16,
10604 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0010,
10605 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10606 },
10607 { &hf_oran_mc_scale_re_mask_re9_even,
10608 { "RE 9", "oran_fh_cus.mcscalermask-RE9",
10609 FT_BOOLEAN, 16,
10610 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0008,
10611 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10612 },
10613 { &hf_oran_mc_scale_re_mask_re10_even,
10614 { "RE 10", "oran_fh_cus.mcscalermask-RE10",
10615 FT_BOOLEAN, 16,
10616 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0004,
10617 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10618 },
10619 { &hf_oran_mc_scale_re_mask_re11_even,
10620 { "RE 11", "oran_fh_cus.mcscalermask-RE11",
10621 FT_BOOLEAN, 16,
10622 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0002,
10623 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10624 },
10625 { &hf_oran_mc_scale_re_mask_re12_even,
10626 { "RE 12", "oran_fh_cus.mcscalermask-RE12",
10627 FT_BOOLEAN, 16,
10628 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0001,
10629 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10630 },
10631
10632 { &hf_oran_mc_scale_re_mask,
10633 { "mcScaleReMask", "oran_fh_cus.mcscaleremask",
10634 FT_UINT16, BASE_HEX,
10635 NULL((void*)0), 0xfff0,
10636 "modulation compression power scale RE mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10637 },
10638 { &hf_oran_mc_scale_re_mask_even,
10639 { "mcScaleReMask", "oran_fh_cus.mcscaleremask",
10640 FT_UINT16, BASE_HEX,
10641 NULL((void*)0), 0x0fff,
10642 "modulation compression power scale RE mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10643 },
10644
10645 /* mcScaleOffset 7.7.5.4 (15 bits) */
10646 { &hf_oran_mc_scale_offset,
10647 { "mcScaleOffset", "oran_fh_cus.mcscaleoffset",
10648 FT_UINT24, BASE_DEC,
10649 NULL((void*)0), 0x0,
10650 "scaling value for modulation compression", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10651 },
10652 /* eAxCmask (7.7.7.2) */
10653 { &hf_oran_eAxC_mask,
10654 { "eAxC Mask", "oran_fh_cus.eaxcmask",
10655 FT_UINT16, BASE_HEX,
10656 NULL((void*)0), 0xffff,
10657 "Which eAxC_ID values the C-Plane message applies to", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10658 },
10659 /* technology (interface name) 7.7.9.2 */
10660 { &hf_oran_technology,
10661 { "Technology", "oran_fh_cus.technology",
10662 FT_UINT8, BASE_DEC,
10663 VALS(interface_name_vals)((0 ? (const struct _value_string*)0 : ((interface_name_vals)
)))
, 0x0,
10664 "Interface name (that C-PLane section applies to)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10665 },
10666 /* Exttype 14 (7.7.14.2) */
10667 { &hf_oran_nullLayerInd,
10668 { "nullLayerInd", "oran_fh_cus.nulllayerind",
10669 FT_BOOLEAN, BASE_NONE,
10670 NULL((void*)0), 0x0,
10671 "Whether corresponding layer is nulling-layer or not", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10672 },
10673
10674 /* Exttype 19 */
10675 /* 7.7.19.3 */
10676 { &hf_oran_se19_repetition,
10677 { "repetition", "oran_fh_cus.repetition",
10678 FT_BOOLEAN, BASE_NONE,
10679 TFS(&repetition_se19_tfs)((0 ? (const struct true_false_string*)0 : ((&repetition_se19_tfs
))))
, 0x0,
10680 "repeat port info flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10681 },
10682 /* 7.7.19.8 */
10683 /* TODO: break down into each RE as done for 7.5.3.5 ? */
10684 { &hf_oran_portReMask,
10685 { "portReMask", "oran_fh_cus.portReMask",
10686 FT_BOOLEAN, 16,
10687 TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0fff,
10688 "RE bitmask per port", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10689 },
10690 /* 7.7.19.9 */
10691 { &hf_oran_portSymbolMask,
10692 { "portSymbolMask", "oran_fh_cus.portSymbolMask",
10693 FT_BOOLEAN, 16,
10694 TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x3fff,
10695 "Symbol bitmask port port", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10696 },
10697
10698 { &hf_oran_ext19_port,
10699 {"Port", "oran_fh_cus.ext19.port",
10700 FT_STRING, BASE_NONE,
10701 NULL((void*)0), 0x0,
10702 "Entry for a given port in ext19", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10703 },
10704
10705 /* Ext 13 */
10706 { &hf_oran_prb_allocation,
10707 {"PRB allocation", "oran_fh_cus.prb-allocation",
10708 FT_STRING, BASE_NONE,
10709 NULL((void*)0), 0x0,
10710 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10711 },
10712 /* 7.7.13.2 */
10713 { &hf_oran_nextSymbolId,
10714 { "nextSymbolId", "oran_fh_cus.nextSymbolId",
10715 FT_UINT8, BASE_DEC,
10716 NULL((void*)0), 0x3c,
10717 "offset of PRB range start", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10718 },
10719 /* 7.7.13.3 */
10720 { &hf_oran_nextStartPrbc,
10721 { "nextStartPrbc", "oran_fh_cus.nextStartPrbc",
10722 FT_UINT16, BASE_DEC,
10723 NULL((void*)0), 0x03ff,
10724 "number of PRBs in PRB range", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10725 },
10726
10727 /* Puncturing patters as appears in SE 20 */
10728 { &hf_oran_puncPattern,
10729 { "puncPattern", "oran_fh_cus.puncPattern",
10730 FT_STRING, BASE_NONE,
10731 NULL((void*)0), 0x0,
10732 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10733 },
10734
10735 /* 7.7.20.2 numPuncPatterns */
10736 { &hf_oran_numPuncPatterns,
10737 { "numPuncPatterns", "oran_fh_cus.numPuncPatterns",
10738 FT_UINT8, BASE_DEC,
10739 NULL((void*)0), 0x0,
10740 "number of puncturing patterns", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10741 },
10742 /* 7.7.20.3 symbolMask */
10743 { &hf_oran_symbolMask_ext20,
10744 { "symbolMask", "oran_fh_cus.symbolMask",
10745 FT_UINT16, BASE_HEX,
10746 NULL((void*)0), 0xfffc,
10747 "Bitmask where each bit indicates the symbols associated with the puncturing pattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10748 },
10749 /* 7.7.20.4 startPuncPrb */
10750 { &hf_oran_startPuncPrb,
10751 { "startPuncPrb", "oran_fh_cus.startPuncPrb",
10752 FT_UINT16, BASE_DEC,
10753 NULL((void*)0), 0x03ff,
10754 "starting PRB to which one puncturing pattern applies", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10755 },
10756 /* 7.7.20.5 numPuncPrb */
10757 { &hf_oran_numPuncPrb,
10758 { "numPuncPrb", "oran_fh_cus.numPuncPrb",
10759 FT_UINT8, BASE_DEC,
10760 NULL((void*)0), 0x0,
10761 "the number of PRBs of the puncturing pattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10762 },
10763 /* 7.7.20.6 puncReMask */
10764 { &hf_oran_puncReMask,
10765 { "puncReMask", "oran_fh_cus.puncReMask",
10766 FT_UINT16, BASE_DEC,
10767 NULL((void*)0), 0xfff0,
10768 "puncturing pattern RE mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10769 },
10770 /* 7.7.20.12 multiSDScope */
10771 { &hf_oran_multiSDScope,
10772 { "multiSDScope", "oran_fh_cus.multiSDScope",
10773 FT_BOOLEAN, 8,
10774 TFS(&multi_sd_scope_tfs)((0 ? (const struct true_false_string*)0 : ((&multi_sd_scope_tfs
))))
, 0x02,
10775 "multiple section description scope flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10776 },
10777 /* 7.7.20.4 rbgIncl */
10778 { &hf_oran_RbgIncl,
10779 { "rbgIncl", "oran_fh_cus.rbgIncl",
10780 FT_BOOLEAN, 8,
10781 NULL((void*)0), 0x01,
10782 "rbg included flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10783 },
10784
10785 /* 7.7.21.2 ciPrbGroupSize */
10786 { &hf_oran_ci_prb_group_size,
10787 { "ciPrbGroupSize", "oran_fh_cus.ciPrbGroupSize",
10788 FT_UINT8, BASE_DEC,
10789 NULL((void*)0), 0x0,
10790 "channel information PRB group size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10791 },
10792 /* 7.21.3 */
10793 { &hf_oran_prg_size_st5,
10794 { "prgSize", "oran_fh_cus.prgSize",
10795 FT_UINT8, BASE_DEC,
10796 VALS(prg_size_st5_vals)((0 ? (const struct _value_string*)0 : ((prg_size_st5_vals)))
)
, 0x03,
10797 "precoding resource block group size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10798 },
10799 { &hf_oran_prg_size_st6,
10800 { "prgSize", "oran_fh_cus.prgSize",
10801 FT_UINT8, BASE_DEC,
10802 VALS(prg_size_st6_vals)((0 ? (const struct _value_string*)0 : ((prg_size_st6_vals)))
)
, 0x03,
10803 "precoding resource block group size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10804 },
10805
10806 /* 7.7.17.2 numUeID */
10807 { &hf_oran_num_ueid,
10808 { "numUeID", "oran_fh_cus.numUeID",
10809 FT_UINT8, BASE_DEC,
10810 NULL((void*)0), 0x0,
10811 "number of ueIDs per user", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10812 },
10813
10814 /* 7.7.16.2 antMask */
10815 { &hf_oran_antMask,
10816 { "antMask", "oran_fh_cus.antMask",
10817 FT_UINT64, BASE_HEX,
10818 NULL((void*)0), 0xffffffffffffffff,
10819 "indices of antennas to be pre-combined per RX endpoint", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10820 },
10821
10822 /* 7.7.18.2 transmissionWindowOffset */
10823 { &hf_oran_transmissionWindowOffset,
10824 { "transmissionWindowOffset", "oran_fh_cus.transmissionWindowOffset",
10825 FT_UINT16, BASE_DEC,
10826 NULL((void*)0), 0x0,
10827 "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)}
10828 },
10829 /* 7.7.18.3 transmissionWindowSize */
10830 { &hf_oran_transmissionWindowSize,
10831 { "transmissionWindowSize", "oran_fh_cus.transmissionWindowSize",
10832 FT_UINT16, BASE_DEC,
10833 NULL((void*)0), 0x3fff,
10834 "size of the transmission window in resolution µs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10835 },
10836 /* 7.7.18.4 toT */
10837 { &hf_oran_toT,
10838 { "toT", "oran_fh_cus.toT",
10839 FT_UINT8, BASE_DEC,
10840 VALS(type_of_transmission_vals)((0 ? (const struct _value_string*)0 : ((type_of_transmission_vals
))))
, 0x03,
10841 "type of transmission", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10842 },
10843
10844 /* 7.7.2.2 bfaCompHdr */
10845 { &hf_oran_bfaCompHdr,
10846 { "bfaCompHdr", "oran_fh_cus.bfaCompHdr",
10847 FT_STRING, BASE_NONE,
10848 NULL((void*)0), 0x0,
10849 "beamforming attributes compression header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10850 },
10851 /* 7.7.2.2-2: bfAzPtWidth */
10852 { &hf_oran_bfAzPtWidth,
10853 { "bfAzPtWidth", "oran_fh_cus.bfAzPtWidth",
10854 FT_UINT8, BASE_DEC,
10855 VALS(bfa_bw_vals)((0 ? (const struct _value_string*)0 : ((bfa_bw_vals)))), 0x38,
10856 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10857 },
10858 /* 7.7.2.2-3: bfZePtWidth */
10859 { &hf_oran_bfZePtWidth,
10860 { "bfZePtWidth", "oran_fh_cus.bfZePtWidth",
10861 FT_UINT8, BASE_DEC,
10862 VALS(bfa_bw_vals)((0 ? (const struct _value_string*)0 : ((bfa_bw_vals)))), 0x07,
10863 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10864 },
10865 /* 7.7.2.2-4: bfAz3ddWidth */
10866 { &hf_oran_bfAz3ddWidth,
10867 { "bfAz3ddWidth", "oran_fh_cus.bfAz3ddWidth",
10868 FT_UINT8, BASE_DEC,
10869 VALS(bfa_bw_vals)((0 ? (const struct _value_string*)0 : ((bfa_bw_vals)))), 0x38,
10870 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10871 },
10872 /* 7.7.2.2-5: bfZe3ddWidth */
10873 { &hf_oran_bfZe3ddWidth,
10874 { "bfZe3ddWidth", "oran_fh_cus.bfZe3ddWidth",
10875 FT_UINT8, BASE_DEC,
10876 VALS(bfa_bw_vals)((0 ? (const struct _value_string*)0 : ((bfa_bw_vals)))), 0x07,
10877 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10878 },
10879
10880 /* 7.7.2.3 bfAzPt */
10881 { &hf_oran_bfAzPt,
10882 { "bfAzPt", "oran_fh_cus.bfAzPt",
10883 FT_UINT8, BASE_DEC,
10884 NULL((void*)0), 0x0,
10885 "beamforming azimuth pointing parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10886 },
10887 /* 7.7.2.4 bfZePt */
10888 { &hf_oran_bfZePt,
10889 { "bfZePt", "oran_fh_cus.bfZePt",
10890 FT_UINT8, BASE_DEC,
10891 NULL((void*)0), 0x0,
10892 "beamforming zenith pointing parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10893 },
10894 /* 7.7.2.5 bfAz3dd */
10895 { &hf_oran_bfAz3dd,
10896 { "bfAz3dd", "oran_fh_cus.bfAz3dd",
10897 FT_UINT8, BASE_DEC,
10898 NULL((void*)0), 0x0,
10899 "beamforming azimuth beamwidth parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10900 },
10901 /* 7.7.2.6 bfZe3dd */
10902 { &hf_oran_bfZe3dd,
10903 { "bfZe3dd", "oran_fh_cus.bfZe3dd",
10904 FT_UINT8, BASE_DEC,
10905 NULL((void*)0), 0x0,
10906 "beamforming zenith beamwidth parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10907 },
10908
10909 /* 7.7.2.7 bfAzSl */
10910 { &hf_oran_bfAzSl,
10911 { "bfAzSl", "oran_fh_cus.bfAzSl",
10912 FT_UINT8, BASE_DEC,
10913 VALS(sidelobe_suppression_vals)((0 ? (const struct _value_string*)0 : ((sidelobe_suppression_vals
))))
, 0x38,
10914 "beamforming azimuth sidelobe parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10915 },
10916 /* 7.7.2.8 bfZeSl */
10917 { &hf_oran_bfZeSl,
10918 { "bfZeSl", "oran_fh_cus.bfZeSl",
10919 FT_UINT8, BASE_DEC,
10920 VALS(sidelobe_suppression_vals)((0 ? (const struct _value_string*)0 : ((sidelobe_suppression_vals
))))
, 0x07,
10921 "beamforming zenith sidelobe parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10922 },
10923
10924 /* 7.5.2.17 */
10925 { &hf_oran_cmd_scope,
10926 { "cmdScope", "oran_fh_cus.cmdScope",
10927 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
10928 RVALS(cmd_scope_vals)((0 ? (const struct _range_string*)0 : ((cmd_scope_vals)))), 0x0f,
10929 "command scope", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10930 },
10931 /* 7.5.2.18 */
10932 { &hf_oran_number_of_st4_cmds,
10933 { "numberOfST4Cmds", "oran_fh_cus.numberOfST4Cmds",
10934 FT_UINT8, BASE_DEC,
10935 NULL((void*)0), 0x0,
10936 "Number of Section Type 4 commands", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10937 },
10938
10939 { &hf_oran_st4_cmd_header,
10940 { "Command common header", "oran_fh_cus.st4CmdCommonHeader",
10941 FT_STRING, BASE_NONE,
10942 NULL((void*)0), 0x0,
10943 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10944 },
10945
10946 /* 7.5.3.38 */
10947 { &hf_oran_st4_cmd_type,
10948 { "st4CmdType", "oran_fh_cus.st4CmdType",
10949 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
10950 RVALS(st4_cmd_type_vals)((0 ? (const struct _range_string*)0 : ((st4_cmd_type_vals)))
)
, 0x0,
10951 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10952 },
10953 /* 7.5.3.39 */
10954 { &hf_oran_st4_cmd_len,
10955 { "st4CmdLen", "oran_fh_cus.st4CmdLen",
10956 FT_UINT16, BASE_DEC,
10957 NULL((void*)0), 0x0,
10958 "Length of command in 32-bit words", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10959 },
10960 /* 7.5.3.40 */
10961 { &hf_oran_st4_cmd_num_slots,
10962 { "numSlots", "oran_fh_cus.st4NumSlots",
10963 FT_UINT8, BASE_DEC,
10964 NULL((void*)0), 0x0,
10965 "Contiguous slots for which command is applicable", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10966 },
10967 /* 7.5.3.41 */
10968 { &hf_oran_st4_cmd_ack_nack_req_id,
10969 { "ackNackReqId", "oran_fh_cus.ackNackReqId",
10970 FT_UINT16, BASE_DEC,
10971 NULL((void*)0), 0x0,
10972 "ACK/NACK Request Id", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10973 },
10974
10975 { &hf_oran_st4_cmd,
10976 { "Command", "oran_fh_cus.st4Cmd",
10977 FT_STRING, BASE_NONE,
10978 NULL((void*)0), 0x0,
10979 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10980 },
10981
10982 /* 7.5.3.52 */
10983 { &hf_oran_sleepmode_trx,
10984 { "sleepMode", "oran_fh_cus.sleepMode",
10985 FT_UINT8, BASE_HEX,
10986 VALS(sleep_mode_trx_vals)((0 ? (const struct _value_string*)0 : ((sleep_mode_trx_vals)
)))
, 0x03,
10987 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10988 },
10989 { &hf_oran_sleepmode_asm,
10990 { "sleepMode", "oran_fh_cus.sleepMode",
10991 FT_UINT8, BASE_HEX,
10992 VALS(sleep_mode_asm_vals)((0 ? (const struct _value_string*)0 : ((sleep_mode_asm_vals)
)))
, 0x03,
10993 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10994 },
10995
10996 /* 7.5.3.51 */
10997 { &hf_oran_log2maskbits,
10998 { "log2MaskBits", "oran_fh_cus.log2MaskBits",
10999 FT_UINT8, BASE_HEX,
11000 VALS(log2maskbits_vals)((0 ? (const struct _value_string*)0 : ((log2maskbits_vals)))
)
, 0x3c,
11001 "Number of bits to appear in antMask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11002 },
11003 /* 7.5.3.53 */
11004 { &hf_oran_num_slots_ext,
11005 { "numSlotsExt", "oran_fh_cus.numSlotsExt",
11006 FT_UINT24, BASE_HEX,
11007 NULL((void*)0), 0x0fffff,
11008 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11009 },
11010 /* 7.5.3.54 */
11011 { &hf_oran_antMask_trx_control,
11012 { "antMask", "oran_fh_cus.trxControl.antMask",
11013 FT_BYTES, BASE_NONE,
11014 NULL((void*)0), 0x0,
11015 "which antennas should sleep or wake-up", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11016 },
11017
11018 /* 7.5.3.136 */
11019 { &hf_oran_max_pwr_lvl_ind,
11020 { "maxPwrLvlInd", "oran_fh_cus.maxPwrLvlInd",
11021 FT_UINT8, BASE_DEC,
11022 NULL((void*)0), 0x0,
11023 "Maximum output power for tx-array", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11024 },
11025 /* 7.5.3.137 */
11026 { &hf_oran_array_carrier_max_pwr_reduction,
11027 { "arrayCarrierMaxPwrReduction", "oran_fh_cus.arrayCarrierMaxPwrReduction",
11028 FT_UINT16, BASE_DEC,
11029 NULL((void*)0), 0x0,
11030 "array carrier power reduction", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11031 },
11032
11033 /* 7.734.3 */
11034 { &hf_oran_port_list_en,
11035 { "portListEn", "oran_fh_cus.portListEn",
11036 FT_BOOLEAN, 8,
11037 NULL((void*)0), 0x80,
11038 "port list enabled", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11039 },
11040 /* 7.7.34.4 */
11041 { &hf_oran_tpmi_mode,
11042 { "tpmiMode", "oran_fh_cus.tpmiMode",
11043 FT_UINT8, BASE_DEC,
11044 VALS(tpmi_mode_vals)((0 ? (const struct _value_string*)0 : ((tpmi_mode_vals)))), 0x07,
11045 "TPMI mode selection", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11046 },
11047 /* 7.7.34.5 */
11048 { &hf_oran_num_ueid_se34,
11049 { "numUeId", "oran_fh_cus.numUeId",
11050 FT_UINT8, BASE_DEC,
11051 NULL((void*)0), 0x3f,
11052 "Number of uplink layers", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11053 },
11054 { &hf_oran_ueid_se34,
11055 { "ueId", "oran_fh_cus.ueId",
11056 FT_UINT16, BASE_DEC,
11057 NULL((void*)0), 0x0,
11058 "ueId for UE layer", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11059 },
11060 { &hf_oran_num_port_list_index,
11061 { "numPortListIndex", "oran_fh_cus.numPortListIndex",
11062 FT_UINT8, BASE_DEC,
11063 NULL((void*)0), 0x0,
11064 "Number of portListIndex values to follow", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11065 },
11066 /* 7.7.34.6.2 */
11067 { &hf_oran_chan_srs_port_mask,
11068 { "srsPortMask", "oran_fh_cus.srsPortMask",
11069 FT_UINT8, BASE_DEC,
11070 NULL((void*)0), 0x0,
11071 "SRS antenna ports used for tx of UE layer", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11072 },
11073 /* 7.7.34.6.3 */
11074 { &hf_oran_tpmi_phase_7,
11075 { "tpmiPhase7", "oran_fh_cus.tpmiPhase7",
11076 FT_UINT8, BASE_DEC,
11077 VALS(tpmi_phase_vals)((0 ? (const struct _value_string*)0 : ((tpmi_phase_vals)))), 0xc0,
11078 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11079 },
11080 { &hf_oran_tpmi_phase_6,
11081 { "tpmiPhase6", "oran_fh_cus.tpmiPhase6",
11082 FT_UINT8, BASE_DEC,
11083 VALS(tpmi_phase_vals)((0 ? (const struct _value_string*)0 : ((tpmi_phase_vals)))), 0x30,
11084 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11085 },
11086 { &hf_oran_tpmi_phase_5,
11087 { "tpmiPhase5", "oran_fh_cus.tpmiPhase5",
11088 FT_UINT8, BASE_DEC,
11089 VALS(tpmi_phase_vals)((0 ? (const struct _value_string*)0 : ((tpmi_phase_vals)))), 0x0c,
11090 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11091 },
11092 { &hf_oran_tpmi_phase_4,
11093 { "tpmiPhase4", "oran_fh_cus.tpmiPhase4",
11094 FT_UINT8, BASE_DEC,
11095 VALS(tpmi_phase_vals)((0 ? (const struct _value_string*)0 : ((tpmi_phase_vals)))), 0x03,
11096 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11097 },
11098 { &hf_oran_tpmi_phase_3,
11099 { "tpmiPhase3", "oran_fh_cus.tpmiPhase3",
11100 FT_UINT8, BASE_DEC,
11101 VALS(tpmi_phase_vals)((0 ? (const struct _value_string*)0 : ((tpmi_phase_vals)))), 0xc0,
11102 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11103 },
11104 { &hf_oran_tpmi_phase_2,
11105 { "tpmiPhase2", "oran_fh_cus.tpmiPhase2",
11106 FT_UINT8, BASE_DEC,
11107 VALS(tpmi_phase_vals)((0 ? (const struct _value_string*)0 : ((tpmi_phase_vals)))), 0x30,
11108 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11109 },
11110 { &hf_oran_tpmi_phase_1,
11111 { "tpmiPhase1", "oran_fh_cus.tpmiPhase1",
11112 FT_UINT8, BASE_DEC,
11113 VALS(tpmi_phase_vals)((0 ? (const struct _value_string*)0 : ((tpmi_phase_vals)))), 0x0c,
11114 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11115 },
11116 { &hf_oran_tpmi_phase_0,
11117 { "tpmiPhase0", "oran_fh_cus.tpmiPhase0",
11118 FT_UINT8, BASE_DEC,
11119 VALS(tpmi_phase_vals)((0 ? (const struct _value_string*)0 : ((tpmi_phase_vals)))), 0x03,
11120 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11121 },
11122
11123 /* 7.5.3.55 */
11124 { &hf_oran_ready,
11125 { "ready", "oran_fh_cus.ready",
11126 FT_BOOLEAN, 8,
11127 TFS(&ready_tfs)((0 ? (const struct true_false_string*)0 : ((&ready_tfs))
))
, 0x01,
11128 "wake-up ready indicator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11129 },
11130 /* 7.5.3.34 */
11131 { &hf_oran_number_of_acks,
11132 { "numberOfAcks", "oran_fh_cus.numberOfAcks",
11133 FT_UINT8, BASE_DEC,
11134 NULL((void*)0), 0x0,
11135 "number of ACKs for one eAxC_ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11136 },
11137 /* 7.5.3.35 */
11138 { &hf_oran_number_of_nacks,
11139 { "numberOfNacks", "oran_fh_cus.numberOfNacks",
11140 FT_UINT8, BASE_DEC,
11141 NULL((void*)0), 0x0,
11142 "number of NACKs for one eAxC_ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11143 },
11144 /* 7.5.3.36 */
11145 { &hf_oran_ackid,
11146 { "ackId", "oran_fh_cus.ackId",
11147 FT_UINT16, BASE_DEC,
11148 NULL((void*)0), 0x0,
11149 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11150 },
11151 /* 7.5.3.37 */
11152 { &hf_oran_nackid,
11153 { "nackId", "oran_fh_cus.nackId",
11154 FT_UINT16, BASE_DEC,
11155 NULL((void*)0), 0x0,
11156 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11157 },
11158
11159 /* Links between acknack requests & responses */
11160 { &hf_oran_acknack_request_frame,
11161 { "Request Frame", "oran_fh_cus.ackNackId.request-frame",
11162 FT_FRAMENUM, BASE_NONE,
11163 FRAMENUM_TYPE(FT_FRAMENUM_REQUEST)((gpointer) (glong) (FT_FRAMENUM_REQUEST)), 0x0,
11164 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11165 },
11166 { &hf_oran_acknack_request_time,
11167 { "Time since request in ms", "oran_fh_cus.ackNackId.time-since-request",
11168 FT_UINT32, BASE_DEC,
11169 NULL((void*)0), 0x0,
11170 "Time between request and response", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11171 },
11172 { &hf_oran_acknack_request_type,
11173 { "Request Type", "oran_fh_cus.ackNackId.request-type",
11174 FT_UINT32, BASE_DEC,
11175 VALS(acknack_type_vals)((0 ? (const struct _value_string*)0 : ((acknack_type_vals)))
)
, 0x0,
11176 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11177 },
11178 { &hf_oran_acknack_response_frame,
11179 { "Response Frame", "oran_fh_cus.ackNackId.response-frame",
11180 FT_FRAMENUM, BASE_NONE,
11181 FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE)((gpointer) (glong) (FT_FRAMENUM_RESPONSE)), 0x0,
11182 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11183 },
11184 { &hf_oran_acknack_response_time,
11185 { "Time to response in ms", "oran_fh_cus.ackNackId.time-to-response",
11186 FT_UINT32, BASE_DEC,
11187 NULL((void*)0), 0x0,
11188 "Time between request and response", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11189 },
11190
11191 /* 7.5.3.43 */
11192 { &hf_oran_disable_tdbfns,
11193 { "disableTDBFNs", "oran_fh_cus.disableTDBFNs",
11194 FT_BOOLEAN, 8,
11195 TFS(&disable_tdbfns_tfs)((0 ? (const struct true_false_string*)0 : ((&disable_tdbfns_tfs
))))
, 0x80,
11196 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11197 },
11198
11199 /* 7.5.3.44 */
11200 { &hf_oran_td_beam_group,
11201 { "tdBeamGrp", "oran_fh_cus.tdBeamGrp",
11202 FT_UINT16, BASE_HEX,
11203 NULL((void*)0), 0x7fff,
11204 "Applies to symbolMask in command header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11205 },
11206 /* 7.5.3.43 */
11207 { &hf_oran_disable_tdbfws,
11208 { "disableTDBFWs", "oran_fh_cus.disableTDBFWs",
11209 FT_BOOLEAN, 8,
11210 TFS(&beam_numbers_included_tfs)((0 ? (const struct true_false_string*)0 : ((&beam_numbers_included_tfs
))))
, 0x80,
11211 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11212 },
11213
11214 /* 7.5.3.56 */
11215 { &hf_oran_td_beam_num,
11216 { "tdBeamNum", "oran_fh_cus.tdBeamNum",
11217 FT_UINT16, BASE_HEX,
11218 NULL((void*)0), 0x7fff,
11219 "time-domain beam number", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11220 },
11221
11222 /* 7.5.3.49 */
11223 { &hf_oran_dir_pattern,
11224 { "dirPattern", "oran_fh_cus.dirPattern",
11225 FT_BOOLEAN, 16,
11226 TFS(&symbol_direction_tfs)((0 ? (const struct true_false_string*)0 : ((&symbol_direction_tfs
))))
, 0x3fff,
11227 "symbol data direction (gNB Tx/Rx) pattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11228 },
11229 /* 7.5.3.50 */
11230 { &hf_oran_guard_pattern,
11231 { "guardPattern", "oran_fh_cus.guardPattern",
11232 FT_BOOLEAN, 16,
11233 TFS(&symbol_guard_tfs)((0 ? (const struct true_false_string*)0 : ((&symbol_guard_tfs
))))
, 0x3fff,
11234 "guard pattern bitmask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11235 },
11236
11237 /* For convenient filtering */
11238 { &hf_oran_cplane,
11239 { "C-Plane", "oran_fh_cus.c-plane",
11240 FT_NONE, BASE_NONE,
11241 NULL((void*)0), 0x0,
11242 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11243 },
11244 { &hf_oran_uplane,
11245 { "U-Plane", "oran_fh_cus.u-plane",
11246 FT_NONE, BASE_NONE,
11247 NULL((void*)0), 0x0,
11248 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11249 },
11250 { &hf_oran_bf,
11251 { "BeamForming", "oran_fh_cus.bf",
11252 FT_NONE, BASE_NONE,
11253 NULL((void*)0), 0x0,
11254 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11255 },
11256 { &hf_oran_zero_prb,
11257 { "Zero PRB", "oran_fh_cus.zero-prb",
11258 FT_NONE, BASE_NONE,
11259 NULL((void*)0), 0x0,
11260 "All of the REs in this PRB are zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11261 },
11262 { &hf_oran_nonzero_prb,
11263 { "Non-Zero PRB", "oran_fh_cus.nonzero-prb",
11264 FT_NONE, BASE_NONE,
11265 NULL((void*)0), 0x0,
11266 "Not all of the REs in this PRB are zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11267 },
11268 /* TODO: rename, as now used in ext1 too, which doesn't really have bundles? */
11269 { &hf_oran_bundle_weights_all_zero,
11270 { "Bundle Weights all zero", "oran_fh_cus.zero-bundle",
11271 FT_NONE, BASE_NONE,
11272 NULL((void*)0), 0x0,
11273 "All of the weights in a bundle are zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11274 },
11275
11276
11277 /* 5.1.3.2.7 */
11278 { &hf_oran_ecpri_pcid,
11279 { "ecpriPcid", "oran_fh_cus.ecpriPcid",
11280 FT_NONE, BASE_NONE,
11281 NULL((void*)0), 0x0,
11282 "IQ data transfer message series identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11283 },
11284 { &hf_oran_ecpri_rtcid,
11285 { "ecpriRtcid", "oran_fh_cus.ecpriRtcid",
11286 FT_NONE, BASE_NONE,
11287 NULL((void*)0), 0x0,
11288 "Real time control data identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11289 },
11290 /* 5.1.3.2.8 */
11291 { &hf_oran_ecpri_seqid,
11292 { "ecpriSeqid", "oran_fh_cus.ecpriSeqid",
11293 FT_NONE, BASE_NONE,
11294 NULL((void*)0), 0x0,
11295 "message identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11296 },
11297
11298 /* 7.7.23.2 */
11299 { &hf_oran_num_sym_prb_pattern,
11300 { "numSymPrbPattern", "oran_fh_cus.numSymPrbPattern",
11301 FT_UINT8, BASE_DEC,
11302 NULL((void*)0), 0xf0,
11303 "number of symbol and resource block patterns", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11304 },
11305 /* 7.7.23.9 */
11306 { &hf_oran_prb_mode,
11307 { "prbMode", "oran_fh_cus.prbMode",
11308 FT_BOOLEAN, 8,
11309 TFS(&prb_mode_tfs)((0 ? (const struct true_false_string*)0 : ((&prb_mode_tfs
))))
, 0x01,
11310 "PRB Mode", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11311 },
11312 /* 7.7.23.4 */
11313 { &hf_oran_sym_prb_pattern,
11314 { "symPrbPattern", "oran_fh_cus.symPrbPattern",
11315 FT_STRING, BASE_NONE,
11316 NULL((void*)0), 0x0,
11317 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11318 },
11319 /* 7.7.23.3 */
11320 { &hf_oran_sym_mask,
11321 { "symMask", "oran_fh_cus.symMask",
11322 FT_UINT16, BASE_HEX,
11323 NULL((void*)0), 0x3fff,
11324 "symbol mask part of symPrbPattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11325 },
11326 /* 7.7.23.5 */
11327 {&hf_oran_num_mc_scale_offset,
11328 {"numMcScaleOffset", "oran_fh_cus.numMcScaleOffset",
11329 FT_UINT8, BASE_DEC,
11330 NULL((void*)0), 0xf0,
11331 "number of modulation compression scaling value per symPrbPattern",
11332 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11333 },
11334 /* 7.7.23.4 */
11335 { &hf_oran_prb_pattern,
11336 { "prbPattern", "oran_fh_cus.prbPattern",
11337 FT_UINT8, BASE_DEC,
11338 NULL((void*)0), 0x0f,
11339 "size of one PRB block of one SymPrbPattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11340 },
11341 /* 7.7.23.10 */
11342 { &hf_oran_prb_blk_offset,
11343 { "prbBlkOffset", "oran_fh_cus.prbBlkOffset",
11344 FT_UINT16, BASE_DEC,
11345 NULL((void*)0), 0x0ff0,
11346 "offset to start of PRB block", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11347 },
11348
11349 /* 7.7.23.11 */
11350 { &hf_oran_prb_blk_size,
11351 { "prbBlkSize", "oran_fh_cus.prbBlkSize",
11352 FT_UINT16, BASE_DEC,
11353 NULL((void*)0), 0x0ff0,
11354 "size of one PRB block of one SymPrbPattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11355 },
11356
11357 /* 7.7.3.2 */
11358 { &hf_oran_codebook_index,
11359 { "codebookIndex", "oran_fh_cus.codebookIndex",
11360 FT_UINT8, BASE_DEC,
11361 NULL((void*)0), 0x0,
11362 "precoder codebook used for transmission", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11363 },
11364 /* 7.7.3.3 */
11365 { &hf_oran_layerid,
11366 { "layerID", "oran_fh_cus.layerID",
11367 FT_UINT8, BASE_DEC,
11368 NULL((void*)0), 0xf0,
11369 "Layer ID for DL transmission", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11370 },
11371 /* 7.7.3.5 */
11372 { &hf_oran_numlayers,
11373 { "numLayers", "oran_fh_cus.numLayers",
11374 FT_UINT8, BASE_DEC,
11375 NULL((void*)0), 0x0f,
11376 "number of layers for DL transmission", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11377 },
11378 /* 7.7.3.4 */
11379 { &hf_oran_txscheme,
11380 { "txScheme", "oran_fh_cus.txScheme",
11381 FT_UINT8, BASE_DEC,
11382 VALS(txscheme_vals)((0 ? (const struct _value_string*)0 : ((txscheme_vals)))), 0xf0,
11383 "transmission scheme", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11384 },
11385 /* 7.7.3.6 */
11386 { &hf_oran_crs_remask,
11387 { "crsReMask", "oran_fh_cus.crsReMask",
11388 FT_UINT16, BASE_HEX,
11389 NULL((void*)0), 0x0fff,
11390 "CRS resource element mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11391 },
11392 /* 7.7.3.8 */
11393 { &hf_oran_crs_shift,
11394 { "crsShift", "oran_fh_cus.crsShift",
11395 FT_UINT8, BASE_HEX,
11396 NULL((void*)0), 0x80,
11397 "CRS resource element mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11398 },
11399 /* 7.7.3.7 */
11400 { &hf_oran_crs_symnum,
11401 { "crsSymNum", "oran_fh_cus.crsSymNum",
11402 FT_UINT8, BASE_DEC,
11403 NULL((void*)0), 0x0f,
11404 "CRS symbol number indication", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11405 },
11406 /* 7.7.3.9 */
11407 { &hf_oran_beamid_ap1,
11408 { "beamIdAP1", "oran_fh_cus.beamIdAP1",
11409 FT_UINT16, BASE_DEC,
11410 NULL((void*)0), 0x7fff,
11411 "beam id to be used for antenna port 1", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11412 },
11413 /* 7.7.3.10 */
11414 { &hf_oran_beamid_ap2,
11415 { "beamIdAP2", "oran_fh_cus.beamIdAP2",
11416 FT_UINT16, BASE_DEC,
11417 NULL((void*)0), 0x7fff,
11418 "beam id to be used for antenna port 2", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11419 },
11420 /* 7.7.3.11 */
11421 { &hf_oran_beamid_ap3,
11422 { "beamIdAP3", "oran_fh_cus.beamIdAP3",
11423 FT_UINT16, BASE_DEC,
11424 NULL((void*)0), 0x7fff,
11425 "beam id to be used for antenna port 3", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11426 },
11427
11428 /* 7.7.10.3a */
11429 { &hf_oran_port_list_index,
11430 { "portListIndex", "oran_fh_cus.portListIndex",
11431 FT_UINT8, BASE_DEC,
11432 NULL((void*)0), 0x0,
11433 "the index of an eAxC_ID in the port-list", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11434 },
11435
11436 { &hf_oran_alpn_per_sym,
11437 { "alpnPerSym", "oran_fh_cus.alpnPerSym",
11438 FT_UINT8, BASE_HEX,
11439 VALS(alpn_per_sym_vals)((0 ? (const struct _value_string*)0 : ((alpn_per_sym_vals)))
)
, 0x80,
11440 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11441 },
11442 { &hf_oran_ant_dmrs_snr,
11443 { "antDmrsSnr", "oran_fh_cus.antDmrsSnr",
11444 FT_UINT8, BASE_HEX,
11445 VALS(ant_dmrs_snr_vals)((0 ? (const struct _value_string*)0 : ((ant_dmrs_snr_vals)))
)
, 0x40,
11446 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11447 },
11448
11449 /* 7.7.24.6 */
11450 { &hf_oran_user_group_size,
11451 { "userGroupSize", "oran_fh_cus.userGroupSize",
11452 FT_UINT8, BASE_DEC,
11453 NULL((void*)0), 0x1f,
11454 "number of UE data layers in the user group identified by userGroupId", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11455 },
11456 /* 7.7.24.7 */
11457 { &hf_oran_user_group_id,
11458 { "userGroupId", "oran_fh_cus.userGroupId",
11459 FT_UINT8, BASE_DEC,
11460 NULL((void*)0), 0x0,
11461 "indicates user group described by the section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11462 },
11463 /* 7.7.24.8 */
11464 { &hf_oran_entry_type,
11465 { "entryType", "oran_fh_cus.entryType",
11466 FT_UINT8, BASE_DEC,
11467 VALS(entry_type_vals)((0 ? (const struct _value_string*)0 : ((entry_type_vals)))), 0xe0,
11468 "indicates format of the entry", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11469 },
11470 /* 7.7.24.9 */
11471 { &hf_oran_dmrs_port_number,
11472 { "dmrsPortNumber", "oran_fh_cus.dmrsPortNumber",
11473 FT_UINT8, BASE_DEC,
11474 NULL((void*)0), 0x1f,
11475 "DMRS antenna port number for the associated ueId", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11476 },
11477 /* 7.7.24.10 */
11478 { &hf_oran_ueid_reset,
11479 { "ueidReset", "oran_fh_cus.ueidReset",
11480 FT_BOOLEAN, 8,
11481 TFS(&tfs_ueid_reset)((0 ? (const struct true_false_string*)0 : ((&tfs_ueid_reset
))))
, 0x80,
11482 "same UEID as the previous slot", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11483 },
11484 /* 7.7.24.11 */
11485 { &hf_oran_dmrs_symbol_mask,
11486 { "dmrsSymbolMask", "oran_fh_cus.dmrsSymbolMask",
11487 FT_UINT16, BASE_HEX,
11488 NULL((void*)0), 0x3fff,
11489 "symbols within the slot containing DMRS", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11490 },
11491 { &hf_oran_dmrs_symbol_mask_s13,
11492 { "symbol 13", "oran_fh_cus.dmrsSymbolMask.symbol-13",
11493 FT_BOOLEAN, 16,
11494 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x2000,
11495 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11496 },
11497 { &hf_oran_dmrs_symbol_mask_s12,
11498 { "symbol 12", "oran_fh_cus.dmrsSymbolMask.symbol-12",
11499 FT_BOOLEAN, 16,
11500 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x1000,
11501 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11502 },
11503 { &hf_oran_dmrs_symbol_mask_s11,
11504 { "symbol 11", "oran_fh_cus.dmrsSymbolMask.symbol-11",
11505 FT_BOOLEAN, 16,
11506 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0800,
11507 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11508 },
11509 { &hf_oran_dmrs_symbol_mask_s10,
11510 { "symbol 10", "oran_fh_cus.dmrsSymbolMask.symbol-10",
11511 FT_BOOLEAN, 16,
11512 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0400,
11513 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11514 },
11515 { &hf_oran_dmrs_symbol_mask_s9,
11516 { "symbol 9", "oran_fh_cus.dmrsSymbolMask.symbol-9",
11517 FT_BOOLEAN, 16,
11518 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0200,
11519 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11520 },
11521 { &hf_oran_dmrs_symbol_mask_s8,
11522 { "symbol 8", "oran_fh_cus.dmrsSymbolMask.symbol-8",
11523 FT_BOOLEAN, 16,
11524 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0100,
11525 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11526 },
11527 { &hf_oran_dmrs_symbol_mask_s7,
11528 { "symbol 7", "oran_fh_cus.dmrsSymbolMask.symbol-7",
11529 FT_BOOLEAN, 16,
11530 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0080,
11531 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11532 },
11533 { &hf_oran_dmrs_symbol_mask_s6,
11534 { "symbol 6", "oran_fh_cus.dmrsSymbolMask.symbol-6",
11535 FT_BOOLEAN, 16,
11536 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0040,
11537 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11538 },
11539 { &hf_oran_dmrs_symbol_mask_s5,
11540 { "symbol 5", "oran_fh_cus.dmrsSymbolMask.symbol-5",
11541 FT_BOOLEAN, 16,
11542 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0020,
11543 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11544 },
11545 { &hf_oran_dmrs_symbol_mask_s4,
11546 { "symbol 4", "oran_fh_cus.dmrsSymbolMask.symbol-4",
11547 FT_BOOLEAN, 16,
11548 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0010,
11549 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11550 },
11551 { &hf_oran_dmrs_symbol_mask_s3,
11552 { "symbol 3", "oran_fh_cus.dmrsSymbolMask.symbol-3",
11553 FT_BOOLEAN, 16,
11554 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0008,
11555 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11556 },
11557 { &hf_oran_dmrs_symbol_mask_s2,
11558 { "symbol 2", "oran_fh_cus.dmrsSymbolMask.symbol-2",
11559 FT_BOOLEAN, 16,
11560 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0004,
11561 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11562 },
11563 { &hf_oran_dmrs_symbol_mask_s1,
11564 { "symbol 1", "oran_fh_cus.dmrsSymbolMask.symbol-1",
11565 FT_BOOLEAN, 16,
11566 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0002,
11567 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11568 },
11569 { &hf_oran_dmrs_symbol_mask_s0,
11570 { "symbol 0", "oran_fh_cus.dmrsSymbolMask.symbol-0",
11571 FT_BOOLEAN, 16,
11572 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0001,
11573 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11574 },
11575
11576 /* 7.7.24.12 */
11577 { &hf_oran_scrambling,
11578 { "scrambling", "oran_fh_cus.scrambling",
11579 FT_UINT16, BASE_HEX,
11580 NULL((void*)0), 0x0,
11581 "used to calculate the seed value required to initialize pseudo-random generator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11582 },
11583 /* 7.7.24.13 */
11584 { &hf_oran_nscid,
11585 { "nscid", "oran_fh_cus.nscid",
11586 FT_UINT8, BASE_HEX,
11587 NULL((void*)0), 0x80,
11588 "used to calculate the seed value for pseudo-random generator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11589 },
11590 /* 7.7.24.14 */
11591 { &hf_oran_dtype,
11592 { "dType", "oran_fh_cus.dType",
11593 FT_UINT8, BASE_HEX,
11594 VALS(dtype_vals)((0 ? (const struct _value_string*)0 : ((dtype_vals)))), 0x40,
11595 "PUSCH DMRS configuration type", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11596 },
11597 /* 7.7.24.15 */
11598 { &hf_oran_cmd_without_data,
11599 { "cmdWithoutData", "oran_fh_cus.cmdWithoutData",
11600 FT_UINT8, BASE_HEX,
11601 NULL((void*)0), 0x30,
11602 "number of DMRS CDM groups without data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11603 },
11604 /* 7.7.24.16 */
11605 { &hf_oran_lambda,
11606 { "lambda", "oran_fh_cus.lambda",
11607 FT_UINT8, BASE_HEX,
11608 NULL((void*)0), 0x0c,
11609 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11610 },
11611 /* 7.7.24.19 */
11612 { &hf_oran_first_prb,
11613 { "firstPrb", "oran_fh_cus.firstPrb",
11614 FT_UINT16, BASE_DEC,
11615 NULL((void*)0), 0x03fe,
11616 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11617 },
11618 /* 7.7.24.20 */
11619 { &hf_oran_last_prb,
11620 { "lastPrb", "oran_fh_cus.lastPrb",
11621 FT_UINT16, BASE_DEC,
11622 NULL((void*)0), 0x01ff,
11623 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11624 },
11625
11626 /* 7.7.24.17 */
11627 /* TODO: add value_string */
11628 { &hf_oran_low_papr_type,
11629 { "lowPaprType", "oran_fh_cus.lowPaprType",
11630 FT_UINT8, BASE_HEX,
11631 VALS(papr_type_vals)((0 ? (const struct _value_string*)0 : ((papr_type_vals)))), 0x30,
11632 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11633 },
11634 /* 7.7.24.18 */
11635 { &hf_oran_hopping_mode,
11636 { "hoppingMode", "oran_fh_cus.hoppingMode",
11637 FT_UINT8, BASE_HEX,
11638 VALS(hopping_mode_vals)((0 ? (const struct _value_string*)0 : ((hopping_mode_vals)))
)
, 0x0c,
11639 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11640 },
11641
11642 { &hf_oran_tx_win_for_on_air_symbol_l,
11643 { "txWinForOnAirSymbol", "oran_fh_cus.txWinForOnAirSymbol",
11644 FT_UINT8, BASE_DEC,
11645 NULL((void*)0), 0xf0,
11646 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11647 },
11648 { &hf_oran_tx_win_for_on_air_symbol_r,
11649 { "txWinForOnAirSymbol", "oran_fh_cus.txWinForOnAirSymbol",
11650 FT_UINT8, BASE_DEC,
11651 NULL((void*)0), 0x0f,
11652 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11653 },
11654 /* 7.7.26.2 */
11655 { &hf_oran_num_fo_fb,
11656 { "numFoFb", "oran_fh_cus.numFoFb",
11657 FT_UINT8, BASE_DEC,
11658 NULL((void*)0), 0x7f,
11659 "number of frequency offset feedback", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11660 },
11661 /* 7.7.26.3 */
11662 { &hf_oran_freq_offset_fb,
11663 { "freqOffsetFb", "oran_fh_cus.freqOffsetFb",
11664 FT_UINT16, BASE_HEX_DEC | BASE_RANGE_STRING0x00000100,
11665 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
11666 "UE frequency offset feedback", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11667 },
11668
11669 /* 7.7.28.2 */
11670 { &hf_oran_num_ue_sinr_rpt,
11671 { "numUeSinrRpt", "oran_fh_cus.numUeSinrRpt",
11672 FT_UINT8, BASE_DEC,
11673 NULL((void*)0), 0x1f,
11674 "number of sinr reported UEs {1 - 12}", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11675 },
11676
11677 /* 7.5.2.19 */
11678 { &hf_oran_num_sinr_per_prb,
11679 { "numSinrPerPrb", "oran_fh_cus.numSinrPerPrb",
11680 FT_UINT8, BASE_DEC,
11681 VALS(num_sinr_per_prb_vals)((0 ? (const struct _value_string*)0 : ((num_sinr_per_prb_vals
))))
, 0x70,
11682 "number of SINR values per PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11683 },
11684 { &hf_oran_num_sinr_per_prb_right,
11685 { "numSinrPerPrb", "oran_fh_cus.numSinrPerPrb",
11686 FT_UINT8, BASE_DEC,
11687 VALS(num_sinr_per_prb_vals)((0 ? (const struct _value_string*)0 : ((num_sinr_per_prb_vals
))))
, 0x07,
11688 "number of SINR values per PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11689 },
11690 { &hf_oran_num_sinr_per_prb_st9,
11691 { "numSinrPerPrb", "oran_fh_cus.numSinrPerPrb",
11692 FT_UINT8, BASE_DEC,
11693 VALS(num_sinr_per_prb_vals)((0 ? (const struct _value_string*)0 : ((num_sinr_per_prb_vals
))))
, 0xe0,
11694 "number of SINR values per PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11695 },
11696
11697 /* 7.5.3.68 */
11698 { &hf_oran_sinr_value,
11699 { "sinrValue", "oran_fh_cus.sinrValue",
11700 FT_FLOAT, BASE_NONE,
11701 NULL((void*)0), 0x0,
11702 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11703 },
11704
11705 { &hf_oran_measurement_report,
11706 { "Measurement Report", "oran_fh_cus.measurement-report",
11707 FT_STRING, BASE_NONE,
11708 NULL((void*)0), 0x0,
11709 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11710 },
11711 /* 7.5.3.57 */
11712 { &hf_oran_mf,
11713 { "mf", "oran_fh_cus.mf",
11714 FT_BOOLEAN, 8,
11715 TFS(&measurement_flag_tfs)((0 ? (const struct true_false_string*)0 : ((&measurement_flag_tfs
))))
, 0x80,
11716 "measurement flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11717 },
11718 /* 7.5.3.59 */
11719 { &hf_oran_meas_data_size,
11720 { "measDataSize", "oran_fh_cus.measDataSize",
11721 FT_UINT16, BASE_DEC,
11722 NULL((void*)0), 0x0,
11723 "measurement data size (in words)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11724 },
11725
11726 /* 7.5.3.58 */
11727 { &hf_oran_meas_type_id,
11728 { "measTypeId", "oran_fh_cus.measTypeId",
11729 FT_UINT8, BASE_DEC,
11730 VALS(meas_type_id_vals)((0 ? (const struct _value_string*)0 : ((meas_type_id_vals)))
)
, 0x7F,
11731 "measurement report type identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11732 },
11733 /* 7.5.3.66 */
11734 { &hf_oran_num_elements,
11735 { "numElements", "oran_fh_cus.numElements",
11736 FT_UINT8, BASE_DEC,
11737 NULL((void*)0), 0x0,
11738 "measurement report type identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11739 },
11740 /* 7.5.3.60 */
11741 { &hf_oran_ue_tae,
11742 { "ueTae", "oran_fh_cus.ueTae",
11743 FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
11744 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
11745 "UE Timing Advance Error", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11746 },
11747 /* 7.5.3.61 */
11748 { &hf_oran_ue_layer_power,
11749 { "ueLayerPower", "oran_fh_cus.ueLayerPower",
11750 FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
11751 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
11752 "UE Layer Power", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11753 },
11754
11755 /* 7.5.3.62 */
11756 { &hf_oran_ue_freq_offset,
11757 { "ueFreqOffset", "oran_fh_cus.ueFreqOffset",
11758 FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
11759 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
11760 "UE frequency offset", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11761 },
11762 /* 7.5.3.63 */
11763 { &hf_oran_ipn_power,
11764 { "ipnPower", "oran_fh_cus.ipnPower",
11765 FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
11766 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
11767 "Interference plus Noise power", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11768 },
11769 /* 7.5.3.64 */
11770 { &hf_oran_ant_dmrs_snr_val,
11771 { "antDmrsSnrVal", "oran_fh_cus.antDmrsSnrVal",
11772 FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
11773 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
11774 "antenna DMRS-SNR", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11775 },
11776
11777 { &hf_oran_measurement_command,
11778 { "Measurement Command", "oran_fh_cus.measurement-command",
11779 FT_STRING, BASE_NONE,
11780 NULL((void*)0), 0x0,
11781 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11782 },
11783
11784 /* 7.5.27.2 */
11785 { &hf_oran_beam_type,
11786 {"beamType", "oran_fh_cus.beamType",
11787 FT_UINT16, BASE_DEC,
11788 VALS(beam_type_vals)((0 ? (const struct _value_string*)0 : ((beam_type_vals)))), 0xc0,
11789 NULL((void*)0),
11790 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11791 },
11792 /* 7.5.3.65 */
11793 { &hf_oran_meas_cmd_size,
11794 {"measCmdSize", "oran_fh_cus.measCmdSize",
11795 FT_UINT16, BASE_DEC,
11796 NULL((void*)0), 0x0,
11797 "measurement command size in words",
11798 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11799 },
11800 /* 7.5.3.73 */
11801 { &hf_oran_curr_ue_freq_offset,
11802 { "currUeFreqOffset", "oran_fh_cus.currUeFreqOffset",
11803 FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
11804 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
11805 "Estimated UE frequency offset in current slot (Hz)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11806 },
11807
11808 { &hf_oran_symbol_reordering_layer,
11809 { "Layer", "oran_fh_cus.layer",
11810 FT_STRING, BASE_NONE,
11811 NULL((void*)0), 0x0,
11812 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11813 },
11814 { &hf_oran_dmrs_entry,
11815 { "Entry", "oran_fh_cus.dmrs-entry",
11816 FT_STRING, BASE_NONE,
11817 NULL((void*)0), 0x0,
11818 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11819 },
11820
11821 /* 7.7.29.3 */
11822 { &hf_oran_cd_scg_size,
11823 {"cdScgSize", "oran_fh_cus.cdScgSize",
11824 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
11825 RVALS(cd_scg_size_vals)((0 ? (const struct _range_string*)0 : ((cd_scg_size_vals)))), 0x0f,
11826 "Cyclic delay subcarrier group size",
11827 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11828 },
11829 /* 7.7.29.4 */
11830 { &hf_oran_cd_scg_phase_step,
11831 {"cdScgPhaseStep", "oran_fh_cus.cdScgPhaseStep",
11832 FT_INT8, BASE_DEC,
11833 NULL((void*)0), 0x0,
11834 "Cyclic delay subcarrier group phase step",
11835 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11836 },
11837
11838 { &hf_oran_sinr_prb,
11839 { "PRB", "oran_fh_cus.sinr.prb",
11840 FT_STRING, BASE_NONE,
11841 NULL((void*)0), 0x0,
11842 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11843 },
11844 /* 7.5.2.20 */
11845 { &hf_oran_oru_control_sinr_slot_mask_id,
11846 {"oruControlSinrSlotMaskId", "oran_fh_cus.oruControlSinrSlotMaskId",
11847 FT_UINT8, BASE_DEC,
11848 NULL((void*)0), 0x1f,
11849 "SINR time resolution",
11850 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11851 },
11852 /* 7.7.24.21 */
11853 { &hf_oran_pos_meas,
11854 {"posMeas", "oran_fh_cus.posMeas",
11855 FT_BOOLEAN, 8,
11856 TFS(&tfs_report_no_report_pos_meas)((0 ? (const struct true_false_string*)0 : ((&tfs_report_no_report_pos_meas
))))
, 0x40,
11857 "Positioning measurement report request",
11858 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11859 },
11860
11861 /* 7.5.3.69 */
11862 { &hf_oran_ue_radial_speed,
11863 {"ueRadialSpeed", "oran_fh_cus.ueRadialSpeed",
11864 FT_UINT16, BASE_DEC,
11865 NULL((void*)0), 0x0,
11866 "UE radial speed",
11867 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11868 },
11869 /* 7.5.3.70 */
11870 { &hf_oran_ue_az_aoa,
11871 {"ueAzAoa", "oran_fh_cus.ueAzAoa",
11872 FT_UINT16, BASE_DEC,
11873 NULL((void*)0), 0x0,
11874 "UE azimuth angle of arrival",
11875 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11876 },
11877 /* 7.5.3.71 */
11878 { &hf_oran_ue_ze_aoa,
11879 {"ueZeAoa", "oran_fh_cus.ueZeAoa",
11880 FT_UINT16, BASE_DEC,
11881 NULL((void*)0), 0x0,
11882 "UE zenith angle of arrival",
11883 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11884 },
11885 /* 7.5.3.72 */
11886 { &hf_oran_ue_pos_toa_offset,
11887 {"uePosToaOffset", "oran_fh_cus.uePosToaOffset",
11888 FT_UINT16, BASE_DEC,
11889 NULL((void*)0), 0x0,
11890 "UE positioning time of arrival offset",
11891 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11892 },
11893
11894 /* 7.7.30.2 */
11895 { &hf_oran_num_rep_ue,
11896 {"numRepUe", "oran_fh_cus.numRepUe",
11897 FT_UINT8, BASE_DEC,
11898 NULL((void*)0), 0x0f,
11899 "Number of UEs with PUSCH repetition",
11900 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11901 },
11902 /* 7.7.30.3 */
11903 { &hf_oran_rep_ueid,
11904 {"repUeId", "oran_fh_cus.repUeId",
11905 FT_UINT16, BASE_DEC,
11906 NULL((void*)0), 0x7fff,
11907 "UEId the PUSCH is part of",
11908 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11909 },
11910 /* 7.7.30.4 */
11911 { &hf_oran_is_last_rep,
11912 {"isLastRep", "oran_fh_cus.isLastRep",
11913 FT_BOOLEAN, 8,
11914 NULL((void*)0), 0x40,
11915 "Last transmission in the repetition",
11916 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11917 },
11918 /* 7.7.30.5 */
11919 { &hf_oran_rep_index,
11920 {"repIndex", "oran_fh_cus.repIndex",
11921 FT_UINT8, BASE_DEC,
11922 NULL((void*)0), 0x3f,
11923 "Repetition index of the PUSCH transmission",
11924 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11925 },
11926 /* 7.7.30.6 */
11927 { &hf_oran_num_reps,
11928 {"numReps", "oran_fh_cus.numReps",
11929 FT_UINT8, BASE_DEC,
11930 NULL((void*)0), 0x3f,
11931 "The number of total PUSCH repetitions",
11932 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11933 },
11934
11935 /* 7.7.31.2 */
11936 { &hf_oran_mcs_table,
11937 {"mcsTable", "oran_fh_cus.mcsTable",
11938 FT_UINT8, BASE_DEC,
11939 VALS(mcs_table_vals)((0 ? (const struct _value_string*)0 : ((mcs_table_vals)))), 0x0f,
11940 "MCS index table",
11941 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11942 },
11943 /* 7.7.31.3 */
11944 { &hf_oran_mcs_index,
11945 {"mcsIndex", "oran_fh_cus.mcsIndex",
11946 FT_UINT8, BASE_DEC,
11947 NULL((void*)0), 0x3f,
11948 "MCS index value",
11949 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11950 },
11951
11952 /* 7.7.33.3 */
11953 { &hf_oran_num_meas_req,
11954 {"numMeasReq", "oran_fh_cus.numMeasReq",
11955 FT_UINT8, BASE_DEC,
11956 NULL((void*)0), 0x1f,
11957 "Number of UEs for which meas is requested",
11958 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11959 },
11960 /* 7.7.32.5 */
11961 { &hf_oran_ue_rank,
11962 {"ueRank", "oran_fh_cus.ueRank",
11963 FT_UINT8, BASE_DEC,
11964 VALS(ue_rank_vals)((0 ? (const struct _value_string*)0 : ((ue_rank_vals)))), 0x0f,
11965 "Number of UE layers under evaluation",
11966 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11967 },
11968 /* 7.7.32.6 */
11969 { &hf_oran_num_of_ue_ant_ports,
11970 {"numOfUeAntPorts", "oran_fh_cus.numofUeAntPorts",
11971 FT_UINT8, BASE_DEC,
11972 VALS(num_of_ue_ant_ports_vals)((0 ? (const struct _value_string*)0 : ((num_of_ue_ant_ports_vals
))))
, 0xf0,
11973 "Used for the PUSCH tx under evaluation",
11974 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11975 },
11976 /* 7.7.32.8 */
11977 { &hf_oran_codebook_subset,
11978 {"codebookSubset", "oran_fh_cus.codebookSubset",
11979 FT_UINT8, BASE_DEC,
11980 VALS(codebook_subset_vals)((0 ? (const struct _value_string*)0 : ((codebook_subset_vals
))))
, 0xc0,
11981 "UE capability wrt ULTPMI sets",
11982 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11983 },
11984 /* 7.7.32.9 */
11985 { &hf_oran_full_pwr_mode,
11986 {"fullPwrMode", "oran_fh_cus.fullPwrMode",
11987 FT_UINT8, BASE_DEC,
11988 VALS(full_pwr_mode_vals)((0 ? (const struct _value_string*)0 : ((full_pwr_mode_vals))
))
, 0xc0,
11989 "Transmission mode",
11990 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11991 },
11992 /* 7.7.32.10 */
11993 { &hf_oran_full_pwr_mode_2_tpmi_group,
11994 {"fullPwrMode2TpmiGroup", "oran_fh_cus.fullPwrMode2TpmiGroup",
11995 FT_UINT16, BASE_HEX,
11996 NULL((void*)0), 0x3fff,
11997 "Capabilities",
11998 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11999 },
12000
12001 /* 7.5.3.75 */
12002 { &hf_oran_num_cand_ranks,
12003 {"numCandRanks", "oran_fh_cus.numCandRanks",
12004 FT_UINT8, BASE_DEC,
12005 NULL((void*)0), 0xf0,
12006 NULL((void*)0),
12007 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12008 },
12009 /* 7.5.3.76 */
12010 { &hf_oran_ue_pref_rank,
12011 {"uePrefRank", "oran_fh_cus.uePrefRank",
12012 FT_UINT8, BASE_DEC,
12013 NULL((void*)0), 0x0f,
12014 "Most optimal UL Tx rank for UE",
12015 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12016 },
12017 /* 7.5.3.77 */
12018 { &hf_oran_ue_tpmi_rank_y,
12019 {"ueTpmiRankY", "oran_fh_cus.ueTpmiRankY",
12020 FT_UINT8, BASE_DEC,
12021 NULL((void*)0), 0x0,
12022 "TPMI index for codebook-based PUSCH tx",
12023 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12024 },
12025 /* 7.5.3.78 */
12026 { &hf_oran_ue_tpmi_rank_y_sinr_lx,
12027 {"ueTpmiRankYSinrLX", "oran_fh_cus.ueTpmiRankYSinrLX",
12028 FT_UINT16, BASE_HEX | BASE_RANGE_STRING0x00000100,
12029 RVALS(ue_tmpi_rank_sinr_vals)((0 ? (const struct _range_string*)0 : ((ue_tmpi_rank_sinr_vals
))))
, 0x0,
12030 "Estimation of post-equalization SINR",
12031 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12032 },
12033 /* 7.5.3.79 */
12034 { &hf_oran_ue_layer_pre_eq_sinr,
12035 {"ueLayerPreEqSinr", "oran_fh_cus.ueLayerPreEqSinr",
12036 FT_UINT16, BASE_HEX,
12037 NULL((void*)0), 0x0,
12038 "Pre-equalization SINR of a UE layer",
12039 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12040 },
12041
12042 /* 7.7.33.3 */
12043 { &hf_oran_chan_type_sel,
12044 { "chanTypeSel", "oran_fh_cus.chanTypeSel",
12045 FT_UINT8, BASE_DEC,
12046 VALS(chan_type_sel_vals)((0 ? (const struct _value_string*)0 : ((chan_type_sel_vals))
))
, 0x03,
12047 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12048 },
12049
12050 /* 7.7.3.117 */
12051 { &hf_oran_srs_meas_port_mask,
12052 { "srsMeasPortMask", "oran_fh_cus.srsMeasPortMask",
12053 FT_UINT16, BASE_DEC,
12054 NULL((void*)0), 0xffff,
12055 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12056 },
12057 /* 7.7.3.106 */
12058 { &hf_oran_srs_ue_port_wb_power,
12059 { "srsUePortWbPower", "oran_fh_cus.srsUePortWbPower",
12060 FT_UINT16, BASE_DEC,
12061 NULL((void*)0), 0x0,
12062 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12063 },
12064 /* 7.7.3.107 */
12065 { &hf_oran_srs_ue_port_wb_sinr,
12066 { "srsUePortWbSinr", "oran_fh_cus.srsUePortWbSinr",
12067 FT_UINT16, BASE_DEC,
12068 NULL((void*)0), 0x0,
12069 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12070 },
12071
12072 /* 7.5.3.80 */
12073 { &hf_oran_srsRbgSize,
12074 { "srsRbgSize", "oran_fh_cus.srsRbgSize",
12075 FT_UINT8, BASE_DEC,
12076 VALS(srs_rbg_size_vals)((0 ? (const struct _value_string*)0 : ((srs_rbg_size_vals)))
)
, 0xc0,
12077 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12078 },
12079 /* 7.5.3.81 */
12080 { &hf_oran_srsNumRbg,
12081 { "srsNumRbg", "oran_fh_cus.srsNumRbg",
12082 FT_UINT8, BASE_DEC,
12083 NULL((void*)0), 0x0,
12084 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12085 },
12086 /* 7.5.3.82 */
12087 { &hf_oran_srsTxComb,
12088 { "srsTxComb", "oran_fh_cus.srsTxComb",
12089 FT_UINT8, BASE_DEC,
12090 VALS(srs_tx_comb_vals)((0 ? (const struct _value_string*)0 : ((srs_tx_comb_vals)))), 0xe0,
12091 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12092 },
12093 /* 7.5.3.83 */
12094 { &hf_oran_srsSymId,
12095 { "srsSymId", "oran_fh_cus.srsSymId",
12096 FT_UINT8, BASE_DEC,
12097 NULL((void*)0), 0x0f,
12098 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12099 },
12100 /* 7.5.3.84 */
12101 { &hf_oran_srsNumUe,
12102 { "srsNumUe", "oran_fh_cus.srsNumUe",
12103 FT_UINT8, BASE_DEC,
12104 NULL((void*)0), 0x3f,
12105 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12106 },
12107
12108
12109 { &hf_oran_c_section_common,
12110 { "Common Section", "oran_fh_cus.c-plane.section.common",
12111 FT_STRING, BASE_NONE,
12112 NULL((void*)0), 0x0,
12113 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12114 },
12115 { &hf_oran_c_section,
12116 { "Section", "oran_fh_cus.c-plane.section",
12117 FT_STRING, BASE_NONE,
12118 NULL((void*)0), 0x0,
12119 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12120 },
12121 { &hf_oran_u_section,
12122 { "Section", "oran_fh_cus.u-plane.section",
12123 FT_STRING, BASE_NONE,
12124 NULL((void*)0), 0x0,
12125 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12126 },
12127
12128 { &hf_oran_u_total_power,
12129 { "Mean Power", "oran_fh_cus.power",
12130 FT_FLOAT, BASE_NONE|BASE_UNIT_STRING0x00001000,
12131 UNS(&units_decibelfs)((0 ? (const struct unit_name_string*)0 : ((&units_decibelfs
))))
, 0x0,
12132 "Average power of whole section (dBFS)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12133 },
12134
12135 { &hf_oran_u_peak_power,
12136 { "PAPR", "oran_fh_cus.papr",
12137 FT_FLOAT, BASE_NONE|BASE_UNIT_STRING0x00001000,
12138 UNS(&units_decibels)((0 ? (const struct unit_name_string*)0 : ((&units_decibels
))))
, 0x0,
12139 "Peak-to-average power ratio (dB)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12140 },
12141
12142 { &hf_oran_u_prb_power,
12143 { "PRB Mean Power", "oran_fh_cus.prbpower",
12144 FT_FLOAT, BASE_NONE|BASE_UNIT_STRING0x00001000,
12145 UNS(&units_decibelfs)((0 ? (const struct unit_name_string*)0 : ((&units_decibelfs
))))
, 0x0,
12146 "Average power of PRB (dBFS)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12147 },
12148
12149 /* Link back to UL C-plane where udCompHdr was recorded */
12150 { &hf_oran_ul_cplane_ud_comp_hdr_frame,
12151 { "C-Plane UL udCompHdr frame", "oran_fh_cus.ul-cplane.udCompHdr",
12152 FT_FRAMENUM, BASE_NONE,
12153 FRAMENUM_TYPE(FT_FRAMENUM_REQUEST)((gpointer) (glong) (FT_FRAMENUM_REQUEST)), 0x0,
12154 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12155 },
12156 { &hf_oran_delta_to_expected_ul_symbol_time,
12157 { "Delta to expected UL symbol time", "oran_fh_cus.delta-expected-ul-symbol-time",
12158 FT_INT32, BASE_DEC,
12159 NULL((void*)0), 0x0,
12160 "usec difference vs time predicted by first symbol timing and configurable duration", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12161 },
12162 { &hf_oran_delta_to_expected_dl_symbol_time,
12163 { "Delta to expected DL symbol time", "oran_fh_cus.delta-expected-dl-symbol-time",
12164 FT_INT32, BASE_DEC,
12165 NULL((void*)0), 0x0,
12166 "Difference vs time predicted by first symbol timing and configurable duration", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12167 },
12168
12169 /* For ext11, where was a beamId (last) defined? */
12170 { &hf_oran_bfws_frame_defined,
12171 { "Beam defined in frame", "oran_fh_cus.bfw-defined",
12172 FT_FRAMENUM, BASE_NONE,
12173 FRAMENUM_TYPE(FT_FRAMENUM_RETRANS_PREV)((gpointer) (glong) (FT_FRAMENUM_RETRANS_PREV)), 0x0,
12174 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12175 },
12176 { &hf_oran_bfws_symbols_since_defined,
12177 { "Symbols since BFWs defined", "oran_fh_cus.symbols-since-bfw-defined",
12178 FT_UINT32, BASE_DEC,
12179 NULL((void*)0), 0x0,
12180 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12181 },
12182
12183 /* Corresponding C-plane frame for DL U-plane */
12184 { &hf_oran_corresponding_cplane_frame,
12185 { "C-plane frame", "oran_fh_cus.cplane-frame",
12186 FT_FRAMENUM, BASE_NONE,
12187 FRAMENUM_TYPE(FT_FRAMENUM_REQUEST)((gpointer) (glong) (FT_FRAMENUM_REQUEST)), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12188 },
12189 /* Time since corresponding C-plane frame for U-plane */
12190 { &hf_oran_corresponding_cplane_frame_time_delta,
12191 { "Time since C-plane frame", "oran_fh_cus.cplane-frame-time-delta",
12192 FT_UINT64, BASE_DEC, NULL((void*)0), 0x0,
12193 "Microseconds since C-plane frame", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12194 },
12195 /* Corresponding U-plane frame for C-plane */
12196 { &hf_oran_corresponding_uplane_frame,
12197 { "U-plane frame", "oran_fh_cus.uplane-frame",
12198 FT_FRAMENUM, BASE_NONE,
12199 FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE)((gpointer) (glong) (FT_FRAMENUM_RESPONSE)), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12200 },
12201 { &hf_oran_corresponding_uplane_frames_total,
12202 { "U-plane frames total", "oran_fh_cus.u-plane-frames-total",
12203 FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
12204 "Number of corresponding U-plane frames", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12205 },
12206
12207 /* Reassembly */
12208 { &hf_oran_fragment,
12209 { "Fragment", "oran_fh_cus.fragment", FT_FRAMENUM, BASE_NONE,
12210 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12211 { &hf_oran_fragments,
12212 { "Fragments", "oran_fh_cus.fragments", FT_BYTES, BASE_NONE,
12213 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12214 { &hf_oran_fragment_overlap,
12215 { "Fragment overlap", "oran_fh_cus.fragment.overlap", FT_BOOLEAN, BASE_NONE,
12216 NULL((void*)0), 0x0, "Fragment overlaps with other fragments", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12217 { &hf_oran_fragment_overlap_conflict,
12218 { "Conflicting data in fragment overlap", "oran_fh_cus.fragment.overlap.conflict",
12219 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x0,
12220 "Overlapping fragments contained conflicting data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12221 { &hf_oran_fragment_multiple_tails,
12222 { "Multiple tail fragments found", "oran_fh_cus.fragment.multipletails",
12223 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x0,
12224 "Several tails were found when defragmenting the packet", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12225 { &hf_oran_fragment_too_long_fragment,
12226 { "Fragment too long", "oran_fh_cus.fragment.toolongfragment",
12227 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x0,
12228 "Fragment contained data past end of packet", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12229 { &hf_oran_fragment_error,
12230 { "Defragmentation error", "oran_fh_cus.fragment.error", FT_FRAMENUM, BASE_NONE,
12231 NULL((void*)0), 0x0, "Defragmentation error due to illegal fragments", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12232 { &hf_oran_fragment_count,
12233 { "Fragment count", "oran_fh_cus.fragment.count", FT_UINT32, BASE_DEC,
12234 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12235 { &hf_oran_reassembled_in,
12236 { "Reassembled payload in frame", "oran_fh_cus.reassembled_in", FT_FRAMENUM, BASE_NONE,
12237 NULL((void*)0), 0x0, "This payload packet is reassembled in this frame", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12238 { &hf_oran_reassembled_length,
12239 { "Reassembled payload length", "oran_fh_cus.reassembled.length", FT_UINT32, BASE_DEC,
12240 NULL((void*)0), 0x0, "The total length of the reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12241 { &hf_oran_reassembled_data,
12242 { "Reassembled data", "oran_fh_cus.reassembled.data", FT_BYTES, BASE_NONE,
12243 NULL((void*)0), 0x0, "The reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12244
12245 { &hf_oran_payload,
12246 { "Payload", "oran_fh_cus.payload", FT_BYTES, BASE_SHOW_ASCII_PRINTABLE0x00010000,
12247 NULL((void*)0), 0x0, "Complete or reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }}
12248 };
12249
12250 /* Setup protocol subtree array */
12251 static int *ett[] = {
12252 &ett_oran,
12253 &ett_oran_ecpri_pcid,
12254 &ett_oran_ecpri_rtcid,
12255 &ett_oran_ecpri_seqid,
12256 &ett_oran_section_type,
12257 &ett_oran_u_timing,
12258 &ett_oran_u_section,
12259 &ett_oran_u_prb,
12260 &ett_oran_section,
12261 &ett_oran_iq,
12262 &ett_oran_bfw_bundle,
12263 &ett_oran_bfw,
12264 &ett_oran_frequency_range,
12265 &ett_oran_prb_cisamples,
12266 &ett_oran_cisample,
12267 &ett_oran_udcomphdr,
12268 &ett_oran_udcompparam,
12269 &ett_oran_cicomphdr,
12270 &ett_oran_cicompparam,
12271 &ett_oran_bfwcomphdr,
12272 &ett_oran_bfwcompparam,
12273 &ett_oran_ext19_port,
12274 &ett_oran_prb_allocation,
12275 &ett_oran_punc_pattern,
12276 &ett_oran_bfacomphdr,
12277 &ett_oran_modcomp_param_set,
12278 &ett_oran_st4_cmd_header,
12279 &ett_oran_st4_cmd,
12280 &ett_oran_sym_prb_pattern,
12281 &ett_oran_measurement_report,
12282 &ett_oran_measurement_command,
12283 &ett_oran_sresmask,
12284 &ett_oran_c_section_common,
12285 &ett_oran_c_section,
12286 &ett_oran_remask,
12287 &ett_oran_mc_scale_remask,
12288 &ett_oran_symbol_reordering_layer,
12289 &ett_oran_dmrs_entry,
12290 &ett_oran_dmrs_symbol_mask,
12291 &ett_oran_symbol_mask,
12292 &ett_oran_active_beamspace_coefficient_mask,
12293 &ett_oran_sinr_prb,
12294 &ett_oran_rbgMask,
12295 &ett_oran_se10_port,
12296
12297 &ett_oran_fragment,
12298 &ett_oran_fragments
12299 };
12300
12301 /* Separate subtree array for extensions. Used with [ext-1] */
12302 static int *ext_ett[HIGHEST_EXTTYPE35];
12303 for (unsigned extno=0; extno<HIGHEST_EXTTYPE35; extno++) {
12304 ext_ett[extno] = &ett_oran_c_section_extension[extno];
12305 }
12306
12307 expert_module_t* expert_oran;
12308
12309 static ei_register_info ei[] = {
12310 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12311 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12312 { &ei_oran_reserved_numBundPrb, { "oran_fh_cus.reserved_numBundPrb", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "Reserved value 0 for numBundPrb seen - not valid", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12313 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12314 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12315 { &ei_oran_extlen_zero, { "oran_fh_cus.extlen_zero", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "extlen value of 0 is reserved", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12316 { &ei_oran_rbg_size_reserved, { "oran_fh_cus.rbg_size_reserved", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "rbgSize value of 0 is reserved", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12317 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12318 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12319 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12320 { &ei_oran_st8_nackid, { "oran_fh_cus.st8_nackid", PI_SEQUENCE0x02000000, PI_WARN0x00600000, "operation for this ackId failed", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12321 { &ei_oran_st4_no_cmds, { "oran_fh_cus.st4_nackid", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "Not valid for ST4 to carry no commands", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12322 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12323 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12324 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12325 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12326 { &ei_oran_se10_unknown_beamgrouptype, { "oran_fh_cus.se10_unknown_beamgrouptype", PI_MALFORMED0x07000000, PI_WARN0x00600000, "SE10 - unknown BeamGroupType value", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12327 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12328 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12329 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12330 { &ei_oran_unhandled_se, { "oran_fh_cus.se_not_handled", PI_UNDECODED0x05000000, PI_WARN0x00600000, "SE not recognised/handled by dissector", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12331 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12332 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12333 { &ei_oran_version_unsupported, { "oran_fh_cus.version_unsupported", PI_UNDECODED0x05000000, PI_WARN0x00600000, "Protocol version unsupported", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12334 { &ei_oran_laa_msg_type_unsupported, { "oran_fh_cus.laa_msg_type_unsupported", PI_UNDECODED0x05000000, PI_WARN0x00600000, "laaMsgType unsupported", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12335 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12336 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12337 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12338 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12339 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12340 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12341 { &ei_oran_udcomphdr_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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12342 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12343 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12344 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12345 { &ei_oran_unexpected_measTypeId, { "oran_fh_cus.unexpected_meastypeid", PI_MALFORMED0x07000000, PI_WARN0x00600000, "unexpected measTypeId", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12346 { &ei_oran_unsupported_compression_method, { "oran_fh_cus.compression_type_unsupported", PI_UNDECODED0x05000000, PI_WARN0x00600000, "Unsupported compression type", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12347 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12348 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12349 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12350 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12351 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12352 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12353 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12354 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12355 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12356 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12357 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12358 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12359 { &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, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12360 { &ei_oran_reserved_not_zero, { "oran_fh_cus.reserved_not_zero", PI_MALFORMED0x07000000, PI_WARN0x00600000, "Reserved field is not zero", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12361 { &ei_oran_too_many_symbols, { "oran_fh_cus.too_many_symbols", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "Range of symbols in slot exceeds 14", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12362 { &ei_oran_se30_not_ul, { "oran_fh_cus.se30_not_ul", PI_MALFORMED0x07000000, PI_WARN0x00600000, "SE30 should only be sent in uplink direction", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12363 { &ei_oran_se30_unknown_ueid, { "oran_fh_cus.se30_unknown_ue", PI_MALFORMED0x07000000, PI_WARN0x00600000, "SE30 UEId not recognised from SE10", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12364 { &ei_oran_beamid_bfws_not_found, { "oran_fh_cus.beamid_bfws_not_found", PI_SEQUENCE0x02000000, PI_WARN0x00600000, "Have bundle with disableBFWs but no definition found", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12365 { &ei_oran_syminc_set_for_uplane, { "oran_fh_cus.syminc_set_for_uplane", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "symInc is prohibited in the U-Plane", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12366 { &ei_oran_cplane_entry_not_found, { "oran_fh_cus.cplane_entry_not_found", PI_SEQUENCE0x02000000, PI_WARN0x00600000, "C-plane for this U-plane section not found", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12367 { &ei_oran_se12_rb_set, { "oran_fh_cus.se12_rb_set", PI_MALFORMED0x07000000, PI_WARN0x00600000, "rb should not be set when SE12 is present", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12368 { &ei_oran_se5_re_mask_bits_not_covered, { "oran_fh_cus.se5_re_mask_bits_not_covered", PI_MALFORMED0x07000000, PI_WARN0x00600000, "section reMask bits not covered by SE5 sets", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12369 { &ei_oran_se5_re_mask_bit_repeated, { "oran_fh_cus.se5_re_mask_bits_repeated", PI_MALFORMED0x07000000, PI_WARN0x00600000, "SE5 sets repeat bits", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12370 { &ei_oran_se5_re_mask_bit_not_in_re_mask, { "oran_fh_cus.se5_re_mask_bit_not_in_re_mask", PI_MALFORMED0x07000000, PI_WARN0x00600000, "SE5 set has bit not in section reMask", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
12371 { &ei_oran_se5_re_zero_re_mask, { "oran_fh_cus.se5_re_mask_zero", PI_MALFORMED0x07000000, PI_WARN0x00600000, "SE5 set has zero reMask", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}}
12372 };
12373
12374
12375 /* Register the protocol name and description */
12376 proto_oran = proto_register_protocol("O-RAN Fronthaul CUS", "O-RAN FH CUS", "oran_fh_cus");
12377
12378 /* Allow dissector to find be found by name. */
12379 register_dissector("oran_fh_cus", dissect_oran, proto_oran);
12380
12381 /* Dissector table so dissectors for non-standard Section Extension can register by exttype */
12382 oran_sectionextension_table = register_dissector_table("oran.sectionextension",
12383 "O-RAN non-standard Section Extension (by exttype)",
12384 proto_oran, FT_UINT8, BASE_DEC);
12385
12386 /* Register the tap name. */
12387 oran_tap = register_tap("oran-fh-cus");
12388 oran_bfws_tap = register_tap("oran_bfws");
12389
12390
12391 /* Required function calls to register the header fields and subtrees */
12392 proto_register_field_array(proto_oran, hf, array_length(hf)(sizeof (hf) / sizeof (hf)[0]));
12393 proto_register_subtree_array(ett, array_length(ett)(sizeof (ett) / sizeof (ett)[0]));
12394 proto_register_subtree_array(ext_ett, array_length(ext_ett)(sizeof (ext_ett) / sizeof (ext_ett)[0]));
12395
12396 expert_oran = expert_register_protocol(proto_oran);
12397 expert_register_field_array(expert_oran, ei, array_length(ei)(sizeof (ei) / sizeof (ei)[0]));
12398
12399
12400 /* Preferences */
12401 module_t * oran_module = prefs_register_protocol(proto_oran, NULL((void*)0));
12402
12403 /* Register bit width/compression preferences separately by direction. */
12404 prefs_register_uint_preference(oran_module, "oran.du_port_id_bits", "DU Port ID bits [a]",
12405 "The bit width of DU Port ID - sum of a,b,c&d (eAxC) must be 16", 10, &pref_du_port_id_bits);
12406 prefs_register_uint_preference(oran_module, "oran.bandsector_id_bits", "BandSector ID bits [b]",
12407 "The bit width of BandSector ID - sum of a,b,c&d (eAxC) must be 16", 10, &pref_bandsector_id_bits);
12408 prefs_register_uint_preference(oran_module, "oran.cc_id_bits", "CC ID bits [c]",
12409 "The bit width of CC ID - sum of a,b,c&d (eAxC) must be 16", 10, &pref_cc_id_bits);
12410 prefs_register_uint_preference(oran_module, "oran.ru_port_id_bits", "RU Port ID bits [d]",
12411 "The bit width of RU Port ID - sum of a,b,c&d (eAxC) must be 16", 10, &pref_ru_port_id_bits);
12412
12413 /* Uplink userplane */
12414 prefs_register_static_text_preference(oran_module, "oran.ul", "", "");
12415 prefs_register_uint_preference(oran_module, "oran.iq_bitwidth_up", "IQ Bitwidth Uplink",
12416 "The bit width of a sample in the Uplink (if no udcompHdr and no C-Plane)", 10, &pref_sample_bit_width_uplink);
12417 prefs_register_enum_preference(oran_module, "oran.ud_comp_up", "Uplink User Data Compression",
12418 "Uplink User Data Compression (if no udcompHdr and no C-Plane)", &pref_iqCompressionUplink, ul_compression_options, false0);
12419 prefs_register_enum_preference(oran_module, "oran.ud_comp_hdr_up", "udCompHdr field is present for uplink",
12420 "The udCompHdr field in U-Plane messages may or may not be present, depending on the "
12421 "configuration of the O-RU. This preference instructs the dissector to expect "
12422 "this field to be present in uplink messages",
12423 &pref_includeUdCompHeaderUplink, udcomphdr_present_options, false0);
12424 prefs_register_bool_preference(oran_module, "oran.ignore_cplane_ul_udcomphdr", "Ignore UL compression settings from C-plane",
12425 "When set, override udCompHdr from UL C-Plane with compression method and width configured here", &pref_override_ul_compression);
12426 prefs_register_uint_preference(oran_module, "oran.ul_slot_us_limit", "Microseconds allowed for UL tx in symbol",
12427 "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",
12428 10, &us_allowed_for_ul_in_symbol);
12429
12430 /* Downlink userplane */
12431 prefs_register_static_text_preference(oran_module, "oran.dl", "", "");
12432 prefs_register_uint_preference(oran_module, "oran.iq_bitwidth_down", "IQ Bitwidth Downlink",
12433 "The bit width of a sample in the Downlink (if no udcompHdr)", 10, &pref_sample_bit_width_downlink);
12434 prefs_register_enum_preference(oran_module, "oran.ud_comp_down", "Downlink User Data Compression",
12435 "Downlink User Data Compression", &pref_iqCompressionDownlink, dl_compression_options, false0);
12436 prefs_register_enum_preference(oran_module, "oran.ud_comp_hdr_down", "udCompHdr field is present for downlink",
12437 "The udCompHdr field in U-Plane messages may or may not be present, depending on the "
12438 "configuration of the O-RU. This preference instructs the dissector to expect "
12439 "this field to be present in downlink messages",
12440 &pref_includeUdCompHeaderDownlink, udcomphdr_present_options, false0);
12441
12442 /* SINR */
12443 prefs_register_static_text_preference(oran_module, "oran.sinr", "", "");
12444 prefs_register_uint_preference(oran_module, "oran.iq_bitwidth_sinr", "IQ Bitwidth SINR",
12445 "The bit width of a sample in SINR", 10, &pref_sample_bit_width_sinr);
12446 prefs_register_enum_preference(oran_module, "oran.ud_comp_sinr", "SINR Compression",
12447 "SINR Compression", &pref_iqCompressionSINR, ul_compression_options, false0);
12448
12449 /* BF-related */
12450 prefs_register_static_text_preference(oran_module, "oran.bf", "", "");
12451 prefs_register_uint_preference(oran_module, "oran.num_bf_antennas", "Number of beam weights",
12452 "Number of array elements that BF weights will be provided for", 10, &pref_num_bf_antennas);
12453 prefs_register_obsolete_preference(oran_module, "oran.num_weights_per_bundle");
12454 prefs_register_obsolete_preference(oran_module, "oran.num_bf_weights");
12455 prefs_register_bool_preference(oran_module, "oran.st6_4byte_alignment_required", "Use 4-byte alignment for ST6 sections",
12456 "Default is 1-byte alignment", &st6_4byte_alignment);
12457
12458 /* Misc (and will seldom need to be accessed) */
12459 prefs_register_static_text_preference(oran_module, "oran.misc", "", "");
12460 prefs_register_bool_preference(oran_module, "oran.show_iq_samples", "Show IQ Sample values",
12461 "When enabled, for U-Plane frames show each I and Q value in PRB", &pref_showIQSampleValues);
12462 prefs_register_enum_preference(oran_module, "oran.support_udcomplen", "udCompLen supported",
12463 "When enabled, U-Plane messages with relevant compression schemes will include udCompLen",
12464 &pref_support_udcompLen, udcomplen_support_options, false0);
12465 prefs_register_uint_preference(oran_module, "oran.rbs_in_uplane_section", "Total RBs in User-Plane data section",
12466 "This is used if numPrbu is signalled as 0", 10, &pref_data_plane_section_total_rbs);
12467 prefs_register_bool_preference(oran_module, "oran.unscaled_iq", "Show unscaled I/Q values",
12468 "", &show_unscaled_values);
12469 prefs_register_bool_preference(oran_module, "oran.attempt_reassembly",
12470 "Attempt Radio Transport layer reassembly", "",
12471 &do_radio_transport_layer_reassembly);
12472 prefs_register_obsolete_preference(oran_module, "oran.k_antenna_ports");
12473 prefs_register_uint_preference(oran_module, "oran.symbol_time", "Symbol duration in us",
12474 "e.g., 36us for 100MHz, Mu=1", 10, &pref_symbol_time);
12475
12476 prefs_register_bool_preference(oran_module, "oran.link_planes",
12477 "Link C-plane and U-plane using sectionId", "",
12478 &link_planes_together);
12479
12480
12481
12482
12483 flow_states_table = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
12484 flow_results_table = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
12485 ul_symbol_timing = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
12486
12487 dl_beam_ids_defined = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
12488 dl_beam_ids_results = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
12489
12490 register_init_routine(&oran_init_protocol);
12491
12492 /* Register reassembly table. */
12493 reassembly_table_register(&oran_reassembly_table,
12494 &oran_reassembly_table_functions);
12495}
12496
12497/*
12498* Editor modelines - http://www.wireshark.org/tools/modelines.html
12499*
12500* Local Variables:
12501* c-basic-offset: 4
12502* tab-width: 8
12503* indent-tabs-mode: nil
12504* End:
12505*
12506* ex: set shiftwidth=4 tabstop=8 expandtab:
12507* :indentSize=4:tabSize=8:noTabs=true:
12508*/