Bug Summary

File:builds/wireshark/wireshark/epan/dissectors/packet-oran.c
Warning:line 2845, 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-11-27-100335-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;
60
61static int hf_oran_du_port_id;
62static int hf_oran_bandsector_id;
63static int hf_oran_cc_id;
64static int hf_oran_ru_port_id;
65static int hf_oran_sequence_id;
66static int hf_oran_e_bit;
67static int hf_oran_subsequence_id;
68static int hf_oran_previous_frame;
69
70static int hf_oran_data_direction;
71static int hf_oran_payload_version;
72static int hf_oran_filter_index;
73static int hf_oran_frame_id;
74static int hf_oran_subframe_id;
75static int hf_oran_slot_id;
76static int hf_oran_slot_within_frame;
77static int hf_oran_start_symbol_id;
78static int hf_oran_numberOfSections;
79static int hf_oran_sectionType;
80
81static int hf_oran_udCompHdr;
82static int hf_oran_udCompHdrIqWidth;
83static int hf_oran_udCompHdrIqWidth_pref;
84static int hf_oran_udCompHdrMeth;
85static int hf_oran_udCompHdrMeth_pref;
86static int hf_oran_udCompLen;
87static int hf_oran_numberOfUEs;
88static int hf_oran_timeOffset;
89static int hf_oran_frameStructure_fft;
90static int hf_oran_frameStructure_subcarrier_spacing;
91static int hf_oran_cpLength;
92static int hf_oran_timing_header;
93static int hf_oran_section_id;
94static int hf_oran_rb;
95static int hf_oran_symInc;
96static int hf_oran_startPrbc;
97static int hf_oran_reMask_re1;
98static int hf_oran_reMask_re2;
99static int hf_oran_reMask_re3;
100static int hf_oran_reMask_re4;
101static int hf_oran_reMask_re5;
102static int hf_oran_reMask_re6;
103static int hf_oran_reMask_re7;
104static int hf_oran_reMask_re8;
105static int hf_oran_reMask_re9;
106static int hf_oran_reMask_re10;
107static int hf_oran_reMask_re11;
108static int hf_oran_reMask_re12;
109static int hf_oran_reMask;
110static int hf_oran_numPrbc;
111static int hf_oran_numSymbol;
112static int hf_oran_ef;
113static int hf_oran_beamId;
114
115static int hf_oran_sinrCompHdrIqWidth_pref;
116static int hf_oran_sinrCompHdrMeth_pref;
117
118static int hf_oran_ciCompHdr;
119static int hf_oran_ciCompHdrIqWidth;
120static int hf_oran_ciCompHdrMeth;
121static int hf_oran_ciCompOpt;
122
123static int hf_oran_extension;
124static int hf_oran_exttype;
125static int hf_oran_extlen;
126
127static int hf_oran_bfw_bundle;
128static int hf_oran_bfw_bundle_id;
129static int hf_oran_bfw;
130static int hf_oran_bfw_i;
131static int hf_oran_bfw_q;
132
133static int hf_oran_ueId;
134static int hf_oran_freqOffset;
135static int hf_oran_regularizationFactor;
136static int hf_oran_laaMsgType;
137static int hf_oran_laaMsgLen;
138static int hf_oran_lbtHandle;
139static int hf_oran_lbtDeferFactor;
140static int hf_oran_lbtBackoffCounter;
141static int hf_oran_lbtOffset;
142static int hf_oran_MCOT;
143static int hf_oran_lbtMode;
144static int hf_oran_sfnSfEnd;
145static int hf_oran_lbtPdschRes;
146static int hf_oran_sfStatus;
147static int hf_oran_initialPartialSF;
148static int hf_oran_lbtDrsRes;
149static int hf_oran_lbtBufErr;
150static int hf_oran_lbtTrafficClass;
151static int hf_oran_lbtCWConfig_H;
152static int hf_oran_lbtCWConfig_T;
153static int hf_oran_lbtCWR_Rst;
154
155static int hf_oran_reserved;
156static int hf_oran_reserved_1bit;
157static int hf_oran_reserved_2bits;
158static int hf_oran_reserved_3bits;
159static int hf_oran_reserved_4bits;
160static int hf_oran_reserved_last_4bits;
161static int hf_oran_reserved_last_5bits;
162static int hf_oran_reserved_6bits;
163static int hf_oran_reserved_last_6bits;
164static int hf_oran_reserved_7bits;
165static int hf_oran_reserved_last_7bits;
166static int hf_oran_reserved_8bits;
167static int hf_oran_reserved_16bits;
168static int hf_oran_reserved_15bits;
169static int hf_oran_reserved_bit1;
170static int hf_oran_reserved_bit2;
171static int hf_oran_reserved_bit3;
172static int hf_oran_reserved_bit4;
173static int hf_oran_reserved_bit5;
174static int hf_oran_reserved_bits123;
175static int hf_oran_reserved_bits1234;
176static int hf_oran_reserved_bits456;
177
178static int hf_oran_bundle_offset;
179static int hf_oran_cont_ind;
180
181static int hf_oran_bfwCompHdr;
182static int hf_oran_bfwCompHdr_iqWidth;
183static int hf_oran_bfwCompHdr_compMeth;
184static int hf_oran_symbolId;
185static int hf_oran_startPrbu;
186static int hf_oran_numPrbu;
187
188static int hf_oran_udCompParam;
189static int hf_oran_sReSMask;
190static int hf_oran_sReSMask_re12;
191static int hf_oran_sReSMask_re11;
192static int hf_oran_sReSMask_re10;
193static int hf_oran_sReSMask_re9;
194static int hf_oran_sReSMask_re8;
195static int hf_oran_sReSMask_re7;
196static int hf_oran_sReSMask_re6;
197static int hf_oran_sReSMask_re5;
198static int hf_oran_sReSMask_re4;
199static int hf_oran_sReSMask_re3;
200static int hf_oran_sReSMask_re2;
201static int hf_oran_sReSMask_re1;
202
203static int hf_oran_sReSMask1;
204static int hf_oran_sReSMask2;
205static int hf_oran_sReSMask1_2_re12;
206static int hf_oran_sReSMask1_2_re11;
207static int hf_oran_sReSMask1_2_re10;
208static int hf_oran_sReSMask1_2_re9;
209
210static int hf_oran_bfwCompParam;
211
212static int hf_oran_iSample;
213static int hf_oran_qSample;
214
215static int hf_oran_ciCompParam;
216
217static int hf_oran_blockScaler;
218static int hf_oran_compBitWidth;
219static int hf_oran_compShift;
220
221static int hf_oran_active_beamspace_coefficient_n1;
222static int hf_oran_active_beamspace_coefficient_n2;
223static int hf_oran_active_beamspace_coefficient_n3;
224static int hf_oran_active_beamspace_coefficient_n4;
225static int hf_oran_active_beamspace_coefficient_n5;
226static int hf_oran_active_beamspace_coefficient_n6;
227static int hf_oran_active_beamspace_coefficient_n7;
228static int hf_oran_active_beamspace_coefficient_n8;
229static int hf_oran_activeBeamspaceCoefficientMask;
230static int hf_oran_activeBeamspaceCoefficientMask_bits_set;
231
232static int hf_oran_se6_repetition;
233
234static int hf_oran_rbgSize;
235static int hf_oran_rbgMask;
236static int hf_oran_noncontig_priority;
237
238static int hf_oran_symbol_mask;
239static int hf_oran_symbol_mask_s13;
240static int hf_oran_symbol_mask_s12;
241static int hf_oran_symbol_mask_s11;
242static int hf_oran_symbol_mask_s10;
243static int hf_oran_symbol_mask_s9;
244static int hf_oran_symbol_mask_s8;
245static int hf_oran_symbol_mask_s7;
246static int hf_oran_symbol_mask_s6;
247static int hf_oran_symbol_mask_s5;
248static int hf_oran_symbol_mask_s4;
249static int hf_oran_symbol_mask_s3;
250static int hf_oran_symbol_mask_s2;
251static int hf_oran_symbol_mask_s1;
252static int hf_oran_symbol_mask_s0;
253
254static int hf_oran_rbg_mask_27;
255static int hf_oran_rbg_mask_26;
256static int hf_oran_rbg_mask_25;
257static int hf_oran_rbg_mask_24;
258static int hf_oran_rbg_mask_23;
259static int hf_oran_rbg_mask_22;
260static int hf_oran_rbg_mask_21;
261static int hf_oran_rbg_mask_20;
262static int hf_oran_rbg_mask_19;
263static int hf_oran_rbg_mask_18;
264static int hf_oran_rbg_mask_17;
265static int hf_oran_rbg_mask_16;
266static int hf_oran_rbg_mask_15;
267static int hf_oran_rbg_mask_14;
268static int hf_oran_rbg_mask_13;
269static int hf_oran_rbg_mask_12;
270static int hf_oran_rbg_mask_11;
271static int hf_oran_rbg_mask_10;
272static int hf_oran_rbg_mask_9;
273static int hf_oran_rbg_mask_8;
274static int hf_oran_rbg_mask_7;
275static int hf_oran_rbg_mask_6;
276static int hf_oran_rbg_mask_5;
277static int hf_oran_rbg_mask_4;
278static int hf_oran_rbg_mask_3;
279static int hf_oran_rbg_mask_2;
280static int hf_oran_rbg_mask_1;
281static int hf_oran_rbg_mask_0;
282
283static int hf_oran_exponent;
284static int hf_oran_iq_user_data;
285
286static int hf_oran_disable_bfws;
287static int hf_oran_rad;
288static int hf_oran_num_bund_prbs;
289static int hf_oran_beam_id;
290static int hf_oran_num_weights_per_bundle;
291
292static int hf_oran_ack_nack_req_id;
293
294static int hf_oran_frequency_range;
295static int hf_oran_off_start_prb;
296static int hf_oran_num_prb;
297
298static int hf_oran_samples_prb;
299static int hf_oran_ciSample;
300static int hf_oran_ciIsample;
301static int hf_oran_ciQsample;
302
303static int hf_oran_se10_port;
304static int hf_oran_beamGroupType;
305static int hf_oran_numPortc;
306
307static int hf_oran_csf;
308static int hf_oran_modcompscaler;
309
310static int hf_oran_modcomp_param_set;
311static int hf_oran_mc_scale_re_mask_re1;
312static int hf_oran_mc_scale_re_mask_re2;
313static int hf_oran_mc_scale_re_mask_re3;
314static int hf_oran_mc_scale_re_mask_re4;
315static int hf_oran_mc_scale_re_mask_re5;
316static int hf_oran_mc_scale_re_mask_re6;
317static int hf_oran_mc_scale_re_mask_re7;
318static int hf_oran_mc_scale_re_mask_re8;
319static int hf_oran_mc_scale_re_mask_re9;
320static int hf_oran_mc_scale_re_mask_re10;
321static int hf_oran_mc_scale_re_mask_re11;
322static int hf_oran_mc_scale_re_mask_re12;
323static int hf_oran_mc_scale_re_mask_re1_even;
324static int hf_oran_mc_scale_re_mask_re2_even;
325static int hf_oran_mc_scale_re_mask_re3_even;
326static int hf_oran_mc_scale_re_mask_re4_even;
327static int hf_oran_mc_scale_re_mask_re5_even;
328static int hf_oran_mc_scale_re_mask_re6_even;
329static int hf_oran_mc_scale_re_mask_re7_even;
330static int hf_oran_mc_scale_re_mask_re8_even;
331static int hf_oran_mc_scale_re_mask_re9_even;
332static int hf_oran_mc_scale_re_mask_re10_even;
333static int hf_oran_mc_scale_re_mask_re11_even;
334static int hf_oran_mc_scale_re_mask_re12_even;
335
336static int hf_oran_mc_scale_re_mask;
337static int hf_oran_mc_scale_re_mask_even;
338
339static int hf_oran_mc_scale_offset;
340
341static int hf_oran_eAxC_mask;
342static int hf_oran_technology;
343static int hf_oran_nullLayerInd;
344
345static int hf_oran_se19_repetition;
346static int hf_oran_portReMask;
347static int hf_oran_portSymbolMask;
348
349static int hf_oran_ext19_port;
350
351static int hf_oran_prb_allocation;
352static int hf_oran_nextSymbolId;
353static int hf_oran_nextStartPrbc;
354
355static int hf_oran_puncPattern;
356static int hf_oran_numPuncPatterns;
357static int hf_oran_symbolMask_ext20;
358static int hf_oran_startPuncPrb;
359static int hf_oran_numPuncPrb;
360static int hf_oran_puncReMask;
361static int hf_oran_multiSDScope;
362static int hf_oran_RbgIncl;
363
364static int hf_oran_ci_prb_group_size;
365static int hf_oran_prg_size_st5;
366static int hf_oran_prg_size_st6;
367
368static int hf_oran_num_ueid;
369
370static int hf_oran_antMask;
371
372static int hf_oran_transmissionWindowOffset;
373static int hf_oran_transmissionWindowSize;
374static int hf_oran_toT;
375
376static int hf_oran_bfaCompHdr;
377static int hf_oran_bfAzPtWidth;
378static int hf_oran_bfZePtWidth;
379static int hf_oran_bfAz3ddWidth;
380static int hf_oran_bfZe3ddWidth;
381static int hf_oran_bfAzPt;
382static int hf_oran_bfZePt;
383static int hf_oran_bfAz3dd;
384static int hf_oran_bfZe3dd;
385static int hf_oran_bfAzSl;
386static int hf_oran_bfZeSl;
387
388static int hf_oran_cmd_scope;
389static int hf_oran_number_of_st4_cmds;
390
391static int hf_oran_st4_cmd_header;
392static int hf_oran_st4_cmd_type;
393static int hf_oran_st4_cmd_len;
394static int hf_oran_st4_cmd_num_slots;
395static int hf_oran_st4_cmd_ack_nack_req_id;
396
397static int hf_oran_st4_cmd;
398
399static int hf_oran_sleepmode_trx;
400static int hf_oran_sleepmode_asm;
401static int hf_oran_log2maskbits;
402static int hf_oran_num_slots_ext;
403static int hf_oran_antMask_trx_control;
404
405static int hf_oran_max_pwr_lvl_ind;
406static int hf_oran_array_carrier_max_pwr_reduction;
407static int hf_oran_port_list_en;
408static int hf_oran_tpmi_mode;
409static int hf_oran_num_ueid_se34;
410static int hf_oran_ueid_se34;
411static int hf_oran_num_port_list_index;
412static int hf_oran_chan_srs_port_mask;
413static int hf_oran_tpmi_phase_7;
414static int hf_oran_tpmi_phase_6;
415static int hf_oran_tpmi_phase_5;
416static int hf_oran_tpmi_phase_4;
417static int hf_oran_tpmi_phase_3;
418static int hf_oran_tpmi_phase_2;
419static int hf_oran_tpmi_phase_1;
420static int hf_oran_tpmi_phase_0;
421
422
423static int hf_oran_ready;
424static int hf_oran_number_of_acks;
425static int hf_oran_number_of_nacks;
426static int hf_oran_ackid;
427static int hf_oran_nackid;
428
429static int hf_oran_acknack_request_frame;
430static int hf_oran_acknack_request_time;
431static int hf_oran_acknack_request_type;
432static int hf_oran_acknack_response_frame;
433static int hf_oran_acknack_response_time;
434
435static int hf_oran_disable_tdbfns;
436static int hf_oran_td_beam_group;
437static int hf_oran_disable_tdbfws;
438static int hf_oran_td_beam_num;
439
440static int hf_oran_dir_pattern;
441static int hf_oran_guard_pattern;
442
443static int hf_oran_ecpri_pcid;
444static int hf_oran_ecpri_rtcid;
445static int hf_oran_ecpri_seqid;
446
447static int hf_oran_num_sym_prb_pattern;
448static int hf_oran_prb_mode;
449static int hf_oran_sym_prb_pattern;
450static int hf_oran_sym_mask;
451static int hf_oran_num_mc_scale_offset;
452static int hf_oran_prb_pattern;
453static int hf_oran_prb_blk_offset;
454static int hf_oran_prb_blk_size;
455
456static int hf_oran_codebook_index;
457static int hf_oran_layerid;
458static int hf_oran_numlayers;
459static int hf_oran_txscheme;
460static int hf_oran_crs_remask;
461static int hf_oran_crs_shift;
462static int hf_oran_crs_symnum;
463static int hf_oran_beamid_ap1;
464static int hf_oran_beamid_ap2;
465static int hf_oran_beamid_ap3;
466
467static int hf_oran_port_list_index;
468static int hf_oran_alpn_per_sym;
469static int hf_oran_ant_dmrs_snr;
470static int hf_oran_user_group_size;
471static int hf_oran_user_group_id;
472static int hf_oran_entry_type;
473static int hf_oran_dmrs_port_number;
474static int hf_oran_ueid_reset;
475
476static int hf_oran_dmrs_symbol_mask;
477static int hf_oran_dmrs_symbol_mask_s13;
478static int hf_oran_dmrs_symbol_mask_s12;
479static int hf_oran_dmrs_symbol_mask_s11;
480static int hf_oran_dmrs_symbol_mask_s10;
481static int hf_oran_dmrs_symbol_mask_s9;
482static int hf_oran_dmrs_symbol_mask_s8;
483static int hf_oran_dmrs_symbol_mask_s7;
484static int hf_oran_dmrs_symbol_mask_s6;
485static int hf_oran_dmrs_symbol_mask_s5;
486static int hf_oran_dmrs_symbol_mask_s4;
487static int hf_oran_dmrs_symbol_mask_s3;
488static int hf_oran_dmrs_symbol_mask_s2;
489static int hf_oran_dmrs_symbol_mask_s1;
490static int hf_oran_dmrs_symbol_mask_s0;
491
492static int hf_oran_scrambling;
493static int hf_oran_nscid;
494static int hf_oran_dtype;
495static int hf_oran_cmd_without_data;
496static int hf_oran_lambda;
497static int hf_oran_first_prb;
498static int hf_oran_last_prb;
499static int hf_oran_low_papr_type;
500static int hf_oran_hopping_mode;
501
502static int hf_oran_tx_win_for_on_air_symbol_l;
503static int hf_oran_tx_win_for_on_air_symbol_r;
504
505static int hf_oran_num_fo_fb;
506static int hf_oran_freq_offset_fb;
507
508static int hf_oran_num_ue_sinr_rpt;
509static int hf_oran_num_sinr_per_prb;
510static int hf_oran_num_sinr_per_prb_right;
511static int hf_oran_num_sinr_per_prb_st9;
512
513static int hf_oran_sinr_value;
514
515static int hf_oran_measurement_report;
516static int hf_oran_mf;
517static int hf_oran_meas_data_size;
518static int hf_oran_meas_type_id;
519static int hf_oran_ipn_power;
520static int hf_oran_ue_tae;
521static int hf_oran_ue_layer_power;
522static int hf_oran_num_elements;
523static int hf_oran_ant_dmrs_snr_val;
524static int hf_oran_ue_freq_offset;
525static int hf_oran_curr_ue_freq_offset;
526
527static int hf_oran_measurement_command;
528
529static int hf_oran_beam_type;
530static int hf_oran_meas_cmd_size;
531
532static int hf_oran_symbol_reordering_layer;
533static int hf_oran_dmrs_entry;
534
535static int hf_oran_c_section_common;
536static int hf_oran_c_section;
537static int hf_oran_u_section;
538
539static const unit_name_string units_decibelfs = { " dBFS", NULL((void*)0) };
540static int hf_oran_u_prb_power;
541static int hf_oran_u_total_power;
542static int hf_oran_u_peak_power;
543
544static int hf_oran_u_section_ul_symbol_time;
545static int hf_oran_u_section_ul_symbol_frames;
546static int hf_oran_u_section_ul_symbol_first_frame;
547static int hf_oran_u_section_ul_symbol_last_frame;
548
549static int hf_oran_cd_scg_size;
550static int hf_oran_cd_scg_phase_step;
551
552static int hf_oran_sinr_prb;
553static int hf_oran_oru_control_sinr_slot_mask_id;
554static int hf_oran_pos_meas;
555
556static int hf_oran_ue_radial_speed;
557static int hf_oran_ue_az_aoa;
558static int hf_oran_ue_ze_aoa;
559static int hf_oran_ue_pos_toa_offset;
560
561static int hf_oran_num_rep_ue;
562static int hf_oran_rep_ueid;
563static int hf_oran_is_last_rep;
564static int hf_oran_rep_index;
565static int hf_oran_num_reps;
566
567static int hf_oran_mcs_table;
568static int hf_oran_mcs_index;
569
570static int hf_oran_num_meas_req;
571static int hf_oran_num_of_ue_ant_ports;
572static int hf_oran_ue_rank;
573static int hf_oran_codebook_subset;
574static int hf_oran_full_pwr_mode;
575static int hf_oran_full_pwr_mode_2_tpmi_group;
576
577static int hf_oran_num_cand_ranks;
578static int hf_oran_ue_pref_rank;
579static int hf_oran_ue_tpmi_rank_y;
580static int hf_oran_ue_tpmi_rank_y_sinr_lx;
581static int hf_oran_ue_layer_pre_eq_sinr;
582
583static int hf_oran_chan_type_sel;
584static int hf_oran_srs_meas_port_mask;
585static int hf_oran_srs_ue_port_wb_power;
586static int hf_oran_srs_ue_port_wb_sinr;
587
588static int hf_oran_srsRbgSize;
589static int hf_oran_srsNumRbg;
590static int hf_oran_srsTxComb;
591static int hf_oran_srsSymId;
592static int hf_oran_srsNumUe;
593
594/* Computed fields */
595static int hf_oran_c_eAxC_ID;
596static int hf_oran_refa;
597
598static int hf_oran_bfws_frame_defined;
599static int hf_oran_bfws_symbols_since_defined;
600
601static int hf_oran_corresponding_cplane_frame;
602static int hf_oran_corresponding_cplane_frame_time_delta;
603static int hf_oran_corresponding_uplane_frame;
604static int hf_oran_corresponding_uplane_frames_total;
605
606
607/* Convenient fields for filtering, mostly shown as hidden */
608static int hf_oran_cplane;
609static int hf_oran_uplane;
610static int hf_oran_bf; /* to match frames that configure beamforming in any way */
611static int hf_oran_zero_prb;
612static int hf_oran_nonzero_prb;
613static int hf_oran_bundle_weights_all_zero;
614static int hf_oran_ul_cplane_ud_comp_hdr_frame;
615static int hf_oran_delta_to_expected_ul_symbol_time;
616static int hf_oran_delta_to_expected_dl_symbol_time;
617
618/* For reassembly */
619static int hf_oran_fragments;
620static int hf_oran_fragment;
621static int hf_oran_fragment_overlap;
622static int hf_oran_fragment_overlap_conflict;
623static int hf_oran_fragment_multiple_tails;
624static int hf_oran_fragment_too_long_fragment;
625static int hf_oran_fragment_error;
626static int hf_oran_fragment_count;
627static int hf_oran_reassembled_in;
628static int hf_oran_reassembled_length;
629static int hf_oran_reassembled_data;
630
631static int hf_oran_payload;
632
633/* Subtrees */
634static int ett_oran;
635static int ett_oran_ecpri_rtcid;
636static int ett_oran_ecpri_pcid;
637static int ett_oran_ecpri_seqid;
638static int ett_oran_section;
639static int ett_oran_section_type;
640static int ett_oran_u_timing;
641static int ett_oran_u_section;
642static int ett_oran_u_prb;
643static int ett_oran_iq;
644static int ett_oran_bfw_bundle;
645static int ett_oran_bfw;
646static int ett_oran_frequency_range;
647static int ett_oran_prb_cisamples;
648static int ett_oran_cisample;
649static int ett_oran_udcomphdr;
650static int ett_oran_udcompparam;
651static int ett_oran_cicomphdr;
652static int ett_oran_cicompparam;
653static int ett_oran_bfwcomphdr;
654static int ett_oran_bfwcompparam;
655static int ett_oran_ext19_port;
656static int ett_oran_prb_allocation;
657static int ett_oran_punc_pattern;
658static int ett_oran_bfacomphdr;
659static int ett_oran_modcomp_param_set;
660static int ett_oran_st4_cmd_header;
661static int ett_oran_st4_cmd;
662static int ett_oran_sym_prb_pattern;
663static int ett_oran_measurement_report;
664static int ett_oran_measurement_command;
665static int ett_oran_sresmask;
666static int ett_oran_c_section_common;
667static int ett_oran_c_section;
668static int ett_oran_remask;
669static int ett_oran_mc_scale_remask;
670static int ett_oran_symbol_reordering_layer;
671static int ett_oran_dmrs_entry;
672static int ett_oran_dmrs_symbol_mask;
673static int ett_oran_symbol_mask;
674static int ett_oran_active_beamspace_coefficient_mask;
675static int ett_oran_sinr_prb;
676static int ett_oran_rbgMask;
677static int ett_oran_se10_port;
678
679static int ett_oran_fragment;
680static int ett_oran_fragments;
681
682/* Dissector table for Section Extensions not in the standard, keyed by exttype. */
683static dissector_table_t oran_sectionextension_table;
684
685/* Reassembly table. */
686static reassembly_table oran_reassembly_table;
687
688static void *oran_key(const packet_info *pinfo _U___attribute__((unused)), const uint32_t id _U___attribute__((unused)), const void *data)
689{
690 return (void *)data;
691}
692
693static void oran_free_key(void *ptr _U___attribute__((unused)))
694{
695}
696
697static reassembly_table_functions oran_reassembly_table_functions =
698{
699 g_direct_hash,
700 g_direct_equal,
701 oran_key,
702 oran_key,
703 oran_free_key,
704 oran_free_key
705};
706
707static const fragment_items oran_frag_items = {
708 &ett_oran_fragment,
709 &ett_oran_fragments,
710 &hf_oran_fragments,
711 &hf_oran_fragment,
712 &hf_oran_fragment_overlap,
713 &hf_oran_fragment_overlap_conflict,
714 &hf_oran_fragment_multiple_tails,
715 &hf_oran_fragment_too_long_fragment,
716 &hf_oran_fragment_error,
717 &hf_oran_fragment_count,
718 &hf_oran_reassembled_in,
719 &hf_oran_reassembled_length,
720 &hf_oran_reassembled_data,
721 "O-RAN FH CUS fragments"
722};
723
724
725/* Don't want all extensions to open and close together. Use [extType-1] entry */
726static int ett_oran_c_section_extension[HIGHEST_EXTTYPE35];
727
728/* Expert info */
729static expert_field ei_oran_unsupported_bfw_compression_method;
730static expert_field ei_oran_invalid_sample_bit_width;
731static expert_field ei_oran_reserved_numBundPrb;
732static expert_field ei_oran_extlen_wrong;
733static expert_field ei_oran_invalid_eaxc_bit_width;
734static expert_field ei_oran_extlen_zero;
735static expert_field ei_oran_rbg_size_reserved;
736static expert_field ei_oran_frame_length;
737static expert_field ei_oran_numprbc_ext21_zero;
738static expert_field ei_oran_ci_prb_group_size_reserved;
739static expert_field ei_oran_st8_nackid;
740static expert_field ei_oran_st4_no_cmds;
741static expert_field ei_oran_st4_zero_len_cmd;
742static expert_field ei_oran_st4_wrong_len_cmd;
743static expert_field ei_oran_st4_unknown_cmd;
744static expert_field ei_oran_mcot_out_of_range;
745static expert_field ei_oran_se10_unknown_beamgrouptype;
746static expert_field ei_oran_se10_not_allowed;
747static expert_field ei_oran_start_symbol_id_not_zero;
748static expert_field ei_oran_trx_control_cmd_scope;
749static expert_field ei_oran_unhandled_se;
750static expert_field ei_oran_bad_symbolmask;
751static expert_field ei_oran_numslots_not_zero;
752static expert_field ei_oran_version_unsupported;
753static expert_field ei_oran_laa_msg_type_unsupported;
754static expert_field ei_oran_se_on_unsupported_st;
755static expert_field ei_oran_cplane_unexpected_sequence_number_ul;
756static expert_field ei_oran_cplane_unexpected_sequence_number_dl;
757static expert_field ei_oran_uplane_unexpected_sequence_number_ul;
758static expert_field ei_oran_uplane_unexpected_sequence_number_dl;
759static expert_field ei_oran_acknack_no_request;
760static expert_field ei_oran_udcomphdr_should_be_zero;
761static expert_field ei_oran_radio_fragmentation_c_plane;
762static expert_field ei_oran_lastRbdid_out_of_range;
763static expert_field ei_oran_rbgMask_beyond_last_rbdid;
764static expert_field ei_oran_unexpected_measTypeId;
765static expert_field ei_oran_unsupported_compression_method;
766static expert_field ei_oran_ud_comp_len_wrong_size;
767static expert_field ei_oran_sresmask2_not_zero_with_rb;
768static expert_field ei_oran_st6_rb_shall_be_0;
769static expert_field ei_oran_st9_not_ul;
770static expert_field ei_oran_st10_numsymbol_not_14;
771static expert_field ei_oran_st10_startsymbolid_not_0;
772static expert_field ei_oran_st10_not_ul;
773static expert_field ei_oran_se24_nothing_to_inherit;
774static expert_field ei_oran_num_sinr_per_prb_unknown;
775static expert_field ei_oran_start_symbol_id_bits_ignored;
776static expert_field ei_oran_user_group_id_reserved_value;
777static expert_field ei_oran_port_list_index_zero;
778static expert_field ei_oran_ul_uplane_symbol_too_long;
779static expert_field ei_oran_reserved_not_zero;
780static expert_field ei_oran_too_many_symbols;
781static expert_field ei_oran_se30_not_ul;
782static expert_field ei_oran_se30_unknown_ueid;
783static expert_field ei_oran_beamid_bfws_not_found;
784static expert_field ei_oran_syminc_set_for_uplane;
785static expert_field ei_oran_cplane_entry_not_found;
786static expert_field ei_oran_se12_rb_set;
787static expert_field ei_oran_se5_re_mask_bits_not_covered;
788static expert_field ei_oran_se5_re_mask_bit_repeated;
789static expert_field ei_oran_se5_re_mask_bit_not_in_re_mask;
790static expert_field ei_oran_se5_re_zero_re_mask;
791
792
793/* These are the message types handled by this dissector. Others have handling in packet-ecpri.c */
794#define ECPRI_MT_IQ_DATA0 0
795#define ECPRI_MT_RT_CTRL_DATA2 2
796
797
798/* Preference settings - try to set reasonable defaults */
799static unsigned pref_du_port_id_bits = 4;
800static unsigned pref_bandsector_id_bits = 4;
801static unsigned pref_cc_id_bits = 4;
802static unsigned pref_ru_port_id_bits = 4;
803
804/* TODO: ideally should be per-flow */
805static unsigned pref_sample_bit_width_uplink = 14;
806static unsigned pref_sample_bit_width_downlink = 14;
807static unsigned pref_sample_bit_width_sinr = 14;
808
809/* TODO: these ideally should be per-flow too */
810static int pref_iqCompressionUplink = COMP_BLOCK_FP1;
811static int pref_iqCompressionDownlink = COMP_BLOCK_FP1;
812
813static int pref_iqCompressionSINR = COMP_BLOCK_FP1;
814
815
816/* Is udCompHeader present (both directions) */
817static int pref_includeUdCompHeaderUplink = 2; /* start using heuristic */
818static int pref_includeUdCompHeaderDownlink = 2; /* start using heuristic */
819
820/* Are we ignoring UL C-Plane udCompHdr? */
821static bool_Bool pref_override_ul_compression = false0;
822
823static unsigned pref_data_plane_section_total_rbs = 273;
824static unsigned pref_num_bf_antennas = 32;
825static bool_Bool pref_showIQSampleValues = true1;
826
827/* Based upon m-plane param, so will be system-wide */
828static int pref_support_udcompLen = 2; /* start heuristic, can force other settings if necessary */
829static bool_Bool udcomplen_heuristic_result_set = false0;
830static bool_Bool udcomplen_heuristic_result = false0;
831
832/* st6-4byte-alignment-required */
833static bool_Bool st6_4byte_alignment = false0;
834
835/* Requested, allows I/Q to be stored as integers.. */
836static bool_Bool show_unscaled_values = false0;
837
838/* Initialized off. Timing is in microseconds. */
839static unsigned us_allowed_for_ul_in_symbol = 0;
840
841/* Reassemble U-Plane (at Radio Transport layer) */
842static bool_Bool do_radio_transport_layer_reassembly = true1;
843
844/* Expected symbol duration. Initialize to 100MHz case (Mu=1) */
845static unsigned pref_symbol_time = 36;
846
847/* Link U-plane back to C-plane using sectionIds */
848static bool_Bool link_planes_together = true1;
849
850static const enum_val_t dl_compression_options[] = {
851 { "COMP_NONE", "No Compression", COMP_NONE0 },
852 { "COMP_BLOCK_FP", "Block Floating Point Compression", COMP_BLOCK_FP1 },
853 { "COMP_BLOCK_SCALE", "Block Scaling Compression", COMP_BLOCK_SCALE2 },
854 { "COMP_U_LAW", "u-Law Compression", COMP_U_LAW3 },
855 { "COMP_MODULATION", "Modulation Compression", COMP_MODULATION4 },
856 { "BFP_AND_SELECTIVE_RE", "Block Floating Point + selective RE sending", BFP_AND_SELECTIVE_RE5 },
857 { "MOD_COMPR_AND_SELECTIVE_RE", "Modulation Compression + selective RE sending", MOD_COMPR_AND_SELECTIVE_RE6 },
858 { "BFP_AND_SELECTIVE_RE_WITH_MASKS", "Block Floating Point + selective RE sending with masks in section header", BFP_AND_SELECTIVE_RE_WITH_MASKS7 },
859 { "MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS", "Modulation Compression + selective RE sending with masks in section header", MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8 },
860 { NULL((void*)0), NULL((void*)0), 0 }
861};
862
863/* No Modulation compression in UL.. */
864static const enum_val_t ul_compression_options[] = {
865 { "COMP_NONE", "No Compression", COMP_NONE0 },
866 { "COMP_BLOCK_FP", "Block Floating Point Compression", COMP_BLOCK_FP1 },
867 { "COMP_BLOCK_SCALE", "Block Scaling Compression", COMP_BLOCK_SCALE2 },
868 { "COMP_U_LAW", "u-Law Compression", COMP_U_LAW3 },
869 { "BFP_AND_SELECTIVE_RE", "Block Floating Point + selective RE sending", BFP_AND_SELECTIVE_RE5 },
870 { "BFP_AND_SELECTIVE_RE_WITH_MASKS", "Block Floating Point + selective RE sending with masks in section header", BFP_AND_SELECTIVE_RE_WITH_MASKS7 },
871 { NULL((void*)0), NULL((void*)0), 0 }
872};
873
874static const enum_val_t udcomplen_support_options[] = {
875 { "NOT_SUPPORTED", "Not Supported", 0 },
876 { "SUPPORTED", "Supported", 1 },
877 { "HEURISTIC", "Attempt Heuristic", 2 },
878 { NULL((void*)0), NULL((void*)0), 0 }
879};
880
881static const enum_val_t udcomphdr_present_options[] = {
882 { "NOT_PRESENT", "Not Present", 0 },
883 { "PRESENT", "Present", 1 },
884 { "HEURISTIC", "Attempt Heuristic", 2 },
885 { NULL((void*)0), NULL((void*)0), 0 }
886};
887
888
889
890static const value_string e_bit[] = {
891 { 0, "More fragments follow" },
892 { 1, "Last fragment" },
893 { 0, NULL((void*)0)}
894};
895
896#define DIR_UPLINK0 0
897#define DIR_DOWNLINK1 1
898
899
900static const value_string data_direction_vals[] = {
901 { DIR_UPLINK0, "Uplink" }, /* gNB Rx */
902 { DIR_DOWNLINK1, "Downlink" }, /* gNB Tx */
903 { 0, NULL((void*)0)}
904};
905
906static const value_string rb_vals[] = {
907 { 0, "Every RB used" },
908 { 1, "Every other RB used" },
909 { 0, NULL((void*)0)}
910};
911
912static const value_string sym_inc_vals[] = {
913 { 0, "Use the current symbol number" },
914 { 1, "Increment the current symbol number" },
915 { 0, NULL((void*)0)}
916};
917
918static const value_string lbtMode_vals[] = {
919 { 0, "Full LBT (regular LBT, sending reservation signal until the beginning of the SF/slot)" },
920 { 1, "Partial LBT (looking back 25 usec prior to transmission" },
921 { 2, "Partial LBT (looking back 34 usec prior to transmission" },
922 { 3, "Full LBT and stop (regular LBT, without sending reservation signal" },
923 { 0, NULL((void*)0)}
924};
925
926static const value_string ue_rank_vals[] = {
927 { 1, "1" },
928 { 2, "2" },
929 { 3, "3" },
930 { 4, "4" },
931 { 0, NULL((void*)0)}
932};
933
934static const value_string num_of_ue_ant_ports_vals[] = {
935 { 2, "2" },
936 { 4, "4" },
937 { 0, NULL((void*)0)}
938};
939
940static const value_string codebook_subset_vals[] = {
941 { 0, "nonCoherent" },
942 { 1, "partialAndNonCoherent" },
943 { 2, "fullyAndPartialAndNonCoherent" },
944 { 3, "reserved" },
945 { 0, NULL((void*)0)}
946};
947
948
949static const range_string filter_indices[] = {
950 {0, 0, "standard channel filter"},
951 {1, 1, "UL filter for PRACH preamble formats 0, 1, 2; min. passband 839 x 1.25kHz = 1048.75 kHz"},
952 {2, 2, "UL filter for PRACH preamble format 3, min. passband 839 x 5 kHz = 4195 kHz"},
953 {3, 3, "UL filter for PRACH preamble formats A1, A2, A3, B1, B2, B3, B4, C0, C2; min. passband 139 x \u0394fRA"},
954 {4, 4, "UL filter for NPRACH 0, 1; min. passband 48 x 3.75KHz = 180 KHz"},
955 {5, 5, "UL filter for PRACH preamble formats"},
956 {8, 8, "UL filter NPUSCH"},
957 {9, 9, "Mixed numerology and other channels except PRACH and NB-IoT"},
958 {9, 15, "Reserved"},
959 {0, 0, NULL((void*)0)}
960};
961
962/* 7.3.1-1 */
963static const range_string section_types[] = {
964 { SEC_C_UNUSED_RB, SEC_C_UNUSED_RB, "Unused Resource Blocks or symbols in Downlink or Uplink" },
965 { SEC_C_NORMAL, SEC_C_NORMAL, "Most DL/UL radio channels" },
966 { SEC_C_RSVD2, SEC_C_RSVD2, "Reserved for future use" },
967 { SEC_C_PRACH, SEC_C_PRACH, "PRACH and mixed-numerology channels" },
968 { SEC_C_SLOT_CONTROL, SEC_C_SLOT_CONTROL, "Slot Configuration Control" },
969 { SEC_C_UE_SCHED, SEC_C_UE_SCHED, "UE scheduling information (UE-ID assignment to section)" },
970 { SEC_C_CH_INFO, SEC_C_CH_INFO, "Channel information" },
971 { SEC_C_LAA, SEC_C_LAA, "LAA (License Assisted Access)" },
972 { SEC_C_ACK_NACK_FEEDBACK, SEC_C_ACK_NACK_FEEDBACK, "ACK/NACK Feedback" },
973 { SEC_C_SINR_REPORTING, SEC_C_SINR_REPORTING, "SINR Reporting" },
974 { SEC_C_RRM_MEAS_REPORTS, SEC_C_RRM_MEAS_REPORTS, "RRM Measurement Reports" },
975 { SEC_C_REQUEST_RRM_MEAS, SEC_C_REQUEST_RRM_MEAS, "Request RRM Measurements" },
976 { SEC_C_SRS_DESCRIPTION, SEC_C_SRS_DESCRIPTION, "SRS Description" },
977 { SEC_C_RRM_MEAS_REPORTS_NON_TIMING, SEC_C_RRM_MEAS_REPORTS_NON_TIMING, "RRM Measurement reports - no-timing-controller" },
978 { SEC_C_CO_SCHEDULING_INFO, SEC_C_CO_SCHEDULING_INFO, "Co-scheduling information" },
979 { SEC_C_MAX_INDEX, 255, "Reserved for future use" },
980 { 0, 0, NULL((void*)0)} };
981
982static const range_string section_types_short[] = {
983 { SEC_C_UNUSED_RB, SEC_C_UNUSED_RB, "(Unused RBs)" },
984 { SEC_C_NORMAL, SEC_C_NORMAL, "(Most channels)" },
985 { SEC_C_RSVD2, SEC_C_RSVD2, "(reserved)" },
986 { SEC_C_PRACH, SEC_C_PRACH, "(PRACH/mixed-\u03bc)" },
987 { SEC_C_SLOT_CONTROL, SEC_C_SLOT_CONTROL, "(Slot info)" },
988 { SEC_C_UE_SCHED, SEC_C_UE_SCHED, "(UE scheduling info)" },
989 { SEC_C_CH_INFO, SEC_C_CH_INFO, "(Channel info)" },
990 { SEC_C_LAA, SEC_C_LAA, "(LAA)" },
991 { SEC_C_ACK_NACK_FEEDBACK, SEC_C_ACK_NACK_FEEDBACK, "(ACK/NACK)" },
992 { SEC_C_SINR_REPORTING, SEC_C_SINR_REPORTING, "(SINR Reporting)" },
993 { SEC_C_RRM_MEAS_REPORTS, SEC_C_RRM_MEAS_REPORTS, "(RRM Meas Reports)" },
994 { SEC_C_REQUEST_RRM_MEAS, SEC_C_REQUEST_RRM_MEAS, "(Req RRM Meas)" },
995 { SEC_C_SRS_DESCRIPTION, SEC_C_SRS_DESCRIPTION, "(SRS Description)" },
996 { SEC_C_RRM_MEAS_REPORTS_NON_TIMING, SEC_C_RRM_MEAS_REPORTS_NON_TIMING, "(RRM Meas reports - NT)" },
997 { SEC_C_CO_SCHEDULING_INFO, SEC_C_CO_SCHEDULING_INFO, "(Co-scheduling)" },
998 { SEC_C_MAX_INDEX, 255, "Reserved for future use" },
999 { 0, 0, NULL((void*)0) }
1000};
1001
1002static const range_string ud_comp_header_width[] = {
1003 {0, 0, "I and Q are each 16 bits wide"},
1004 {1, 15, "Bit width of I and Q"},
1005 {0, 0, NULL((void*)0)} };
1006
1007/* Table 8.3.3.13-3 */
1008static const range_string ud_comp_header_meth[] = {
1009 {COMP_NONE0, COMP_NONE0, "No compression" },
1010 {COMP_BLOCK_FP1, COMP_BLOCK_FP1, "Block floating point compression" },
1011 {COMP_BLOCK_SCALE2, COMP_BLOCK_SCALE2, "Block scaling" },
1012 {COMP_U_LAW3, COMP_U_LAW3, "Mu - law" },
1013 {COMP_MODULATION4, COMP_MODULATION4, "Modulation compression" },
1014 {BFP_AND_SELECTIVE_RE5, BFP_AND_SELECTIVE_RE5, "BFP + selective RE sending" },
1015 {MOD_COMPR_AND_SELECTIVE_RE6, MOD_COMPR_AND_SELECTIVE_RE6, "mod-compr + selective RE sending" },
1016 {BFP_AND_SELECTIVE_RE_WITH_MASKS7, BFP_AND_SELECTIVE_RE_WITH_MASKS7, "BFP + selective RE sending with masks in section header" },
1017 {MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8, MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8, "mod-compr + selective RE sending with masks in section header"},
1018 {9, 15, "Reserved"},
1019 {0, 0, NULL((void*)0)}
1020};
1021
1022/* Table 7.5.2.13-2 */
1023static const range_string frame_structure_fft[] = {
1024 {0, 0, "Reserved (no FFT/iFFT processing)"},
1025 {1, 3, "Reserved"},
1026 {4, 4, "FFT size 16"},
1027 {5, 5, "FFT size 32"},
1028 {6, 6, "FFT size 64"},
1029 {7, 7, "FFT size 128"},
1030 {8, 8, "FFT size 256"},
1031 {9, 9, "FFT size 512"},
1032 {10, 10, "FFT size 1024"},
1033 {11, 11, "FFT size 2048"},
1034 {12, 12, "FFT size 4096"},
1035 {13, 13, "FFT size 1536"},
1036 {14, 14, "FFT size 3072"},
1037 {15, 15, "Reserved"},
1038 {0, 0, NULL((void*)0)}
1039};
1040
1041/* Table 7.5.2.13-3 */
1042static const range_string subcarrier_spacings[] = {
1043 { 0, 0, "SCS 15 kHz, 1 slot/subframe, slot length 1 ms" },
1044 { 1, 1, "SCS 30 kHz, 2 slots/subframe, slot length 500 \u03bcs" },
1045 { 2, 2, "SCS 60 kHz, 4 slots/subframe, slot length 250 \u03bcs" },
1046 { 3, 3, "SCS 120 kHz, 8 slots/subframe, slot length 125 \u03bcs" },
1047 { 4, 4, "SCS 240 kHz, 16 slots/subframe, slot length 62.5 \u03bcs" },
1048 { 5, 11, "Reserved" }, /* N.B., 5 was 480kHz in early spec versions */
1049 { 12, 12, "SCS 1.25 kHz, 1 slot/subframe, slot length 1 ms" },
1050 { 13, 13, "SCS 3.75 kHz(LTE - specific), 1 slot/subframe, slot length 1 ms" },
1051 { 14, 14, "SCS 5 kHz, 1 slot/subframe, slot length 1 ms" },
1052 { 15, 15, "SCS 7.5 kHz(LTE - specific), 1 slot/subframe, slot length 1 ms" },
1053 { 0, 0, NULL((void*)0) }
1054};
1055
1056/* Table 7.5.3.14-1 laaMsgType definition */
1057static const range_string laaMsgTypes[] = {
1058 {0, 0, "LBT_PDSCH_REQ - lls - O-DU to O-RU request to obtain a PDSCH channel"},
1059 {1, 1, "LBT_DRS_REQ - lls - O-DU to O-RU request to obtain the channel and send DRS"},
1060 {2, 2, "LBT_PDSCH_RSP - O-RU to O-DU response, channel acq success or failure"},
1061 {3, 3, "LBT_DRS_RSP - O-RU to O-DU response, DRS sending success or failure"},
1062 {4, 4, "LBT_Buffer_Error - O-RU to O-DU response, reporting buffer overflow"},
1063 {5, 5, "LBT_CWCONFIG_REQ - O-DU to O-RU request, congestion window configuration"},
1064 {6, 6, "LBT_CWCONFIG_RST - O-RU to O-DU request, congestion window config, response"},
1065 {7, 15, "reserved for future methods"},
1066 {0, 0, NULL((void*)0)}
1067};
1068
1069/* 7.7.26.3 */
1070static const range_string freq_offset_fb_values[] = {
1071 {0, 0, "no frequency offset"},
1072 {8000, 8000, "value not provided"},
1073 {1, 30000, "positive frequency offset, (0, +0.5] subcarrier"},
1074 {0x8ad0, 0xffff, "negative frequency offset, [-0.5, 0) subcarrier"},
1075 {0x0, 0xffff, "reserved"},
1076 {0, 0, NULL((void*)0)}
1077};
1078
1079/* 7.5.3.78 */
1080static const range_string ue_tmpi_rank_sinr_vals[] = {
1081 {0, 0, "0 dB SINR"},
1082 {0x0001, 0x07ff, "positive SINR"},
1083 {0xf800, 0xffff, "-ve SINR"},
1084 {0x8000, 0x8000, "invalid measurement result"},
1085 {0x0, 0xffff, "reserved"},
1086 {0, 0, NULL((void*)0)}
1087};
1088
1089
1090
1091/* Table 7.5.2.19-1 */
1092static const value_string num_sinr_per_prb_vals[] = {
1093 { 0, "1" },
1094 { 1, "2" },
1095 { 2, "3" },
1096 { 3, "4" },
1097 { 4, "6" },
1098 { 5, "12" },
1099 { 6, "1 SINR value per section for DFT-s-OFDM" },
1100 { 7, "reserved" },
1101 { 0, NULL((void*)0)}
1102};
1103
1104static const value_string meas_type_id_vals[] = {
1105 { 1, "UE Timing Advance Error" },
1106 { 2, "UE Layer power" },
1107 { 3, "UE frequency offset" },
1108 { 4, "Interference plus Noise for allocated PRBs" },
1109 { 5, "Interference plus Noise for unallocated PRBs" },
1110 { 6, "DMRS-SNR per antenna" },
1111 { 7, "UE positioning measurement report" },
1112 { 8, "UE radial speed measurement report" },
1113 { 9, "UE post-equalization MU interference measurement" },
1114 { 10, "UE TPMI and rank recommendation measurement" },
1115 { 11, "UE layer pre-equalization SINR report" },
1116 { 12, "SRS UE port wideband signal power measurement report" },
1117 { 13, "SRS UE port wideband SINR measurement report" },
1118 { 14, "SRS wideband T-Matrix measurement report" },
1119 { 15, "SRS available port for beamforming measurement report" },
1120 { 16, "SRS discontinuous transmission measurement report" },
1121 { 17, "SRS UE port timing advance error measurement report" },
1122 { 18, "SRS UE port subband signal power measurement report" },
1123 { 19, "SRS UE port subband SINR measurement report" },
1124 { 20, "SRS port ordering measurement report" },
1125 { 21, "DMRS discontinuous transmission measurement report" },
1126 { 22, "Downlink post-equalization SINR measurement report" },
1127 { 23, "UE normalized beam power report" },
1128 { 24, "SRS unallocated comb offset IpN" },
1129 { 0, NULL((void*)0)}
1130};
1131
1132static const value_string beam_type_vals[] = {
1133 { 0, "List of beamId values" },
1134 { 1, "Range of beamId values" },
1135 { 0, NULL((void*)0)}
1136};
1137
1138/* 7.7.24.3 */
1139static const value_string entry_type_vals[] = {
1140 { 0, "inherit config from preceding entry (2 or 3) ueIdReset=0" },
1141 { 1, "inherit config from preceding entry (2 or 3) ueIdReset=1" },
1142 { 2, "related parameters if have transform precoding disabled " },
1143 { 3, "related parameters if have transform precoding enabled " },
1144 { 0, NULL((void*)0)}
1145};
1146
1147/* Table 7.7.29.3-1 */
1148static const range_string cd_scg_size_vals[] = {
1149 { 0, 0, "1 subcarrier" },
1150 { 1, 1, "1 RB x N subcarriers" },
1151 { 2, 2, "2 RB x N subcarriers" },
1152 { 3, 3, "4 RB x N subcarriers" },
1153 { 4, 4, "8 RB x N subcarriers" },
1154 { 5, 5, "16 RB x N subcarriers" },
1155 { 6, 6, "32 RB x N subcarriers" },
1156 { 7, 15, "reserved"},
1157 { 0, 0, NULL((void*)0)}
1158};
1159
1160/* 7.7.33.3 */
1161static const value_string chan_type_sel_vals[] = {
1162 { 0, "port channel index" },
1163 { 1, "layer channel index" },
1164 { 2, "reserved" },
1165 { 3, "reserved" },
1166 { 0, NULL((void*)0)}
1167};
1168
1169/* 7.7.34.4 */
1170static const value_string tpmi_mode_vals[] = {
1171 { 0, "Port selection mode" },
1172 { 1, "Explicit codebook mode" },
1173 { 0, NULL((void*)0)}
1174};
1175
1176/* 7.7.34.7.3 */
1177static const value_string tpmi_phase_vals[] = {
1178 { 0, "no rotation applied" },
1179 { 1, "rotation by pi/2 radians" },
1180 { 2, "rotation by pi radians" },
1181 { 3, "rotation by 3pi/2 radians" },
1182 { 0, NULL((void*)0)}
1183};
1184
1185/* Table 7.6.1-1 */
1186static const value_string exttype_vals[] = {
1187 {0, "Reserved"},
1188 {1, "Beamforming weights"},
1189 {2, "Beamforming attributes"},
1190 {3, "DL Precoding configuration parameters and indications"},
1191 {4, "Modulation compr. params"},
1192 {5, "Modulation compression additional scaling parameters"},
1193 {6, "Non-contiguous PRB allocation"},
1194 {7, "Multiple-eAxC designation"},
1195 {8, "Regularization factor"},
1196 {9, "Dynamic Spectrum Sharing parameters"},
1197 {10, "Multiple ports grouping"},
1198 {11, "Flexible BF weights"},
1199 {12, "Non-Contiguous PRB Allocation with Frequency Ranges"},
1200 {13, "PRB Allocation with Frequency Hopping"},
1201 {14, "Nulling-layer Info. for ueId-based beamforming"},
1202 {15, "Mixed-numerology Info. for ueId-based beamforming"},
1203 {16, "Section description for antenna mapping in UE channel information based UL beamforming"},
1204 {17, "Section description for indication of user port group"},
1205 {18, "Section description for Uplink Transmission Management"},
1206 {19, "Compact beamforming information for multiple port"},
1207 {20, "Puncturing extension"},
1208 {21, "Variable PRB group size for channel information"},
1209 {22, "ACK/NACK request"},
1210 {23, "Multiple symbol modulation compression parameters"},
1211 {24, "PUSCH DMRS configuration"},
1212 {25, "Symbol reordering for DMRS-BF"},
1213 {26, "Frequency offset feedback"},
1214 {27, "O-DU controlled dimensionality reduction"},
1215 {28, "O-DU controlled frequency resolution for SINR reporting"},
1216 {29, "Cyclic delay adjustment"},
1217 {30, "PUSCH repetition indication"},
1218 {31, "MCS Information"},
1219 {32, "Rank and TPMI measurement request"},
1220 {33, "Dynamic channel type selection for SRS-BF-DL"},
1221 {34, "SRS-BF-UL Control"},
1222 {35, "Codebook-based beamforming parameters"},
1223 {0, NULL((void*)0)}
1224};
1225static 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) }
;
1226
1227
1228/**************************************************************************************/
1229/* Keep track for each Section Extension, which section types are allowed to carry it */
1230typedef struct {
1231 bool_Bool ST0;
1232 bool_Bool ST1;
1233 bool_Bool ST3;
1234 bool_Bool ST5;
1235 bool_Bool ST6;
1236 bool_Bool ST10;
1237 bool_Bool ST11;
1238 bool_Bool ST12;
1239 bool_Bool ST13;
1240 bool_Bool ST14;
1241} AllowedCTs_t;
1242
1243
1244static const AllowedCTs_t ext_cts[HIGHEST_EXTTYPE35] = {
1245 /* ST0 ST1 ST3 ST5 ST6 ST10 ST11 ST12 ST13 ST14 */
1246 { false0, true1, true1, false0, false0, false0, false0, false0, false0, false0 }, // SE 1 (1,3)
1247 { false0, true1, true1, false0, false0, false0, false0, false0, false0, false0 }, // SE 2 (1,3)
1248 { false0, true1, true1, false0, false0, false0, false0, false0, false0, false0 }, // SE 3 (1,3)
1249 { false0, true1, true1, true1, false0, false0, false0, false0, false0, false0 }, // SE 4 (1,3,5)
1250 { false0, true1, true1, true1, false0, false0, false0, false0, false0, false0 }, // SE 5 (1,3,5)
1251 { false0, true1, true1, true1, false0, true1, true1, false0, true1, false0 }, // SE 6 (1,3,5,10,11)
1252 { true1, false0, false0, false0, false0, false0, false0, false0, false0, false0 }, // SE 7 (0)
1253 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 8 (5)
1254 { true1, true1, true1, true1, true1, true1, true1, false0, true1, false0 }, // SE 9 (all)
1255 { false0, true1, true1, true1, false0, false0, false0, false0, false0, false0 }, // SE 10 (1,3,5)
1256 { false0, true1, true1, false0, false0, false0, false0, false0, false0, false0 }, // SE 11 (1,3)
1257 { false0, true1, true1, true1, false0, true1, true1, false0, true1, false0 }, // SE 12 (1,3,5,10,11)
1258 { false0, true1, true1, true1, false0, false0, false0, false0, false0, false0 }, // SE 13 (1,3,5)
1259 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 14 (5)
1260 { false0, false0, false0, true1, true1, false0, false0, false0, false0, false0 }, // SE 15 (5,6)
1261 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 16 (5)
1262 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 17 (5)
1263 { false0, true1, true1, true1, false0, false0, false0, false0, false0, false0 }, // SE 18 (1,3,5)
1264 { false0, true1, true1, false0, false0, false0, false0, false0, false0, false0 }, // SE 19 (1,3)
1265 { true1, true1, true1, true1, true1, true1, true1, false0, true1, false0 }, // SE 20 (0,1,3,5,10,11)
1266 { false0, false0, false0, true1, true1, false0, false0, false0, false0, false0 }, // SE 21 (5,6)
1267 { true1, true1, true1, true1, true1, true1, true1, false0, true1, false0 }, // SE 22 (all)
1268 { false0, true1, true1, true1, false0, false0, false0, false0, false0, false0 }, // SE 23 (1,3,5)
1269 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 24 (5)
1270 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 25 (5)
1271 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 26 (5)
1272 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 27 (5)
1273 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 28 (5)
1274 { false0, true1, true1, true1, false0, false0, false0, false0, false0, false0 }, // SE 29 (1,3,5)
1275 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 30 (5)
1276 { false0, true1, true1, true1, false0, false0, false0, false0, false0, false0 }, // SE 31 (1,3,5)
1277 { false0, false0, false0, true1, false0, false0, false0, true1 , false0, false0 }, // SE 32 (5, 14)
1278 { false0, false0, false0, true1, false0, false0, false0, false0, false0, true1 }, // SE 33 (5,14)
1279 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 34 (5)
1280 { false0, false0, false0, true1, false0, false0, false0, false0, false0, false0 }, // SE 35 (5)
1281};
1282
1283static bool_Bool se_allowed_in_st(unsigned se, unsigned st)
1284{
1285 if (se==0 || se>HIGHEST_EXTTYPE35) {
1286 /* Don't know about new SE, so don't complain.. */
1287 return true1;
1288 }
1289
1290 switch (st) {
1291 case 0:
1292 return ext_cts[se-1].ST0;
1293 case 1:
1294 return ext_cts[se-1].ST1;
1295 case 3:
1296 return ext_cts[se-1].ST3;
1297 case 5:
1298 return ext_cts[se-1].ST5;
1299 case 6:
1300 return ext_cts[se-1].ST6;
1301 case 10:
1302 return ext_cts[se-1].ST10;
1303 case 11:
1304 return ext_cts[se-1].ST11;
1305 case 12:
1306 return ext_cts[se-1].ST12;
1307 case 13:
1308 return ext_cts[se-1].ST13;
1309 case 14:
1310 return ext_cts[se-1].ST14;
1311
1312 default:
1313 /* New/unknown section type that includes 'ef'.. assume ok */
1314 return true1;
1315 }
1316}
1317
1318/************************************************************************************/
1319
1320/* Table 7.7.1.2-2 */
1321static const value_string bfw_comp_headers_iq_width[] = {
1322 {0, "I and Q are 16 bits wide"},
1323 {1, "I and Q are 1 bit wide"},
1324 {2, "I and Q are 2 bits wide"},
1325 {3, "I and Q are 3 bits wide"},
1326 {4, "I and Q are 4 bits wide"},
1327 {5, "I and Q are 5 bits wide"},
1328 {6, "I and Q are 6 bits wide"},
1329 {7, "I and Q are 7 bits wide"},
1330 {8, "I and Q are 8 bits wide"},
1331 {9, "I and Q are 9 bits wide"},
1332 {10, "I and Q are 10 bits wide"},
1333 {11, "I and Q are 11 bits wide"},
1334 {12, "I and Q are 12 bits wide"},
1335 {13, "I and Q are 13 bits wide"},
1336 {14, "I and Q are 14 bits wide"},
1337 {15, "I and Q are 15 bits wide"},
1338 {0, NULL((void*)0)}
1339};
1340
1341/* Table 7.7.1.2-3 */
1342static const value_string bfw_comp_headers_comp_meth[] = {
1343 {COMP_NONE0, "no compression"},
1344 {COMP_BLOCK_FP1, "block floating point"},
1345 {COMP_BLOCK_SCALE2, "block scaling"},
1346 {COMP_U_LAW3, "u-law"},
1347 {4, "beamspace compression type I"},
1348 {5, "beamspace compression type II"},
1349 {0, NULL((void*)0)}
1350};
1351
1352/* 7.7.6.2 rbgSize (resource block group size) */
1353static const value_string rbg_size_vals[] = {
1354 {0, "reserved"},
1355 {1, "1"},
1356 {2, "2"},
1357 {3, "3"},
1358 {4, "4"},
1359 {5, "6"},
1360 {6, "8"},
1361 {7, "16"},
1362 {0, NULL((void*)0)}
1363};
1364
1365/* 7.7.6.5 */
1366static const value_string priority_vals[] = {
1367 {0, "0"},
1368 {1, "+1"},
1369 {2, "-2 (reserved, should not be used)"},
1370 {3, "-1"},
1371 {0, NULL((void*)0)}
1372};
1373
1374/* 7.7.10.2 beamGroupType */
1375static const value_string beam_group_type_vals[] = {
1376 {0x0, "common beam"},
1377 {0x1, "beam matrix indication"},
1378 {0x2, "beam vector listing"},
1379 {0x3, "beamId/ueId listing with associated port-list index"},
1380 {0, NULL((void*)0)}
1381};
1382
1383/* 7.7.9.2 technology (interface name) */
1384static const value_string interface_name_vals[] = {
1385 {0x0, "LTE"},
1386 {0x1, "NR"},
1387 {0, NULL((void*)0)}
1388};
1389
1390/* 7.7.18.4 toT (type of transmission) */
1391static const value_string type_of_transmission_vals[] = {
1392 {0x0, "normal transmission mode, data can be distributed in any way the O-RU is implemented to transmit data"},
1393 {0x1, "uniformly distributed over the transmission window"},
1394 {0x2, "Reserved"},
1395 {0x3, "Reserved"},
1396 {0, NULL((void*)0)}
1397};
1398
1399/* 7.7.2.2 (width of bfa parameters) */
1400static const value_string bfa_bw_vals[] = {
1401 {0, "no bits, the field is not applicable (e.g., O-RU does not support it) or the default value shall be used"},
1402 {1, "2-bit bitwidth"},
1403 {2, "3-bit bitwidth"},
1404 {3, "4-bit bitwidth"},
1405 {4, "5-bit bitwidth"},
1406 {5, "6-bit bitwidth"},
1407 {6, "7-bit bitwidth"},
1408 {7, "8-bit bitwidth"},
1409 {0, NULL((void*)0)}
1410};
1411
1412/* 7.7.2.7 & 7.7.2.8 */
1413static const value_string sidelobe_suppression_vals[] = {
1414 {0, "10 dB"},
1415 {1, "15 dB"},
1416 {2, "20 dB"},
1417 {3, "25 dB"},
1418 {4, "30 dB"},
1419 {5, "35 dB"},
1420 {6, "40 dB"},
1421 {7, ">= 45 dB"},
1422 {0, NULL((void*)0)}
1423};
1424
1425static const value_string lbtTrafficClass_vals[] = {
1426 {1, "Priority 1"},
1427 {2, "Priority 2"},
1428 {3, "Priority 3"},
1429 {4, "Priority 4"},
1430 {0, NULL((void*)0)}
1431};
1432
1433/* 7.5.3.22 */
1434static const value_string lbtPdschRes_vals[] = {
1435 {0, "not sensing – indicates that the O-RU is transmitting data"},
1436 {1, "currently sensing – indicates the O-RU has not yet acquired the channel"},
1437 {2, "success – indicates that the channel was successfully acquired"},
1438 {3, "Failure – indicates expiration of the LBT timer. The LBT process should be reset"},
1439 {0, NULL((void*)0)}
1440};
1441
1442/* Table 7.5.2.15-3 */
1443static const value_string ci_comp_opt_vals[] = {
1444 {0, "compression per UE, one ciCompParam exists before the I/Q value of each UE"},
1445 {1, "compression per PRB, one ciCompParam exists before the I/Q value of each PRB"},
1446 {0, NULL((void*)0)}
1447};
1448
1449/* 7.5.2.17 */
1450static const range_string cmd_scope_vals[] = {
1451 {0, 0, "ARRAY-COMMAND"},
1452 {1, 1, "CARRIER-COMMAND"},
1453 {2, 2, "O-RU-COMMAND"},
1454 {3, 15, "reserved"},
1455 {0, 0, NULL((void*)0)}
1456};
1457
1458/* N.B., table in 7.5.3.38 is truncated.. */
1459static const range_string st4_cmd_type_vals[] = {
1460 {0, 0, "reserved for future command types"},
1461 {1, 1, "TIME_DOMAIN_BEAM_CONFIG"},
1462 {2, 2, "TDD_CONFIG_PATTERN"},
1463 {3, 3, "TRX_CONTROL"},
1464 {4, 4, "ASM"},
1465 {5, 5, "TRX_CONTROL_BIDIR"},
1466 {6, 6, "MAX_POWER_CONTROL"},
1467 {7, 255, "reserved for future command types"},
1468 {0, 0, NULL((void*)0)}
1469};
1470
1471/* Table 7.5.3.51-1 */
1472static const value_string log2maskbits_vals[] = {
1473 {0, "reserved"},
1474 {1, "min antMask size is 16 bits.."},
1475 {2, "min antMask size is 16 bits.."},
1476 {3, "min antMask size is 16 bits.."},
1477 {4, "16 bits"},
1478 {5, "32 bits"},
1479 {6, "64 bits"},
1480 {7, "128 bits"},
1481 {8, "256 bits"},
1482 {9, "512 bits"},
1483 {10, "1024 bits"},
1484 {11, "2048 bits"},
1485 {12, "4096 bits"},
1486 {13, "8192 bits"},
1487 {14, "16384 bits"},
1488 {15, "reserved"},
1489 {0, NULL((void*)0)}
1490};
1491
1492/* Table 16.1-1 Sleep modes */
1493static const value_string sleep_mode_trx_vals[] = {
1494 { 0, "TRXC-mode0-wake-up-duration (symbol)"},
1495 { 1, "TRXC-mode1-wake-up-duration (L)"},
1496 { 2, "TRXC-mode2-wake-up-duration (M)"},
1497 { 3, "TRXC-mode3-wake-up-duration (N)"},
1498 { 0, NULL((void*)0)}
1499};
1500
1501static const value_string sleep_mode_asm_vals[] = {
1502 { 0, "ASM-mode0-wake-up-duration (symbol)"},
1503 { 1, "ASM-mode1-wake-up-duration (L)"},
1504 { 2, "ASM-mode2-wake-up-duration (M)"},
1505 { 3, "ASM-mode3-wake-up-duration (N)"},
1506 { 0, NULL((void*)0)}
1507};
1508
1509/* 7.7.21.3.1 */
1510static const value_string prg_size_st5_vals[] = {
1511 { 0, "reserved"},
1512 { 1, "Precoding resource block group size as WIDEBAND"},
1513 { 2, "Precoding resource block group size 2"},
1514 { 3, "Precoding resource block group size 4"},
1515 { 0, NULL((void*)0)}
1516};
1517
1518/* 7.7.21.3.2 */
1519static const value_string prg_size_st6_vals[] = {
1520 { 0, "if ciPrbGroupSize is 2 or 4, then ciPrbGroupSize, else WIDEBAND"},
1521 { 1, "Precoding resource block group size as WIDEBAND"},
1522 { 2, "Precoding resource block group size 2"},
1523 { 3, "Precoding resource block group size 4"},
1524 { 0, NULL((void*)0)}
1525};
1526
1527/* 7.7.24.4 */
1528static const value_string alpn_per_sym_vals[] = {
1529 { 0, "report one allocated IPN value per all allocated symbols with DMRS"},
1530 { 1, "report one allocated IPN value per group of consecutive DMRS symbols"},
1531 { 0, NULL((void*)0)}
1532};
1533
1534/* 7.7.24.5 */
1535static const value_string ant_dmrs_snr_vals[] = {
1536 { 0, "O-RU shall not report the MEAS_ANT_DMRS_SNR"},
1537 { 1, "O-RU shall report the MEAS_ANT_DMRS_SNR"},
1538 { 0, NULL((void*)0)}
1539};
1540
1541/* 7.7.24.14 */
1542static const value_string dtype_vals[] = {
1543 { 0, "assume DMRS configuration type 1"},
1544 { 1, "assume DMRS configuration type 2"},
1545 { 0, NULL((void*)0)}
1546};
1547
1548/* 7.7.24.17 */
1549static const value_string papr_type_vals[] = {
1550 { 0, "sequence generator type 1 for short sequence lengths"},
1551 { 1, "sequence generator type 1 for long sequence lengths"},
1552 { 2, "sequence generator type 2 for short sequence lengths"},
1553 { 3, "sequence generator type 2 for long sequence lengths"},
1554 { 0, NULL((void*)0)}
1555};
1556
1557/* 7.7.24.18 */
1558static const value_string hopping_mode_vals[] = {
1559 { 0, "neither group, nor sequence hopping is enabled"},
1560 { 1, "group hopping is enabled and sequence hopping is disabled"},
1561 { 2, "sequence hopping is enabled and group hopping is disabled"},
1562 { 3, "reserved"},
1563 { 0, NULL((void*)0)}
1564};
1565
1566/* Table 7.7.31.2-1 */
1567static const value_string mcs_table_vals[] = {
1568 { 0, "MCS index table 1 for PDSCH and PUSCH without transform precoding" },
1569 { 1, "MCS index table 2 for PDSCH and PUSCH without transform precoding" },
1570 { 2, "MCS index table 3 for PDSCH and PUSCH without transform precoding" },
1571 { 3, "MCS index table 4 for PDSCH" },
1572 { 4, "MCS index table for PUSCH with transform precoding and 64QAM" },
1573 { 5, "MCS index table 2 for PUSCH with transform precoding and 64QAM" },
1574 { 0, NULL((void*)0)}
1575};
1576
1577/* 7.7.32.9 */
1578static const value_string full_pwr_mode_vals[] = {
1579 { 0, "not configured"},
1580 { 1, "full power mode 0"},
1581 { 2, "full power mode 1"},
1582 { 3, "full power mode 2"},
1583 { 0, NULL((void*)0)}
1584};
1585
1586static const value_string srs_rbg_size_vals[] = {
1587 { 0, "4 PRBs"},
1588 { 1, "1 PRB"},
1589 { 2, "2 PRBs"},
1590 { 3, "reserved"},
1591 { 0, NULL((void*)0)}
1592};
1593
1594static const value_string srs_tx_comb_vals[] = {
1595 { 0, "2 REs"},
1596 { 1, "4 REs"},
1597 { 2, "reserved"},
1598 { 3, "reserved"},
1599 { 0, NULL((void*)0)}
1600};
1601
1602
1603static const true_false_string tfs_sfStatus =
1604{
1605 "subframe was transmitted",
1606 "subframe was dropped"
1607};
1608
1609static const true_false_string tfs_lbtBufErr =
1610{
1611 "buffer overflow – data received at O-RU is larger than the available buffer size",
1612 "reserved"
1613};
1614
1615static const true_false_string tfs_partial_full_sf = {
1616 "partial SF",
1617 "full SF"
1618};
1619
1620static const true_false_string disable_tdbfns_tfs = {
1621 "beam numbers excluded",
1622 "beam numbers included"
1623};
1624
1625static const true_false_string continuity_indication_tfs = {
1626 "continuity between current and next bundle",
1627 "discontinuity between current and next bundle"
1628};
1629
1630static const true_false_string prb_mode_tfs = {
1631 "PRB-BLOCK mode",
1632 "PRB-MASK mode"
1633};
1634
1635static const true_false_string symbol_direction_tfs = {
1636 "DL symbol",
1637 "UL symbol"
1638};
1639
1640static const true_false_string symbol_guard_tfs = {
1641 "guard symbol",
1642 "non-guard symbol"
1643};
1644
1645static const true_false_string beam_numbers_included_tfs = {
1646 "time-domain beam numbers excluded in this command",
1647 "time-domain beam numbers included in this command"
1648};
1649
1650static const true_false_string measurement_flag_tfs = {
1651 "at least one additional measurement report or command after the current one",
1652 "no additional measurement report or command"
1653};
1654
1655static const true_false_string repetition_se6_tfs = {
1656 "repeated highest priority data section in the C-Plane message",
1657 "no repetition"
1658};
1659
1660static const true_false_string repetition_se19_tfs = {
1661 "per port information not present in the extension",
1662 "per port info present in the extension"
1663};
1664
1665static const true_false_string tfs_report_no_report_pos_meas =
1666{
1667 "Report MEAS_UE_POS for UE",
1668 "Do not report UE_POS for UE"
1669};
1670
1671static const true_false_string tfs_allocated_not_allocated =
1672{
1673 "allocated",
1674 "not allocated"
1675};
1676
1677
1678
1679/* Forward declaration */
1680static int dissect_udcompparam(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree, unsigned offset,
1681 unsigned comp_meth,
1682 uint32_t *exponent, uint16_t *sReSMask, bool_Bool for_sinr);
1683
1684
1685static const true_false_string ready_tfs = {
1686 "message is a \"ready\" message",
1687 "message is a ACK message"
1688};
1689
1690static const true_false_string multi_sd_scope_tfs = {
1691 "Puncturing pattern applies to current and following sections",
1692 "Puncturing pattern applies to current section"
1693};
1694
1695static const true_false_string tfs_ueid_reset = {
1696 "cannot assume same UE as in preceding slot",
1697 "can assume same UE as in preceding slot"
1698};
1699
1700
1701typedef struct {
1702 uint32_t start; /* first prb of bundle */
1703 uint32_t end; /* last prb of bundle*/
1704 bool_Bool is_orphan; /* true if not complete (i.e., end-start < numBundPrb) */
1705 uint8_t bit_from_rbg_mask; /* 0 means not set, other bits offset by 1 */
1706} bundle_t;
1707
1708
1709/* Config for (and later, worked-out allocations) bundles for ext11 (dynamic BFW) */
1710typedef struct {
1711 /* Ext 6 config */
1712 bool_Bool ext6_set;
1713 uint8_t ext6_rbg_size; /* number of PRBs in resource block group (i.e., one bit in bitmask) */
1714
1715 uint8_t ext6_num_bits_set; /* Total number of rbgMask bits set */
1716 uint8_t ext6_bits_set[28]; /* Which bit position this entry has */
1717 /* TODO: store an f value for each bit position? */
1718
1719 /* Ext 12 config */
1720 bool_Bool ext12_set;
1721 unsigned ext12_num_pairs;
1722#define MAX_BFW_EXT12_PAIRS128 128
1723 struct {
1724 uint8_t off_start_prb;
1725 uint8_t num_prb;
1726 } ext12_pairs[MAX_BFW_EXT12_PAIRS128];
1727
1728 /* Ext 13 config */
1729 bool_Bool ext13_set;
1730 unsigned ext13_num_start_prbs;
1731#define MAX_BFW_EXT13_ALLOCATIONS128 128
1732 unsigned ext13_start_prbs[MAX_BFW_EXT13_ALLOCATIONS128];
1733 /* TODO: store nextSymbolId here too? */
1734
1735 /* Ext 21 config */
1736 bool_Bool ext21_set;
1737 uint8_t ext21_ci_prb_group_size;
1738
1739 /* Results/settings (after calling ext11_work_out_bundles()) */
1740 uint32_t num_bundles;
1741#define MAX_BFW_BUNDLES512 512
1742 bundle_t bundles[MAX_BFW_BUNDLES512];
1743} ext11_settings_t;
1744
1745
1746/* Work out bundle allocation for ext 11. Take into account ext6/ext21, ext12 or ext13 in this section before ext 11. */
1747/* Won't be called with numBundPrb=0 */
1748static void ext11_work_out_bundles(unsigned startPrbc,
1749 unsigned numPrbc,
1750 unsigned numBundPrb, /* number of PRBs per (full) bundle */
1751 ext11_settings_t *settings)
1752{
1753 /* Allocation configured by ext 6 */
1754 if (settings->ext6_set) {
1755 unsigned bundles_per_mask_bit = (settings->ext6_rbg_size / numBundPrb);
1756
1757 /* Need to cope with these not dividing exactly, or even having more PRbs in a bundle that
1758 rbg size. i.e. each bundle gets the correct number of PRBs until
1759 all rbg entries are consumed... */
1760
1761 /* TODO: need to check 7.9.4.2. Different cases depending upon value of RAD */
1762
1763 if (bundles_per_mask_bit == 0) {
1764 bundles_per_mask_bit = 1;
1765 }
1766
1767 /* Ext6 behaviour may also be affected by ext 21 */
1768 if (settings->ext21_set) {
1769 /* N.B., have already checked that numPrbc is not 0 */
1770
1771 /* ciPrbGroupSize overrides number of contiguous PRBs in group */
1772 bundles_per_mask_bit = (settings->ext6_rbg_size / settings->ext21_ci_prb_group_size);
1773
1774 /* numPrbc is the number of PRB groups per antenna - handled in call to dissect_bfw_bundle() */
1775 }
1776
1777 unsigned bundles_set = 0;
1778 bool_Bool reached_orphan = false0;
1779
1780 /* For each bit set in ext6 rbg mask.. */
1781 for (unsigned n=0;
1782 !reached_orphan && n < 28 && n < settings->ext6_num_bits_set;
1783 n++) {
1784
1785 /* For each bundle... */
1786
1787 /* TODO: Work out where first PRB is */
1788 /* May not be the start of an rbg block... */
1789 uint32_t prb_start = (settings->ext6_bits_set[n] * settings->ext6_rbg_size);
1790
1791 /* For each bundle within identified rbgSize block */
1792 for (unsigned m=0; !reached_orphan && m < bundles_per_mask_bit; m++) {
1793
1794 settings->bundles[bundles_set].start = startPrbc+prb_start+(m*numBundPrb);
1795
1796 /* Start already beyond end, so doesn't count. */
1797 if (settings->bundles[bundles_set].start > (startPrbc+numPrbc-1)) {
1798 settings->num_bundles = bundles_set;
1799 return;
1800 }
1801
1802 /* Bundle consists of numBundPrb bundles */
1803 /* TODO: may involve PRBs from >1 rbg blocks.. */
1804 settings->bundles[bundles_set].end = startPrbc+prb_start+((m+1)*numBundPrb)-1;
1805 if (settings->bundles[bundles_set].end > (startPrbc+numPrbc-1)) {
1806 /* Extends beyond end, so counts but is an orphan bundle */
1807 settings->bundles[bundles_set].end = startPrbc+numPrbc-1;
1808 settings->bundles[bundles_set].is_orphan = true1;
1809 reached_orphan = true1;
1810 }
1811
1812 /* Record which rbg this bundle comes from (+1) */
1813 settings->bundles[bundles_set].bit_from_rbg_mask = settings->ext6_bits_set[n]+1;
1814
1815 /* Get out if have reached array bound */
1816 if (++bundles_set == MAX_BFW_BUNDLES512) {
1817 return;
1818 }
1819 }
1820 }
1821 settings->num_bundles = bundles_set;
1822 }
1823
1824 /* Allocation configured by ext 12 */
1825 else if (settings->ext12_set) {
1826 /* First, allocate normally from startPrbc, numPrbc */
1827 settings->num_bundles = (numPrbc+numBundPrb-1) / numBundPrb;
1828
1829 /* Don't overflow settings->bundles[] ! */
1830 settings->num_bundles = MIN(MAX_BFW_BUNDLES, settings->num_bundles)(((512) < (settings->num_bundles)) ? (512) : (settings->
num_bundles))
;
1831
1832 for (uint32_t n=0; n < settings->num_bundles; n++) {
1833 settings->bundles[n].start = startPrbc + n*numBundPrb;
1834 settings->bundles[n].end = settings->bundles[n].start + numBundPrb-1;
1835 /* Does it go beyond the end? */
1836 if (settings->bundles[n].end > startPrbc+numPrbc-1) {
1837 settings->bundles[n].end = startPrbc+numPrbc-1;
1838 settings->bundles[n].is_orphan = true1;
1839 }
1840 }
1841 if (settings->num_bundles == MAX_BFW_BUNDLES512) {
1842 return;
1843 }
1844
1845 unsigned prb_offset = startPrbc + numPrbc;
1846
1847 /* Loop over pairs, adding bundles for each */
1848 for (unsigned p=0; p < settings->ext12_num_pairs; p++) {
1849 prb_offset += settings->ext12_pairs[p].off_start_prb;
1850 unsigned pair_bundles = (settings->ext12_pairs[p].num_prb+numBundPrb-1) / numBundPrb;
1851
1852 for (uint32_t n=0; n < pair_bundles; n++) {
1853 unsigned idx = settings->num_bundles;
1854
1855 settings->bundles[idx].start = prb_offset + n*numBundPrb;
1856 settings->bundles[idx].end = settings->bundles[idx].start + numBundPrb-1;
1857 /* Does it go beyond the end? */
1858 if (settings->bundles[idx].end > prb_offset + settings->ext12_pairs[p].num_prb - 1) {
1859 settings->bundles[idx].end = prb_offset + settings->ext12_pairs[p].num_prb - 1;
1860 settings->bundles[idx].is_orphan = true1;
1861 }
1862 /* Range check / return */
1863 settings->num_bundles++;
1864 if (settings->num_bundles == MAX_BFW_BUNDLES512) {
1865 return;
1866 }
1867 }
1868
1869 prb_offset += settings->ext12_pairs[p].num_prb;
1870 }
1871 }
1872
1873 /* Allocation configured by ext 13 */
1874 else if (settings->ext13_set) {
1875 unsigned alloc_size = (numPrbc+numBundPrb-1) / numBundPrb;
1876 settings->num_bundles = alloc_size * settings->ext13_num_start_prbs;
1877
1878 /* Don't overflow settings->bundles[] ! */
1879 settings->num_bundles = MIN(MAX_BFW_BUNDLES, settings->num_bundles)(((512) < (settings->num_bundles)) ? (512) : (settings->
num_bundles))
;
1880
1881 for (unsigned alloc=0; alloc < settings->ext13_num_start_prbs; alloc++) {
1882 unsigned alloc_start = alloc * alloc_size;
1883 for (uint32_t n=0; n < alloc_size; n++) {
1884 if ((alloc_start+n) >= MAX_BFW_BUNDLES512) {
1885 /* ERROR */
1886 return;
1887 }
1888 settings->bundles[alloc_start+n].start = settings->ext13_start_prbs[alloc] + startPrbc + n*numBundPrb;
1889 settings->bundles[alloc_start+n].end = settings->bundles[alloc_start+n].start + numBundPrb-1;
1890 if (settings->bundles[alloc_start+n].end > settings->ext13_start_prbs[alloc] + startPrbc + numPrbc - 1) {
1891 settings->bundles[alloc_start+n].end = settings->ext13_start_prbs[alloc] + startPrbc + numPrbc - 1;
1892 settings->bundles[alloc_start+n].is_orphan = true1;
1893 }
1894 }
1895 }
1896 }
1897
1898 /* Case where bundles are not controlled by other extensions - just divide up range into bundles we have */
1899 else {
1900 settings->num_bundles = (numPrbc+numBundPrb-1) / numBundPrb; /* rounded up */
1901
1902 /* Don't overflow settings->bundles[] */
1903 settings->num_bundles = MIN(MAX_BFW_BUNDLES, settings->num_bundles)(((512) < (settings->num_bundles)) ? (512) : (settings->
num_bundles))
;
1904
1905 /* For each bundle.. */
1906 for (uint32_t n=0; n < settings->num_bundles; n++) {
1907 /* Allocate start and end */
1908 settings->bundles[n].start = startPrbc + n*numBundPrb;
1909 settings->bundles[n].end = settings->bundles[n].start + numBundPrb - 1;
1910 /* If would go beyond end of PRBs, limit and identify as orphan */
1911 if (settings->bundles[n].end > startPrbc+numPrbc-1) {
1912 settings->bundles[n].end = startPrbc+numPrbc-1;
1913 settings->bundles[n].is_orphan = true1;
1914 }
1915 }
1916 }
1917}
1918
1919
1920/* Modulation Compression configuration */
1921typedef struct {
1922 /* Application of each entry is filtered by RE.
1923 * TODO: should also be filtered by PRB + symbol... */
1924 uint16_t mod_compr_re_mask;
1925
1926 /* Settings to apply */
1927 bool_Bool mod_compr_csf;
1928 float mod_compr_scaler;
1929} mod_compr_config_t;
1930
1931/* Multiple configs with a section */
1932typedef struct {
1933 uint16_t section_id;
1934 uint32_t num_configs;
1935
1936 #define MAX_MOD_COMPR_CONFIGS12 12
1937 mod_compr_config_t configs[MAX_MOD_COMPR_CONFIGS12];
1938} section_mod_compr_config_t;
1939
1940/* Flow has separate configs for each section */
1941typedef struct {
1942 uint16_t num_sections;
1943
1944 /* Separate config for each section */
1945 section_mod_compr_config_t sections[MAX_SECTION_IDs32];
1946} mod_compr_params_t;
1947
1948
1949typedef struct {
1950 uint32_t frame_number;
1951 nstime_t frame_time;
1952
1953 /* Timing to match */
1954 uint8_t frame;
1955 uint8_t subframe;
1956 uint8_t slot;
1957 uint8_t startSymbol;
1958
1959 bool_Bool in_use;
1960 uint16_t startPrb;
1961 uint16_t numPrb;
1962 uint16_t numSymbols;
1963 /* beamId of the section, covering startPrb..startPrb+numPrb (and 0 elsewhere) */
1964 uint16_t beamId;
1965 /* Per-PRB beamIds, only allocated (file scope) when an extension sets
1966 * different beamIds for ranges of PRBs. Never modified once a U-plane
1967 * frame may have copied this struct (a new array is allocated for each
1968 * C-plane definition), so the copy can be shallow. */
1969 uint16_t *beamIds;
1970} section_details_t;
1971
1972#define ORAN_MAX_PRBS273 273
1973
1974/* BeamId to use for the given PRB of this section */
1975static uint16_t
1976section_details_get_beam_id(const section_details_t *details, unsigned prb)
1977{
1978 if (details->beamIds) {
1979 return details->beamIds[prb];
1980 }
1981 if (prb >= details->startPrb && prb <= (unsigned)details->startPrb + details->numPrb) {
1982 return details->beamId;
1983 }
1984 return 0;
1985}
1986
1987/* Set beamId of one PRB (C-plane only, on first pass) */
1988static void
1989section_details_set_beam_id(section_details_t *details, unsigned prb, uint16_t beam_id)
1990{
1991 if (prb >= ORAN_MAX_PRBS273) {
1992 return;
1993 }
1994 if (!details->beamIds) {
1995 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))))))
;
1996 /* Keep the scalar fallback active until every entry is initialized. */
1997 for (unsigned n = 0; n < ORAN_MAX_PRBS273; n++) {
1998 beam_ids[n] = section_details_get_beam_id(details, n);
1999 }
2000 details->beamIds = beam_ids;
2001 }
2002 details->beamIds[prb] = beam_id;
2003}
2004
2005typedef struct {
2006 uint16_t sectionId;
2007 /* For the same sectionId, can have 2 currently active entries.. */
2008 section_details_t details[2];
2009} expected_section_data_t;
2010
2011
2012/*******************************************************/
2013/* Overall state of a flow (eAxC/plane) */
2014typedef struct {
2015 /* State for sequence analysis [each direction] */
2016 bool_Bool last_frame_seen[2];
2017 uint32_t last_frame[2];
2018 uint8_t next_expected_sequence_number[2];
2019
2020 /* expected frames. sectionId -> expected_section_data_t* */
2021 wmem_tree_t *expected_sections[2]; /* [direction] */
2022
2023 /* Table recording ackNack requests (ackNackId -> ack_nack_request_t*)
2024 Note that this assumes that the same ackNackId will not be reused within a state,
2025 which may well not be valid */
2026 wmem_tree_t *ack_nack_requests;
2027
2028 /* Store udCompHdr seen in C-Plane for UL - can be looked up and used by U-PLane.
2029 Note that this appears in the common section header parts of ST1, ST3, ST5,
2030 so can still be over-written per sectionId in the U-Plane */
2031 unsigned ul_ud_comp_hdr_frame;
2032 bool_Bool ul_ud_comp_hdr_set;
2033 unsigned ul_ud_comp_hdr_bit_width;
2034 int ul_ud_comp_hdr_compression;
2035
2036 bool_Bool udcomphdrDownlink_heuristic_result_set;
2037 bool_Bool udcomphdrDownlink_heuristic_result;
2038 bool_Bool udcomphdrUplink_heuristic_result_set;
2039 bool_Bool udcomphdrUplink_heuristic_result;
2040
2041 /* Modulation compression params */
2042 mod_compr_params_t mod_comp_params;
2043} flow_state_t;
2044
2045static section_mod_compr_config_t* get_mod_compr_section_to_write(packet_info *pinfo, flow_state_t *flow,
2046 unsigned sectionId)
2047{
2048 /* Only record configs on the first pass */
2049 if (flow == NULL((void*)0) || PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
2050 return NULL((void*)0);
2051 }
2052
2053 /* Look for this section among existing entries */
2054 for (unsigned s=0; s < flow->mod_comp_params.num_sections; s++) {
2055 if (flow->mod_comp_params.sections[s].section_id == sectionId) {
2056 return &flow->mod_comp_params.sections[s];
2057 }
2058 }
2059
2060 /* Not found, so try to add a new one */
2061 if (flow->mod_comp_params.num_sections >= MAX_SECTION_IDs32) {
2062 /* Can't allocate one! */
2063 return NULL((void*)0);
2064 }
2065 else {
2066 flow->mod_comp_params.sections[flow->mod_comp_params.num_sections].section_id = sectionId;
2067 return &flow->mod_comp_params.sections[flow->mod_comp_params.num_sections++];
2068 }
2069}
2070
2071static section_mod_compr_config_t* get_mod_compr_section_to_read(flow_state_t *flow,
2072 unsigned sectionId)
2073{
2074 if (flow == NULL((void*)0)) {
2075 return NULL((void*)0);
2076 }
2077
2078 /* Look for this section among existing entries */
2079 for (unsigned s=0; s < flow->mod_comp_params.num_sections; s++) {
2080 if (flow->mod_comp_params.sections[s].section_id == sectionId) {
2081 return &flow->mod_comp_params.sections[s];
2082 }
2083 }
2084
2085 /* Not found */
2086 return NULL((void*)0);
2087}
2088
2089
2090
2091typedef struct {
2092 uint32_t request_frame_number;
2093 nstime_t request_frame_time;
2094 enum {
2095 SE22,
2096 ST4Cmd1,
2097 ST4Cmd2,
2098 ST4Cmd3,
2099 ST4Cmd4,
2100 ST4Cmd5,
2101 ST4Cmd6
2102 } requestType;
2103
2104 uint32_t response_frame_number;
2105 nstime_t response_frame_time;
2106} ack_nack_request_t;
2107
2108static const value_string acknack_type_vals[] = {
2109 { SE22, "SE 22" },
2110 { ST4Cmd1, "ST4 (TIME_DOMAIN_BEAM_CONFIG)" },
2111 { ST4Cmd2, "ST4 (TDD_CONFIG_PATTERN)" },
2112 { ST4Cmd3, "ST4 (TRX_CONTROL)" },
2113 { ST4Cmd4, "ST4 (ASM)" },
2114 { ST4Cmd5, "ST4 (TRX_CONTROL_BIDIR)" },
2115 { ST4Cmd6, "ST4 (MAX_POWER_CONTROL)" },
2116 { 0, NULL((void*)0)}
2117};
2118
2119#define ORAN_C_PLANE0 0
2120#define ORAN_U_PLANE1 1
2121
2122
2123
2124/* Table maintained on first pass from flow_key(uint32_t) -> flow_state_t* */
2125static wmem_tree_t *flow_states_table;
2126
2127
2128/* Includes transport details (eth addresses + vlan) */
2129/* First and last bytes of the Ethernet source and destination, in the order of the flow */
2130static uint32_t flow_key_addresses(packet_info *pinfo, bool_Bool opposite_dir)
2131{
2132 uint32_t word = 0;
2133 const uint8_t *src_eth = (pinfo->dl_src.type == AT_ETHER) ? (const uint8_t*)pinfo->dl_src.data : NULL((void*)0);
2134 const uint8_t *dst_eth = (pinfo->dl_dst.type == AT_ETHER) ? (const uint8_t*)pinfo->dl_dst.data : NULL((void*)0);
2135
2136 if (!opposite_dir) {
2137 if (src_eth) {
2138 word |= src_eth[5] | (src_eth[0] << 8);
2139 }
2140 if (dst_eth) {
2141 word |= (dst_eth[5] << 16) | (dst_eth[0] << 24);
2142 }
2143 }
2144 else {
2145 if (src_eth) {
2146 word |= (src_eth[5] << 16) | (src_eth[0] << 24);
2147 }
2148 if (dst_eth) {
2149 word |= dst_eth[5] | (dst_eth[0] << 8);
2150 }
2151 }
2152 return word;
2153}
2154
2155static flow_state_t* lookup_flow(packet_info *pinfo, uint16_t eaxc_id, uint8_t plane, bool_Bool opposite_dir)
2156{
2157 wmem_tree_key_t key[3];
2158 uint32_t word1, word2;
2159
2160 /* 1st value is vlan_id(15) | plane(1) | eaxc_id(16) */
2161 word1 = eaxc_id | (plane << 16) | (pinfo->vlan_id << 17);
2162 key[0].length = 1;
2163 key[0].key = &word1;
2164
2165 /* 2nd word is first/last bytes of eth src/dst */
2166 word2 = flow_key_addresses(pinfo, opposite_dir);
2167 key[1].length = 1;
2168 key[1].key = &word2;
2169 key[2].length = 0;
2170 key[2].key = NULL((void*)0);
2171
2172 return (flow_state_t*)wmem_tree_lookup32_array(flow_states_table, key);
2173}
2174
2175static void store_flow(packet_info *pinfo, uint16_t eaxc_id, uint8_t plane, bool_Bool opposite_dir, flow_state_t *state)
2176{
2177 wmem_tree_key_t key[3];
2178 uint32_t word1, word2;
2179
2180 /* 1st value is vlan_id(15) | plane(1) | eaxc_id(16) */
2181 word1 = eaxc_id | (plane << 16) | (pinfo->vlan_id << 17);
2182 key[0].length = 1;
2183 key[0].key = &word1;
2184
2185 /* 2nd word is first/last bytes of eth src/dst */
2186 word2 = flow_key_addresses(pinfo, opposite_dir);
2187 key[1].length = 1;
2188 key[1].key = &word2;
2189 key[2].length = 0;
2190 key[2].key = NULL((void*)0);
2191
2192 wmem_tree_insert32_array(flow_states_table, key, state);
2193}
2194
2195
2196
2197
2198typedef struct {
2199 uint32_t frame_number;
2200 uint16_t sectionId;
2201 uint32_t gap_in_usecs;
2202 uint8_t symbol;
2203 uint16_t startPrbu;
2204 uint16_t numPrbu;
2205} corresponding_uplane_frame;
2206
2207/* Table consulted on subsequent passes: frame_num -> flow_result_t* */
2208static wmem_tree_t *flow_results_table;
2209
2210typedef struct {
2211 /* Sequence analysis */
2212 bool_Bool unexpected_seq_number;
2213 uint8_t expected_sequence_number;
2214 uint32_t previous_frame;
2215
2216 /* sectionId -> expected_section_data_t* */
2217 /* Frame only covers one downlink (no modulation compression in UL) */
2218 wmem_tree_t *expected_sections;
2219
2220 /* List of u-plane frames (corresponding_uplane_frame*) corresponding to a c-plane frame */
2221 wmem_list_t *u_plane_frames;
2222
2223 /* Whether a C-plane flow had been seen when a u-plane frame was first seen */
2224 bool_Bool cplane_seen;
2225
2226 /* UL udCompHdr settings from the C-plane when a UL u-plane frame was first seen */
2227 bool_Bool ul_ud_comp_hdr_set;
2228 unsigned ul_ud_comp_hdr_bit_width;
2229 int ul_ud_comp_hdr_compression;
2230 unsigned ul_ud_comp_hdr_frame;
2231} flow_result_t;
2232
2233
2234/* Uplink timing */
2235/* For a given symbol, track first to last UL frame to find out first-last time */
2236/* frameId (8) + subframeId (4) + slotId (6) + symbolId (6) = 24 bits */
2237/* N.B. if a capture lasts > 2.5s, may see same timing come around again... */
2238static uint32_t get_timing_key(uint8_t frameId, uint8_t subframeId, uint8_t slotId, uint8_t symbolId)
2239{
2240 return symbolId + (slotId<<8) + (subframeId<<14) + (frameId<<18);
2241}
2242
2243typedef struct {
2244 uint32_t first_frame;
2245 nstime_t first_frame_time;
2246 uint32_t frames_seen_in_symbol;
2247 uint32_t last_frame_in_symbol;
2248} ul_timing_for_slot;
2249
2250/* Set during first pass. timing_key -> ul_timing_for_slot* */
2251static wmem_tree_t *ul_symbol_timing;
2252
2253
2254/* Tracking lifetimes of DL beamIds */
2255typedef struct {
2256 uint32_t frame_defined;
2257 uint32_t symbol_when_defined;
2258} bfw_definition;
2259
2260/* Maintained during first pass: beamId (from ext11) -> bfw_definition */
2261static wmem_tree_t *dl_beam_ids_defined;
2262/* Lookup where/when beamIds were defined (frameid:beamid) -> bfw_definition */
2263static wmem_tree_t *dl_beam_ids_results;
2264
2265
2266static void show_link_to_acknack_response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
2267 ack_nack_request_t *response);
2268
2269
2270
2271
2272static void write_pdu_label_and_info(proto_item *ti1, proto_item *ti2,
2273 packet_info *pinfo, const char *format, ...) G_GNUC_PRINTF(4, 5)__attribute__((__format__ (__printf__, 4, 5)));
2274
2275 /* Write the given formatted text to:
2276 - the info column (if pinfo != NULL)
2277 - 1 or 2 other labels (optional)
2278 */
2279static void write_pdu_label_and_info(proto_item *ti1, proto_item *ti2,
2280 packet_info *pinfo, const char *format, ...)
2281{
2282#define MAX_INFO_BUFFER256 256
2283 char info_buffer[MAX_INFO_BUFFER256];
2284 va_list ap;
2285
2286 if ((ti1 == NULL((void*)0)) && (ti2 == NULL((void*)0)) && (pinfo == NULL((void*)0))) {
2287 return;
2288 }
2289
2290 va_start(ap, format)__builtin_va_start(ap, format);
2291 vsnprintf(info_buffer, MAX_INFO_BUFFER256, format, ap);
2292 va_end(ap)__builtin_va_end(ap);
2293
2294 /* Add to indicated places */
2295 if (pinfo != NULL((void*)0)) {
2296 col_append_str(pinfo->cinfo, COL_INFO, info_buffer);
2297 }
2298 if (ti1 != NULL((void*)0)) {
2299 proto_item_append_text(ti1, "%s", info_buffer);
2300 }
2301 if (ti2 != NULL((void*)0)) {
2302 proto_item_append_text(ti2, "%s", info_buffer);
2303 }
2304}
2305
2306/* Add section labels (type + PRB range) for C-Plane, U-Plane */
2307static void
2308write_section_info(proto_item *section_heading, packet_info *pinfo, proto_item *protocol_item,
2309 uint32_t section_id, uint32_t start_prbx, uint32_t num_prbx, uint32_t rb)
2310{
2311 switch (num_prbx) {
2312 case 0:
2313 /* None -> all */
2314 write_pdu_label_and_info(section_heading, protocol_item, pinfo, ", Id: %4d (all PRBs)", section_id);
2315 break;
2316 case 1:
2317 /* Single PRB */
2318 write_pdu_label_and_info(section_heading, protocol_item, pinfo, ", Id: %4d (PRB: %7u)", section_id, start_prbx);
2319 break;
2320 default:
2321 /* Range */
2322 write_pdu_label_and_info(section_heading, protocol_item, pinfo, ", Id: %4d (PRB: %3u-%3u%s)", section_id, start_prbx,
2323 start_prbx + (num_prbx-1)*(1+rb), rb ? " (every-other)" : "");
2324 }
2325}
2326
2327static void
2328write_channel_section_info(proto_item *section_heading, packet_info *pinfo,
2329 uint32_t section_id, uint32_t ueId, uint32_t start_prbx, uint32_t num_prbx,
2330 uint32_t num_trx)
2331{
2332 switch (num_prbx) {
2333 case 0:
2334 /* TODO: ?? */
2335 break;
2336 case 1:
2337 /* Single PRB */
2338 write_pdu_label_and_info(section_heading, NULL((void*)0), pinfo,
2339 ", Id: %4d (UEId=%5u PRB %7u, %2u antennas)",
2340 section_id, ueId, start_prbx, num_trx);
2341 break;
2342 default:
2343 /* Range */
2344 write_pdu_label_and_info(section_heading, NULL((void*)0), pinfo,
2345 ", Id: %4d (UEId=%5u PRBs %3u-%3u, %2u antennas)",
2346 section_id, ueId, start_prbx, start_prbx+num_prbx-1, num_trx);
2347 }
2348}
2349
2350/* Add a reserved field, and warn if value isn't 0 */
2351/* TODO: maybe add a pref not to output expert warning if becomes too annoying? */
2352static void add_reserved_field(proto_tree *tree, int hf, tvbuff_t *tvb, int offset, int len)
2353{
2354 uint32_t reserved;
2355 proto_item *res_ti = proto_tree_add_item_ret_uint(tree, hf, tvb, offset, len, ENC_NA0x00000000, &reserved);
2356 if (reserved != 0) {
2357 expert_add_info_format(NULL((void*)0), res_ti, &ei_oran_reserved_not_zero,
2358 "reserved field saw value of 0x%x", reserved);
2359 }
2360}
2361
2362/* 5.1.3.2.7 (real time control data / IQ data transfer message series identifier) */
2363static void
2364addPcOrRtcid(tvbuff_t *tvb, proto_tree *tree, unsigned *offset, int hf, uint16_t *eAxC, oran_tap_info *tap_info)
2365{
2366 /* Subtree */
2367 proto_item *oran_pcid_ti = proto_tree_add_item(tree, hf,
2368 tvb, *offset, 2, ENC_NA0x00000000);
2369 proto_tree *oran_pcid_tree = proto_item_add_subtree(oran_pcid_ti, ett_oran_ecpri_pcid);
2370
2371 uint64_t duPortId, bandSectorId, ccId, ruPortId = 0;
2372 int id_offset = *offset;
2373
2374 /* All parts of eAxC should be above 0, and should total 16 bits (breakdown controlled by preferences) */
2375 if (!((pref_du_port_id_bits > 0) && (pref_bandsector_id_bits > 0) && (pref_cc_id_bits > 0) && (pref_ru_port_id_bits > 0) &&
2376 ((pref_du_port_id_bits + pref_bandsector_id_bits + pref_cc_id_bits + pref_ru_port_id_bits) == 16))) {
2377 expert_add_info(NULL((void*)0), tree, &ei_oran_invalid_eaxc_bit_width);
2378 *eAxC = 0;
2379 *offset += 2;
2380 return;
2381 }
2382
2383 unsigned bit_offset = *offset * 8;
2384
2385 /* N.B. For sequence analysis / tapping, just interpret these 2 bytes as eAxC ID... */
2386 *eAxC = tvb_get_uint16(tvb, *offset, ENC_BIG_ENDIAN0x00000000);
2387
2388 /* DU Port ID */
2389 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);
2390 bit_offset += pref_du_port_id_bits;
2391 /* BandSector ID */
2392 proto_tree_add_bits_ret_val(oran_pcid_tree, hf_oran_bandsector_id, tvb, bit_offset, pref_bandsector_id_bits, &bandSectorId, ENC_BIG_ENDIAN0x00000000);
2393 bit_offset += pref_bandsector_id_bits;
2394 /* CC ID */
2395 proto_tree_add_bits_ret_val(oran_pcid_tree, hf_oran_cc_id, tvb, bit_offset, pref_cc_id_bits, &ccId, ENC_BIG_ENDIAN0x00000000);
2396 bit_offset += pref_cc_id_bits;
2397 /* RU Port ID */
2398 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);
2399 *offset += 2;
2400
2401 proto_item_append_text(oran_pcid_ti, " (DU_Port_ID: %d, BandSector_ID: %d, CC_ID: %d, RU_Port_ID: %d)",
2402 (int)duPortId, (int)bandSectorId, (int)ccId, (int)ruPortId);
2403 char id[16];
2404 snprintf(id, 16, "%x:%x:%x:%x", (int)duPortId, (int)bandSectorId, (int)ccId, (int)ruPortId);
2405 proto_item *pi = proto_tree_add_string(oran_pcid_tree, hf_oran_c_eAxC_ID, tvb, id_offset, 2, id);
2406 proto_item_set_generated(pi);
2407
2408 tap_info->eaxc = *eAxC;
2409 tap_info->eaxc_du_port_id = (uint16_t)duPortId;
2410 tap_info->eaxc_bandsector_id = (uint16_t)bandSectorId;
2411 tap_info->eaxc_cc_id = (uint16_t)ccId;
2412 tap_info->eaxc_ru_port_id = (uint16_t)ruPortId;
2413}
2414
2415/* Uniquely identify the U-plane stream that may need to be reassembled */
2416static uint32_t make_reassembly_id(uint32_t seqid, uint16_t eAxC, int direction)
2417{
2418 return ((seqid & 0xff) << 24) | ((direction&1)<<16) | (eAxC & 0xffff);
2419}
2420
2421/* 5.1.3.2.8 ecpriSeqid (message identifier) */
2422/* Return out info that may be used for sequence number analysis and reassembly */
2423static int
2424addSeqid(tvbuff_t *tvb, proto_tree *oran_tree, int offset, int plane, uint32_t *seq_id, proto_item **seq_id_ti,
2425 uint32_t *subseqid, uint32_t *e)
2426{
2427 /* Subtree */
2428 proto_item *seqIdItem = proto_tree_add_item(oran_tree, hf_oran_ecpri_seqid, tvb, offset, 2, ENC_NA0x00000000);
2429 proto_tree *oran_seqid_tree = proto_item_add_subtree(seqIdItem, ett_oran_ecpri_seqid);
2430
2431 /* Sequence ID (8 bits) */
2432 *seq_id_ti = proto_tree_add_item_ret_uint(oran_seqid_tree, hf_oran_sequence_id, tvb, offset, 1, ENC_NA0x00000000, seq_id);
2433 offset += 1;
2434
2435 /* E bit */
2436 proto_tree_add_item_ret_uint(oran_seqid_tree, hf_oran_e_bit, tvb, offset, 1, ENC_NA0x00000000, e);
2437 /* Subsequence ID (7 bits) */
2438 proto_tree_add_item_ret_uint(oran_seqid_tree, hf_oran_subsequence_id, tvb, offset, 1, ENC_NA0x00000000, subseqid);
2439 offset += 1;
2440
2441 /* radio-transport fragmentation not allowed for C-Plane messages */
2442 if (plane == ORAN_C_PLANE0) {
2443 if (*e !=1 || *subseqid != 0) {
2444 expert_add_info(NULL((void*)0), seqIdItem, &ei_oran_radio_fragmentation_c_plane);
2445 }
2446 }
2447
2448 /* Summary */
2449 proto_item_append_text(seqIdItem, " (SeqId: %3d, E: %d, SubSeqId: %d)", *seq_id, *e, *subseqid);
2450 return offset;
2451}
2452
2453static int dissect_symbolmask(tvbuff_t *tvb, proto_tree *tree, int offset, uint32_t *symbol_mask, proto_item **ti)
2454{
2455 uint64_t temp_val;
2456
2457 static int * const symbol_mask_flags[] = {
2458 &hf_oran_symbol_mask_s13,
2459 &hf_oran_symbol_mask_s12,
2460 &hf_oran_symbol_mask_s11,
2461 &hf_oran_symbol_mask_s10,
2462 &hf_oran_symbol_mask_s9,
2463 &hf_oran_symbol_mask_s8,
2464 &hf_oran_symbol_mask_s7,
2465 &hf_oran_symbol_mask_s6,
2466 &hf_oran_symbol_mask_s5,
2467 &hf_oran_symbol_mask_s4,
2468 &hf_oran_symbol_mask_s3,
2469 &hf_oran_symbol_mask_s2,
2470 &hf_oran_symbol_mask_s1,
2471 &hf_oran_symbol_mask_s0,
2472 NULL((void*)0)
2473 };
2474
2475 proto_item *temp_ti = proto_tree_add_bitmask_ret_uint64(tree, tvb, offset,
2476 hf_oran_symbol_mask,
2477 ett_oran_symbol_mask, symbol_mask_flags,
2478 ENC_BIG_ENDIAN0x00000000, &temp_val);
2479 /* Set out parameters */
2480 if (symbol_mask) {
2481 *symbol_mask = (uint32_t)temp_val;
2482 }
2483 if (ti) {
2484 *ti = temp_ti;
2485 }
2486 return offset+2;
2487}
2488
2489/* 7.7.1.2 bfwCompHdr (beamforming weight compression header) */
2490static int dissect_bfwCompHdr(tvbuff_t *tvb, proto_tree *tree, int offset,
2491 uint32_t *iq_width, uint32_t *comp_meth, proto_item **comp_meth_ti)
2492{
2493 /* Subtree */
2494 proto_item *bfwcomphdr_ti = proto_tree_add_string_format(tree, hf_oran_bfwCompHdr,
2495 tvb, offset, 1, "",
2496 "bfwCompHdr");
2497 proto_tree *bfwcomphdr_tree = proto_item_add_subtree(bfwcomphdr_ti, ett_oran_bfwcomphdr);
2498
2499 /* Width and method */
2500 proto_tree_add_item_ret_uint(bfwcomphdr_tree, hf_oran_bfwCompHdr_iqWidth,
2501 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, iq_width);
2502 /* Special case: 0 -> 16 */
2503 *iq_width = (*iq_width==0) ? 16 : *iq_width;
2504 *comp_meth_ti = proto_tree_add_item_ret_uint(bfwcomphdr_tree, hf_oran_bfwCompHdr_compMeth,
2505 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, comp_meth);
2506 offset++;
2507
2508 /* Summary */
2509 proto_item_append_text(bfwcomphdr_ti, " (IqWidth=%u, compMeth=%s)",
2510 *iq_width,
2511 val_to_str_const(*comp_meth, bfw_comp_headers_comp_meth, "reserved"));
2512
2513 return offset;
2514}
2515
2516/* Return offset */
2517/* Returning number of entries set - would be good to also return an array of set TRX# so could show which array element
2518 each BFW is actually for.. */
2519static int dissect_active_beamspace_coefficient_mask(tvbuff_t *tvb, proto_tree *tree, int offset, unsigned *num_trx_entries, uint16_t **trx_entries)
2520{
2521 /* activeBeamspaceCoefficientMask - ceil(K/8) octets */
2522 /* K is the number of elements in uncompressed beamforming weight vector.
2523 * Calculated from parameters describing tx-array or tx-array */
2524 unsigned k_octets = (pref_num_bf_antennas + 7) / 8;
2525
2526 static uint16_t trx_enabled[1024];
2527
2528 /* TODO: could use a bigger bitmask array, but for now just uses this bytes-worth for each byte */
2529 static int * const mask_bits[] = {
2530 &hf_oran_active_beamspace_coefficient_n1,
2531 &hf_oran_active_beamspace_coefficient_n2,
2532 &hf_oran_active_beamspace_coefficient_n3,
2533 &hf_oran_active_beamspace_coefficient_n4,
2534 &hf_oran_active_beamspace_coefficient_n5,
2535 &hf_oran_active_beamspace_coefficient_n6,
2536 &hf_oran_active_beamspace_coefficient_n7,
2537 &hf_oran_active_beamspace_coefficient_n8,
2538 NULL((void*)0)
2539 };
2540
2541 *num_trx_entries = 0;
2542 uint64_t val;
2543 for (unsigned n=0; n < k_octets; n++) {
2544 proto_tree_add_bitmask_ret_uint64(tree, tvb, offset,
2545 hf_oran_activeBeamspaceCoefficientMask,
2546 ett_oran_active_beamspace_coefficient_mask, mask_bits,
2547 ENC_BIG_ENDIAN0x00000000, &val);
2548 offset++;
2549 /* Add up the set bits for this byte (but be careful not to count beyond last real K bit..) */
2550 /* N1 is the most significant bit */
2551 for (unsigned b=0; b < 8; b++) {
2552 if ((0x80 >> b) & (unsigned)val) {
2553 if (((n*8)+b) < pref_num_bf_antennas) {
2554 if (*num_trx_entries < 1024-1) { /* Don't write beyond array (which should be plenty big) */
2555 trx_enabled[(*num_trx_entries)++] = (n*8) + b + 1;
2556 }
2557 }
2558 }
2559 }
2560 }
2561 /* Set pointer to static array */
2562 *trx_entries = trx_enabled;
2563
2564 /* Show how many bits set */
2565 proto_item *ti = proto_tree_add_uint(tree, hf_oran_activeBeamspaceCoefficientMask_bits_set, tvb,
2566 offset-k_octets, k_octets, *num_trx_entries);
2567 proto_item_set_generated(ti);
2568
2569 return offset;
2570}
2571
2572static void add_beam_id_to_tap(oran_tap_info *tap_info, uint16_t beam_id)
2573{
2574 if (tap_info->num_beams < MAX_BEAMS_IN_FRAME32) {
2575 tap_info->beams[tap_info->num_beams++] = beam_id;
2576 }
2577}
2578
2579
2580/* 7.7.1.3 bfwCompParam (beamforming weight compression parameter).
2581 * Depends upon passed-in bfwCompMeth (field may be empty) */
2582static int dissect_bfwCompParam(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset,
2583 proto_item *meth_ti, uint32_t *bfw_comp_method,
2584 uint32_t *exponent, bool_Bool *supported, unsigned *num_trx_entries, uint16_t **trx_entries)
2585{
2586 if (*bfw_comp_method == COMP_NONE0) {
2587 /* Header is absent */
2588 *supported = true1;
2589 return offset;
2590 }
2591
2592 /* Subtree */
2593 proto_item *bfwcompparam_ti = proto_tree_add_string_format(tree, hf_oran_bfwCompParam,
2594 tvb, offset, 1, "",
2595 "bfwCompParam");
2596 proto_tree *bfwcompparam_tree = proto_item_add_subtree(bfwcompparam_ti, ett_oran_bfwcompparam);
2597
2598 proto_item_append_text(bfwcompparam_ti,
2599 " (meth=%s)", val_to_str_const(*bfw_comp_method, bfw_comp_headers_comp_meth, "reserved"));
2600
2601 *num_trx_entries = 0;
2602 *supported = false0;
2603 switch (*bfw_comp_method) {
2604 case COMP_BLOCK_FP1: /* block floating point */
2605 /* 4 reserved bits + exponent */
2606 add_reserved_field(bfwcompparam_tree, hf_oran_reserved_4bits, tvb, offset, 1);
2607 proto_tree_add_item_ret_uint(bfwcompparam_tree, hf_oran_exponent,
2608 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, exponent);
2609 proto_item_append_text(bfwcompparam_ti, " exponent=%u", *exponent);
2610 *supported = true1;
2611 offset++;
2612 break;
2613 case COMP_BLOCK_SCALE2: /* block scaling */
2614 /* Separate into integer and fractional bits? */
2615 proto_tree_add_item(bfwcompparam_tree, hf_oran_blockScaler,
2616 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2617 offset++;
2618 break;
2619 case COMP_U_LAW3: /* u-law */
2620 /* compBitWidth, compShift */
2621 proto_tree_add_item(bfwcompparam_tree, hf_oran_compBitWidth,
2622 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2623 proto_tree_add_item(bfwcompparam_tree, hf_oran_compShift,
2624 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2625 offset++;
2626 break;
2627 case 4: /* beamspace I (BLOCK SCALING) */
2628 /* activeBeamspaceCoefficientMask */
2629 offset = dissect_active_beamspace_coefficient_mask(tvb, bfwcompparam_tree, offset, num_trx_entries, trx_entries);
2630 *bfw_comp_method = COMP_BLOCK_SCALE2;
2631 *supported = false0; /* TODO: true once BLOCK SCALE is supported */
2632 proto_tree_add_item(bfwcompparam_tree, hf_oran_blockScaler,
2633 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2634 offset++;
2635 break;
2636 case 5: /* beamspace II (BLOCK FLOATING POINT) */
2637 /* activeBeamspaceCoefficientMask */
2638 offset = dissect_active_beamspace_coefficient_mask(tvb, bfwcompparam_tree, offset, num_trx_entries, trx_entries);
2639 /* reserved (4 bits) + exponent (4 bits) */
2640 add_reserved_field(bfwcompparam_tree, hf_oran_reserved_4bits, tvb, offset, 1);
2641 proto_tree_add_item_ret_uint(bfwcompparam_tree, hf_oran_exponent, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, exponent);
2642 offset += 1;
2643 *bfw_comp_method = COMP_BLOCK_FP1;
2644 *supported = true1;
2645 break;
2646
2647 default:
2648 /* Not handled */
2649 break;
2650 }
2651
2652 proto_item_set_end(bfwcompparam_ti, tvb, offset);
2653
2654 /* Can't go on if compression scheme not supported */
2655 if (!(*supported) && meth_ti) {
2656 expert_add_info_format(pinfo, meth_ti, &ei_oran_unsupported_bfw_compression_method,
2657 "BFW Compression method %u (%s) not decompressed by dissector",
2658 *bfw_comp_method,
2659 val_to_str_const(*bfw_comp_method, bfw_comp_headers_comp_meth, "reserved"));
2660 }
2661 return offset;
2662}
2663
2664
2665/* Special case for uncompressed value with given iq_width */
2666static float uncompressed_to_float(uint32_t bits, uint32_t iq_width)
2667{
2668 if (iq_width == 0 || iq_width > 16) {
2669 /* Not valid */
2670 return 0.0;
2671 }
2672
2673 uint32_t mask = (1U << (iq_width-1)) - 1;
2674 int32_t i32 = (bits & (1U << (iq_width-1))) ? (int32_t)bits - (int32_t)(1U << iq_width) : (int32_t)bits;
2675
2676 if (show_unscaled_values || mask == 0) {
2677 return (float)i32;
2678 }
2679 return ((float)i32) / (mask);
2680}
2681
2682/* Decompress I/Q value, taking into account method, width, exponent, other input-specific methods */
2683static float decompress_value(uint32_t bits, uint32_t comp_method, uint8_t iq_width,
2684 uint32_t exponent,
2685 /* Modulation compression settings. N.B. should also pass in PRB + symbol? */
2686 section_mod_compr_config_t *m_c_p, uint8_t re)
2687{
2688 switch (comp_method) {
2689 case COMP_NONE0: /* no compression */
2690 return uncompressed_to_float(bits, iq_width);
2691
2692 case COMP_BLOCK_FP1: /* block floating point */
2693 case BFP_AND_SELECTIVE_RE5:
2694 case BFP_AND_SELECTIVE_RE_WITH_MASKS7:
2695 {
2696 /* A.1.3 Block Floating Point Decompression Algorithm */
2697 int32_t cPRB = bits;
2698 uint32_t scaler = 1 << exponent; /* i.e. 2^exponent */
2699
2700 /* Check last bit, in case we need to flip to -ve */
2701 if (cPRB >= (1<<(iq_width-1))) {
2702 cPRB -= (1<<iq_width);
2703 }
2704
2705 /* Unscale (8.1.3.1) */
2706 cPRB *= scaler;
2707 if (show_unscaled_values) {
2708 return (float)cPRB;
2709 }
2710
2711 uint32_t mantissa_scale_factor = 1 << (iq_width-1); /* 2^(mantissabits-1) */
2712 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 */
2713
2714 float ret = cPRB / ((float)(mantissa_scale_factor*exp_scale_factor));
2715 return ret;
2716 }
2717
2718 case COMP_BLOCK_SCALE2:
2719 case COMP_U_LAW3:
2720 /* Not supported! But will be reported as expert info outside of this function! */
2721 return 0.0;
2722
2723 case COMP_MODULATION4:
2724 case MOD_COMPR_AND_SELECTIVE_RE6:
2725 case MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8:
2726 {
2727 /* Described in A.5 (with pseudo code) */
2728 /* N.B., Applies to downlink data only - is not used for BFW */
2729
2730 /* Defaults if not overridden. TODO: what should these be? */
2731 bool_Bool csf = false0;
2732 float mcScaler = (float)(1 << 11);
2733
2734 /* Find csf + mcScaler to use. Non-default configs gleaned from SE 4,5,23 */
2735 /* TODO: should ideally be filtering by symbol and PRB too (as configured from SE23) */
2736 if (re > 0 && m_c_p && m_c_p->num_configs > 0) {
2737 for (unsigned c=0; c<m_c_p->num_configs; c++) {
2738 if (m_c_p->configs[c].mod_compr_re_mask & (1 << (12-re))) {
2739 /* Return first (should be only) found */
2740 csf = m_c_p->configs[c].mod_compr_csf;
2741 mcScaler = m_c_p->configs[c].mod_compr_scaler;
2742 break;
2743 }
2744 }
2745 }
2746
2747 int32_t cPRB = bits;
2748
2749 /* 2) Map iqSample to iqSampleFx */
2750 /* Check last bit, in case we need to flip to -ve */
2751 if (cPRB >= (1<<(iq_width-1))) {
2752 cPRB -= (1<<iq_width);
2753 }
2754 float iqSampleFx = (float)cPRB / (1 << (iq_width-1));
2755
2756
2757 /* 3) or 4) (b) - add unshifted value if csf set */
2758 float csf_to_add = 0.0;
2759 if (csf) {
2760 /* Unshift the constellation point */
2761 csf_to_add = (float)1.0 / (1 << (iq_width));
2762 }
2763 iqSampleFx += csf_to_add;
2764
2765 /* 3) or 4) (c) - unscaling */
2766 float iqSampleScaled = mcScaler * iqSampleFx * (float)sqrt(2);
2767 return iqSampleScaled;
2768 }
2769
2770 default:
2771 /* Not supported! But will be reported as expert info outside of this function! */
2772 return 0.0;
2773 }
2774}
2775
2776/* Out-of-range value used for special case */
2777#define ORPHAN_BUNDLE_NUMBER999 999
2778
2779/* Bundle of PRBs/TRX I/Q samples (ext 11) */
2780static uint32_t dissect_bfw_bundle(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, unsigned offset,
2781 proto_item *comp_meth_ti, uint32_t bfwcomphdr_comp_meth,
2782 section_mod_compr_config_t *mod_compr_params,
2783 uint32_t num_weights_per_bundle,
2784 uint8_t iq_width,
2785 unsigned bundle_number,
2786 bundle_t *bundle,
2787 uint32_t symbol_count,
2788 section_details_t *section_details,
2789 oran_tap_info *tap_info)
2790{
2791 /* Set bundle name */
2792 char bundle_name[32];
2793 if (!bundle->is_orphan) {
2794 snprintf(bundle_name, 32, "Bundle %3u", bundle_number);
2795 }
2796 else {
2797 (void) g_strlcpy(bundle_name, "Orphaned ", 32);
2798 }
2799
2800 /* Create Bundle root */
2801 proto_item *bundle_ti;
2802 if (bundle->start != bundle->end) {
2803 bundle_ti = proto_tree_add_string_format(tree, hf_oran_bfw_bundle,
2804 tvb, offset, 0, "",
2805 "%s: (PRBs %3u-%3u)",
2806 bundle_name,
2807 bundle->start, bundle->end);
2808 }
2809 else {
2810 bundle_ti = proto_tree_add_string_format(tree, hf_oran_bfw_bundle,
2811 tvb, offset, 0, "",
2812 "%s: (PRB %3u)",
2813 bundle_name,
2814 bundle->start);
2815 }
2816 proto_tree *bundle_tree = proto_item_add_subtree(bundle_ti, ett_oran_bfw_bundle);
2817
2818 /* Generated bundle id */
2819 proto_item *bundleid_ti = proto_tree_add_uint(bundle_tree, hf_oran_bfw_bundle_id, tvb, 0, 0,
2820 bundle_number);
2821 proto_item_set_generated(bundleid_ti);
2822 proto_item_set_hidden(bundleid_ti);
2823
2824 /* bfwCompParam */
2825 bool_Bool compression_method_supported = false0;
2826 unsigned exponent = 0;
2827 unsigned num_trx_entries = 0;
2828 uint16_t *trx_entries;
2829 offset = dissect_bfwCompParam(tvb, bundle_tree, pinfo, offset, comp_meth_ti,
2830 &bfwcomphdr_comp_meth, &exponent, &compression_method_supported,
2831 &num_trx_entries, &trx_entries);
2832
2833 /* Create Bundle subtree */
2834 int bit_offset = offset*8;
2835 int bfw_offset;
2836
2837 /* contInd */
2838 proto_tree_add_item(bundle_tree, hf_oran_cont_ind,
2839 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2840 /* beamId */
2841 uint32_t beam_id;
2842 proto_tree_add_item_ret_uint(bundle_tree, hf_oran_beam_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &beam_id);
2843 proto_item_append_text(bundle_ti, " (beamId:%5u) ", beam_id);
2844 bit_offset += 16;
2845 offset += 2;
Value stored to 'offset' is never read
2846 add_beam_id_to_tap(tap_info, beam_id);
2847
2848 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
2849 if (section_details) {
2850 for (unsigned prb = bundle->start; prb <= bundle->end && prb < ORAN_MAX_PRBS273; prb++) {
2851 section_details_set_beam_id(section_details, prb, (uint16_t)beam_id);
2852 }
2853 }
2854 }
2855
2856 /* On first pass, record that beamId was defined here */
2857 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
2858 bfw_definition *definition = wmem_new0(wmem_file_scope(), bfw_definition)((bfw_definition*)wmem_alloc0((wmem_file_scope()), sizeof(bfw_definition
)))
;
2859 definition->frame_defined = pinfo->num;
2860 definition->symbol_when_defined = symbol_count;
2861 wmem_tree_insert32(dl_beam_ids_defined, beam_id, definition);
2862 }
2863
2864
2865 /* Number of weights per bundle (from preference) */
2866 proto_item *wpb_ti = proto_tree_add_uint(bundle_tree, hf_oran_num_weights_per_bundle, tvb, 0, 0,
2867 num_weights_per_bundle);
2868 proto_item_set_generated(wpb_ti);
2869
2870 /* Add the weights for this bundle. Overwrite with what was seen in bfwCompParam if beamspace */
2871 if (num_trx_entries != 0) {
2872 num_weights_per_bundle = num_trx_entries;
2873 }
2874
2875 bool_Bool non_zero_weights_seen = false0;
2876 int bit_offset_before_weights = bit_offset;
2877 for (unsigned w=0; w < num_weights_per_bundle; w++) {
2878
2879 uint16_t trx_index = (num_trx_entries) ? trx_entries[w] : w+1;
2880
2881 /* Create subtree */
2882 bfw_offset = bit_offset / 8;
2883 uint8_t bfw_extent = ((bit_offset + (iq_width*2)) / 8) - bfw_offset;
2884 proto_item *bfw_ti = proto_tree_add_string_format(bundle_tree, hf_oran_bfw,
2885 tvb, bfw_offset, bfw_extent,
2886 "", "TRX %3u: (", trx_index);
2887 proto_tree *bfw_tree = proto_item_add_subtree(bfw_ti, ett_oran_bfw);
2888
2889 /* I */
2890 /* Get bits, and convert to float. */
2891 uint32_t bits = tvb_get_bits32(tvb, bit_offset, iq_width, ENC_BIG_ENDIAN0x00000000);
2892 if (bits) {
2893 non_zero_weights_seen = true1;
2894 }
2895 float value = decompress_value(bits, bfwcomphdr_comp_meth, iq_width,
2896 exponent, mod_compr_params, 0 /* RE */);
2897 /* Add to tree. */
2898 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);
2899 bit_offset += iq_width;
2900 proto_item_append_text(bfw_ti, "I%u=%f ", w, value);
2901
2902 /* Q */
2903 /* Get bits, and convert to float. */
2904 bits = tvb_get_bits32(tvb, bit_offset, iq_width, ENC_BIG_ENDIAN0x00000000);
2905 if (bits) {
2906 non_zero_weights_seen = true1;
2907 }
2908
2909 value = decompress_value(bits, bfwcomphdr_comp_meth, iq_width,
2910 exponent, mod_compr_params, 0 /* RE */);
2911 /* Add to tree. */
2912 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);
2913 bit_offset += iq_width;
2914 proto_item_append_text(bfw_ti, "Q%u=%f)", w, value);
2915 }
2916
2917 if (!non_zero_weights_seen) {
2918 proto_tree_add_item(bundle_tree, hf_oran_bundle_weights_all_zero, tvb,
2919 bit_offset_before_weights/8, (bit_offset+7)/8 - (bit_offset_before_weights/8), ENC_NA0x00000000);
2920 }
2921
2922 if (bundle->bit_from_rbg_mask) {
2923 proto_item_append_text(bundle_ti, " (rbg %u)", bundle->bit_from_rbg_mask-1);
2924 }
2925
2926 /* Set extent of bundle */
2927 proto_item_set_end(bundle_ti, tvb, (bit_offset+7)/8);
2928
2929 return (bit_offset+7)/8;
2930}
2931
2932/* Return new bit offset. in/out will always be byte-aligned.. */
2933static int dissect_ciCompParam(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U___attribute__((unused)), unsigned bit_offset,
2934 unsigned comp_meth, uint8_t *exponent)
2935{
2936 if (comp_meth == COMP_NONE0) {
2937 /* Nothing in frame so don't even create subtree */
2938 return bit_offset;
2939 }
2940
2941 /* Subtree */
2942 proto_item *cicompparam_ti = proto_tree_add_string_format(tree, hf_oran_ciCompParam,
2943 tvb, bit_offset/8, 1, "",
2944 "ciCompParam");
2945 proto_tree *cicompparam_tree = proto_item_add_subtree(cicompparam_ti, ett_oran_cicompparam);
2946 uint32_t ci_exponent;
2947
2948 /* Contents differ by compression method */
2949 switch (comp_meth) {
2950 case COMP_BLOCK_FP1:
2951 add_reserved_field(cicompparam_tree, hf_oran_reserved_4bits, tvb, bit_offset/8, 1);
2952 proto_tree_add_item_ret_uint(cicompparam_tree, hf_oran_exponent,
2953 tvb, bit_offset/8, 1, ENC_BIG_ENDIAN0x00000000, &ci_exponent);
2954 *exponent = ci_exponent;
2955 proto_item_append_text(cicompparam_ti, " (Exponent=%u)", ci_exponent);
2956 bit_offset += 8; /* one byte */
2957 break;
2958 case COMP_BLOCK_SCALE2:
2959 /* Separate into integer (1) and fractional (7) bits? */
2960 proto_tree_add_item(cicompparam_tree, hf_oran_blockScaler,
2961 tvb, bit_offset/8, 1, ENC_BIG_ENDIAN0x00000000);
2962 bit_offset += 8;
2963 break;
2964 case COMP_U_LAW3:
2965 /* compBitWidth, compShift (4 bits each) */
2966 proto_tree_add_item(cicompparam_tree, hf_oran_compBitWidth,
2967 tvb, bit_offset/8, 1, ENC_BIG_ENDIAN0x00000000);
2968 proto_tree_add_item(cicompparam_tree, hf_oran_compShift,
2969 tvb, bit_offset/8, 1, ENC_BIG_ENDIAN0x00000000);
2970 bit_offset += 8;
2971 break;
2972
2973 default:
2974 /* reserved, ? bytes of zeros.. */
2975 break;
2976 }
2977
2978 return bit_offset;
2979}
2980
2981/* frameStructure (7.5.2.13) */
2982static unsigned dissect_frame_structure(proto_item *tree, tvbuff_t *tvb, unsigned offset,
2983 uint32_t subframeId, uint32_t slotId)
2984{
2985 uint32_t scs;
2986 /* FFT Size (4 bits) */
2987 proto_tree_add_item(tree, hf_oran_frameStructure_fft, tvb, offset, 1, ENC_NA0x00000000);
2988 /* Subcarrier spacing (SCS) */
2989 proto_tree_add_item_ret_uint(tree, hf_oran_frameStructure_subcarrier_spacing, tvb, offset, 1, ENC_NA0x00000000, &scs);
2990
2991 /* Show slot within frame as a generated field. See table 7.5.13-3 */
2992 uint32_t slots_per_subframe = 1;
2993 if (scs <= 4) {
2994 slots_per_subframe = 1 << scs;
2995 }
2996 if (scs <= 4 || scs >= 12) {
2997 proto_item *ti = proto_tree_add_uint(tree, hf_oran_slot_within_frame, tvb, 0, 0,
2998 (slots_per_subframe*subframeId) + slotId);
2999 proto_item_set_generated(ti);
3000 }
3001 return offset + 1;
3002}
3003
3004static unsigned dissect_csf(proto_item *tree, tvbuff_t *tvb, unsigned bit_offset,
3005 unsigned iq_width, bool_Bool *p_csf)
3006{
3007 proto_item *csf_ti;
3008 uint64_t csf;
3009 csf_ti = proto_tree_add_bits_ret_val(tree, hf_oran_csf, tvb, bit_offset, 1, &csf, ENC_BIG_ENDIAN0x00000000);
3010 if (csf) {
3011 /* Table 7.7.4.2-1 Constellation shift definition (index is udIqWidth) */
3012 const char* shift_value[] = { "n/a", "1/2", "1/4", "1/8", "1/16", "1/32" };
3013 if (iq_width >=1 && iq_width <= 5) {
3014 proto_item_append_text(csf_ti, " (Shift Value is %s)", shift_value[iq_width]);
3015 }
3016 }
3017
3018 /* Set out parameter */
3019 if (p_csf != NULL((void*)0)) {
3020 *p_csf = (csf!=0);
3021 }
3022 return bit_offset+1;
3023}
3024
3025static unsigned dissect_rbg_mask(proto_item *tree, tvbuff_t *tvb, unsigned offset, uint32_t *rbgMask, proto_item **item)
3026{
3027 uint64_t rbgMask64;
3028
3029 static int * const rbg_mask_bits[] = {
3030 &hf_oran_rbg_mask_27,
3031 &hf_oran_rbg_mask_26,
3032 &hf_oran_rbg_mask_25,
3033 &hf_oran_rbg_mask_24,
3034 &hf_oran_rbg_mask_23,
3035 &hf_oran_rbg_mask_22,
3036 &hf_oran_rbg_mask_21,
3037 &hf_oran_rbg_mask_20,
3038 &hf_oran_rbg_mask_19,
3039 &hf_oran_rbg_mask_18,
3040 &hf_oran_rbg_mask_17,
3041 &hf_oran_rbg_mask_16,
3042 &hf_oran_rbg_mask_15,
3043 &hf_oran_rbg_mask_14,
3044 &hf_oran_rbg_mask_13,
3045 &hf_oran_rbg_mask_12,
3046 &hf_oran_rbg_mask_11,
3047 &hf_oran_rbg_mask_10,
3048 &hf_oran_rbg_mask_9,
3049 &hf_oran_rbg_mask_8,
3050 &hf_oran_rbg_mask_7,
3051 &hf_oran_rbg_mask_6,
3052 &hf_oran_rbg_mask_5,
3053 &hf_oran_rbg_mask_4,
3054 &hf_oran_rbg_mask_3,
3055 &hf_oran_rbg_mask_2,
3056 &hf_oran_rbg_mask_1,
3057 &hf_oran_rbg_mask_0,
3058 NULL((void*)0)
3059 };
3060
3061 *item = proto_tree_add_bitmask_ret_uint64(tree, tvb, offset,
3062 hf_oran_rbgMask, ett_oran_rbgMask,
3063 rbg_mask_bits,
3064 ENC_BIG_ENDIAN0x00000000, &rbgMask64);
3065 *rbgMask = (uint32_t)rbgMask64;
3066 return offset+4;
3067}
3068
3069
3070/* Section 7.
3071 * N.B. these are the green parts of the tables showing Section Types, differing by section Type */
3072static int dissect_oran_c_section(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
3073 flow_state_t* state,
3074 uint32_t sectionType, oran_tap_info *tap_info, proto_item *protocol_item,
3075 uint32_t subframeId, uint32_t frameId, uint32_t slotId, uint32_t startSymbolId,
3076 uint8_t ci_iq_width, uint8_t ci_comp_meth, unsigned ci_comp_opt,
3077 unsigned num_sinr_per_prb)
3078{
3079 unsigned offset = 0;
3080 proto_tree *c_section_tree = NULL((void*)0);
3081 proto_item *sectionHeading = NULL((void*)0);
3082
3083 /* Section subtree */
3084 sectionHeading = proto_tree_add_string_format(tree, hf_oran_c_section,
3085 tvb, offset, 0, "", "Section");
3086 c_section_tree = proto_item_add_subtree(sectionHeading, ett_oran_c_section);
3087
3088 uint32_t sectionId = 0;
3089
3090 uint32_t startPrbc=0, startPrbu=0;
3091 uint32_t numPrbc=0, numPrbu=0;
3092 uint32_t ueId = 0;
3093 proto_item *ueId_ti = NULL((void*)0);
3094 uint32_t section_beamId = 0;
3095 proto_item *section_beamId_ti = NULL((void*)0);
3096 bool_Bool section_beamId_ignored = false0;
3097
3098 proto_item *numsymbol_ti = NULL((void*)0);
3099 bool_Bool numsymbol_ignored = false0;
3100
3101 proto_item *numprbc_ti = NULL((void*)0);
3102
3103 proto_item *rb_ti = NULL((void*)0);
3104 uint32_t rb;
3105
3106 uint64_t re_mask = 0;
3107 proto_item *re_mask_ti = NULL((void*)0);
3108
3109 /* Config affecting ext11 bundles (initially unset) */
3110 ext11_settings_t ext11_settings;
3111 memset(&ext11_settings, 0, sizeof(ext11_settings));
3112
3113 /* Section Type 10 needs to keep track of PRB range that should be reported
3114 for msgTypeId=5 (Interference plus Noise for unallocated PRBs) */
3115 /* All PRBs start as false */
3116#define MAX_PRBS273 273
3117 bool_Bool prbs_for_st10_type5[MAX_PRBS273];
3118 memset(&prbs_for_st10_type5, 0, sizeof(prbs_for_st10_type5));
3119
3120 /* These UEIds are set by ST5, ST10 (single value), and extended by SE10 */
3121#define MAX_UEIDS16 16
3122 uint32_t ueids[MAX_UEIDS16];
3123 uint32_t number_of_ueids = 0;
3124
3125 bool_Bool extension_flag = false0;
3126
3127 /* All remaining symbols for section types without numSymbol */
3128 uint32_t numSymbol = 14;
3129
3130 /* These sections (ST0, ST1, ST2, ST3, ST5, ST9, ST10, ST11) are similar, so handle as common with per-type differences */
3131 if (((sectionType <= SEC_C_UE_SCHED) || (sectionType >= SEC_C_SINR_REPORTING)) &&
3132 (sectionType != SEC_C_SLOT_CONTROL) && (sectionType != SEC_C_SRS_DESCRIPTION)) {
3133
3134 /* sectionID (12 bits) */
3135 proto_item *ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_section_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &sectionId);
3136 if (sectionId == 4095) {
3137 proto_item_append_text(ti, " (not default coupling C/U planes using sectionId)");
3138 }
3139 offset++;
3140
3141 if (tap_info->num_section_ids < MAX_SECTION_IDs32) {
3142 tap_info->section_ids[tap_info->num_section_ids++] = sectionId;
3143 }
3144
3145 /* rb */
3146 rb_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_rb, tvb, offset, 1, ENC_NA0x00000000, &rb);
3147
3148 /* symInc (1 bit) */
3149 /* TODO: mark as ignored if SE6, SE12 or SE19 present */
3150 if (sectionType != SEC_C_RRM_MEAS_REPORTS && /* Section Type 10 */
3151 sectionType != SEC_C_RRM_MEAS_REPORTS_NON_TIMING && /* Section Type 13 */
3152 sectionType != SEC_C_REQUEST_RRM_MEAS) { /* Section Type 11 */
3153
3154 unsigned int sym_inc;
3155 proto_item *sym_inc_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_symInc, tvb, offset, 1, ENC_NA0x00000000, &sym_inc);
3156 if (sym_inc !=0 && (sectionType == SEC_C_SINR_REPORTING)) { /* Section Type 9 */
3157 /* "0 shall be used" */
3158 proto_item_append_text(sym_inc_ti, " (should be 0)");
3159 }
3160 }
3161 else {
3162 /* reserved (1 bit) */
3163 add_reserved_field(c_section_tree, hf_oran_reserved_bit5, tvb, offset, 1);
3164 }
3165
3166 /* startPrbx and numPrbx */
3167 if (sectionType == SEC_C_SINR_REPORTING) {
3168 /* startPrbu (10 bits) */
3169 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_startPrbu, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPrbu);
3170 offset += 2;
3171
3172 /* numPrbu */
3173 numprbc_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numPrbu, tvb, offset, 1, ENC_NA0x00000000, &numPrbu);
3174 if (numPrbu == 0) {
3175 proto_item_append_text(numprbc_ti, " (all PRBs - configured as %u)", pref_data_plane_section_total_rbs);
3176 numPrbu = pref_data_plane_section_total_rbs;
3177 }
3178 offset += 1;
3179 }
3180 else {
3181 /* startPrbc (10 bits) */
3182 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_startPrbc, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPrbc);
3183 offset += 2;
3184
3185 /* numPrbc */
3186 numprbc_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numPrbc, tvb, offset, 1, ENC_NA0x00000000, &numPrbc);
3187 if (numPrbc == 0) {
3188 proto_item_append_text(numprbc_ti, " (all PRBs - configured as %u)", pref_data_plane_section_total_rbs);
3189 /* TODO: should probably set to pref_data_plane_section_total_rbs, and define MAX_PRBS to > 273 ? */
3190 numPrbc = MAX_PRBS273;
3191 }
3192 offset += 1;
3193 }
3194
3195 /* Start with range from section. May get changed by SE6, SE12, SE20 */
3196 for (unsigned n=startPrbc; n < startPrbc+numPrbc; n++) {
3197 if (n < MAX_PRBS273) {
3198 prbs_for_st10_type5[n] = true1;
3199 }
3200 }
3201
3202 if (sectionType != SEC_C_SINR_REPORTING) { /* *NOT* Section Type 9 */
3203 static int * const remask_flags[] = {
3204 &hf_oran_reMask_re1,
3205 &hf_oran_reMask_re2,
3206 &hf_oran_reMask_re3,
3207 &hf_oran_reMask_re4,
3208 &hf_oran_reMask_re5,
3209 &hf_oran_reMask_re6,
3210 &hf_oran_reMask_re7,
3211 &hf_oran_reMask_re8,
3212 &hf_oran_reMask_re9,
3213 &hf_oran_reMask_re10,
3214 &hf_oran_reMask_re11,
3215 &hf_oran_reMask_re12,
3216 NULL((void*)0)
3217 };
3218
3219 /* reMask */
3220 re_mask_ti = proto_tree_add_bitmask_ret_uint64(c_section_tree, tvb, offset,
3221 hf_oran_reMask, ett_oran_remask, remask_flags, ENC_BIG_ENDIAN0x00000000, &re_mask);
3222 offset++;
3223 /* numSymbol */
3224 numsymbol_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numSymbol, tvb, offset, 1, ENC_NA0x00000000, &numSymbol);
3225 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 */
3226 proto_item_append_text(numsymbol_ti, " (for ST10, should be 14!)");
3227 expert_add_info_format(pinfo, numsymbol_ti, &ei_oran_st10_numsymbol_not_14,
3228 "numSymbol should be 14 for ST10 - found %u", numSymbol);
3229 }
3230 if ((startSymbolId + numSymbol) > 14) {
3231 /* Warn if startSymbol + numSymbol would be > 14 */
3232 expert_add_info_format(pinfo, numsymbol_ti, &ei_oran_too_many_symbols,
3233 "startSymbolId (%u) + numSymbol (%u) exceeds max of 14",
3234 startSymbolId, numSymbol);
3235 }
3236 offset++;
3237
3238 /* [ef] (extension flag) */
3239 switch (sectionType) {
3240 case SEC_C_UNUSED_RB: /* Section Type 0 */
3241 case SEC_C_NORMAL: /* Section Type 1 */
3242 case SEC_C_PRACH: /* Section Type 3 */
3243 case SEC_C_UE_SCHED: /* Section Type 5 */
3244 case SEC_C_RRM_MEAS_REPORTS: /* Section Type 10 */
3245 case SEC_C_RRM_MEAS_REPORTS_NON_TIMING: /* Section Type 13 */
3246
3247 case SEC_C_REQUEST_RRM_MEAS: /* Section Type 11 */
3248 proto_tree_add_item_ret_boolean(c_section_tree, hf_oran_ef, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &extension_flag);
3249 break;
3250 default:
3251 /* Other section types don't support extensions */
3252 break;
3253 }
3254
3255 write_section_info(sectionHeading, pinfo, protocol_item, sectionId, startPrbc, numPrbc, rb);
3256 proto_item_append_text(sectionHeading, ", Symbols: %2u", numSymbol);
3257
3258 if (numPrbc == 0) {
3259 /* Special case for all PRBs */
3260 numPrbc = pref_data_plane_section_total_rbs;
3261 startPrbc = 0; /* may already be 0... */
3262 }
3263 }
3264 else {
3265 /* Section Type 9 */
3266 write_section_info(sectionHeading, pinfo, protocol_item, sectionId, startPrbu, numPrbu, rb);
3267 proto_item_append_text(sectionHeading, ", numSinrPerPrb: %2u", num_sinr_per_prb);
3268 }
3269
3270 /* Section type specific fields (after 'numSymbol') */
3271 switch (sectionType) {
3272 case SEC_C_UNUSED_RB: /* Section Type 0 - Table 7.4.2-1 */
3273 /* reserved (15 bits) */
3274 add_reserved_field(c_section_tree, hf_oran_reserved_15bits, tvb, offset, 2);
3275 offset += 2;
3276 break;
3277
3278 case SEC_C_NORMAL: /* Section Type 1 - Table 7.4.3-1 */
3279 /* beamId */
3280 section_beamId_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &section_beamId);
3281 offset += 2;
3282
3283 /* beamId might get invalidated by e.g., ext-6, ext-11, so unused value will still be shown here.. */
3284 proto_item_append_text(sectionHeading, ", BeamId: %d", section_beamId);
3285 break;
3286
3287 case SEC_C_PRACH: /* Section Type 3 - Table 7.4.5-1 */
3288 {
3289 /* beamId */
3290 section_beamId_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &section_beamId);
3291 offset += 2;
3292
3293 /* freqOffset */
3294 int32_t freqOffset; /* Yes, this is signed, so the cast is intentional. */
3295 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);
3296 freqOffset |= 0xff000000; /* Must sign-extend */
3297 proto_item_set_text(freq_offset_item, "Frequency offset: %d \u0394f", freqOffset);
3298 offset += 3;
3299
3300 /* reserved (8 bits) */
3301 add_reserved_field(c_section_tree, hf_oran_reserved_8bits, tvb, offset, 1);
3302 offset += 1;
3303
3304 /* beamId might get invalidated by e.g., ext-6, ext-11, so unused value will still be shown here.. */
3305 proto_item_append_text(sectionHeading, ", BeamId: %d, FreqOffset: %d \u0394f", section_beamId, freqOffset);
3306 break;
3307 }
3308
3309 case SEC_C_UE_SCHED: /* Section Type 5 - Table 7.4.7-1 */
3310 case SEC_C_RRM_MEAS_REPORTS: /* Section Type 10 - Table 7.4.12-1 */
3311 case SEC_C_RRM_MEAS_REPORTS_NON_TIMING: /* Section Type 13 - Table 7.4.12-1 (same frame format) */
3312
3313 /* ueId */
3314 ueId_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_ueId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ueId);
3315 offset += 2;
3316 if (ueId == 0x7fff) {
3317 proto_item_append_text(ueId_ti, " (PRBs not scheduled for eAxC ID in transport header)");
3318 }
3319 else {
3320 ueids[number_of_ueids++] = ueId;
3321 }
3322
3323 proto_item_append_text(sectionHeading, ", UEId: %d", ueId);
3324 break;
3325
3326 case SEC_C_SINR_REPORTING: /* Section Type 9 - SINR Reporting */
3327 {
3328 /* Hidden filter for bf (DMFS-BF) */
3329 proto_item *bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
3330 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
3331
3332 unsigned bit_offset = offset*8;
3333
3334 /* sinr iqWidth */
3335 proto_item *iq_width_item = proto_tree_add_uint(c_section_tree, hf_oran_sinrCompHdrIqWidth_pref, tvb, 0, 0, pref_sample_bit_width_sinr);
3336 proto_item_append_text(iq_width_item, " (from preferences)");
3337 proto_item_set_generated(iq_width_item);
3338 if (pref_sample_bit_width_sinr == 0 || pref_sample_bit_width_sinr > 16) {
3339 expert_add_info_format(pinfo, iq_width_item, &ei_oran_invalid_sample_bit_width,
3340 "SINR sample bit width from preference (%u) not valid, so can't decode SINR",
3341 pref_sample_bit_width_sinr);
3342 break;
3343 }
3344
3345 /* sinr compMethod */
3346 proto_item *sinr_comp_meth_item = proto_tree_add_uint(c_section_tree, hf_oran_sinrCompHdrMeth_pref, tvb, 0, 0, pref_iqCompressionSINR);
3347 proto_item_append_text(sinr_comp_meth_item, " (from preferences)");
3348 proto_item_set_generated(sinr_comp_meth_item);
3349
3350 /* Add SINR entries for each PRB */
3351 for (unsigned prb=startPrbu; prb < startPrbu+numPrbu; prb++) {
3352 /* Create a subtree for each PRB */
3353 proto_item *prb_ti = proto_tree_add_string_format(c_section_tree, hf_oran_sinr_prb,
3354 tvb, offset, 0, "", "PRB %3u (", prb);
3355 proto_tree *prb_tree = proto_item_add_subtree(prb_ti, ett_oran_sinr_prb);
3356
3357 /* Each prb starts byte-aligned */
3358 bit_offset = ((bit_offset+7)/8) * 8;
3359
3360 /* N.B., using width/method from UL U-plane preferences, not certain that this is correct.. */
3361
3362 /* sinrCompParam (udCompParam format, may be empty) */
3363 uint32_t exponent = 0; /* N.B. init to silence warnings, but will always be set if read in COMP_BLOCK_FP case */
3364 uint16_t sReSMask;
3365 bit_offset = dissect_udcompparam(tvb, pinfo, prb_tree, bit_offset/8,
3366 pref_iqCompressionSINR, &exponent, &sReSMask,
3367 true1) * 8; /* last param is for_sinr */
3368
3369 /* sinrValues for this PRB. */
3370 /* TODO: not sure how numSinrPerPrb interacts with rb==1... */
3371 for (unsigned n=0; n < num_sinr_per_prb; n++) {
3372 unsigned sinr_bits = tvb_get_bits32(tvb, bit_offset, pref_sample_bit_width_sinr, ENC_BIG_ENDIAN0x00000000);
3373
3374 /* Using SINR compression settings from preferences */
3375 float value = decompress_value(sinr_bits,
3376 pref_iqCompressionSINR, pref_sample_bit_width_sinr,
3377 exponent,
3378 NULL((void*)0) /* no ModCompr for SINR */, 0 /* RE */);
3379 unsigned sample_len_in_bytes = ((bit_offset%8)+pref_sample_bit_width_sinr+7)/8;
3380 proto_item *val_ti = proto_tree_add_float(prb_tree, hf_oran_sinr_value, tvb,
3381 bit_offset/8, sample_len_in_bytes, value);
3382 proto_item_append_text(prb_ti, " %8f", value);
3383
3384 /* Show here which subcarriers share which values (they all divide 12..) */
3385 if (num_sinr_per_prb == 12) {
3386 proto_item_append_text(val_ti, " (PRB=%u, subcarrier %u)",
3387 startPrbu+((prb-startPrbu)*(rb+1)), n*(12/num_sinr_per_prb));
3388 }
3389 else {
3390 proto_item_append_text(val_ti, " (PRB=%u, subcarriers %u-%u)",
3391 startPrbu+((prb-startPrbu)*(rb+1)),
3392 n*(12/num_sinr_per_prb), (n+1)*(12/num_sinr_per_prb)-1);
3393 }
3394 bit_offset += pref_sample_bit_width_sinr;
3395 }
3396
3397 /* 1-byte alignment per PRB (7.2.11) */
3398 offset = (bit_offset+7)/8;
3399 bit_offset = offset*8;
3400
3401 proto_item_append_text(prb_ti, ")");
3402 proto_item_set_end(prb_ti, tvb, offset);
3403 }
3404 break;
3405 }
3406 case SEC_C_REQUEST_RRM_MEAS: /* Section Type 11 - Request RRM Measurements */
3407 /* Reserved (15 bits) */
3408 add_reserved_field(c_section_tree, hf_oran_reserved_15bits, tvb, offset, 2);
3409 offset += 2;
3410 break;
3411
3412 default:
3413 break;
3414 }
3415 }
3416 else if (sectionType == SEC_C_CH_INFO) { /* Section Type 6 */
3417 /* ef */
3418 proto_tree_add_item_ret_boolean(c_section_tree, hf_oran_ef, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &extension_flag);
3419 /* ueId */
3420 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_ueId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ueId);
3421 offset += 2;
3422 /* regularizationFactor */
3423 proto_tree_add_item(c_section_tree, hf_oran_regularizationFactor, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3424 offset += 2;
3425 /* reserved (4 bits) */
3426 add_reserved_field(c_section_tree, hf_oran_reserved_4bits, tvb, offset, 1);
3427 /* rb ("Value=0 shall be set") */
3428 rb_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_rb, tvb, offset, 1, ENC_NA0x00000000, &rb);
3429 if (rb != 0) {
3430 proto_item_append_text(rb_ti, " (should be set to 0)");
3431 expert_add_info(pinfo, rb_ti, &ei_oran_st6_rb_shall_be_0);
3432 }
3433 /* symInc */
3434 proto_tree_add_item(c_section_tree, hf_oran_symInc, tvb, offset, 1, ENC_NA0x00000000);
3435 /* startPrbc */
3436 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_startPrbc, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPrbc);
3437 offset += 2;
3438 /* numPrbc */
3439 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numPrbc, tvb, offset, 1, ENC_NA0x00000000, &numPrbc);
3440 offset += 1;
3441
3442 /* Hidden filter for bf */
3443 proto_item *bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
3444 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
3445
3446 /* ciIsample,ciQsample pairs */
3447 unsigned m;
3448 unsigned prb;
3449 uint32_t bit_offset = offset*8;
3450
3451 /* Antenna count from preference */
3452 unsigned num_trx = pref_num_bf_antennas;
3453
3454 write_channel_section_info(sectionHeading, pinfo,
3455 sectionId, ueId, startPrbc, numPrbc, num_trx);
3456
3457 bool_Bool first_prb = true1;
3458 uint8_t exponent = 0;
3459 for (prb=startPrbc; prb < startPrbc+numPrbc; prb++) {
3460
3461 /* PRB subtree */
3462 unsigned prb_start_offset = bit_offset;
3463 proto_item *prb_ti = proto_tree_add_string_format(c_section_tree, hf_oran_samples_prb,
3464 tvb, bit_offset/8, 0,
3465 "", "PRB=%u", prb);
3466 proto_tree *prb_tree = proto_item_add_subtree(prb_ti, ett_oran_prb_cisamples);
3467
3468 /* There may be a ciCompParam here.. */
3469 if (first_prb || ci_comp_opt==1) {
3470 bit_offset = dissect_ciCompParam(tvb, prb_tree, pinfo, bit_offset, ci_comp_meth, &exponent);
3471 }
3472 first_prb = false0;
3473
3474 /* Antennas */
3475 for (m=0; m < num_trx; m++) {
3476
3477 unsigned sample_offset = bit_offset / 8;
3478 uint8_t sample_extent = ((bit_offset + (ci_iq_width*2)) / 8) - sample_offset;
3479
3480 /* Create subtree for antenna */
3481 proto_item *sample_ti = proto_tree_add_string_format(prb_tree, hf_oran_ciSample,
3482 tvb, sample_offset, sample_extent,
3483 "", "TRX=%2u: ", m);
3484 proto_tree *sample_tree = proto_item_add_subtree(sample_ti, ett_oran_cisample);
3485
3486 /* I */
3487 /* Get bits, and convert to float. */
3488 uint32_t bits = tvb_get_bits32(tvb, bit_offset, ci_iq_width, ENC_BIG_ENDIAN0x00000000);
3489 float value = decompress_value(bits, ci_comp_meth, ci_iq_width, exponent, NULL((void*)0) /* no ModCompr for ST6 */, 0 /* RE */);
3490
3491 /* Add to tree. */
3492 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);
3493 bit_offset += ci_iq_width;
3494 proto_item_append_text(sample_ti, "I%u=%f ", m, value);
3495
3496 /* Q */
3497 /* Get bits, and convert to float. */
3498 bits = tvb_get_bits32(tvb, bit_offset, ci_iq_width, ENC_BIG_ENDIAN0x00000000);
3499 value = decompress_value(bits, ci_comp_meth, ci_iq_width, exponent, NULL((void*)0) /* no ModCompr for ST6 */, 0 /* RE */);
3500
3501 /* Add to tree. */
3502 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);
3503 bit_offset += ci_iq_width;
3504 proto_item_append_text(sample_ti, "Q%u=%f ", m, value);
3505 }
3506 proto_item_set_len(prb_ti, (bit_offset-prb_start_offset+7)/8);
3507 }
3508
3509 /* Pad out by 1 or 4 bytes, according to preference */
3510 if (!st6_4byte_alignment) {
3511 offset = (bit_offset + 7) / 8;
3512 }
3513 else {
3514 int mode = bit_offset % 32;
3515 if (mode != 0) {
3516 offset = (bit_offset + (32-mode))/8;
3517 }
3518 else {
3519 offset = bit_offset/8;
3520 }
3521 }
3522 proto_item_set_end(c_section_tree, tvb, offset);
3523 }
3524 else if (sectionType == SEC_C_SRS_DESCRIPTION) { /* Section Type 12 */
3525 /* sectionID (12 bits) */
3526 proto_item *ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_section_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &sectionId);
3527 if (sectionId == 4095) {
3528 proto_item_append_text(ti, " (not default coupling C/U planes using sectionId)");
3529 }
3530 offset++;
3531
3532 if (tap_info->num_section_ids < MAX_SECTION_IDs32) {
3533 tap_info->section_ids[tap_info->num_section_ids++] = sectionId;
3534 }
3535
3536 /* srsRbgSize (2 bits) */
3537 proto_tree_add_item(c_section_tree, hf_oran_srsRbgSize, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3538
3539 /* startPrbc (10 bits) */
3540 proto_tree_add_item_ret_uint(c_section_tree, hf_oran_startPrbc, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPrbc);
3541 offset += 2;
3542
3543 /* numPrbc */
3544 numprbc_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numPrbc, tvb, offset, 1, ENC_NA0x00000000, &numPrbc);
3545 if (numPrbc == 0) {
3546 proto_item_append_text(numprbc_ti, " (all PRBs - configured as %u)", pref_data_plane_section_total_rbs);
3547 /* TODO: should probably set to pref_data_plane_section_total_rbs, and define MAX_PRBS to > 273 ? */
3548 numPrbc = MAX_PRBS273;
3549 }
3550 offset += 1;
3551
3552 /* srsNumRbg (8 bits) */
3553 proto_tree_add_item(c_section_tree, hf_oran_srsNumRbg, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3554 offset += 1;
3555 /* srsTxComb (3 bits) */
3556 proto_tree_add_item(c_section_tree, hf_oran_srsTxComb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3557 /* reserved (1 bit) */
3558 add_reserved_field(c_section_tree, hf_oran_reserved_bit3, tvb, offset, 1);
3559 /* srsSymId (4 bits) */
3560 proto_tree_add_item(c_section_tree, hf_oran_srsSymId, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3561 offset += 1;
3562 /* reserved (16 bits) */
3563 add_reserved_field(c_section_tree, hf_oran_reserved_16bits, tvb, offset, 2);
3564 offset += 2;
3565
3566 /* ef (1 bit) */
3567 /* reserved (1 bit) */
3568 add_reserved_field(c_section_tree, hf_oran_reserved_bit1, tvb, offset, 1);
3569 /* srsNumUe (6 bits) */
3570 uint8_t srs_num_ue;
3571 proto_tree_add_item_ret_uint8(c_section_tree, hf_oran_srsNumUe, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &srs_num_ue);
3572 offset += 1;
3573
3574 /* TODO: subsections - one for each UE */
3575 for (uint8_t ss=0; ss < srs_num_ue; ss++) {
3576 /* TODO: create subsection subtree */
3577
3578 /* Reserved-struct (3 bits) */
3579 /* srsUeIdApIdReset (1 bit) */
3580 /* reserved (4 bits) */
3581 add_reserved_field(c_section_tree, hf_oran_reserved_last_4bits, tvb, offset, 1);
3582 offset += 1;
3583 /* srsNumAp (4 bits) */
3584 uint8_t num_ap = tvb_get_uint8(tvb, offset) >> 4;
3585 /* srsTotalAp (4 bits) */
3586 offset += 1;
3587 /* srsSeqIq (2 bytes) */
3588 offset += 2;
3589 /* srsNumMultiSym (4 bits) */
3590 /* srsIndexMultiSym (4 bits) */
3591 offset += 1;
3592 /* srsPatMultiSym (2 bits) */
3593 /* srsCiUse (2 bits) */
3594 /* srsSeqHopType (2 bits) */
3595 /* srsFreqHopType (2 bits) */
3596 offset += 1;
3597 /* reserved (1 bit) */
3598 add_reserved_field(c_section_tree, hf_oran_reserved_1bit, tvb, offset, 1);
3599 /* srsNumFreqHops (7 bits) */
3600 offset += 1;
3601 /* reserved (1 bit) */
3602 add_reserved_field(c_section_tree, hf_oran_reserved_1bit, tvb, offset, 1);
3603 /* srsFreqHopIndex (7 bits) */
3604 offset += 1;
3605 /* reserved (2 bits) */
3606 add_reserved_field(c_section_tree, hf_oran_reserved_2bits, tvb, offset, 1);
3607 /* srsUsage (6 bits) */
3608 offset += 1;
3609 /* reserved (8 bits) */
3610 offset += 1;
3611 /* reserved (1 bit) */
3612 add_reserved_field(c_section_tree, hf_oran_reserved_1bit, tvb, offset, 1);
3613 /* srsPriorityRpt (5 bits) */
3614 /* srsStartPrbCiRpt (9 bits) */
3615 offset += 1;
3616 /* srsStartPrbCiRpt (1 bit) */
3617 offset += 1;
3618 /* srsNumGrpCiRpt (8 bits) */
3619 offset += 1;
3620 /* srsGrpSizeCiRpt (8 bits) */
3621 /* reserved (8 bits) */
3622 add_reserved_field(c_section_tree, hf_oran_reserved_8bits, tvb, offset, 1);
3623 offset += 1;
3624 /* srsRrmMeasTrigger (2 bytes) */
3625 offset += 2;
3626
3627 /* One entry (yellowy-green in Table 7.4.14-1) for each port for this UE */
3628 for (uint8_t port = 0; port < num_ap; port++) {
3629 /* TODO: create port entry subtree */
3630 /* reserved (1 bit) */
3631 add_reserved_field(c_section_tree, hf_oran_reserved_1bit, tvb, offset, 1);
3632 /* srsUeIdApId (15 bits) */
3633 offset += 2;
3634 /* reserved (1 bit) */
3635 add_reserved_field(c_section_tree, hf_oran_reserved_1bit, tvb, offset, 1);
3636 /* srsRECO (3 bits) */
3637 /* srsCR (4 bits) */
3638 offset += 1;
3639 /* reserved (8 bits) */
3640 add_reserved_field(c_section_tree, hf_oran_reserved_8bits, tvb, offset, 1);
3641 offset += 1;
3642 }
3643 }
3644 }
3645
3646
3647 expected_section_data_t *data_section = NULL((void*)0);
3648 unsigned index_to_use = 0;
3649
3650 /* On first pass, allocate a section entry to use */
3651 if (link_planes_together && !PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
3652
3653 /* Look for existing entry for sectionId to overwrite first. */
3654 uint8_t direction = !tap_info->uplink;
3655 data_section = wmem_tree_lookup32(state->expected_sections[direction],
3656 sectionId);
3657 if (data_section == NULL((void*)0)) {
3658 /* None, so create */
3659 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)))
;
3660 wmem_tree_insert32(state->expected_sections[direction],
3661 sectionId,
3662 data_section);
3663 }
3664
3665 /* TODO: not currently coping with case where >1 C-plane frames define same sectionId (covering different PRBs).
3666 * Ideally would at least update the missing beamIds.. */
3667 if (data_section->details[0].in_use) {
3668 /* If 2nd entry not in use, use that one */
3669 if (!data_section->details[1].in_use) {
3670 index_to_use = 1;
3671 }
3672 else {
3673 /* Both in use, so replace the older of the 2 entries */
3674 if (data_section->details[1].frame_number < data_section->details[0].frame_number) {
3675 index_to_use = 1;
3676 }
3677 }
3678 }
3679
3680 if (data_section) {
3681 section_details_t *details = &data_section->details[index_to_use];
3682
3683 details->in_use = true1;
3684 details->frame = frameId;
3685 details->subframe = subframeId;
3686 details->slot = slotId;
3687 details->startSymbol = startSymbolId;
3688 details->numSymbols = numSymbol;
3689
3690 details->frame_number = pinfo->num;
3691 details->frame_time = pinfo->abs_ts;
3692 data_section->sectionId = sectionId;
3693 details->startPrb = startPrbc;
3694 details->numPrb = numPrbc;
3695 /* Fresh per-PRB array (if any) for this definition, see section_details_t */
3696 details->beamId = (uint16_t)section_beamId;
3697 details->beamIds = NULL((void*)0);
3698 }
3699 }
3700
3701 bool_Bool seen_se10 = false0;
3702 uint32_t numPortc = 0;
3703 proto_item *bf_ti = NULL((void*)0);
3704
3705 /* Section extension commands */
3706 while (extension_flag) {
3707 int extension_start_offset = offset;
3708
3709 /* Prefetch extType so can use specific extension type ett */
3710 uint32_t exttype = tvb_get_uint8(tvb, offset) & 0x7f;
3711 uint32_t exttype_ett_index = exttype;
3712 if (exttype == 0 || exttype > HIGHEST_EXTTYPE35) {
3713 /* Just use first one if out of range */
3714 exttype_ett_index = 1;
3715 }
3716
3717 /* Create subtree for each extension (with summary) */
3718 proto_item *extension_ti = proto_tree_add_string_format(c_section_tree, hf_oran_extension,
3719 tvb, offset, 0, "", "Extension");
3720 proto_tree *extension_tree = proto_item_add_subtree(extension_ti, ett_oran_c_section_extension[exttype_ett_index-1]);
3721
3722 /* ef (i.e. another extension after this one?) */
3723 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_ef, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &extension_flag);
3724
3725 /* extType */
3726 proto_item *exttype_ti;
3727 exttype_ti = proto_tree_add_item(extension_tree, hf_oran_exttype, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3728 offset++;
3729 proto_item_append_text(sectionHeading, " (ext-%u)", exttype);
3730
3731 proto_item_append_text(extension_ti, " (ext-%u: %s)", exttype, val_to_str_ext_const(exttype, &exttype_vals_ext, "Reserved"));
3732
3733 /* Don't tap if out of range. */
3734 if (exttype > 0 && exttype <= HIGHEST_EXTTYPE35) {
3735 tap_info->extensions[exttype] = true1;
3736 }
3737
3738 /* Is this SE allowed for this section type? */
3739 if (!se_allowed_in_st(exttype, sectionType)) {
3740 expert_add_info_format(pinfo, extension_tree, &ei_oran_se_on_unsupported_st,
3741 "SE %u (%s) should not appear in ST %u (%s)!",
3742 exttype, val_to_str_ext_const(exttype, &exttype_vals_ext, "Reserved"),
3743 sectionType, rval_to_str_const(sectionType, section_types, "Unknown"));
3744 }
3745
3746
3747 /* extLen (number of 32-bit words) */
3748 uint32_t extlen_len = ((exttype==11)||(exttype==19)||(exttype==20)) ? 2 : 1; /* Extensions 11/19/20 are special */
3749 uint32_t extlen;
3750 proto_item *extlen_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_extlen, tvb,
3751 offset, extlen_len, ENC_BIG_ENDIAN0x00000000, &extlen);
3752 proto_item_append_text(extlen_ti, " (%u bytes)", extlen*4);
3753 offset += extlen_len;
3754 if (extlen == 0) {
3755 expert_add_info(pinfo, extlen_ti, &ei_oran_extlen_zero);
3756 /* Break out to avoid infinitely looping! */
3757 break;
3758 }
3759
3760 bool_Bool ext_unhandled = false0;
3761
3762 switch (exttype) {
3763
3764 case 1: /* SE 1: Beamforming Weights */
3765 {
3766 uint32_t bfwcomphdr_iq_width, bfwcomphdr_comp_meth;
3767 proto_item *comp_meth_ti = NULL((void*)0);
3768
3769 /* Hidden filter for bf */
3770 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
3771 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
3772
3773 /* bfwCompHdr (2 subheaders - bfwIqWidth and bfwCompMeth) */
3774 offset = dissect_bfwCompHdr(tvb, extension_tree, offset,
3775 &bfwcomphdr_iq_width, &bfwcomphdr_comp_meth, &comp_meth_ti);
3776
3777 /* bfwCompParam */
3778 uint32_t exponent = 0;
3779 bool_Bool compression_method_supported = false0;
3780 unsigned num_trx = pref_num_bf_antennas;
3781 uint16_t *trx = NULL((void*)0); /* ptr to array */
3782 offset = dissect_bfwCompParam(tvb, extension_tree, pinfo, offset, comp_meth_ti,
3783 &bfwcomphdr_comp_meth, &exponent, &compression_method_supported,
3784 &num_trx, &trx);
3785
3786 /* Can't show details of unsupported compression method */
3787 if (!compression_method_supported) {
3788 break;
3789 }
3790
3791 bool_Bool using_array = (trx != NULL((void*)0));
3792
3793 /* I & Q samples */
3794
3795 bool_Bool non_zero_weights_seen = false0;
3796 int bit_offset = offset*8;
3797 int offset_before_weights = offset;
3798
3799 for (unsigned n=0; n < num_trx; n++) {
3800 /* Create antenna subtree */
3801 int bfw_offset = bit_offset / 8;
3802
3803 uint16_t trx_index = (using_array) ? trx[n] : n+1;
3804
3805 proto_item *bfw_ti = proto_tree_add_string_format(extension_tree, hf_oran_bfw,
3806 tvb, bfw_offset, 0, "", "TRX %3u: (", trx_index);
3807 proto_tree *bfw_tree = proto_item_add_subtree(bfw_ti, ett_oran_bfw);
3808
3809 /* I value */
3810 /* Get bits, and convert to float. */
3811 uint32_t bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
3812 if (bits) {
3813 non_zero_weights_seen = true1;
3814 }
3815 float value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent,
3816 NULL((void*)0) /* no ModCompr */, 0 /* RE */);
3817 /* Add to tree. */
3818 proto_tree_add_float(bfw_tree, hf_oran_bfw_i, tvb, bit_offset/8,
3819 (bfwcomphdr_iq_width+7)/8, value);
3820 bit_offset += bfwcomphdr_iq_width;
3821 proto_item_append_text(bfw_ti, "I=%f ", value);
3822
3823 /* Leave a gap between I and Q values */
3824 proto_item_append_text(bfw_ti, " ");
3825
3826 /* Q value */
3827 /* Get bits, and convert to float. */
3828 bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
3829 if (bits) {
3830 non_zero_weights_seen = true1;
3831 }
3832
3833 value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent,
3834 NULL((void*)0) /* no ModCompr */, 0 /* RE */);
3835 /* Add to tree. */
3836 proto_tree_add_float(bfw_tree, hf_oran_bfw_q, tvb, bit_offset/8,
3837 (bfwcomphdr_iq_width+7)/8, value);
3838 bit_offset += bfwcomphdr_iq_width;
3839 proto_item_append_text(bfw_ti, "Q=%f", value);
3840
3841 proto_item_append_text(bfw_ti, ")");
3842 proto_item_set_len(bfw_ti, (bit_offset+7)/8 - bfw_offset);
3843 }
3844
3845 /* Need to round to next byte */
3846 offset = (bit_offset+7)/8;
3847
3848 if (!non_zero_weights_seen) {
3849 proto_tree_add_item(extension_tree, hf_oran_bundle_weights_all_zero, tvb,
3850 offset_before_weights, offset-offset_before_weights, ENC_NA0x00000000);
3851 }
3852 break;
3853 }
3854
3855 case 2: /* SE 2: Beamforming attributes */
3856 {
3857 /* Hidden filter for bf */
3858 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
3859 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
3860
3861 /* bfaCompHdr (get widths of fields to follow) */
3862 uint32_t bfAzPtWidth, bfZePtWidth, bfAz3ddWidth, bfZe3ddWidth;
3863 /* subtree */
3864 proto_item *bfa_ti = proto_tree_add_string_format(extension_tree, hf_oran_bfaCompHdr,
3865 tvb, offset, 2, "", "bfaCompHdr");
3866 proto_tree *bfa_tree = proto_item_add_subtree(bfa_ti, ett_oran_bfacomphdr);
3867
3868 /* reserved (2 bits) */
3869 add_reserved_field(bfa_tree, hf_oran_reserved_2bits, tvb, offset, 1);
3870 /* bfAzPtWidth (3 bits) */
3871 proto_tree_add_item_ret_uint(bfa_tree, hf_oran_bfAzPtWidth, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &bfAzPtWidth);
3872 /* bfZePtWidth (3 bits) */
3873 proto_tree_add_item_ret_uint(bfa_tree, hf_oran_bfZePtWidth, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &bfZePtWidth);
3874 offset += 1;
3875
3876 /* reserved (2 bits) */
3877 add_reserved_field(bfa_tree, hf_oran_reserved_2bits, tvb, offset, 1);
3878 /* bfAz3ddWidth (3 bits) */
3879 proto_tree_add_item_ret_uint(bfa_tree, hf_oran_bfAz3ddWidth, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &bfAz3ddWidth);
3880 /* bfZe3ddWidth (3 bits) */
3881 proto_tree_add_item_ret_uint(bfa_tree, hf_oran_bfZe3ddWidth, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &bfZe3ddWidth);
3882 offset += 1;
3883
3884 unsigned bit_offset = offset*8;
3885
3886 /* bfAzPt */
3887 if (bfAzPtWidth > 0) {
3888 proto_tree_add_bits_item(extension_tree, hf_oran_bfAzPt, tvb, bit_offset, bfAzPtWidth+1, ENC_BIG_ENDIAN0x00000000);
3889 bit_offset += (bfAzPtWidth+1);
3890 }
3891 /* bfZePt */
3892 if (bfZePtWidth > 0) {
3893 proto_tree_add_bits_item(extension_tree, hf_oran_bfZePt, tvb, bit_offset, bfZePtWidth+1, ENC_BIG_ENDIAN0x00000000);
3894 bit_offset += (bfZePtWidth+1);
3895 }
3896 /* bfAz3dd */
3897 if (bfAz3ddWidth > 0) {
3898 proto_tree_add_bits_item(extension_tree, hf_oran_bfAz3dd, tvb, bit_offset, bfAz3ddWidth+1, ENC_BIG_ENDIAN0x00000000);
3899 bit_offset += (bfAz3ddWidth+1);
3900 }
3901 /* bfZe3dd */
3902 if (bfZe3ddWidth > 0) {
3903 proto_tree_add_bits_item(extension_tree, hf_oran_bfZe3dd, tvb, bit_offset, bfZe3ddWidth+1, ENC_BIG_ENDIAN0x00000000);
3904 bit_offset += (bfZe3ddWidth+1);
3905 }
3906
3907 /* Pad to next byte (unless last 2 fields already fit in this one) */
3908 if ((bit_offset % 8) > 2) {
3909 offset = (bit_offset+7) / 8;
3910 }
3911 else {
3912 offset = bit_offset / 8;
3913 }
3914
3915 /* bfAzSl (3 bits) */
3916 proto_tree_add_item(extension_tree, hf_oran_bfAzSl, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3917 /* bfZeSl (3 bits) */
3918 proto_tree_add_item(extension_tree, hf_oran_bfZeSl, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3919 offset += 1;
3920 break;
3921 }
3922
3923 case 3: /* SE 3: DL precoding parameters */
3924 {
3925 /* codebookindex (8 bits) */
3926 /* "This parameter is not used and shall be set to zero." */
3927 proto_tree_add_item(extension_tree, hf_oran_codebook_index, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3928 offset += 1;
3929 /* layerid */
3930 uint32_t layerid;
3931 proto_tree_add_item_ret_uint(extension_tree, hf_oran_layerid, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &layerid);
3932 /* numLayers */
3933 proto_tree_add_item(extension_tree, hf_oran_numlayers, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3934 offset += 1;
3935
3936 /* Stop here for non-first data layer */
3937 if (layerid != 0 && layerid != 0xf) {
3938 break;
3939 }
3940
3941 /* First data layer case */
3942 /* txScheme */
3943 proto_tree_add_item(extension_tree, hf_oran_txscheme, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3944 /* crsReMask */
3945 proto_tree_add_item(extension_tree, hf_oran_crs_remask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3946 offset += 2;
3947
3948 /* crsShift (1 bit) */
3949 proto_tree_add_item(extension_tree, hf_oran_crs_shift, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3950 /* reserved (3 bits) */
3951 add_reserved_field(extension_tree, hf_oran_reserved_bits123, tvb, offset, 1);
3952 /* crsSymNum (4 bits) */
3953 proto_tree_add_item(extension_tree, hf_oran_crs_symnum, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3954 offset += 1;
3955 /* reserved (8 bits) */
3956 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
3957 offset += 1;
3958
3959 /* reserved (1 bit) */
3960 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
3961 /* beamIdAP1 (15 bits) */
3962 proto_tree_add_item(extension_tree, hf_oran_beamid_ap1, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3963 offset += 2;
3964 /* reserved (1 bit) */
3965 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
3966 /* beamIdAP2 (15 bits) */
3967 proto_tree_add_item(extension_tree, hf_oran_beamid_ap2, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3968 offset += 2;
3969 /* reserved (1 bit) */
3970 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
3971 /* beamIdAP3 (15 bits) */
3972 proto_tree_add_item(extension_tree, hf_oran_beamid_ap3, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3973 offset += 2;
3974 break;
3975 }
3976
3977 case 4: /* SE 4: Modulation compression params (5.4.7.4) (single sets) */
3978 {
3979 /* csf */
3980 bool_Bool csf;
3981 dissect_csf(extension_tree, tvb, offset*8, ci_iq_width, &csf);
3982
3983 /* modCompScaler (16 bits) */
3984 uint32_t modCompScaler;
3985 proto_item *ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_modcompscaler,
3986 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &modCompScaler);
3987 offset += 2;
3988
3989 /* Work out and show floating point value too. exponent and mantissa are both unsigned */
3990 uint16_t exponent = (modCompScaler >> 11) & 0x000f; /* m.s. 4 bits */
3991 uint16_t mantissa = modCompScaler & 0x07ff; /* l.s. 11 bits */
3992 float value = ((float)mantissa/(1<<11)) * ((float)1.0 / (1 << exponent));
3993 proto_item_append_text(ti, " (%f)", value);
3994
3995 section_mod_compr_config_t* sect_config = get_mod_compr_section_to_write(pinfo, state, sectionId);
3996
3997 /* Store these params in this flow's state */
3998 if (sect_config && sect_config->num_configs < MAX_MOD_COMPR_CONFIGS12) {
3999 unsigned i = sect_config->num_configs;
4000 sect_config->configs[i].mod_compr_re_mask = 0xfff; /* Covers all REs */
4001 sect_config->configs[i].mod_compr_csf = csf;
4002 sect_config->configs[i].mod_compr_scaler = value;
4003 sect_config->num_configs++;
4004 }
4005 break;
4006 }
4007
4008 case 5: /* SE 5: Modulation Compression Additional Parameters (7.7.5) (multiple sets) */
4009 {
4010 /* Applies only to section types 1,3 and 5 */
4011 /* N.B. there may be multiple instances of this SE in the same frame */
4012
4013 /* There may be one or 2 entries, depending upon extLen */
4014 int sets = 1, reserved_bits = 0;
4015 switch (extlen) {
4016 case 2:
4017 sets = 1;
4018 reserved_bits = 20;
4019 break;
4020 case 3:
4021 sets = 2;
4022 reserved_bits = 24;
4023 break;
4024 case 4:
4025 /* sets can be 3 or 4, depending upon whether last 28 bits are 0.. */
4026 if ((tvb_get_ntohl(tvb, offset+10) & 0x0fffffff) == 0) {
4027 sets = 3;
4028 reserved_bits = 28;
4029 }
4030 else {
4031 sets = 4;
4032 reserved_bits = 0;
4033 }
4034 break;
4035
4036 /* TODO: it seems that it could be longer.. */
4037 default:
4038 /* Malformed error!!! */
4039 expert_add_info_format(pinfo, extlen_ti, &ei_oran_extlen_wrong,
4040 "For SE5 (modCompr additional params), extLen must be 2, 3 or 4, but %u was dissected",
4041 extlen);
4042 break;
4043 }
4044
4045 uint64_t accumulated_mc_scale_re_mask = 0;
4046 unsigned bit_offset = offset*8;
4047 /* Dissect each set */
4048 for (int s=0; s < sets; s++) {
4049 /* Subtree for each set */
4050 unsigned set_start_offset = bit_offset/8;
4051 proto_item *set_ti = proto_tree_add_string(extension_tree, hf_oran_modcomp_param_set,
4052 tvb, set_start_offset, 0, "");
4053 proto_tree *set_tree = proto_item_add_subtree(set_ti, ett_oran_modcomp_param_set);
4054
4055 uint64_t mcScaleReMask, mcScaleOffset;
4056 bool_Bool csf;
4057
4058 /* mcScaleReMask (12 bits). Defines which REs the following csf and mcScaleOffset apply to */
4059 static int * const remask_flags[] = {
4060 &hf_oran_mc_scale_re_mask_re1,
4061 &hf_oran_mc_scale_re_mask_re2,
4062 &hf_oran_mc_scale_re_mask_re3,
4063 &hf_oran_mc_scale_re_mask_re4,
4064 &hf_oran_mc_scale_re_mask_re5,
4065 &hf_oran_mc_scale_re_mask_re6,
4066 &hf_oran_mc_scale_re_mask_re7,
4067 &hf_oran_mc_scale_re_mask_re8,
4068 &hf_oran_mc_scale_re_mask_re9,
4069 &hf_oran_mc_scale_re_mask_re10,
4070 &hf_oran_mc_scale_re_mask_re11,
4071 &hf_oran_mc_scale_re_mask_re12,
4072 NULL((void*)0)
4073 };
4074 /* Same as above, but offset by 4 bits */
4075 static int * const remask_flags_even[] = {
4076 &hf_oran_mc_scale_re_mask_re1_even,
4077 &hf_oran_mc_scale_re_mask_re2_even,
4078 &hf_oran_mc_scale_re_mask_re3_even,
4079 &hf_oran_mc_scale_re_mask_re4_even,
4080 &hf_oran_mc_scale_re_mask_re5_even,
4081 &hf_oran_mc_scale_re_mask_re6_even,
4082 &hf_oran_mc_scale_re_mask_re7_even,
4083 &hf_oran_mc_scale_re_mask_re8_even,
4084 &hf_oran_mc_scale_re_mask_re9_even,
4085 &hf_oran_mc_scale_re_mask_re10_even,
4086 &hf_oran_mc_scale_re_mask_re11_even,
4087 &hf_oran_mc_scale_re_mask_re12_even,
4088 NULL((void*)0)
4089 };
4090
4091 /* RE Mask for set (12 bits) */
4092 proto_item *set_re_mask_ti;
4093 set_re_mask_ti = proto_tree_add_bitmask_ret_uint64(set_tree, tvb, bit_offset / 8,
4094 (s % 2) ? hf_oran_mc_scale_re_mask_even : hf_oran_mc_scale_re_mask,
4095 ett_oran_mc_scale_remask,
4096 (s % 2) ? remask_flags_even : remask_flags, ENC_BIG_ENDIAN0x00000000, &mcScaleReMask);
4097 bit_offset += 12;
4098
4099 if (mcScaleReMask == 0) {
4100 /* Shouldn't expect an entry with an entry that doesn't change anything. */
4101 /* Exception (from Table 7.7.5.1-3) is when extLen=4 and this is the 4th set */
4102 if (!(extlen == 4 && s == 3)) {
4103 expert_add_info(pinfo, set_re_mask_ti, &ei_oran_se5_re_zero_re_mask);
4104 }
4105 }
4106
4107 if (re_mask_ti && (mcScaleReMask & re_mask) != mcScaleReMask) {
4108 /* Bits set that were not in reMask! */
4109 expert_add_info_format(pinfo, set_re_mask_ti, &ei_oran_se5_re_mask_bit_not_in_re_mask,
4110 "SE 5 set references REs (0x%03x) not set in the section reMask (0x%03x)",
4111 (uint16_t)mcScaleReMask, (uint16_t)re_mask);
4112 }
4113
4114 if (accumulated_mc_scale_re_mask & mcScaleReMask) {
4115 /* Bits have already been covered! */
4116 expert_add_info_format(pinfo, set_re_mask_ti, &ei_oran_se5_re_mask_bit_repeated,
4117 "SE 5 set references REs (0x%03x) already covered by an earlier set",
4118 (uint16_t)mcScaleReMask);
4119 }
4120
4121 /* Add RE bits from this set to accumulated */
4122 accumulated_mc_scale_re_mask |= mcScaleReMask;
4123
4124 /* csf (1 bit) */
4125 bit_offset = dissect_csf(set_tree, tvb, bit_offset, ci_iq_width, &csf);
4126 /* mcScaleOffset (15 bits) */
4127 proto_item *ti = proto_tree_add_bits_ret_val(set_tree, hf_oran_mc_scale_offset, tvb, bit_offset, 15, &mcScaleOffset, ENC_BIG_ENDIAN0x00000000);
4128 uint16_t exponent = (mcScaleOffset >> 11) & 0x000f; /* m.s. 4 bits */
4129 uint16_t mantissa = mcScaleOffset & 0x07ff; /* l.s. 11 bits */
4130 float mcScaleOffset_value = ((float)mantissa/(1<<11)) * ((float)1.0 / (1 << exponent));
4131 proto_item_append_text(ti, " (%f)", mcScaleOffset_value);
4132 bit_offset += 15;
4133
4134 section_mod_compr_config_t* sect_config = get_mod_compr_section_to_write(pinfo, state, sectionId);
4135
4136 /* Record this config */
4137 if (sect_config && sect_config->num_configs < MAX_MOD_COMPR_CONFIGS12) {
4138 unsigned i = sect_config->num_configs;
4139 sect_config->configs[i].mod_compr_re_mask = (uint16_t)mcScaleReMask;
4140 sect_config->configs[i].mod_compr_csf = csf;
4141 sect_config->configs[i].mod_compr_scaler = mcScaleOffset_value;
4142 sect_config->num_configs++;
4143 }
4144
4145 /* Summary */
4146 proto_item_set_len(set_ti, (bit_offset+7)/8 - set_start_offset);
4147 proto_item_append_text(set_ti, " (mcScaleReMask=0x%03x csf=%5s mcScaleOffset=%f)",
4148 (unsigned)mcScaleReMask, tfs_get_true_false(csf)tfs_get_string(csf, ((void*)0)), mcScaleOffset_value);
4149 }
4150
4151 proto_item_append_text(extension_ti, " (%u sets)", sets);
4152
4153 if (re_mask_ti && accumulated_mc_scale_re_mask != re_mask) {
4154 /* Complain that not all bits were set */
4155 expert_add_info_format(pinfo, re_mask_ti, &ei_oran_se5_re_mask_bits_not_covered,
4156 "Section reMask (0x%03x) has bits not covered by any sets (covers 0x%03x)",
4157 (uint16_t)re_mask, (uint16_t)accumulated_mc_scale_re_mask);
4158 }
4159
4160 /* Reserved (variable-length) */
4161 if (reserved_bits) {
4162 proto_tree_add_bits_item(extension_tree, hf_oran_reserved, tvb, bit_offset, reserved_bits, ENC_BIG_ENDIAN0x00000000);
4163 bit_offset += reserved_bits;
4164 }
4165
4166 offset = bit_offset/8;
4167 break;
4168 }
4169
4170 case 6: /* SE 6: Non-contiguous PRB allocation in time and frequency domain */
4171 {
4172 /* numSymbol not used in this case */
4173 if (numsymbol_ti && !numsymbol_ignored) {
4174 proto_item_append_text(numsymbol_ti, " (ignored)");
4175 numsymbol_ignored = true1;
4176 }
4177
4178 /* Will update ext6 recorded info */
4179 ext11_settings.ext6_set = true1;
4180
4181 /* TODO: rb bit must be zero (unless "se6-rb-bit-supported" is set) */
4182
4183 /* repetition (only valid to be set if coupling via frequency and time with priorities (optimized) (7.8.1.5) */
4184 proto_tree_add_bits_item(extension_tree, hf_oran_se6_repetition, tvb, offset*8, 1, ENC_BIG_ENDIAN0x00000000);
4185 /* rbgSize (PRBs per bit set in rbgMask) */
4186 uint32_t rbgSize;
4187 proto_item *rbg_size_ti;
4188 rbg_size_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_rbgSize, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rbgSize);
4189 if (rbgSize == 0) {
4190 /* N.B. this is only true if "se6-rb-bit-supported" is set... */
4191 expert_add_info(pinfo, rbg_size_ti, &ei_oran_rbg_size_reserved);
4192 }
4193 /* rbgMask (28 bits) */
4194 uint32_t rbgMask;
4195 proto_item *rbgmask_ti; // = proto_tree_add_item_ret_uint(extension_tree, hf_oran_rbgMask, tvb, offset, 4, ENC_BIG_ENDIAN, &rbgMask);
4196 offset = dissect_rbg_mask(extension_tree, tvb, offset, &rbgMask, &rbgmask_ti);
4197 if (rbgSize == 0) {
4198 proto_item_append_text(rbgmask_ti, " (value ignored since rbgSize is 0)");
4199 }
4200
4201 /* TODO: if receiver detects non-zero bits outside the valid range, those shall be ignored. */
4202 /* priority (only valid to be set if coupling via frequency and time with priorities (7.8.1.3) */
4203 proto_tree_add_item(extension_tree, hf_oran_noncontig_priority, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4204 /* symbolMask */
4205 offset = dissect_symbolmask(tvb, extension_tree, offset, NULL((void*)0), NULL((void*)0));
4206
4207 /* Look up rbg_size enum -> value */
4208 switch (rbgSize) {
4209 case 0:
4210 /* N.B. reserved, but covered above with expert info (would remain 0) */
4211 /* Might also indicate that rb bit is valid */
4212 break;
4213 case 1:
4214 ext11_settings.ext6_rbg_size = 1; break;
4215 case 2:
4216 ext11_settings.ext6_rbg_size = 2; break;
4217 case 3:
4218 ext11_settings.ext6_rbg_size = 3; break;
4219 case 4:
4220 ext11_settings.ext6_rbg_size = 4; break;
4221 case 5:
4222 ext11_settings.ext6_rbg_size = 6; break;
4223 case 6:
4224 ext11_settings.ext6_rbg_size = 8; break;
4225 case 7:
4226 ext11_settings.ext6_rbg_size = 16; break;
4227 /* N.B., encoded in 3 bits, so no other values are possible */
4228 }
4229
4230 /* Set to looked-up value */
4231 rbgSize = ext11_settings.ext6_rbg_size;
4232
4233 uint32_t lastRbgid = 0;
4234 if (rbgSize != 0) {
4235 /* The O-DU shall not use combinations of startPrbc, numPrbc and rbgSize leading to a value of lastRbgid larger than 27 */
4236 /* i.e., leftmost bit used should not need to go off left end of rbgMask! */
4237 lastRbgid = (uint32_t)ceil((numPrbc + (startPrbc % rbgSize)) / (float)rbgSize) - 1;
4238 if (lastRbgid > 27) {
4239 expert_add_info_format(pinfo, rbg_size_ti, &ei_oran_lastRbdid_out_of_range,
4240 "SE6: rbgSize (%u) not compatible with startPrbc(%u) and numPrbc(%u)",
4241 rbgSize, startPrbc, numPrbc);
4242 break;
4243 }
4244 }
4245
4246 /* Record (and count) which bits are set in rbgMask */
4247 bool_Bool first_seen = false0;
4248 unsigned first_seen_pos=0, last_seen_pos=0;
4249 for (unsigned n=0; n < 28 && ext11_settings.ext6_num_bits_set < 28; n++) {
4250 if ((rbgMask >> n) & 0x01) {
4251 ext11_settings.ext6_bits_set[ext11_settings.ext6_num_bits_set++] = n;
4252 if (!first_seen) {
4253 first_seen = true1;
4254 first_seen_pos = n;
4255 }
4256 last_seen_pos = n;
4257 }
4258 }
4259
4260 /* Show how many bits were set in rbgMask */
4261 proto_item_append_text(rbgmask_ti, " (%u bits set)", ext11_settings.ext6_num_bits_set);
4262 /* Also, that is the range of bits */
4263 if (first_seen) {
4264 proto_item_append_text(rbgmask_ti, " (%u bits spread)", last_seen_pos-first_seen_pos+1);
4265
4266 /* Complain if last set bit is beyond lastRbgid */
4267 if (last_seen_pos > lastRbgid) {
4268 expert_add_info_format(pinfo, rbgmask_ti, &ei_oran_rbgMask_beyond_last_rbdid,
4269 "SE6: rbgMask (0x%07x) has bit %u set, but lastRbgId is %u",
4270 rbgMask, last_seen_pos, lastRbgid);
4271 }
4272 }
4273
4274 /* Also update prbs_for_st10_type5[] */
4275 if (sectionType == 10 && rbgSize != 0) {
4276 /* Unset all entries */
4277 memset(&prbs_for_st10_type5, 0, sizeof(prbs_for_st10_type5));
4278
4279 /* Work out which PRB first bit corresponds to */
4280 unsigned firstPrbStart = (startPrbc/rbgSize) * rbgSize;
4281
4282 /* Add PRBs corresponding to each bit set */
4283 for (unsigned n=0; n < 28 ; n++) {
4284 if ((rbgMask >> n) & 0x01) {
4285 /* Lazy way to clip any values that lie outside of range for section */
4286 for (unsigned p=0; p < rbgSize; p++) {
4287 unsigned start = firstPrbStart + (n*rbgSize);
4288 if ((start+p < MAX_PRBS273) && (start+p >= startPrbc) && (start+p <= startPrbc+numPrbc-1)) {
4289 prbs_for_st10_type5[start+p] = true1;
4290 }
4291 }
4292 }
4293 }
4294 }
4295
4296 break;
4297 }
4298
4299 case 7: /* SE 7: eAxC mask */
4300 /* Allow ST0 to address multiple eAxC_ID values for transmission blanking */
4301 proto_tree_add_item(extension_tree, hf_oran_eAxC_mask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4302 offset += 2;
4303 break;
4304
4305 case 8: /* SE 8: Regularization factor */
4306 {
4307 for (unsigned ueid_index=0; ueid_index < number_of_ueids; ueid_index++) {
4308 /* regularizationFactor (2 bytes) */
4309 proto_item *rf_ti = proto_tree_add_item(extension_tree, hf_oran_regularizationFactor, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4310 proto_item_append_text(rf_ti, " (UeId=%u)", ueids[ueid_index]);
4311 offset += 2;
4312 }
4313 break;
4314 }
4315 case 9: /* SE 9: Dynamic Spectrum Sharing parameters */
4316 /* Technology (1 byte) */
4317 proto_tree_add_item(extension_tree, hf_oran_technology, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4318 offset += 1;
4319 /* Reserved (1 byte) */
4320 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
4321 offset += 1;
4322 break;
4323
4324 case 10: /* SE 10: Group configuration of multiple ports */
4325 {
4326 seen_se10 = true1;
4327
4328 /* beamGroupType */
4329 uint32_t beam_group_type = 0;
4330 proto_item *bgt_ti;
4331 bgt_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_beamGroupType,
4332 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &beam_group_type);
4333 proto_item_append_text(extension_ti, " (%s)", val_to_str_const(beam_group_type, beam_group_type_vals, "Unknown"));
4334
4335 /* numPortc */
4336 proto_tree_add_item_ret_uint(extension_tree, hf_oran_numPortc,
4337 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numPortc);
4338 offset++;
4339
4340 /* Will append all beamId values to extension_ti, regardless of beamGroupType */
4341 unsigned n;
4342
4343 switch (beam_group_type) {
4344 case 0x0: /* common beam */
4345 case 0x1: /* beam matrix indication */
4346 /* Reserved byte */
4347 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
4348 offset++;
4349
4350 /* Explain how entries are allocated */
4351 if (beam_group_type == 0x0) {
4352 proto_item_append_text(extension_ti, " (all %u ueid/Beam entries are %u)", numPortc, ueId);
4353 }
4354 else {
4355 /* 'numPortc' consecutive BeamIds from section header */
4356 proto_item_append_text(extension_ti, " (ueId/beam entries are %u -> %u)", ueId, ueId+numPortc);
4357 }
4358
4359 if (sectionType == 5) {
4360 /* These types are not allowed */
4361 expert_add_info_format(pinfo, bgt_ti, &ei_oran_se10_not_allowed,
4362 "SE10: beamGroupType %u is not allowed for section type 5", beam_group_type);
4363 }
4364 break;
4365
4366 case 0x2: /* beam vector listing */
4367 {
4368 proto_item_append_text(extension_ti, " [ ");
4369
4370 /* Beam listing vector case */
4371 /* Work out how many port beam entries there is room for */
4372 /* Using numPortC as visible in issue 18116 */
4373 for (n=0; n < numPortc; n++) {
4374 /* Port subtree */
4375 proto_item *port_ti = proto_tree_add_item(extension_tree, hf_oran_se10_port,
4376 tvb, offset, 2, ENC_NA0x00000000);
4377 proto_tree *port_tree = proto_item_add_subtree(port_ti, ett_oran_se10_port);
4378
4379 /* 1 reserved bit */
4380 add_reserved_field(port_tree, hf_oran_reserved_1bit, tvb, offset, 1);
4381
4382 /* port beam ID (or UEID) (15 bits) */
4383 uint32_t id;
4384 proto_item *beamid_or_ueid_ti = proto_tree_add_item_ret_uint(port_tree, hf_oran_beamId,
4385 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &id);
4386 proto_item_append_text(beamid_or_ueid_ti, " (or UEId) port #%u", n);
4387 offset += 2;
4388
4389 if (id != 0x7fff) {
4390 if (number_of_ueids < MAX_UEIDS16) {
4391 ueids[number_of_ueids++] = id;
4392 }
4393 }
4394
4395 proto_item_append_text(extension_ti, "%u ", id);
4396 proto_item_append_text(port_ti, " (beam/ueid %u)", id);
4397 }
4398
4399 proto_item_append_text(extension_ti, "]");
4400 break;
4401 }
4402 case 0x3: /* beamId/ueId listing with associated port-list index */
4403 {
4404 proto_item_append_text(extension_ti, " [ ");
4405
4406 if (numPortc > 0) {
4407 /* first portListIndex is outside loop */
4408 uint32_t port_list_index;
4409 proto_item *pli_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_port_list_index, tvb,
4410 offset, 1, ENC_BIG_ENDIAN0x00000000, &port_list_index);
4411 if (port_list_index == 0) {
4412 /* Value 0 is reserved */
4413 expert_add_info(pinfo, pli_ti, &ei_oran_port_list_index_zero);
4414 }
4415 offset += 1;
4416
4417 for (n=0; n < numPortc-1; n++) {
4418 /* Port subtree */
4419 proto_item *port_ti = proto_tree_add_item(extension_tree, hf_oran_se10_port,
4420 tvb, offset, 3, ENC_NA0x00000000);
4421 proto_tree *port_tree = proto_item_add_subtree(port_ti, ett_oran_se10_port);
4422
4423 /* 1 reserved bit */
4424 add_reserved_field(port_tree, hf_oran_reserved_1bit, tvb, offset, 1);
4425
4426 /* port beam ID (or UEID) */
4427 uint32_t id;
4428 proto_item *beamid_or_ueid_ti = proto_tree_add_item_ret_uint(port_tree, hf_oran_beamId,
4429 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &id);
4430 proto_item_append_text(beamid_or_ueid_ti, " port #%u beam ID (or UEId) %u", n, id);
4431 offset += 2;
4432
4433 if (id != 0x7fff) {
4434 if (number_of_ueids < MAX_UEIDS16) {
4435 ueids[number_of_ueids++] = id;
4436 }
4437 }
4438
4439 /* subsequent portListIndex */
4440 pli_ti = proto_tree_add_item_ret_uint(port_tree, hf_oran_port_list_index, tvb,
4441 offset, 1, ENC_BIG_ENDIAN0x00000000, &port_list_index);
4442 if (port_list_index == 0) {
4443 /* Value 0 is reserved */
4444 expert_add_info(pinfo, pli_ti, &ei_oran_port_list_index_zero);
4445 }
4446 offset += 1;
4447
4448 proto_item_append_text(extension_ti, "%u:%u ", port_list_index, id);
4449 proto_item_append_text(port_ti, " (beam/ueid %u, portListIndex %u)", id, port_list_index);
4450 }
4451 }
4452
4453 proto_item_append_text(extension_ti, "]");
4454 break;
4455 }
4456
4457
4458 default:
4459 /* Warning for unsupported/reserved value */
4460 expert_add_info(NULL((void*)0), bgt_ti, &ei_oran_se10_unknown_beamgrouptype);
4461 break;
4462 }
4463 break;
4464 }
4465
4466 case 11: /* SE 11: Flexible Weights Extension Type */
4467 {
4468 /* Hidden filter for bf */
4469 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
4470 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
4471
4472 /* beamId in section header should be ignored. Guard against appending multiple times.. */
4473 if (section_beamId_ti && !section_beamId_ignored) {
4474 proto_item_append_text(section_beamId_ti, " (ignored)");
4475 section_beamId_ignored = true1;
4476 }
4477
4478 bool_Bool disableBFWs;
4479 uint32_t numBundPrb;
4480 bool_Bool rad;
4481
4482 /* disableBFWs */
4483 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_disable_bfws,
4484 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &disableBFWs);
4485 if (disableBFWs) {
4486 proto_item_append_text(extension_ti, " (disableBFWs)");
4487 }
4488
4489 /* RAD */
4490 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_rad,
4491 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rad);
4492 /* bundleOffset (6 bits) */
4493 proto_tree_add_item(extension_tree, hf_oran_bundle_offset, tvb,
4494 offset, 1, ENC_BIG_ENDIAN0x00000000);
4495 offset++;
4496
4497 /* numBundPrb (number of prbs in each bundle) */
4498 proto_item *num_bund_prb_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_bund_prbs,
4499 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numBundPrb);
4500 offset++;
4501 /* value zero is reserved.. */
4502 if (numBundPrb == 0) {
4503 expert_add_info(pinfo, num_bund_prb_ti, &ei_oran_reserved_numBundPrb);
4504 }
4505
4506 uint32_t num_bundles;
4507 bool_Bool orphaned_prbs = false0;
4508
4509 /* N.B. glibly assuming that Mu=1 */
4510 uint32_t symbol_count = (frameId*20 + slotId) * 14 + startSymbolId;
4511
4512 if (!disableBFWs) {
4513 /********************************************/
4514 /* Table 7.7.11.1-1 */
4515 /* Weights are present */
4516 /********************************************/
4517
4518 uint32_t bfwcomphdr_iq_width, bfwcomphdr_comp_meth;
4519 proto_item *comp_meth_ti = NULL((void*)0);
4520
4521 /* bfwCompHdr (2 subheaders - bfwIqWidth and bfwCompMeth)*/
4522 offset = dissect_bfwCompHdr(tvb, extension_tree, offset,
4523 &bfwcomphdr_iq_width, &bfwcomphdr_comp_meth, &comp_meth_ti);
4524
4525 /* Work out number of bundles, but take care not to divide by zero. */
4526 if (numBundPrb == 0) {
4527 break;
4528 }
4529
4530 /* Work out bundles! */
4531 /* TODO: assuming that these modifying SEs appear before SE 11, but not sure that this is guaranteed?! */
4532 ext11_work_out_bundles(startPrbc, numPrbc, numBundPrb, &ext11_settings);
4533 num_bundles = ext11_settings.num_bundles;
4534
4535 /* Add (complete) bundles */
4536 for (unsigned b=0; b < num_bundles; b++) {
4537 offset = dissect_bfw_bundle(tvb, extension_tree, pinfo, offset,
4538 comp_meth_ti, bfwcomphdr_comp_meth,
4539 NULL((void*)0) /* no ModCompr */,
4540 (ext11_settings.ext21_set) ?
4541 numPrbc :
4542 pref_num_bf_antennas,
4543 bfwcomphdr_iq_width,
4544 b, /* bundle number */
4545 &ext11_settings.bundles[b],
4546 symbol_count,
4547 (link_planes_together && data_section) ? &data_section->details[index_to_use] : NULL((void*)0),
4548 tap_info);
4549 if (!offset) {
4550 break;
4551 }
4552 }
4553 if (num_bundles > 0) {
4554 /* Set flag from last bundle entry */
4555 orphaned_prbs = ext11_settings.bundles[num_bundles-1].is_orphan;
4556 }
4557 }
4558 else {
4559 /********************************************/
4560 /* Table 7.7.11.1-2 */
4561 /* No weights in this case */
4562 /********************************************/
4563
4564 /* Work out number of bundles, but take care not to divide by zero. */
4565 if (numBundPrb == 0) {
4566 break;
4567 }
4568
4569 ext11_work_out_bundles(startPrbc, numPrbc, numBundPrb, &ext11_settings);
4570 num_bundles = ext11_settings.num_bundles;
4571
4572 for (unsigned n=0; n < num_bundles; n++) {
4573 uint32_t first_prb = ext11_settings.bundles[n].start;
4574 uint32_t last_prb = ext11_settings.bundles[n].end;
4575
4576 /* Still create a bundle subtree */
4577 proto_item *bundle_ti = proto_tree_add_string_format(extension_tree, hf_oran_bfw_bundle,
4578 tvb, offset, 2, "",
4579 "Bundle: (PRBs %3u-%3u)",
4580 first_prb, last_prb);
4581 proto_tree *bundle_tree = proto_item_add_subtree(bundle_ti, ett_oran_bfw_bundle);
4582
4583 /* contInd */
4584 proto_tree_add_item(bundle_tree, hf_oran_cont_ind,
4585 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4586 /* beamId */
4587 /* N.B., only added to tap_info if not 0 or ignored (after SEs seen) */
4588 uint32_t beam_id;
4589 proto_item *beamid_ti = proto_tree_add_item_ret_uint(bundle_tree, hf_oran_beam_id,
4590 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &beam_id);
4591 proto_item_append_text(bundle_ti, " (beamId:%u)", beam_id);
4592
4593
4594 if (!ext11_settings.bundles[n].is_orphan) {
4595 proto_item_append_text(beamid_ti, " (PRBs %3u-%3u) (Bundle %2u)",
4596 ext11_settings.bundles[n].start,
4597 ext11_settings.bundles[n].end,
4598 n);
4599 }
4600 else {
4601 orphaned_prbs = true1;
4602 proto_item_append_text(beamid_ti, " (PRBs %3u-%3u) (Orphaned PRBs)",
4603 ext11_settings.bundles[n].start,
4604 ext11_settings.bundles[n].end);
4605 proto_item_append_text(bundle_ti, " (Orphaned PRBs)");
4606 }
4607 offset += 2;
4608
4609 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
4610 if (data_section) {
4611 /* Set beamId only for range of PRBs */
4612 for (unsigned prb = ext11_settings.bundles[n].start; prb <= ext11_settings.bundles[n].end && prb < ORAN_MAX_PRBS273; prb++) {
4613 section_details_set_beam_id(&data_section->details[index_to_use], prb, (uint16_t)beam_id);
4614 }
4615 }
4616 }
4617
4618 /* Look for where BFWs were sent for this beamId */
4619 bfw_definition *definition;
4620
4621 wmem_tree_key_t key[3];
4622 key[0].length = 1;
4623 key[0].key = &pinfo->num;
4624 key[1].length = 1;
4625 key[1].key = &beam_id;
4626 key[2].length = 0;
4627 key[2].key = NULL((void*)0);
4628
4629 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
4630 /* Look up current result */
4631 definition = wmem_tree_lookup32(dl_beam_ids_defined, beam_id);
4632 if (definition != NULL((void*)0)) {
4633 /* Add to results table for this frame */
4634 wmem_tree_insert32_array(dl_beam_ids_results, key, definition);
4635 }
4636 }
4637 else {
4638 /* Look up from result table */
4639 definition = wmem_tree_lookup32_array(dl_beam_ids_results, key);
4640 }
4641
4642 /* Show link back to frame where/when beamId was defined. Allow linking to self */
4643 if (definition && definition->frame_defined != 0) {
4644 proto_item *defined_ti = proto_tree_add_uint(bundle_tree, hf_oran_bfws_frame_defined, tvb, offset, 0, definition->frame_defined);
4645 proto_item_set_generated(defined_ti);
4646 proto_item *since_ti = proto_tree_add_uint(bundle_tree, hf_oran_bfws_symbols_since_defined, tvb, offset, 0,
4647 symbol_count - definition->symbol_when_defined);
4648 proto_item_set_generated(since_ti);
4649 }
4650 else {
4651 /* TODO: lookup needs to find beam if it was defined in this frame!! */
4652 expert_add_info_format(NULL((void*)0), beamid_ti, &ei_oran_beamid_bfws_not_found,
4653 "ext11 for beamId %u and disableBFWs set, but can't find definition", beam_id);
4654 }
4655 }
4656
4657 }
4658
4659 /* Add summary to extension root */
4660 if (orphaned_prbs) {
4661 proto_item_append_text(extension_ti, " (%u full bundles + orphaned)", num_bundles-1);
4662 }
4663 else {
4664 proto_item_append_text(extension_ti, " (%u bundles)", num_bundles);
4665 }
4666 }
4667
4668 break;
4669
4670 case 12: /* SE 12: Non-Contiguous PRB Allocation with Frequency Ranges */
4671 {
4672 /* numSymbol not used in this case */
4673 if (numsymbol_ti && !numsymbol_ignored) {
4674 proto_item_append_text(numsymbol_ti, " (ignored)");
4675 numsymbol_ignored = true1;
4676 }
4677
4678 /* rb must be zero if this SE is present */
4679 if (rb != 0) {
4680 expert_add_info(NULL((void*)0), rb_ti, &ei_oran_se12_rb_set);
4681 }
4682
4683 ext11_settings.ext12_set = true1;
4684
4685 /* priority */
4686 proto_tree_add_item(extension_tree, hf_oran_noncontig_priority, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4687
4688 /* symbolMask */
4689 offset = dissect_symbolmask(tvb, extension_tree, offset, NULL((void*)0), NULL((void*)0));
4690
4691 /* There are now 'R' pairs of (offStartPrb, numPrb) values. Fill extlen bytes with values. If last one is not set,
4692 should be populated with 0s. */
4693 uint32_t extlen_remaining_bytes = (extlen*4) - 4;
4694 uint8_t prb_index;
4695
4696 /* This is for ST10/ST11. First pair starts after frames signalled there */
4697 uint16_t st10_st11_offset = startPrbc + numPrbc;
4698
4699 for (prb_index = 1; extlen_remaining_bytes > 0; prb_index++)
4700 {
4701 /* Create a subtree for each pair */
4702 proto_item *pair_ti = proto_tree_add_string(extension_tree, hf_oran_frequency_range,
4703 tvb, offset, 2, "");
4704 proto_tree *pair_tree = proto_item_add_subtree(pair_ti, ett_oran_frequency_range);
4705
4706 /* offStartPrb */
4707 uint32_t off_start_prb;
4708 proto_tree_add_item_ret_uint(pair_tree, hf_oran_off_start_prb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &off_start_prb);
4709 offset++;
4710
4711 /* numPrb */
4712 uint32_t num_prb;
4713 proto_tree_add_item_ret_uint(pair_tree, hf_oran_num_prb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_prb);
4714 offset++;
4715
4716 extlen_remaining_bytes -= 2;
4717
4718 /* Last pair may be 0,0 if not used. Check for this */
4719 if ((extlen_remaining_bytes == 0) && (off_start_prb == 0) && (num_prb == 0)) {
4720 proto_item_append_text(pair_ti, " (not used)");
4721 }
4722 /* Add summary to pair root item, and configure details in ext11_settings */
4723 else {
4724 proto_item_append_text(pair_ti, "(%u) [%u : %u]",
4725 prb_index, off_start_prb, num_prb);
4726 proto_item_append_text(extension_ti, "[%u : %u]",
4727 off_start_prb, num_prb);
4728 if (ext11_settings.ext12_num_pairs < MAX_BFW_EXT12_PAIRS128) {
4729 ext11_settings.ext12_pairs[ext11_settings.ext12_num_pairs].off_start_prb = off_start_prb;
4730 ext11_settings.ext12_pairs[ext11_settings.ext12_num_pairs++].num_prb = num_prb;
4731 }
4732
4733 /* Also update PRBs to be covered for ST10 type 5 */
4734 /* Original range from section is added to.. */
4735 /* TODO: I don't think this is quite right.. */
4736 for (unsigned prb=st10_st11_offset+off_start_prb; prb < st10_st11_offset+off_start_prb+num_prb; prb++) {
4737 if (prb < MAX_PRBS273) {
4738 prbs_for_st10_type5[prb] = true1;
4739 }
4740 }
4741
4742 /* Any next pair will begin after this one */
4743 st10_st11_offset += (off_start_prb + num_prb);
4744 }
4745 }
4746 break;
4747 }
4748
4749 case 13: /* SE 13: PRB Allocation with Frequency Hopping */
4750 {
4751 /* Will update settings for ext11 */
4752 ext11_settings.ext13_set = true1;
4753
4754 uint32_t extlen_remaining_bytes = (extlen*4) - 2;
4755 uint8_t allocation_index;
4756
4757 unsigned prev_next_symbol_id = 0, prev_next_start_prbc = 0;
4758
4759 for (allocation_index = 1; extlen_remaining_bytes > 0; allocation_index++)
4760 {
4761 /* Subtree for allocation */
4762 proto_item *allocation_ti = proto_tree_add_string(extension_tree, hf_oran_prb_allocation,
4763 tvb, offset, 2, "");
4764 proto_tree *allocation_tree = proto_item_add_subtree(allocation_ti, ett_oran_prb_allocation);
4765
4766 /* Reserved (2 bits) */
4767 add_reserved_field(allocation_tree, hf_oran_reserved_2bits, tvb, offset, 1);
4768
4769 /* nextSymbolId (4 bits) */
4770 uint32_t next_symbol_id;
4771 proto_tree_add_item_ret_uint(allocation_tree, hf_oran_nextSymbolId, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &next_symbol_id);
4772
4773 /* nextStartPrbc (10 bits) */
4774 uint32_t next_start_prbc;
4775 proto_tree_add_item_ret_uint(allocation_tree, hf_oran_nextStartPrbc, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &next_start_prbc);
4776 offset += 2;
4777
4778 /* Add summary to allocation root item */
4779 proto_item_append_text(allocation_ti, "(%u) nextSymbolId=%3u, nextStartPrbc=%u",
4780 allocation_index, next_symbol_id, next_start_prbc);
4781
4782 /* Checking for duplicates (expected if e.g. had only 2 entries but extlen bytes still to fill */
4783 if ((allocation_index > 1) && (next_symbol_id == prev_next_symbol_id) && (next_start_prbc == prev_next_start_prbc)) {
4784 proto_item_append_text(allocation_ti, " (repeated - to fill up extlen)");
4785 }
4786 else {
4787 /* Add entry for configuring ext11. don't store out of range */
4788 if (ext11_settings.ext13_num_start_prbs < MAX_BFW_EXT13_ALLOCATIONS128) {
4789 ext11_settings.ext13_start_prbs[ext11_settings.ext13_num_start_prbs++] = next_start_prbc;
4790 }
4791 }
4792 prev_next_symbol_id = next_symbol_id;
4793 prev_next_start_prbc = next_start_prbc;
4794
4795 extlen_remaining_bytes -= 2;
4796 }
4797 break;
4798 }
4799
4800 case 14: /* SE 14: Nulling-layer Info. for ueId-based beamforming */
4801 /* Hidden filter for bf (DMRS BF) */
4802 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
4803 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
4804
4805 if (!seen_se10) {
4806 proto_tree_add_item(extension_tree, hf_oran_nullLayerInd, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4807 offset += 1;
4808 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
4809 offset += 1;
4810 }
4811 else {
4812 /* Loop over numPortc++1 (from SE 10) nullLayerInd fields */
4813 for (unsigned port=0; port < numPortc+1; port++) {
4814 proto_tree_add_item(extension_tree, hf_oran_nullLayerInd, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4815 offset += 1;
4816 }
4817 }
4818 break;
4819
4820 case 15: /* SE 15: Mixed-numerology Info. for ueId-based beamforming */
4821 {
4822 /* frameStructure */
4823 offset = dissect_frame_structure(extension_tree, tvb, offset,
4824 subframeId, slotId);
4825 /* freqOffset */
4826 proto_tree_add_item(extension_tree, hf_oran_freqOffset, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000);
4827 offset += 3;
4828 /* cpLength */
4829 proto_item *cplength_ti = proto_tree_add_item(extension_tree, hf_oran_cpLength, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4830 if (sectionType != 0 && sectionType != 3) {
4831 proto_item_append_text(cplength_ti, " (ignored - used only with ST0 and ST3)");
4832 }
4833 offset += 2;
4834 break;
4835 }
4836
4837 case 16: /* SE 16: Antenna mapping in UE channel information based UL beamforming */
4838 {
4839 /* One entry for each UEId */
4840 for (unsigned n=0; n < number_of_ueids; n++) {
4841 /* TODO: want to skip if ueId is 0x7fff and beamGroupType = 10b and 'non-scheduled-ueId-enabled'=TRUE */
4842 /* antMask */
4843 proto_item *ti = proto_tree_add_item(extension_tree, hf_oran_antMask, tvb, offset, 8, ENC_BIG_ENDIAN0x00000000);
4844 proto_item_append_text(ti, " (RX eAxC #%u, UEId=%u)", n+1, ueids[n]);
4845 offset += 8;
4846 }
4847 break;
4848 }
4849
4850 case 17: /* SE 17: Indication of user port group. Applies to ST5 + SE10 with group type 1 (beam matrix indication) */
4851 {
4852 uint32_t extlen_remaining_bytes = (extlen*4) - 2;
4853 uint32_t end_bit = (offset+extlen_remaining_bytes) * 8;
4854 uint32_t ueid_index = 1;
4855
4856 /* "the preceding Section Type and extension messages implicitly provide the number of scheduled users" */
4857 for (uint32_t bit_offset=offset*8; (bit_offset < end_bit) && (ueid_index <= number_of_ueids); bit_offset+=4, ueid_index++) {
4858 /* numUeId (Number of UE Ids per user) */
4859 proto_item *ti = proto_tree_add_bits_item(extension_tree, hf_oran_num_ueid, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000);
4860 /* TODO: show ueids[ueid_index] here too? */
4861 proto_item_append_text(ti, " (user #%u)", ueid_index);
4862 }
4863 break;
4864 }
4865
4866 case 18: /* SE 18: Uplink transmission management */
4867 /* transmissionWindowOffset */
4868 proto_tree_add_item(extension_tree, hf_oran_transmissionWindowOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4869 offset += 2;
4870 /* reserved (2 bits) */
4871 add_reserved_field(extension_tree, hf_oran_reserved_2bits, tvb, offset, 1);
4872 /* transmissionWindowSize (14 bits) */
4873 proto_tree_add_item(extension_tree, hf_oran_transmissionWindowSize, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4874 offset += 2;
4875
4876 /* reserved (6 bits) */
4877 add_reserved_field(extension_tree, hf_oran_reserved_6bits, tvb, offset, 1);
4878 /* toT (2 bits) */
4879 proto_tree_add_item(extension_tree, hf_oran_toT, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4880 offset += 1;
4881 break;
4882
4883 case 19: /* SE 19: Compact beamforming information for multiple port */
4884 {
4885 /* beamId in section header should be ignored. Guard against appending multiple times.. */
4886 if (section_beamId_ti && !section_beamId_ignored) {
4887 proto_item_append_text(section_beamId_ti, " (ignored)");
4888 section_beamId_ignored = true1;
4889 }
4890
4891 /* numSymbol not used in this case */
4892 if (numsymbol_ti && !numsymbol_ignored) {
4893 proto_item_append_text(numsymbol_ti, " (ignored)");
4894 numsymbol_ignored = true1;
4895 }
4896
4897 /* disableBFWs */
4898 bool_Bool disableBFWs;
4899 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_disable_bfws,
4900 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &disableBFWs);
4901 if (disableBFWs) {
4902 proto_item_append_text(extension_ti, " (disableBFWs)");
4903 }
4904 /* repetition (1 bit) */
4905 uint64_t repetition;
4906 proto_tree_add_bits_ret_val(extension_tree, hf_oran_se19_repetition, tvb, (offset*8)+1, 1, &repetition, ENC_BIG_ENDIAN0x00000000);
4907 /* numPortc (6 bits) */
4908 proto_tree_add_item_ret_uint(extension_tree, hf_oran_numPortc,
4909 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numPortc);
4910 offset++;
4911
4912 /* priority (2 bits) */
4913 proto_tree_add_item(extension_tree, hf_oran_noncontig_priority, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4914 /* symbolMask (14 bits) */
4915 offset = dissect_symbolmask(tvb, extension_tree, offset, NULL((void*)0), NULL((void*)0));
4916
4917 uint32_t bfwcomphdr_iq_width, bfwcomphdr_comp_meth;
4918 proto_item *comp_meth_ti = NULL((void*)0);
4919
4920 if (!repetition) {
4921
4922 if (!disableBFWs) {
4923 /* bfwCompHdr */
4924 offset = dissect_bfwCompHdr(tvb, extension_tree, offset,
4925 &bfwcomphdr_iq_width, &bfwcomphdr_comp_meth, &comp_meth_ti);
4926 }
4927
4928 /* Add entries for each port */
4929 for (unsigned port=0; port < numPortc; port++) {
4930
4931 /* Create subtree for port entry*/
4932 int port_start_offset = offset;
4933 proto_item *port_ti = proto_tree_add_string_format(extension_tree, hf_oran_ext19_port,
4934 tvb, offset, 0,
4935 "", "Port %u: ", port);
4936 proto_tree *port_tree = proto_item_add_subtree(port_ti, ett_oran_ext19_port);
4937
4938 /* Reserved (4 bits) */
4939 add_reserved_field(port_tree, hf_oran_reserved_4bits, tvb, offset, 1);
4940 /* portReMask (12 bits) */
4941 proto_tree_add_item(port_tree, hf_oran_portReMask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4942 offset += 2;
4943
4944 /* Reserved (2 bits) */
4945 add_reserved_field(port_tree, hf_oran_reserved_2bits, tvb, offset, 1);
4946 /* portSymbolMask (14 bits) */
4947 proto_tree_add_item(port_tree, hf_oran_portSymbolMask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4948 offset += 2;
4949
4950 /* Reserved (1 bit) */
4951 add_reserved_field(port_tree, hf_oran_reserved_1bit, tvb, offset, 1);
4952 /* beamID (15 bits) */
4953 uint16_t beamId;
4954 proto_tree_add_item_ret_uint16(port_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &beamId);
4955 proto_item_append_text(port_ti, " (beamId=%u)", beamId);
4956 offset += 2;
4957
4958 /* No weights present */
4959 if (!disableBFWs) {
4960 /*******************************************************************/
4961 /* Table 7.7.19.1-1 (there is no part -2 for disableBFWs case...), */
4962 /* but for SE 11, bfwCompParam was only present for !disableBFWs */
4963 /*******************************************************************/
4964
4965 /* bfwCompParam */
4966 bool_Bool compression_method_supported = false0;
4967 uint32_t exponent = 0;
4968 unsigned num_trx_entries = 0;
4969 uint16_t *trx;
4970 offset = dissect_bfwCompParam(tvb, port_tree, pinfo, offset, comp_meth_ti,
4971 &bfwcomphdr_comp_meth, &exponent, &compression_method_supported,
4972 &num_trx_entries, &trx);
4973
4974 int bit_offset = offset*8;
4975 int bfw_offset;
4976
4977 /* Add weights for each TRX */
4978 unsigned trx_to_add = (num_trx_entries==0) ? pref_num_bf_antennas : num_trx_entries;
4979 for (unsigned b=0; b < trx_to_add; b++) {
4980
4981 uint16_t trx_index = (num_trx_entries) ? trx[b] : b+1;
4982
4983 /* Create BFW subtree */
4984 bfw_offset = bit_offset / 8;
4985 uint8_t bfw_extent = ((bit_offset + (bfwcomphdr_iq_width*2)) / 8) - bfw_offset;
4986 proto_item *bfw_ti = proto_tree_add_string_format(port_tree, hf_oran_bfw,
4987 tvb, bfw_offset, bfw_extent,
4988 "", "TRX %u: (", trx_index);
4989 proto_tree *bfw_tree = proto_item_add_subtree(bfw_ti, ett_oran_bfw);
4990
4991 /* I */
4992 uint32_t bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
4993 float value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent, NULL((void*)0) /* no ModCompr */, 0 /* RE */);
4994 /* Add to tree. */
4995 proto_tree_add_float_format_value(bfw_tree, hf_oran_bfw_i, tvb, bit_offset/8,
4996 (bfwcomphdr_iq_width+7)/8, value, "#%u=%f", b, value);
4997 bit_offset += bfwcomphdr_iq_width;
4998 proto_item_append_text(bfw_ti, "I%u=%f ", b, value);
4999
5000 /* Q */
5001 bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
5002 value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent, NULL((void*)0) /* no ModCompr */, 0 /* RE */);
5003 /* Add to tree. */
5004 proto_tree_add_float_format_value(bfw_tree, hf_oran_bfw_q, tvb, bit_offset/8,
5005 (bfwcomphdr_iq_width+7)/8, value, "#%u=%f", b, value);
5006 bit_offset += bfwcomphdr_iq_width;
5007 proto_item_append_text(bfw_ti, "Q%u=%f)", b, value);
5008 }
5009
5010 offset = (bit_offset+7)/8;
5011 }
5012 else {
5013 /* No weights... */
5014 }
5015
5016 /* Set length of this port entry */
5017 proto_item_set_len(port_ti, offset-port_start_offset);
5018 }
5019 }
5020 break;
5021 }
5022
5023 case 20: /* SE 20: Puncturing extension */
5024 {
5025 /* numPuncPatterns */
5026 uint32_t numPuncPatterns;
5027 proto_tree_add_item_ret_uint(extension_tree, hf_oran_numPuncPatterns, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numPuncPatterns);
5028 offset += 1;
5029
5030 /* Add each puncturing pattern */
5031 for (uint32_t n=0; n < numPuncPatterns; n++) {
5032 unsigned pattern_start_offset = offset;
5033
5034 /* Subtree for this puncturing pattern */
5035 proto_item *pattern_ti = proto_tree_add_string_format(extension_tree, hf_oran_puncPattern,
5036 tvb, offset, 0,
5037 "", "Puncturing Pattern: %u/%u", n+1, numPuncPatterns);
5038 proto_tree *pattern_tree = proto_item_add_subtree(pattern_ti, ett_oran_punc_pattern);
5039
5040 /* SymbolMask (14 bits) */
5041 proto_tree_add_item(pattern_tree, hf_oran_symbolMask_ext20, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5042 offset += 1;
5043
5044 uint32_t startPuncPrb, numPuncPrb;
5045
5046 /* startPuncPrb (10 bits) */
5047 proto_tree_add_item_ret_uint(pattern_tree, hf_oran_startPuncPrb, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPuncPrb);
5048 offset += 2;
5049 /* numPuncPrb (8 bits) */
5050 proto_tree_add_item_ret_uint(pattern_tree, hf_oran_numPuncPrb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numPuncPrb);
5051 offset += 1;
5052
5053 proto_item_append_text(pattern_ti, " [%u->%u]", startPuncPrb, startPuncPrb+numPuncPrb-1);
5054
5055 /* Make a hole in range of PRBs to report */
5056 for (unsigned p=startPuncPrb; p < startPuncPrb+numPuncPrb; p++) {
5057 if (p < MAX_PRBS273) {
5058 prbs_for_st10_type5[p] = false0;
5059 }
5060 }
5061
5062 /* puncReMask (12 bits) */
5063 proto_tree_add_item(pattern_tree, hf_oran_puncReMask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5064 offset += 1;
5065 /* rb (1 bit) */
5066 proto_item *se20_rb_ti = proto_tree_add_item(pattern_tree, hf_oran_rb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5067 /* reserved (1 bit) */
5068 add_reserved_field(pattern_tree, hf_oran_reserved_bit5, tvb, offset, 1);
5069 /* multiSDScope (1 bit) */
5070 proto_tree_add_item(pattern_tree, hf_oran_multiSDScope, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5071 /* rbgIncl (1 bit) */
5072 bool_Bool rbgIncl;
5073 proto_tree_add_item_ret_boolean(pattern_tree, hf_oran_RbgIncl, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rbgIncl);
5074 offset += 1;
5075
5076 if (rbgIncl) {
5077 /* reserved (1 bit) */
5078 add_reserved_field(pattern_tree, hf_oran_reserved_1bit, tvb, offset, 1);
5079 /* rbgSize(3 bits) */
5080 proto_tree_add_item(pattern_tree, hf_oran_rbgSize, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5081 /* rbgMask (28 bits) */
5082 proto_item *rbgmask_ti;
5083 uint32_t rbgMask;
5084 offset = dissect_rbg_mask(pattern_tree, tvb, offset, &rbgMask, &rbgmask_ti);
5085
5086 proto_item_append_text(se20_rb_ti, " (ignored)");
5087 }
5088
5089 proto_item_set_len(pattern_ti, offset-pattern_start_offset);
5090 }
5091
5092 break;
5093 }
5094 case 21: /* SE 21: Variable PRB group size for channel information */
5095 {
5096 /* ciPrbGroupSize */
5097 uint32_t ci_prb_group_size;
5098 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);
5099 offset += 1;
5100
5101 switch (ci_prb_group_size) {
5102 case 0:
5103 case 1:
5104 case 255:
5105 /* Reserved value */
5106 expert_add_info_format(pinfo, prb_group_size_ti, &ei_oran_ci_prb_group_size_reserved,
5107 "SE 11 ciPrbGroupSize is reserved value %u - must be 2-254",
5108 ci_prb_group_size);
5109 break;
5110 default:
5111 /* This value affects how SE 11 is interpreted */
5112 ext11_settings.ext21_set = true1;
5113 ext11_settings.ext21_ci_prb_group_size = ci_prb_group_size;
5114
5115 if (numPrbc == 0) {
5116 expert_add_info(pinfo, numprbc_ti, &ei_oran_numprbc_ext21_zero);
5117 }
5118 break;
5119 }
5120
5121 /* reserved (6 bits) */
5122 add_reserved_field(extension_tree, hf_oran_reserved_6bits, tvb, offset, 1);
5123
5124 /* prgSize (2 bits). Interpretation depends upon section type (5 or 6), but also mplane parameters? */
5125 if (sectionType == SEC_C_UE_SCHED) { /* Section Type 5 */
5126 proto_tree_add_item(extension_tree, hf_oran_prg_size_st5, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5127 }
5128 else if (sectionType == SEC_C_CH_INFO) { /* Section Type 6 */
5129 proto_tree_add_item(extension_tree, hf_oran_prg_size_st6, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5130 }
5131 offset += 1;
5132 break;
5133 }
5134
5135 case 22: /* SE 22: ACK/NACK request */
5136 {
5137 uint32_t ack_nack_req_id;
5138 proto_tree_add_item_ret_uint(extension_tree, hf_oran_ack_nack_req_id, tvb, offset, 2,
5139 ENC_BIG_ENDIAN0x00000000, &ack_nack_req_id);
5140 offset += 2;
5141
5142 if (state) {
5143 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
5144 /* Add this request into conversation state on first pass */
5145 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)))
;
5146 request_details->request_frame_number = pinfo->num;
5147 request_details->request_frame_time = pinfo->abs_ts;
5148 request_details->requestType = SE22;
5149 /* Insert into flow's tree */
5150 wmem_tree_insert32(state->ack_nack_requests, ack_nack_req_id, request_details);
5151 }
5152 else {
5153 /* Try to link forward to ST8 response */
5154 ack_nack_request_t *response = wmem_tree_lookup32(state->ack_nack_requests,
5155 ack_nack_req_id);
5156 if (response) {
5157 show_link_to_acknack_response(extension_tree, tvb, pinfo, response);
5158 }
5159 }
5160 }
5161 break;
5162 }
5163
5164 case 23: /* SE 23: Arbitrary symbol pattern modulation compression parameters */
5165 {
5166 /* Green common header */
5167
5168 /* numSymPrbPattern (4 bits) */
5169 uint32_t num_sym_prb_pattern;
5170 proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_sym_prb_pattern, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_sym_prb_pattern);
5171 /* reserved (3 bits) */
5172 add_reserved_field(extension_tree, hf_oran_reserved_bits456, tvb, offset, 1);
5173 /* prbMode (1 bit) */
5174 bool_Bool prb_mode;
5175 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_prb_mode, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &prb_mode);
5176 offset += 1;
5177
5178 /* reserved (8 bits) */
5179 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
5180 offset += 1;
5181
5182 /* Dissect each SymPrbPattern */
5183 for (uint32_t n=0; n < num_sym_prb_pattern; n++) {
5184
5185 /* Subtree */
5186 proto_item *pattern_ti = proto_tree_add_string_format(extension_tree, hf_oran_sym_prb_pattern,
5187 tvb, offset, 1, "",
5188 prb_mode ? "PRB-BLOCK" : "PRB-MASK");
5189 proto_tree *pattern_tree = proto_item_add_subtree(pattern_ti, ett_oran_sym_prb_pattern);
5190
5191
5192 /* Orange part */
5193
5194 /* Reserved (2 bits) */
5195 add_reserved_field(pattern_tree, hf_oran_reserved_2bits, tvb, offset, 1);
5196 /* symMask (14 bits) */
5197 proto_tree_add_item(pattern_tree, hf_oran_sym_mask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5198 offset += 2;
5199 /* numMcScaleOffset (4 bits) */
5200 uint32_t numMcScaleOffset;
5201 proto_tree_add_item_ret_uint(pattern_tree, hf_oran_num_mc_scale_offset, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numMcScaleOffset);
5202
5203 if (!prb_mode) { /* PRB-MASK */
5204 /* prbPattern (4 bits) */
5205 proto_tree_add_item(pattern_tree, hf_oran_prb_pattern, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5206 offset += 1;
5207 /* reserved (8 bits) */
5208 add_reserved_field(pattern_tree, hf_oran_reserved_8bits, tvb, offset, 1);
5209 offset += 1;
5210 /* reserved (4 bits) */
5211 add_reserved_field(pattern_tree, hf_oran_reserved_4bits, tvb, offset, 1);
5212 }
5213 else { /* PRB-BLOCK */
5214 /* prbBlkOffset (8 bits) */
5215 proto_tree_add_item(pattern_tree, hf_oran_prb_blk_offset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5216 offset += 1;
5217 /* prbBlkSize (8 bits) */
5218 proto_tree_add_item(pattern_tree, hf_oran_prb_blk_size, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5219 offset += 1;
5220 }
5221
5222 for (unsigned c=0; c < numMcScaleOffset; c++) {
5223 if (c > 0) {
5224 /* reserved (4 bits) */
5225 add_reserved_field(pattern_tree, hf_oran_reserved_4bits, tvb, offset, 1);
5226 }
5227
5228 static int * const remask_flags_even[] = {
5229 &hf_oran_mc_scale_re_mask_re1_even,
5230 &hf_oran_mc_scale_re_mask_re2_even,
5231 &hf_oran_mc_scale_re_mask_re3_even,
5232 &hf_oran_mc_scale_re_mask_re4_even,
5233 &hf_oran_mc_scale_re_mask_re5_even,
5234 &hf_oran_mc_scale_re_mask_re6_even,
5235 &hf_oran_mc_scale_re_mask_re7_even,
5236 &hf_oran_mc_scale_re_mask_re8_even,
5237 &hf_oran_mc_scale_re_mask_re9_even,
5238 &hf_oran_mc_scale_re_mask_re10_even,
5239 &hf_oran_mc_scale_re_mask_re11_even,
5240 &hf_oran_mc_scale_re_mask_re12_even,
5241 NULL((void*)0)
5242 };
5243
5244 /* mcScaleReMask (12 bits). Defines which REs the following csf and mcScaleOffset apply to */
5245 uint64_t mcScaleReMask, mcScaleOffset;
5246 proto_tree_add_bitmask_ret_uint64(pattern_tree, tvb, offset,
5247 hf_oran_mc_scale_re_mask_even,
5248 ett_oran_mc_scale_remask,
5249 remask_flags_even, ENC_BIG_ENDIAN0x00000000, &mcScaleReMask);
5250 offset += 2;
5251
5252 /* csf (1 bit) */
5253 bool_Bool csf;
5254 dissect_csf(pattern_tree, tvb, offset*8, ci_iq_width, &csf);
5255 /* mcScaleOffset (15 bits) */
5256 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);
5257 uint16_t exponent = (mcScaleOffset >> 11) & 0x000f; /* m.s. 4 bits */
5258 uint16_t mantissa = mcScaleOffset & 0x07ff; /* l.s. 11 bits */
5259 float mcScaleOffset_value = ((float)mantissa/(1<<11)) * ((float)1.0 / (1 << exponent));
5260 proto_item_append_text(ti, " (%f)", mcScaleOffset_value);
5261
5262 offset += 2;
5263
5264 /* Record this config. */
5265 /* TODO: at some point, will also want to store/use PRB + symbol filters */
5266 section_mod_compr_config_t* sect_config = get_mod_compr_section_to_write(pinfo, state, sectionId);
5267
5268 if (sect_config && sect_config->num_configs < MAX_MOD_COMPR_CONFIGS12) {
5269 unsigned i = sect_config->num_configs;
5270 sect_config->configs[i].mod_compr_re_mask = (uint16_t)mcScaleReMask;
5271 sect_config->configs[i].mod_compr_csf = csf;
5272 sect_config->configs[i].mod_compr_scaler = mcScaleOffset_value;
5273 sect_config->num_configs++;
5274 }
5275 }
5276
5277 proto_item_set_end(pattern_ti, tvb, offset);
5278 }
5279 break;
5280 }
5281
5282 case 24: /* SE 24: PUSCH DMRS configuration */
5283 {
5284 /* Hidden filter for bf (DMRS BF) */
5285 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
5286 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
5287
5288 /* alpnPerSym (1 bit) */
5289 proto_tree_add_item(extension_tree, hf_oran_alpn_per_sym, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5290 /* antDmrsSnr (1 bit) */
5291 proto_tree_add_item(extension_tree, hf_oran_ant_dmrs_snr, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5292 /* reserved (1 bit) */
5293 add_reserved_field(extension_tree, hf_oran_reserved_bit2, tvb, offset, 1);
5294 /* userGroupSize (5 bits) */
5295 uint32_t user_group_size;
5296 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);
5297 if (user_group_size == 0) {
5298 proto_item_append_text(ugs_ti, " (not used)");
5299 }
5300 else if (user_group_size > 12) {
5301 proto_item_append_text(ugs_ti, " (reserved)");
5302 }
5303 offset += 1;
5304 /* userGroupId (8 bits)*/
5305 uint32_t user_group_id;
5306 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);
5307 if (user_group_id == 0) {
5308 /* TODO: Value 0 can happen in several cases, described in 7.7.24.7.. */
5309 }
5310 if (user_group_id == 255) {
5311 /* Value 255 is reserved */
5312 expert_add_info(pinfo, ugi_ti, &ei_oran_user_group_id_reserved_value);
5313 }
5314 offset += 1;
5315
5316 bool_Bool seen_value_to_inherit = false0;
5317 bool_Bool inherited_config_has_transform_precoding = false0;
5318 int dmrs_configs_seen = 0;
5319
5320 /* Dissect each entry until reach number of configured ueIds (or run out of extlen bytes..) */
5321 uint32_t ueid_index = 0;
5322 while ((offset < (extension_start_offset + extlen*4)) && (ueid_index < number_of_ueids)) {
5323 dmrs_configs_seen++;
5324
5325 /* Subtree */
5326 proto_item *entry_ti = proto_tree_add_string_format(extension_tree, hf_oran_dmrs_entry,
5327 tvb, offset, 0, "",
5328 "Entry");
5329 proto_tree *entry_tree = proto_item_add_subtree(entry_ti, ett_oran_dmrs_entry);
5330
5331 /* entryType (3 bits) */
5332 uint32_t entry_type;
5333 proto_item *entry_type_ti;
5334 entry_type_ti = proto_tree_add_item_ret_uint(entry_tree, hf_oran_entry_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &entry_type);
5335 if (entry_type > 3) {
5336 proto_item_append_text(entry_type_ti, " (reserved)");
5337 }
5338
5339 /* dmrsPortNumber (5 bits). Values 0-11 allowed */
5340 unsigned int dmrs_port_number;
5341 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);
5342 if (dmrs_port_number > 11) {
5343 proto_item_append_text(dpn_ti, " (12-31 are reserved)");
5344 }
5345 offset += 1;
5346
5347 /* What follows depends upon entryType */
5348 switch (entry_type) {
5349 case 0: /* dmrsPortNumber config same as previous, ueId ueIdReset=0 */
5350 case 1: /* dmrsPortNumber config same as previous, ueId ueIdReset=1 */
5351 /* No further fields for these */
5352 /* Error here if no previous values to inherit!! */
5353 if (!seen_value_to_inherit) {
5354 expert_add_info_format(pinfo, entry_type_ti, &ei_oran_se24_nothing_to_inherit,
5355 "SE24: have seen entry type %u, but no previous config (type 2 or 3) to inherit config from", entry_type);
5356
5357 }
5358 /* TODO: would be useful to repeat whole inherited config here? */
5359 break;
5360
5361 case 2: /* transform precoding disabled */
5362 case 3: /* transform precoding enabled */
5363 {
5364 /* Type 2/3 are very similar.. */
5365
5366 /* ueIdReset (1 bit) */
5367 proto_tree_add_item(entry_tree, hf_oran_ueid_reset, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5368 /* posMeas (1 bit) */
5369 proto_tree_add_item(entry_tree, hf_oran_pos_meas, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5370
5371 /* dmrsSymbolMask (14 bits) */
5372 static int * const dmrs_symbol_mask_flags[] = {
5373 &hf_oran_dmrs_symbol_mask_s13,
5374 &hf_oran_dmrs_symbol_mask_s12,
5375 &hf_oran_dmrs_symbol_mask_s11,
5376 &hf_oran_dmrs_symbol_mask_s10,
5377 &hf_oran_dmrs_symbol_mask_s9,
5378 &hf_oran_dmrs_symbol_mask_s8,
5379 &hf_oran_dmrs_symbol_mask_s7,
5380 &hf_oran_dmrs_symbol_mask_s6,
5381 &hf_oran_dmrs_symbol_mask_s5,
5382 &hf_oran_dmrs_symbol_mask_s4,
5383 &hf_oran_dmrs_symbol_mask_s3,
5384 &hf_oran_dmrs_symbol_mask_s2,
5385 &hf_oran_dmrs_symbol_mask_s1,
5386 &hf_oran_dmrs_symbol_mask_s0,
5387 NULL((void*)0)
5388 };
5389 proto_tree_add_bitmask(entry_tree, tvb, offset,
5390 hf_oran_dmrs_symbol_mask, ett_oran_dmrs_symbol_mask, dmrs_symbol_mask_flags, ENC_BIG_ENDIAN0x00000000);
5391 offset += 2;
5392
5393 /* scrambling */
5394 proto_tree_add_item(entry_tree, hf_oran_scrambling, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5395 offset += 2;
5396
5397 /* nscid (1 bit) */
5398 proto_tree_add_item(entry_tree, hf_oran_nscid, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5399
5400 /* These 5 bits differ depending upon entry type */
5401 if (entry_type == 2) { /* type 2 */
5402 /* dType (1 bit) */
5403 proto_tree_add_item(entry_tree, hf_oran_dtype, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5404 /* cdmWithoutData (2 bits) */
5405 proto_tree_add_item(entry_tree, hf_oran_cmd_without_data, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5406 /* lambda (2 bits) */
5407 proto_tree_add_item(entry_tree, hf_oran_lambda, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5408 }
5409 else { /* type 3 */
5410 /* reserved (1 bit) */
5411 add_reserved_field(entry_tree, hf_oran_reserved_bit1, tvb, offset, 1);
5412 /* lowPaprType (2 bits) */
5413 proto_tree_add_item(entry_tree, hf_oran_low_papr_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5414 /* hoppingMode (2 bits) */
5415 proto_tree_add_item(entry_tree, hf_oran_hopping_mode, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5416 }
5417
5418 /* firstPrb (9 bits) */
5419 proto_tree_add_item(entry_tree, hf_oran_first_prb, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5420 offset += 1;
5421 /* lastPrb (9 bits) */
5422 proto_tree_add_item(entry_tree, hf_oran_last_prb, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5423 offset += 2;
5424 /* Reserved (16 bits) */
5425 add_reserved_field(entry_tree, hf_oran_reserved_16bits, tvb, offset, 2);
5426 offset += 2;
5427
5428 /* Could now see entry types 0 or 1 - they have these values to inherit */
5429 seen_value_to_inherit = true1;
5430 inherited_config_has_transform_precoding = (entry_type == 3);
5431 break;
5432 }
5433
5434 default:
5435 /* reserved - expert info */
5436 break;
5437 }
5438
5439 proto_item_append_text(entry_ti, " [UEId=%u] (dmrsPortNumber=%2u) (type %u - %s) ",
5440 ueids[ueid_index++], dmrs_port_number, entry_type, val_to_str_const(entry_type, entry_type_vals, "Unknown"));
5441 proto_item_set_end(entry_ti, tvb, offset);
5442
5443 if (entry_type <= 1) {
5444 proto_item_append_text(entry_ti, " [transform-precoding %s]",
5445 inherited_config_has_transform_precoding ? "enabled" : "disabled");
5446 }
5447 }
5448
5449 proto_item_append_text(extension_ti, " (%d DMRS configs seen)", dmrs_configs_seen);
5450 break;
5451 }
5452
5453 case 25: /* SE 25: Symbol reordering for DMRS-BF */
5454 /* Just dissect each available block of 7 bytes as the 14 symbols for a layer,
5455 where each layer could be one or apply to all layers. */
5456 {
5457 /* TODO: should only appear in one section of a message - check? */
5458 unsigned layer = 0;
5459 proto_item *layer_ti;
5460 while (offset+7 <= (extension_start_offset + extlen*4)) {
5461 /* Layer subtree */
5462 layer_ti = proto_tree_add_string_format(extension_tree, hf_oran_symbol_reordering_layer,
5463 tvb, offset, 7, "",
5464 "Layer");
5465 proto_tree *layer_tree = proto_item_add_subtree(layer_ti, ett_oran_symbol_reordering_layer);
5466
5467 /* All 14 symbols for a layer (or all layers) */
5468 for (unsigned s=0; s < 14; s++) {
5469 proto_item *sym_ti;
5470 /* txWinForOnAirSymbol */
5471 unsigned int tx_win_for_on_air_symbol;
5472 sym_ti = proto_tree_add_item_ret_uint(layer_tree,
5473 (s % 2) ? hf_oran_tx_win_for_on_air_symbol_r : hf_oran_tx_win_for_on_air_symbol_l,
5474 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &tx_win_for_on_air_symbol);
5475 if (tx_win_for_on_air_symbol == 0x0F) {
5476 /* Ordering not affected */
5477 proto_item_append_text(sym_ti, " (sym %u - no info)", s);
5478 }
5479 else {
5480 proto_item_append_text(sym_ti, " (sym %u)", s);
5481 }
5482 if (s % 2) {
5483 offset += 1;
5484 }
5485 }
5486
5487 proto_item_append_text(layer_ti, " (layer %u)", ++layer);
5488 proto_item_append_text(extension_ti, " (layer %u)", layer);
5489 }
5490 /* Set layer subtree label */
5491 if (layer == 1) {
5492 proto_item_append_text(layer_ti, " (all)");
5493 proto_item_append_text(extension_ti, " (all)");
5494 }
5495 if (layer == 0) {
5496 /* TODO: are no layers valid? What does it mean? */
5497 proto_item_append_text(extension_ti, " (none)");
5498 }
5499 break;
5500 }
5501
5502 case 26: /* SE 26: Frequency offset feedback */
5503 /* Reserved (8 bits) */
5504 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
5505 offset += 1;
5506 /* Reserved (1 bit) */
5507 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
5508 /* numFoFb (7 bits) */
5509 unsigned num_fo_fb;
5510 proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_fo_fb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_fo_fb);
5511 offset += 1;
5512
5513 /* Add each freqOffsetFb value */
5514 for (unsigned n=0; n < num_fo_fb; n++) {
5515 unsigned freq_offset_fb;
5516 /* freqOffsetFb (16 bits) */
5517 proto_item *offset_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_freq_offset_fb,
5518 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &freq_offset_fb);
5519 /* Show if maps onto a -ve number */
5520 if ((freq_offset_fb >= 0x8ad0) && (freq_offset_fb <= 0xffff)) {
5521 proto_item_append_text(offset_ti, "(value %d)", -1 - (0xffff-freq_offset_fb));
5522 }
5523 proto_item_append_text(offset_ti, " [#%u]", n+1);
5524 offset += 2;
5525 }
5526 break;
5527
5528 case 27: /* SE 27: O-DU controlled dimensionality reduction */
5529 {
5530 /* Hidden filter for bf (DMRS BF) */
5531 bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
5532 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
5533
5534 /* beamType (2 bits) */
5535 unsigned beam_type;
5536 proto_tree_add_item_ret_uint(extension_tree, hf_oran_beam_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &beam_type);
5537 /* reserved (6 bits) */
5538 add_reserved_field(extension_tree, hf_oran_reserved_last_6bits, tvb, offset, 1);
5539 offset += 1;
5540
5541 /* numElements */
5542 unsigned num_elements;
5543 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);
5544 if (num_elements == 0) {
5545 num_elements = 256;
5546 proto_item_append_text(num_elements_ti, " (256)");
5547 }
5548
5549 offset += 1;
5550
5551 /* beamId value(s) */
5552 switch (beam_type) {
5553 case 0:
5554 for (unsigned n=0; n < num_elements; n++) {
5555 /* reserved (1 bit) + beamId */
5556 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
5557 proto_tree_add_item(extension_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5558 offset += 2;
5559 }
5560 break;
5561 case 1:
5562 /* reserved (1 bit) + beamId */
5563 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
5564 proto_tree_add_item(extension_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5565 offset += 2;
5566 break;
5567 default:
5568 /* Unknown type... */
5569 break;
5570 }
5571 break;
5572 }
5573
5574 case 28: /* SE 28: O-DU controlled frequency resolution for SINR reporting */
5575 {
5576 /* reserved (3 bits) */
5577 add_reserved_field(extension_tree, hf_oran_reserved_3bits, tvb, offset, 1);
5578 /* numUeSinrRpt (5 bits) */
5579 uint32_t num_ue_sinr_rpt;
5580 proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_ue_sinr_rpt, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_ue_sinr_rpt);
5581 offset += 1;
5582
5583 for (uint32_t n=0; n < num_ue_sinr_rpt; n++) {
5584 /* reserved (1 bit) */
5585 add_reserved_field(extension_tree, (n % 2) ? hf_oran_reserved_bit4 : hf_oran_reserved_1bit,
5586 tvb, offset, 1);
5587
5588 /* numSinrPerPrb (3 bits). Taken from alternate nibbles within byte. */
5589 proto_tree_add_item(extension_tree, (n % 2) ? hf_oran_num_sinr_per_prb_right : hf_oran_num_sinr_per_prb,
5590 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5591 if (n % 2) {
5592 offset += 1;
5593 }
5594 }
5595
5596 /* May need to skip beyond half-used byte */
5597 if (num_ue_sinr_rpt % 2) {
5598 offset += 1;
5599 }
5600 break;
5601 }
5602
5603 case 29: /* SE 29: Cyclic delay adjustment */
5604 /* reserved (4 bits) */
5605 add_reserved_field(extension_tree, hf_oran_reserved_4bits, tvb, offset, 1);
5606 /* cdScgSize (4 bits) */
5607 proto_tree_add_item(extension_tree, hf_oran_cd_scg_size, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5608 offset += 1;
5609
5610 /* cdScgPhaseStep */
5611 proto_tree_add_item(extension_tree, hf_oran_cd_scg_phase_step, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5612 offset += 1;
5613 break;
5614
5615 case 30: /* SE 30: PUSCH repetition indication */
5616 {
5617 /* Only valid for UL */
5618 if (!tap_info->uplink) {
5619 expert_add_info(pinfo, extension_ti, &ei_oran_se30_not_ul);
5620 }
5621
5622 /* ueids[], number_of_ueids may have been rewritten by SE10 */
5623
5624 /* reserved (4 bits) */
5625 add_reserved_field(extension_tree, hf_oran_reserved_4bits, tvb, offset, 1);
5626 /* numRepUe (4 bits) */
5627 uint8_t num_rep_ue;
5628 proto_tree_add_item_ret_uint8(extension_tree, hf_oran_num_rep_ue, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_rep_ue);
5629 offset ++;
5630 /* reserved (8 bits) */
5631 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
5632 offset += 1;
5633
5634 if (num_rep_ue == 1) {
5635 /* SE10 *not* present. N.B. this should tally with number_of_ueids being set to only 1? */
5636 /* reserved (1 bit) */
5637 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
5638 /* isLastRep (1 bit). Value meaningless here? */
5639 proto_tree_add_item(extension_tree, hf_oran_is_last_rep, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5640 /* repIndex (6 bits) */
5641 proto_tree_add_item(extension_tree, hf_oran_rep_index, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5642 offset += 1;
5643
5644 /* reserved (2 bits) */
5645 add_reserved_field(extension_tree, hf_oran_reserved_2bits, tvb, offset, 1);
5646 /* numReps (6 bits) */
5647 uint8_t num_reps;
5648 proto_tree_add_item_ret_uint8(extension_tree, hf_oran_num_reps, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_reps);
5649 /* TODO: should numReps be 0 here? */
5650 offset += 1;
5651
5652 /* reserved (2 bits) */
5653 add_reserved_field(extension_tree, hf_oran_reserved_16bits, tvb, offset, 2);
5654 offset += 2;
5655
5656 }
5657 else {
5658 /* SE10 present */
5659 bool_Bool is_last_rep = false0;
5660 /* TODO: should is_last_rep (also) cause loop exit? */
5661 for (uint8_t ue_idx=0; (ue_idx < num_rep_ue) && !is_last_rep; ue_idx++) {
5662 /* reserved (1 bit) */
5663 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
5664 /* isLastRep (1 bit) */
5665 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_is_last_rep, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &is_last_rep);
5666 /* repIndex (6 bits) */
5667 proto_tree_add_item(extension_tree, hf_oran_rep_index, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5668 offset += 1;
5669
5670 /* reserved (2 bits) */
5671 add_reserved_field(extension_tree, hf_oran_reserved_2bits, tvb, offset, 1);
5672 /* numReps (6 bits) */
5673 uint8_t num_reps;
5674 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);
5675 /* TODO: values 33-63 are reserved */
5676 if (num_reps > 32) {
5677 proto_item_append_text(num_reps_ti, " (reserved)");
5678 }
5679 offset += 1;
5680
5681 for (uint8_t rep=0; rep < num_reps; rep++) {
5682 /* reserved (1 bit) */
5683 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
5684 /* repUeId (15 bits) */
5685 /* TODO: should be fetching and comparing with ueids[] from SE10? */
5686 uint16_t ueid;
5687 proto_item *ueid_ti = proto_tree_add_item_ret_uint16(extension_tree, hf_oran_rep_ueid, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ueid);
5688
5689 /* Check that this ueid is recognised (among ueids[], number_of_ueids) */
5690 bool_Bool matched = false0;
5691 for (unsigned u=0; u < number_of_ueids; u++) {
5692 if (ueid == ueids[u])
5693 matched = true1;
5694 }
5695 if (!matched) {
5696 expert_add_info_format(pinfo, ueid_ti, &ei_oran_se30_unknown_ueid,
5697 "SE 30 mentions UEId %u - not seen in SE10", ueid);
5698 }
5699 offset += 2;
5700 }
5701 }
5702 }
5703 break;
5704 }
5705 case 31: /* SE 31: MCS Information */
5706 {
5707 /* TODO: show ueid (from ST5 or SE10) as generated field? Maybe add a subtree for each entry? */
5708 for (uint32_t u=0; u < number_of_ueids; u++) {
5709 /* reserved (4 bits) */
5710 add_reserved_field(extension_tree, hf_oran_reserved_4bits, tvb, offset, 1);
5711 /* mcsTable (4 bits) */
5712 proto_tree_add_item(extension_tree, hf_oran_mcs_table, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5713 offset += 1;
5714
5715 /* reserved (2 bits) */
5716 add_reserved_field(extension_tree, hf_oran_reserved_2bits, tvb, offset, 1);
5717 /* mcsIndex (6 bits) */
5718 proto_tree_add_item(extension_tree, hf_oran_mcs_index, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5719 offset += 1;
5720 }
5721 break;
5722 }
5723
5724 case 32: /* SE 32: Rank and TPMI measurement request */
5725 {
5726 /* reserved (3 bits) */
5727 add_reserved_field(extension_tree, hf_oran_reserved_3bits, tvb, offset, 1);
5728 /* numMeasReq (5 bits) */
5729 uint8_t num_meas_req;
5730 proto_tree_add_item_ret_uint8(extension_tree, hf_oran_num_meas_req, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_meas_req);
5731 offset += 1;
5732
5733 /* reserved (8 bits) */
5734 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
5735 offset += 1;
5736
5737 /* Show each measurement request */
5738 for (unsigned r=0; r < num_meas_req; r++) {
5739 /* Reserved (1 bit) */
5740 add_reserved_field(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1);
5741 /* ueId (14 bits) */
5742 proto_tree_add_item(extension_tree, hf_oran_ueId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5743 offset += 2;
5744
5745 /* numOfUeAntPorts (4 bits) */
5746 proto_tree_add_item(extension_tree, hf_oran_num_of_ue_ant_ports, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5747 /* ueRank (4 bits) */
5748 proto_tree_add_item(extension_tree, hf_oran_ue_rank, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5749 offset += 1;
5750
5751 /* codebookSubset (2 bits) */
5752 proto_tree_add_item(extension_tree, hf_oran_codebook_subset, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5753 /* TODO: tpmiIndex (6 bits) */
5754 offset += 1;
5755
5756 /* fullPwrMode (2 bits) */
5757 proto_tree_add_item(extension_tree, hf_oran_full_pwr_mode, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5758 /* fullPwrMode2TmpiGroup (14 bits) */
5759 /* TODO: add as a bitset */
5760 proto_tree_add_item(extension_tree, hf_oran_full_pwr_mode_2_tpmi_group, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5761 offset += 2;
5762
5763 /* reserved (2 bytes) */
5764 add_reserved_field(extension_tree, hf_oran_reserved_16bits, tvb, offset, 2);
5765 offset += 2;
5766 }
5767 break;
5768 }
5769
5770 case 33: /* Dynamic channel type selection for SRS-BF-DL */
5771 /* Reserved (6 bits) */
5772 add_reserved_field(extension_tree, hf_oran_reserved_6bits, tvb, offset, 1);
5773 /* chanTypeSel (2 bits) */
5774 proto_tree_add_item(extension_tree, hf_oran_chan_type_sel, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5775 offset += 1;
5776 /* Reserved (8 bits) */
5777 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
5778 offset += 1;
5779 break;
5780
5781 case 34: /* RS-BF-UL Control */
5782 {
5783 /* portListEn (1 bit) */
5784 bool_Bool port_list_en;
5785 proto_tree_add_item_ret_boolean(extension_tree, hf_oran_port_list_en, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &port_list_en);
5786 /* reserved (4 bits) */
5787 add_reserved_field(extension_tree, hf_oran_reserved_bits1234, tvb, offset, 1);
5788 /* tpmiMode (3 bits) */
5789 uint8_t tpmi_mode;
5790 proto_tree_add_item_ret_uint8(extension_tree, hf_oran_tpmi_mode, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &tpmi_mode);
5791 offset += 1;
5792
5793 /* reserved (2 bits) */
5794 add_reserved_field(extension_tree, hf_oran_reserved_2bits, tvb, offset, 1);
5795 /* numUeid (6 bits) */
5796 uint8_t num_ueid;
5797 proto_tree_add_item_ret_uint8(extension_tree, hf_oran_num_ueid_se34, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_ueid);
5798 offset += 1;
5799
5800 for (unsigned layer=0; layer < num_ueid; layer++) {
5801 /* TPMI data for layer */
5802 switch (tpmi_mode) {
5803 case 0:
5804 /* srsPortMask (8 bits) */
5805 proto_tree_add_item(extension_tree, hf_oran_chan_srs_port_mask, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5806 offset += 1;
5807 break;
5808 case 1:
5809 /* srsPortMask (8 bits) */
5810 proto_tree_add_item(extension_tree, hf_oran_chan_srs_port_mask, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5811 offset += 1;
5812 /* tpmiPhaseP7 (2 bits) */
5813 proto_tree_add_item(extension_tree, hf_oran_tpmi_phase_7, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5814 /* tpmiPhaseP6 (2 bits) */
5815 proto_tree_add_item(extension_tree, hf_oran_tpmi_phase_6, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5816 /* tpmiPhaseP5 (2 bits) */
5817 proto_tree_add_item(extension_tree, hf_oran_tpmi_phase_5, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5818 /* tpmiPhaseP4 (2 bits) */
5819 proto_tree_add_item(extension_tree, hf_oran_tpmi_phase_4, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5820 offset += 1;
5821 /* tpmiPhaseP3 (2 bits) */
5822 proto_tree_add_item(extension_tree, hf_oran_tpmi_phase_3, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5823 /* tpmiPhaseP2 (2 bits) */
5824 proto_tree_add_item(extension_tree, hf_oran_tpmi_phase_2, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5825 /* tpmiPhaseP1 (2 bits) */
5826 proto_tree_add_item(extension_tree, hf_oran_tpmi_phase_1, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5827 /* tpmiPhaseP0 (2 bits) */
5828 proto_tree_add_item(extension_tree, hf_oran_tpmi_phase_0, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5829 offset += 1;
5830 }
5831
5832 /* ueId for layer */
5833 proto_tree_add_item(extension_tree, hf_oran_ueid_se34, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5834 offset += 2;
5835 }
5836
5837 if (port_list_en) {
5838 /* numPortListIndex (1 byte) */
5839 uint8_t num_port_list_index;
5840 proto_tree_add_item_ret_uint8(extension_tree, hf_oran_num_port_list_index, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_port_list_index);
5841 offset += 1;
5842
5843 /* portListIndex (1 byte) */
5844 for (unsigned port=0; port < num_port_list_index; port++) {
5845 proto_item *ti = proto_tree_add_item(extension_tree, hf_oran_port_list_index, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5846 proto_item_append_text(ti, " (idx %u)", port+1);
5847 offset += 1;
5848 }
5849 }
5850
5851 break;
5852 }
5853
5854 case 35: /* TODO: Codebook-based beamforming parameters */
5855 /* cqiMode (2 bits) */
5856 /* subbandSize (6 bits) */
5857 offset += 1;
5858 /* codebookId (4 bits) */
5859 /* spatialConfigId (4 bits) */
5860 offset += 1;
5861 /* ueIdReset (1 bit) */
5862 proto_tree_add_item(extension_tree, hf_oran_ueid_reset, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5863 /* reserved (3 bits) */
5864 add_reserved_field(extension_tree, hf_oran_reserved_bits123, tvb, offset, 1);
5865 /* p2aMappingType (4 bits) */
5866 offset += 1;
5867 /* reserved (8 bits) */
5868 add_reserved_field(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1);
5869 offset += 1;
5870
5871 /* TODO: p2aMapping.. */
5872 break;
5873
5874
5875
5876 default:
5877 {
5878 /* Not handled above. Offer the SE to an external dissector. */
5879 /* If one handles it, use the number of bytes it dissected; */
5880 /* otherwise fall back to flagging it as unsupported. */
5881 int dissected = 0;
5882 unsigned se_end = extension_start_offset + (extlen*4);
5883 oran_se_info se_info;
5884 se_info.exttype = exttype;
5885 se_info.extlen = extlen;
5886 se_info.startPrbc = startPrbc;
5887 se_info.numPrbc = numPrbc;
5888 se_info.extension_ti = extension_ti;
5889 se_info.exttype_ti = exttype_ti;
5890
5891 /* Subset tvb covering just the SE payload */
5892 tvbuff_t *se_tvb = tvb_new_subset_length(tvb, offset, se_end-offset);
5893 dissected = dissector_try_uint_with_data(oran_sectionextension_table, exttype,
5894 se_tvb, pinfo, extension_tree, true1, &se_info);
5895
5896 if (dissected > 0) {
5897 offset += dissected;
5898 break;
5899 }
5900
5901 /* Other/unexpected extension types */
5902 expert_add_info_format(pinfo, exttype_ti, &ei_oran_unhandled_se,
5903 "SE %u (%s) not supported by dissector",
5904 exttype, val_to_str_ext_const(exttype, &exttype_vals_ext, "Reserved"));
5905 ext_unhandled = true1;
5906 break;
5907 }
5908 }
5909
5910 /* Check offset compared with extlen. There should be 0-3 bytes of padding */
5911 int num_padding_bytes = (extension_start_offset + (extlen*4) - offset);
5912 if (!ext_unhandled && ((num_padding_bytes<0) || (num_padding_bytes>3))) {
5913 expert_add_info_format(pinfo, extlen_ti, &ei_oran_extlen_wrong,
5914 "extlen signalled %u bytes (+ 0-3 bytes padding), but %u were dissected",
5915 extlen*4, offset-extension_start_offset);
5916 }
5917
5918 /* Move offset to beyond signalled length of extension */
5919 offset = extension_start_offset + (extlen*4);
5920
5921 /* Set length of extension header. */
5922 proto_item_set_len(extension_ti, extlen*4);
5923 }
5924 /* End of section extension handling */
5925
5926 /* Tap section beamId if not overwritten by SEs */
5927 if (!section_beamId_ignored && section_beamId != 0) {
5928 add_beam_id_to_tap(tap_info, section_beamId);
5929 }
5930
5931
5932 /* RRM measurement reports have measurement reports *after* extensions */
5933 if ((sectionType == SEC_C_RRM_MEAS_REPORTS) || /* Section Type 10 */
5934 (sectionType == SEC_C_RRM_MEAS_REPORTS_NON_TIMING)) /* Section Type 13 */
5935 {
5936 /* Hidden filter for bf (DMFS-BF). No BF weights though.. */
5937 bf_ti = proto_tree_add_item(c_section_tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
5938 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
5939
5940 bool_Bool mf;
5941 do {
5942 /* Measurement report subtree */
5943 proto_item *mr_ti = proto_tree_add_string_format(c_section_tree, hf_oran_measurement_report,
5944 tvb, offset, 1, "", "Measurement Report");
5945 proto_tree *mr_tree = proto_item_add_subtree(mr_ti, ett_oran_measurement_report);
5946 unsigned report_start_offset = offset;
5947
5948 /* measurement flag (i.e., more reports after this one) (1 bit) */
5949 proto_tree_add_item_ret_boolean(mr_tree, hf_oran_mf, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &mf);
5950
5951 /* measTypeId (7 bits) */
5952 uint32_t meas_type_id;
5953 proto_item *meas_type_id_ti;
5954 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);
5955 offset += 1;
5956
5957 /* Common to all measurement types */
5958 unsigned num_elements = 0;
5959 if (meas_type_id == 6) {
5960 /* numElements */
5961 proto_tree_add_item_ret_uint(mr_tree, hf_oran_num_elements, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_elements);
5962 }
5963 else {
5964 /* All other meas ids have a reserved byte */
5965 add_reserved_field(mr_tree, hf_oran_reserved_8bits, tvb, offset, 1);
5966 }
5967 offset += 1;
5968
5969 /* measDataSize (16 bits). N.B. begins at mf field, i.e. 2 bytes before this one */
5970 unsigned meas_data_size;
5971 proto_item *meas_data_size_ti;
5972 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);
5973 meas_data_size *= 4;
5974 proto_item_append_text(meas_data_size_ti, " (%u bytes)", meas_data_size);
5975 offset += 2;
5976
5977 /* Summary for measurement report root */
5978 proto_item_append_text(mr_ti, " (measTypeId=%u - %s)",
5979 meas_type_id, val_to_str_const(meas_type_id, meas_type_id_vals, "unknown"));
5980 /* And section header */
5981 proto_item_append_text(tree, " (%s)", val_to_str_const(meas_type_id, meas_type_id_vals, "unknown"));
5982 /* And Info column */
5983 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", val_to_str_const(meas_type_id, meas_type_id_vals, "unknown"));
5984
5985 /* Handle specific message type fields */
5986 switch (meas_type_id) {
5987 case 1:
5988 {
5989 /* ueTae */
5990 unsigned ue_tae;
5991 proto_item *ue_tae_ti;
5992 ue_tae_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_ue_tae, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ue_tae);
5993 /* Show if maps onto a -ve number */
5994 if ((ue_tae >= 0x8ad0) && (ue_tae <= 0xffff)) {
5995 proto_item_append_text(ue_tae_ti, "(value %d)", -1 - (0xffff-ue_tae));
5996 }
5997 offset += 2;
5998
5999 /* Reserved (16 bits) */
6000 add_reserved_field(mr_tree, hf_oran_reserved_16bits, tvb, offset, 2);
6001 offset += 2;
6002 break;
6003 }
6004 case 2:
6005 /* ueLayerPower entries, one for each UEId */
6006 /* i.e., should loop over 0-number_of_ues? */
6007 for (unsigned ueid_index=0; ueid_index < number_of_ueids; ueid_index++) {
6008 unsigned ue_layer_power;
6009 proto_item *ue_layer_power_ti;
6010 /* ueLayerPower */
6011 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);
6012 /* Show if maps onto a -ve number */
6013 if ((ue_layer_power >= 0x8ad0) && (ue_layer_power <= 0xffff)) {
6014 proto_item_append_text(ue_layer_power_ti, "(value %d) (ueId=%u)", -1 - (0xffff-ue_layer_power), ueids[ueid_index]);
6015 }
6016 offset += 2;
6017 }
6018 /* padding out to 4 bytes */
6019 break;
6020 case 3:
6021 {
6022 /* ueFreqOffset */
6023 unsigned ue_freq_offset;
6024 proto_item *ue_freq_offset_ti;
6025 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);
6026 /* Show if maps onto a -ve number */
6027 if ((ue_freq_offset >= 0x8ad0) && (ue_freq_offset <= 0xffff)) {
6028 proto_item_append_text(ue_freq_offset_ti, "(value %d)", -1 - (0xffff-ue_freq_offset));
6029 }
6030 offset += 2;
6031
6032 /* currUeFreqOffset (16 bits) */
6033 unsigned curr_ue_freq_offset;
6034 proto_item *curr_ue_freq_offset_ti;
6035 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);
6036 /* Show if maps onto a -ve number */
6037 if ((curr_ue_freq_offset >= 0x8ad0) && (curr_ue_freq_offset <= 0xffff)) {
6038 proto_item_append_text(curr_ue_freq_offset_ti, "(value %d)", -1 - (0xffff-curr_ue_freq_offset));
6039 }
6040 offset += 2;
6041 break;
6042 }
6043 case 4:
6044 case 5:
6045 /* reserved (2 bits) */
6046 add_reserved_field(mr_tree, hf_oran_reserved_2bits, tvb, offset, 1);
6047 /* symbolMask (14 bits) */
6048 offset = dissect_symbolmask(tvb, mr_tree, offset, NULL((void*)0), NULL((void*)0));
6049
6050 /* 2 bytes for each PRB ipnPower */
6051 for (unsigned prb=0; prb<MAX_PRBS273; prb++) {
6052 /* Skip if should not be reported */
6053 if (!prbs_for_st10_type5[prb]) {
6054 continue;
6055 }
6056 unsigned ipn_power;
6057 proto_item *ipn_power_ti;
6058 /* ipnPower (2 bytes) */
6059 ipn_power_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_ipn_power, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ipn_power);
6060 proto_item_append_text(ipn_power_ti, " (PRB %3d)", prb);
6061 /* Show if maps onto a -ve number */
6062 if ((ipn_power >= 0x8ad0) && (ipn_power <= 0xffff)) {
6063 proto_item_append_text(ipn_power_ti, " (value %d)", -1 - (0xffff-ipn_power));
6064 }
6065 offset += 2;
6066 }
6067 /* padding out to 4 bytes */
6068 break;
6069 case 6:
6070 /* antDmrsSnrVal entries */
6071 for (unsigned n=0; n < num_elements; n++) {
6072 unsigned snr_value;
6073 proto_item *snr_value_ti;
6074 /* antDmrsSnrVal (2 bytes) */
6075 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);
6076 proto_item_append_text(snr_value_ti, " (elem %2u)", n+1);
6077 /* Show if maps onto a -ve number */
6078 if ((snr_value >= 0x8ad0) && (snr_value <= 0xffff)) {
6079 proto_item_append_text(snr_value_ti, " (value %d)", -1 - (0xffff-snr_value));
6080 }
6081 offset += 2;
6082 }
6083 break;
6084 case 7:
6085 {
6086 /* UE positioning measurement report */
6087 float start_value;
6088
6089 /* ueAzAoa (16 bits) */
6090 uint32_t ue_az_aoa;
6091 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);
6092 if (ue_az_aoa <= 0xE0F) {
6093 if (ue_az_aoa >= 0x0708) {
6094 start_value = (ue_az_aoa-0x0708) * (float)0.1;
6095 proto_item_append_text(ue_az_aoa_ti, " (%.1f <= val < %.1f degrees)", start_value, start_value + (float)0.1);
6096 }
6097 else {
6098 start_value = 180 + (ue_az_aoa * (float)0.1);
6099 proto_item_append_text(ue_az_aoa_ti, " (%.1f <= val < %.1f degrees)", start_value, start_value + (float)0.1);
6100 }
6101 }
6102 else if (ue_az_aoa == 0xffff) {
6103 proto_item_append_text(ue_az_aoa_ti, " (invalid measurement result)");
6104 }
6105 else {
6106 proto_item_append_text(ue_az_aoa_ti, " (reserved)");
6107 }
6108 offset += 2;
6109
6110 /* Reserved (16 bits) */
6111 add_reserved_field(mr_tree, hf_oran_reserved_16bits, tvb, offset, 2);
6112 offset += 2;
6113
6114 /* ueZeAoa (16 bits) */
6115 uint32_t ue_ze_aoa;
6116 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);
6117 if (ue_ze_aoa <= 0x707) {
6118 start_value = ue_ze_aoa * (float)0.1;
6119 proto_item_append_text(ue_ze_aoa_ti, " (%.1f <= val < %.1f degrees)", start_value, start_value + (float)0.1);
6120 }
6121 else if (ue_ze_aoa == 0xffff) {
6122 proto_item_append_text(ue_ze_aoa_ti, " (invalid measurement result)");
6123 }
6124 else {
6125 proto_item_append_text(ue_ze_aoa_ti, " (reserved)");
6126 }
6127 offset += 2;
6128
6129 /* Reserved (16 bits) */
6130 add_reserved_field(mr_tree, hf_oran_reserved_16bits, tvb, offset, 2);
6131 offset += 2;
6132
6133 /* uePosToaOffset (16 bits) */
6134 uint32_t ue_pos_toa_offset;
6135 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);
6136 if (ue_pos_toa_offset == 0) {
6137 proto_item_append_text(ue_pos_toa_offset_ti, " (no UE ToA offset, 0 symbols)");
6138 }
6139 else if (ue_pos_toa_offset <= 0x7fff) {
6140 proto_item_append_text(ue_pos_toa_offset_ti, " (+ve UE ToA offset)");
6141 }
6142 else if (ue_pos_toa_offset == 0x8000) {
6143 proto_item_append_text(ue_pos_toa_offset_ti, " (invalid measurement result)");
6144 }
6145 else {
6146 proto_item_append_text(ue_pos_toa_offset_ti, " (-ve UE ToA offset)");
6147 }
6148 offset += 2;
6149
6150 /* Reserved (16 bits) */
6151 add_reserved_field(mr_tree, hf_oran_reserved_16bits, tvb, offset, 2);
6152 offset += 2;
6153 break;
6154 }
6155 case 8:
6156 {
6157 /* UE radial speed measurement report */
6158
6159 /* ueRadialSpeed (16 bits) */
6160 uint32_t radial_speed;
6161 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);
6162 if (radial_speed <= 10000) {
6163 proto_item_append_text(radial_speed_ti, " (%.1f km/h)", radial_speed * (float)0.1);
6164 }
6165 else if (radial_speed == 0x8000) {
6166 proto_item_append_text(radial_speed_ti, " (invalid measurement result)");
6167 }
6168 else {
6169 proto_item_append_text(radial_speed_ti, " (reserved value)");
6170 }
6171 offset += 2;
6172
6173 /* Reserved (16 bits) */
6174 add_reserved_field(mr_tree, hf_oran_reserved_16bits, tvb, offset, 2);
6175 offset += 2;
6176 break;
6177 }
6178 case 9:
6179 {
6180 /* TODO: UE post-equalization MU interference measurement */
6181
6182 /* reserved (16 bits) */
6183 add_reserved_field(mr_tree, hf_oran_reserved_16bits, tvb, offset, 2);
6184 offset += 2;
6185
6186 /* TODO: muInterferenceLevel (all layers * all PRB blocks) */
6187 break;
6188 }
6189 case 10:
6190 {
6191 /* UE TPMI and rank recommendation measurement */
6192
6193 /* numCandRanks (4 bits - only 1-4 valid) */
6194 uint8_t num_cand_ranks;
6195 proto_tree_add_item_ret_uint8(mr_tree, hf_oran_num_cand_ranks, tvb, offset, 1, ENC_NA0x00000000, &num_cand_ranks);
6196 if (num_cand_ranks > 4) {
6197 num_cand_ranks = 4;
6198 }
6199 if (num_cand_ranks < 1) {
6200 num_cand_ranks = 1;
6201 }
6202
6203 /* uePrefRank (4 bits) */
6204 proto_tree_add_item(mr_tree, hf_oran_ue_pref_rank, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
6205 offset += 1;
6206
6207 for (uint8_t cand_rank=1; cand_rank <= num_cand_ranks; cand_rank++) {
6208 /* ueTpmiRankY (1 byte) */
6209 proto_item *rank_y_ti = proto_tree_add_item(mr_tree, hf_oran_ue_tpmi_rank_y,
6210 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
6211 proto_item_append_text(rank_y_ti, " (rank %u)", cand_rank);
6212
6213 offset += 1;
6214
6215 for (uint8_t sinr = 1; sinr <= cand_rank; sinr++) {
6216 /* ueTpmiRankYSinrLX (2 bytes) */
6217 proto_item *rank_y_sinr_x_ti = proto_tree_add_item(mr_tree, hf_oran_ue_tpmi_rank_y_sinr_lx,
6218 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
6219 proto_item_append_text(rank_y_sinr_x_ti, " (rank %u, sinr %u)", cand_rank, sinr);
6220 offset += 2;
6221 }
6222 }
6223 break;
6224 }
6225 case 11:
6226 {
6227 /* UE layer pre-equalization SINR report */
6228 /* TODO: how to know how many layers? Just fill up available data? */
6229 unsigned num_layers = (meas_data_size > 4) ? (meas_data_size - 4) / 2 : 0;
6230 for (unsigned layer=0; layer < num_layers; layer++) {
6231 /* ueLayerPreEqSinr (2 bytes each) */
6232 proto_item *pre_eq_sinr_ti = proto_tree_add_item(mr_tree, hf_oran_ue_layer_pre_eq_sinr,
6233 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
6234 proto_item_append_text(pre_eq_sinr_ti, " (layer %u)", layer);
6235 offset += 2;
6236 }
6237 break;
6238 }
6239 case 12:
6240 {
6241 /* SRS UE port wideband signal power measurement report */
6242 /* srsMeasPortMask (2 bytes) */
6243 uint16_t srs_meas_port_mask;
6244 proto_tree_add_item_ret_uint16(mr_tree, hf_oran_srs_meas_port_mask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &srs_meas_port_mask);
6245 offset += 2;
6246
6247 for (unsigned p=0; p < 16; p++) {
6248 if ((1<<p) & srs_meas_port_mask) {
6249 /* srsUePortWbPower (one for each port mask bit set) */
6250 proto_item *wb_power_ti = proto_tree_add_item(mr_tree, hf_oran_srs_ue_port_wb_power, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
6251 proto_item_append_text(wb_power_ti, " (antenna port %u)", p);
6252 offset += 2;
6253 }
6254 }
6255 break;
6256 }
6257 case 13:
6258 {
6259 /* SRS UE port wideband SINR measurement report */
6260 /* srsMeasPortMask (2 bytes) */
6261 uint16_t srs_meas_port_mask;
6262 proto_tree_add_item_ret_uint16(mr_tree, hf_oran_srs_meas_port_mask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &srs_meas_port_mask);
6263 offset += 2;
6264
6265 for (unsigned p=0; p < 16; p++) {
6266 if ((1<<p) & srs_meas_port_mask) {
6267 /* srsUePortWbSinr (one for each port mask bit set) */
6268 proto_item *sinr_ti = proto_tree_add_item(mr_tree, hf_oran_srs_ue_port_wb_sinr, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
6269 proto_item_append_text(sinr_ti, " (antenna port %u)", p);
6270 offset += 2;
6271 }
6272 }
6273 break;
6274 }
6275 /* TODO: new measurement types */
6276 case 14:
6277 case 15:
6278 case 16:
6279 case 17:
6280 case 18:
6281 case 19:
6282 case 20:
6283 case 21:
6284 case 22:
6285 case 23:
6286 case 24:
6287
6288 default:
6289 /* Anything else is not expected */
6290 expert_add_info_format(pinfo, meas_type_id_ti, &ei_oran_unexpected_measTypeId,
6291 "measTypeId %u (%s) not supported - only 1-24 are expected",
6292 meas_type_id,
6293 val_to_str_const(meas_type_id, meas_type_id_vals, "reserved"));
6294 break;
6295
6296 }
6297
6298 /* Pad out to next 4 bytes */
6299 offset += WS_PADDING_TO_4(offset-report_start_offset)((4U - ((offset-report_start_offset) % 4U)) % 4U);
6300
6301 /* TODO: verify dissected size of report vs meas_data_size? */
6302
6303 /* End of measurement report tree */
6304 proto_item_set_end(mr_ti, tvb, offset);
6305 } while (mf);
6306 }
6307
6308 /* Request for RRM Measurements has measurement commands after extensions */
6309 else if (sectionType == SEC_C_REQUEST_RRM_MEAS) /* Section Type 11 */
6310 {
6311 bool_Bool mf = true1;
6312 do {
6313 /* Measurement command subtree */
6314 proto_item *mc_ti = proto_tree_add_string_format(c_section_tree, hf_oran_measurement_command,
6315 tvb, offset, 8, "", "Measurement Command");
6316 proto_tree *mc_tree = proto_item_add_subtree(mc_ti, ett_oran_measurement_command);
6317
6318 /* mf (1 bit). 1st measurement command is always preset */
6319 proto_tree_add_item_ret_boolean(mc_tree, hf_oran_mf, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &mf);
6320
6321 /* measTypeId (7 bits) */
6322 uint32_t meas_type_id;
6323 proto_item *meas_type_id_ti;
6324 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);
6325 offset += 1;
6326
6327 proto_item *meas_command_ti;
6328 uint32_t meas_command_size;
6329
6330 switch (meas_type_id) {
6331 case 5: /* command for IpN for unallocated PRBs */
6332 /* reserved (1 byte) */
6333 add_reserved_field(mc_tree, hf_oran_reserved_8bits, tvb, offset, 1);
6334 offset += 1;
6335 /* measCmdSize. Presumably number of words so in future could skip unrecognised command types.. */
6336 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);
6337 proto_item_append_text(meas_command_ti, " (%u bytes)", meas_command_size*4);
6338 offset += 2;
6339 /* reserved (2 bits) */
6340 add_reserved_field(mc_tree, hf_oran_reserved_2bits, tvb, offset, 1);
6341 /* symbolMask (14 bits) */
6342 offset = dissect_symbolmask(tvb, mc_tree, offset, NULL((void*)0), NULL((void*)0));
6343 /* reserved (16 bits) */
6344 add_reserved_field(mc_tree, hf_oran_reserved_16bits, tvb, offset, 2);
6345 offset += 2;
6346 break;
6347
6348 default:
6349 /* Anything else is not expected */
6350 expert_add_info_format(pinfo, meas_type_id_ti, &ei_oran_unexpected_measTypeId,
6351 "measTypeId %u (%s) not supported - only 5 is expected",
6352 meas_type_id,
6353 val_to_str_const(meas_type_id, meas_type_id_vals, "reserved"));
6354 break;
6355 }
6356 proto_item_append_text(mc_ti, " (%s)", val_to_str_const(meas_type_id, meas_type_id_vals, "unknown"));
6357
6358 } while (mf);
6359 }
6360
6361 /* Set extent of overall section */
6362 proto_item_set_len(sectionHeading, offset);
6363
6364 return offset;
6365}
6366
6367/* Dissect udCompHdr (user data compression header, 7.5.2.10) */
6368/* bit_width and comp_meth are out params */
6369static int dissect_udcomphdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset,
6370 bool_Bool cplane, bool_Bool ignore,
6371 unsigned *bit_width, unsigned *comp_meth, proto_item **comp_meth_ti,
6372 oran_tap_info *tap_info)
6373{
6374 /* Subtree */
6375 proto_item *udcomphdr_ti = proto_tree_add_string_format(tree, hf_oran_udCompHdr,
6376 tvb, offset, 1, "",
6377 "udCompHdr");
6378 proto_tree *udcomphdr_tree = proto_item_add_subtree(udcomphdr_ti, ett_oran_udcomphdr);
6379
6380 uint8_t byte = tvb_get_uint8(tvb, offset);
6381 uint32_t hdr_iq_width = 0, ud_comp_meth = 0;
6382
6383 /* Don't dissect fields if ignored and correctly set to 0 */
6384 if (!(ignore && byte == 0)) {
6385 /* udIqWidth */
6386
6387 proto_item *iq_width_item = proto_tree_add_item_ret_uint(udcomphdr_tree, hf_oran_udCompHdrIqWidth , tvb, offset, 1, ENC_NA0x00000000, &hdr_iq_width);
6388 proto_item_append_text(iq_width_item, " (%u bits)", (hdr_iq_width) ? hdr_iq_width : 16);
6389
6390 /* udCompMeth */
6391 *comp_meth_ti = proto_tree_add_item_ret_uint(udcomphdr_tree, hf_oran_udCompHdrMeth, tvb, offset, 1, ENC_NA0x00000000, &ud_comp_meth);
6392
6393 /* An ignored header does not change the settings */
6394 if (!ignore) {
6395 *bit_width = (hdr_iq_width) ? hdr_iq_width : 16;
6396 if (comp_meth) {
6397 *comp_meth = ud_comp_meth;
6398 }
6399 }
6400 }
6401
6402 /* Populate tap header with compression settings */
6403 if (!ignore) {
6404 tap_info->compression_methods |= (1 << ud_comp_meth);
6405 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))
;
6406 /* Summary */
6407 proto_item_append_text(udcomphdr_ti, " (IqWidth=%u, udCompMeth=%s)",
6408 *bit_width, rval_to_str_const(ud_comp_meth, ud_comp_header_meth, "Unknown"));
6409 }
6410 else {
6411 proto_item_append_text(udcomphdr_ti, " (ignored)");
6412 if (hdr_iq_width || ud_comp_meth) {
6413 if (cplane) {
6414 /* Only ignoring in DL for cplane */
6415 expert_add_info_format(pinfo, udcomphdr_ti, &ei_oran_udcomphdr_should_be_zero,
6416 "udCompHdr in C-Plane for DL should be 0 - found 0x%02x",
6417 tvb_get_uint8(tvb, offset));
6418 }
6419 else {
6420 /* TODO: Ignore UL if using m-plane/preference setting rather than c-plane, but wrong to be set? */
6421 /* expert_add_info_format(pinfo, udcomphdr_ti, &ei_oran_udcomphdr_should_be_zero,
6422 "udCompHdr in C-Plane for UL should be 0 - found 0x%02x",
6423 tvb_get_uint8(tvb, offset));
6424 */
6425 }
6426 }
6427 }
6428 return offset+1;
6429}
6430
6431/* Dissect udCompParam (user data compression parameter, 8.3.3.15) */
6432/* bit_width and comp_meth are out params */
6433static int dissect_udcompparam(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree, unsigned offset,
6434 unsigned comp_meth,
6435 uint32_t *exponent, uint16_t *sReSMask,
6436 bool_Bool for_sinr)
6437{
6438 if (for_sinr && (comp_meth != COMP_BLOCK_FP1)) {
6439 /* sinrCompParam only present when bfp is used */
6440 return offset;
6441 }
6442
6443 if (comp_meth == COMP_NONE0 ||
6444 comp_meth == COMP_MODULATION4 ||
6445 comp_meth == MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8) {
6446
6447 /* Not even creating a subtree for udCompMeth 0, 4, 8 */
6448 return offset;
6449 }
6450
6451 /* Subtree */
6452 unsigned start_offset = offset;
6453 proto_item *udcompparam_ti = proto_tree_add_string_format(tree, hf_oran_udCompParam,
6454 tvb, offset, 1, "",
6455 (for_sinr) ? "sinrCompParam" : "udCompParam");
6456 proto_tree *udcompparam_tree = proto_item_add_subtree(udcompparam_ti, ett_oran_udcompparam);
6457
6458 /* Show comp_meth as a generated field */
6459 proto_item *meth_ti = proto_tree_add_uint(udcompparam_tree, hf_oran_udCompHdrMeth_pref, tvb, 0, 0, comp_meth);
6460 proto_item_set_generated(meth_ti);
6461
6462 uint32_t param_exponent;
6463 uint64_t param_sresmask;
6464
6465 static int * const sres_mask_flags[] = {
6466 &hf_oran_sReSMask_re12,
6467 &hf_oran_sReSMask_re11,
6468 &hf_oran_sReSMask_re10,
6469 &hf_oran_sReSMask_re9,
6470 &hf_oran_sReSMask_re8,
6471 &hf_oran_sReSMask_re7,
6472 &hf_oran_sReSMask_re6,
6473 &hf_oran_sReSMask_re5,
6474 &hf_oran_sReSMask_re4,
6475 &hf_oran_sReSMask_re3,
6476 &hf_oran_sReSMask_re2,
6477 &hf_oran_sReSMask_re1,
6478 NULL((void*)0)
6479 };
6480
6481 switch (comp_meth) {
6482 case COMP_BLOCK_FP1: /* 1 */
6483 case BFP_AND_SELECTIVE_RE_WITH_MASKS7: /* 7 */
6484 /* reserved (4 bits) */
6485 add_reserved_field(udcompparam_tree, hf_oran_reserved_4bits, tvb, offset, 1);
6486 /* exponent (4 bits) */
6487 proto_tree_add_item_ret_uint(udcompparam_tree, hf_oran_exponent,
6488 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &param_exponent);
6489 *exponent = param_exponent;
6490 proto_item_append_text(udcompparam_ti, " (Exponent=%u)", param_exponent);
6491 offset += 1;
6492 break;
6493
6494 case COMP_BLOCK_SCALE2: /* 2 */
6495 /* Separate into integer and fractional bits? */
6496 proto_tree_add_item(udcompparam_tree, hf_oran_blockScaler,
6497 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
6498 offset++;
6499 break;
6500
6501 case COMP_U_LAW3: /* 3 */
6502 /* compBitWidth, compShift */
6503 proto_tree_add_item(udcompparam_tree, hf_oran_compBitWidth,
6504 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
6505 proto_tree_add_item(udcompparam_tree, hf_oran_compShift,
6506 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
6507 offset += 1;
6508 break;
6509
6510 case BFP_AND_SELECTIVE_RE5: /* 5 */
6511 {
6512 /* sReSMask (exponent in middle!) */
6513 proto_item *sresmask_ti;
6514 sresmask_ti = proto_tree_add_bitmask_ret_uint64(udcompparam_tree, tvb, offset,
6515 hf_oran_sReSMask,
6516 ett_oran_sresmask,
6517 sres_mask_flags,
6518 ENC_NA0x00000000,
6519 &param_sresmask);
6520
6521 /* Get rid of exponent-shaped gap */
6522 param_sresmask = ((param_sresmask >> 4) & 0x0f00) | (param_sresmask & 0xff);
6523 unsigned res = 0;
6524 for (unsigned n=0; n < 12; n++) {
6525 if ((param_sresmask >> n) & 0x1) {
6526 res++;
6527 }
6528 }
6529 proto_item_append_text(sresmask_ti, " (%2u REs)", res);
6530
6531 /* exponent */
6532 proto_tree_add_item_ret_uint(udcompparam_tree, hf_oran_exponent,
6533 tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &param_exponent);
6534 *sReSMask = (uint16_t)param_sresmask;
6535 *exponent = param_exponent;
6536
6537 proto_item_append_text(udcompparam_ti, " (exponent=%u, %u REs)", *exponent, res);
6538 offset += 2;
6539 break;
6540 }
6541
6542 case MOD_COMPR_AND_SELECTIVE_RE6: /* 6 */
6543 {
6544 /* sReSMask (exponent in middle!) */
6545 proto_item *sresmask_ti;
6546
6547 sresmask_ti = proto_tree_add_bitmask_ret_uint64(udcompparam_tree, tvb, offset,
6548 hf_oran_sReSMask,
6549 ett_oran_sresmask,
6550 sres_mask_flags,
6551 ENC_NA0x00000000,
6552 &param_sresmask);
6553
6554 /* Get rid of reserved-shaped gap */
6555 param_sresmask = ((param_sresmask >> 4) & 0x0f00) | (param_sresmask & 0xff);
6556 unsigned res = 0;
6557 for (unsigned n=0; n < 12; n++) {
6558 if ((param_sresmask >> n) & 0x1) {
6559 res++;
6560 }
6561 }
6562 proto_item_append_text(sresmask_ti, " (%u REs)", res);
6563
6564 /* reserved (4 bits) */
6565 add_reserved_field(udcompparam_tree, hf_oran_reserved_last_4bits, tvb, offset, 1);
6566 *sReSMask = (uint16_t)param_sresmask;
6567
6568 proto_item_append_text(udcompparam_ti, " (%u REs)", res);
6569 offset += 2;
6570 break;
6571 }
6572
6573 default:
6574 /* reserved (set to all zeros), but how many bytes?? */
6575 break;
6576 }
6577
6578 proto_item_set_len(udcompparam_ti, offset-start_offset);
6579 return offset;
6580}
6581
6582
6583/* Dissect ciCompHdr (channel information compression header, 7.5.2.15) */
6584/* bit_width and comp_meth are out params */
6585static int dissect_cicomphdr(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree, unsigned offset,
6586 unsigned *bit_width, unsigned *comp_meth, uint8_t *comp_opt)
6587{
6588 /* Subtree */
6589 proto_item *cicomphdr_ti = proto_tree_add_string_format(tree, hf_oran_ciCompHdr,
6590 tvb, offset, 1, "",
6591 "ciCompHdr");
6592 proto_tree *cicomphdr_tree = proto_item_add_subtree(cicomphdr_ti, ett_oran_cicomphdr);
6593
6594 /* ciIqWidth */
6595 uint32_t hdr_iq_width;
6596 proto_item *iq_width_item = proto_tree_add_item_ret_uint(cicomphdr_tree, hf_oran_ciCompHdrIqWidth , tvb, offset, 1, ENC_NA0x00000000, &hdr_iq_width);
6597 hdr_iq_width = (hdr_iq_width) ? hdr_iq_width : 16;
6598 if (bit_width) {
6599 *bit_width = hdr_iq_width;
6600 }
6601 proto_item_append_text(iq_width_item, " (%u bits)", hdr_iq_width);
6602
6603 /* ciCompMeth */
6604 uint32_t ci_comp_meth;
6605 proto_tree_add_item_ret_uint(cicomphdr_tree, hf_oran_ciCompHdrMeth, tvb, offset, 1, ENC_NA0x00000000, &ci_comp_meth);
6606 if (comp_meth) {
6607 *comp_meth = ci_comp_meth;
6608 }
6609
6610 /* ciCompOpt */
6611 uint32_t opt;
6612 proto_tree_add_item_ret_uint(cicomphdr_tree, hf_oran_ciCompOpt, tvb, offset, 1, ENC_NA0x00000000, &opt);
6613 *comp_opt = opt;
6614 offset += 1;
6615
6616 /* Summary */
6617 proto_item_append_text(cicomphdr_ti, " (IqWidth=%u, ciCompMeth=%s, ciCompOpt=%s)",
6618 hdr_iq_width,
6619 rval_to_str_const(ci_comp_meth, ud_comp_header_meth, "Unknown"),
6620 (*comp_opt) ? "compression per PRB" : "compression per UE");
6621 return offset;
6622}
6623
6624static void dissect_payload_version(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, unsigned offset)
6625{
6626 unsigned version;
6627 proto_item *ti = proto_tree_add_item_ret_uint(tree, hf_oran_payload_version, tvb, offset, 1, ENC_NA0x00000000, &version);
6628 if (version != 1) {
6629 expert_add_info_format(pinfo, ti, &ei_oran_version_unsupported,
6630 "PayloadVersion %u not supported by dissector (only 1 is known)",
6631 version);
6632 /* TODO: should throw an exception? */
6633 }
6634}
6635
6636/* Time from earlier to later in units of unit_ns nanoseconds, rounded.
6637 0 if later is before earlier, and at most UINT32_MAX */
6638static uint32_t time_gap(const nstime_t *later, const nstime_t *earlier, uint32_t unit_ns)
6639{
6640 nstime_t delta;
6641 nstime_delta(&delta, later, earlier);
6642 if (delta.secs < 0 || (delta.secs == 0 && delta.nsecs < 0)) {
6643 return 0;
6644 }
6645 if ((uint64_t)delta.secs >= UINT32_MAX(4294967295U)) {
6646 return UINT32_MAX(4294967295U);
6647 }
6648 uint64_t units = ((uint64_t)delta.secs * (1000000000 / unit_ns)) +
6649 (((uint64_t)delta.nsecs + unit_ns/2) / unit_ns);
6650 return (uint32_t)MIN(units, UINT32_MAX)(((units) < ((4294967295U))) ? (units) : ((4294967295U)));
6651}
6652
6653static void show_link_to_acknack_request(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
6654 ack_nack_request_t *request)
6655{
6656 /* Request frame */
6657 proto_item *ti = proto_tree_add_uint(tree, hf_oran_acknack_request_frame,
6658 tvb, 0, 0, request->request_frame_number);
6659 PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
6660
6661 /* Work out gap between frames (in ms) */
6662 uint32_t total_gap = time_gap(&pinfo->abs_ts, &request->request_frame_time, 1000000);
6663
6664 ti = proto_tree_add_uint(tree, hf_oran_acknack_request_time,
6665 tvb, 0, 0, total_gap);
6666 PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
6667
6668 /* Type of request */
6669 ti = proto_tree_add_uint(tree, hf_oran_acknack_request_type,
6670 tvb, 0, 0, request->requestType);
6671 PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
6672}
6673
6674static void show_link_to_acknack_response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
6675 ack_nack_request_t *response)
6676{
6677 if (response->response_frame_number == 0) {
6678 /* Requests may not get a response, and can't always tell when to expect one */
6679 return;
6680 }
6681
6682 /* Response frame */
6683 proto_item *ti = proto_tree_add_uint(tree, hf_oran_acknack_response_frame,
6684 tvb, 0, 0, response->response_frame_number);
6685 PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
6686
6687 /* Work out gap between frames (in ms) */
6688 uint32_t total_gap = time_gap(&response->response_frame_time, &pinfo->abs_ts, 1000000);
6689
6690 ti = proto_tree_add_uint(tree, hf_oran_acknack_response_time,
6691 tvb, 0, 0, total_gap);
6692 PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
6693}
6694
6695
6696
6697/* Control plane dissector (section 7). */
6698static int dissect_oran_c(tvbuff_t *tvb, packet_info *pinfo,
6699 proto_tree *tree, oran_tap_info *tap_info, void *data _U___attribute__((unused)))
6700{
6701 /* Hidden filter for plane */
6702 proto_item *plane_ti = proto_tree_add_item(tree, hf_oran_cplane, tvb, 0, 0, ENC_NA0x00000000);
6703 PROTO_ITEM_SET_HIDDEN(plane_ti)proto_item_set_hidden((plane_ti));
6704
6705 /* Set up structures needed to add the protocol subtree and manage it */
6706 unsigned offset = 0;
6707
6708 col_set_str(pinfo->cinfo, COL_PROTOCOL, "O-RAN-FH-C");
6709 col_set_str(pinfo->cinfo, COL_INFO, "C-Plane");
6710
6711 tap_info->userplane = false0;
6712
6713 /* Create display subtree for the protocol */
6714 proto_item *protocol_item = proto_tree_add_item(tree, proto_oran, tvb, 0, -1, ENC_NA0x00000000);
6715 proto_item_append_text(protocol_item, "-C");
6716 proto_tree *oran_tree = proto_item_add_subtree(protocol_item, ett_oran);
6717
6718 /* ecpriRtcid (eAxC ID) */
6719 uint16_t eAxC;
6720 addPcOrRtcid(tvb, oran_tree, &offset, hf_oran_ecpri_rtcid, &eAxC, tap_info);
6721 tap_info->eaxc = eAxC;
6722
6723 /* Look up any existing conversation state for eAxC+plane */
6724 flow_state_t* state = lookup_flow(pinfo, eAxC, ORAN_C_PLANE0, false0);
6725
6726 /* Message identifier */
6727 uint32_t seq_id, sub_seq_id, e;
6728 proto_item *seq_id_ti;
6729 offset = addSeqid(tvb, oran_tree, offset, ORAN_C_PLANE0, &seq_id, &seq_id_ti, &sub_seq_id, &e);
6730
6731 /* Section common subtree */
6732 int section_tree_offset = offset;
6733 proto_item *sectionHeading = proto_tree_add_string_format(oran_tree, hf_oran_c_section_common,
6734 tvb, offset, 0, "", "C-Plane Section Type ");
6735 proto_tree *section_tree = proto_item_add_subtree(sectionHeading, ett_oran_c_section_common);
6736
6737 /* Peek ahead at the section type */
6738 uint32_t sectionType = 0;
6739 sectionType = tvb_get_uint8(tvb, offset+5);
6740
6741 uint32_t scs = 0;
6742 proto_item *scs_ti = NULL((void*)0);
6743
6744 /* dataDirection */
6745 uint32_t direction = 0;
6746 proto_item *datadir_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_data_direction, tvb, offset, 1, ENC_NA0x00000000, &direction);
6747 tap_info->uplink = (direction==0);
6748
6749 /* Update/report status of conversation */
6750 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
6751
6752 if (state == NULL((void*)0)) {
6753 /* Allocate state now */
6754 state = wmem_new0(wmem_file_scope(), flow_state_t)((flow_state_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_state_t
)))
;
6755 state->ack_nack_requests = wmem_tree_new(wmem_file_scope());
6756 store_flow(pinfo, eAxC, ORAN_C_PLANE0, false0, state);
6757 /* Tables for each direction */
6758 state->expected_sections[0] = wmem_tree_new(wmem_file_scope());
6759 state->expected_sections[1] = wmem_tree_new(wmem_file_scope());
6760 }
6761
6762 /* Check sequence analysis status */
6763 if (state->last_frame_seen[direction] && (seq_id != state->next_expected_sequence_number[direction])) {
6764 /* Store this result */
6765 flow_result_t *result = wmem_new0(wmem_file_scope(), flow_result_t)((flow_result_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_result_t
)))
;
6766 result->unexpected_seq_number = true1;
6767 result->expected_sequence_number = state->next_expected_sequence_number[direction];
6768 result->previous_frame = state->last_frame[direction];
6769 result->u_plane_frames = wmem_list_new(wmem_file_scope());
6770 wmem_tree_insert32(flow_results_table, pinfo->num, result);
6771 }
6772 /* Update conversation info */
6773 state->last_frame[direction] = pinfo->num;
6774 state->last_frame_seen[direction] = true1;
6775 state->next_expected_sequence_number[direction] = (seq_id+1) % 256;
6776 }
6777
6778 /* Show any issues associated with this frame number */
6779 flow_result_t *result = wmem_tree_lookup32(flow_results_table, pinfo->num);
6780 if (result!=NULL((void*)0) && result->unexpected_seq_number) {
6781 expert_add_info_format(pinfo, seq_id_ti,
6782 (direction == DIR_UPLINK0) ?
6783 &ei_oran_cplane_unexpected_sequence_number_ul :
6784 &ei_oran_cplane_unexpected_sequence_number_dl,
6785 "Sequence number %u expected, but got %u",
6786 result->expected_sequence_number, seq_id);
6787
6788 /* Update tap info */
6789 uint32_t missing_sns = (256 + seq_id - result->expected_sequence_number) % 256;
6790 /* Don't get confused by being slightly out of order.. */
6791 if (missing_sns < 128) {
6792 tap_info->missing_sns = missing_sns;
6793 }
6794 else {
6795 tap_info->missing_sns = 0;
6796 }
6797
6798 /* Show link back to previous frame in stream */
6799 proto_item *prev_ti = proto_tree_add_uint(proto_item_get_subtree(proto_item_get_parent(seq_id_ti)),
6800 hf_oran_previous_frame, tvb, 0, 0, result->previous_frame);
6801 proto_item_set_generated(prev_ti);
6802 }
6803
6804 /* payloadVersion */
6805 dissect_payload_version(section_tree, tvb, pinfo, offset);
6806
6807 /* filterIndex */
6808 if (sectionType == SEC_C_SLOT_CONTROL || sectionType == SEC_C_ACK_NACK_FEEDBACK) {
6809 /* scs (for ST4 and ST8) */
6810 scs_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_frameStructure_subcarrier_spacing, tvb, offset, 1, ENC_NA0x00000000, &scs);
6811 }
6812 else if (sectionType == SEC_C_RRM_MEAS_REPORTS || sectionType == SEC_C_RRM_MEAS_REPORTS_NON_TIMING || sectionType == SEC_C_REQUEST_RRM_MEAS) {
6813 /* reserved (4 bits) */
6814 add_reserved_field(section_tree, hf_oran_reserved_last_4bits, tvb, offset, 1);
6815 }
6816 else if (sectionType != SEC_C_LAA) {
6817 /* filterIndex (most common case) */
6818 proto_tree_add_item(section_tree, hf_oran_filter_index, tvb, offset, 1, ENC_NA0x00000000);
6819 }
6820 offset += 1;
6821
6822 unsigned ref_a_offset = offset;
6823 /* frameId */
6824 uint32_t frameId = 0;
6825 proto_tree_add_item_ret_uint(section_tree, hf_oran_frame_id, tvb, offset, 1, ENC_NA0x00000000, &frameId);
6826 tap_info->frame = frameId;
6827 offset += 1;
6828
6829 /* subframeId */
6830 uint32_t subframeId = 0;
6831 proto_tree_add_item_ret_uint(section_tree, hf_oran_subframe_id, tvb, offset, 1, ENC_NA0x00000000, &subframeId);
6832 /* slotId */
6833 uint32_t slotId = 0;
6834 proto_tree_add_item_ret_uint(section_tree, hf_oran_slot_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &slotId);
6835 tap_info->slot = slotId;
6836 offset++;
6837
6838 /* startSymbolId */
6839 uint32_t startSymbolId = 0;
6840 proto_item *ssid_ti = NULL((void*)0);
6841 if ((sectionType == SEC_C_ACK_NACK_FEEDBACK) || /* Section Type 8 */
6842 (sectionType == SEC_C_SINR_REPORTING)) { /* Section Type 9 */
6843 /* symbolId */
6844 proto_tree_add_item_ret_uint(section_tree, hf_oran_symbolId, tvb, offset, 1, ENC_NA0x00000000, &startSymbolId);
6845 }
6846 else if (sectionType != SEC_C_LAA) {
6847 /* startSymbolId is in most section types */
6848 ssid_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_start_symbol_id, tvb, offset, 1, ENC_NA0x00000000, &startSymbolId);
6849 if (startSymbolId && (sectionType == SEC_C_RRM_MEAS_REPORTS)) { /* Section Type 10 */
6850 proto_item_append_text(ssid_ti, " (should be 0 for ST10!)");
6851 expert_add_info_format(pinfo, ssid_ti, &ei_oran_st10_startsymbolid_not_0,
6852 "startSymbolId should be 0 for ST10 - found %u", startSymbolId);
6853 }
6854 }
6855 else {
6856 /* reserved (6 bits) */
6857 add_reserved_field(section_tree, hf_oran_reserved_last_6bits, tvb, offset, 1);
6858 }
6859 offset++;
6860
6861
6862 char id[16];
6863 snprintf(id, 16, "%u-%u-%u-%u", frameId, subframeId, slotId, startSymbolId);
6864 proto_item *pi = proto_tree_add_string(section_tree, hf_oran_refa, tvb, ref_a_offset, 3, id);
6865 proto_item_set_generated(pi);
6866
6867 uint32_t cmd_scope = 0;
6868 bool_Bool st8_ready = false0;
6869
6870 /* numberOfSections (or whatever section has instead) */
6871 uint32_t nSections = 0;
6872 if (sectionType == SEC_C_SLOT_CONTROL) { /* Section Type 4 */
6873 /* Slot Control has these fields instead */
6874 /* reserved (4 bits) */
6875 add_reserved_field(section_tree, hf_oran_reserved_4bits, tvb, offset, 1);
6876 /* cmdScope (4 bits) */
6877 proto_tree_add_item_ret_uint(section_tree, hf_oran_cmd_scope, tvb, offset, 1, ENC_NA0x00000000, &cmd_scope);
6878 }
6879 else if (sectionType == SEC_C_ACK_NACK_FEEDBACK) { /* Section Type 8 */
6880 /* reserved (7 bits) */
6881 add_reserved_field(section_tree, hf_oran_reserved_7bits, tvb, offset, 1);
6882 /* ready (1 bit) */
6883 /* TODO: when set, ready in slotId+1.. */
6884 proto_tree_add_item_ret_boolean(section_tree, hf_oran_ready, tvb, offset, 1, ENC_NA0x00000000, &st8_ready);
6885 if (!st8_ready) {
6886 /* SCS value is ignored, and may be set to any value by O-RU */
6887 proto_item_append_text(scs_ti, " (ignored)");
6888 }
6889 }
6890 else if (sectionType != SEC_C_LAA) {
6891 /* numberOfSections */
6892 proto_tree_add_item_ret_uint(section_tree, hf_oran_numberOfSections, tvb, offset, 1, ENC_NA0x00000000, &nSections);
6893 }
6894 else {
6895 add_reserved_field(section_tree, hf_oran_reserved_8bits, tvb, offset, 1);
6896 }
6897 offset++;
6898
6899 /* sectionType */
6900 proto_tree_add_item_ret_uint(section_tree, hf_oran_sectionType, tvb, offset, 1, ENC_NA0x00000000, &sectionType);
6901 offset += 1;
6902
6903 /* Check that dataDirection is consistent with section type */
6904 if (sectionType == SEC_C_SINR_REPORTING && direction != 0) { /* Section Type 9 */
6905 expert_add_info(pinfo, datadir_ti, &ei_oran_st9_not_ul);
6906 }
6907 if (sectionType == SEC_C_RRM_MEAS_REPORTS && direction != 0) { /* Section Type 10 */
6908 expert_add_info(pinfo, datadir_ti, &ei_oran_st10_not_ul);
6909 }
6910
6911 /* Note this section type in stats */
6912 if (sectionType < SEC_C_MAX_INDEX) {
6913 tap_info->section_types[sectionType] = true1;
6914 }
6915
6916 /* Section-type-specific fields following common header (white entries in Section Type diagrams) */
6917 unsigned bit_width = 0;
6918 unsigned comp_meth = 0;
6919 proto_item *comp_meth_ti;
6920 unsigned ci_comp_method = 0;
6921 uint8_t ci_comp_opt = 0;
6922
6923 uint32_t num_ues = 0;
6924 uint32_t number_of_acks = 0, number_of_nacks = 0;
6925
6926 uint32_t num_sinr_per_prb = 0;
6927
6928 switch (sectionType) {
6929 case SEC_C_UNUSED_RB: /* Section Type 0 */
6930 /* timeOffset */
6931 proto_tree_add_item(section_tree, hf_oran_timeOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
6932 offset += 2;
6933 /* frameStructure */
6934 offset = dissect_frame_structure(section_tree, tvb, offset,
6935 subframeId, slotId);
6936
6937 /* cpLength */
6938 proto_tree_add_item(section_tree, hf_oran_cpLength, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
6939 offset += 2;
6940 /* reserved (8 bits) */
6941 add_reserved_field(section_tree, hf_oran_reserved_8bits, tvb, offset, 1);
6942 offset += 1;
6943 break;
6944
6945 case SEC_C_NORMAL: /* Section Type 1 */
6946 case SEC_C_UE_SCHED: /* Section Type 5 */
6947 /* udCompHdr */
6948 offset = dissect_udcomphdr(tvb, pinfo, section_tree, offset,
6949 true1, direction==1 || pref_override_ul_compression, /* ignore for DL or if using mplane for UL settings */
6950 &bit_width, &comp_meth, &comp_meth_ti, tap_info);
6951 /* reserved (8 bits) */
6952 add_reserved_field(section_tree, hf_oran_reserved_8bits, tvb, offset, 1);
6953 offset += 1;
6954 break;
6955
6956 case SEC_C_SLOT_CONTROL: /* Section Type 4 */
6957 break;
6958
6959 case SEC_C_PRACH: /* Section Type 3 */
6960 /* timeOffset */
6961 proto_tree_add_item(section_tree, hf_oran_timeOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
6962 offset += 2;
6963 /* frameStructure */
6964 offset = dissect_frame_structure(section_tree, tvb, offset,
6965 subframeId, slotId);
6966 /* cpLength */
6967 proto_tree_add_item(section_tree, hf_oran_cpLength, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
6968 offset += 2;
6969 /* udCompHdr */
6970 offset = dissect_udcomphdr(tvb, pinfo, section_tree, offset,
6971 true1, direction==1 || pref_override_ul_compression, /* ignore for DL or if using mplane for UL settings */
6972 &bit_width, &comp_meth, &comp_meth_ti, tap_info);
6973 break;
6974
6975 case SEC_C_CH_INFO: /* Section Type 6 */
6976 /* numberOfUEs */
6977 proto_tree_add_item_ret_uint(section_tree, hf_oran_numberOfUEs, tvb, offset, 1, ENC_NA0x00000000, &num_ues);
6978 offset += 1;
6979 /* ciCompHdr (was reserved) */
6980 offset = dissect_cicomphdr(tvb, pinfo, section_tree, offset, &bit_width, &ci_comp_method, &ci_comp_opt);
6981
6982 /* Number of sections may not be filled in (at all, or correctly), so set to the number of UEs.
6983 The data entries are per-UE... they don't have a sectionID, but they could have section extensions... */
6984 if (nSections == 0 || num_ues > nSections) {
6985 nSections = num_ues;
6986 }
6987 break;
6988
6989 case SEC_C_RSVD2:
6990 break;
6991
6992 case SEC_C_LAA: /* Section Type 7 */
6993 add_reserved_field(section_tree, hf_oran_reserved_16bits, tvb, offset, 2);
6994 offset += 2;
6995 break;
6996
6997 case SEC_C_ACK_NACK_FEEDBACK: /* Section Type 8 */
6998 /* numberOfAcks (1 byte) */
6999 proto_tree_add_item_ret_uint(section_tree, hf_oran_number_of_acks, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &number_of_acks);
7000 offset += 1;
7001 /* numberOfNacks (1 byte) */
7002 proto_tree_add_item_ret_uint(section_tree, hf_oran_number_of_nacks, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &number_of_nacks);
7003 offset += 1;
7004
7005 /* The requests were sent by the O-DU, in the other direction (or the same, if sent by the O-DU) */
7006 flow_state_t *request_state = lookup_flow(pinfo, eAxC, ORAN_C_PLANE0, true1);
7007 if (!request_state || !request_state->ack_nack_requests) {
7008 request_state = state;
7009 }
7010
7011 /* Show ACKs and NACKs. For both, try to link back to request. */
7012 for (unsigned int n=1; n <= number_of_acks; n++) {
7013 uint32_t ackid;
7014 proto_item *ack_ti;
7015 ack_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_ackid, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ackid);
7016 offset += 2;
7017
7018 /* Look up request table in state (which really should be set by now, but test anyway). */
7019 if (request_state && request_state->ack_nack_requests) {
7020 ack_nack_request_t *request = wmem_tree_lookup32(request_state->ack_nack_requests, ackid);
7021 if (!request && state && state->ack_nack_requests) {
7022 request = wmem_tree_lookup32(state->ack_nack_requests, ackid);
7023 }
7024 if (request != NULL((void*)0)) {
7025 /* On first pass, update with this response */
7026 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
7027 request->response_frame_number = pinfo->num;
7028 request->response_frame_time = pinfo->abs_ts;
7029 }
7030
7031 /* Show request details */
7032 show_link_to_acknack_request(section_tree, tvb, pinfo, request);
7033 }
7034 else {
7035 /* Request not found */
7036 expert_add_info_format(pinfo, ack_ti, &ei_oran_acknack_no_request,
7037 "Response for ackId=%u received, but no request found",
7038 ackid);
7039 }
7040 }
7041 }
7042 for (unsigned int m=1; m <= number_of_nacks; m++) {
7043 uint32_t nackid;
7044 proto_item *nack_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_nackid, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &nackid);
7045 offset += 2;
7046
7047 expert_add_info_format(pinfo, nack_ti, &ei_oran_st8_nackid,
7048 "Received Nack for ackNackId=%u",
7049 nackid);
7050
7051 /* Look up request table in state. */
7052 if (request_state && request_state->ack_nack_requests) {
7053 ack_nack_request_t *request = wmem_tree_lookup32(request_state->ack_nack_requests, nackid);
7054 if (!request && state && state->ack_nack_requests) {
7055 request = wmem_tree_lookup32(state->ack_nack_requests, nackid);
7056 }
7057 if (request) {
7058 /* On first pass, update with this response */
7059 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
7060 request->response_frame_number = pinfo->num;
7061 request->response_frame_time = pinfo->abs_ts;
7062 }
7063
7064 /* Show request details */
7065 show_link_to_acknack_request(section_tree, tvb, pinfo, request);
7066 }
7067 else {
7068 /* Request not found */
7069 expert_add_info_format(pinfo, nack_ti, &ei_oran_acknack_no_request,
7070 "Response for nackId=%u received, but no request found",
7071 nackid);
7072 }
7073 }
7074 }
7075 break;
7076
7077 case SEC_C_SINR_REPORTING: /* Section Type 9 */
7078 {
7079 /* numSinrPerPrb (3 bits) */
7080 proto_item *nspp_ti;
7081 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);
7082 switch (num_sinr_per_prb) {
7083 case 0:
7084 num_sinr_per_prb = 1; break;
7085 case 1:
7086 num_sinr_per_prb = 2; break;
7087 case 2:
7088 num_sinr_per_prb = 3; break;
7089 case 3:
7090 num_sinr_per_prb = 4; break;
7091 case 4:
7092 num_sinr_per_prb = 6; break;
7093 case 5:
7094 num_sinr_per_prb = 12; break;
7095
7096 default:
7097 proto_item_append_text(nspp_ti, " (invalid)");
7098 expert_add_info_format(pinfo, nspp_ti, &ei_oran_num_sinr_per_prb_unknown,
7099 "Invalid numSinrPerPrb value (%u)",
7100 num_sinr_per_prb);
7101 num_sinr_per_prb = 1;
7102 }
7103
7104 /* oruControlSinrSlotMaskId (5 bits) */
7105 proto_tree_add_item(section_tree, hf_oran_oru_control_sinr_slot_mask_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7106 offset += 1;
7107 /* reserved (8 bits) */
7108 add_reserved_field(section_tree, hf_oran_reserved_8bits, tvb, offset, 1);
7109 offset += 1;
7110 break;
7111 }
7112
7113 case SEC_C_RRM_MEAS_REPORTS: /* Section Type 10 */
7114 case SEC_C_REQUEST_RRM_MEAS: /* Section Type 11 */
7115 case SEC_C_SRS_DESCRIPTION: /* Section Type 12 */
7116 case SEC_C_RRM_MEAS_REPORTS_NON_TIMING: /* Section Type 13 */
7117 case SEC_C_CO_SCHEDULING_INFO: /* Section Type 14 */
7118 /* reserved (16 bits) */
7119 add_reserved_field(section_tree, hf_oran_reserved_16bits, tvb, offset, 2);
7120 offset += 2;
7121 break;
7122 };
7123
7124 /* Update udCompHdr details in state for UL U-Plane */
7125 if (state && direction==0 && !PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
7126 switch (sectionType) {
7127 case SEC_C_NORMAL: /* Section Type 1 */
7128 case SEC_C_PRACH: /* Section Type 3 */
7129 case SEC_C_UE_SCHED: /* Section Type 5 */
7130 state->ul_ud_comp_hdr_set = true1;
7131 state->ul_ud_comp_hdr_bit_width = bit_width;
7132 state->ul_ud_comp_hdr_compression = comp_meth;
7133 state->ul_ud_comp_hdr_frame = pinfo->num;
7134 break;
7135 default:
7136 break;
7137 }
7138 }
7139
7140
7141 proto_item_append_text(sectionHeading, "%d, %s, frameId: %d, subframeId: %d, slotId: %d, startSymbolId: %d",
7142 sectionType, val_to_str_const(direction, data_direction_vals, "Unknown"),
7143 frameId, subframeId, slotId, startSymbolId);
7144 if (nSections) {
7145 proto_item_append_text(sectionHeading, ", numberOfSections=%u", nSections);
7146 }
7147
7148 write_pdu_label_and_info(protocol_item, NULL((void*)0), pinfo, ", Type: %2d %s", sectionType,
7149 rval_to_str_const(sectionType, section_types_short, "Unknown"));
7150
7151 /* Set actual length of C-Plane section header */
7152 proto_item_set_len(section_tree, offset - section_tree_offset);
7153
7154 if (sectionType == SEC_C_ACK_NACK_FEEDBACK) {
7155 write_pdu_label_and_info(oran_tree, section_tree, pinfo,
7156 (st8_ready) ? " (Ready)" : " (ACK)");
7157 }
7158
7159
7160 /* Section type 4 doesn't have normal sections, so deal with here before normal sections */
7161 if (sectionType == SEC_C_SLOT_CONTROL) {
7162 /* numberOfST4Cmds */
7163 uint32_t no_st4_cmds, st4_cmd_len, num_slots, ack_nack_req_id, st4_cmd_type;
7164 proto_item *no_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_number_of_st4_cmds,
7165 tvb, offset, 1, ENC_NA0x00000000, &no_st4_cmds);
7166 if (no_st4_cmds == 0) {
7167 expert_add_info(pinfo, no_ti, &ei_oran_st4_no_cmds);
7168 }
7169 offset += 1;
7170
7171 /* reserved (1 byte) */
7172 add_reserved_field(section_tree, hf_oran_reserved_8bits, tvb, offset, 1);
7173 offset += 1;
7174
7175 /* Loop over commands. Each has 8-byte common header, followed by cmd-specific payload */
7176 proto_item *len_ti;
7177 for (uint32_t n=0; n < no_st4_cmds; n++) {
7178 /* Table 7.4.6-2: Section Type 4 Command common header format */
7179 proto_item *hdr_ti = proto_tree_add_string_format(section_tree, hf_oran_st4_cmd_header,
7180 tvb, offset, 8, "",
7181 "Type 4 Command common header");
7182 proto_tree *hdr_tree = proto_item_add_subtree(hdr_ti, ett_oran_st4_cmd_header);
7183
7184 /* st4CmdType */
7185 proto_tree_add_item_ret_uint(hdr_tree, hf_oran_st4_cmd_type, tvb, offset, 1, ENC_NA0x00000000, &st4_cmd_type);
7186 offset += 1;
7187
7188 /* st4CmdLen */
7189 len_ti = proto_tree_add_item_ret_uint(hdr_tree, hf_oran_st4_cmd_len, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &st4_cmd_len);
7190 if (st4_cmd_len == 0) {
7191 /* Meaning of 0 not yet defined (v15.00) */
7192 proto_item_append_text(len_ti, " (reserved)");
7193 expert_add_info(pinfo, len_ti, &ei_oran_st4_zero_len_cmd);
7194 }
7195 else {
7196 proto_item_append_text(len_ti, " (%u bytes)", st4_cmd_len*4);
7197 }
7198 offset += 2;
7199
7200 /* numSlots */
7201 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);
7202 if (num_slots == 0) {
7203 proto_item_append_text(slots_ti, " (until changed)");
7204 }
7205 offset += 1;
7206
7207 /* ackNackReqId */
7208 proto_item *ack_nack_req_id_ti;
7209 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);
7210 offset += 2;
7211 if (ack_nack_req_id == 0) {
7212 proto_item_append_text(ack_nack_req_id_ti, " (no Section type 8 response expected)");
7213 }
7214
7215 /* reserved (16 bits) */
7216 add_reserved_field(hdr_tree, hf_oran_reserved_16bits, tvb, offset, 2);
7217 offset += 2;
7218
7219 /* Set common header summary */
7220 proto_item_append_text(hdr_ti, " (cmd=%s, len=%u, slots=%u, ackNackReqId=%u)",
7221 rval_to_str_const(st4_cmd_type, st4_cmd_type_vals, "Unknown"),
7222 st4_cmd_len, num_slots, ack_nack_req_id);
7223
7224 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
7225 rval_to_str_const(st4_cmd_type, st4_cmd_type_vals, "Unknown"));
7226
7227
7228 /* Subtree for this command body */
7229 proto_item *command_ti = proto_tree_add_string_format(section_tree, hf_oran_st4_cmd,
7230 tvb, offset, 0, "",
7231 "Type 4 Command (%s)", rval_to_str_const(st4_cmd_type, st4_cmd_type_vals, "Unknown"));
7232 proto_tree *command_tree = proto_item_add_subtree(command_ti, ett_oran_st4_cmd);
7233
7234 unsigned command_start_offset = offset;
7235
7236 /* Check fields compatible with chosen command. */
7237 if (st4_cmd_type==1) {
7238 if (num_slots != 0) {
7239 /* "the value of numSlots should be set to zero for this command type" */
7240 expert_add_info_format(pinfo, slots_ti, &ei_oran_numslots_not_zero,
7241 "numSlots should be zero for ST4 command 1 - found %u",
7242 num_slots);
7243 }
7244 }
7245
7246 if (st4_cmd_type==3 || st4_cmd_type==4) {
7247 if (startSymbolId != 0) {
7248 /* "expected reception window for the commands is the symbol zero reception window" */
7249 expert_add_info_format(pinfo, ssid_ti, &ei_oran_start_symbol_id_not_zero,
7250 "startSymbolId should be zero for ST4 commands 3&4 - found %u",
7251 startSymbolId);
7252 }
7253 }
7254
7255 /* Add format for this command */
7256 switch (st4_cmd_type) {
7257 case 1: /* TIME_DOMAIN_BEAM_CONFIG */
7258 {
7259 bool_Bool disable_tdbfns;
7260 uint32_t bfwcomphdr_iq_width, bfwcomphdr_comp_meth;
7261
7262 /* Hidden filter for bf */
7263 proto_item *bf_ti = proto_tree_add_item(command_tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
7264 PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
7265
7266 /* reserved (2 bits) */
7267 add_reserved_field(command_tree, hf_oran_reserved_2bits, tvb, offset, 1);
7268 /* symbolMask (14 bits) */
7269 uint32_t symbol_mask;
7270 proto_item *symbol_mask_ti;
7271 offset = dissect_symbolmask(tvb, command_tree, offset, &symbol_mask, &symbol_mask_ti);
7272 /* 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 */
7273 /* lsb is symbol 0 */
7274 for (unsigned s=0; s < 14; s++) {
7275 if ((symbol_mask & (1 << s)) && (startSymbolId > s)) {
7276 proto_item_append_text(symbol_mask_ti, " (startSymbolId is %u, so some lower symbol bits ignored!)", startSymbolId);
7277 expert_add_info(pinfo, symbol_mask_ti, &ei_oran_start_symbol_id_bits_ignored);
7278 break;
7279 }
7280 }
7281
7282 /* disableTDBFNs (1 bit) */
7283 proto_tree_add_item_ret_boolean(command_tree, hf_oran_disable_tdbfns, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &disable_tdbfns);
7284
7285 /* tdBeamNum (15 bits) */
7286 proto_tree_add_item(command_tree, hf_oran_td_beam_num, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7287 offset += 2;
7288
7289 /* bfwCompHdr (2 subheaders - bfwIqWidth and bfwCompMeth)*/
7290 offset = dissect_bfwCompHdr(tvb, command_tree, offset,
7291 &bfwcomphdr_iq_width, &bfwcomphdr_comp_meth, &comp_meth_ti);
7292 /* reserved (3 bytes) */
7293 proto_tree_add_bits_item(command_tree, hf_oran_reserved, tvb, offset*8, 24, ENC_BIG_ENDIAN0x00000000);
7294 offset += 3;
7295
7296 if (disable_tdbfns) {
7297 /* No beamnum information to show so get out. */
7298 break;
7299 }
7300
7301 /* Read beam entries until reach end of command length */
7302 while ((offset - command_start_offset) < (st4_cmd_len * 4)) {
7303 /* Stop at the padding (fewer than 4 zero bytes) at the end of the command.
7304 An entry with BFWs does not fit there. */
7305 unsigned remaining = command_start_offset + (st4_cmd_len * 4) - offset;
7306 bool_Bool padding = (remaining < 4);
7307 for (unsigned b=0; padding && b < remaining; b++) {
7308 padding = (tvb_get_uint8(tvb, offset+b) == 0);
7309 }
7310 if (padding) {
7311 break;
7312 }
7313
7314 /* disableTDBFWs (1 bit) */
7315 bool_Bool disable_tdbfws;
7316 proto_tree_add_item_ret_boolean(command_tree, hf_oran_disable_tdbfws, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &disable_tdbfws);
7317
7318 /* tdBeamNum (15 bits) */
7319 proto_tree_add_item(command_tree, hf_oran_td_beam_num, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7320 offset += 2;
7321
7322 /* Showing BFWs? */
7323 if (!disable_tdbfws) {
7324
7325 /* bfwCompParam */
7326 unsigned exponent = 0;
7327 bool_Bool supported = false0;
7328 unsigned num_trx_entries;
7329 uint16_t *trx_entries;
7330 offset = dissect_bfwCompParam(tvb, command_tree, pinfo, offset, comp_meth_ti,
7331 &bfwcomphdr_comp_meth, &exponent, &supported,
7332 &num_trx_entries, &trx_entries);
7333
7334 /* Antenna count from preference */
7335 unsigned num_trx = pref_num_bf_antennas;
7336 int bit_offset = offset*8;
7337
7338 for (unsigned trx=0; trx < num_trx; trx++) {
7339 /* Create antenna subtree */
7340 int bfw_offset = bit_offset / 8;
7341 proto_item *bfw_ti = proto_tree_add_string_format(command_tree, hf_oran_bfw,
7342 tvb, bfw_offset, 0, "", "TRX %3u: (", trx+1);
7343 proto_tree *bfw_tree = proto_item_add_subtree(bfw_ti, ett_oran_bfw);
7344
7345 /* I value */
7346 /* Get bits, and convert to float. */
7347 uint32_t bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
7348 float value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent, NULL((void*)0) /* no ModCompr*/, 0 /* RE */);
7349 /* Add to tree. */
7350 proto_tree_add_float(bfw_tree, hf_oran_bfw_i, tvb, bit_offset/8,
7351 (bfwcomphdr_iq_width+7)/8, value);
7352 bit_offset += bfwcomphdr_iq_width;
7353 proto_item_append_text(bfw_ti, "I=%f ", value);
7354
7355 /* Leave a gap between I and Q values */
7356 proto_item_append_text(bfw_ti, " ");
7357
7358 /* Q value */
7359 /* Get bits, and convert to float. */
7360 bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
7361 value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent, NULL((void*)0) /* no ModCompr*/, 0 /* RE */);
7362 /* Add to tree. */
7363 proto_tree_add_float(bfw_tree, hf_oran_bfw_q, tvb, bit_offset/8,
7364 (bfwcomphdr_iq_width+7)/8, value);
7365 bit_offset += bfwcomphdr_iq_width;
7366 proto_item_append_text(bfw_ti, "Q=%f", value);
7367
7368 proto_item_append_text(bfw_ti, ")");
7369 proto_item_set_len(bfw_ti, (bit_offset+7)/8 - bfw_offset);
7370 }
7371 /* Need to round to next byte */
7372 offset = (bit_offset+7)/8;
7373 }
7374 }
7375 break;
7376 }
7377 case 2: /* TDD_CONFIG_PATTERN */
7378 /* reserved (2 bits) */
7379 add_reserved_field(command_tree, hf_oran_reserved_2bits, tvb, offset, 1);
7380 /* dirPattern (14 bits) */
7381 proto_tree_add_item(command_tree, hf_oran_dir_pattern, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7382 offset += 2;
7383
7384 /* reserved (2 bits) */
7385 add_reserved_field(command_tree, hf_oran_reserved_2bits, tvb, offset, 1);
7386 /* guardPattern (14 bits) */
7387 proto_tree_add_item(command_tree, hf_oran_guard_pattern, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7388 offset += 2;
7389 break;
7390
7391 case 3: /* TRX_CONTROL */
7392 case 5: /* TRX_CONTROL_BIDIR */
7393 {
7394 /* Only allowed cmdScope is ARRAY-COMMAND */
7395 if (cmd_scope != 0) {
7396 expert_add_info(pinfo, command_tree, &ei_oran_trx_control_cmd_scope);
7397 }
7398
7399 /* reserved (2 bits) */
7400 add_reserved_field(command_tree, hf_oran_reserved_2bits, tvb, offset, 1);
7401 /* log2MaskBits (4 bits) */
7402 unsigned log2maskbits;
7403 proto_tree_add_item_ret_uint(command_tree, hf_oran_log2maskbits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &log2maskbits);
7404 /* sleepMode (2 bits) */
7405 uint32_t sleep_mode;
7406 proto_tree_add_item_ret_uint(command_tree, hf_oran_sleepmode_trx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &sleep_mode);
7407 offset += 1;
7408
7409 /* reserved (4 bits) */
7410 add_reserved_field(command_tree, hf_oran_reserved_4bits, tvb, offset, 1);
7411 /* numSlotsExt (20 bits) */
7412 uint32_t num_slots_ext;
7413 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);
7414 if (num_slots==0 && num_slots_ext==0) {
7415 proto_item_append_text(num_slots_ext_ti, " (undefined sleep period)");
7416 }
7417 else {
7418 /* Time should be rounded up according to SCS */
7419 float total = (float)(num_slots + num_slots_ext);
7420 /* From table 7.5.2.13-3 */
7421 const float slot_length_by_scs[16] = { 1000, 500, 250, 125, 62.5, 31.25,
7422 0, 0, 0, 0, 0, 0, /* reserved */
7423 1000, 1000, 1000, 1000 };
7424 float slot_length = slot_length_by_scs[scs];
7425 /* Only using valid SCS. TODO: is this test ok? */
7426 if (slot_length != 0) {
7427 /* Round up to next slot */
7428 total = ((int)(total / slot_length) + 1) * slot_length;
7429 proto_item_append_text(num_slots_ext_ti, " (defined sleep period of %f us)", total);
7430 }
7431 }
7432 offset += 3;
7433
7434 /* reserved (2 bits) */
7435 add_reserved_field(command_tree, hf_oran_reserved_2bits, tvb, offset, 1);
7436
7437 /* symbolMask (14 bits) */
7438 uint32_t symbol_mask;
7439 proto_item *sm_ti;
7440 offset = dissect_symbolmask(tvb, command_tree, offset, &symbol_mask, &sm_ti);
7441 if (symbol_mask == 0x0) {
7442 proto_item_append_text(sm_ti, " (wake)");
7443 col_append_str(pinfo->cinfo, COL_INFO, " (wake)");
7444 }
7445 else if (symbol_mask == 0x3fff) {
7446 proto_item_append_text(sm_ti, " (sleep)");
7447 col_append_str(pinfo->cinfo, COL_INFO, " (sleep)");
7448 }
7449 else {
7450 expert_add_info_format(pinfo, sm_ti, &ei_oran_bad_symbolmask,
7451 "For non-zero sleepMode (%u), symbolMask should be 0x0 or 0x3fff - found 0x%05x",
7452 sleep_mode, symbol_mask);
7453 }
7454
7455 /* antMask (16-2048 bits). Size is lookup from log2MaskBits enum.. */
7456 unsigned antmask_length = 2;
7457 if (log2maskbits >= 4) {
7458 antmask_length = (1 << log2maskbits) / 8;
7459 }
7460 proto_item *ant_mask_ti = proto_tree_add_item(command_tree, hf_oran_antMask_trx_control, tvb, offset, antmask_length, ENC_NA0x00000000);
7461 /* show count */
7462 unsigned antenna_count = 0;
7463 for (unsigned b=0; b < antmask_length; b++) {
7464 uint8_t byte = tvb_get_uint8(tvb, offset+b);
7465 for (unsigned bit=0; bit < 8; bit++) {
7466 if ((1 << bit) & byte) {
7467 antenna_count++;
7468 }
7469 }
7470 }
7471 proto_item_append_text(ant_mask_ti, " (%u antennas)", antenna_count);
7472 offset += antmask_length;
7473
7474 /* Pad to next 4-byte boundary */
7475 offset = WS_ROUNDUP_4(offset)(((offset) + ((unsigned)(4U-1U))) & (~((unsigned)(4U-1U))
))
;
7476 break;
7477 }
7478
7479 case 4: /* ASM (advanced sleep mode) */
7480 /* reserved (2+4=6 bits) */
7481 add_reserved_field(command_tree, hf_oran_reserved_6bits, tvb, offset, 1);
7482 /* sleepMode (2 bits) */
7483 uint32_t sleep_mode;
7484 proto_tree_add_item_ret_uint(command_tree, hf_oran_sleepmode_asm, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &sleep_mode);
7485 offset += 1;
7486
7487 /* reserved (4 bits) */
7488 add_reserved_field(command_tree, hf_oran_reserved_4bits, tvb, offset, 1);
7489 /* numSlotsExt (20 bits) */
7490 proto_tree_add_item(command_tree, hf_oran_num_slots_ext, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000);
7491 offset += 3;
7492
7493 /* reserved (2 bits) */
7494 add_reserved_field(command_tree, hf_oran_reserved_2bits, tvb, offset, 1);
7495 /* symbolMask (14 bits) */
7496 uint32_t symbol_mask;
7497 proto_item *sm_ti;
7498 offset = dissect_symbolmask(tvb, command_tree, offset, &symbol_mask, &sm_ti);
7499 if (symbol_mask == 0x0) {
7500 proto_item_append_text(sm_ti, " (wake)");
7501 col_append_str(pinfo->cinfo, COL_INFO, " (wake)");
7502 }
7503 else if (symbol_mask == 0x3fff) {
7504 proto_item_append_text(sm_ti, " (sleep)");
7505 col_append_str(pinfo->cinfo, COL_INFO, " (sleep)");
7506 }
7507 else {
7508 expert_add_info_format(pinfo, sm_ti, &ei_oran_bad_symbolmask,
7509 "For non-zero sleepMode (%u), symbolMask should be 0x0 or 0x3fff - found 0x%05x",
7510 sleep_mode, symbol_mask);
7511 }
7512
7513 /* reserved (2 bytes) */
7514 add_reserved_field(command_tree, hf_oran_reserved_16bits, tvb, offset, 2);
7515 offset += 2;
7516 break;
7517
7518 case 6: /* MAX_POWER_CONTROL */
7519 /* maxPrwLvllnd (8 bits) */
7520 proto_tree_add_item(command_tree, hf_oran_max_pwr_lvl_ind, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7521 offset += 1;
7522 /* arrayCarrierMaxPwrReduction (16 bits) - should be shown in dB */
7523 proto_tree_add_item(command_tree, hf_oran_array_carrier_max_pwr_reduction, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7524 offset += 2;
7525 /* reserved (8 bits) */
7526 add_reserved_field(command_tree, hf_oran_reserved_8bits, tvb, offset, 1);
7527 offset += 1;
7528 break;
7529
7530 default:
7531 /* Error! */
7532 expert_add_info_format(pinfo, len_ti, &ei_oran_st4_unknown_cmd,
7533 "Dissected ST4 command (%u) not recognised",
7534 st4_cmd_type);
7535 break;
7536 }
7537
7538 /* Check apparent size of padding (0-3 bytes ok) */
7539 long padding_remaining = command_start_offset + (st4_cmd_len * 4) - offset;
7540 if (padding_remaining > 3) {
7541 expert_add_info_format(pinfo, len_ti, &ei_oran_st4_wrong_len_cmd,
7542 "Dissected ST4 command does not match signalled st4CmdLen - set to %u (%u bytes) but dissected %u bytes",
7543 st4_cmd_len, st4_cmd_len*4, offset-command_start_offset);
7544 }
7545
7546 /* Advance by signalled length (needs to be aligned on 4-byte boundary) */
7547 offset = command_start_offset + (st4_cmd_len * 4);
7548
7549 /* Set end of command tree */
7550 proto_item_set_end(command_ti, tvb, offset);
7551
7552 if (ack_nack_req_id != 0 && state && state->ack_nack_requests) {
7553 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
7554 /* Add this request into conversation state on first pass */
7555 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)))
;
7556 request_details->request_frame_number = pinfo->num;
7557 request_details->request_frame_time = pinfo->abs_ts;
7558 request_details->requestType = ST4Cmd1+st4_cmd_type-1;
7559
7560 wmem_tree_insert32(state->ack_nack_requests,
7561 ack_nack_req_id,
7562 request_details);
7563 }
7564 else {
7565 /* On later passes, try to link forward to ST8 response */
7566 ack_nack_request_t *response = wmem_tree_lookup32(state->ack_nack_requests,
7567 ack_nack_req_id);
7568 if (response) {
7569 show_link_to_acknack_response(section_tree, tvb, pinfo, response);
7570 }
7571 }
7572 }
7573 }
7574 }
7575 /* LAA doesn't have sections either.. */
7576 else if (sectionType == SEC_C_LAA) { /* Section Type 7 */
7577 /* 7.2.5 Table 6.4-6 */
7578 unsigned mcot;
7579 proto_item *mcot_ti;
7580
7581 /* laaMsgType */
7582 uint32_t laa_msg_type;
7583 proto_item *laa_msg_type_ti;
7584 laa_msg_type_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_laaMsgType, tvb, offset, 1, ENC_NA0x00000000, &laa_msg_type);
7585 /* laaMsgLen */
7586 uint32_t laa_msg_len;
7587 proto_item *len_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_laaMsgLen, tvb, offset, 1, ENC_NA0x00000000, &laa_msg_len);
7588 proto_item_append_text(len_ti, " (%u bytes)", 4*laa_msg_len);
7589 if (laa_msg_len == 0) {
7590 proto_item_append_text(len_ti, " (reserved)");
7591 }
7592 offset += 1;
7593
7594 int payload_offset = offset;
7595
7596 /* Payload */
7597 switch (laa_msg_type) {
7598 case 0:
7599 /* LBT_PDSCH_REQ */
7600 /* lbtHandle (16 bits) */
7601 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7602 offset += 2;
7603 /* lbtOffset (10 bits) */
7604 proto_tree_add_item(section_tree, hf_oran_lbtOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7605 offset += 1;
7606 /* lbtMode (2 bits) */
7607 proto_tree_add_bits_item(section_tree, hf_oran_lbtMode, tvb, offset*8+2, 2, ENC_BIG_ENDIAN0x00000000);
7608 /* reserved (1 bit) */
7609 add_reserved_field(section_tree, hf_oran_reserved_bit4, tvb, offset, 1);
7610 /* lbtDeferFactor (3 bits) */
7611 proto_tree_add_item(section_tree, hf_oran_lbtDeferFactor, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7612 offset += 1;
7613 /* lbtBackoffCounter (10 bits) */
7614 proto_tree_add_item(section_tree, hf_oran_lbtBackoffCounter, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7615 offset += 1;
7616 /* MCOT (4 bits) */
7617 mcot_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_MCOT, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &mcot);
7618 if (mcot<1 || mcot>10) {
7619 proto_item_append_text(mcot_ti, " (should be in range 1-10!)");
7620 expert_add_info_format(pinfo, mcot_ti, &ei_oran_mcot_out_of_range,
7621 "MCOT seen with value %u (must be 1-10)", mcot);
7622
7623 }
7624 /* reserved (10 bits) */
7625 proto_tree_add_bits_item(section_tree, hf_oran_reserved, tvb, (offset*8)+6, 10, ENC_BIG_ENDIAN0x00000000);
7626 break;
7627 case 1:
7628 /* LBT_DRS_REQ */
7629 /* lbtHandle (16 bits) */
7630 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7631 offset += 2;
7632 /* lbtOffset (10 bits) */
7633 proto_tree_add_item(section_tree, hf_oran_lbtOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7634 offset += 1;
7635 /* lbtMode (2 bits) */
7636 proto_tree_add_bits_item(section_tree, hf_oran_lbtMode, tvb, offset*8+2, 2, ENC_BIG_ENDIAN0x00000000);
7637 /* reserved (28 bits) */
7638 proto_tree_add_bits_item(section_tree, hf_oran_reserved, tvb, (offset*8)+4, 28, ENC_BIG_ENDIAN0x00000000);
7639 break;
7640 case 2:
7641 /* LBT_PDSCH_RSP */
7642 /* lbtHandle (16 bits) */
7643 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7644 offset += 2;
7645 /* lbtPdschRes (2 bits) */
7646 proto_tree_add_item(section_tree, hf_oran_lbtPdschRes, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7647 /* inParSF (1 bit) */
7648 proto_tree_add_item(section_tree, hf_oran_initialPartialSF, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7649 /* sfStatus (1 bit) */
7650 proto_tree_add_item(section_tree, hf_oran_sfStatus, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7651 /* sfnSf (12 bits) */
7652 proto_tree_add_item(section_tree, hf_oran_sfnSfEnd, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7653 offset += 2;
7654 /* reserved (24 bits) */
7655 proto_tree_add_bits_item(section_tree, hf_oran_reserved, tvb, (offset*8), 24, ENC_BIG_ENDIAN0x00000000);
7656 break;
7657 case 3:
7658 /* LBT_DRS_RSP */
7659 /* lbtHandle (16 bits) */
7660 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7661 offset += 2;
7662 /* lbtDrsRes (1 bit) */
7663 proto_tree_add_item(section_tree, hf_oran_lbtDrsRes, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7664 /* reserved (7 bits) */
7665 add_reserved_field(section_tree, hf_oran_reserved_last_7bits, tvb, offset, 1);
7666 break;
7667 case 4:
7668 /* LBT_Buffer_Error */
7669 /* lbtHandle (16 bits) */
7670 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7671 offset += 2;
7672 /* lbtBufErr (1 bit) */
7673 proto_tree_add_item(section_tree, hf_oran_lbtBufErr, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7674 /* reserved (7 bits) */
7675 add_reserved_field(section_tree, hf_oran_reserved_last_7bits, tvb, offset, 1);
7676 break;
7677 case 5:
7678 /* LBT_CWCONFIG_REQ */
7679 /* lbtHandle (16 bits) */
7680 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7681 offset += 2;
7682 /* lbtCWConfig_H (8 bits) */
7683 proto_tree_add_item(section_tree, hf_oran_lbtCWConfig_H, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7684 offset += 1;
7685 /* lbtCWConfig_T (8 bits) */
7686 proto_tree_add_item(section_tree, hf_oran_lbtCWConfig_T, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7687 offset += 1;
7688 /* lbtMode (2 bits) */
7689 proto_tree_add_bits_item(section_tree, hf_oran_lbtMode, tvb, offset*8, 2, ENC_BIG_ENDIAN0x00000000);
7690 /* lbtTrafficClass (3 bits) */
7691 proto_tree_add_item(section_tree, hf_oran_lbtTrafficClass, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7692 /* reserved (19 bits) */
7693 proto_tree_add_bits_item(section_tree, hf_oran_reserved, tvb, (offset*8)+5, 19, ENC_BIG_ENDIAN0x00000000);
7694 break;
7695 case 6:
7696 /* LBT_CWCONFIG_RSP */
7697 /* lbtHandle (16 bits) */
7698 proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
7699 offset += 2;
7700 /* lbtCWR_Rst (1 bit) */
7701 proto_tree_add_item(section_tree, hf_oran_lbtCWR_Rst, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
7702 /* reserved (7 bits) */
7703 add_reserved_field(section_tree, hf_oran_reserved_last_7bits, tvb, offset, 1);
7704 break;
7705
7706 default:
7707 /* Unhandled! */
7708 expert_add_info_format(pinfo, laa_msg_type_ti, &ei_oran_laa_msg_type_unsupported,
7709 "laaMsgType %u not supported by dissector",
7710 laa_msg_type);
7711
7712 break;
7713 }
7714 /* For now just skip indicated length of bytes */
7715 offset = payload_offset + 4*(laa_msg_len+1);
7716 }
7717
7718
7719 /* Dissect each C section */
7720 for (uint32_t i = 0; i < nSections; ++i) {
7721 tvbuff_t *section_tvb = tvb_new_subset_remaining(tvb, offset);
7722 offset += dissect_oran_c_section(section_tvb, oran_tree, pinfo, state, sectionType, tap_info,
7723 protocol_item,
7724 subframeId, frameId, slotId, startSymbolId,
7725 bit_width, ci_comp_method, ci_comp_opt,
7726 num_sinr_per_prb);
7727 }
7728
7729 /* Expert error if we are short of tvb by > 3 bytes */
7730 if (tvb_reported_length_remaining(tvb, offset) > 3) {
7731 expert_add_info_format(pinfo, protocol_item, &ei_oran_frame_length,
7732 "%u bytes remain at end of frame - should be 0-3",
7733 tvb_reported_length_remaining(tvb, offset));
7734 }
7735
7736 if (PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited) && result) {
7737 /* Show list of frames that have corresponding U-plane data */
7738 wmem_list_frame_t *list_frame;
7739
7740 /* Some frames may answer > 1 section, so fashion a set using wmem_tree.. */
7741 wmem_tree_t *frames_set = wmem_tree_new(NULL((void*)0));
7742
7743 unsigned first_gap = 0;
7744 unsigned first_symbol = 0;
7745 unsigned first_gap_delta = 0;
7746 bool_Bool first_section = true1;
7747
7748 for (list_frame = wmem_list_head(result->u_plane_frames); list_frame != NULL((void*)0); list_frame = wmem_list_frame_next(list_frame)) {
7749 corresponding_uplane_frame *frame = wmem_list_frame_data(list_frame);
7750
7751 if (!wmem_tree_contains32(frames_set, frame->frame_number)) {
7752 /* Only check/show gap for first section from a given wireshark frame */
7753 if (first_gap == 0) {
7754 first_gap = frame->gap_in_usecs;
7755 first_symbol = frame->symbol;
7756 }
7757 else {
7758 /* Compare calculated vs actual arrival times */
7759 first_gap_delta = frame->gap_in_usecs - first_gap;
7760 unsigned expected_delta = pref_symbol_time * (frame->symbol-first_symbol);
7761 proto_item *delta_ti = proto_tree_add_int(oran_tree,
7762 (direction==0) ? hf_oran_delta_to_expected_ul_symbol_time : hf_oran_delta_to_expected_dl_symbol_time,
7763 tvb, 0, 0, first_gap_delta-expected_delta);
7764 proto_item_append_text (delta_ti, " (%u symbols since first, assuming %u\u03bcs/symbol)", frame->symbol-first_symbol, pref_symbol_time);
7765 proto_item_set_generated(delta_ti);
7766 }
7767 }
7768
7769 /* Show link to U-plane frame */
7770 proto_item *uplane_frame_ti = proto_tree_add_uint(oran_tree, hf_oran_corresponding_uplane_frame, tvb, 0, 0,
7771 frame->frame_number);
7772 proto_item_append_text(uplane_frame_ti, " sectionId:%2u symbol:%2u ", frame->sectionId, frame->symbol);
7773 if (frame->numPrbu > 1) {
7774 proto_item_append_text(uplane_frame_ti, "PRBs %3u->%3u", frame->startPrbu, frame->startPrbu+frame->numPrbu-1);
7775 }
7776 else {
7777 proto_item_append_text(uplane_frame_ti, "PRB: %3u", frame->startPrbu);
7778 }
7779
7780 proto_item_set_generated(uplane_frame_ti);
7781
7782 if (first_section) {
7783 /* Only show timings on first entry for a frame */
7784 proto_item_append_text(uplane_frame_ti, " (in %u\u03bcs)", frame->gap_in_usecs);
7785 first_section = false0;
7786 }
7787
7788 if (first_gap_delta) {
7789 /* Only show timings on first entry for a frame */
7790 proto_item_append_text(uplane_frame_ti, " (in %u\u03bcs) +%u", frame->gap_in_usecs, first_gap_delta);
7791 first_gap_delta = 0;
7792 }
7793
7794 wmem_tree_insert32(frames_set, frame->frame_number, NULL((void*)0));
7795 }
7796 /* Also show total number of corresponding u-plane frames */
7797
7798 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));
7799 proto_item_set_generated(uplane_frame_count_ti);
7800 /* No longer need this set/tree */
7801 wmem_tree_destroy(frames_set, false0, false0);
7802 }
7803
7804 return tvb_captured_length(tvb);
7805}
7806
7807static int dissect_oran_u_re(tvbuff_t *tvb, proto_tree *tree,
7808 unsigned sample_number, int samples_offset,
7809 oran_tap_info *tap_info,
7810 unsigned sample_bit_width,
7811 int comp_meth,
7812 uint32_t exponent,
7813 section_mod_compr_config_t *mod_compr_params,
7814 uint8_t re, float * const re_power)
7815{
7816 /* I */
7817 unsigned i_bits = tvb_get_bits32(tvb, samples_offset, sample_bit_width, ENC_BIG_ENDIAN0x00000000);
7818 float i_value = decompress_value(i_bits, comp_meth, sample_bit_width, exponent, mod_compr_params, re);
7819 unsigned sample_len_in_bytes = ((samples_offset%8)+sample_bit_width+7)/8;
7820 proto_item *i_ti = proto_tree_add_float(tree, hf_oran_iSample, tvb, samples_offset/8, sample_len_in_bytes, i_value);
7821 proto_item_set_text(i_ti, "iSample: % 0.7f 0x%04x (RE-%2u in the PRB)", i_value, i_bits, sample_number);
7822 samples_offset += sample_bit_width;
7823 /* Q */
7824 unsigned q_bits = tvb_get_bits32(tvb, samples_offset, sample_bit_width, ENC_BIG_ENDIAN0x00000000);
7825 float q_value = decompress_value(q_bits, comp_meth, sample_bit_width, exponent, mod_compr_params, re);
7826 sample_len_in_bytes = ((samples_offset%8)+sample_bit_width+7)/8;
7827 proto_item *q_ti = proto_tree_add_float(tree, hf_oran_qSample, tvb, samples_offset/8, sample_len_in_bytes, q_value);
7828 proto_item_set_text(q_ti, "qSample: % 0.7f 0x%04x (RE-%2u in the PRB)", q_value, q_bits, sample_number);
7829 samples_offset += sample_bit_width;
7830 *re_power = i_value*i_value + q_value*q_value;
7831 /* Update RE stats */
7832 tap_info->num_res++;
7833 /* if (i_value == 0.0 && q_value == 0.0) { */
7834 /* TODO: is just checking bits from frame good enough - assuming this always corresponds to a zero value? */
7835 if (i_bits == 0 && q_bits == 0) {
7836 tap_info->num_res_zero++;
7837 }
7838 else {
7839 tap_info->non_zero_re_in_current_prb = true1;
7840 }
7841 return samples_offset;
7842}
7843
7844
7845static bool_Bool udcomplen_appears_present(bool_Bool udcomphdr_present, tvbuff_t *tvb, int offset)
7846{
7847 if (!udcomplen_heuristic_result_set) {
7848 /* All sections will start the same way */
7849 unsigned int section_bytes_before_field = (udcomphdr_present) ? 6 : 4;
7850
7851 /* Move offset back to the start of the section */
7852 offset -= section_bytes_before_field;
7853
7854 do {
7855 /* This field appears several bytes into the U-plane section */
7856 uint32_t length_remaining = tvb_reported_length_remaining(tvb, offset);
7857 /* Are there enough bytes to still read the length field? */
7858 if (section_bytes_before_field+2 > length_remaining) {
7859 udcomplen_heuristic_result = false0;
7860 udcomplen_heuristic_result_set = true1;
7861 break;
7862 }
7863
7864 /* Read the length field */
7865 uint16_t udcomplen = tvb_get_ntohs(tvb, offset+section_bytes_before_field);
7866
7867 /* Is this less than a valid section? Realistic minimal section will be bigger than this..
7868 * Could take into account numPrbU, etc */
7869 if (udcomplen < section_bytes_before_field+2) {
7870 udcomplen_heuristic_result = false0;
7871 udcomplen_heuristic_result_set = true1;
7872 break;
7873 }
7874
7875 /* Does this section fit into the frame? */
7876 if (udcomplen > length_remaining) {
7877 udcomplen_heuristic_result = false0;
7878 udcomplen_heuristic_result_set = true1;
7879 break;
7880 }
7881
7882 /* Move past this section */
7883 offset += udcomplen;
7884
7885 /* Are we at the end of the frame? */
7886 /* TODO: if frame is less than 60 bytes, there may be > 4 bytes, likely zeros.. */
7887 if (tvb_reported_length_remaining(tvb, offset) < 4) {
7888 udcomplen_heuristic_result = true1;
7889 udcomplen_heuristic_result_set = true1;
7890 }
7891 } while (!udcomplen_heuristic_result_set);
7892 }
7893 return udcomplen_heuristic_result;
7894}
7895
7896static bool_Bool at_udcomphdr(tvbuff_t *tvb, int offset)
7897{
7898 if (tvb_captured_length_remaining(tvb, offset) < 2) {
7899 return false0;
7900 }
7901 uint8_t first_byte = tvb_get_uint8(tvb, offset);
7902 uint8_t reserved_byte = tvb_get_uint8(tvb, offset+1);
7903
7904 /* - iq width could be anything, though unlikely to be signalled as (say) < 1-3? */
7905 /* - meth should be 0-8 */
7906 /* - reserved byte should be 0 */
7907 return (((first_byte & 0x0f) <= MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8) && (reserved_byte == 0));
7908}
7909
7910static bool_Bool udcomphdr_appears_present(flow_state_t *flow, uint32_t direction, tvbuff_t *tvb, int offset)
7911{
7912 /* Should really not happen, but guard against this anyway. */
7913 if (flow == NULL((void*)0)) {
7914 /* No state to update. */
7915 return false0;
7916 }
7917
7918 if (direction == DIR_UPLINK0) {
7919 if (flow->udcomphdrUplink_heuristic_result_set) {
7920 /* Return cached value */
7921 return flow->udcomphdrUplink_heuristic_result;
7922 }
7923 else {
7924 /* Work it out, and save answer for next time */
7925 flow->udcomphdrUplink_heuristic_result_set = true1;
7926 flow->udcomphdrUplink_heuristic_result = at_udcomphdr(tvb, offset);
7927 return flow->udcomphdrUplink_heuristic_result;
7928 }
7929 }
7930 else {
7931 /* Downlink */
7932 if (flow->udcomphdrDownlink_heuristic_result_set) {
7933 /* Return cached value */
7934 return flow->udcomphdrDownlink_heuristic_result;
7935 }
7936 else {
7937 /* Work it out, and save answer for next time */
7938 flow->udcomphdrDownlink_heuristic_result_set = true1;
7939 flow->udcomphdrDownlink_heuristic_result = at_udcomphdr(tvb, offset);
7940 return flow->udcomphdrDownlink_heuristic_result;
7941 }
7942 }
7943}
7944
7945/*
7946 dissect_oran_u_timing_header()
7947 Table 8.3.2-1, octets 9-12..
7948 */
7949static int dissect_oran_u_timing_header(tvbuff_t *tvb, packet_info *pinfo, unsigned offset,
7950 proto_item * timingHeader, oran_tap_info *tap_info, uint32_t * frameIdPtr, uint32_t * subframeIdPtr, uint32_t * slotIdPtr,
7951 uint32_t * symbolIdPtr, uint32_t * directionPtr )
7952{
7953 /* Now does the data combine correctly? */
7954 /* Common header for time reference */
7955 proto_tree *timing_header_tree = proto_item_add_subtree(timingHeader, ett_oran_u_timing);
7956
7957 /* dataDirection */
7958 proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_data_direction, tvb, offset, 1, ENC_NA0x00000000, directionPtr);
7959 tap_info->uplink = ((*directionPtr)==0);
7960 /* payloadVersion */
7961 dissect_payload_version(timing_header_tree, tvb, pinfo, offset);
7962 /* filterIndex */
7963 proto_tree_add_item(timing_header_tree, hf_oran_filter_index, tvb, offset, 1, ENC_NA0x00000000);
7964 offset += 1;
7965
7966 int ref_a_offset = offset;
7967
7968 /* frameId */
7969 proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_frame_id, tvb, offset, 1, ENC_NA0x00000000, frameIdPtr);
7970 tap_info->frame = *frameIdPtr;
7971 offset += 1;
7972
7973 /* subframeId */
7974 proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_subframe_id, tvb, offset, 1, ENC_NA0x00000000, subframeIdPtr);
7975 /* slotId */
7976 proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_slot_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, slotIdPtr);
7977 tap_info->slot = *slotIdPtr;
7978 offset++;
7979 /* symbolId */
7980 proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_symbolId, tvb, offset, 1, ENC_NA0x00000000, symbolIdPtr);
7981 offset++;
7982
7983 char id[16];
7984 snprintf(id, 16, "%u-%u-%u-%u", *frameIdPtr, *subframeIdPtr, *slotIdPtr, *symbolIdPtr);
7985 proto_item *pi = proto_tree_add_string(timing_header_tree, hf_oran_refa, tvb, ref_a_offset, 3, id);
7986 proto_item_set_generated(pi);
7987
7988 proto_item_append_text(timingHeader, "%s, frameId: %d, subframeId: %d, slotId: %d, symbolId: %d)",
7989 val_to_str_const(*directionPtr, data_direction_vals, "Unknown"), *frameIdPtr, *subframeIdPtr, *slotIdPtr, *symbolIdPtr);
7990 return offset;
7991}
7992
7993/*
7994 dissect_oran_u_section_header()
7995 Mandatory Section Header fields (darker green part)
7996 Table 8.3.2-1, octets 13-16. Optional fields handled elsewhere.
7997 */
7998static int dissect_oran_u_section_header(tvbuff_t *tvb, packet_info *pinfo, unsigned offset,
7999 proto_tree * section_tree,
8000 oran_tap_info *tap_info,
8001 flow_result_t *result, flow_state_t *cplane_state,
8002 uint32_t frameId, uint32_t subframeId, uint32_t slotId, uint32_t symbolId,
8003 uint32_t direction, uint32_t * sectionIdPtr, uint32_t * rbPtr, uint32_t *startPrbuPtr, uint32_t *numPrbuPtr,
8004 section_details_t **section_details_ptr)
8005{
8006 proto_item *sectionId_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_section_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, sectionIdPtr);
8007 if (*sectionIdPtr == 4095) {
8008 proto_item_append_text(sectionId_ti, " (not default coupling C/U planes using sectionId)");
8009 }
8010 offset++;
8011
8012 if (tap_info->num_section_ids < MAX_SECTION_IDs32) {
8013 tap_info->section_ids[tap_info->num_section_ids++] = *sectionIdPtr;
8014 }
8015
8016 section_details_t *section_details = NULL((void*)0);
8017 corresponding_uplane_frame *details = NULL((void*)0);
8018
8019 /* Lookup corresponding C-plane frame/info */
8020 if (link_planes_together) {
8021 if (result && result->cplane_seen) {
8022
8023 expected_section_data_t *section_data = NULL((void*)0);
8024 section_data = wmem_tree_lookup32(result->expected_sections, *sectionIdPtr);
8025
8026 if (!section_data && !PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited) && cplane_state) {
8027 /* Take a deep-copy of the C-plane state for this sectionId on first pass */
8028 expected_section_data_t *cplane_data = wmem_tree_lookup32(cplane_state->expected_sections[direction],
8029 *sectionIdPtr);
8030 if (cplane_data) {
8031 /* Shallow copy is fine, see section_details_t */
8032 section_data = wmem_memdup(wmem_file_scope(), cplane_data, sizeof(expected_section_data_t));
8033 wmem_tree_insert32(result->expected_sections, *sectionIdPtr, section_data);
8034 }
8035 }
8036
8037 if (section_data) {
8038 /* Need to work out which of 2 entries is in use for this data frame */
8039 unsigned index_to_use = 0;
8040
8041 /* Does the first entry match the timing for this frame? */
8042 if (section_data->details[0].in_use &&
8043 section_data->details[0].frame == frameId &&
8044 section_data->details[0].subframe == subframeId &&
8045 section_data->details[0].slot == slotId &&
8046 /* Check that symbolId is in range */
8047 section_data->details[0].startSymbol <= symbolId &&
8048 (unsigned)symbolId < (unsigned)(section_data->details[0].startSymbol + section_data->details[0].numSymbols)) {
8049
8050 index_to_use = 0;
8051 }
8052 else if (section_data->details[1].in_use &&
8053 section_data->details[1].frame == frameId &&
8054 section_data->details[1].subframe == subframeId &&
8055 section_data->details[1].slot == slotId &&
8056 /* Check that symbolId is in range */
8057 section_data->details[1].startSymbol <= symbolId &&
8058 (unsigned)symbolId < (unsigned)(section_data->details[1].startSymbol + section_data->details[1].numSymbols)) {
8059
8060 index_to_use = 1;
8061 }
8062 else {
8063 /* There was a sectionId, but timing header didn't exactly match, so neither index may be used.. */
8064 index_to_use = 2; /* invalid value */
8065 /* Expert info */
8066 expert_add_info_format(NULL((void*)0), sectionId_ti,
8067 &ei_oran_cplane_entry_not_found,
8068 "C-plane entry for %s sectionId %u at timing header %u-%u-%u-%u"
8069 " timing didn't match C-plane",
8070 (direction) ? "DL" : "UL", *sectionIdPtr,
8071 frameId, subframeId, slotId, symbolId);
8072 }
8073
8074 if (index_to_use <= 1) {
8075 section_details = &section_data->details[index_to_use];
8076
8077 /* Cplane frame number */
8078 proto_item *cplane_frame_ti = proto_tree_add_uint(section_tree, hf_oran_corresponding_cplane_frame, tvb, 0, 0,
8079 section_details->frame_number);
8080 proto_item_set_generated(cplane_frame_ti);
8081
8082 /* usecs since cplane frame */
8083 time_t total_gap = 0;
8084
8085 if ((pinfo->abs_ts.secs == section_details->frame_time.secs) || (pinfo->abs_ts.secs == section_details->frame_time.secs+1)) {
8086 total_gap = ((pinfo->abs_ts.secs - section_details->frame_time.secs) * 1000000) +
8087 ((pinfo->abs_ts.nsecs - section_details->frame_time.nsecs)/1000);
8088 }
8089
8090 if (total_gap > 0) {
8091 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);
8092 proto_item_set_generated(cplane_delta_ti);
8093 }
8094
8095 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
8096 /* Look up 'result' for c-plane frame, and tell it about this frame.. */
8097 flow_result_t *cplane_result = wmem_tree_lookup32(flow_results_table, section_details->frame_number);
8098 if (!cplane_result) {
8099 cplane_result = wmem_new0(wmem_file_scope(), flow_result_t)((flow_result_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_result_t
)))
;
8100 cplane_result->u_plane_frames = wmem_list_new(wmem_file_scope());
8101 wmem_tree_insert32(flow_results_table, section_details->frame_number, cplane_result);
8102 }
8103 /* PRB range filled in below.. */
8104
8105 details = wmem_new(wmem_file_scope(), corresponding_uplane_frame)((corresponding_uplane_frame*)wmem_alloc((wmem_file_scope()),
sizeof(corresponding_uplane_frame)))
;
8106 details->frame_number = pinfo->num;
8107 details->gap_in_usecs = (uint32_t)total_gap;
8108 details->sectionId = *sectionIdPtr;
8109 details->symbol = symbolId;
8110
8111 wmem_list_append(cplane_result->u_plane_frames, details);
8112 }
8113 }
8114 }
8115 else {
8116 /* No section entry at all */
8117 expert_add_info_format(NULL((void*)0), sectionId_ti,
8118 &ei_oran_cplane_entry_not_found,
8119 "C-plane entry for %s sectionId %u not found",
8120 (direction) ? "DL" : "UL", *sectionIdPtr);
8121 }
8122 }
8123 }
8124
8125 /* rb */
8126 proto_tree_add_item_ret_uint(section_tree, hf_oran_rb, tvb, offset, 1, ENC_NA0x00000000, rbPtr);
8127 /* symInc. "use of symInc=1 shall be prohibited in the U-plane" */
8128 uint8_t syminc;
8129 proto_item *syminc_ti = proto_tree_add_item_ret_uint8(section_tree, hf_oran_symInc, tvb, offset, 1, ENC_NA0x00000000, &syminc);
8130 if (syminc) {
8131 expert_add_info(NULL((void*)0), syminc_ti, &ei_oran_syminc_set_for_uplane);
8132 }
8133 /* startPrbu */
8134 proto_tree_add_item_ret_uint(section_tree, hf_oran_startPrbu, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, startPrbuPtr);
8135 offset += 2;
8136
8137 /* numPrbu */
8138 proto_tree_add_item_ret_uint(section_tree, hf_oran_numPrbu, tvb, offset, 1, ENC_NA0x00000000, numPrbuPtr);
8139 offset += 1;
8140
8141 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited) && details) {
8142 details->startPrbu = *startPrbuPtr;
8143 details->numPrbu = (*numPrbuPtr) ? (*numPrbuPtr) : 273;
8144 }
8145
8146 *section_details_ptr = section_details;
8147 return offset;
8148}
8149
8150/* unscaled_power_correction computes correction required to rescale reported power in order to report dBFS */
8151static float unscaled_power_correction(int sample_bit_width, unsigned compression) {
8152 /* Logic for COMP_NONE and COMP_BLOCK_FP. No adjustment required for COMP_MODULATION */
8153 float correction = 0.0f;
8154 switch(compression) {
8155 case COMP_BLOCK_FP1:
8156 case BFP_AND_SELECTIVE_RE5:
8157 case BFP_AND_SELECTIVE_RE_WITH_MASKS7:
8158 correction = 20.0f*((float)(M_LOG10E0.43429448190325182765/M_LOG2E1.4426950408889634074))*((sample_bit_width-1) + 15);
8159 break;
8160 case COMP_NONE0:
8161 correction = 20.0f*((float)(M_LOG10E0.43429448190325182765/M_LOG2E1.4426950408889634074))*(sample_bit_width-1);
8162 break;
8163 default:
8164 break;
8165 }
8166 return correction;
8167}
8168
8169static int dissect_oran_u_section(tvbuff_t *tvb, packet_info *pinfo, unsigned offset,
8170 proto_tree * oran_tree,
8171 proto_item * protocol_item,
8172 oran_tap_info *tap_info,
8173 flow_state_t *state, flow_result_t *result, flow_state_t *cplane_state,
8174 uint32_t frameId, uint32_t subframeId, uint32_t slotId, uint32_t symbolId,
8175 uint32_t direction, int includeUdCompHeader, unsigned * sample_bit_width_ptr,
8176 unsigned compression, bool_Bool ud_cmp_hdr_cplane, unsigned *nBytesPerPrbPtr)
8177{
8178 /* Section subtree */
8179 unsigned section_start_offset = offset;
8180 proto_item *sectionHeading = proto_tree_add_string_format(oran_tree, hf_oran_u_section,
8181 tvb, offset, 0, "", "Section");
8182 proto_tree *section_tree = proto_item_add_subtree(sectionHeading, ett_oran_u_section);
8183 section_details_t *section_details = NULL((void*)0);
8184
8185 /* Total (section) power and peak power */
8186 float total_power = 0.0f;
8187 float peak_power = 0.0f;
8188 int peak_location = 0;
8189
8190 /* Section Header fields [fixed parts] (darker green part) */
8191 uint32_t sectionId = 0, rb, startPrbu = 0, numPrbu = 0;
8192
8193 offset = dissect_oran_u_section_header(tvb, pinfo, offset, section_tree, tap_info, result, cplane_state,
8194 frameId, subframeId, slotId, symbolId, direction, &sectionId, &rb, &startPrbu, &numPrbu,
8195 &section_details);
8196
8197 proto_item *ud_comp_meth_item, *ud_comp_len_ti=NULL((void*)0);
8198 uint32_t ud_comp_len = 0;
8199
8200 /* udCompHdr (if preferences indicate will be present) */
8201 bool_Bool included = (includeUdCompHeader==1) || /* 1 means present.. */
8202 (includeUdCompHeader==2 && udcomphdr_appears_present(state, direction, tvb, offset)); /* heuristic */
8203 bool_Bool udCompHdr_ignored = direction == 0 && pref_override_ul_compression; /* Ignore UL if configured to */
8204 if (included) {
8205 /* 7.5.2.10 */
8206 /* Extract these values to inform how wide IQ samples in each PRB will be. */
8207 offset = dissect_udcomphdr(tvb, pinfo, section_tree, offset, false0,
8208 udCompHdr_ignored,
8209 sample_bit_width_ptr,
8210 &compression, &ud_comp_meth_item, tap_info);
8211
8212 /* Not part of udCompHdr */
8213 uint32_t reserved;
8214 proto_item *res_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_NA0x00000000, &reserved);
8215 offset += 1;
8216 if (reserved != 0) {
8217 expert_add_info_format(pinfo, res_ti, &ei_oran_reserved_not_zero,
8218 "reserved field (0x%x) not zero - perhaps udCompHdr is not really present?",
8219 reserved);
8220 }
8221 }
8222
8223 if (!included || udCompHdr_ignored) {
8224 /* No fields to dissect - just showing comp values from prefs */
8225 /* iqWidth */
8226 proto_item *iq_width_item = proto_tree_add_uint(section_tree, hf_oran_udCompHdrIqWidth_pref, tvb, 0, 0, *sample_bit_width_ptr);
8227 proto_item_append_text(iq_width_item, (ud_cmp_hdr_cplane) ? " (from c-plane)" : " (from preferences)");
8228 proto_item_set_generated(iq_width_item);
8229
8230 /* udCompMethod */
8231 ud_comp_meth_item = proto_tree_add_uint(section_tree, hf_oran_udCompHdrMeth_pref, tvb, 0, 0, compression);
8232 proto_item_append_text(ud_comp_meth_item, (ud_cmp_hdr_cplane) ? " (from c-plane)" : " (from preferences)");
8233 proto_item_set_generated(ud_comp_meth_item);
8234
8235 /* Point back to C-Plane, if used */
8236 /* TODO: doesn't work with multiple port mappings using SE10.. */
8237 if (ud_cmp_hdr_cplane) {
8238 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);
8239 proto_item_set_generated(cplane_ti);
8240 }
8241
8242 /* Still adding these values to tap */
8243 tap_info->compression_methods |= (1 << compression);
8244 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
))
;
8245 }
8246
8247 /* Not supported! TODO: other places where comp method is looked up (e.g., bfw?) */
8248 switch (compression) {
8249 case COMP_NONE0:
8250 case COMP_BLOCK_FP1:
8251 case BFP_AND_SELECTIVE_RE5:
8252 case COMP_MODULATION4:
8253 case MOD_COMPR_AND_SELECTIVE_RE6:
8254 case BFP_AND_SELECTIVE_RE_WITH_MASKS7:
8255 case MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8:
8256 break;
8257 default:
8258 expert_add_info_format(pinfo, ud_comp_meth_item, &ei_oran_unsupported_compression_method,
8259 "Compression method %u (%s) not supported by dissector",
8260 compression,
8261 rval_to_str_const(compression, ud_comp_header_meth, "reserved"));
8262 }
8263
8264 /* udCompLen (when supported, methods 5,6,7,8) */
8265 if (compression >= BFP_AND_SELECTIVE_RE5) {
8266 bool_Bool supported = (pref_support_udcompLen==1) || /* supported */
8267 (pref_support_udcompLen==2 && udcomplen_appears_present(included, tvb, offset));
8268
8269 if (supported) {
8270 ud_comp_len_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_udCompLen, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ud_comp_len);
8271 if (ud_comp_len <= 1) {
8272 proto_item_append_text(ud_comp_len_ti, " (reserved)");
8273 }
8274 /* TODO: report if less than a viable section in frame? */
8275 /* Check that there is this much length left in the frame */
8276 if (ud_comp_len > tvb_reported_length_remaining(tvb, section_start_offset)) {
8277 expert_add_info_format(pinfo, ud_comp_len_ti, &ei_oran_ud_comp_len_wrong_size,
8278 "udCompLen indicates %u bytes in section, but only %u are left in frame",
8279 ud_comp_len, tvb_reported_length_remaining(tvb, section_start_offset));
8280 }
8281 /* Actual length of section will be checked below, at the end of the section */
8282 offset += 2;
8283 }
8284 }
8285
8286 /* sReSMask1 + sReSMask2 (depends upon compression method) */
8287 uint64_t sresmask1=0, sresmask2=0;
8288 if (compression == BFP_AND_SELECTIVE_RE_WITH_MASKS7 ||
8289 compression == MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8)
8290 {
8291 static int * const sres_mask1_2_flags[] = {
8292 &hf_oran_sReSMask1_2_re12,
8293 &hf_oran_sReSMask1_2_re11,
8294 &hf_oran_sReSMask1_2_re10,
8295 &hf_oran_sReSMask1_2_re9,
8296 &hf_oran_sReSMask_re8,
8297 &hf_oran_sReSMask_re7,
8298 &hf_oran_sReSMask_re6,
8299 &hf_oran_sReSMask_re5,
8300 &hf_oran_sReSMask_re4,
8301 &hf_oran_sReSMask_re3,
8302 &hf_oran_sReSMask_re2,
8303 &hf_oran_sReSMask_re1,
8304 NULL((void*)0)
8305 };
8306
8307 /* reserved (4 bits) */
8308 add_reserved_field(section_tree, hf_oran_reserved_4bits, tvb, offset, 1);
8309 /* sReSMask1 (12 bits) */
8310 proto_item *sresmask_ti;
8311 sresmask_ti = proto_tree_add_bitmask_ret_uint64(section_tree, tvb, offset,
8312 hf_oran_sReSMask1,
8313 ett_oran_sresmask,
8314 sres_mask1_2_flags,
8315 ENC_NA0x00000000,
8316 &sresmask1);
8317 offset += 2;
8318 /* Count REs present */
8319 unsigned res = 0;
8320 for (unsigned n=0; n < 12; n++) {
8321 if ((sresmask1 >> n) & 0x1) {
8322 res++;
8323 }
8324 }
8325 proto_item_append_text(sresmask_ti, " (%u REs)", res);
8326
8327
8328 /* reserved (4 bits) */
8329 add_reserved_field(section_tree, hf_oran_reserved_4bits, tvb, offset, 1);
8330 /* sReSMask2 (12 bits) */
8331 sresmask_ti = proto_tree_add_bitmask_ret_uint64(section_tree, tvb, offset,
8332 hf_oran_sReSMask2,
8333 ett_oran_sresmask,
8334 sres_mask1_2_flags,
8335 ENC_NA0x00000000,
8336 &sresmask2);
8337 offset += 2;
8338
8339 if (rb == 1) {
8340 proto_item_append_text(sresmask_ti, " (ignored)");
8341 if (sresmask2 != 0) {
8342 expert_add_info(pinfo, ud_comp_len_ti, &ei_oran_sresmask2_not_zero_with_rb);
8343 }
8344 }
8345 else {
8346 /* Count REs present */
8347 res = 0;
8348 for (unsigned n=0; n < 12; n++) {
8349 if ((sresmask2 >> n) & 0x1) {
8350 res++;
8351 }
8352 }
8353 proto_item_append_text(sresmask_ti, " (%u REs)", res);
8354 }
8355 }
8356
8357 write_section_info(sectionHeading, pinfo, protocol_item, sectionId, startPrbu, numPrbu, rb);
8358
8359 /* TODO: should this use the same pref as c-plane? */
8360 if (numPrbu == 0) {
8361 /* Special case for all PRBs (NR: the total number of PRBs may be > 255) */
8362 numPrbu = pref_data_plane_section_total_rbs;
8363 startPrbu = 0; /* may already be 0... */
8364 }
8365
8366 section_mod_compr_config_t* mod_compr_config = get_mod_compr_section_to_read(cplane_state, sectionId);
8367
8368 /* Add each PRB */
8369 for (unsigned i = 0; i < numPrbu; i++) {
8370 /* Create subtree */
8371 proto_item *prbHeading = proto_tree_add_string_format(section_tree, hf_oran_samples_prb,
8372 tvb, offset, 0,
8373 "", "PRB");
8374 proto_tree *rb_tree = proto_item_add_subtree(prbHeading, ett_oran_u_prb);
8375 uint32_t exponent = 0;
8376 uint16_t sresmask = 0;
8377
8378 /* udCompParam (depends upon compression method) */
8379 int before = offset;
8380 offset = dissect_udcompparam(tvb, pinfo, rb_tree, offset, compression, &exponent, &sresmask, false0);
8381 int udcompparam_len = offset-before;
8382
8383 /* Show PRB number in root */
8384 proto_item_append_text(prbHeading, " %3u", startPrbu + i*(1+rb));
8385
8386 /* Work out how many REs / PRB */
8387 unsigned res_per_prb = 12;
8388 uint16_t sresmask_to_use = 0x0fff;
8389 float rb_power = 0.0f;
8390
8391 if (compression >= BFP_AND_SELECTIVE_RE5) {
8392 /* Work out which mask should be used */
8393 if (compression==BFP_AND_SELECTIVE_RE5 || compression==MOD_COMPR_AND_SELECTIVE_RE6) {
8394 /* Selective RE cases, use value from compModParam */
8395 sresmask_to_use = (uint16_t)sresmask;
8396 }
8397 else {
8398 /* With masks (in section). Choose between sresmask1 and sresmask2 */
8399 if (rb==1 || (i%2)==0) {
8400 /* Even values */
8401 sresmask_to_use = (uint16_t)sresmask1;
8402 }
8403 else {
8404 /* Odd values */
8405 sresmask_to_use = (uint16_t)sresmask2;
8406 }
8407 }
8408
8409 /* Count REs present using sresmask */
8410 res_per_prb = 0;
8411 /* Use sresmask to pick out which REs are present */
8412 for (unsigned n=0; n<12; n++) {
8413 if (sresmask_to_use & (1<<n)) {
8414 res_per_prb++;
8415 }
8416 }
8417 }
8418
8419 /* N.B. bytes for samples need to be padded out to next byte
8420 (certainly where there aren't 12 REs in PRB..) */
8421 unsigned nBytesForSamples = ((*sample_bit_width_ptr) * res_per_prb * 2 + 7) / 8;
8422 *nBytesPerPrbPtr = nBytesForSamples + udcompparam_len;
8423
8424 proto_tree_add_item(rb_tree, hf_oran_iq_user_data, tvb, offset, nBytesForSamples, ENC_NA0x00000000);
8425
8426 if (section_details) {
8427 if ((startPrbu + i*(1+rb)) < 273) {
8428 proto_item *beamid_ti = proto_tree_add_uint(rb_tree, hf_oran_beamId, tvb, 0, 0,
8429 section_details_get_beam_id(section_details, startPrbu + i*(1+rb)));
8430 proto_item_set_generated(beamid_ti);
8431 }
8432 }
8433
8434
8435 tap_info->non_zero_re_in_current_prb = false0;
8436
8437 /* Optionally trying to show I/Q RE values */
8438 if (pref_showIQSampleValues) {
8439 /* Individual values */
8440 unsigned samples_offset = offset*8;
8441 unsigned samples_start = offset;
8442 unsigned samples = 0;
8443
8444 float re_power = 0.0f;
8445 if (compression >= BFP_AND_SELECTIVE_RE5) {
8446 /* Use sresmask to pick out which REs are present */
8447 for (unsigned n=1; n<=12; n++) {
8448 if (sresmask_to_use & (1<<(n-1))) {
8449 int new_samples_offset =
8450 dissect_oran_u_re(tvb, rb_tree, n, samples_offset, tap_info, *sample_bit_width_ptr,
8451 compression, exponent, mod_compr_config, n, &re_power);
8452 rb_power += re_power;
8453 if ( re_power > peak_power ) {
8454 peak_power = re_power;
8455 peak_location = samples_offset;
8456 }
8457 samples_offset = new_samples_offset;
8458 samples++;
8459 }
8460 }
8461 }
8462 else {
8463 /* All 12 REs are present */
8464 for (unsigned n=1; n<=12; n++) {
8465 int new_samples_offset =
8466 dissect_oran_u_re(tvb, rb_tree, n, samples_offset, tap_info, *sample_bit_width_ptr,
8467 compression, exponent, mod_compr_config, n, &re_power);
8468 rb_power += re_power;
8469 if ( re_power > peak_power ) {
8470 peak_power = re_power;
8471 peak_location = samples_offset;
8472 }
8473 samples_offset = new_samples_offset;
8474 samples++;
8475 }
8476 }
8477 proto_item_append_text(prbHeading, " (%u REs)", samples);
8478 if (section_details) {
8479 if ((startPrbu + i*(1+rb)) < 273) {
8480 proto_item_append_text(prbHeading, " [BeamId:%u]", section_details_get_beam_id(section_details, startPrbu + i*(1+rb)));
8481 }
8482 }
8483
8484 /* Was this PRB all zeros? */
8485 if (!tap_info->non_zero_re_in_current_prb) {
8486 tap_info->num_prbs_zero++;
8487 /* Add a filter to make zero-valued PRBs more findable */
8488 proto_item *zero_ti = proto_tree_add_item(rb_tree, hf_oran_zero_prb, tvb,
8489 samples_start, nBytesForSamples, ENC_NA0x00000000);
8490 proto_item_set_hidden(zero_ti);
8491 proto_item_append_text(prbHeading, " (all zeros)");
8492 }
8493 else {
8494 proto_item *nonzero_ti = proto_tree_add_item(rb_tree, hf_oran_nonzero_prb, tvb, samples_start, nBytesForSamples, ENC_NA0x00000000);
8495 proto_item_set_hidden(nonzero_ti);
8496 }
8497 if (rb_power > 0.0f ) {
8498 /* Zero bit pattern does not infer zero power (see modComp) */
8499 rb_power = rb_power/samples;
8500 total_power += rb_power;
8501 float rb_power_dB = (float) (10.0*log10(rb_power));
8502 if ( show_unscaled_values ) {
8503 rb_power_dB = rb_power_dB - unscaled_power_correction(*sample_bit_width_ptr,compression);
8504 }
8505 proto_item_append_text(prbHeading, " [%3.2f dBFS]", rb_power_dB);
8506 proto_item * rb_power_ti = proto_tree_add_float(rb_tree, hf_oran_u_prb_power, tvb, samples_start, nBytesForSamples, rb_power_dB);
8507 proto_item_set_generated(rb_power_ti);
8508 }
8509 }
8510
8511 tap_info->num_prbs++;
8512
8513
8514 /* Advance past samples */
8515 offset += nBytesForSamples;
8516
8517 /* Set end of prb subtree */
8518 proto_item_set_end(prbHeading, tvb, offset);
8519 }
8520
8521 /* Set extent of section */
8522 proto_item_set_len(sectionHeading, offset-section_start_offset);
8523 if (ud_comp_len_ti != NULL((void*)0) && ((offset-section_start_offset != ud_comp_len))) {
8524 expert_add_info_format(pinfo, ud_comp_len_ti, &ei_oran_ud_comp_len_wrong_size,
8525 "udCompLen indicates %u bytes in section, but dissected %u instead",
8526 ud_comp_len, offset-section_start_offset);
8527 }
8528 /* Show total power: average over full bandwidth */
8529 if ( pref_showIQSampleValues ) {
8530 if ( total_power > 0.0f ) {
8531 float power_dBFS = (float)(10.0*log10(total_power/numPrbu));
8532 if ( show_unscaled_values ) {
8533 power_dBFS = power_dBFS - unscaled_power_correction(*sample_bit_width_ptr,compression);
8534 }
8535 proto_item *ti = proto_tree_add_float(section_tree, hf_oran_u_total_power, tvb, section_start_offset, offset-section_start_offset, power_dBFS);
8536 proto_item_set_generated(ti);
8537 proto_item_append_text(sectionHeading, " [Mean Power %3.2f dBFS]", power_dBFS);
8538 } else {
8539 proto_item_append_text(sectionHeading, " [all zeros]");
8540 }
8541
8542 if ( peak_power > 0.0 ) {
8543 float peak_to_average = peak_power / ((total_power/numPrbu));
8544 peak_to_average = (float) (10.0*log10(peak_to_average));
8545 unsigned sample_size = (peak_location + 2*(*sample_bit_width_ptr) + 7)/8 - peak_location/8;
8546 proto_item *ti = proto_tree_add_float(section_tree, hf_oran_u_peak_power, tvb, peak_location/8, sample_size, peak_to_average);
8547 proto_item_set_generated(ti);
8548 }
8549 }
8550 return offset;
8551}
8552
8553/* User plane dissector (section 8) */
8554static int
8555dissect_oran_u(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
8556 oran_tap_info *tap_info, void *data _U___attribute__((unused)))
8557{
8558 /* Hidden filter for plane */
8559 proto_item *plane_ti = proto_tree_add_item(tree, hf_oran_uplane, tvb, 0, 0, ENC_NA0x00000000);
8560 PROTO_ITEM_SET_HIDDEN(plane_ti)proto_item_set_hidden((plane_ti));
8561
8562 /* Set up structures needed to add the protocol subtree and manage it */
8563 unsigned offset = 0;
8564
8565 col_set_str(pinfo->cinfo, COL_PROTOCOL, "O-RAN-FH-U");
8566 col_set_str(pinfo->cinfo, COL_INFO, "U-Plane");
8567
8568 tap_info->userplane = true1;
8569
8570 /* Create display subtree for the protocol */
8571 proto_item *protocol_item = proto_tree_add_item(tree, proto_oran, tvb, 0, -1, ENC_NA0x00000000);
8572 proto_item_append_text(protocol_item, "-U");
8573 proto_tree *oran_tree = proto_item_add_subtree(protocol_item, ett_oran);
8574
8575 /* Transport header */
8576 /* Real-time control data / IQ data transfer message series identifier */
8577 uint16_t eAxC;
8578 addPcOrRtcid(tvb, oran_tree, &offset, hf_oran_ecpri_pcid, &eAxC, tap_info);
8579 tap_info->eaxc = eAxC;
8580
8581 /* Update/report status of conversation */
8582 flow_state_t* state = lookup_flow(pinfo, eAxC, ORAN_U_PLANE1, false0);
8583
8584 flow_result_t *result = NULL((void*)0);
8585
8586 /* Message identifier */
8587 proto_item *seqIdItem;
8588 uint32_t seqId, subSeqId, e;
8589 offset = addSeqid(tvb, oran_tree, offset, ORAN_U_PLANE1, &seqId, &seqIdItem, &subSeqId, &e);
8590
8591 uint32_t frameId = 0, subframeId = 0, slotId = 0, symbolId = 0, direction = 0;
8592
8593 /* Add buffer to the reassembly ahead of cycling through the options */
8594 if (do_radio_transport_layer_reassembly && (e !=1 || subSeqId!= 0)) {
8595 /* Set fragmented flag. */
8596 bool_Bool save_fragmented = pinfo->fragmented;
8597 pinfo->fragmented = true1;
8598 fragment_head *fh;
8599 unsigned frag_data_len = tvb_reported_length_remaining(tvb, offset);
8600
8601 /* Add this fragment into reassembly table */
8602 /* In the absence of information from the header [might not be present], use the MAC addresses. */
8603 int dir = cmp_address(&pinfo->src, &pinfo->dst)>0;
8604 uint32_t reassembly_id = make_reassembly_id(seqId, eAxC, dir);
8605 fh = fragment_add_seq(&oran_reassembly_table, tvb, offset, pinfo,
8606 reassembly_id, /* id */
8607 GUINT_TO_POINTER(reassembly_id)((gpointer) (gulong) (reassembly_id)), /* data */
8608 subSeqId, /* frag_number */
8609 frag_data_len, /* frag_data_len */
8610 !e, /* more_frags */
8611 0);
8612
8613 bool_Bool update_col_info = true1;
8614
8615 /* See if this completes an SDU */
8616 tvbuff_t *original_tvb = tvb;
8617 tvbuff_t *next_tvb = process_reassembled_data(tvb, offset, pinfo, "Reassembled O-RAN FH CUS Payload",
8618 fh, &oran_frag_items,
8619 &update_col_info, oran_tree);
8620 if (next_tvb) {
8621 /* Have reassembled data */
8622 proto_tree_add_item(oran_tree, hf_oran_payload, next_tvb, 0, -1, ENC_NA0x00000000);
8623 col_append_fstr(pinfo->cinfo, COL_INFO, " Reassembled Data (%u bytes)", tvb_reported_length(next_tvb));
8624 }
8625 /* Will continue with either reassembled tvb or NULL */
8626 tvb = next_tvb;
8627
8628 /* Restore fragmented flag */
8629 pinfo->fragmented = save_fragmented;
8630
8631 /* Don't dissect any more if not complete yet.. */
8632 if (tvb == NULL((void*)0)) {
8633 /* For subseq=0 it's possible to do a partial decode to display the timing header
8634 and first section header, but not much more */
8635 if ( subSeqId == 0 ) {
8636 if ( tvb_reported_length_remaining(original_tvb, offset) >= 4 ) {
8637 proto_item * timingHeader = proto_tree_add_string_format(oran_tree, hf_oran_timing_header,
8638 original_tvb, offset, 4, "", "Timing Header (");
8639 offset = dissect_oran_u_timing_header(original_tvb, pinfo, offset, timingHeader, tap_info, &frameId, &subframeId, &slotId, &symbolId, &direction);
8640
8641 if ( tvb_reported_length_remaining(original_tvb, offset) >= 4 ) {
8642 uint32_t sectionId, rb, startPrbu, numPrbu;
8643 section_details_t *section_details = NULL((void*)0);
8644 proto_item *sectionHeading = proto_tree_add_string_format(oran_tree, hf_oran_u_section,
8645 original_tvb, offset, 0, "", "Section");
8646 proto_tree *section_tree = proto_item_add_subtree(sectionHeading, ett_oran_u_section);
8647
8648 /* No C-plane linking for a partial decode */
8649 offset = dissect_oran_u_section_header(original_tvb, pinfo, offset, section_tree, tap_info, NULL((void*)0), NULL((void*)0),
8650 frameId, subframeId, slotId, symbolId, direction, &sectionId, &rb,
8651 &startPrbu, &numPrbu, &section_details);
8652 }
8653 }
8654 }
8655 return tvb_captured_length(original_tvb);
8656 }
8657 offset = 0; /* This sorts out the reading of the timing header and the first section header */
8658 }
8659
8660 proto_item * timingHeader = proto_tree_add_string_format(oran_tree, hf_oran_timing_header,
8661 tvb, offset, 4, "", "Timing Header (");
8662 offset = dissect_oran_u_timing_header(tvb, pinfo, offset, timingHeader, tap_info, &frameId, &subframeId, &slotId, &symbolId, &direction);
8663
8664 unsigned sample_bit_width;
8665 unsigned compression;
8666 int includeUdCompHeader;
8667
8668 /* Also lookup C-PLANE state (sent in opposite direction for UL) so may check current compression settings */
8669 flow_state_t* cplane_state = lookup_flow(pinfo, eAxC, ORAN_C_PLANE0, direction == 0);
8670
8671 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
8672 /* Create state/conversation if doesn't exist yet */
8673 if (!state) {
8674 /* Allocate new state */
8675 state = wmem_new0(wmem_file_scope(), flow_state_t)((flow_state_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_state_t
)))
;
8676 state->ack_nack_requests = wmem_tree_new(wmem_file_scope());
8677 state->expected_sections[0] = wmem_tree_new(wmem_file_scope());
8678 state->expected_sections[1] = wmem_tree_new(wmem_file_scope());
8679 store_flow(pinfo, eAxC, ORAN_U_PLANE1, false0, state);
8680 }
8681
8682 result = wmem_new0(wmem_file_scope(), flow_result_t)((flow_result_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_result_t
)))
;
8683 result->expected_sections = wmem_tree_new(wmem_file_scope());
8684 result->u_plane_frames = wmem_list_new(wmem_file_scope());
8685 result->cplane_seen = (cplane_state != NULL((void*)0));
8686
8687 wmem_tree_insert32(flow_results_table, pinfo->num, result);
8688
8689 /* Check sequence analysis status (but not if later part of radio layer fragmentation) */
8690 if (state->last_frame_seen[direction] && (subSeqId==0) && (seqId != state->next_expected_sequence_number[direction])) {
8691 /* Store this result */
8692 result->unexpected_seq_number = true1;
8693 result->expected_sequence_number = state->next_expected_sequence_number[direction];
8694 result->previous_frame = state->last_frame[direction];
8695 }
8696 /* Update sequence analysis state */
8697 state->last_frame[direction] = pinfo->num;
8698 state->last_frame_seen[direction] = true1;
8699 state->next_expected_sequence_number[direction] = (seqId+1) % 256;
8700 }
8701
8702 /* Show any issues associated with this frame number */
8703 result = wmem_tree_lookup32(flow_results_table, pinfo->num);
8704 if (result) {
8705 if (result->unexpected_seq_number) {
8706 expert_add_info_format(pinfo, seqIdItem,
8707 (direction == DIR_UPLINK0) ?
8708 &ei_oran_uplane_unexpected_sequence_number_ul :
8709 &ei_oran_uplane_unexpected_sequence_number_dl,
8710 "Sequence number %u expected, but got %u",
8711 result->expected_sequence_number, seqId);
8712 tap_info->missing_sns = (256 + seqId - result->expected_sequence_number) % 256;
8713
8714 /* Show link back to previous frame in stream */
8715 proto_item *prev_ti = proto_tree_add_uint(proto_item_get_subtree(proto_item_get_parent(seqIdItem)),
8716 hf_oran_previous_frame, tvb, 0, 0, result->previous_frame);
8717 proto_item_set_generated(prev_ti);
8718 }
8719 }
8720
8721 /* Checking UL timing within current slot. Disabled if limit set to 0. */
8722 /* N.B., timing is relative to first seen frame,
8723 not some notion of the beginning of the slot from sync, offset by some timing.. */
8724 if (direction == DIR_UPLINK0 && us_allowed_for_ul_in_symbol > 0) {
8725 uint32_t timing_key = get_timing_key(frameId, subframeId, slotId, symbolId);
8726 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
8727 /* Set state on first pass */
8728 ul_timing_for_slot* timing = (ul_timing_for_slot*)wmem_tree_lookup32(ul_symbol_timing, timing_key);
8729 if (!timing) {
8730 /* Allocate new state */
8731 timing = wmem_new0(wmem_file_scope(), ul_timing_for_slot)((ul_timing_for_slot*)wmem_alloc0((wmem_file_scope()), sizeof
(ul_timing_for_slot)))
;
8732 timing->first_frame = pinfo->num;
8733 timing->first_frame_time = pinfo->abs_ts;
8734 timing->frames_seen_in_symbol = 1;
8735 timing->last_frame_in_symbol = pinfo->num;
8736 wmem_tree_insert32(ul_symbol_timing, timing_key, timing);
8737 }
8738 else {
8739 /* Update existing state */
8740 timing->frames_seen_in_symbol++;
8741 timing->last_frame_in_symbol = pinfo->num;
8742 }
8743 }
8744 else {
8745 /* Subsequent passes - look up result */
8746 ul_timing_for_slot* timing = (ul_timing_for_slot*)wmem_tree_lookup32(ul_symbol_timing, timing_key);
8747 if (timing) { /* Really shouldn't fail! */
8748 if (timing->frames_seen_in_symbol > 1) {
8749 /* Work out gap between frames (in microseconds) back to frame carrying first seen symbol */
8750 uint32_t total_gap = time_gap(&pinfo->abs_ts, &timing->first_frame_time, 1000);
8751
8752 /* Show how long it has been */
8753 proto_item *ti = NULL((void*)0);
8754 if (pinfo->num != timing->first_frame) {
8755 ti = proto_tree_add_uint(timingHeader, hf_oran_u_section_ul_symbol_time, tvb, 0, 0, total_gap);
8756 proto_item_set_generated(ti);
8757 }
8758
8759 if (total_gap > us_allowed_for_ul_in_symbol) {
8760 expert_add_info_format(pinfo, ti, &ei_oran_ul_uplane_symbol_too_long,
8761 "UL U-Plane Tx took longer (%u\u03bcs) than limit set in preferences (%u\u03bcs)",
8762 total_gap, us_allowed_for_ul_in_symbol);
8763 proto_item_append_text(timingHeader, " (%u\u03bcs since first frame seen for symbol)", total_gap);
8764 }
8765
8766 /* Show how many frames were received */
8767 ti = proto_tree_add_uint(timingHeader, hf_oran_u_section_ul_symbol_frames, tvb, 0, 0, timing->frames_seen_in_symbol);
8768 proto_item_set_generated(ti);
8769
8770 /* Link to first frame for this symbol */
8771 if (pinfo->num != timing->first_frame) {
8772 ti = proto_tree_add_uint(timingHeader, hf_oran_u_section_ul_symbol_first_frame, tvb, 0, 0, timing->first_frame);
8773 proto_item_set_generated(ti);
8774 }
8775
8776 /* And also last frame */
8777 if (pinfo->num != timing->last_frame_in_symbol) {
8778 ti = proto_tree_add_uint(timingHeader, hf_oran_u_section_ul_symbol_last_frame, tvb, 0, 0, timing->last_frame_in_symbol);
8779 proto_item_set_generated(ti);
8780 }
8781
8782 tap_info->ul_delay_in_us = total_gap;
8783 }
8784 }
8785 }
8786 }
8787
8788
8789 /* Look up preferences for samples */
8790 if (direction == DIR_UPLINK0) {
8791 sample_bit_width = pref_sample_bit_width_uplink;
8792 compression = pref_iqCompressionUplink;
8793 includeUdCompHeader = pref_includeUdCompHeaderUplink;
8794 }
8795 else {
8796 sample_bit_width = pref_sample_bit_width_downlink;
8797 compression = pref_iqCompressionDownlink;
8798 includeUdCompHeader = pref_includeUdCompHeaderDownlink;
8799 }
8800
8801 /* If uplink, load any udCompHdr settings written by C-Plane */
8802 bool_Bool ud_cmp_hdr_cplane = false0;
8803 if (result && direction == 0) {
8804 /* On first pass, keep the settings the C-Plane has written so far */
8805 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited) && cplane_state && cplane_state->ul_ud_comp_hdr_set) {
8806 result->ul_ud_comp_hdr_set = true1;
8807 result->ul_ud_comp_hdr_bit_width = cplane_state->ul_ud_comp_hdr_bit_width;
8808 result->ul_ud_comp_hdr_compression = cplane_state->ul_ud_comp_hdr_compression;
8809 result->ul_ud_comp_hdr_frame = cplane_state->ul_ud_comp_hdr_frame;
8810 }
8811 /* Initialise settings from udpCompHdr from C-Plane */
8812 if (result->ul_ud_comp_hdr_set && !pref_override_ul_compression) {
8813 sample_bit_width = result->ul_ud_comp_hdr_bit_width;
8814 compression = result->ul_ud_comp_hdr_compression;
8815 ud_cmp_hdr_cplane = true1;
8816 }
8817 }
8818
8819 /* Need a valid value (e.g. 9, 14). 0 definitely won't work, as won't progress around loop! */
8820 /* N.B. may yet be overwritten by udCompHdr settings in sections below! */
8821 if (sample_bit_width == 0 || sample_bit_width > 16) {
8822 expert_add_info_format(pinfo, protocol_item, &ei_oran_invalid_sample_bit_width,
8823 "%cL Sample bit width from %s (%u) not valid, so can't decode sections",
8824 (direction == DIR_UPLINK0) ? 'U' : 'D',
8825 !ud_cmp_hdr_cplane ? "preference" : "C-Plane",
8826 sample_bit_width);
8827 return offset;
8828 }
8829
8830 unsigned bytesLeft;
8831 unsigned number_of_sections = 0;
8832 unsigned nBytesPerPrb =0;
8833
8834 /* Add each section (not from count, just keep parsing until payload used) */
8835 do {
8836 offset = dissect_oran_u_section(tvb, pinfo, offset, oran_tree, protocol_item, tap_info, state, result, cplane_state,
8837 frameId, subframeId, slotId, symbolId, direction, includeUdCompHeader,
8838 &sample_bit_width, compression, ud_cmp_hdr_cplane, &nBytesPerPrb);
8839 bytesLeft = tvb_captured_length(tvb) - offset;
8840 number_of_sections++;
8841 } while (bytesLeft >= 4); /* eCPRI payload ends after the sections and 0-3 bytes of padding */
8842
8843 /* Show number of sections found */
8844 proto_item *ti = proto_tree_add_uint(oran_tree, hf_oran_numberOfSections, tvb, 0, 0, number_of_sections);
8845 proto_item_set_generated(ti);
8846
8847 return tvb_captured_length(tvb);
8848}
8849
8850
8851/**********************************************************************/
8852/* Main dissection function. */
8853/* N.B. ecpri message type passed in as 'data' arg by eCPRI dissector */
8854static int
8855dissect_oran(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
8856{
8857 if (data == NULL((void*)0)) {
8858 return 0;
8859 }
8860 uint32_t ecpri_message_type = *(uint32_t *)data;
8861 unsigned offset = 0;
8862
8863 /* Allocate and zero tap struct */
8864 oran_tap_info *tap_info = wmem_new0(pinfo->pool, oran_tap_info)((oran_tap_info*)wmem_alloc0((pinfo->pool), sizeof(oran_tap_info
)))
;
8865 tap_info->pdu_size = pinfo->fd->pkt_len;
8866 tap_info->ul_delay_configured_max = us_allowed_for_ul_in_symbol;
8867
8868 switch (ecpri_message_type) {
8869 case ECPRI_MT_IQ_DATA0:
8870 offset = dissect_oran_u(tvb, pinfo, tree, tap_info, data);
8871 break;
8872 case ECPRI_MT_RT_CTRL_DATA2:
8873 offset = dissect_oran_c(tvb, pinfo, tree, tap_info, data);
8874 break;
8875 default:
8876 /* Not dissecting other types - assume these are handled by eCPRI dissector */
8877 return 0;
8878 }
8879
8880 tap_queue_packet(oran_tap, pinfo, tap_info);
8881
8882 return offset;
8883}
8884
8885static void oran_init_protocol(void)
8886{
8887 udcomplen_heuristic_result_set = false0;
8888 udcomplen_heuristic_result = false0;
8889}
8890
8891
8892/* Register the protocol with Wireshark. */
8893void
8894proto_register_oran(void)
8895{
8896 static hf_register_info hf[] = {
8897
8898 /* Section 5.1.3.2.7 */
8899 { &hf_oran_du_port_id,
8900 { "DU Port ID", "oran_fh_cus.du_port_id",
8901 FT_UINT16, BASE_DEC,
8902 NULL((void*)0), 0x0,
8903 "Processing unit at O-RU - width set in dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8904 },
8905
8906 /* Section 5.1.3.2.7 */
8907 { &hf_oran_bandsector_id,
8908 { "BandSector ID", "oran_fh_cus.bandsector_id",
8909 FT_UINT16, BASE_DEC,
8910 NULL((void*)0), 0x0,
8911 "Aggregated cell identified - width set in dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8912 },
8913
8914 /* Section 5.1.3.2.7 */
8915 { &hf_oran_cc_id,
8916 { "CC ID", "oran_fh_cus.cc_id",
8917 FT_UINT16, BASE_DEC,
8918 NULL((void*)0), 0x0,
8919 "Component Carrier - width set in dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8920 },
8921
8922 /* Section 5.1.3.2.7 */
8923 { &hf_oran_ru_port_id,
8924 { "RU Port ID", "oran_fh_cus.ru_port_id",
8925 FT_UINT16, BASE_DEC,
8926 NULL((void*)0), 0x0,
8927 "Logical flow - width set in dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8928 },
8929
8930 /* Section 5.1.3.2.8 */
8931 { &hf_oran_sequence_id,
8932 { "Sequence ID", "oran_fh_cus.sequence_id",
8933 FT_UINT8, BASE_DEC,
8934 NULL((void*)0), 0x0,
8935 "The Sequence ID wraps around individually per eAxC", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8936 },
8937
8938 /* Section 5.1.3.2.8 */
8939 { &hf_oran_e_bit,
8940 { "E Bit", "oran_fh_cus.e_bit",
8941 FT_UINT8, BASE_DEC,
8942 VALS(e_bit)((0 ? (const struct _value_string*)0 : ((e_bit)))), 0x80,
8943 "Indicate the last message of a subsequence (U-Plane only)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8944 },
8945
8946 /* Section 5.1.3.2.8 */
8947 { &hf_oran_subsequence_id,
8948 { "Subsequence ID", "oran_fh_cus.subsequence_id",
8949 FT_UINT8, BASE_DEC,
8950 NULL((void*)0), 0x7f,
8951 "The subsequence ID (for eCPRI layer fragmentation)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8952 },
8953
8954 { &hf_oran_previous_frame,
8955 { "Previous frame in stream", "oran_fh_cus.previous-frame",
8956 FT_FRAMENUM, BASE_NONE,
8957 FRAMENUM_TYPE(FT_FRAMENUM_NONE)((gpointer) (glong) (FT_FRAMENUM_NONE)), 0x0,
8958 "Previous frame in sequence", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8959 },
8960
8961 /* Section 7.5.2.1 */
8962 { &hf_oran_data_direction,
8963 { "Data Direction", "oran_fh_cus.data_direction",
8964 FT_UINT8, BASE_DEC,
8965 VALS(data_direction_vals)((0 ? (const struct _value_string*)0 : ((data_direction_vals)
)))
, 0x80,
8966 "gNB data direction", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8967 },
8968
8969 /* Section 7.5.2.2 */
8970 { &hf_oran_payload_version,
8971 { "Payload Version", "oran_fh_cus.payloadVersion",
8972 FT_UINT8, BASE_DEC,
8973 NULL((void*)0), 0x70,
8974 "Payload protocol version the following IEs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8975 },
8976
8977 /* Section 7.5.2.3 */
8978 { &hf_oran_filter_index,
8979 { "Filter Index", "oran_fh_cus.filterIndex",
8980 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
8981 RVALS(filter_indices)((0 ? (const struct _range_string*)0 : ((filter_indices)))), 0x0f,
8982 "used between IQ data and air interface, both in DL and UL", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8983 },
8984
8985 /* Section 7.5.2.4 */
8986 { &hf_oran_frame_id,
8987 { "Frame ID", "oran_fh_cus.frameId",
8988 FT_UINT8, BASE_DEC,
8989 NULL((void*)0), 0x0,
8990 "A counter for 10 ms frames (wrapping period 2.56 seconds)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8991 },
8992
8993 /* Section 7.5.2.5 */
8994 { &hf_oran_subframe_id,
8995 { "Subframe ID", "oran_fh_cus.subframe_id",
8996 FT_UINT8, BASE_DEC,
8997 NULL((void*)0), 0xf0,
8998 "A counter for 1 ms sub-frames within 10ms frame", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8999 },
9000
9001 /* Section 7.5.2.6 */
9002 { &hf_oran_slot_id,
9003 { "Slot ID", "oran_fh_cus.slotId",
9004 FT_UINT16, BASE_DEC,
9005 NULL((void*)0), 0x0fc0,
9006 "Slot number within a 1ms sub-frame", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9007 },
9008
9009 /* Generated for convenience */
9010 { &hf_oran_slot_within_frame,
9011 { "Slot within frame", "oran_fh_cus.slot-within-frame",
9012 FT_UINT16, BASE_DEC,
9013 NULL((void*)0), 0x0,
9014 "Slot within frame, to match DCT logs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9015 },
9016
9017 /* Section 7.5.2.7 */
9018 { &hf_oran_start_symbol_id,
9019 { "Start Symbol ID", "oran_fh_cus.startSymbolId",
9020 FT_UINT8, BASE_DEC,
9021 NULL((void*)0), 0x3f,
9022 "The first symbol number within slot affected", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9023 },
9024
9025 /* Section 7.5.2.8 */
9026 { &hf_oran_numberOfSections,
9027 { "Number of Sections", "oran_fh_cus.numberOfSections",
9028 FT_UINT8, BASE_DEC,
9029 NULL((void*)0), 0x0,
9030 "The number of section IDs included in this message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9031 },
9032
9033 /* Section 7.5.2.9 */
9034 { &hf_oran_sectionType,
9035 { "Section Type", "oran_fh_cus.sectionType",
9036 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
9037 RVALS(section_types)((0 ? (const struct _range_string*)0 : ((section_types)))), 0x0,
9038 "Determines the characteristics of U-plane data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9039 },
9040
9041 /* Section 7.5.2.10 */
9042 { &hf_oran_udCompHdr,
9043 { "udCompHdr", "oran_fh_cus.udCompHdr",
9044 FT_STRING, BASE_NONE,
9045 NULL((void*)0), 0x0,
9046 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9047 },
9048
9049 /* Section 7.5.2.11 */
9050 { &hf_oran_numberOfUEs,
9051 { "Number Of UEs", "oran_fh_cus.numberOfUEs",
9052 FT_UINT8, BASE_DEC,
9053 NULL((void*)0), 0x0,
9054 "Indicates number of UEs for which channel info is provided", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9055 },
9056
9057 /* Section 7.5.2.12 */
9058 { &hf_oran_timeOffset,
9059 { "Time Offset", "oran_fh_cus.timeOffset",
9060 FT_UINT16, BASE_DEC,
9061 NULL((void*)0), 0x0,
9062 "from start of the slot to start of CP in samples", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9063 },
9064
9065 /* Section 7.5.2.13 */
9066 { &hf_oran_frameStructure_fft,
9067 { "FFT Size", "oran_fh_cus.frameStructure.fft",
9068 FT_UINT8, BASE_HEX | BASE_RANGE_STRING0x00000100,
9069 RVALS(frame_structure_fft)((0 ? (const struct _range_string*)0 : ((frame_structure_fft)
)))
, 0xf0,
9070 "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) }
9071 },
9072
9073 /* Section 7.5.2.13 */
9074 { &hf_oran_frameStructure_subcarrier_spacing,
9075 { "Subcarrier Spacing", "oran_fh_cus.frameStructure.spacing",
9076 FT_UINT8, BASE_HEX | BASE_RANGE_STRING0x00000100,
9077 RVALS(subcarrier_spacings)((0 ? (const struct _range_string*)0 : ((subcarrier_spacings)
)))
, 0x0f,
9078 "The sub carrier spacing as well as the number of slots per 1ms sub-frame",
9079 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
9080 },
9081
9082 /* Section 7.5.2.14 */
9083 { &hf_oran_cpLength,
9084 { "cpLength", "oran_fh_cus.cpLength",
9085 FT_UINT16, BASE_DEC,
9086 NULL((void*)0), 0x0,
9087 "cyclic prefix length", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9088 },
9089
9090 { &hf_oran_timing_header,
9091 { "Timing Header", "oran_fh_cus.timingHeader",
9092 FT_STRING, BASE_NONE,
9093 NULL((void*)0), 0x0,
9094 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9095 },
9096
9097 /* Section 7.5.3.1 */
9098 { &hf_oran_section_id,
9099 { "sectionId", "oran_fh_cus.sectionId",
9100 FT_UINT16, BASE_DEC,
9101 NULL((void*)0), 0xfff0,
9102 "section identifier of data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9103 },
9104
9105 /* Section 7.5.3.2 */
9106 { &hf_oran_rb,
9107 { "rb", "oran_fh_cus.rb",
9108 FT_UINT8, BASE_DEC,
9109 VALS(rb_vals)((0 ? (const struct _value_string*)0 : ((rb_vals)))), 0x08,
9110 "resource block indicator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9111 },
9112
9113 /* Section 7.5.5.3 */
9114 { &hf_oran_symInc,
9115 { "symInc", "oran_fh_cus.symInc",
9116 FT_UINT8, BASE_DEC,
9117 VALS(sym_inc_vals)((0 ? (const struct _value_string*)0 : ((sym_inc_vals)))), 0x04,
9118 "Symbol Number Increment Command", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9119 },
9120
9121 /* Section 7.5.3.4 */
9122 { &hf_oran_startPrbc,
9123 { "startPrbc", "oran_fh_cus.startPrbc",
9124 FT_UINT16, BASE_DEC,
9125 NULL((void*)0), 0x03ff,
9126 "Starting PRB of Control Plane Section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9127 },
9128
9129 /* Section 7.5.3.5 */
9130 { &hf_oran_reMask_re1,
9131 { "RE 1", "oran_fh_cus.reMask-RE1",
9132 FT_BOOLEAN, 16,
9133 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x8000,
9134 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9135 },
9136 { &hf_oran_reMask_re2,
9137 { "RE 2", "oran_fh_cus.reMask-RE2",
9138 FT_BOOLEAN, 16,
9139 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x4000,
9140 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9141 },
9142 { &hf_oran_reMask_re3,
9143 { "RE 3", "oran_fh_cus.reMask-RE3",
9144 FT_BOOLEAN, 16,
9145 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x2000,
9146 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9147 },
9148 { &hf_oran_reMask_re4,
9149 { "RE 4", "oran_fh_cus.reMask-RE4",
9150 FT_BOOLEAN, 16,
9151 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x1000,
9152 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9153 },
9154 { &hf_oran_reMask_re5,
9155 { "RE 5", "oran_fh_cus.reMask-RE5",
9156 FT_BOOLEAN, 16,
9157 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0800,
9158 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9159 },
9160 { &hf_oran_reMask_re6,
9161 { "RE 6", "oran_fh_cus.reMask-RE6",
9162 FT_BOOLEAN, 16,
9163 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0400,
9164 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9165 },
9166 { &hf_oran_reMask_re7,
9167 { "RE 7", "oran_fh_cus.reMask-RE7",
9168 FT_BOOLEAN, 16,
9169 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0200,
9170 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9171 },
9172 { &hf_oran_reMask_re8,
9173 { "RE 8", "oran_fh_cus.reMask-RE8",
9174 FT_BOOLEAN, 16,
9175 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0100,
9176 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9177 },
9178 { &hf_oran_reMask_re9,
9179 { "RE 9", "oran_fh_cus.reMask-RE9",
9180 FT_BOOLEAN, 16,
9181 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0080,
9182 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9183 },
9184 { &hf_oran_reMask_re10,
9185 { "RE 10", "oran_fh_cus.reMask-RE10",
9186 FT_BOOLEAN, 16,
9187 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0040,
9188 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9189 },
9190 { &hf_oran_reMask_re11,
9191 { "RE 11", "oran_fh_cus.reMask-RE11",
9192 FT_BOOLEAN, 16,
9193 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0020,
9194 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9195 },
9196 { &hf_oran_reMask_re12,
9197 { "RE 12", "oran_fh_cus.reMask-RE12",
9198 FT_BOOLEAN, 16,
9199 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0010,
9200 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9201 },
9202 { &hf_oran_reMask,
9203 { "RE Mask", "oran_fh_cus.reMask",
9204 FT_UINT16, BASE_HEX,
9205 NULL((void*)0), 0xfff0,
9206 "The Resource Element (RE) mask within a PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9207 },
9208
9209 /* Section 7.5.3.6 */
9210 { &hf_oran_numPrbc,
9211 { "numPrbc", "oran_fh_cus.numPrbc",
9212 FT_UINT8, BASE_DEC,
9213 NULL((void*)0), 0x0,
9214 "Number of contiguous PRBs per data section description", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9215 },
9216 /* Section 7.5.3.7 */
9217 { &hf_oran_numSymbol,
9218 { "Number of Symbols", "oran_fh_cus.numSymbol",
9219 FT_UINT8, BASE_DEC,
9220 NULL((void*)0), 0x0f,
9221 "Defines number of symbols to which the section control is applicable", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9222 },
9223 /* Section 7.5.3.8 */
9224 { &hf_oran_ef,
9225 { "Extension Flag", "oran_fh_cus.ef",
9226 FT_BOOLEAN, 8,
9227 NULL((void*)0), 0x80,
9228 "Indicates if more section extensions follow", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9229 },
9230 /* Section 7.5.3.9 */
9231 { &hf_oran_beamId,
9232 { "Beam ID", "oran_fh_cus.beamId",
9233 FT_UINT16, BASE_DEC,
9234 NULL((void*)0), 0x7fff,
9235 "Defines the beam pattern to be applied to the U-Plane data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9236 },
9237
9238 { &hf_oran_extension,
9239 { "Extension", "oran_fh_cus.extension",
9240 FT_STRING, BASE_NONE,
9241 NULL((void*)0), 0x0,
9242 "Section extension", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9243 },
9244
9245 /* Section 7.6.2.1 */
9246 { &hf_oran_exttype,
9247 { "extType", "oran_fh_cus.extType",
9248 FT_UINT8, BASE_DEC|BASE_EXT_STRING0x00000200,
9249 &exttype_vals_ext, 0x7f,
9250 "The extension type, which provides additional parameters specific to subject data extension", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9251 },
9252
9253 /* Section 7.6.2.3 */
9254 { &hf_oran_extlen,
9255 { "extLen", "oran_fh_cus.extLen",
9256 FT_UINT16, BASE_DEC,
9257 NULL((void*)0), 0x0,
9258 "Extension length in 32-bit words", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9259 },
9260
9261 /* Section 7.7.1 */
9262 { &hf_oran_bfw,
9263 { "bfw", "oran_fh_cus.bfw",
9264 FT_STRING, BASE_NONE,
9265 NULL((void*)0), 0x0,
9266 "Set of weights for a particular antenna", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9267 },
9268 { &hf_oran_bfw_bundle,
9269 { "Bundle", "oran_fh_cus.bfw.bundle",
9270 FT_STRING, BASE_NONE,
9271 NULL((void*)0), 0x0,
9272 "Bundle of BFWs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9273 },
9274 { &hf_oran_bfw_bundle_id,
9275 { "Bundle Id", "oran_fh_cus.bfw.bundleId",
9276 FT_UINT32, BASE_DEC,
9277 NULL((void*)0), 0x0,
9278 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9279 },
9280 /* Section 7.7.1.4 */
9281 { &hf_oran_bfw_i,
9282 { "bfwI", "oran_fh_cus.bfwI",
9283 FT_FLOAT, BASE_NONE,
9284 NULL((void*)0), 0x0,
9285 "In-phase", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9286 },
9287 /* Section 7.7.1.5 */
9288 { &hf_oran_bfw_q,
9289 { "bfwQ", "oran_fh_cus.bfwQ",
9290 FT_FLOAT, BASE_NONE,
9291 NULL((void*)0), 0x0,
9292 "Quadrature", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9293 },
9294
9295 /* Section 7.5.3.10 */
9296 { &hf_oran_ueId,
9297 { "UE ID", "oran_fh_cus.ueId",
9298 FT_UINT16, BASE_DEC,
9299 NULL((void*)0), 0x7fff,
9300 "logical identifier for set of channel info", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9301 },
9302 /* Section 7.5.3.11 */
9303 { &hf_oran_freqOffset,
9304 { "Frequency Offset", "oran_fh_cus.freqOffset",
9305 FT_UINT24, BASE_DEC,
9306 NULL((void*)0), 0x0,
9307 "with respect to the carrier center frequency before additional filtering", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9308 },
9309
9310 /* Section 7.5.3.12 */
9311 { &hf_oran_regularizationFactor,
9312 { "Regularization Factor", "oran_fh_cus.regularizationFactor",
9313 FT_INT16, BASE_DEC,
9314 NULL((void*)0), 0x0,
9315 "Signed value to support MMSE operation within O-RU", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9316 },
9317 /* Section 7.5.3.14 */
9318 { &hf_oran_laaMsgType,
9319 { "LAA Message Type", "oran_fh_cus.laaMsgType",
9320 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
9321 RVALS(laaMsgTypes)((0 ? (const struct _range_string*)0 : ((laaMsgTypes)))), 0xf0,
9322 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9323 },
9324 /* Section 7.5.3.15 */
9325 { &hf_oran_laaMsgLen,
9326 { "LAA Message Length", "oran_fh_cus.laaMsgLen",
9327 FT_UINT8, BASE_DEC,
9328 NULL((void*)0), 0x0f,
9329 "number of 32-bit words in the LAA section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9330 },
9331 /* Section 7.5.3.16 */
9332 { &hf_oran_lbtHandle,
9333 { "LBT Handle", "oran_fh_cus.lbtHandle",
9334 FT_UINT16, BASE_HEX,
9335 NULL((void*)0), 0x0,
9336 "label to identify transaction", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9337 },
9338 /* Section 7.5.3.17 */
9339 { &hf_oran_lbtDeferFactor,
9340 { "Defer Factor", "oran_fh_cus.lbtDeferFactor",
9341 FT_UINT8, BASE_DEC,
9342 NULL((void*)0), 0x07,
9343 "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)}
9344 },
9345 /* Section 7.5.3.18 */
9346 { &hf_oran_lbtBackoffCounter,
9347 { "Backoff Counter", "oran_fh_cus.lbtBackoffCounter",
9348 FT_UINT16, BASE_DEC,
9349 NULL((void*)0), 0xffc0,
9350 "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)}
9351 },
9352 /* Section 7.5.3.19 */
9353 { &hf_oran_lbtOffset,
9354 { "LBT Offset", "oran_fh_cus.lbtOffset",
9355 FT_UINT16, BASE_DEC,
9356 NULL((void*)0), 0xffc0,
9357 "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)}
9358 },
9359 /* Section 7.5.3.20 */
9360 { &hf_oran_MCOT,
9361 { "Maximum Channel Occupancy Time", "oran_fh_cus.MCOT",
9362 FT_UINT8, BASE_DEC,
9363 NULL((void*)0), 0x3c,
9364 "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)}
9365 },
9366 /* Section 7.5.3.21 */
9367 { &hf_oran_lbtMode,
9368 { "LBT Mode", "oran_fh_cus.lbtMode",
9369 FT_UINT8, BASE_DEC,
9370 VALS(lbtMode_vals)((0 ? (const struct _value_string*)0 : ((lbtMode_vals)))), 0x0,
9371 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9372 },
9373 /* Section 7.5.3.22 */
9374 { &hf_oran_lbtPdschRes,
9375 { "lbtPdschRes", "oran_fh_cus.lbtPdschRes",
9376 FT_UINT8, BASE_DEC,
9377 VALS(lbtPdschRes_vals)((0 ? (const struct _value_string*)0 : ((lbtPdschRes_vals)))), 0xc0,
9378 "LBT result of SFN/SF", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9379 },
9380 /* Section 7.5.3.23 */
9381 { &hf_oran_sfStatus,
9382 { "sfStatus", "oran_fh_cus.sfStatus",
9383 FT_BOOLEAN, 8,
9384 TFS(&tfs_sfStatus)((0 ? (const struct true_false_string*)0 : ((&tfs_sfStatus
))))
, 0x10,
9385 "Indicates whether the subframe was dropped or transmitted", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9386 },
9387 /* Section 7.5.3.24 */
9388 { &hf_oran_lbtDrsRes,
9389 { "lbtDrsRes", "oran_fh_cus.lbtDrsRes",
9390 FT_BOOLEAN, 8,
9391 TFS(&tfs_fail_success)((0 ? (const struct true_false_string*)0 : ((&tfs_fail_success
))))
, 0x80,
9392 "Indicates whether the subframe was dropped or transmitted", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9393 },
9394 /* Section 7.5.3.25 */
9395 { &hf_oran_initialPartialSF,
9396 { "Initial partial SF", "oran_fh_cus.initialPartialSF",
9397 FT_BOOLEAN, 8,
9398 TFS(&tfs_partial_full_sf)((0 ? (const struct true_false_string*)0 : ((&tfs_partial_full_sf
))))
, 0x40,
9399 "Indicates whether the initial SF in the LBT process is full or partial", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9400 },
9401 /* Section 7.5.3.26. */
9402 { &hf_oran_lbtBufErr,
9403 { "lbtBufErr", "oran_fh_cus.lbtBufErr",
9404 FT_BOOLEAN, 8,
9405 TFS(&tfs_lbtBufErr)((0 ? (const struct true_false_string*)0 : ((&tfs_lbtBufErr
))))
, 0x80,
9406 "LBT buffer error", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9407 },
9408 /* Section 7.5.3.27 */
9409 { &hf_oran_sfnSfEnd,
9410 { "SFN/SF End", "oran_fh_cus.sfnSfEnd",
9411 FT_UINT16, BASE_DEC,
9412 NULL((void*)0), 0x0fff,
9413 "SFN/SF by which the DRS window must end", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9414 },
9415 /* Section 7.5.3.28 */
9416 { &hf_oran_lbtCWConfig_H,
9417 { "lbtCWConfig_H", "oran_fh_cus.lbtCWConfig_H",
9418 FT_UINT8, BASE_DEC,
9419 NULL((void*)0), 0x0,
9420 "HARQ parameters for congestion window management", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9421 },
9422 /* Section 7.5.3.29 */
9423 { &hf_oran_lbtCWConfig_T,
9424 { "lbtCWConfig_T", "oran_fh_cus.lbtCWConfig_T",
9425 FT_UINT8, BASE_DEC,
9426 NULL((void*)0), 0x0,
9427 "TB parameters for congestion window management", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9428 },
9429 /* Section 7.5.3.30 */
9430 { &hf_oran_lbtTrafficClass,
9431 { "lbtTrafficClass", "oran_fh_cus.lbtTrafficClass",
9432 FT_UINT8, BASE_DEC,
9433 VALS(lbtTrafficClass_vals)((0 ? (const struct _value_string*)0 : ((lbtTrafficClass_vals
))))
, 0x38,
9434 "Traffic class priority for congestion window management", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9435 },
9436 /* Section 7.5.3.31 */
9437 { &hf_oran_lbtCWR_Rst,
9438 { "lbtCWR_Rst", "oran_fh_cus.lbtCWR_Rst",
9439 FT_BOOLEAN, 8,
9440 TFS(&tfs_fail_success)((0 ? (const struct true_false_string*)0 : ((&tfs_fail_success
))))
, 0x80,
9441 "notification about packet reception successful or not", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9442 },
9443
9444 /* Reserved fields */
9445 { &hf_oran_reserved,
9446 { "reserved", "oran_fh_cus.reserved",
9447 FT_UINT64, BASE_HEX,
9448 NULL((void*)0), 0x0,
9449 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9450 },
9451 { &hf_oran_reserved_1bit,
9452 { "reserved", "oran_fh_cus.reserved",
9453 FT_UINT8, BASE_HEX,
9454 NULL((void*)0), 0x80,
9455 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9456 },
9457 { &hf_oran_reserved_2bits,
9458 { "reserved", "oran_fh_cus.reserved",
9459 FT_UINT8, BASE_HEX,
9460 NULL((void*)0), 0xc0,
9461 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9462 },
9463 { &hf_oran_reserved_3bits,
9464 { "reserved", "oran_fh_cus.reserved",
9465 FT_UINT8, BASE_HEX,
9466 NULL((void*)0), 0xe0,
9467 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9468 },
9469 { &hf_oran_reserved_4bits,
9470 { "reserved", "oran_fh_cus.reserved",
9471 FT_UINT8, BASE_HEX,
9472 NULL((void*)0), 0xf0,
9473 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9474 },
9475 { &hf_oran_reserved_last_4bits,
9476 { "reserved", "oran_fh_cus.reserved",
9477 FT_UINT8, BASE_HEX,
9478 NULL((void*)0), 0x0f,
9479 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9480 },
9481 { &hf_oran_reserved_last_5bits,
9482 { "reserved", "oran_fh_cus.reserved",
9483 FT_UINT8, BASE_HEX,
9484 NULL((void*)0), 0x1f,
9485 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9486 },
9487 { &hf_oran_reserved_6bits,
9488 { "reserved", "oran_fh_cus.reserved",
9489 FT_UINT8, BASE_HEX,
9490 NULL((void*)0), 0xfc,
9491 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9492 },
9493 { &hf_oran_reserved_last_6bits,
9494 { "reserved", "oran_fh_cus.reserved",
9495 FT_UINT8, BASE_HEX,
9496 NULL((void*)0), 0x3f,
9497 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9498 },
9499 { &hf_oran_reserved_7bits,
9500 { "reserved", "oran_fh_cus.reserved",
9501 FT_UINT8, BASE_HEX,
9502 NULL((void*)0), 0xfe,
9503 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9504 },
9505 { &hf_oran_reserved_last_7bits,
9506 { "reserved", "oran_fh_cus.reserved",
9507 FT_UINT8, BASE_HEX,
9508 NULL((void*)0), 0x7f,
9509 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9510 },
9511 { &hf_oran_reserved_8bits,
9512 { "reserved", "oran_fh_cus.reserved",
9513 FT_UINT8, BASE_HEX,
9514 NULL((void*)0), 0x0,
9515 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9516 },
9517 { &hf_oran_reserved_16bits,
9518 { "reserved", "oran_fh_cus.reserved",
9519 FT_UINT16, BASE_HEX,
9520 NULL((void*)0), 0x0,
9521 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9522 },
9523 { &hf_oran_reserved_15bits,
9524 { "reserved", "oran_fh_cus.reserved",
9525 FT_UINT16, BASE_HEX,
9526 NULL((void*)0), 0x7fff,
9527 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9528 },
9529 { &hf_oran_reserved_bit1,
9530 { "reserved", "oran_fh_cus.reserved",
9531 FT_UINT8, BASE_HEX,
9532 NULL((void*)0), 0x40,
9533 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9534 },
9535 { &hf_oran_reserved_bit2,
9536 { "reserved", "oran_fh_cus.reserved",
9537 FT_UINT8, BASE_HEX,
9538 NULL((void*)0), 0x20,
9539 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9540 },
9541 { &hf_oran_reserved_bit3,
9542 { "reserved", "oran_fh_cus.reserved",
9543 FT_UINT8, BASE_HEX,
9544 NULL((void*)0), 0x10,
9545 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9546 },
9547 { &hf_oran_reserved_bit4,
9548 { "reserved", "oran_fh_cus.reserved",
9549 FT_UINT8, BASE_HEX,
9550 NULL((void*)0), 0x08,
9551 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9552 },
9553 { &hf_oran_reserved_bit5,
9554 { "reserved", "oran_fh_cus.reserved",
9555 FT_UINT8, BASE_HEX,
9556 NULL((void*)0), 0x04,
9557 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9558 },
9559 { &hf_oran_reserved_bits123,
9560 { "reserved", "oran_fh_cus.reserved",
9561 FT_UINT8, BASE_HEX,
9562 NULL((void*)0), 0x70,
9563 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9564 },
9565 { &hf_oran_reserved_bits1234,
9566 { "reserved", "oran_fh_cus.reserved",
9567 FT_UINT8, BASE_HEX,
9568 NULL((void*)0), 0x78,
9569 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9570 },
9571 { &hf_oran_reserved_bits456,
9572 { "reserved", "oran_fh_cus.reserved",
9573 FT_UINT8, BASE_HEX,
9574 NULL((void*)0), 0x0e,
9575 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9576 },
9577
9578 /* 7.7.11.9 */
9579 { &hf_oran_cont_ind,
9580 { "contInd", "oran_fh_cus.contInd",
9581 FT_BOOLEAN, 8,
9582 TFS(&continuity_indication_tfs)((0 ? (const struct true_false_string*)0 : ((&continuity_indication_tfs
))))
, 0x80,
9583 "PRB region continuity flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9584 },
9585 /* 7.7.11.10 */
9586 { &hf_oran_bundle_offset,
9587 { "BundleOffset", "oran_fh_cus.bundleOffset",
9588 FT_UINT8, BASE_DEC,
9589 NULL((void*)0), 0x3f,
9590 "offset between start of first PRB bundle and startPrbc", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9591 },
9592
9593 /* 7.7.1.2 bfwCompHdr (beamforming weight compression header) */
9594 { &hf_oran_bfwCompHdr,
9595 { "bfwCompHdr", "oran_fh_cus.bfwCompHdr",
9596 FT_STRING, BASE_NONE,
9597 NULL((void*)0), 0x0,
9598 "Compression method and IQ bit width for beamforming weights", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9599 },
9600 { &hf_oran_bfwCompHdr_iqWidth,
9601 { "IQ Bit Width", "oran_fh_cus.bfwCompHdr_iqWidth",
9602 FT_UINT8, BASE_HEX,
9603 VALS(bfw_comp_headers_iq_width)((0 ? (const struct _value_string*)0 : ((bfw_comp_headers_iq_width
))))
, 0xf0,
9604 "IQ bit width for the beamforming weights", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9605 },
9606 { &hf_oran_bfwCompHdr_compMeth,
9607 { "Compression Method", "oran_fh_cus.bfwCompHdr_compMeth",
9608 FT_UINT8, BASE_HEX,
9609 VALS(bfw_comp_headers_comp_meth)((0 ? (const struct _value_string*)0 : ((bfw_comp_headers_comp_meth
))))
, 0x0f,
9610 "compression method for the beamforming weights", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9611 },
9612
9613 /* 7.5.3.32 */
9614 { &hf_oran_ciCompParam,
9615 { "ciCompParam", "oran_fh_cus.ciCompParam",
9616 FT_STRING, BASE_NONE,
9617 NULL((void*)0), 0x0,
9618 "channel information compression parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9619 },
9620
9621 /* Table 7.5.3.32-1 */
9622 { &hf_oran_blockScaler,
9623 { "blockScaler", "oran_fh_cus.blockScaler",
9624 FT_UINT8, BASE_HEX,
9625 NULL((void*)0), 0x0,
9626 "unsigned, 1 integer bit, 7 fractional bits", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9627 },
9628 { &hf_oran_compBitWidth,
9629 { "compBitWidth", "oran_fh_cus.compBitWidth",
9630 FT_UINT8, BASE_DEC,
9631 NULL((void*)0), 0xf0,
9632 "Length of I bits and length of Q bits after compression over entire PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9633 },
9634 { &hf_oran_compShift,
9635 { "compShift", "oran_fh_cus.compShift",
9636 FT_UINT8, BASE_DEC,
9637 NULL((void*)0), 0x0f,
9638 "The shift applied to the entire PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9639 },
9640
9641 { &hf_oran_active_beamspace_coefficient_n1,
9642 { "N1", "oran_fh_cus.activeBeamspace_Coefficient_n1",
9643 FT_BOOLEAN, 8,
9644 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x80,
9645 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9646 },
9647 { &hf_oran_active_beamspace_coefficient_n2,
9648 { "N2", "oran_fh_cus.activeBeamspace_Coefficient_n2",
9649 FT_BOOLEAN, 8,
9650 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x40,
9651 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9652 },
9653 { &hf_oran_active_beamspace_coefficient_n3,
9654 { "N3", "oran_fh_cus.activeBeamspace_Coefficient_n3",
9655 FT_BOOLEAN, 8,
9656 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x20,
9657 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9658 },
9659 { &hf_oran_active_beamspace_coefficient_n4,
9660 { "N4", "oran_fh_cus.activeBeamspace_Coefficient_n4",
9661 FT_BOOLEAN, 8,
9662 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x10,
9663 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9664 },
9665 { &hf_oran_active_beamspace_coefficient_n5,
9666 { "N5", "oran_fh_cus.activeBeamspace_Coefficient_n5",
9667 FT_BOOLEAN, 8,
9668 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x08,
9669 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9670 },
9671 { &hf_oran_active_beamspace_coefficient_n6,
9672 { "N6", "oran_fh_cus.activeBeamspace_Coefficient_n6",
9673 FT_BOOLEAN, 8,
9674 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x04,
9675 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9676 },
9677 { &hf_oran_active_beamspace_coefficient_n7,
9678 { "N7", "oran_fh_cus.activeBeamspace_Coefficient_n7",
9679 FT_BOOLEAN, 8,
9680 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x02,
9681 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9682 },
9683 { &hf_oran_active_beamspace_coefficient_n8,
9684 { "N8", "oran_fh_cus.activeBeamspace_Coefficient_n8",
9685 FT_BOOLEAN, 8,
9686 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x01,
9687 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9688 },
9689
9690 { &hf_oran_activeBeamspaceCoefficientMask,
9691 { "activeBeamspaceCoefficientMask", "oran_fh_cus.activeBeamspaceCoefficientMask",
9692 FT_UINT8, BASE_HEX,
9693 NULL((void*)0), 0xff,
9694 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9695 },
9696 { &hf_oran_activeBeamspaceCoefficientMask_bits_set,
9697 { "Array elements set", "oran_fh_cus.activeBeamspaceCoefficientMask.bits-set",
9698 FT_UINT32, BASE_DEC,
9699 NULL((void*)0), 0x0,
9700 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9701 },
9702
9703 /* Section 7.7.6.6 */
9704 { &hf_oran_se6_repetition,
9705 { "repetition", "oran_fh_cus.repetition",
9706 FT_BOOLEAN, BASE_NONE,
9707 TFS(&repetition_se6_tfs)((0 ? (const struct true_false_string*)0 : ((&repetition_se6_tfs
))))
, 0x0,
9708 "Repetition of a highest priority data section for C-Plane", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9709 },
9710 /* 7.7.20.9 */
9711 { &hf_oran_rbgSize,
9712 { "rbgSize", "oran_fh_cus.rbgSize",
9713 FT_UINT8, BASE_HEX,
9714 VALS(rbg_size_vals)((0 ? (const struct _value_string*)0 : ((rbg_size_vals)))), 0x70,
9715 "Number of PRBs of the resource block groups allocated by the bit mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9716 },
9717 /* 7.7.20.10 */
9718 { &hf_oran_rbgMask,
9719 { "rbgMask", "oran_fh_cus.rbgMask",
9720 FT_UINT32, BASE_HEX,
9721 NULL((void*)0), 0x0fffffff,
9722 "Each bit indicates whether a corresponding resource block group is present", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9723 },
9724 /* 7.7.6.5. Also 7.7.12.3 and 7.7.19.5 */
9725 { &hf_oran_noncontig_priority,
9726 { "priority", "oran_fh_cus.priority",
9727 FT_UINT8, BASE_HEX,
9728 VALS(priority_vals)((0 ? (const struct _value_string*)0 : ((priority_vals)))), 0xc0,
9729 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9730 },
9731
9732 /* 7.7.6.4 */
9733 { &hf_oran_symbol_mask,
9734 { "symbolMask", "oran_fh_cus.symbolMask",
9735 FT_UINT16, BASE_HEX,
9736 NULL((void*)0), 0x3fff,
9737 "Each bit indicates whether the rbgMask applies to a given symbol in the slot", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9738 },
9739 { &hf_oran_symbol_mask_s13,
9740 { "symbol 13", "oran_fh_cus.symbolMask.symbol-13",
9741 FT_BOOLEAN, 16,
9742 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x2000,
9743 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9744 },
9745 { &hf_oran_symbol_mask_s12,
9746 { "symbol 12", "oran_fh_cus.symbolMask.symbol-12",
9747 FT_BOOLEAN, 16,
9748 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x1000,
9749 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9750 },
9751 { &hf_oran_symbol_mask_s11,
9752 { "symbol 11", "oran_fh_cus.symbolMask.symbol-11",
9753 FT_BOOLEAN, 16,
9754 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0800,
9755 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9756 },
9757 { &hf_oran_symbol_mask_s10,
9758 { "symbol 10", "oran_fh_cus.symbolMask.symbol-10",
9759 FT_BOOLEAN, 16,
9760 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0400,
9761 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9762 },
9763 { &hf_oran_symbol_mask_s9,
9764 { "symbol 9", "oran_fh_cus.symbolMask.symbol-9",
9765 FT_BOOLEAN, 16,
9766 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0200,
9767 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9768 },
9769 { &hf_oran_symbol_mask_s8,
9770 { "symbol 8", "oran_fh_cus.symbolMask.symbol-8",
9771 FT_BOOLEAN, 16,
9772 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0100,
9773 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9774 },
9775 { &hf_oran_symbol_mask_s7,
9776 { "symbol 7", "oran_fh_cus.symbolMask.symbol-7",
9777 FT_BOOLEAN, 16,
9778 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0080,
9779 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9780 },
9781 { &hf_oran_symbol_mask_s6,
9782 { "symbol 6", "oran_fh_cus.symbolMask.symbol-6",
9783 FT_BOOLEAN, 16,
9784 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0040,
9785 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9786 },
9787 { &hf_oran_symbol_mask_s5,
9788 { "symbol 5", "oran_fh_cus.symbolMask.symbol-5",
9789 FT_BOOLEAN, 16,
9790 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0020,
9791 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9792 },
9793 { &hf_oran_symbol_mask_s4,
9794 { "symbol 4", "oran_fh_cus.symbolMask.symbol-4",
9795 FT_BOOLEAN, 16,
9796 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0010,
9797 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9798 },
9799 { &hf_oran_symbol_mask_s3,
9800 { "symbol 3", "oran_fh_cus.symbolMask.symbol-3",
9801 FT_BOOLEAN, 16,
9802 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0008,
9803 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9804 },
9805 { &hf_oran_symbol_mask_s2,
9806 { "symbol 2", "oran_fh_cus.symbolMask.symbol-2",
9807 FT_BOOLEAN, 16,
9808 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0004,
9809 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9810 },
9811 { &hf_oran_symbol_mask_s1,
9812 { "symbol 1", "oran_fh_cus.symbolMask.symbol-1",
9813 FT_BOOLEAN, 16,
9814 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0002,
9815 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9816 },
9817 { &hf_oran_symbol_mask_s0,
9818 { "symbol 0", "oran_fh_cus.symbolMask.symbol-0",
9819 FT_BOOLEAN, 16,
9820 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0001,
9821 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9822 },
9823
9824 /* 7.7.6.3 */
9825 { &hf_oran_rbg_mask_27,
9826 { "bit 27", "oran_fh_cus.rbgMask.bit27",
9827 FT_BOOLEAN, 32,
9828 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x08000000,
9829 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9830 },
9831 { &hf_oran_rbg_mask_26,
9832 { "bit 26", "oran_fh_cus.rbgMask.bit26",
9833 FT_BOOLEAN, 32,
9834 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x04000000,
9835 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9836 },
9837 { &hf_oran_rbg_mask_25,
9838 { "bit 25", "oran_fh_cus.rbgMask.bit25",
9839 FT_BOOLEAN, 32,
9840 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x02000000,
9841 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9842 },
9843 { &hf_oran_rbg_mask_24,
9844 { "bit 24", "oran_fh_cus.rbgMask.bit24",
9845 FT_BOOLEAN, 32,
9846 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x01000000,
9847 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9848 },
9849 { &hf_oran_rbg_mask_23,
9850 { "bit 23", "oran_fh_cus.rbgMask.bit23",
9851 FT_BOOLEAN, 32,
9852 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00800000,
9853 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9854 },
9855 { &hf_oran_rbg_mask_22,
9856 { "bit 22", "oran_fh_cus.rbgMask.bit22",
9857 FT_BOOLEAN, 32,
9858 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00400000,
9859 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9860 },
9861 { &hf_oran_rbg_mask_21,
9862 { "bit 21", "oran_fh_cus.rbgMask.bit21",
9863 FT_BOOLEAN, 32,
9864 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00200000,
9865 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9866 },
9867 { &hf_oran_rbg_mask_20,
9868 { "bit 20", "oran_fh_cus.rbgMask.bit20",
9869 FT_BOOLEAN, 32,
9870 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00100000,
9871 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9872 },
9873 { &hf_oran_rbg_mask_19,
9874 { "bit 19", "oran_fh_cus.rbgMask.bit19",
9875 FT_BOOLEAN, 32,
9876 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00080000,
9877 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9878 },
9879 { &hf_oran_rbg_mask_18,
9880 { "bit 18", "oran_fh_cus.rbgMask.bit18",
9881 FT_BOOLEAN, 32,
9882 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00040000,
9883 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9884 },
9885 { &hf_oran_rbg_mask_17,
9886 { "bit 17", "oran_fh_cus.rbgMask.bit17",
9887 FT_BOOLEAN, 32,
9888 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00020000,
9889 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9890 },
9891 { &hf_oran_rbg_mask_16,
9892 { "bit 16", "oran_fh_cus.rbgMask.bit16",
9893 FT_BOOLEAN, 32,
9894 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00010000,
9895 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9896 },
9897 { &hf_oran_rbg_mask_15,
9898 { "bit 15", "oran_fh_cus.rbgMask.bit15",
9899 FT_BOOLEAN, 32,
9900 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00008000,
9901 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9902 },
9903 { &hf_oran_rbg_mask_14,
9904 { "bit 14", "oran_fh_cus.rbgMask.bit14",
9905 FT_BOOLEAN, 32,
9906 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00004000,
9907 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9908 },
9909 { &hf_oran_rbg_mask_13,
9910 { "bit 13", "oran_fh_cus.rbgMask.bit13",
9911 FT_BOOLEAN, 32,
9912 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00002000,
9913 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9914 },
9915 { &hf_oran_rbg_mask_12,
9916 { "bit 12", "oran_fh_cus.rbgMask.bit12",
9917 FT_BOOLEAN, 32,
9918 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00001000,
9919 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9920 },
9921 { &hf_oran_rbg_mask_11,
9922 { "bit 11", "oran_fh_cus.rbgMask.bit11",
9923 FT_BOOLEAN, 32,
9924 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000800,
9925 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9926 },
9927 { &hf_oran_rbg_mask_10,
9928 { "bit 10", "oran_fh_cus.rbgMask.bit10",
9929 FT_BOOLEAN, 32,
9930 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000400,
9931 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9932 },
9933 { &hf_oran_rbg_mask_9,
9934 { "bit 9", "oran_fh_cus.rbgMask.bit9",
9935 FT_BOOLEAN, 32,
9936 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000200,
9937 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9938 },
9939 { &hf_oran_rbg_mask_8,
9940 { "bit 8", "oran_fh_cus.rbgMask.bit8",
9941 FT_BOOLEAN, 32,
9942 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000100,
9943 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9944 },
9945 { &hf_oran_rbg_mask_7,
9946 { "bit 7", "oran_fh_cus.rbgMask.bit7",
9947 FT_BOOLEAN, 32,
9948 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000080,
9949 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9950 },
9951 { &hf_oran_rbg_mask_6,
9952 { "bit 6", "oran_fh_cus.rbgMask.bit6",
9953 FT_BOOLEAN, 32,
9954 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000040,
9955 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9956 },
9957 { &hf_oran_rbg_mask_5,
9958 { "bit 5", "oran_fh_cus.rbgMask.bit5",
9959 FT_BOOLEAN, 32,
9960 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000020,
9961 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9962 },
9963 { &hf_oran_rbg_mask_4,
9964 { "bit 4", "oran_fh_cus.rbgMask.bit4",
9965 FT_BOOLEAN, 32,
9966 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000010,
9967 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9968 },
9969 { &hf_oran_rbg_mask_3,
9970 { "bit 3", "oran_fh_cus.rbgMask.bit3",
9971 FT_BOOLEAN, 32,
9972 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000008,
9973 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9974 },
9975 { &hf_oran_rbg_mask_2,
9976 { "bit 2", "oran_fh_cus.rbgMask.bit2",
9977 FT_BOOLEAN, 32,
9978 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000004,
9979 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9980 },
9981 { &hf_oran_rbg_mask_1,
9982 { "bit 1", "oran_fh_cus.rbgMask.bit1",
9983 FT_BOOLEAN, 32,
9984 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000002,
9985 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9986 },
9987 { &hf_oran_rbg_mask_0,
9988 { "bit 0", "oran_fh_cus.rbgMask.bit0",
9989 FT_BOOLEAN, 32,
9990 TFS(&tfs_allocated_not_allocated)((0 ? (const struct true_false_string*)0 : ((&tfs_allocated_not_allocated
))))
, 0x00000001,
9991 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9992 },
9993
9994
9995 /* 7.7.22.2 */
9996 { &hf_oran_ack_nack_req_id,
9997 { "ackNackReqId", "oran_fh_cus.ackNackReqId",
9998 FT_UINT16, BASE_HEX,
9999 NULL((void*)0), 0x0,
10000 "Indicates the ACK/NACK request ID of a section description", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10001 },
10002
10003 /* Subtree for next 2 items */
10004 { &hf_oran_frequency_range,
10005 { "Frequency Range", "oran_fh_cus.frequencyRange",
10006 FT_STRING, BASE_NONE,
10007 NULL((void*)0), 0x0,
10008 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10009 },
10010
10011 /* 7.7.12.4 */
10012 { &hf_oran_off_start_prb,
10013 { "offStartPrb", "oran_fh_cus.offStartPrb",
10014 FT_UINT8, BASE_DEC,
10015 NULL((void*)0), 0x0,
10016 "Offset of PRB range start", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10017 },
10018 /* 7.7.12.5 */
10019 { &hf_oran_num_prb,
10020 { "numPrb", "oran_fh_cus.numPrb",
10021 FT_UINT8, BASE_DEC,
10022 NULL((void*)0), 0x0,
10023 "Number of PRBs in PRB range", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10024 },
10025
10026 /* symbolId 8.3.3.7 */
10027 { &hf_oran_symbolId,
10028 { "Symbol Identifier", "oran_fh_cus.symbolId",
10029 FT_UINT8, BASE_DEC,
10030 NULL((void*)0), 0x3f,
10031 "Identifies a symbol number within a slot", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10032 },
10033
10034 /* startPrbu 8.3.3.11 */
10035 { &hf_oran_startPrbu,
10036 { "startPrbu", "oran_fh_cus.startPrbu",
10037 FT_UINT16, BASE_DEC,
10038 NULL((void*)0), 0x03ff,
10039 "starting PRB of user plane section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10040 },
10041
10042 /* numPrbu 8.3.3.12 */
10043 { &hf_oran_numPrbu,
10044 { "numPrbu", "oran_fh_cus.numPrbu",
10045 FT_UINT8, BASE_DEC,
10046 NULL((void*)0), 0x0,
10047 "number of PRBs per user plane section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10048 },
10049
10050 /* 7.7.1.3 */
10051 { &hf_oran_bfwCompParam,
10052 { "bfwCompParam", "oran_fh_cus.bfwCompParam",
10053 FT_STRING, BASE_NONE,
10054 NULL((void*)0), 0x0,
10055 "Beamforming weight compression parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10056 },
10057
10058 /* 6.3.3.13 */
10059 { &hf_oran_udCompHdrMeth,
10060 { "User Data Compression Method", "oran_fh_cus.udCompHdrMeth",
10061 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
10062 RVALS(ud_comp_header_meth)((0 ? (const struct _range_string*)0 : ((ud_comp_header_meth)
)))
, 0x0f,
10063 "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)}
10064 },
10065 { &hf_oran_udCompHdrMeth_pref,
10066 { "User Data Compression Method", "oran_fh_cus.udCompHdrMeth",
10067 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
10068 RVALS(ud_comp_header_meth)((0 ? (const struct _range_string*)0 : ((ud_comp_header_meth)
)))
, 0x0,
10069 "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)}
10070 },
10071 /* 8.3.3.18 */
10072 { &hf_oran_udCompLen,
10073 { "udCompLen", "oran_fh_cus.udCompLen",
10074 FT_UINT16, BASE_DEC,
10075 NULL((void*)0), 0x0,
10076 "PRB field length in octets", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10077 },
10078
10079 /* 7.5.2.10 */
10080 { &hf_oran_udCompHdrIqWidth,
10081 { "User Data IQ width", "oran_fh_cus.udCompHdrWidth",
10082 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
10083 RVALS(ud_comp_header_width)((0 ? (const struct _range_string*)0 : ((ud_comp_header_width
))))
, 0xf0,
10084 "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)}
10085 },
10086 { &hf_oran_udCompHdrIqWidth_pref,
10087 { "User Data IQ width", "oran_fh_cus.udCompHdrWidth.pref",
10088 FT_UINT8, BASE_DEC,
10089 NULL((void*)0), 0x0,
10090 "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)}
10091 },
10092
10093 { &hf_oran_sinrCompHdrIqWidth_pref,
10094 { "SINR IQ width", "oran_fh_cus.sinrCompHdrWidth",
10095 FT_UINT8, BASE_DEC,
10096 NULL((void*)0), 0x0,
10097 "Defines the IQ bit width for SINR data in section type 9", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10098 },
10099 { &hf_oran_sinrCompHdrMeth_pref,
10100 { "SINR Compression Method", "oran_fh_cus.sinrCompHdrMeth",
10101 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
10102 RVALS(ud_comp_header_meth)((0 ? (const struct _range_string*)0 : ((ud_comp_header_meth)
)))
, 0x0,
10103 "Defines the compression method for SINR data in section type 9", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10104 },
10105
10106 /* Section 8.3.3.15 (not always present - depends upon meth) */
10107 { &hf_oran_udCompParam,
10108 { "User Data Compression Parameter", "oran_fh_cus.udCompParam",
10109 FT_STRING, BASE_NONE,
10110 NULL((void*)0), 0x0,
10111 "Applies to whatever compression method is specified by the associated sectionID's compMeth value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10112 },
10113 /* 8.3.3.18 */
10114 { &hf_oran_sReSMask,
10115 { "sReSMask", "oran_fh_cus.sReSMask",
10116 FT_UINT16, BASE_HEX,
10117 NULL((void*)0), 0xf0ff,
10118 "selective RE sending mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10119 },
10120
10121 { &hf_oran_sReSMask_re12,
10122 { "RE-12", "oran_fh_cus.sReSMask-re12",
10123 FT_BOOLEAN, 16,
10124 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x8000,
10125 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10126 },
10127 { &hf_oran_sReSMask_re11,
10128 { "RE-11", "oran_fh_cus.sReSMask-re11",
10129 FT_BOOLEAN, 16,
10130 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x4000,
10131 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10132 },
10133 { &hf_oran_sReSMask_re10,
10134 { "RE-10", "oran_fh_cus.sReSMask-re10",
10135 FT_BOOLEAN, 16,
10136 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x2000,
10137 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10138 },
10139 { &hf_oran_sReSMask_re9,
10140 { "RE-9", "oran_fh_cus.sReSMask-re9",
10141 FT_BOOLEAN, 16,
10142 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x1000,
10143 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10144 },
10145 { &hf_oran_sReSMask_re8,
10146 { "RE-8", "oran_fh_cus.sReSMask-re8",
10147 FT_BOOLEAN, 16,
10148 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0080,
10149 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10150 },
10151 { &hf_oran_sReSMask_re7,
10152 { "RE-7", "oran_fh_cus.sReSMask-re7",
10153 FT_BOOLEAN, 16,
10154 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0040,
10155 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10156 },
10157 { &hf_oran_sReSMask_re6,
10158 { "RE-6", "oran_fh_cus.sReSMask-re6",
10159 FT_BOOLEAN, 16,
10160 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0020,
10161 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10162 },
10163 { &hf_oran_sReSMask_re5,
10164 { "RE-5", "oran_fh_cus.sReSMask-re5",
10165 FT_BOOLEAN, 16,
10166 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0010,
10167 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10168 },
10169 { &hf_oran_sReSMask_re4,
10170 { "RE-4", "oran_fh_cus.sReSMask-re4",
10171 FT_BOOLEAN, 16,
10172 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0008,
10173 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10174 },
10175 { &hf_oran_sReSMask_re3,
10176 { "RE-3", "oran_fh_cus.sReSMask-re3",
10177 FT_BOOLEAN, 16,
10178 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0004,
10179 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10180 },
10181 { &hf_oran_sReSMask_re2,
10182 { "RE-2", "oran_fh_cus.sReSMask-re2",
10183 FT_BOOLEAN, 16,
10184 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0002,
10185 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10186 },
10187 { &hf_oran_sReSMask_re1,
10188 { "RE-1", "oran_fh_cus.sReSMask-re1",
10189 FT_BOOLEAN, 16,
10190 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0001,
10191 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10192 },
10193
10194 /* 8.3.3.20 */
10195 { &hf_oran_sReSMask1,
10196 { "sReSMask1", "oran_fh_cus.sReSMask1",
10197 FT_UINT16, BASE_HEX,
10198 NULL((void*)0), 0x0fff,
10199 "selective RE sending mask 1", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10200 },
10201 /* 8.3.3.21 */
10202 { &hf_oran_sReSMask2,
10203 { "sReSMask2", "oran_fh_cus.sReSMask2",
10204 FT_UINT16, BASE_HEX,
10205 NULL((void*)0), 0x0fff,
10206 "selective RE sending mask 2", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10207 },
10208
10209 { &hf_oran_sReSMask1_2_re12,
10210 { "RE-12", "oran_fh_cus.sReSMask-re12",
10211 FT_BOOLEAN, 16,
10212 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0800,
10213 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10214 },
10215 { &hf_oran_sReSMask1_2_re11,
10216 { "RE-11", "oran_fh_cus.sReSMask-re11",
10217 FT_BOOLEAN, 16,
10218 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0400,
10219 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10220 },
10221 { &hf_oran_sReSMask1_2_re10,
10222 { "RE-10", "oran_fh_cus.sReSMask-re10",
10223 FT_BOOLEAN, 16,
10224 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0200,
10225 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10226 },
10227 { &hf_oran_sReSMask1_2_re9,
10228 { "RE-9", "oran_fh_cus.sReSMask-re9",
10229 FT_BOOLEAN, 16,
10230 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0100,
10231 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10232 },
10233
10234 /* Section 6.3.3.15 */
10235 { &hf_oran_iSample,
10236 { "iSample", "oran_fh_cus.iSample",
10237 FT_FLOAT, BASE_NONE,
10238 NULL((void*)0), 0x0,
10239 "In-phase Sample value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10240 },
10241
10242 /* Section 6.3.3.16 */
10243 { &hf_oran_qSample,
10244 { "qSample", "oran_fh_cus.qSample",
10245 FT_FLOAT, BASE_NONE,
10246 NULL((void*)0), 0x0,
10247 "Quadrature Sample value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10248 },
10249
10250 { &hf_oran_exponent,
10251 { "Exponent", "oran_fh_cus.exponent",
10252 FT_UINT8, BASE_DEC,
10253 NULL((void*)0), 0x0f,
10254 "Exponent applicable to the I & Q mantissas", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10255 },
10256
10257 { &hf_oran_iq_user_data,
10258 { "IQ User Data", "oran_fh_cus.iq_user_data",
10259 FT_BYTES, BASE_NONE,
10260 NULL((void*)0), 0x0,
10261 "Used for the In-phase and Quadrature sample mantissa", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10262 },
10263
10264
10265 { &hf_oran_u_section_ul_symbol_time,
10266 { "Microseconds since first UL U-plane frame for this symbol", "oran_fh_cus.us-since-first-ul-frame",
10267 FT_UINT32, BASE_DEC,
10268 NULL((void*)0), 0x0,
10269 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10270 },
10271 { &hf_oran_u_section_ul_symbol_frames,
10272 { "Number of UL frames sent for this symbol", "oran_fh_cus.number-ul-frames-in-symbol",
10273 FT_UINT32, BASE_DEC,
10274 NULL((void*)0), 0x0,
10275 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10276 },
10277 { &hf_oran_u_section_ul_symbol_first_frame,
10278 { "First UL frame for this symbol", "oran_fh_cus.first-ul-frame-in-symbol",
10279 FT_FRAMENUM, BASE_NONE,
10280 FRAMENUM_TYPE(FT_FRAMENUM_NONE)((gpointer) (glong) (FT_FRAMENUM_NONE)), 0x0,
10281 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10282 },
10283 { &hf_oran_u_section_ul_symbol_last_frame,
10284 { "Last UL frame for this symbol", "oran_fh_cus.last-ul-frame-in-symbol",
10285 FT_FRAMENUM, BASE_NONE,
10286 FRAMENUM_TYPE(FT_FRAMENUM_NONE)((gpointer) (glong) (FT_FRAMENUM_NONE)), 0x0,
10287 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10288 },
10289
10290 { &hf_oran_c_eAxC_ID,
10291 { "c_eAxC_ID", "oran_fh_cus.c_eaxc_id",
10292 FT_STRING, BASE_NONE,
10293 NULL((void*)0), 0x0,
10294 "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) }
10295 },
10296
10297 { &hf_oran_refa,
10298 { "RefA", "oran_fh_cus.refa",
10299 FT_STRING, BASE_NONE,
10300 NULL((void*)0), 0x0,
10301 "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) }
10302 },
10303
10304
10305 /* Section 7.5.2.15 */
10306 { &hf_oran_ciCompHdr,
10307 { "ciCompHdr", "oran_fh_cus.ciCompHdr",
10308 FT_STRING, BASE_NONE,
10309 NULL((void*)0), 0x0,
10310 "Channel Information Compression Header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10311 },
10312 { &hf_oran_ciCompHdrMeth,
10313 { "User Data Compression Method", "oran_fh_cus.ciCompHdrMeth",
10314 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
10315 RVALS(ud_comp_header_meth)((0 ? (const struct _range_string*)0 : ((ud_comp_header_meth)
)))
, 0x0e,
10316 "Compression method for Channel Information", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10317 },
10318 { &hf_oran_ciCompHdrIqWidth,
10319 { "User Data IQ width", "oran_fh_cus.ciCompHdrWidth",
10320 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
10321 RVALS(ud_comp_header_width)((0 ? (const struct _range_string*)0 : ((ud_comp_header_width
))))
, 0xf0,
10322 "IQ bit width for Channel Information", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10323 },
10324 { &hf_oran_ciCompOpt,
10325 { "ciCompOpt", "oran_fh_cus.ciCompOpt",
10326 FT_UINT8, BASE_DEC,
10327 VALS(ci_comp_opt_vals)((0 ? (const struct _value_string*)0 : ((ci_comp_opt_vals)))), 0x01,
10328 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10329 },
10330
10331 /* 7.7.11.7 */
10332 { &hf_oran_disable_bfws,
10333 { "disableBFWs", "oran_fh_cus.disableBFWs",
10334 FT_BOOLEAN, 8,
10335 NULL((void*)0), 0x80,
10336 "Indicate if BFWs under section extension are disabled", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10337 },
10338 /* 7.7.11.8 */
10339 { &hf_oran_rad,
10340 { "RAD", "oran_fh_cus.rad",
10341 FT_BOOLEAN, 8,
10342 NULL((void*)0), 0x40,
10343 "Reset After PRB Discontinuity", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10344 },
10345 /* 7.7.11.4 */
10346 { &hf_oran_num_bund_prbs,
10347 { "numBundPrb", "oran_fh_cus.numBundPrb",
10348 FT_UINT8, BASE_DEC,
10349 NULL((void*)0), 0x0,
10350 "Number of bundled PRBs per BFWs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10351 },
10352 { &hf_oran_beam_id,
10353 { "beamId", "oran_fh_cus.beamId",
10354 FT_UINT16, BASE_DEC,
10355 NULL((void*)0), 0x7fff,
10356 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10357 },
10358 { &hf_oran_num_weights_per_bundle,
10359 { "Num weights per bundle", "oran_fh_cus.num_weights_per_bundle",
10360 FT_UINT16, BASE_DEC,
10361 NULL((void*)0), 0x0,
10362 "From dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10363 },
10364
10365 { &hf_oran_samples_prb,
10366 {"PRB", "oran_fh_cus.prb",
10367 FT_STRING, BASE_NONE,
10368 NULL((void*)0), 0x0,
10369 "Grouping of samples for a particular Physical Resource Block", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10370 },
10371
10372 /* 7.5.3.13 */
10373 { &hf_oran_ciSample,
10374 { "ciSample", "oran_fh_cus.ciSample",
10375 FT_STRING, BASE_NONE,
10376 NULL((void*)0), 0x0,
10377 "Sample (I and Q values)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10378 },
10379 { &hf_oran_ciIsample,
10380 { "ciIsample", "oran_fh_cus.ciISample",
10381 FT_FLOAT, BASE_NONE,
10382 NULL((void*)0), 0x0,
10383 "Channel information complex value - I part", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10384 },
10385 { &hf_oran_ciQsample,
10386 { "ciQsample", "oran_fh_cus.ciQSample",
10387 FT_FLOAT, BASE_NONE,
10388 NULL((void*)0), 0x0,
10389 "Channel information complex value - Q part", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10390 },
10391
10392 /* 7.7.10 */
10393 { &hf_oran_se10_port,
10394 { "Port entry", "oran_fh_cus.portEntry",
10395 FT_NONE, BASE_NONE,
10396 NULL((void*)0), 0x0,
10397 "SE10 port entry", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10398 },
10399 /* 7.7.10.2 */
10400 { &hf_oran_beamGroupType,
10401 { "beamGroupType", "oran_fh_cus.beamGroupType",
10402 FT_UINT8, BASE_DEC,
10403 VALS(beam_group_type_vals)((0 ? (const struct _value_string*)0 : ((beam_group_type_vals
))))
, 0xc0,
10404 "The type of beam grouping", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10405 },
10406 /* 7.7.10.3 */
10407 { &hf_oran_numPortc,
10408 { "numPortc", "oran_fh_cus.numPortc",
10409 FT_UINT8, BASE_DEC,
10410 NULL((void*)0), 0x3f,
10411 "The number of eAxC ports", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10412 },
10413
10414 /* 7.7.4.2 (1 bit) */
10415 { &hf_oran_csf,
10416 { "csf", "oran_fh_cus.csf",
10417 FT_BOOLEAN, BASE_NONE,
10418 NULL((void*)0), 0x0,
10419 "constellation shift flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10420 },
10421 /* 7.7.4.3 */
10422 { &hf_oran_modcompscaler,
10423 { "modCompScaler", "oran_fh_cus.modcompscaler",
10424 FT_UINT16, BASE_DEC,
10425 NULL((void*)0), 0x7fff,
10426 "modulation compression scaler value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10427 },
10428
10429 /* 7.7.5.1 */
10430 { &hf_oran_modcomp_param_set,
10431 { "Set", "oran_fh_cus.modcomp-param-set",
10432 FT_STRING, BASE_NONE,
10433 NULL((void*)0), 0x0,
10434 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10435 },
10436
10437
10438
10439 /* mcScaleReMask 7.7.5.2 (12 bits) */
10440
10441 /* First entry (starts with msb within byte) */
10442 { &hf_oran_mc_scale_re_mask_re1,
10443 { "RE 1", "oran_fh_cus.mcscalermask-RE1",
10444 FT_BOOLEAN, 16,
10445 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x8000,
10446 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10447 },
10448 { &hf_oran_mc_scale_re_mask_re2,
10449 { "RE 2", "oran_fh_cus.mcscalermask-RE2",
10450 FT_BOOLEAN, 16,
10451 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x4000,
10452 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10453 },
10454 { &hf_oran_mc_scale_re_mask_re3,
10455 { "RE 3", "oran_fh_cus.mcscalermask-RE3",
10456 FT_BOOLEAN, 16,
10457 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x2000,
10458 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10459 },
10460 { &hf_oran_mc_scale_re_mask_re4,
10461 { "RE 4", "oran_fh_cus.mcscalermask-RE4",
10462 FT_BOOLEAN, 16,
10463 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x1000,
10464 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10465 },
10466 { &hf_oran_mc_scale_re_mask_re5,
10467 { "RE 5", "oran_fh_cus.mcscalermask-RE5",
10468 FT_BOOLEAN, 16,
10469 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0800,
10470 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10471 },
10472 { &hf_oran_mc_scale_re_mask_re6,
10473 { "RE 6", "oran_fh_cus.mcscalermask-RE6",
10474 FT_BOOLEAN, 16,
10475 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0400,
10476 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10477 },
10478 { &hf_oran_mc_scale_re_mask_re7,
10479 { "RE 7", "oran_fh_cus.mcscalermask-RE7",
10480 FT_BOOLEAN, 16,
10481 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0200,
10482 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10483 },
10484 { &hf_oran_mc_scale_re_mask_re8,
10485 { "RE 8", "oran_fh_cus.mcscalermask-RE8",
10486 FT_BOOLEAN, 16,
10487 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0100,
10488 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10489 },
10490 { &hf_oran_mc_scale_re_mask_re9,
10491 { "RE 9", "oran_fh_cus.mcscalermask-RE9",
10492 FT_BOOLEAN, 16,
10493 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0080,
10494 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10495 },
10496 { &hf_oran_mc_scale_re_mask_re10,
10497 { "RE 10", "oran_fh_cus.mcscalermask-RE10",
10498 FT_BOOLEAN, 16,
10499 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0040,
10500 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10501 },
10502 { &hf_oran_mc_scale_re_mask_re11,
10503 { "RE 11", "oran_fh_cus.mcscalermask-RE11",
10504 FT_BOOLEAN, 16,
10505 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0020,
10506 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10507 },
10508 { &hf_oran_mc_scale_re_mask_re12,
10509 { "RE 12", "oran_fh_cus.mcscalermask-RE12",
10510 FT_BOOLEAN, 16,
10511 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0010,
10512 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10513 },
10514
10515 /* Even tries entry (starts with 5th bit within byte) */
10516 { &hf_oran_mc_scale_re_mask_re1_even,
10517 { "RE 1", "oran_fh_cus.mcscalermask-RE1",
10518 FT_BOOLEAN, 16,
10519 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0800,
10520 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10521 },
10522 { &hf_oran_mc_scale_re_mask_re2_even,
10523 { "RE 2", "oran_fh_cus.mcscalermask-RE2",
10524 FT_BOOLEAN, 16,
10525 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0400,
10526 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10527 },
10528 { &hf_oran_mc_scale_re_mask_re3_even,
10529 { "RE 3", "oran_fh_cus.mcscalermask-RE3",
10530 FT_BOOLEAN, 16,
10531 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0200,
10532 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10533 },
10534 { &hf_oran_mc_scale_re_mask_re4_even,
10535 { "RE 4", "oran_fh_cus.mcscalermask-RE4",
10536 FT_BOOLEAN, 16,
10537 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0100,
10538 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10539 },
10540 { &hf_oran_mc_scale_re_mask_re5_even,
10541 { "RE 5", "oran_fh_cus.mcscalermask-RE5",
10542 FT_BOOLEAN, 16,
10543 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0080,
10544 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10545 },
10546 { &hf_oran_mc_scale_re_mask_re6_even,
10547 { "RE 6", "oran_fh_cus.mcscalermask-RE6",
10548 FT_BOOLEAN, 16,
10549 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0040,
10550 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10551 },
10552 { &hf_oran_mc_scale_re_mask_re7_even,
10553 { "RE 7", "oran_fh_cus.mcscalermask-RE7",
10554 FT_BOOLEAN, 16,
10555 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0020,
10556 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10557 },
10558 { &hf_oran_mc_scale_re_mask_re8_even,
10559 { "RE 8", "oran_fh_cus.mcscalermask-RE8",
10560 FT_BOOLEAN, 16,
10561 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0010,
10562 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10563 },
10564 { &hf_oran_mc_scale_re_mask_re9_even,
10565 { "RE 9", "oran_fh_cus.mcscalermask-RE9",
10566 FT_BOOLEAN, 16,
10567 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0008,
10568 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10569 },
10570 { &hf_oran_mc_scale_re_mask_re10_even,
10571 { "RE 10", "oran_fh_cus.mcscalermask-RE10",
10572 FT_BOOLEAN, 16,
10573 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0004,
10574 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10575 },
10576 { &hf_oran_mc_scale_re_mask_re11_even,
10577 { "RE 11", "oran_fh_cus.mcscalermask-RE11",
10578 FT_BOOLEAN, 16,
10579 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0002,
10580 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10581 },
10582 { &hf_oran_mc_scale_re_mask_re12_even,
10583 { "RE 12", "oran_fh_cus.mcscalermask-RE12",
10584 FT_BOOLEAN, 16,
10585 TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable
))))
, 0x0001,
10586 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10587 },
10588
10589 { &hf_oran_mc_scale_re_mask,
10590 { "mcScaleReMask", "oran_fh_cus.mcscaleremask",
10591 FT_UINT16, BASE_HEX,
10592 NULL((void*)0), 0xfff0,
10593 "modulation compression power scale RE mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10594 },
10595 { &hf_oran_mc_scale_re_mask_even,
10596 { "mcScaleReMask", "oran_fh_cus.mcscaleremask",
10597 FT_UINT16, BASE_HEX,
10598 NULL((void*)0), 0x0fff,
10599 "modulation compression power scale RE mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10600 },
10601
10602 /* mcScaleOffset 7.7.5.4 (15 bits) */
10603 { &hf_oran_mc_scale_offset,
10604 { "mcScaleOffset", "oran_fh_cus.mcscaleoffset",
10605 FT_UINT24, BASE_DEC,
10606 NULL((void*)0), 0x0,
10607 "scaling value for modulation compression", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10608 },
10609 /* eAxCmask (7.7.7.2) */
10610 { &hf_oran_eAxC_mask,
10611 { "eAxC Mask", "oran_fh_cus.eaxcmask",
10612 FT_UINT16, BASE_HEX,
10613 NULL((void*)0), 0xffff,
10614 "Which eAxC_ID values the C-Plane message applies to", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10615 },
10616 /* technology (interface name) 7.7.9.2 */
10617 { &hf_oran_technology,
10618 { "Technology", "oran_fh_cus.technology",
10619 FT_UINT8, BASE_DEC,
10620 VALS(interface_name_vals)((0 ? (const struct _value_string*)0 : ((interface_name_vals)
)))
, 0x0,
10621 "Interface name (that C-PLane section applies to)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10622 },
10623 /* Exttype 14 (7.7.14.2) */
10624 { &hf_oran_nullLayerInd,
10625 { "nullLayerInd", "oran_fh_cus.nulllayerind",
10626 FT_BOOLEAN, BASE_NONE,
10627 NULL((void*)0), 0x0,
10628 "Whether corresponding layer is nulling-layer or not", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10629 },
10630
10631 /* Exttype 19 */
10632 /* 7.7.19.3 */
10633 { &hf_oran_se19_repetition,
10634 { "repetition", "oran_fh_cus.repetition",
10635 FT_BOOLEAN, BASE_NONE,
10636 TFS(&repetition_se19_tfs)((0 ? (const struct true_false_string*)0 : ((&repetition_se19_tfs
))))
, 0x0,
10637 "repeat port info flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10638 },
10639 /* 7.7.19.8 */
10640 /* TODO: break down into each RE as done for 7.5.3.5 ? */
10641 { &hf_oran_portReMask,
10642 { "portReMask", "oran_fh_cus.portReMask",
10643 FT_BOOLEAN, 16,
10644 TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0fff,
10645 "RE bitmask per port", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10646 },
10647 /* 7.7.19.9 */
10648 { &hf_oran_portSymbolMask,
10649 { "portSymbolMask", "oran_fh_cus.portSymbolMask",
10650 FT_BOOLEAN, 16,
10651 TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x3fff,
10652 "Symbol bitmask port port", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10653 },
10654
10655 { &hf_oran_ext19_port,
10656 {"Port", "oran_fh_cus.ext19.port",
10657 FT_STRING, BASE_NONE,
10658 NULL((void*)0), 0x0,
10659 "Entry for a given port in ext19", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10660 },
10661
10662 /* Ext 13 */
10663 { &hf_oran_prb_allocation,
10664 {"PRB allocation", "oran_fh_cus.prb-allocation",
10665 FT_STRING, BASE_NONE,
10666 NULL((void*)0), 0x0,
10667 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10668 },
10669 /* 7.7.13.2 */
10670 { &hf_oran_nextSymbolId,
10671 { "nextSymbolId", "oran_fh_cus.nextSymbolId",
10672 FT_UINT8, BASE_DEC,
10673 NULL((void*)0), 0x3c,
10674 "offset of PRB range start", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10675 },
10676 /* 7.7.13.3 */
10677 { &hf_oran_nextStartPrbc,
10678 { "nextStartPrbc", "oran_fh_cus.nextStartPrbc",
10679 FT_UINT16, BASE_DEC,
10680 NULL((void*)0), 0x03ff,
10681 "number of PRBs in PRB range", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10682 },
10683
10684 /* Puncturing patters as appears in SE 20 */
10685 { &hf_oran_puncPattern,
10686 { "puncPattern", "oran_fh_cus.puncPattern",
10687 FT_STRING, BASE_NONE,
10688 NULL((void*)0), 0x0,
10689 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10690 },
10691
10692 /* 7.7.20.2 numPuncPatterns */
10693 { &hf_oran_numPuncPatterns,
10694 { "numPuncPatterns", "oran_fh_cus.numPuncPatterns",
10695 FT_UINT8, BASE_DEC,
10696 NULL((void*)0), 0x0,
10697 "number of puncturing patterns", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
10698 },
10699 /* 7.7.20.3 symbolMask */
10700 { &hf_oran_symbolMask_ext20,
10701 { "symbolMask", "oran_fh_cus.symbolMask",
10702 FT_UINT16, BASE_HEX,
10703 NULL((void*)0), 0xfffc,
10704 "Bitmask where each bit indicates the symbols associated with the puncturing pattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10705 },
10706 /* 7.7.20.4 startPuncPrb */
10707 { &hf_oran_startPuncPrb,
10708 { "startPuncPrb", "oran_fh_cus.startPuncPrb",
10709 FT_UINT16, BASE_DEC,
10710 NULL((void*)0), 0x03ff,
10711 "starting PRB to which one puncturing pattern applies", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10712 },
10713 /* 7.7.20.5 numPuncPrb */
10714 { &hf_oran_numPuncPrb,
10715 { "numPuncPrb", "oran_fh_cus.numPuncPrb",
10716 FT_UINT8, BASE_DEC,
10717 NULL((void*)0), 0x0,
10718 "the number of PRBs of the puncturing pattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10719 },
10720 /* 7.7.20.6 puncReMask */
10721 { &hf_oran_puncReMask,
10722 { "puncReMask", "oran_fh_cus.puncReMask",
10723 FT_UINT16, BASE_DEC,
10724 NULL((void*)0), 0xfff0,
10725 "puncturing pattern RE mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10726 },
10727 /* 7.7.20.12 multiSDScope */
10728 { &hf_oran_multiSDScope,
10729 { "multiSDScope", "oran_fh_cus.multiSDScope",
10730 FT_BOOLEAN, 8,
10731 TFS(&multi_sd_scope_tfs)((0 ? (const struct true_false_string*)0 : ((&multi_sd_scope_tfs
))))
, 0x02,
10732 "multiple section description scope flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10733 },
10734 /* 7.7.20.4 rbgIncl */
10735 { &hf_oran_RbgIncl,
10736 { "rbgIncl", "oran_fh_cus.rbgIncl",
10737 FT_BOOLEAN, 8,
10738 NULL((void*)0), 0x01,
10739 "rbg included flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10740 },
10741
10742 /* 7.7.21.2 ciPrbGroupSize */
10743 { &hf_oran_ci_prb_group_size,
10744 { "ciPrbGroupSize", "oran_fh_cus.ciPrbGroupSize",
10745 FT_UINT8, BASE_DEC,
10746 NULL((void*)0), 0x0,
10747 "channel information PRB group size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10748 },
10749 /* 7.21.3 */
10750 { &hf_oran_prg_size_st5,
10751 { "prgSize", "oran_fh_cus.prgSize",
10752 FT_UINT8, BASE_DEC,
10753 VALS(prg_size_st5_vals)((0 ? (const struct _value_string*)0 : ((prg_size_st5_vals)))
)
, 0x03,
10754 "precoding resource block group size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10755 },
10756 { &hf_oran_prg_size_st6,
10757 { "prgSize", "oran_fh_cus.prgSize",
10758 FT_UINT8, BASE_DEC,
10759 VALS(prg_size_st6_vals)((0 ? (const struct _value_string*)0 : ((prg_size_st6_vals)))
)
, 0x03,
10760 "precoding resource block group size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10761 },
10762
10763 /* 7.7.17.2 numUeID */
10764 { &hf_oran_num_ueid,
10765 { "numUeID", "oran_fh_cus.numUeID",
10766 FT_UINT8, BASE_DEC,
10767 NULL((void*)0), 0x0,
10768 "number of ueIDs per user", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10769 },
10770
10771 /* 7.7.16.2 antMask */
10772 { &hf_oran_antMask,
10773 { "antMask", "oran_fh_cus.antMask",
10774 FT_UINT64, BASE_HEX,
10775 NULL((void*)0), 0xffffffffffffffff,
10776 "indices of antennas to be pre-combined per RX endpoint", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10777 },
10778
10779 /* 7.7.18.2 transmissionWindowOffset */
10780 { &hf_oran_transmissionWindowOffset,
10781 { "transmissionWindowOffset", "oran_fh_cus.transmissionWindowOffset",
10782 FT_UINT16, BASE_DEC,
10783 NULL((void*)0), 0x0,
10784 "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)}
10785 },
10786 /* 7.7.18.3 transmissionWindowSize */
10787 { &hf_oran_transmissionWindowSize,
10788 { "transmissionWindowSize", "oran_fh_cus.transmissionWindowSize",
10789 FT_UINT16, BASE_DEC,
10790 NULL((void*)0), 0x3fff,
10791 "size of the transmission window in resolution µs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10792 },
10793 /* 7.7.18.4 toT */
10794 { &hf_oran_toT,
10795 { "toT", "oran_fh_cus.toT",
10796 FT_UINT8, BASE_DEC,
10797 VALS(type_of_transmission_vals)((0 ? (const struct _value_string*)0 : ((type_of_transmission_vals
))))
, 0x03,
10798 "type of transmission", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10799 },
10800
10801 /* 7.7.2.2 bfaCompHdr */
10802 { &hf_oran_bfaCompHdr,
10803 { "bfaCompHdr", "oran_fh_cus.bfaCompHdr",
10804 FT_STRING, BASE_NONE,
10805 NULL((void*)0), 0x0,
10806 "beamforming attributes compression header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10807 },
10808 /* 7.7.2.2-2: bfAzPtWidth */
10809 { &hf_oran_bfAzPtWidth,
10810 { "bfAzPtWidth", "oran_fh_cus.bfAzPtWidth",
10811 FT_UINT8, BASE_DEC,
10812 VALS(bfa_bw_vals)((0 ? (const struct _value_string*)0 : ((bfa_bw_vals)))), 0x38,
10813 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10814 },
10815 /* 7.7.2.2-3: bfZePtWidth */
10816 { &hf_oran_bfZePtWidth,
10817 { "bfZePtWidth", "oran_fh_cus.bfZePtWidth",
10818 FT_UINT8, BASE_DEC,
10819 VALS(bfa_bw_vals)((0 ? (const struct _value_string*)0 : ((bfa_bw_vals)))), 0x07,
10820 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10821 },
10822 /* 7.7.2.2-4: bfAz3ddWidth */
10823 { &hf_oran_bfAz3ddWidth,
10824 { "bfAz3ddWidth", "oran_fh_cus.bfAz3ddWidth",
10825 FT_UINT8, BASE_DEC,
10826 VALS(bfa_bw_vals)((0 ? (const struct _value_string*)0 : ((bfa_bw_vals)))), 0x38,
10827 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10828 },
10829 /* 7.7.2.2-5: bfZe3ddWidth */
10830 { &hf_oran_bfZe3ddWidth,
10831 { "bfZe3ddWidth", "oran_fh_cus.bfZe3ddWidth",
10832 FT_UINT8, BASE_DEC,
10833 VALS(bfa_bw_vals)((0 ? (const struct _value_string*)0 : ((bfa_bw_vals)))), 0x07,
10834 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10835 },
10836
10837 /* 7.7.2.3 bfAzPt */
10838 { &hf_oran_bfAzPt,
10839 { "bfAzPt", "oran_fh_cus.bfAzPt",
10840 FT_UINT8, BASE_DEC,
10841 NULL((void*)0), 0x0,
10842 "beamforming azimuth pointing parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10843 },
10844 /* 7.7.2.4 bfZePt */
10845 { &hf_oran_bfZePt,
10846 { "bfZePt", "oran_fh_cus.bfZePt",
10847 FT_UINT8, BASE_DEC,
10848 NULL((void*)0), 0x0,
10849 "beamforming zenith pointing parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10850 },
10851 /* 7.7.2.5 bfAz3dd */
10852 { &hf_oran_bfAz3dd,
10853 { "bfAz3dd", "oran_fh_cus.bfAz3dd",
10854 FT_UINT8, BASE_DEC,
10855 NULL((void*)0), 0x0,
10856 "beamforming azimuth beamwidth parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10857 },
10858 /* 7.7.2.6 bfZe3dd */
10859 { &hf_oran_bfZe3dd,
10860 { "bfZe3dd", "oran_fh_cus.bfZe3dd",
10861 FT_UINT8, BASE_DEC,
10862 NULL((void*)0), 0x0,
10863 "beamforming zenith beamwidth parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10864 },
10865
10866 /* 7.7.2.7 bfAzSl */
10867 { &hf_oran_bfAzSl,
10868 { "bfAzSl", "oran_fh_cus.bfAzSl",
10869 FT_UINT8, BASE_DEC,
10870 VALS(sidelobe_suppression_vals)((0 ? (const struct _value_string*)0 : ((sidelobe_suppression_vals
))))
, 0x38,
10871 "beamforming azimuth sidelobe parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10872 },
10873 /* 7.7.2.8 bfZeSl */
10874 { &hf_oran_bfZeSl,
10875 { "bfZeSl", "oran_fh_cus.bfZeSl",
10876 FT_UINT8, BASE_DEC,
10877 VALS(sidelobe_suppression_vals)((0 ? (const struct _value_string*)0 : ((sidelobe_suppression_vals
))))
, 0x07,
10878 "beamforming zenith sidelobe parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10879 },
10880
10881 /* 7.5.2.17 */
10882 { &hf_oran_cmd_scope,
10883 { "cmdScope", "oran_fh_cus.cmdScope",
10884 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
10885 RVALS(cmd_scope_vals)((0 ? (const struct _range_string*)0 : ((cmd_scope_vals)))), 0x0f,
10886 "command scope", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10887 },
10888 /* 7.5.2.18 */
10889 { &hf_oran_number_of_st4_cmds,
10890 { "numberOfST4Cmds", "oran_fh_cus.numberOfST4Cmds",
10891 FT_UINT8, BASE_DEC,
10892 NULL((void*)0), 0x0,
10893 "Number of Section Type 4 commands", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10894 },
10895
10896 { &hf_oran_st4_cmd_header,
10897 { "Command common header", "oran_fh_cus.st4CmdCommonHeader",
10898 FT_STRING, BASE_NONE,
10899 NULL((void*)0), 0x0,
10900 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10901 },
10902
10903 /* 7.5.3.38 */
10904 { &hf_oran_st4_cmd_type,
10905 { "st4CmdType", "oran_fh_cus.st4CmdType",
10906 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
10907 RVALS(st4_cmd_type_vals)((0 ? (const struct _range_string*)0 : ((st4_cmd_type_vals)))
)
, 0x0,
10908 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10909 },
10910 /* 7.5.3.39 */
10911 { &hf_oran_st4_cmd_len,
10912 { "st4CmdLen", "oran_fh_cus.st4CmdLen",
10913 FT_UINT16, BASE_DEC,
10914 NULL((void*)0), 0x0,
10915 "Length of command in 32-bit words", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10916 },
10917 /* 7.5.3.40 */
10918 { &hf_oran_st4_cmd_num_slots,
10919 { "numSlots", "oran_fh_cus.st4NumSlots",
10920 FT_UINT8, BASE_DEC,
10921 NULL((void*)0), 0x0,
10922 "Contiguous slots for which command is applicable", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10923 },
10924 /* 7.5.3.41 */
10925 { &hf_oran_st4_cmd_ack_nack_req_id,
10926 { "ackNackReqId", "oran_fh_cus.ackNackReqId",
10927 FT_UINT16, BASE_DEC,
10928 NULL((void*)0), 0x0,
10929 "ACK/NACK Request Id", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10930 },
10931
10932 { &hf_oran_st4_cmd,
10933 { "Command", "oran_fh_cus.st4Cmd",
10934 FT_STRING, BASE_NONE,
10935 NULL((void*)0), 0x0,
10936 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10937 },
10938
10939 /* 7.5.3.52 */
10940 { &hf_oran_sleepmode_trx,
10941 { "sleepMode", "oran_fh_cus.sleepMode",
10942 FT_UINT8, BASE_HEX,
10943 VALS(sleep_mode_trx_vals)((0 ? (const struct _value_string*)0 : ((sleep_mode_trx_vals)
)))
, 0x03,
10944 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10945 },
10946 { &hf_oran_sleepmode_asm,
10947 { "sleepMode", "oran_fh_cus.sleepMode",
10948 FT_UINT8, BASE_HEX,
10949 VALS(sleep_mode_asm_vals)((0 ? (const struct _value_string*)0 : ((sleep_mode_asm_vals)
)))
, 0x03,
10950 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10951 },
10952
10953 /* 7.5.3.51 */
10954 { &hf_oran_log2maskbits,
10955 { "log2MaskBits", "oran_fh_cus.log2MaskBits",
10956 FT_UINT8, BASE_HEX,
10957 VALS(log2maskbits_vals)((0 ? (const struct _value_string*)0 : ((log2maskbits_vals)))
)
, 0x3c,
10958 "Number of bits to appear in antMask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10959 },
10960 /* 7.5.3.53 */
10961 { &hf_oran_num_slots_ext,
10962 { "numSlotsExt", "oran_fh_cus.numSlotsExt",
10963 FT_UINT24, BASE_HEX,
10964 NULL((void*)0), 0x0fffff,
10965 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10966 },
10967 /* 7.5.3.54 */
10968 { &hf_oran_antMask_trx_control,
10969 { "antMask", "oran_fh_cus.trxControl.antMask",
10970 FT_BYTES, BASE_NONE,
10971 NULL((void*)0), 0x0,
10972 "which antennas should sleep or wake-up", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10973 },
10974
10975 /* 7.5.3.136 */
10976 { &hf_oran_max_pwr_lvl_ind,
10977 { "maxPwrLvlInd", "oran_fh_cus.maxPwrLvlInd",
10978 FT_UINT8, BASE_DEC,
10979 NULL((void*)0), 0x0,
10980 "Maximum output power for tx-array", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10981 },
10982 /* 7.5.3.137 */
10983 { &hf_oran_array_carrier_max_pwr_reduction,
10984 { "arrayCarrierMaxPwrReduction", "oran_fh_cus.arrayCarrierMaxPwrReduction",
10985 FT_UINT16, BASE_DEC,
10986 NULL((void*)0), 0x0,
10987 "array carrier power reduction", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10988 },
10989
10990 /* 7.734.3 */
10991 { &hf_oran_port_list_en,
10992 { "portListEn", "oran_fh_cus.portListEn",
10993 FT_BOOLEAN, 8,
10994 NULL((void*)0), 0x80,
10995 "port list enabled", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
10996 },
10997 /* 7.7.34.4 */
10998 { &hf_oran_tpmi_mode,
10999 { "tpmiMode", "oran_fh_cus.tpmiMode",
11000 FT_UINT8, BASE_DEC,
11001 VALS(tpmi_mode_vals)((0 ? (const struct _value_string*)0 : ((tpmi_mode_vals)))), 0x07,
11002 "TPMI mode selection", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11003 },
11004 /* 7.7.34.5 */
11005 { &hf_oran_num_ueid_se34,
11006 { "numUeId", "oran_fh_cus.numUeId",
11007 FT_UINT8, BASE_DEC,
11008 NULL((void*)0), 0x3f,
11009 "Number of uplink layers", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11010 },
11011 { &hf_oran_ueid_se34,
11012 { "ueId", "oran_fh_cus.ueId",
11013 FT_UINT16, BASE_DEC,
11014 NULL((void*)0), 0x0,
11015 "ueId for UE layer", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11016 },
11017 { &hf_oran_num_port_list_index,
11018 { "numPortListIndex", "oran_fh_cus.numPortListIndex",
11019 FT_UINT8, BASE_DEC,
11020 NULL((void*)0), 0x0,
11021 "Number of portListIndex values to follow", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11022 },
11023 /* 7.7.34.6.2 */
11024 { &hf_oran_chan_srs_port_mask,
11025 { "srsPortMask", "oran_fh_cus.srsPortMask",
11026 FT_UINT8, BASE_DEC,
11027 NULL((void*)0), 0x0,
11028 "SRS antenna ports used for tx of UE layer", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11029 },
11030 /* 7.7.34.6.3 */
11031 { &hf_oran_tpmi_phase_7,
11032 { "tpmiPhase7", "oran_fh_cus.tpmiPhase7",
11033 FT_UINT8, BASE_DEC,
11034 VALS(tpmi_phase_vals)((0 ? (const struct _value_string*)0 : ((tpmi_phase_vals)))), 0xc0,
11035 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11036 },
11037 { &hf_oran_tpmi_phase_6,
11038 { "tpmiPhase6", "oran_fh_cus.tpmiPhase6",
11039 FT_UINT8, BASE_DEC,
11040 VALS(tpmi_phase_vals)((0 ? (const struct _value_string*)0 : ((tpmi_phase_vals)))), 0x30,
11041 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11042 },
11043 { &hf_oran_tpmi_phase_5,
11044 { "tpmiPhase5", "oran_fh_cus.tpmiPhase5",
11045 FT_UINT8, BASE_DEC,
11046 VALS(tpmi_phase_vals)((0 ? (const struct _value_string*)0 : ((tpmi_phase_vals)))), 0x0c,
11047 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11048 },
11049 { &hf_oran_tpmi_phase_4,
11050 { "tpmiPhase4", "oran_fh_cus.tpmiPhase4",
11051 FT_UINT8, BASE_DEC,
11052 VALS(tpmi_phase_vals)((0 ? (const struct _value_string*)0 : ((tpmi_phase_vals)))), 0x03,
11053 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11054 },
11055 { &hf_oran_tpmi_phase_3,
11056 { "tpmiPhase3", "oran_fh_cus.tpmiPhase3",
11057 FT_UINT8, BASE_DEC,
11058 VALS(tpmi_phase_vals)((0 ? (const struct _value_string*)0 : ((tpmi_phase_vals)))), 0xc0,
11059 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11060 },
11061 { &hf_oran_tpmi_phase_2,
11062 { "tpmiPhase2", "oran_fh_cus.tpmiPhase2",
11063 FT_UINT8, BASE_DEC,
11064 VALS(tpmi_phase_vals)((0 ? (const struct _value_string*)0 : ((tpmi_phase_vals)))), 0x30,
11065 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11066 },
11067 { &hf_oran_tpmi_phase_1,
11068 { "tpmiPhase1", "oran_fh_cus.tpmiPhase1",
11069 FT_UINT8, BASE_DEC,
11070 VALS(tpmi_phase_vals)((0 ? (const struct _value_string*)0 : ((tpmi_phase_vals)))), 0x0c,
11071 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11072 },
11073 { &hf_oran_tpmi_phase_0,
11074 { "tpmiPhase0", "oran_fh_cus.tpmiPhase0",
11075 FT_UINT8, BASE_DEC,
11076 VALS(tpmi_phase_vals)((0 ? (const struct _value_string*)0 : ((tpmi_phase_vals)))), 0x03,
11077 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11078 },
11079
11080 /* 7.5.3.55 */
11081 { &hf_oran_ready,
11082 { "ready", "oran_fh_cus.ready",
11083 FT_BOOLEAN, 8,
11084 TFS(&ready_tfs)((0 ? (const struct true_false_string*)0 : ((&ready_tfs))
))
, 0x01,
11085 "wake-up ready indicator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11086 },
11087 /* 7.5.3.34 */
11088 { &hf_oran_number_of_acks,
11089 { "numberOfAcks", "oran_fh_cus.numberOfAcks",
11090 FT_UINT8, BASE_DEC,
11091 NULL((void*)0), 0x0,
11092 "number of ACKs for one eAxC_ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11093 },
11094 /* 7.5.3.35 */
11095 { &hf_oran_number_of_nacks,
11096 { "numberOfNacks", "oran_fh_cus.numberOfNacks",
11097 FT_UINT8, BASE_DEC,
11098 NULL((void*)0), 0x0,
11099 "number of NACKs for one eAxC_ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11100 },
11101 /* 7.5.3.36 */
11102 { &hf_oran_ackid,
11103 { "ackId", "oran_fh_cus.ackId",
11104 FT_UINT16, BASE_DEC,
11105 NULL((void*)0), 0x0,
11106 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11107 },
11108 /* 7.5.3.37 */
11109 { &hf_oran_nackid,
11110 { "nackId", "oran_fh_cus.nackId",
11111 FT_UINT16, BASE_DEC,
11112 NULL((void*)0), 0x0,
11113 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11114 },
11115
11116 /* Links between acknack requests & responses */
11117 { &hf_oran_acknack_request_frame,
11118 { "Request Frame", "oran_fh_cus.ackNackId.request-frame",
11119 FT_FRAMENUM, BASE_NONE,
11120 FRAMENUM_TYPE(FT_FRAMENUM_REQUEST)((gpointer) (glong) (FT_FRAMENUM_REQUEST)), 0x0,
11121 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11122 },
11123 { &hf_oran_acknack_request_time,
11124 { "Time since request in ms", "oran_fh_cus.ackNackId.time-since-request",
11125 FT_UINT32, BASE_DEC,
11126 NULL((void*)0), 0x0,
11127 "Time between request and response", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11128 },
11129 { &hf_oran_acknack_request_type,
11130 { "Request Type", "oran_fh_cus.ackNackId.request-type",
11131 FT_UINT32, BASE_DEC,
11132 VALS(acknack_type_vals)((0 ? (const struct _value_string*)0 : ((acknack_type_vals)))
)
, 0x0,
11133 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11134 },
11135 { &hf_oran_acknack_response_frame,
11136 { "Response Frame", "oran_fh_cus.ackNackId.response-frame",
11137 FT_FRAMENUM, BASE_NONE,
11138 FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE)((gpointer) (glong) (FT_FRAMENUM_RESPONSE)), 0x0,
11139 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11140 },
11141 { &hf_oran_acknack_response_time,
11142 { "Time to response in ms", "oran_fh_cus.ackNackId.time-to-response",
11143 FT_UINT32, BASE_DEC,
11144 NULL((void*)0), 0x0,
11145 "Time between request and response", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11146 },
11147
11148 /* 7.5.3.43 */
11149 { &hf_oran_disable_tdbfns,
11150 { "disableTDBFNs", "oran_fh_cus.disableTDBFNs",
11151 FT_BOOLEAN, 8,
11152 TFS(&disable_tdbfns_tfs)((0 ? (const struct true_false_string*)0 : ((&disable_tdbfns_tfs
))))
, 0x80,
11153 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11154 },
11155
11156 /* 7.5.3.44 */
11157 { &hf_oran_td_beam_group,
11158 { "tdBeamGrp", "oran_fh_cus.tdBeamGrp",
11159 FT_UINT16, BASE_HEX,
11160 NULL((void*)0), 0x7fff,
11161 "Applies to symbolMask in command header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11162 },
11163 /* 7.5.3.43 */
11164 { &hf_oran_disable_tdbfws,
11165 { "disableTDBFWs", "oran_fh_cus.disableTDBFWs",
11166 FT_BOOLEAN, 8,
11167 TFS(&beam_numbers_included_tfs)((0 ? (const struct true_false_string*)0 : ((&beam_numbers_included_tfs
))))
, 0x80,
11168 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11169 },
11170
11171 /* 7.5.3.56 */
11172 { &hf_oran_td_beam_num,
11173 { "tdBeamNum", "oran_fh_cus.tdBeamNum",
11174 FT_UINT16, BASE_HEX,
11175 NULL((void*)0), 0x7fff,
11176 "time-domain beam number", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11177 },
11178
11179 /* 7.5.3.49 */
11180 { &hf_oran_dir_pattern,
11181 { "dirPattern", "oran_fh_cus.dirPattern",
11182 FT_BOOLEAN, 16,
11183 TFS(&symbol_direction_tfs)((0 ? (const struct true_false_string*)0 : ((&symbol_direction_tfs
))))
, 0x3fff,
11184 "symbol data direction (gNB Tx/Rx) pattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11185 },
11186 /* 7.5.3.50 */
11187 { &hf_oran_guard_pattern,
11188 { "guardPattern", "oran_fh_cus.guardPattern",
11189 FT_BOOLEAN, 16,
11190 TFS(&symbol_guard_tfs)((0 ? (const struct true_false_string*)0 : ((&symbol_guard_tfs
))))
, 0x3fff,
11191 "guard pattern bitmask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11192 },
11193
11194 /* For convenient filtering */
11195 { &hf_oran_cplane,
11196 { "C-Plane", "oran_fh_cus.c-plane",
11197 FT_NONE, BASE_NONE,
11198 NULL((void*)0), 0x0,
11199 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11200 },
11201 { &hf_oran_uplane,
11202 { "U-Plane", "oran_fh_cus.u-plane",
11203 FT_NONE, BASE_NONE,
11204 NULL((void*)0), 0x0,
11205 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11206 },
11207 { &hf_oran_bf,
11208 { "BeamForming", "oran_fh_cus.bf",
11209 FT_NONE, BASE_NONE,
11210 NULL((void*)0), 0x0,
11211 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11212 },
11213 { &hf_oran_zero_prb,
11214 { "Zero PRB", "oran_fh_cus.zero-prb",
11215 FT_NONE, BASE_NONE,
11216 NULL((void*)0), 0x0,
11217 "All of the REs in this PRB are zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11218 },
11219 { &hf_oran_nonzero_prb,
11220 { "Non-Zero PRB", "oran_fh_cus.nonzero-prb",
11221 FT_NONE, BASE_NONE,
11222 NULL((void*)0), 0x0,
11223 "Not all of the REs in this PRB are zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11224 },
11225 /* TODO: rename, as now used in ext1 too, which doesn't really have bundles? */
11226 { &hf_oran_bundle_weights_all_zero,
11227 { "Bundle Weights all zero", "oran_fh_cus.zero-bundle",
11228 FT_NONE, BASE_NONE,
11229 NULL((void*)0), 0x0,
11230 "All of the weights in a bundle are zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11231 },
11232
11233
11234 /* 5.1.3.2.7 */
11235 { &hf_oran_ecpri_pcid,
11236 { "ecpriPcid", "oran_fh_cus.ecpriPcid",
11237 FT_NONE, BASE_NONE,
11238 NULL((void*)0), 0x0,
11239 "IQ data transfer message series identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11240 },
11241 { &hf_oran_ecpri_rtcid,
11242 { "ecpriRtcid", "oran_fh_cus.ecpriRtcid",
11243 FT_NONE, BASE_NONE,
11244 NULL((void*)0), 0x0,
11245 "Real time control data identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11246 },
11247 /* 5.1.3.2.8 */
11248 { &hf_oran_ecpri_seqid,
11249 { "ecpriSeqid", "oran_fh_cus.ecpriSeqid",
11250 FT_NONE, BASE_NONE,
11251 NULL((void*)0), 0x0,
11252 "message identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11253 },
11254
11255 /* 7.7.23.2 */
11256 { &hf_oran_num_sym_prb_pattern,
11257 { "numSymPrbPattern", "oran_fh_cus.numSymPrbPattern",
11258 FT_UINT8, BASE_DEC,
11259 NULL((void*)0), 0xf0,
11260 "number of symbol and resource block patterns", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11261 },
11262 /* 7.7.23.9 */
11263 { &hf_oran_prb_mode,
11264 { "prbMode", "oran_fh_cus.prbMode",
11265 FT_BOOLEAN, 8,
11266 TFS(&prb_mode_tfs)((0 ? (const struct true_false_string*)0 : ((&prb_mode_tfs
))))
, 0x01,
11267 "PRB Mode", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11268 },
11269 /* 7.7.23.4 */
11270 { &hf_oran_sym_prb_pattern,
11271 { "symPrbPattern", "oran_fh_cus.symPrbPattern",
11272 FT_STRING, BASE_NONE,
11273 NULL((void*)0), 0x0,
11274 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11275 },
11276 /* 7.7.23.3 */
11277 { &hf_oran_sym_mask,
11278 { "symMask", "oran_fh_cus.symMask",
11279 FT_UINT16, BASE_HEX,
11280 NULL((void*)0), 0x3fff,
11281 "symbol mask part of symPrbPattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11282 },
11283 /* 7.7.23.5 */
11284 {&hf_oran_num_mc_scale_offset,
11285 {"numMcScaleOffset", "oran_fh_cus.numMcScaleOffset",
11286 FT_UINT8, BASE_DEC,
11287 NULL((void*)0), 0xf0,
11288 "number of modulation compression scaling value per symPrbPattern",
11289 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11290 },
11291 /* 7.7.23.4 */
11292 { &hf_oran_prb_pattern,
11293 { "prbPattern", "oran_fh_cus.prbPattern",
11294 FT_UINT8, BASE_DEC,
11295 NULL((void*)0), 0x0f,
11296 "size of one PRB block of one SymPrbPattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11297 },
11298 /* 7.7.23.10 */
11299 { &hf_oran_prb_blk_offset,
11300 { "prbBlkOffset", "oran_fh_cus.prbBlkOffset",
11301 FT_UINT16, BASE_DEC,
11302 NULL((void*)0), 0x0ff0,
11303 "offset to start of PRB block", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11304 },
11305
11306 /* 7.7.23.11 */
11307 { &hf_oran_prb_blk_size,
11308 { "prbBlkSize", "oran_fh_cus.prbBlkSize",
11309 FT_UINT16, BASE_DEC,
11310 NULL((void*)0), 0x0ff0,
11311 "size of one PRB block of one SymPrbPattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11312 },
11313
11314 /* 7.7.3.2 */
11315 { &hf_oran_codebook_index,
11316 { "codebookIndex", "oran_fh_cus.codebookIndex",
11317 FT_UINT8, BASE_DEC,
11318 NULL((void*)0), 0x0,
11319 "precoder codebook used for transmission", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11320 },
11321 /* 7.7.3.3 */
11322 { &hf_oran_layerid,
11323 { "layerID", "oran_fh_cus.layerID",
11324 FT_UINT8, BASE_DEC,
11325 NULL((void*)0), 0xf0,
11326 "Layer ID for DL transmission", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11327 },
11328 /* 7.7.3.5 */
11329 { &hf_oran_numlayers,
11330 { "numLayers", "oran_fh_cus.numLayers",
11331 FT_UINT8, BASE_DEC,
11332 NULL((void*)0), 0x0f,
11333 "number of layers for DL transmission", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11334 },
11335 /* 7.7.3.4 */
11336 { &hf_oran_txscheme,
11337 { "txScheme", "oran_fh_cus.txScheme",
11338 FT_UINT8, BASE_DEC,
11339 NULL((void*)0), 0xf0,
11340 "transmission scheme", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11341 },
11342 /* 7.7.3.6 */
11343 { &hf_oran_crs_remask,
11344 { "crsReMask", "oran_fh_cus.crsReMask",
11345 FT_UINT16, BASE_HEX,
11346 NULL((void*)0), 0x0fff,
11347 "CRS resource element mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11348 },
11349 /* 7.7.3.8 */
11350 { &hf_oran_crs_shift,
11351 { "crsShift", "oran_fh_cus.crsShift",
11352 FT_UINT8, BASE_HEX,
11353 NULL((void*)0), 0x80,
11354 "CRS resource element mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11355 },
11356 /* 7.7.3.7 */
11357 { &hf_oran_crs_symnum,
11358 { "crsSymNum", "oran_fh_cus.crsSymNum",
11359 FT_UINT8, BASE_DEC,
11360 NULL((void*)0), 0x0f,
11361 "CRS symbol number indication", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11362 },
11363 /* 7.7.3.9 */
11364 { &hf_oran_beamid_ap1,
11365 { "beamIdAP1", "oran_fh_cus.beamIdAP1",
11366 FT_UINT16, BASE_DEC,
11367 NULL((void*)0), 0x7fff,
11368 "beam id to be used for antenna port 1", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11369 },
11370 /* 7.7.3.10 */
11371 { &hf_oran_beamid_ap2,
11372 { "beamIdAP2", "oran_fh_cus.beamIdAP2",
11373 FT_UINT16, BASE_DEC,
11374 NULL((void*)0), 0x7fff,
11375 "beam id to be used for antenna port 2", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11376 },
11377 /* 7.7.3.11 */
11378 { &hf_oran_beamid_ap3,
11379 { "beamIdAP3", "oran_fh_cus.beamIdAP3",
11380 FT_UINT16, BASE_DEC,
11381 NULL((void*)0), 0x7fff,
11382 "beam id to be used for antenna port 3", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11383 },
11384
11385 /* 7.7.10.3a */
11386 { &hf_oran_port_list_index,
11387 { "portListIndex", "oran_fh_cus.portListIndex",
11388 FT_UINT8, BASE_DEC,
11389 NULL((void*)0), 0x0,
11390 "the index of an eAxC_ID in the port-list", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11391 },
11392
11393 { &hf_oran_alpn_per_sym,
11394 { "alpnPerSym", "oran_fh_cus.alpnPerSym",
11395 FT_UINT8, BASE_HEX,
11396 VALS(alpn_per_sym_vals)((0 ? (const struct _value_string*)0 : ((alpn_per_sym_vals)))
)
, 0x80,
11397 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11398 },
11399 { &hf_oran_ant_dmrs_snr,
11400 { "antDmrsSnr", "oran_fh_cus.antDmrsSnr",
11401 FT_UINT8, BASE_HEX,
11402 VALS(ant_dmrs_snr_vals)((0 ? (const struct _value_string*)0 : ((ant_dmrs_snr_vals)))
)
, 0x40,
11403 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11404 },
11405
11406 /* 7.7.24.6 */
11407 { &hf_oran_user_group_size,
11408 { "userGroupSize", "oran_fh_cus.userGroupSize",
11409 FT_UINT8, BASE_DEC,
11410 NULL((void*)0), 0x1f,
11411 "number of UE data layers in the user group identified by userGroupId", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11412 },
11413 /* 7.7.24.7 */
11414 { &hf_oran_user_group_id,
11415 { "userGroupId", "oran_fh_cus.userGroupId",
11416 FT_UINT8, BASE_DEC,
11417 NULL((void*)0), 0x0,
11418 "indicates user group described by the section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11419 },
11420 /* 7.7.24.8 */
11421 { &hf_oran_entry_type,
11422 { "entryType", "oran_fh_cus.entryType",
11423 FT_UINT8, BASE_DEC,
11424 VALS(entry_type_vals)((0 ? (const struct _value_string*)0 : ((entry_type_vals)))), 0xe0,
11425 "indicates format of the entry", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11426 },
11427 /* 7.7.24.9 */
11428 { &hf_oran_dmrs_port_number,
11429 { "dmrsPortNumber", "oran_fh_cus.dmrsPortNumber",
11430 FT_UINT8, BASE_DEC,
11431 NULL((void*)0), 0x1f,
11432 "DMRS antenna port number for the associated ueId", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11433 },
11434 /* 7.7.24.10 */
11435 { &hf_oran_ueid_reset,
11436 { "ueidReset", "oran_fh_cus.ueidReset",
11437 FT_BOOLEAN, 8,
11438 TFS(&tfs_ueid_reset)((0 ? (const struct true_false_string*)0 : ((&tfs_ueid_reset
))))
, 0x80,
11439 "same UEID as the previous slot", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11440 },
11441 /* 7.7.24.11 */
11442 { &hf_oran_dmrs_symbol_mask,
11443 { "dmrsSymbolMask", "oran_fh_cus.dmrsSymbolMask",
11444 FT_UINT16, BASE_HEX,
11445 NULL((void*)0), 0x3fff,
11446 "symbols within the slot containing DMRS", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11447 },
11448 { &hf_oran_dmrs_symbol_mask_s13,
11449 { "symbol 13", "oran_fh_cus.dmrsSymbolMask.symbol-13",
11450 FT_BOOLEAN, 16,
11451 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x2000,
11452 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11453 },
11454 { &hf_oran_dmrs_symbol_mask_s12,
11455 { "symbol 12", "oran_fh_cus.dmrsSymbolMask.symbol-12",
11456 FT_BOOLEAN, 16,
11457 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x1000,
11458 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11459 },
11460 { &hf_oran_dmrs_symbol_mask_s11,
11461 { "symbol 11", "oran_fh_cus.dmrsSymbolMask.symbol-11",
11462 FT_BOOLEAN, 16,
11463 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0800,
11464 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11465 },
11466 { &hf_oran_dmrs_symbol_mask_s10,
11467 { "symbol 10", "oran_fh_cus.dmrsSymbolMask.symbol-10",
11468 FT_BOOLEAN, 16,
11469 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0400,
11470 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11471 },
11472 { &hf_oran_dmrs_symbol_mask_s9,
11473 { "symbol 9", "oran_fh_cus.dmrsSymbolMask.symbol-9",
11474 FT_BOOLEAN, 16,
11475 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0200,
11476 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11477 },
11478 { &hf_oran_dmrs_symbol_mask_s8,
11479 { "symbol 8", "oran_fh_cus.dmrsSymbolMask.symbol-8",
11480 FT_BOOLEAN, 16,
11481 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0100,
11482 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11483 },
11484 { &hf_oran_dmrs_symbol_mask_s7,
11485 { "symbol 7", "oran_fh_cus.dmrsSymbolMask.symbol-7",
11486 FT_BOOLEAN, 16,
11487 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0080,
11488 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11489 },
11490 { &hf_oran_dmrs_symbol_mask_s6,
11491 { "symbol 6", "oran_fh_cus.dmrsSymbolMask.symbol-6",
11492 FT_BOOLEAN, 16,
11493 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0040,
11494 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11495 },
11496 { &hf_oran_dmrs_symbol_mask_s5,
11497 { "symbol 5", "oran_fh_cus.dmrsSymbolMask.symbol-5",
11498 FT_BOOLEAN, 16,
11499 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0020,
11500 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11501 },
11502 { &hf_oran_dmrs_symbol_mask_s4,
11503 { "symbol 4", "oran_fh_cus.dmrsSymbolMask.symbol-4",
11504 FT_BOOLEAN, 16,
11505 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0010,
11506 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11507 },
11508 { &hf_oran_dmrs_symbol_mask_s3,
11509 { "symbol 3", "oran_fh_cus.dmrsSymbolMask.symbol-3",
11510 FT_BOOLEAN, 16,
11511 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0008,
11512 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11513 },
11514 { &hf_oran_dmrs_symbol_mask_s2,
11515 { "symbol 2", "oran_fh_cus.dmrsSymbolMask.symbol-2",
11516 FT_BOOLEAN, 16,
11517 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0004,
11518 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11519 },
11520 { &hf_oran_dmrs_symbol_mask_s1,
11521 { "symbol 1", "oran_fh_cus.dmrsSymbolMask.symbol-1",
11522 FT_BOOLEAN, 16,
11523 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0002,
11524 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11525 },
11526 { &hf_oran_dmrs_symbol_mask_s0,
11527 { "symbol 0", "oran_fh_cus.dmrsSymbolMask.symbol-0",
11528 FT_BOOLEAN, 16,
11529 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x0001,
11530 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11531 },
11532
11533 /* 7.7.24.12 */
11534 { &hf_oran_scrambling,
11535 { "scrambling", "oran_fh_cus.scrambling",
11536 FT_UINT16, BASE_HEX,
11537 NULL((void*)0), 0x0,
11538 "used to calculate the seed value required to initialize pseudo-random generator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11539 },
11540 /* 7.7.24.13 */
11541 { &hf_oran_nscid,
11542 { "nscid", "oran_fh_cus.nscid",
11543 FT_UINT8, BASE_HEX,
11544 NULL((void*)0), 0x80,
11545 "used to calculate the seed value for pseudo-random generator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11546 },
11547 /* 7.7.24.14 */
11548 { &hf_oran_dtype,
11549 { "dType", "oran_fh_cus.dType",
11550 FT_UINT8, BASE_HEX,
11551 VALS(dtype_vals)((0 ? (const struct _value_string*)0 : ((dtype_vals)))), 0x40,
11552 "PUSCH DMRS configuration type", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11553 },
11554 /* 7.7.24.15 */
11555 { &hf_oran_cmd_without_data,
11556 { "cmdWithoutData", "oran_fh_cus.cmdWithoutData",
11557 FT_UINT8, BASE_HEX,
11558 NULL((void*)0), 0x30,
11559 "number of DMRS CDM groups without data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11560 },
11561 /* 7.7.24.16 */
11562 { &hf_oran_lambda,
11563 { "lambda", "oran_fh_cus.lambda",
11564 FT_UINT8, BASE_HEX,
11565 NULL((void*)0), 0x0c,
11566 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11567 },
11568 /* 7.7.24.19 */
11569 { &hf_oran_first_prb,
11570 { "firstPrb", "oran_fh_cus.firstPrb",
11571 FT_UINT16, BASE_DEC,
11572 NULL((void*)0), 0x03fe,
11573 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11574 },
11575 /* 7.7.24.20 */
11576 { &hf_oran_last_prb,
11577 { "lastPrb", "oran_fh_cus.lastPrb",
11578 FT_UINT16, BASE_DEC,
11579 NULL((void*)0), 0x01ff,
11580 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11581 },
11582
11583 /* 7.7.24.17 */
11584 /* TODO: add value_string */
11585 { &hf_oran_low_papr_type,
11586 { "lowPaprType", "oran_fh_cus.lowPaprType",
11587 FT_UINT8, BASE_HEX,
11588 VALS(papr_type_vals)((0 ? (const struct _value_string*)0 : ((papr_type_vals)))), 0x30,
11589 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11590 },
11591 /* 7.7.24.18 */
11592 { &hf_oran_hopping_mode,
11593 { "hoppingMode", "oran_fh_cus.hoppingMode",
11594 FT_UINT8, BASE_HEX,
11595 VALS(hopping_mode_vals)((0 ? (const struct _value_string*)0 : ((hopping_mode_vals)))
)
, 0x0c,
11596 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11597 },
11598
11599 { &hf_oran_tx_win_for_on_air_symbol_l,
11600 { "txWinForOnAirSymbol", "oran_fh_cus.txWinForOnAirSymbol",
11601 FT_UINT8, BASE_DEC,
11602 NULL((void*)0), 0xf0,
11603 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11604 },
11605 { &hf_oran_tx_win_for_on_air_symbol_r,
11606 { "txWinForOnAirSymbol", "oran_fh_cus.txWinForOnAirSymbol",
11607 FT_UINT8, BASE_DEC,
11608 NULL((void*)0), 0x0f,
11609 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11610 },
11611 /* 7.7.26.2 */
11612 { &hf_oran_num_fo_fb,
11613 { "numFoFb", "oran_fh_cus.numFoFb",
11614 FT_UINT8, BASE_DEC,
11615 NULL((void*)0), 0x7f,
11616 "number of frequency offset feedback", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11617 },
11618 /* 7.7.26.3 */
11619 { &hf_oran_freq_offset_fb,
11620 { "freqOffsetFb", "oran_fh_cus.freqOffsetFb",
11621 FT_UINT16, BASE_HEX_DEC | BASE_RANGE_STRING0x00000100,
11622 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
11623 "UE frequency offset feedback", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11624 },
11625
11626 /* 7.7.28.2 */
11627 { &hf_oran_num_ue_sinr_rpt,
11628 { "numUeSinrRpt", "oran_fh_cus.numUeSinrRpt",
11629 FT_UINT8, BASE_DEC,
11630 NULL((void*)0), 0x1f,
11631 "number of sinr reported UEs {1 - 12}", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11632 },
11633
11634 /* 7.5.2.19 */
11635 { &hf_oran_num_sinr_per_prb,
11636 { "numSinrPerPrb", "oran_fh_cus.numSinrPerPrb",
11637 FT_UINT8, BASE_DEC,
11638 VALS(num_sinr_per_prb_vals)((0 ? (const struct _value_string*)0 : ((num_sinr_per_prb_vals
))))
, 0x70,
11639 "number of SINR values per PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11640 },
11641 { &hf_oran_num_sinr_per_prb_right,
11642 { "numSinrPerPrb", "oran_fh_cus.numSinrPerPrb",
11643 FT_UINT8, BASE_DEC,
11644 VALS(num_sinr_per_prb_vals)((0 ? (const struct _value_string*)0 : ((num_sinr_per_prb_vals
))))
, 0x07,
11645 "number of SINR values per PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11646 },
11647 { &hf_oran_num_sinr_per_prb_st9,
11648 { "numSinrPerPrb", "oran_fh_cus.numSinrPerPrb",
11649 FT_UINT8, BASE_DEC,
11650 VALS(num_sinr_per_prb_vals)((0 ? (const struct _value_string*)0 : ((num_sinr_per_prb_vals
))))
, 0xe0,
11651 "number of SINR values per PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11652 },
11653
11654 /* 7.5.3.68 */
11655 { &hf_oran_sinr_value,
11656 { "sinrValue", "oran_fh_cus.sinrValue",
11657 FT_FLOAT, BASE_NONE,
11658 NULL((void*)0), 0x0,
11659 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11660 },
11661
11662 { &hf_oran_measurement_report,
11663 { "Measurement Report", "oran_fh_cus.measurement-report",
11664 FT_STRING, BASE_NONE,
11665 NULL((void*)0), 0x0,
11666 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11667 },
11668 /* 7.5.3.57 */
11669 { &hf_oran_mf,
11670 { "mf", "oran_fh_cus.mf",
11671 FT_BOOLEAN, 8,
11672 TFS(&measurement_flag_tfs)((0 ? (const struct true_false_string*)0 : ((&measurement_flag_tfs
))))
, 0x80,
11673 "measurement flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11674 },
11675 /* 7.5.3.59 */
11676 { &hf_oran_meas_data_size,
11677 { "measDataSize", "oran_fh_cus.measDataSize",
11678 FT_UINT16, BASE_DEC,
11679 NULL((void*)0), 0x0,
11680 "measurement data size (in words)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11681 },
11682
11683 /* 7.5.3.58 */
11684 { &hf_oran_meas_type_id,
11685 { "measTypeId", "oran_fh_cus.measTypeId",
11686 FT_UINT8, BASE_DEC,
11687 VALS(meas_type_id_vals)((0 ? (const struct _value_string*)0 : ((meas_type_id_vals)))
)
, 0x7F,
11688 "measurement report type identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11689 },
11690 /* 7.5.3.66 */
11691 { &hf_oran_num_elements,
11692 { "numElements", "oran_fh_cus.numElements",
11693 FT_UINT8, BASE_DEC,
11694 NULL((void*)0), 0x0,
11695 "measurement report type identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11696 },
11697 /* 7.5.3.60 */
11698 { &hf_oran_ue_tae,
11699 { "ueTae", "oran_fh_cus.ueTae",
11700 FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
11701 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
11702 "UE Timing Advance Error", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11703 },
11704 /* 7.5.3.61 */
11705 { &hf_oran_ue_layer_power,
11706 { "ueLayerPower", "oran_fh_cus.ueLayerPower",
11707 FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
11708 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
11709 "UE Layer Power", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11710 },
11711
11712 /* 7.5.3.62 */
11713 { &hf_oran_ue_freq_offset,
11714 { "ueFreqOffset", "oran_fh_cus.ueFreqOffset",
11715 FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
11716 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
11717 "UE frequency offset", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11718 },
11719 /* 7.5.3.63 */
11720 { &hf_oran_ipn_power,
11721 { "ipnPower", "oran_fh_cus.ipnPower",
11722 FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
11723 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
11724 "Interference plus Noise power", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11725 },
11726 /* 7.5.3.64 */
11727 { &hf_oran_ant_dmrs_snr_val,
11728 { "antDmrsSnrVal", "oran_fh_cus.antDmrsSnrVal",
11729 FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
11730 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
11731 "antenna DMRS-SNR", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11732 },
11733
11734 { &hf_oran_measurement_command,
11735 { "Measurement Command", "oran_fh_cus.measurement-command",
11736 FT_STRING, BASE_NONE,
11737 NULL((void*)0), 0x0,
11738 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11739 },
11740
11741 /* 7.5.27.2 */
11742 { &hf_oran_beam_type,
11743 {"beamType", "oran_fh_cus.beamType",
11744 FT_UINT16, BASE_DEC,
11745 VALS(beam_type_vals)((0 ? (const struct _value_string*)0 : ((beam_type_vals)))), 0xc0,
11746 NULL((void*)0),
11747 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11748 },
11749 /* 7.5.3.65 */
11750 { &hf_oran_meas_cmd_size,
11751 {"measCmdSize", "oran_fh_cus.measCmdSize",
11752 FT_UINT16, BASE_DEC,
11753 NULL((void*)0), 0x0,
11754 "measurement command size in words",
11755 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11756 },
11757 /* 7.5.3.73 */
11758 { &hf_oran_curr_ue_freq_offset,
11759 { "currUeFreqOffset", "oran_fh_cus.currUeFreqOffset",
11760 FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
11761 RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values
))))
, 0x0,
11762 "Estimated UE frequency offset in current slot (Hz)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11763 },
11764
11765 { &hf_oran_symbol_reordering_layer,
11766 { "Layer", "oran_fh_cus.layer",
11767 FT_STRING, BASE_NONE,
11768 NULL((void*)0), 0x0,
11769 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11770 },
11771 { &hf_oran_dmrs_entry,
11772 { "Entry", "oran_fh_cus.dmrs-entry",
11773 FT_STRING, BASE_NONE,
11774 NULL((void*)0), 0x0,
11775 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11776 },
11777
11778 /* 7.7.29.3 */
11779 { &hf_oran_cd_scg_size,
11780 {"cdScgSize", "oran_fh_cus.cdScgSize",
11781 FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
11782 RVALS(cd_scg_size_vals)((0 ? (const struct _range_string*)0 : ((cd_scg_size_vals)))), 0x0f,
11783 "Cyclic delay subcarrier group size",
11784 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11785 },
11786 /* 7.7.29.4 */
11787 { &hf_oran_cd_scg_phase_step,
11788 {"cdScgPhaseStep", "oran_fh_cus.cdScgPhaseStep",
11789 FT_INT8, BASE_DEC,
11790 NULL((void*)0), 0x0,
11791 "Cyclic delay subcarrier group phase step",
11792 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11793 },
11794
11795 { &hf_oran_sinr_prb,
11796 { "PRB", "oran_fh_cus.sinr.prb",
11797 FT_STRING, BASE_NONE,
11798 NULL((void*)0), 0x0,
11799 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11800 },
11801 /* 7.5.2.20 */
11802 { &hf_oran_oru_control_sinr_slot_mask_id,
11803 {"oruControlSinrSlotMaskId", "oran_fh_cus.oruControlSinrSlotMaskId",
11804 FT_UINT8, BASE_DEC,
11805 NULL((void*)0), 0x1f,
11806 "SINR time resolution",
11807 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11808 },
11809 /* 7.7.24.21 */
11810 { &hf_oran_pos_meas,
11811 {"posMeas", "oran_fh_cus.posMeas",
11812 FT_BOOLEAN, 8,
11813 TFS(&tfs_report_no_report_pos_meas)((0 ? (const struct true_false_string*)0 : ((&tfs_report_no_report_pos_meas
))))
, 0x40,
11814 "Positioning measurement report request",
11815 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11816 },
11817
11818 /* 7.5.3.69 */
11819 { &hf_oran_ue_radial_speed,
11820 {"ueRadialSpeed", "oran_fh_cus.ueRadialSpeed",
11821 FT_UINT16, BASE_DEC,
11822 NULL((void*)0), 0x0,
11823 "UE radial speed",
11824 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11825 },
11826 /* 7.5.3.70 */
11827 { &hf_oran_ue_az_aoa,
11828 {"ueAzAoa", "oran_fh_cus.ueAzAoa",
11829 FT_UINT16, BASE_DEC,
11830 NULL((void*)0), 0x0,
11831 "UE azimuth angle of arrival",
11832 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11833 },
11834 /* 7.5.3.71 */
11835 { &hf_oran_ue_ze_aoa,
11836 {"ueZeAoa", "oran_fh_cus.ueZeAoa",
11837 FT_UINT16, BASE_DEC,
11838 NULL((void*)0), 0x0,
11839 "UE zenith angle of arrival",
11840 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11841 },
11842 /* 7.5.3.72 */
11843 { &hf_oran_ue_pos_toa_offset,
11844 {"uePosToaOffset", "oran_fh_cus.uePosToaOffset",
11845 FT_UINT16, BASE_DEC,
11846 NULL((void*)0), 0x0,
11847 "UE positioning time of arrival offset",
11848 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11849 },
11850
11851 /* 7.7.30.2 */
11852 { &hf_oran_num_rep_ue,
11853 {"numRepUe", "oran_fh_cus.numRepUe",
11854 FT_UINT8, BASE_DEC,
11855 NULL((void*)0), 0x0f,
11856 "Number of UEs with PUSCH repetition",
11857 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11858 },
11859 /* 7.7.30.3 */
11860 { &hf_oran_rep_ueid,
11861 {"repUeId", "oran_fh_cus.repUeId",
11862 FT_UINT16, BASE_DEC,
11863 NULL((void*)0), 0x7fff,
11864 "UEId the PUSCH is part of",
11865 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11866 },
11867 /* 7.7.30.4 */
11868 { &hf_oran_is_last_rep,
11869 {"isLastRep", "oran_fh_cus.isLastRep",
11870 FT_BOOLEAN, 8,
11871 NULL((void*)0), 0x40,
11872 "Last transmission in the repetition",
11873 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11874 },
11875 /* 7.7.30.5 */
11876 { &hf_oran_rep_index,
11877 {"repIndex", "oran_fh_cus.repIndex",
11878 FT_UINT8, BASE_DEC,
11879 NULL((void*)0), 0x3f,
11880 "Repetition index of the PUSCH transmission",
11881 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11882 },
11883 /* 7.7.30.6 */
11884 { &hf_oran_num_reps,
11885 {"numReps", "oran_fh_cus.numReps",
11886 FT_UINT8, BASE_DEC,
11887 NULL((void*)0), 0x3f,
11888 "The number of total PUSCH repetitions",
11889 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11890 },
11891
11892 /* 7.7.31.2 */
11893 { &hf_oran_mcs_table,
11894 {"mcsTable", "oran_fh_cus.mcsTable",
11895 FT_UINT8, BASE_DEC,
11896 VALS(mcs_table_vals)((0 ? (const struct _value_string*)0 : ((mcs_table_vals)))), 0x0f,
11897 "MCS index table",
11898 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11899 },
11900 /* 7.7.31.3 */
11901 { &hf_oran_mcs_index,
11902 {"mcsIndex", "oran_fh_cus.mcsIndex",
11903 FT_UINT8, BASE_DEC,
11904 NULL((void*)0), 0x3f,
11905 "MCS index value",
11906 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11907 },
11908
11909 /* 7.7.33.3 */
11910 { &hf_oran_num_meas_req,
11911 {"numMeasReq", "oran_fh_cus.numMeasReq",
11912 FT_UINT8, BASE_DEC,
11913 NULL((void*)0), 0x1f,
11914 "Number of UEs for which meas is requested",
11915 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11916 },
11917 /* 7.7.32.5 */
11918 { &hf_oran_ue_rank,
11919 {"ueRank", "oran_fh_cus.ueRank",
11920 FT_UINT8, BASE_DEC,
11921 VALS(ue_rank_vals)((0 ? (const struct _value_string*)0 : ((ue_rank_vals)))), 0x0f,
11922 "Number of UE layers under evaluation",
11923 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11924 },
11925 /* 7.7.32.6 */
11926 { &hf_oran_num_of_ue_ant_ports,
11927 {"numOfUeAntPorts", "oran_fh_cus.numofUeAntPorts",
11928 FT_UINT8, BASE_DEC,
11929 VALS(num_of_ue_ant_ports_vals)((0 ? (const struct _value_string*)0 : ((num_of_ue_ant_ports_vals
))))
, 0xf0,
11930 "Used for the PUSCH tx under evaluation",
11931 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11932 },
11933 /* 7.7.32.8 */
11934 { &hf_oran_codebook_subset,
11935 {"codebookSubset", "oran_fh_cus.codebookSubset",
11936 FT_UINT8, BASE_DEC,
11937 VALS(codebook_subset_vals)((0 ? (const struct _value_string*)0 : ((codebook_subset_vals
))))
, 0xc0,
11938 "UE capability wrt ULTPMI sets",
11939 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11940 },
11941 /* 7.7.32.9 */
11942 { &hf_oran_full_pwr_mode,
11943 {"fullPwrMode", "oran_fh_cus.fullPwrMode",
11944 FT_UINT8, BASE_DEC,
11945 VALS(full_pwr_mode_vals)((0 ? (const struct _value_string*)0 : ((full_pwr_mode_vals))
))
, 0xc0,
11946 "Transmission mode",
11947 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11948 },
11949 /* 7.7.32.10 */
11950 { &hf_oran_full_pwr_mode_2_tpmi_group,
11951 {"fullPwrMode2TpmiGroup", "oran_fh_cus.fullPwrMode2TpmiGroup",
11952 FT_UINT16, BASE_HEX,
11953 NULL((void*)0), 0x3fff,
11954 "Capabilities",
11955 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11956 },
11957
11958 /* 7.5.3.75 */
11959 { &hf_oran_num_cand_ranks,
11960 {"numCandRanks", "oran_fh_cus.numCandRanks",
11961 FT_UINT8, BASE_DEC,
11962 NULL((void*)0), 0xf0,
11963 NULL((void*)0),
11964 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11965 },
11966 /* 7.5.3.76 */
11967 { &hf_oran_ue_pref_rank,
11968 {"uePrefRank", "oran_fh_cus.uePrefRank",
11969 FT_UINT8, BASE_DEC,
11970 NULL((void*)0), 0x0f,
11971 "Most optimal UL Tx rank for UE",
11972 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11973 },
11974 /* 7.5.3.77 */
11975 { &hf_oran_ue_tpmi_rank_y,
11976 {"ueTpmiRankY", "oran_fh_cus.ueTpmiRankY",
11977 FT_UINT8, BASE_DEC,
11978 NULL((void*)0), 0x0,
11979 "TPMI index for codebook-based PUSCH tx",
11980 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11981 },
11982 /* 7.5.3.78 */
11983 { &hf_oran_ue_tpmi_rank_y_sinr_lx,
11984 {"ueTpmiRankYSinrLX", "oran_fh_cus.ueTpmiRankYSinrLX",
11985 FT_UINT16, BASE_HEX | BASE_RANGE_STRING0x00000100,
11986 RVALS(ue_tmpi_rank_sinr_vals)((0 ? (const struct _range_string*)0 : ((ue_tmpi_rank_sinr_vals
))))
, 0x0,
11987 "Estimation of post-equalization SINR",
11988 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11989 },
11990 /* 7.5.3.79 */
11991 { &hf_oran_ue_layer_pre_eq_sinr,
11992 {"ueLayerPreEqSinr", "oran_fh_cus.ueLayerPreEqSinr",
11993 FT_UINT16, BASE_HEX,
11994 NULL((void*)0), 0x0,
11995 "Pre-equalization SINR of a UE layer",
11996 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
11997 },
11998
11999 /* 7.7.33.3 */
12000 { &hf_oran_chan_type_sel,
12001 { "chanTypeSel", "oran_fh_cus.chanTypeSel",
12002 FT_UINT8, BASE_DEC,
12003 VALS(chan_type_sel_vals)((0 ? (const struct _value_string*)0 : ((chan_type_sel_vals))
))
, 0x03,
12004 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12005 },
12006
12007 /* 7.7.3.117 */
12008 { &hf_oran_srs_meas_port_mask,
12009 { "srsMeasPortMask", "oran_fh_cus.srsMeasPortMask",
12010 FT_UINT16, BASE_DEC,
12011 NULL((void*)0), 0xffff,
12012 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12013 },
12014 /* 7.7.3.106 */
12015 { &hf_oran_srs_ue_port_wb_power,
12016 { "srsUePortWbPower", "oran_fh_cus.srsUePortWbPower",
12017 FT_UINT16, BASE_DEC,
12018 NULL((void*)0), 0x0,
12019 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12020 },
12021 /* 7.7.3.107 */
12022 { &hf_oran_srs_ue_port_wb_sinr,
12023 { "srsUePortWbSinr", "oran_fh_cus.srsUePortWbSinr",
12024 FT_UINT16, BASE_DEC,
12025 NULL((void*)0), 0x0,
12026 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12027 },
12028
12029 /* 7.5.3.80 */
12030 { &hf_oran_srsRbgSize,
12031 { "srsRbgSize", "oran_fh_cus.srsRbgSize",
12032 FT_UINT8, BASE_DEC,
12033 VALS(srs_rbg_size_vals)((0 ? (const struct _value_string*)0 : ((srs_rbg_size_vals)))
)
, 0xc0,
12034 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12035 },
12036 /* 7.5.3.81 */
12037 { &hf_oran_srsNumRbg,
12038 { "srsNumRbg", "oran_fh_cus.srsNumRbg",
12039 FT_UINT8, BASE_DEC,
12040 NULL((void*)0), 0x0,
12041 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12042 },
12043 /* 7.5.3.82 */
12044 { &hf_oran_srsTxComb,
12045 { "srsTxComb", "oran_fh_cus.srsTxComb",
12046 FT_UINT8, BASE_DEC,
12047 VALS(srs_tx_comb_vals)((0 ? (const struct _value_string*)0 : ((srs_tx_comb_vals)))), 0xe0,
12048 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12049 },
12050 /* 7.5.3.83 */
12051 { &hf_oran_srsSymId,
12052 { "srsSymId", "oran_fh_cus.srsSymId",
12053 FT_UINT8, BASE_DEC,
12054 NULL((void*)0), 0x0f,
12055 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12056 },
12057 /* 7.5.3.84 */
12058 { &hf_oran_srsNumUe,
12059 { "srsNumUe", "oran_fh_cus.srsNumUe",
12060 FT_UINT8, BASE_DEC,
12061 NULL((void*)0), 0x3f,
12062 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12063 },
12064
12065
12066 { &hf_oran_c_section_common,
12067 { "Common Section", "oran_fh_cus.c-plane.section.common",
12068 FT_STRING, BASE_NONE,
12069 NULL((void*)0), 0x0,
12070 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12071 },
12072 { &hf_oran_c_section,
12073 { "Section", "oran_fh_cus.c-plane.section",
12074 FT_STRING, BASE_NONE,
12075 NULL((void*)0), 0x0,
12076 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12077 },
12078 { &hf_oran_u_section,
12079 { "Section", "oran_fh_cus.u-plane.section",
12080 FT_STRING, BASE_NONE,
12081 NULL((void*)0), 0x0,
12082 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12083 },
12084
12085 { &hf_oran_u_total_power,
12086 { "Mean Power", "oran_fh_cus.power",
12087 FT_FLOAT, BASE_NONE|BASE_UNIT_STRING0x00001000,
12088 UNS(&units_decibelfs)((0 ? (const struct unit_name_string*)0 : ((&units_decibelfs
))))
, 0x0,
12089 "Average power of whole section (dBFS)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12090 },
12091
12092 { &hf_oran_u_peak_power,
12093 { "PAPR", "oran_fh_cus.papr",
12094 FT_FLOAT, BASE_NONE|BASE_UNIT_STRING0x00001000,
12095 UNS(&units_decibels)((0 ? (const struct unit_name_string*)0 : ((&units_decibels
))))
, 0x0,
12096 "Peak-to-average power ratio (dB)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12097 },
12098
12099 { &hf_oran_u_prb_power,
12100 { "PRB Mean Power", "oran_fh_cus.prbpower",
12101 FT_FLOAT, BASE_NONE|BASE_UNIT_STRING0x00001000,
12102 UNS(&units_decibelfs)((0 ? (const struct unit_name_string*)0 : ((&units_decibelfs
))))
, 0x0,
12103 "Average power of PRB (dBFS)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12104 },
12105
12106 /* Link back to UL C-plane where udCompHdr was recorded */
12107 { &hf_oran_ul_cplane_ud_comp_hdr_frame,
12108 { "C-Plane UL udCompHdr frame", "oran_fh_cus.ul-cplane.udCompHdr",
12109 FT_FRAMENUM, BASE_NONE,
12110 FRAMENUM_TYPE(FT_FRAMENUM_REQUEST)((gpointer) (glong) (FT_FRAMENUM_REQUEST)), 0x0,
12111 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12112 },
12113 { &hf_oran_delta_to_expected_ul_symbol_time,
12114 { "Delta to expected UL symbol time", "oran_fh_cus.delta-expected-ul-symbol-time",
12115 FT_INT32, BASE_DEC,
12116 NULL((void*)0), 0x0,
12117 "usec difference vs time predicted by first symbol timing and configurable duration", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12118 },
12119 { &hf_oran_delta_to_expected_dl_symbol_time,
12120 { "Delta to expected DL symbol time", "oran_fh_cus.delta-expected-dl-symbol-time",
12121 FT_INT32, BASE_DEC,
12122 NULL((void*)0), 0x0,
12123 "Difference vs time predicted by first symbol timing and configurable duration", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12124 },
12125
12126 /* For ext11, where was a beamId (last) defined? */
12127 { &hf_oran_bfws_frame_defined,
12128 { "Beam defined in frame", "oran_fh_cus.bfw-defined",
12129 FT_FRAMENUM, BASE_NONE,
12130 FRAMENUM_TYPE(FT_FRAMENUM_RETRANS_PREV)((gpointer) (glong) (FT_FRAMENUM_RETRANS_PREV)), 0x0,
12131 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12132 },
12133 { &hf_oran_bfws_symbols_since_defined,
12134 { "Symbols since BFWs defined", "oran_fh_cus.symbols-since-bfw-defined",
12135 FT_UINT32, BASE_DEC,
12136 NULL((void*)0), 0x0,
12137 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12138 },
12139
12140 /* Corresponding C-plane frame for DL U-plane */
12141 { &hf_oran_corresponding_cplane_frame,
12142 { "C-plane frame", "oran_fh_cus.cplane-frame",
12143 FT_FRAMENUM, BASE_NONE,
12144 FRAMENUM_TYPE(FT_FRAMENUM_REQUEST)((gpointer) (glong) (FT_FRAMENUM_REQUEST)), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12145 },
12146 /* Time since corresponding C-plane frame for U-plane */
12147 { &hf_oran_corresponding_cplane_frame_time_delta,
12148 { "Time since C-plane frame", "oran_fh_cus.cplane-frame-time-delta",
12149 FT_UINT64, BASE_DEC, NULL((void*)0), 0x0,
12150 "Microseconds since C-plane frame", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12151 },
12152 /* Corresponding U-plane frame for C-plane */
12153 { &hf_oran_corresponding_uplane_frame,
12154 { "U-plane frame", "oran_fh_cus.uplane-frame",
12155 FT_FRAMENUM, BASE_NONE,
12156 FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE)((gpointer) (glong) (FT_FRAMENUM_RESPONSE)), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12157 },
12158 { &hf_oran_corresponding_uplane_frames_total,
12159 { "U-plane frames total", "oran_fh_cus.u-plane-frames-total",
12160 FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
12161 "Number of corresponding U-plane frames", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
12162 },
12163
12164 /* Reassembly */
12165 { &hf_oran_fragment,
12166 { "Fragment", "oran_fh_cus.fragment", FT_FRAMENUM, BASE_NONE,
12167 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12168 { &hf_oran_fragments,
12169 { "Fragments", "oran_fh_cus.fragments", FT_BYTES, BASE_NONE,
12170 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12171 { &hf_oran_fragment_overlap,
12172 { "Fragment overlap", "oran_fh_cus.fragment.overlap", FT_BOOLEAN, BASE_NONE,
12173 NULL((void*)0), 0x0, "Fragment overlaps with other fragments", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12174 { &hf_oran_fragment_overlap_conflict,
12175 { "Conflicting data in fragment overlap", "oran_fh_cus.fragment.overlap.conflict",
12176 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x0,
12177 "Overlapping fragments contained conflicting data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12178 { &hf_oran_fragment_multiple_tails,
12179 { "Multiple tail fragments found", "oran_fh_cus.fragment.multipletails",
12180 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x0,
12181 "Several tails were found when defragmenting the packet", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12182 { &hf_oran_fragment_too_long_fragment,
12183 { "Fragment too long", "oran_fh_cus.fragment.toolongfragment",
12184 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x0,
12185 "Fragment contained data past end of packet", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12186 { &hf_oran_fragment_error,
12187 { "Defragmentation error", "oran_fh_cus.fragment.error", FT_FRAMENUM, BASE_NONE,
12188 NULL((void*)0), 0x0, "Defragmentation error due to illegal fragments", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12189 { &hf_oran_fragment_count,
12190 { "Fragment count", "oran_fh_cus.fragment.count", FT_UINT32, BASE_DEC,
12191 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12192 { &hf_oran_reassembled_in,
12193 { "Reassembled payload in frame", "oran_fh_cus.reassembled_in", FT_FRAMENUM, BASE_NONE,
12194 NULL((void*)0), 0x0, "This payload packet is reassembled in this frame", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12195 { &hf_oran_reassembled_length,
12196 { "Reassembled payload length", "oran_fh_cus.reassembled.length", FT_UINT32, BASE_DEC,
12197 NULL((void*)0), 0x0, "The total length of the reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12198 { &hf_oran_reassembled_data,
12199 { "Reassembled data", "oran_fh_cus.reassembled.data", FT_BYTES, BASE_NONE,
12200 NULL((void*)0), 0x0, "The reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
12201
12202 { &hf_oran_payload,
12203 { "Payload", "oran_fh_cus.payload", FT_BYTES, BASE_SHOW_ASCII_PRINTABLE0x00010000,
12204 NULL((void*)0), 0x0, "Complete or reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }}
12205 };
12206
12207 /* Setup protocol subtree array */
12208 static int *ett[] = {
12209 &ett_oran,
12210 &ett_oran_ecpri_pcid,
12211 &ett_oran_ecpri_rtcid,
12212 &ett_oran_ecpri_seqid,
12213 &ett_oran_section_type,
12214 &ett_oran_u_timing,
12215 &ett_oran_u_section,
12216 &ett_oran_u_prb,
12217 &ett_oran_section,
12218 &ett_oran_iq,
12219 &ett_oran_bfw_bundle,
12220 &ett_oran_bfw,
12221 &ett_oran_frequency_range,
12222 &ett_oran_prb_cisamples,
12223 &ett_oran_cisample,
12224 &ett_oran_udcomphdr,
12225 &ett_oran_udcompparam,
12226 &ett_oran_cicomphdr,
12227 &ett_oran_cicompparam,
12228 &ett_oran_bfwcomphdr,
12229 &ett_oran_bfwcompparam,
12230 &ett_oran_ext19_port,
12231 &ett_oran_prb_allocation,
12232 &ett_oran_punc_pattern,
12233 &ett_oran_bfacomphdr,
12234 &ett_oran_modcomp_param_set,
12235 &ett_oran_st4_cmd_header,
12236 &ett_oran_st4_cmd,
12237 &ett_oran_sym_prb_pattern,
12238 &ett_oran_measurement_report,
12239 &ett_oran_measurement_command,
12240 &ett_oran_sresmask,
12241 &ett_oran_c_section_common,
12242 &ett_oran_c_section,
12243 &ett_oran_remask,
12244 &ett_oran_mc_scale_remask,
12245 &ett_oran_symbol_reordering_layer,
12246 &ett_oran_dmrs_entry,
12247 &ett_oran_dmrs_symbol_mask,
12248 &ett_oran_symbol_mask,
12249 &ett_oran_active_beamspace_coefficient_mask,
12250 &ett_oran_sinr_prb,
12251 &ett_oran_rbgMask,
12252 &ett_oran_se10_port,
12253
12254 &ett_oran_fragment,
12255 &ett_oran_fragments
12256 };
12257
12258 /* Separate subtree array for extensions. Used with [ext-1] */
12259 static int *ext_ett[HIGHEST_EXTTYPE35];
12260 for (unsigned extno=0; extno<HIGHEST_EXTTYPE35; extno++) {
12261 ext_ett[extno] = &ett_oran_c_section_extension[extno];
12262 }
12263
12264 expert_module_t* expert_oran;
12265
12266 static ei_register_info ei[] = {
12267 { &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)}}
}},
12268 { &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)}}
}},
12269 { &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)}}
}},
12270 { &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)}}
}},
12271 { &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)}}
}},
12272 { &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)}}
}},
12273 { &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)}}
}},
12274 { &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)}}
}},
12275 { &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)}}
}},
12276 { &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)}}
}},
12277 { &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)}}
}},
12278 { &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)}}
}},
12279 { &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)}}
}},
12280 { &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)}}
}},
12281 { &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)}}
}},
12282 { &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)}}
}},
12283 { &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)}}
}},
12284 { &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)}}
}},
12285 { &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)}}
}},
12286 { &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)}}
}},
12287 { &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)}}
}},
12288 { &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)}}
}},
12289 { &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)}}
}},
12290 { &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)}}
}},
12291 { &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)}}
}},
12292 { &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)}}
}},
12293 { &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)}}
}},
12294 { &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)}}
}},
12295 { &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)}}
}},
12296 { &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)}}
}},
12297 { &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)}}
}},
12298 { &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)}}
}},
12299 { &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)}}
}},
12300 { &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)}}
}},
12301 { &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)}}
}},
12302 { &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)}}
}},
12303 { &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)}}
}},
12304 { &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)}}
}},
12305 { &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)}}
}},
12306 { &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)}}
}},
12307 { &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)}}
}},
12308 { &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)}}
}},
12309 { &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)}}
}},
12310 { &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)}}
}},
12311 { &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)}}
}},
12312 { &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)}}
}},
12313 { &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)}}
}},
12314 { &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)}}
}},
12315 { &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)}}
}},
12316 { &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)}}
}},
12317 { &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)}}
}},
12318 { &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)}}
}},
12319 { &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)}}
}},
12320 { &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)}}
}},
12321 { &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)}}
}},
12322 { &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)}}
}},
12323 { &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)}}
}},
12324 { &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)}}
}},
12325 { &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)}}
}},
12326 { &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)}}
}},
12327 { &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)}}
}},
12328 { &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)}}
}}
12329 };
12330
12331
12332 /* Register the protocol name and description */
12333 proto_oran = proto_register_protocol("O-RAN Fronthaul CUS", "O-RAN FH CUS", "oran_fh_cus");
12334
12335 /* Allow dissector to find be found by name. */
12336 register_dissector("oran_fh_cus", dissect_oran, proto_oran);
12337
12338 /* Dissector table so dissectors for non-standard Section Extension can register by exttype */
12339 oran_sectionextension_table = register_dissector_table("oran.sectionextension",
12340 "O-RAN non-standard Section Extension (by exttype)",
12341 proto_oran, FT_UINT8, BASE_DEC);
12342
12343 /* Register the tap name. */
12344 oran_tap = register_tap("oran-fh-cus");
12345
12346 /* Required function calls to register the header fields and subtrees */
12347 proto_register_field_array(proto_oran, hf, array_length(hf)(sizeof (hf) / sizeof (hf)[0]));
12348 proto_register_subtree_array(ett, array_length(ett)(sizeof (ett) / sizeof (ett)[0]));
12349 proto_register_subtree_array(ext_ett, array_length(ext_ett)(sizeof (ext_ett) / sizeof (ext_ett)[0]));
12350
12351 expert_oran = expert_register_protocol(proto_oran);
12352 expert_register_field_array(expert_oran, ei, array_length(ei)(sizeof (ei) / sizeof (ei)[0]));
12353
12354
12355 /* Preferences */
12356 module_t * oran_module = prefs_register_protocol(proto_oran, NULL((void*)0));
12357
12358 /* Register bit width/compression preferences separately by direction. */
12359 prefs_register_uint_preference(oran_module, "oran.du_port_id_bits", "DU Port ID bits [a]",
12360 "The bit width of DU Port ID - sum of a,b,c&d (eAxC) must be 16", 10, &pref_du_port_id_bits);
12361 prefs_register_uint_preference(oran_module, "oran.bandsector_id_bits", "BandSector ID bits [b]",
12362 "The bit width of BandSector ID - sum of a,b,c&d (eAxC) must be 16", 10, &pref_bandsector_id_bits);
12363 prefs_register_uint_preference(oran_module, "oran.cc_id_bits", "CC ID bits [c]",
12364 "The bit width of CC ID - sum of a,b,c&d (eAxC) must be 16", 10, &pref_cc_id_bits);
12365 prefs_register_uint_preference(oran_module, "oran.ru_port_id_bits", "RU Port ID bits [d]",
12366 "The bit width of RU Port ID - sum of a,b,c&d (eAxC) must be 16", 10, &pref_ru_port_id_bits);
12367
12368 /* Uplink userplane */
12369 prefs_register_static_text_preference(oran_module, "oran.ul", "", "");
12370 prefs_register_uint_preference(oran_module, "oran.iq_bitwidth_up", "IQ Bitwidth Uplink",
12371 "The bit width of a sample in the Uplink (if no udcompHdr and no C-Plane)", 10, &pref_sample_bit_width_uplink);
12372 prefs_register_enum_preference(oran_module, "oran.ud_comp_up", "Uplink User Data Compression",
12373 "Uplink User Data Compression (if no udcompHdr and no C-Plane)", &pref_iqCompressionUplink, ul_compression_options, false0);
12374 prefs_register_enum_preference(oran_module, "oran.ud_comp_hdr_up", "udCompHdr field is present for uplink",
12375 "The udCompHdr field in U-Plane messages may or may not be present, depending on the "
12376 "configuration of the O-RU. This preference instructs the dissector to expect "
12377 "this field to be present in uplink messages",
12378 &pref_includeUdCompHeaderUplink, udcomphdr_present_options, false0);
12379 prefs_register_bool_preference(oran_module, "oran.ignore_cplane_ul_udcomphdr", "Ignore UL compression settings from C-plane",
12380 "When set, override udCompHdr from UL C-Plane with compression method and width configured here", &pref_override_ul_compression);
12381 prefs_register_uint_preference(oran_module, "oran.ul_slot_us_limit", "Microseconds allowed for UL tx in symbol",
12382 "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",
12383 10, &us_allowed_for_ul_in_symbol);
12384
12385 /* Downlink userplane */
12386 prefs_register_static_text_preference(oran_module, "oran.dl", "", "");
12387 prefs_register_uint_preference(oran_module, "oran.iq_bitwidth_down", "IQ Bitwidth Downlink",
12388 "The bit width of a sample in the Downlink (if no udcompHdr)", 10, &pref_sample_bit_width_downlink);
12389 prefs_register_enum_preference(oran_module, "oran.ud_comp_down", "Downlink User Data Compression",
12390 "Downlink User Data Compression", &pref_iqCompressionDownlink, dl_compression_options, false0);
12391 prefs_register_enum_preference(oran_module, "oran.ud_comp_hdr_down", "udCompHdr field is present for downlink",
12392 "The udCompHdr field in U-Plane messages may or may not be present, depending on the "
12393 "configuration of the O-RU. This preference instructs the dissector to expect "
12394 "this field to be present in downlink messages",
12395 &pref_includeUdCompHeaderDownlink, udcomphdr_present_options, false0);
12396
12397 /* SINR */
12398 prefs_register_static_text_preference(oran_module, "oran.sinr", "", "");
12399 prefs_register_uint_preference(oran_module, "oran.iq_bitwidth_sinr", "IQ Bitwidth SINR",
12400 "The bit width of a sample in SINR", 10, &pref_sample_bit_width_sinr);
12401 prefs_register_enum_preference(oran_module, "oran.ud_comp_sinr", "SINR Compression",
12402 "SINR Compression", &pref_iqCompressionSINR, ul_compression_options, false0);
12403
12404 /* BF-related */
12405 prefs_register_static_text_preference(oran_module, "oran.bf", "", "");
12406 prefs_register_uint_preference(oran_module, "oran.num_bf_antennas", "Number of beam weights",
12407 "Number of array elements that BF weights will be provided for", 10, &pref_num_bf_antennas);
12408 prefs_register_obsolete_preference(oran_module, "oran.num_weights_per_bundle");
12409 prefs_register_obsolete_preference(oran_module, "oran.num_bf_weights");
12410 prefs_register_bool_preference(oran_module, "oran.st6_4byte_alignment_required", "Use 4-byte alignment for ST6 sections",
12411 "Default is 1-byte alignment", &st6_4byte_alignment);
12412
12413 /* Misc (and will seldom need to be accessed) */
12414 prefs_register_static_text_preference(oran_module, "oran.misc", "", "");
12415 prefs_register_bool_preference(oran_module, "oran.show_iq_samples", "Show IQ Sample values",
12416 "When enabled, for U-Plane frames show each I and Q value in PRB", &pref_showIQSampleValues);
12417 prefs_register_enum_preference(oran_module, "oran.support_udcomplen", "udCompLen supported",
12418 "When enabled, U-Plane messages with relevant compression schemes will include udCompLen",
12419 &pref_support_udcompLen, udcomplen_support_options, false0);
12420 prefs_register_uint_preference(oran_module, "oran.rbs_in_uplane_section", "Total RBs in User-Plane data section",
12421 "This is used if numPrbu is signalled as 0", 10, &pref_data_plane_section_total_rbs);
12422 prefs_register_bool_preference(oran_module, "oran.unscaled_iq", "Show unscaled I/Q values",
12423 "", &show_unscaled_values);
12424 prefs_register_bool_preference(oran_module, "oran.attempt_reassembly",
12425 "Attempt Radio Transport layer reassembly", "",
12426 &do_radio_transport_layer_reassembly);
12427 prefs_register_obsolete_preference(oran_module, "oran.k_antenna_ports");
12428 prefs_register_uint_preference(oran_module, "oran.symbol_time", "Symbol duration in us",
12429 "e.g., 36us for 100MHz, Mu=1", 10, &pref_symbol_time);
12430
12431 prefs_register_bool_preference(oran_module, "oran.link_planes",
12432 "Link C-plane and U-plane using sectionId", "",
12433 &link_planes_together);
12434
12435
12436
12437
12438 flow_states_table = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
12439 flow_results_table = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
12440 ul_symbol_timing = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
12441
12442 dl_beam_ids_defined = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
12443 dl_beam_ids_results = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
12444
12445 register_init_routine(&oran_init_protocol);
12446
12447 /* Register reassembly table. */
12448 reassembly_table_register(&oran_reassembly_table,
12449 &oran_reassembly_table_functions);
12450}
12451
12452/*
12453* Editor modelines - http://www.wireshark.org/tools/modelines.html
12454*
12455* Local Variables:
12456* c-basic-offset: 4
12457* tab-width: 8
12458* indent-tabs-mode: nil
12459* End:
12460*
12461* ex: set shiftwidth=4 tabstop=8 expandtab:
12462* :indentSize=4:tabSize=8:noTabs=true:
12463*/