Bug Summary

File:epan/dissectors/packet-oran.c
Warning:line 3899, column 67
The left operand of '==' is a garbage value

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