Bug Summary

File:builds/wireshark/wireshark/epan/dissectors/packet-oran.c
Warning:line 5369, column 41
Assigned value is garbage or undefined

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