### Bug Summary

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

### Annotated Source Code

Press '?' to see keyboard shortcuts

Show analyzer invocation
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name packet-oran.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -fno-delete-null-pointer-checks -mframe-pointer=all -relaxed-aliasing -fmath-errno -ffp-contract=on -fno-rounding-math -ffloat16-excess-precision=fast -fbfloat16-excess-precision=fast -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/builds/wireshark/wireshark/build -fcoverage-compilation-dir=/builds/wireshark/wireshark/build -resource-dir /usr/lib/llvm-21/lib/clang/21 -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /builds/wireshark/wireshark/epan/dissectors -isystem /builds/wireshark/wireshark/build/epan/dissectors -isystem /usr/include/mit-krb5 -isystem /usr/include/libxml2 -isystem /builds/wireshark/wireshark/epan -D G_DISABLE_DEPRECATED -D G_DISABLE_SINGLE_INCLUDES -D WS_BUILD_DLL -D WS_DEBUG -D WS_DEBUG_UTF_8 -I /builds/wireshark/wireshark/build -I /builds/wireshark/wireshark -I /builds/wireshark/wireshark/include -D _GLIBCXX_ASSERTIONS -internal-isystem /usr/lib/llvm-21/lib/clang/21/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fmacro-prefix-map=/builds/wireshark/wireshark/= -fmacro-prefix-map=/builds/wireshark/wireshark/build/= -fmacro-prefix-map=../= -Wno-format-truncation -Wno-format-nonliteral -Wno-pointer-sign -std=gnu11 -ferror-limit 19 -fvisibility=hidden -fwrapv -fwrapv-pointer -fstrict-flex-arrays=3 -stack-protector 2 -fstack-clash-protection -fcf-protection=full -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fexceptions -fcolor-diagnostics -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /builds/wireshark/wireshark/sbout/2025-10-16-100331-3624-1 -x c /builds/wireshark/wireshark/epan/dissectors/packet-oran.c

Keyboard shortcuts:

- Use 'j/k' keys for keyboard navigation
- Use 'Shift+S' to show/hide relevant lines
- Use '?' to toggle this window

Close
Show only relevant lines Show control flow arrows

1 | /* packet-oran.c
2 | * Routines for O-RAN fronthaul UC-plane dissection
3 | * Copyright 2020, Jan Schiefer, Keysight Technologies, Inc.
4 | * Copyright 2020- Martin Mathieson
5 | *
6 | * Wireshark - Network traffic analyzer
7 | * By Gerald Combs <gerald@wireshark.org>
8 | * Copyright 1998 Gerald Combs
9 | *
10 | * SPDX-License-Identifier: GPL-2.0-or-later
11 | */
12 |
13 | /*
14 | * Dissector for the O-RAN Fronthaul CUS protocol specification.
15 | * See https://specifications.o-ran.org/specifications, WG4, Fronthaul Interfaces Workgroup
16 | * The current implementation is based on the ORAN-WG4.CUS.0-v17.01 specification.
17 | * - haven't spotted any differences in v18.00
18 | * Note that other eCPRI message types are handled in packet-ecpri.c
19 | */
20 |
21 | #include <config.h>
22 |
23 | #include <math.h>
24 |
25 | #include <epan/packet.h>
26 | #include <epan/expert.h>
27 | #include <epan/prefs.h>
28 | #include <epan/tap.h>
29 |
30 | #include <epan/tfs.h>
31 |
32 | #include <wsutil/ws_roundup.h>
33 | #include <wsutil/ws_padding_to.h>
34 |
35 | #include "epan/dissectors/packet-oran.h"
36 |
37 | /* N.B. dissector preferences are taking the place of (some) M-plane parameters, so unfortunately it can be
38 | * fiddly to get the preferences into a good state to decode a given capture..
39 | * TODO:
40 | * - for U-Plane, track back to last C-Plane frame for that eAxC
41 | * - use udCompHdr values from C-Plane if not overridden by U-Plane?
42 | * N.B. this matching is tricky see 7.8.1 Coupling of C-Plane and U-Plane
43 | * - Radio transport layer (eCPRI) fragmentation / reassembly
44 | * - Detect/indicate signs of application layer fragmentation?
45 | * - Not handling M-plane setting for "little endian byte order" as applied to IQ samples and beam weights
46 | * - for section extensions, check more constraints (which other extension types appear with them, order)
47 | * - when some section extensions are present, some section header fields are effectively ignored - flag any remaining ("ignored, "shall")?
48 | * - re-order items (decl and hf definitions) to match spec order?
49 | * - track energy-saving status, and identify TRX or ASM commands as 'Sleep extension'
50 | */
51 |
52 | /* Prototypes */
53 | void proto_reg_handoff_oran(void);
54 | void proto_register_oran(void);
55 |
56 | /* Initialize the protocol and registered fields */
57 | static int proto_oran;
58 |
59 | static int oran_tap = -1;
60 |
61 | static int hf_oran_du_port_id;
62 | static int hf_oran_bandsector_id;
63 | static int hf_oran_cc_id;
64 | static int hf_oran_ru_port_id;
65 | static int hf_oran_sequence_id;
66 | static int hf_oran_e_bit;
67 | static int hf_oran_subsequence_id;
68 | static int hf_oran_previous_frame;
69 |
70 |
71 | static int hf_oran_data_direction;
72 | static int hf_oran_payload_version;
73 | static int hf_oran_filter_index;
74 | static int hf_oran_frame_id;
75 | static int hf_oran_subframe_id;
76 | static int hf_oran_slot_id;
77 | static int hf_oran_slot_within_frame;
78 | static int hf_oran_start_symbol_id;
79 | static int hf_oran_numberOfSections;
80 | static int hf_oran_sectionType;
81 |
82 | static int hf_oran_udCompHdr;
83 | static int hf_oran_udCompHdrIqWidth;
84 | static int hf_oran_udCompHdrIqWidth_pref;
85 | static int hf_oran_udCompHdrMeth;
86 | static int hf_oran_udCompHdrMeth_pref;
87 | static int hf_oran_udCompLen;
88 | static int hf_oran_numberOfUEs;
89 | static int hf_oran_timeOffset;
90 | static int hf_oran_frameStructure_fft;
91 | static int hf_oran_frameStructure_subcarrier_spacing;
92 | static int hf_oran_cpLength;
93 | static int hf_oran_timing_header;
94 | static int hf_oran_section_id;
95 | static int hf_oran_rb;
96 | static int hf_oran_symInc;
97 | static int hf_oran_startPrbc;
98 | static int hf_oran_reMask_re1;
99 | static int hf_oran_reMask_re2;
100 | static int hf_oran_reMask_re3;
101 | static int hf_oran_reMask_re4;
102 | static int hf_oran_reMask_re5;
103 | static int hf_oran_reMask_re6;
104 | static int hf_oran_reMask_re7;
105 | static int hf_oran_reMask_re8;
106 | static int hf_oran_reMask_re9;
107 | static int hf_oran_reMask_re10;
108 | static int hf_oran_reMask_re11;
109 | static int hf_oran_reMask_re12;
110 | static int hf_oran_reMask;
111 | static int hf_oran_numPrbc;
112 | static int hf_oran_numSymbol;
113 | static int hf_oran_ef;
114 | static int hf_oran_beamId;
115 |
116 | static int hf_oran_sinrCompHdrIqWidth_pref;
117 | static int hf_oran_sinrCompHdrMeth_pref;
118 |
119 | static int hf_oran_ciCompHdr;
120 | static int hf_oran_ciCompHdrIqWidth;
121 | static int hf_oran_ciCompHdrMeth;
122 | static int hf_oran_ciCompOpt;
123 |
124 | static int hf_oran_extension;
125 | static int hf_oran_exttype;
126 | static int hf_oran_extlen;
127 |
128 | static int hf_oran_bfw_bundle;
129 | static int hf_oran_bfw_bundle_id;
130 | static int hf_oran_bfw;
131 | static int hf_oran_bfw_i;
132 | static int hf_oran_bfw_q;
133 |
134 | static int hf_oran_ueId;
135 | static int hf_oran_freqOffset;
136 | static int hf_oran_regularizationFactor;
137 | static int hf_oran_laaMsgType;
138 | static int hf_oran_laaMsgLen;
139 | static int hf_oran_lbtHandle;
140 | static int hf_oran_lbtDeferFactor;
141 | static int hf_oran_lbtBackoffCounter;
142 | static int hf_oran_lbtOffset;
143 | static int hf_oran_MCOT;
144 | static int hf_oran_lbtMode;
145 | static int hf_oran_sfnSfEnd;
146 | static int hf_oran_lbtPdschRes;
147 | static int hf_oran_sfStatus;
148 | static int hf_oran_initialPartialSF;
149 | static int hf_oran_lbtDrsRes;
150 | static int hf_oran_lbtBufErr;
151 | static int hf_oran_lbtTrafficClass;
152 | static int hf_oran_lbtCWConfig_H;
153 | static int hf_oran_lbtCWConfig_T;
154 | static int hf_oran_lbtCWR_Rst;
155 |
156 | static int hf_oran_reserved;
157 | static int hf_oran_reserved_1bit;
158 | static int hf_oran_reserved_2bits;
159 | static int hf_oran_reserved_3bits;
160 | static int hf_oran_reserved_4bits;
161 | static int hf_oran_reserved_last_4bits;
162 | static int hf_oran_reserved_last_5bits;
163 | static int hf_oran_reserved_6bits;
164 | static int hf_oran_reserved_last_6bits;
165 | static int hf_oran_reserved_7bits;
166 | static int hf_oran_reserved_last_7bits;
167 | static int hf_oran_reserved_8bits;
168 | static int hf_oran_reserved_16bits;
169 | static int hf_oran_reserved_15bits;
170 | static int hf_oran_reserved_bit1;
171 | static int hf_oran_reserved_bit2;
172 | static int hf_oran_reserved_bit4;
173 | static int hf_oran_reserved_bit5;
174 | static int hf_oran_reserved_bits123;
175 | static int hf_oran_reserved_bits456;
176 |
177 | static int hf_oran_bundle_offset;
178 | static int hf_oran_cont_ind;
179 |
180 | static int hf_oran_bfwCompHdr;
181 | static int hf_oran_bfwCompHdr_iqWidth;
182 | static int hf_oran_bfwCompHdr_compMeth;
183 | static int hf_oran_symbolId;
184 | static int hf_oran_startPrbu;
185 | static int hf_oran_numPrbu;
186 |
187 | static int hf_oran_udCompParam;
188 | static int hf_oran_sReSMask;
189 | static int hf_oran_sReSMask_re12;
190 | static int hf_oran_sReSMask_re11;
191 | static int hf_oran_sReSMask_re10;
192 | static int hf_oran_sReSMask_re9;
193 | static int hf_oran_sReSMask_re8;
194 | static int hf_oran_sReSMask_re7;
195 | static int hf_oran_sReSMask_re6;
196 | static int hf_oran_sReSMask_re5;
197 | static int hf_oran_sReSMask_re4;
198 | static int hf_oran_sReSMask_re3;
199 | static int hf_oran_sReSMask_re2;
200 | static int hf_oran_sReSMask_re1;
201 |
202 | static int hf_oran_sReSMask1;
203 | static int hf_oran_sReSMask2;
204 | static int hf_oran_sReSMask1_2_re12;
205 | static int hf_oran_sReSMask1_2_re11;
206 | static int hf_oran_sReSMask1_2_re10;
207 | static int hf_oran_sReSMask1_2_re9;
208 |
209 | static int hf_oran_bfwCompParam;
210 |
211 | static int hf_oran_iSample;
212 | static int hf_oran_qSample;
213 |
214 | static int hf_oran_ciCompParam;
215 |
216 | static int hf_oran_blockScaler;
217 | static int hf_oran_compBitWidth;
218 | static int hf_oran_compShift;
219 |
220 | static int hf_oran_active_beamspace_coefficient_n1;
221 | static int hf_oran_active_beamspace_coefficient_n2;
222 | static int hf_oran_active_beamspace_coefficient_n3;
223 | static int hf_oran_active_beamspace_coefficient_n4;
224 | static int hf_oran_active_beamspace_coefficient_n5;
225 | static int hf_oran_active_beamspace_coefficient_n6;
226 | static int hf_oran_active_beamspace_coefficient_n7;
227 | static int hf_oran_active_beamspace_coefficient_n8;
228 | static int hf_oran_activeBeamspaceCoefficientMask;
229 | static int hf_oran_activeBeamspaceCoefficientMask_bits_set;
230 |
231 | static int hf_oran_se6_repetition;
232 |
233 | static int hf_oran_rbgSize;
234 | static int hf_oran_rbgMask;
235 | static int hf_oran_noncontig_priority;
236 |
237 | static int hf_oran_symbol_mask;
238 | static int hf_oran_symbol_mask_s13;
239 | static int hf_oran_symbol_mask_s12;
240 | static int hf_oran_symbol_mask_s11;
241 | static int hf_oran_symbol_mask_s10;
242 | static int hf_oran_symbol_mask_s9;
243 | static int hf_oran_symbol_mask_s8;
244 | static int hf_oran_symbol_mask_s7;
245 | static int hf_oran_symbol_mask_s6;
246 | static int hf_oran_symbol_mask_s5;
247 | static int hf_oran_symbol_mask_s4;
248 | static int hf_oran_symbol_mask_s3;
249 | static int hf_oran_symbol_mask_s2;
250 | static int hf_oran_symbol_mask_s1;
251 | static int hf_oran_symbol_mask_s0;
252 |
253 | static int hf_oran_exponent;
254 | static int hf_oran_iq_user_data;
255 |
256 | static int hf_oran_disable_bfws;
257 | static int hf_oran_rad;
258 | static int hf_oran_num_bund_prbs;
259 | static int hf_oran_beam_id;
260 | static int hf_oran_num_weights_per_bundle;
261 |
262 | static int hf_oran_ack_nack_req_id;
263 |
264 | static int hf_oran_frequency_range;
265 | static int hf_oran_off_start_prb;
266 | static int hf_oran_num_prb;
267 |
268 | static int hf_oran_samples_prb;
269 | static int hf_oran_ciSample;
270 | static int hf_oran_ciIsample;
271 | static int hf_oran_ciQsample;
272 |
273 | static int hf_oran_beamGroupType;
274 | static int hf_oran_numPortc;
275 |
276 | static int hf_oran_csf;
277 | static int hf_oran_modcompscaler;
278 |
279 | static int hf_oran_modcomp_param_set;
280 | static int hf_oran_mc_scale_re_mask;
281 | static int hf_oran_mc_scale_offset;
282 |
283 | static int hf_oran_eAxC_mask;
284 | static int hf_oran_technology;
285 | static int hf_oran_nullLayerInd;
286 |
287 | static int hf_oran_se19_repetition;
288 | static int hf_oran_portReMask;
289 | static int hf_oran_portSymbolMask;
290 |
291 | static int hf_oran_ext19_port;
292 |
293 | static int hf_oran_prb_allocation;
294 | static int hf_oran_nextSymbolId;
295 | static int hf_oran_nextStartPrbc;
296 |
297 | static int hf_oran_puncPattern;
298 | static int hf_oran_numPuncPatterns;
299 | static int hf_oran_symbolMask_ext20;
300 | static int hf_oran_startPuncPrb;
301 | static int hf_oran_numPuncPrb;
302 | static int hf_oran_puncReMask;
303 | static int hf_oran_multiSDScope;
304 | static int hf_oran_RbgIncl;
305 |
306 | static int hf_oran_ci_prb_group_size;
307 | static int hf_oran_prg_size_st5;
308 | static int hf_oran_prg_size_st6;
309 |
310 | static int hf_oran_num_ueid;
311 |
312 | static int hf_oran_antMask;
313 |
314 | static int hf_oran_transmissionWindowOffset;
315 | static int hf_oran_transmissionWindowSize;
316 | static int hf_oran_toT;
317 |
318 | static int hf_oran_bfaCompHdr;
319 | static int hf_oran_bfAzPtWidth;
320 | static int hf_oran_bfZePtWidth;
321 | static int hf_oran_bfAz3ddWidth;
322 | static int hf_oran_bfZe3ddWidth;
323 | static int hf_oran_bfAzPt;
324 | static int hf_oran_bfZePt;
325 | static int hf_oran_bfAz3dd;
326 | static int hf_oran_bfZe3dd;
327 | static int hf_oran_bfAzSl;
328 | static int hf_oran_bfZeSl;
329 |
330 | static int hf_oran_cmd_scope;
331 | static int hf_oran_number_of_st4_cmds;
332 |
333 | static int hf_oran_st4_cmd_header;
334 | static int hf_oran_st4_cmd_type;
335 | static int hf_oran_st4_cmd_len;
336 | static int hf_oran_st4_cmd_num_slots;
337 | static int hf_oran_st4_cmd_ack_nack_req_id;
338 |
339 | static int hf_oran_st4_cmd;
340 |
341 | static int hf_oran_sleepmode_trx;
342 | static int hf_oran_sleepmode_asm;
343 | static int hf_oran_log2maskbits;
344 | static int hf_oran_num_slots_ext;
345 | static int hf_oran_antMask_trx_control;
346 |
347 | static int hf_oran_ready;
348 | static int hf_oran_number_of_acks;
349 | static int hf_oran_number_of_nacks;
350 | static int hf_oran_ackid;
351 | static int hf_oran_nackid;
352 |
353 | static int hf_oran_acknack_request_frame;
354 | static int hf_oran_acknack_request_time;
355 | static int hf_oran_acknack_request_type;
356 | static int hf_oran_acknack_response_frame;
357 | static int hf_oran_acknack_response_time;
358 |
359 | static int hf_oran_disable_tdbfns;
360 | static int hf_oran_td_beam_group;
361 | static int hf_oran_disable_tdbfws;
362 | static int hf_oran_td_beam_num;
363 |
364 | static int hf_oran_dir_pattern;
365 | static int hf_oran_guard_pattern;
366 |
367 | static int hf_oran_ecpri_pcid;
368 | static int hf_oran_ecpri_rtcid;
369 | static int hf_oran_ecpri_seqid;
370 |
371 | static int hf_oran_num_sym_prb_pattern;
372 | static int hf_oran_prb_mode;
373 | static int hf_oran_sym_prb_pattern;
374 | static int hf_oran_sym_mask;
375 | static int hf_oran_num_mc_scale_offset;
376 | static int hf_oran_prb_pattern;
377 | static int hf_oran_prb_block_offset;
378 | static int hf_oran_prb_block_size;
379 |
380 | static int hf_oran_codebook_index;
381 | static int hf_oran_layerid;
382 | static int hf_oran_numlayers;
383 | static int hf_oran_txscheme;
384 | static int hf_oran_crs_remask;
385 | static int hf_oran_crs_shift;
386 | static int hf_oran_crs_symnum;
387 | static int hf_oran_beamid_ap1;
388 | static int hf_oran_beamid_ap2;
389 | static int hf_oran_beamid_ap3;
390 |
391 | static int hf_oran_port_list_index;
392 | static int hf_oran_alpn_per_sym;
393 | static int hf_oran_ant_dmrs_snr;
394 | static int hf_oran_user_group_size;
395 | static int hf_oran_user_group_id;
396 | static int hf_oran_entry_type;
397 | static int hf_oran_dmrs_port_number;
398 | static int hf_oran_ueid_reset;
399 |
400 | static int hf_oran_dmrs_symbol_mask;
401 | static int hf_oran_dmrs_symbol_mask_s13;
402 | static int hf_oran_dmrs_symbol_mask_s12;
403 | static int hf_oran_dmrs_symbol_mask_s11;
404 | static int hf_oran_dmrs_symbol_mask_s10;
405 | static int hf_oran_dmrs_symbol_mask_s9;
406 | static int hf_oran_dmrs_symbol_mask_s8;
407 | static int hf_oran_dmrs_symbol_mask_s7;
408 | static int hf_oran_dmrs_symbol_mask_s6;
409 | static int hf_oran_dmrs_symbol_mask_s5;
410 | static int hf_oran_dmrs_symbol_mask_s4;
411 | static int hf_oran_dmrs_symbol_mask_s3;
412 | static int hf_oran_dmrs_symbol_mask_s2;
413 | static int hf_oran_dmrs_symbol_mask_s1;
414 | static int hf_oran_dmrs_symbol_mask_s0;
415 |
416 | static int hf_oran_scrambling;
417 | static int hf_oran_nscid;
418 | static int hf_oran_dtype;
419 | static int hf_oran_cmd_without_data;
420 | static int hf_oran_lambda;
421 | static int hf_oran_first_prb;
422 | static int hf_oran_last_prb;
423 | static int hf_oran_low_papr_type;
424 | static int hf_oran_hopping_mode;
425 |
426 | static int hf_oran_tx_win_for_on_air_symbol_l;
427 | static int hf_oran_tx_win_for_on_air_symbol_r;
428 |
429 | static int hf_oran_num_fo_fb;
430 | static int hf_oran_freq_offset_fb;
431 |
432 | static int hf_oran_num_ue_sinr_rpt;
433 | static int hf_oran_num_sinr_per_prb;
434 | static int hf_oran_num_sinr_per_prb_right;
435 |
436 | static int hf_oran_sinr_value;
437 |
438 | static int hf_oran_measurement_report;
439 | static int hf_oran_mf;
440 | static int hf_oran_meas_data_size;
441 | static int hf_oran_meas_type_id;
442 | static int hf_oran_ipn_power;
443 | static int hf_oran_ue_tae;
444 | static int hf_oran_ue_layer_power;
445 | static int hf_oran_num_elements;
446 | static int hf_oran_ant_dmrs_snr_val;
447 | static int hf_oran_ue_freq_offset;
448 |
449 | static int hf_oran_measurement_command;
450 |
451 | static int hf_oran_beam_type;
452 | static int hf_oran_meas_cmd_size;
453 |
454 | static int hf_oran_symbol_reordering_layer;
455 | static int hf_oran_dmrs_entry;
456 |
457 | static int hf_oran_c_section_common;
458 | static int hf_oran_c_section;
459 | static int hf_oran_u_section;
460 |
461 | static int hf_oran_u_section_ul_symbol_time;
462 | static int hf_oran_u_section_ul_symbol_frames;
463 | static int hf_oran_u_section_ul_symbol_first_frame;
464 | static int hf_oran_u_section_ul_symbol_last_frame;
465 |
466 | /* Computed fields */
467 | static int hf_oran_c_eAxC_ID;
468 | static int hf_oran_refa;
469 |
470 | /* Convenient fields for filtering, mostly shown as hidden */
471 | static int hf_oran_cplane;
472 | static int hf_oran_uplane;
473 | static int hf_oran_bf; /* to match frames that configure beamforming in any way */
474 | static int hf_oran_zero_prb;
475 |
476 | static int hf_oran_ul_cplane_ud_comp_hdr_frame;
477 |
478 | /* Initialize the subtree pointers */
479 | static int ett_oran;
480 | static int ett_oran_ecpri_rtcid;
481 | static int ett_oran_ecpri_pcid;
482 | static int ett_oran_ecpri_seqid;
483 | static int ett_oran_section;
484 | static int ett_oran_section_type;
485 | static int ett_oran_u_timing;
486 | static int ett_oran_u_section;
487 | static int ett_oran_u_prb;
488 | static int ett_oran_iq;
489 | static int ett_oran_bfw_bundle;
490 | static int ett_oran_bfw;
491 | static int ett_oran_frequency_range;
492 | static int ett_oran_prb_cisamples;
493 | static int ett_oran_cisample;
494 | static int ett_oran_udcomphdr;
495 | static int ett_oran_udcompparam;
496 | static int ett_oran_cicomphdr;
497 | static int ett_oran_cicompparam;
498 | static int ett_oran_bfwcomphdr;
499 | static int ett_oran_bfwcompparam;
500 | static int ett_oran_ext19_port;
501 | static int ett_oran_prb_allocation;
502 | static int ett_oran_punc_pattern;
503 | static int ett_oran_bfacomphdr;
504 | static int ett_oran_modcomp_param_set;
505 | static int ett_oran_st4_cmd_header;
506 | static int ett_oran_st4_cmd;
507 | static int ett_oran_sym_prb_pattern;
508 | static int ett_oran_measurement_report;
509 | static int ett_oran_measurement_command;
510 | static int ett_oran_sresmask;
511 | static int ett_oran_c_section_common;
512 | static int ett_oran_c_section;
513 | static int ett_oran_remask;
514 | static int ett_oran_symbol_reordering_layer;
515 | static int ett_oran_dmrs_entry;
516 | static int ett_oran_dmrs_symbol_mask;
517 | static int ett_oran_symbol_mask;
518 | static int ett_active_beamspace_coefficient_mask;
519 |
520 |
521 | /* Don't want all extensions to open and close together. Use extType-1 entry */
522 | static int ett_oran_c_section_extension[HIGHEST_EXTTYPE28];
523 |
524 | /* Expert info */
525 | static expert_field ei_oran_unsupported_bfw_compression_method;
526 | static expert_field ei_oran_invalid_sample_bit_width;
527 | static expert_field ei_oran_reserved_numBundPrb;
528 | static expert_field ei_oran_extlen_wrong;
529 | static expert_field ei_oran_invalid_eaxc_bit_width;
530 | static expert_field ei_oran_extlen_zero;
531 | static expert_field ei_oran_rbg_size_reserved;
532 | static expert_field ei_oran_frame_length;
533 | static expert_field ei_oran_numprbc_ext21_zero;
534 | static expert_field ei_oran_ci_prb_group_size_reserved;
535 | static expert_field ei_oran_st8_nackid;
536 | static expert_field ei_oran_st4_no_cmds;
537 | static expert_field ei_oran_st4_zero_len_cmd;
538 | static expert_field ei_oran_st4_wrong_len_cmd;
539 | static expert_field ei_oran_st4_unknown_cmd;
540 | static expert_field ei_oran_mcot_out_of_range;
541 | static expert_field ei_oran_se10_unknown_beamgrouptype;
542 | static expert_field ei_oran_se10_not_allowed;
543 | static expert_field ei_oran_start_symbol_id_not_zero;
544 | static expert_field ei_oran_trx_control_cmd_scope;
545 | static expert_field ei_oran_unhandled_se;
546 | static expert_field ei_oran_bad_symbolmask;
547 | static expert_field ei_oran_numslots_not_zero;
548 | static expert_field ei_oran_version_unsupported;
549 | static expert_field ei_oran_laa_msg_type_unsupported;
550 | static expert_field ei_oran_se_on_unsupported_st;
551 | static expert_field ei_oran_cplane_unexpected_sequence_number_ul;
552 | static expert_field ei_oran_cplane_unexpected_sequence_number_dl;
553 | static expert_field ei_oran_uplane_unexpected_sequence_number_ul;
554 | static expert_field ei_oran_uplane_unexpected_sequence_number_dl;
555 | static expert_field ei_oran_acknack_no_request;
556 | static expert_field ei_oran_udpcomphdr_should_be_zero;
557 | static expert_field ei_oran_radio_fragmentation_c_plane;
558 | static expert_field ei_oran_radio_fragmentation_u_plane;
559 | static expert_field ei_oran_lastRbdid_out_of_range;
560 | static expert_field ei_oran_rbgMask_beyond_last_rbdid;
561 | static expert_field ei_oran_unexpected_measTypeId;
562 | static expert_field ei_oran_unsupported_compression_method;
563 | static expert_field ei_oran_ud_comp_len_wrong_size;
564 | static expert_field ei_oran_sresmask2_not_zero_with_rb;
565 | static expert_field ei_oran_st6_rb_shall_be_0;
566 | static expert_field ei_oran_st9_not_ul;
567 | static expert_field ei_oran_st10_numsymbol_not_14;
568 | static expert_field ei_oran_st10_startsymbolid_not_0;
569 | static expert_field ei_oran_st10_not_ul;
570 | static expert_field ei_oran_se24_nothing_to_inherit;
571 | static expert_field ei_oran_num_sinr_per_prb_unknown;
572 | static expert_field ei_oran_start_symbol_id_bits_ignored;
573 | static expert_field ei_oran_user_group_id_reserved_value;
574 | static expert_field ei_oran_port_list_index_zero;
575 | static expert_field ei_oran_ul_uplane_symbol_too_long;
576 |
577 |
578 | /* These are the message types handled by this dissector */
579 | #define ECPRI_MT_IQ_DATA0 0
580 | #define ECPRI_MT_RT_CTRL_DATA2 2
581 |
582 |
583 | /* Preference settings - try to set reasonable defaults */
584 | static unsigned pref_du_port_id_bits = 4;
585 | static unsigned pref_bandsector_id_bits = 4;
586 | static unsigned pref_cc_id_bits = 4;
587 | static unsigned pref_ru_port_id_bits = 4;
588 |
589 | /* TODO: ideally should be per-flow */
590 | static unsigned pref_sample_bit_width_uplink = 14;
591 | static unsigned pref_sample_bit_width_downlink = 14;
592 | static unsigned pref_sample_bit_width_sinr = 14;
593 |
594 | /* 8.3.3.15 Compression schemes */
595 | #define COMP_NONE0 0
596 | #define COMP_BLOCK_FP1 1
597 | #define COMP_BLOCK_SCALE2 2
598 | #define COMP_U_LAW3 3
599 | #define COMP_MODULATION4 4
600 | #define BFP_AND_SELECTIVE_RE5 5
601 | #define MOD_COMPR_AND_SELECTIVE_RE6 6
602 | #define BFP_AND_SELECTIVE_RE_WITH_MASKS7 7
603 | #define MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8 8
604 |
605 | /* TODO: these ideally should be per-flow too */
606 | static int pref_iqCompressionUplink = COMP_BLOCK_FP1;
607 | static int pref_iqCompressionDownlink = COMP_BLOCK_FP1;
608 |
609 | static int pref_iqCompressionSINR = COMP_BLOCK_FP1;
610 |
611 |
612 | /* Is udCompHeader present (both directions) */
613 | static int pref_includeUdCompHeaderUplink = 2; /* start heuristic */
614 | static int pref_includeUdCompHeaderDownlink = 2; /* start heuristic */
615 |
616 | static unsigned pref_data_plane_section_total_rbs = 273;
617 | static unsigned pref_num_bf_antennas = 32;
618 | static bool_Bool pref_showIQSampleValues = true1;
619 |
620 | /* Based upon m-plane param, so will be system-wide */
621 | static int pref_support_udcompLen = 2; /* start heuristic, can force other settings if necessary */
622 | static bool_Bool udcomplen_heuristic_result_set = false0;
623 | static bool_Bool udcomplen_heuristic_result = false0;
624 |
625 | /* st6-4byte-alignment-required */
626 | static bool_Bool st6_4byte_alignment = false0;
627 |
628 | /* Requested, allows I/Q to be stored as integers.. */
629 | static bool_Bool show_unscaled_values = false0;
630 |
631 | /* Initialized off. Timing is in microseconds. */
632 | static unsigned us_allowed_for_ul_in_symbol = 0;
633 |
634 | static const enum_val_t dl_compression_options[] = {
635 | { "COMP_NONE", "No Compression", COMP_NONE0 },
636 | { "COMP_BLOCK_FP", "Block Floating Point Compression", COMP_BLOCK_FP1 },
637 | { "COMP_BLOCK_SCALE", "Block Scaling Compression", COMP_BLOCK_SCALE2 },
638 | { "COMP_U_LAW", "u-Law Compression", COMP_U_LAW3 },
639 | { "COMP_MODULATION", "Modulation Compression", COMP_MODULATION4 },
640 | { "BFP_AND_SELECTIVE_RE", "Block Floating Point + selective RE sending", BFP_AND_SELECTIVE_RE5 },
641 | { "MOD_COMPR_AND_SELECTIVE_RE", "Modulation Compression + selective RE sending", MOD_COMPR_AND_SELECTIVE_RE6 },
642 | { "BFP_AND_SELECTIVE_RE_WITH_MASKS", "Block Floating Point + selective RE sending with masks in section header", BFP_AND_SELECTIVE_RE_WITH_MASKS7 },
643 | { "MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS", "Modulation Compression + selective RE sending with masks in section header", MOD_COMPR_AND_SELECTIVE_RE6 },
644 | { NULL((void*)0), NULL((void*)0), 0 }
645 | };
646 |
647 | static const enum_val_t ul_compression_options[] = {
648 | { "COMP_NONE", "No Compression", COMP_NONE0 },
649 | { "COMP_BLOCK_FP", "Block Floating Point Compression", COMP_BLOCK_FP1 },
650 | { "COMP_BLOCK_SCALE", "Block Scaling Compression", COMP_BLOCK_SCALE2 },
651 | { "COMP_U_LAW", "u-Law Compression", COMP_U_LAW3 },
652 | { "BFP_AND_SELECTIVE_RE", "Block Floating Point + selective RE sending", BFP_AND_SELECTIVE_RE5 },
653 | { "BFP_AND_SELECTIVE_RE_WITH_MASKS", "Block Floating Point + selective RE sending with masks in section header", BFP_AND_SELECTIVE_RE_WITH_MASKS7 },
654 | { NULL((void*)0), NULL((void*)0), 0 }
655 | };
656 |
657 | static const enum_val_t udcomplen_support_options[] = {
658 | { "NOT_SUPPORTED", "Not Supported", 0 },
659 | { "SUPPORTED", "Supported", 1 },
660 | { "HEURISTIC", "Attempt Heuristic", 2 },
661 | { NULL((void*)0), NULL((void*)0), 0 }
662 | };
663 |
664 | static const enum_val_t udcomphdr_present_options[] = {
665 | { "NOT_PRESENT", "Not Present", 0 },
666 | { "PRESENT", "Present", 1 },
667 | { "HEURISTIC", "Attempt Heuristic", 2 },
668 | { NULL((void*)0), NULL((void*)0), 0 }
669 | };
670 |
671 |
672 |
673 | static const value_string e_bit[] = {
674 | { 0, "More fragments follow" },
675 | { 1, "Last fragment" },
676 | { 0, NULL((void*)0)}
677 | };
678 |
679 | #define DIR_UPLINK0 0
680 | #define DIR_DOWNLINK1 1
681 |
682 |
683 | static const value_string data_direction_vals[] = {
684 | { DIR_UPLINK0, "Uplink" }, /* gNB Rx */
685 | { DIR_DOWNLINK1, "Downlink" }, /* gNB Tx */
686 | { 0, NULL((void*)0)}
687 | };
688 |
689 | static const value_string rb_vals[] = {
690 | { 0, "Every RB used" },
691 | { 1, "Every other RB used" },
692 | { 0, NULL((void*)0)}
693 | };
694 |
695 | static const value_string sym_inc_vals[] = {
696 | { 0, "Use the current symbol number" },
697 | { 1, "Increment the current symbol number" },
698 | { 0, NULL((void*)0)}
699 | };
700 |
701 | static const value_string lbtMode_vals[] = {
702 | { 0, "Full LBT (regular LBT, sending reservation signal until the beginning of the SF/slot)" },
703 | { 1, "Partial LBT (looking back 25 usec prior to transmission" },
704 | { 2, "Partial LBT (looking back 34 usec prior to transmission" },
705 | { 3, "Full LBT and stop (regular LBT, without sending reservation signal" },
706 | { 0, NULL((void*)0)}
707 | };
708 |
709 | static const range_string filter_indices[] = {
710 | {0, 0, "standard channel filter"},
711 | {1, 1, "UL filter for PRACH preamble formats 0, 1, 2; min. passband 839 x 1.25kHz = 1048.75 kHz"},
712 | {2, 2, "UL filter for PRACH preamble format 3, min. passband 839 x 5 kHz = 4195 kHz"},
713 | {3, 3, "UL filter for PRACH preamble formats A1, A2, A3, B1, B2, B3, B4, C0, C2; min. passband 139 x \u0394fRA"},
714 | {4, 4, "UL filter for NPRACH 0, 1; min. passband 48 x 3.75KHz = 180 KHz"},
715 | {5, 5, "UL filter for PRACH preamble formats"},
716 | {8, 8, "UL filter NPUSCH"},
717 | {9, 9, "Mixed numerology and other channels except PRACH and NB-IoT"},
718 | {9, 15, "Reserved"},
719 | {0, 0, NULL((void*)0)}
720 | };
721 |
722 | static const range_string section_types[] = {
723 | { SEC_C_UNUSED_RB, SEC_C_UNUSED_RB, "Unused Resource Blocks or symbols in Downlink or Uplink" },
724 | { SEC_C_NORMAL, SEC_C_NORMAL, "Most DL/UL radio channels" },
725 | { SEC_C_RSVD2, SEC_C_RSVD2, "Reserved for future use" },
726 | { SEC_C_PRACH, SEC_C_PRACH, "PRACH and mixed-numerology channels" },
727 | { SEC_C_SLOT_CONTROL, SEC_C_SLOT_CONTROL, "Slot Configuration Control" },
728 | { SEC_C_UE_SCHED, SEC_C_UE_SCHED, "UE scheduling information (UE-ID assignment to section)" },
729 | { SEC_C_CH_INFO, SEC_C_CH_INFO, "Channel information" },
730 | { SEC_C_LAA, SEC_C_LAA, "LAA (License Assisted Access)" },
731 | { SEC_C_ACK_NACK_FEEDBACK, SEC_C_ACK_NACK_FEEDBACK, "ACK/NACK Feedback" },
732 | { SEC_C_SINR_REPORTING, SEC_C_SINR_REPORTING, "SINR Reporting" },
733 | { SEC_C_RRM_MEAS_REPORTS, SEC_C_RRM_MEAS_REPORTS, "RRM Measurement Reports" },
734 | { SEC_C_REQUEST_RRM_MEAS, SEC_C_REQUEST_RRM_MEAS, "Request RRM Measurements" },
735 | { 12, 255, "Reserved for future use" },
736 | { 0, 0, NULL((void*)0)} };
737 |
738 | static const range_string section_types_short[] = {
739 | { SEC_C_UNUSED_RB, SEC_C_UNUSED_RB, "(Unused RBs) " },
740 | { SEC_C_NORMAL, SEC_C_NORMAL, "(Most channels) " },
741 | { SEC_C_RSVD2, SEC_C_RSVD2, "(reserved) " },
742 | { SEC_C_PRACH, SEC_C_PRACH, "(PRACH/mixed-\u03bc)" },
743 | { SEC_C_SLOT_CONTROL, SEC_C_SLOT_CONTROL, "(Slot info) " },
744 | { SEC_C_UE_SCHED, SEC_C_UE_SCHED, "(UE scheduling info)" },
745 | { SEC_C_CH_INFO, SEC_C_CH_INFO, "(Channel info) " },
746 | { SEC_C_LAA, SEC_C_LAA, "(LAA) " },
747 | { SEC_C_ACK_NACK_FEEDBACK, SEC_C_ACK_NACK_FEEDBACK, "(ACK/NACK) " },
748 | { SEC_C_SINR_REPORTING, SEC_C_SINR_REPORTING, "(SINR Reporting) " },
749 | { SEC_C_RRM_MEAS_REPORTS, SEC_C_RRM_MEAS_REPORTS, "(RRM Meas Reports) " },
750 | { SEC_C_REQUEST_RRM_MEAS, SEC_C_REQUEST_RRM_MEAS, "(Req RRM Meas) " },
751 | { 12, 255, "Reserved for future use" },
752 | { 0, 0, NULL((void*)0) }
753 | };
754 |
755 | static const range_string ud_comp_header_width[] = {
756 | {0, 0, "I and Q are each 16 bits wide"},
757 | {1, 15, "Bit width of I and Q"},
758 | {0, 0, NULL((void*)0)} };
759 |
760 | /* Table 8.3.3.13-3 */
761 | static const range_string ud_comp_header_meth[] = {
762 | {COMP_NONE0, COMP_NONE0, "No compression" },
763 | {COMP_BLOCK_FP1, COMP_BLOCK_FP1, "Block floating point compression" },
764 | {COMP_BLOCK_SCALE2, COMP_BLOCK_SCALE2, "Block scaling" },
765 | {COMP_U_LAW3, COMP_U_LAW3, "Mu - law" },
766 | {COMP_MODULATION4, COMP_MODULATION4, "Modulation compression" },
767 | {BFP_AND_SELECTIVE_RE5, BFP_AND_SELECTIVE_RE5, "BFP + selective RE sending" },
768 | {MOD_COMPR_AND_SELECTIVE_RE6, MOD_COMPR_AND_SELECTIVE_RE6, "mod-compr + selective RE sending" },
769 | {BFP_AND_SELECTIVE_RE_WITH_MASKS7, BFP_AND_SELECTIVE_RE_WITH_MASKS7, "BFP + selective RE sending with masks in section header" },
770 | {MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8, MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8, "mod-compr + selective RE sending with masks in section header"},
771 | {9, 15, "Reserved"},
772 | {0, 0, NULL((void*)0)}
773 | };
774 |
775 | /* Table 7.5.2.13-2 */
776 | static const range_string frame_structure_fft[] = {
777 | {0, 0, "Reserved (no FFT/iFFT processing)"},
778 | {1, 3, "Reserved"},
779 | {4, 4, "FFT size 16"},
780 | {5, 5, "FFT size 32"},
781 | {6, 6, "FFT size 64"},
782 | {7, 7, "FFT size 128"},
783 | {8, 8, "FFT size 256"},
784 | {9, 9, "FFT size 512"},
785 | {10, 10, "FFT size 1024"},
786 | {11, 11, "FFT size 2048"},
787 | {12, 12, "FFT size 4096"},
788 | {13, 13, "FFT size 1536"},
789 | {14, 14, "FFT size 3072"},
790 | {15, 15, "Reserved"},
791 | {0, 0, NULL((void*)0)}
792 | };
793 |
794 | /* Table 7.5.2.13-3 */
795 | static const range_string subcarrier_spacings[] = {
796 | { 0, 0, "SCS 15 kHz, 1 slot/subframe, slot length 1 ms" },
797 | { 1, 1, "SCS 30 kHz, 2 slots/subframe, slot length 500 \u03bcs" },
798 | { 2, 2, "SCS 60 kHz, 4 slots/subframe, slot length 250 \u03bcs" },
799 | { 3, 3, "SCS 120 kHz, 8 slots/subframe, slot length 125 \u03bcs" },
800 | { 4, 4, "SCS 240 kHz, 16 slots/subframe, slot length 62.5 \u03bcs" },
801 | { 5, 11, "Reserved" }, /* N.B., 5 was 480kHz in early spec versions */
802 | { 12, 12, "SCS 1.25 kHz, 1 slot/subframe, slot length 1 ms" },
803 | { 13, 13, "SCS 3.75 kHz(LTE - specific), 1 slot/subframe, slot length 1 ms" },
804 | { 14, 14, "SCS 5 kHz, 1 slot/subframe, slot length 1 ms" },
805 | { 15, 15, "SCS 7.5 kHz(LTE - specific), 1 slot/subframe, slot length 1 ms" },
806 | { 0, 0, NULL((void*)0) }
807 | };
808 |
809 | /* Table 7.5.3.14-1 laaMsgType definition */
810 | static const range_string laaMsgTypes[] = {
811 | {0, 0, "LBT_PDSCH_REQ - lls - O-DU to O-RU request to obtain a PDSCH channel"},
812 | {1, 1, "LBT_DRS_REQ - lls - O-DU to O-RU request to obtain the channel and send DRS"},
813 | {2, 2, "LBT_PDSCH_RSP - O-RU to O-DU response, channel acq success or failure"},
814 | {3, 3, "LBT_DRS_RSP - O-RU to O-DU response, DRS sending success or failure"},
815 | {4, 4, "LBT_Buffer_Error - O-RU to O-DU response, reporting buffer overflow"},
816 | {5, 5, "LBT_CWCONFIG_REQ - O-DU to O-RU request, congestion window configuration"},
817 | {6, 6, "LBT_CWCONFIG_RST - O-RU to O-DU request, congestion window config, response"},
818 | {7, 15, "reserved for future methods"},
819 | {0, 0, NULL((void*)0)}
820 | };
821 |
822 | static const range_string freq_offset_fb_values[] = {
823 | {0, 0, "no frequency offset"},
824 | {8000, 8000, "value not provided"},
825 | {1, 30000, "positive frequency offset, (0, +0.5] subcarrier"},
826 | {0x8ad0, 0xffff, "negative frequency offset, [-0.5, 0) subcarrier"},
827 | {0x0, 0xffff, "reserved"},
828 | {0, 0, NULL((void*)0)}
829 | };
830 |
831 | static const value_string num_sinr_per_prb_vals[] = {
832 | { 0, "1" },
833 | { 1, "2" },
834 | { 2, "3" },
835 | { 3, "4" },
836 | { 4, "6" },
837 | { 5, "12" },
838 | { 6, "reserved" },
839 | { 7, "reserved" },
840 | { 0, NULL((void*)0)}
841 | };
842 |
843 | static const value_string meas_type_id_vals[] = {
844 | { 1, "UE Timing Advance Error" },
845 | { 2, "UE Layer power" },
846 | { 3, "UE frequency offset" },
847 | { 4, "Interference plus Noise for allocated PRBs" },
848 | { 5, "Interference plus Noise for unallocated PRBs" },
849 | { 6, "DMRS SNR per antenna" },
850 | { 0, NULL((void*)0)}
851 | };
852 |
853 | static const value_string beam_type_vals[] = {
854 | { 0, "List of beamId values" },
855 | { 1, "Range of beamId values" },
856 | { 0, NULL((void*)0)}
857 | };
858 |
859 | /* 7.7.24.3 */
860 | static const value_string entry_type_vals[] = {
861 | { 0, "inherit config from preceding entry (2 or 3) ueIdReset=0" },
862 | { 1, "inherit config from preceding entry (2 or 3) ueIdReset=1" },
863 | { 2, "related parameters if have transform precoding disabled " },
864 | { 3, "related parameters if have transform precoding enabled " },
865 | { 0, NULL((void*)0)}
866 | };
867 |
868 |
869 | /* Table 7.6.1-1 */
870 | static const value_string exttype_vals[] = {
871 | {0, "Reserved"},
872 | {1, "Beamforming weights"},
873 | {2, "Beamforming attributes"},
874 | {3, "DL Precoding configuration parameters and indications"},
875 | {4, "Modulation compr. params"},
876 | {5, "Modulation compression additional scaling parameters"},
877 | {6, "Non-contiguous PRB allocation"},
878 | {7, "Multiple-eAxC designation"},
879 | {8, "Regularization factor"},
880 | {9, "Dynamic Spectrum Sharing parameters"},
881 | {10, "Multiple ports grouping"},
882 | {11, "Flexible BF weights"},
883 | {12, "Non-Contiguous PRB Allocation with Frequency Ranges"},
884 | {13, "PRB Allocation with Frequency Hopping"},
885 | {14, "Nulling-layer Info. for ueId-based beamforming"},
886 | {15, "Mixed-numerology Info. for ueId-based beamforming"},
887 | {16, "Section description for antenna mapping in UE channel information based UL beamforming"},
888 | {17, "Section description for indication of user port group"},
889 | {18, "Section description for Uplink Transmission Management"},
890 | {19, "Compact beamforming information for multiple port"},
891 | {20, "Puncturing extension"},
892 | {21, "Variable PRB group size for channel information"},
893 | {22, "ACK/NACK request"},
894 | {23, "Multiple symbol modulation compression parameters"},
895 | {24, "PUSCH DMRS configuration"},
896 | {25, "Symbol reordering for DMRS-BF"},
897 | {26, "Frequency offset feedback"},
898 | {27, "O-DU controlled dimensionality reduction"},
899 | {28, "O-DU controlled frequency resolution for SINR reporting"},
900 | {0, NULL((void*)0)}
901 | };
902 |
903 | /**************************************************************************************/
904 | /* Keep track for each Section Extension, which section types are allowed to carry it */
905 | typedef struct {
906 | bool_Bool ST0;
907 | bool_Bool ST1;
908 | bool_Bool ST3;
909 | bool_Bool ST5;
910 | bool_Bool ST6;
911 | bool_Bool ST10;
912 | bool_Bool ST11;
913 | } AllowedCTs_t;
914 |
915 |
916 | static AllowedCTs_t ext_cts[HIGHEST_EXTTYPE28] = {
917 | /* ST0 ST1 ST3 ST5 ST6 ST10 ST11 */
918 | { false0, true1, true1, false0, false0, false0, false0}, // SE 1 (1,3)
919 | { false0, true1, true1, false0, false0, false0, false0}, // SE 2 (1,3)
920 | { false0, true1, true1, false0, false0, false0, false0}, // SE 3 (1,3)
921 | { false0, true1, true1, true1, false0, false0, false0}, // SE 4 (1,3,5)
922 | { false0, true1, true1, true1, false0, false0, false0}, // SE 5 (1,3,5)
923 | { false0, true1, true1, true1, false0, true1, true1 }, // SE 6 (1,3,5,10,11)
924 | { true1, false0, false0, false0, false0, false0, false0}, // SE 7 (0)
925 | { false0, false0, false0, true1, false0, false0, false0}, // SE 8 (5)
926 | { true1, true1, true1, true1, true1, true1, true1 }, // SE 9 (all)
927 | { false0, true1, true1, true1, false0, false0, false0}, // SE 10 (1,3,5)
928 | { false0, true1, true1, false0, false0, false0, false0}, // SE 11 (1,3)
929 | { false0, true1, true1, true1, false0, true1, true1 }, // SE 12 (1,3,5,10,11)
930 | { false0, true1, true1, true1, false0, false0, false0}, // SE 13 (1,3,5)
931 | { false0, false0, false0, true1, false0, false0, false0}, // SE 14 (5)
932 | { false0, false0, false0, true1, true1, false0, false0}, // SE 15 (5,6)
933 | { false0, false0, false0, true1, false0, false0, false0}, // SE 16 (5)
934 | { false0, false0, false0, true1, false0, false0, false0}, // SE 17 (5)
935 | { false0, true1, true1, true1, false0, false0, false0}, // SE 18 (1,3,5)
936 | { false0, true1, true1, false0, false0, false0, false0}, // SE 19 (1,3)
937 | { true1, true1, true1, true1, true1, true1, true1 }, // SE 20 (0,1,3,5,10,11)
938 | { false0, false0, false0, true1, true1, false0, false0}, // SE 21 (5,6)
939 | { true1, true1, true1, true1, true1, true1, true1 }, // SE 22 (all)
940 | { false0, true1, true1, true1, false0, false0, false0}, // SE 23 (1,3,5)
941 | { false0, false0, false0, true1, false0, false0, false0}, // SE 24 (5)
942 | { false0, false0, false0, true1, false0, false0, false0}, // SE 25 (5)
943 | { false0, false0, false0, true1, false0, false0, false0}, // SE 26 (5)
944 | { false0, false0, false0, true1, false0, false0, false0}, // SE 27 (5)
945 | { false0, false0, false0, true1, false0, false0, false0}, // SE 28 (5)
946 | };
947 |
948 | static bool_Bool se_allowed_in_st(unsigned se, unsigned ct)
949 | {
950 | if (se==0 || se>HIGHEST_EXTTYPE28) {
951 | /* Don't know about new SE, so don't complain.. */
952 | return true1;
953 | }
954 |
955 | switch (ct) {
956 | case 1:
957 | return ext_cts[se-1].ST1;
958 | case 3:
959 | return ext_cts[se-1].ST3;
960 | case 5:
961 | return ext_cts[se-1].ST5;
962 | case 6:
963 | return ext_cts[se-1].ST6;
964 | case 10:
965 | return ext_cts[se-1].ST10;
966 | case 11:
967 | return ext_cts[se-1].ST11;
968 | default:
969 | /* New/unknown section type that includes 'ef'.. assume ok */
970 | return true1;
971 | }
972 | }
973 |
974 | /************************************************************************************/
975 |
976 | /* Table 7.7.1.2-2 */
977 | static const value_string bfw_comp_headers_iq_width[] = {
978 | {0, "I and Q are 16 bits wide"},
979 | {1, "I and Q are 1 bit wide"},
980 | {2, "I and Q are 2 bits wide"},
981 | {3, "I and Q are 3 bits wide"},
982 | {4, "I and Q are 4 bits wide"},
983 | {5, "I and Q are 5 bits wide"},
984 | {6, "I and Q are 6 bits wide"},
985 | {7, "I and Q are 7 bits wide"},
986 | {8, "I and Q are 8 bits wide"},
987 | {9, "I and Q are 9 bits wide"},
988 | {10, "I and Q are 10 bits wide"},
989 | {11, "I and Q are 11 bits wide"},
990 | {12, "I and Q are 12 bits wide"},
991 | {13, "I and Q are 13 bits wide"},
992 | {14, "I and Q are 14 bits wide"},
993 | {15, "I and Q are 15 bits wide"},
994 | {0, NULL((void*)0)}
995 | };
996 |
997 | /* Table 7.7.1.2-3 */
998 | static const value_string bfw_comp_headers_comp_meth[] = {
999 | {COMP_NONE0, "no compression"},
1000 | {COMP_BLOCK_FP1, "block floating point"},
1001 | {COMP_BLOCK_SCALE2, "block scaling"},
1002 | {COMP_U_LAW3, "u-law"},
1003 | {4, "beamspace compression type I"},
1004 | {5, "beamspace compression type II"},
1005 | {0, NULL((void*)0)}
1006 | };
1007 |
1008 | /* 7.7.6.2 rbgSize (resource block group size) */
1009 | static const value_string rbg_size_vals[] = {
1010 | {0, "reserved"},
1011 | {1, "1"},
1012 | {2, "2"},
1013 | {3, "3"},
1014 | {4, "4"},
1015 | {5, "6"},
1016 | {6, "8"},
1017 | {7, "16"},
1018 | {0, NULL((void*)0)}
1019 | };
1020 |
1021 | /* 7.7.6.5 */
1022 | static const value_string priority_vals[] = {
1023 | {0, "0"},
1024 | {1, "+1"},
1025 | {2, "-2 (reserved, should not be used)"},
1026 | {3, "-1"},
1027 | {0, NULL((void*)0)}
1028 | };
1029 |
1030 | /* 7.7.10.2 beamGroupType */
1031 | static const value_string beam_group_type_vals[] = {
1032 | {0x0, "common beam"},
1033 | {0x1, "beam matrix indication"},
1034 | {0x2, "beam vector listing"},
1035 | {0x3, "beamId/ueId listing with associated port-list index"},
1036 | {0, NULL((void*)0)}
1037 | };
1038 |
1039 | /* 7.7.9.2 technology (interface name) */
1040 | static const value_string interface_name_vals[] = {
1041 | {0x0, "LTE"},
1042 | {0x1, "NR"},
1043 | {0, NULL((void*)0)}
1044 | };
1045 |
1046 | /* 7.7.18.4 toT (type of transmission) */
1047 | static const value_string type_of_transmission_vals[] = {
1048 | {0x0, "normal transmission mode, data can be distributed in any way the O-RU is implemented to transmit data"},
1049 | {0x1, "uniformly distributed over the transmission window"},
1050 | {0x2, "Reserved"},
1051 | {0x3, "Reserved"},
1052 | {0, NULL((void*)0)}
1053 | };
1054 |
1055 | /* 7.7.2.2 (width of bfa parameters) */
1056 | static const value_string bfa_bw_vals[] = {
1057 | {0, "no bits, the field is not applicable (e.g., O-RU does not support it) or the default value shall be used"},
1058 | {1, "2-bit bitwidth"},
1059 | {2, "3-bit bitwidth"},
1060 | {3, "4-bit bitwidth"},
1061 | {4, "5-bit bitwidth"},
1062 | {5, "6-bit bitwidth"},
1063 | {6, "7-bit bitwidth"},
1064 | {7, "8-bit bitwidth"},
1065 | {0, NULL((void*)0)}
1066 | };
1067 |
1068 | /* 7.7.2.7 & 7.7.2.8 */
1069 | static const value_string sidelobe_suppression_vals[] = {
1070 | {0, "10 dB"},
1071 | {1, "15 dB"},
1072 | {2, "20 dB"},
1073 | {3, "25 dB"},
1074 | {4, "30 dB"},
1075 | {5, "35 dB"},
1076 | {6, "40 dB"},
1077 | {7, ">= 45 dB"},
1078 | {0, NULL((void*)0)}
1079 | };
1080 |
1081 | static const value_string lbtTrafficClass_vals[] = {
1082 | {1, "Priority 1"},
1083 | {2, "Priority 2"},
1084 | {3, "Priority 3"},
1085 | {4, "Priority 4"},
1086 | {0, NULL((void*)0)}
1087 | };
1088 |
1089 | /* 7.5.3.22 */
1090 | static const value_string lbtPdschRes_vals[] = {
1091 | {0, "not sensing – indicates that the O-RU is transmitting data"},
1092 | {1, "currently sensing – indicates the O-RU has not yet acquired the channel"},
1093 | {2, "success – indicates that the channel was successfully acquired"},
1094 | {3, "Failure – indicates expiration of the LBT timer. The LBT process should be reset"},
1095 | {0, NULL((void*)0)}
1096 | };
1097 |
1098 | /* Table 7.5.2.15-3 */
1099 | static const value_string ci_comp_opt_vals[] = {
1100 | {0, "compression per UE, one ciCompParam exists before the I/Q value of each UE"},
1101 | {1, "compression per PRB, one ciCompParam exists before the I/Q value of each PRB"},
1102 | {0, NULL((void*)0)}
1103 | };
1104 |
1105 | /* 7.5.2.17 */
1106 | static const range_string cmd_scope_vals[] = {
1107 | {0, 0, "ARRAY-COMMAND"},
1108 | {1, 1, "CARRIER-COMMAND"},
1109 | {2, 2, "O-RU-COMMAND"},
1110 | {3, 15, "reserved"},
1111 | {0, 0, NULL((void*)0)}
1112 | };
1113 |
1114 | /* N.B., table in 7.5.3.38 is truncated.. */
1115 | static const range_string st4_cmd_type_vals[] = {
1116 | {0, 0, "reserved for future command types"},
1117 | {1, 1, "TIME_DOMAIN_BEAM_CONFIG"},
1118 | {2, 2, "TDD_CONFIG_PATTERN"},
1119 | {3, 3, "TRX_CONTROL"},
1120 | {4, 4, "ASM"},
1121 | {5, 255, "reserved for future command types"},
1122 | {0, 0, NULL((void*)0)}
1123 | };
1124 |
1125 | /* Table 7.5.3.51-1 */
1126 | static const value_string log2maskbits_vals[] = {
1127 | {0, "reserved"},
1128 | {1, "min antMask size is 16 bits.."},
1129 | {2, "min antMask size is 16 bits.."},
1130 | {3, "min antMask size is 16 bits.."},
1131 | {4, "16 bits"},
1132 | {5, "32 bits"},
1133 | {6, "64 bits"},
1134 | {7, "128 bits"},
1135 | {8, "256 bits"},
1136 | {9, "512 bits"},
1137 | {10, "1024 bits"},
1138 | {11, "2048 bits"},
1139 | {12, "4096 bits"},
1140 | {13, "8192 bits"},
1141 | {14, "16384 bits"},
1142 | {15, "reserved"},
1143 | {0, NULL((void*)0)}
1144 | };
1145 |
1146 | /* Table 16.1-1 Sleep modes */
1147 | static const value_string sleep_mode_trx_vals[] = {
1148 | { 0, "TRXC-mode0-wake-up-duration (symbol)"},
1149 | { 1, "TRXC-mode1-wake-up-duration (L)"},
1150 | { 2, "TRXC-mode2-wake-up-duration (M)"},
1151 | { 3, "TRXC-mode3-wake-up-duration (N)"},
1152 | { 0, NULL((void*)0)}
1153 | };
1154 |
1155 | static const value_string sleep_mode_asm_vals[] = {
1156 | { 0, "ASM-mode0-wake-up-duration (symbol)"},
1157 | { 1, "ASM-mode1-wake-up-duration (L)"},
1158 | { 2, "ASM-mode2-wake-up-duration (M)"},
1159 | { 3, "ASM-mode3-wake-up-duration (N)"},
1160 | { 0, NULL((void*)0)}
1161 | };
1162 |
1163 | /* 7.7.21.3.1 */
1164 | static const value_string prg_size_st5_vals[] = {
1165 | { 0, "reserved"},
1166 | { 1, "Precoding resource block group size as WIDEBAND"},
1167 | { 2, "Precoding resource block group size 2"},
1168 | { 3, "Precoding resource block group size 4"},
1169 | { 0, NULL((void*)0)}
1170 | };
1171 |
1172 | /* 7.7.21.3.2 */
1173 | static const value_string prg_size_st6_vals[] = {
1174 | { 0, "if ciPrbGroupSize is 2 or 4, then ciPrbGroupSize, else WIDEBAND"},
1175 | { 1, "Precoding resource block group size as WIDEBAND"},
1176 | { 2, "Precoding resource block group size 2"},
1177 | { 3, "Precoding resource block group size 4"},
1178 | { 0, NULL((void*)0)}
1179 | };
1180 |
1181 | /* 7.7.24.4 */
1182 | static const value_string alpn_per_sym_vals[] = {
1183 | { 0, "report one allocated IPN value per all allocated symbols with DMRS"},
1184 | { 1, "report one allocated IPN value per group of consecutive DMRS symbols"},
1185 | { 0, NULL((void*)0)}
1186 | };
1187 |
1188 | /* 7.7.24.5 */
1189 | static const value_string ant_dmrs_snr_vals[] = {
1190 | { 0, "O-RU shall not report the MEAS_ANT_DMRS_SNR"},
1191 | { 1, "O-RU shall report the MEAS_ANT_DMRS_SNR"},
1192 | { 0, NULL((void*)0)}
1193 | };
1194 |
1195 | /* 7.7.24.14 */
1196 | static const value_string dtype_vals[] = {
1197 | { 0, "assume DMRS configuration type 1"},
1198 | { 1, "assume DMRS configuration type 2"},
1199 | { 0, NULL((void*)0)}
1200 | };
1201 |
1202 | /* 7.7.24.17 */
1203 | static const value_string papr_type_vals[] = {
1204 | { 0, "sequence generator type 1 for short sequence lengths"},
1205 | { 1, "sequence generator type 1 for long sequence lengths"},
1206 | { 2, "sequence generator type 2 for short sequence lengths"},
1207 | { 3, "sequence generator type 2 for long sequence lengths"},
1208 | { 0, NULL((void*)0)}
1209 | };
1210 |
1211 | /* 7.7.24.18 */
1212 | static const value_string hopping_mode_vals[] = {
1213 | { 0, "neither group, nor sequence hopping is enabled"},
1214 | { 1, "group hopping is enabled and sequence hopping is disabled"},
1215 | { 2, "sequence hopping is enabled and group hopping is disabled"},
1216 | { 3, "reserved"},
1217 | { 0, NULL((void*)0)}
1218 | };
1219 |
1220 |
1221 | static const true_false_string tfs_sfStatus =
1222 | {
1223 | "subframe was transmitted",
1224 | "subframe was dropped"
1225 | };
1226 |
1227 | static const true_false_string tfs_lbtBufErr =
1228 | {
1229 | "buffer overflow – data received at O-RU is larger than the available buffer size",
1230 | "reserved"
1231 | };
1232 |
1233 | static const true_false_string tfs_partial_full_sf = {
1234 | "partial SF",
1235 | "full SF"
1236 | };
1237 |
1238 | static const true_false_string disable_tdbfns_tfs = {
1239 | "beam numbers excluded",
1240 | "beam numbers included"
1241 | };
1242 |
1243 | static const true_false_string continuity_indication_tfs = {
1244 | "continuity between current and next bundle",
1245 | "discontinuity between current and next bundle"
1246 | };
1247 |
1248 | static const true_false_string prb_mode_tfs = {
1249 | "PRB-BLOCK mode",
1250 | "PRB-MASK mode"
1251 | };
1252 |
1253 | static const true_false_string symbol_direction_tfs = {
1254 | "DL symbol",
1255 | "UL symbol"
1256 | };
1257 |
1258 | static const true_false_string symbol_guard_tfs = {
1259 | "guard symbol",
1260 | "non-guard symbol"
1261 | };
1262 |
1263 | static const true_false_string beam_numbers_included_tfs = {
1264 | "time-domain beam numbers excluded in this command",
1265 | "time-domain beam numbers included in this command"
1266 | };
1267 |
1268 | static const true_false_string measurement_flag_tfs = {
1269 | "at least one additional measurement report or command after the current one",
1270 | "no additional measurement report or command"
1271 | };
1272 |
1273 | static const true_false_string repetition_se6_tfs = {
1274 | "repeated highest priority data section in the C-Plane message",
1275 | "no repetition"
1276 | };
1277 |
1278 | static const true_false_string repetition_se19_tfs = {
1279 | "per port information not present in the extension",
1280 | "per port info present in the extension"
1281 | };
1282 |
1283 |
1284 |
1285 | /* Forward declaration */
1286 | static int dissect_udcompparam(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree, unsigned offset,
1287 | unsigned comp_meth,
1288 | uint32_t *exponent, uint16_t *sReSMask, bool_Bool for_sinr);
1289 |
1290 |
1291 | static const true_false_string ready_tfs = {
1292 | "message is a \"ready\" message",
1293 | "message is a ACK message"
1294 | };
1295 |
1296 | static const true_false_string multi_sd_scope_tfs = {
1297 | "Puncturing pattern applies to current and following sections",
1298 | "Puncturing pattern applies to current section"
1299 | };
1300 |
1301 | static const true_false_string tfs_ueid_reset = {
1302 | "cannot assume same UE as in preceding slot",
1303 | "can assume same UE as in preceding slot"
1304 | };
1305 |
1306 |
1307 | /* Config for (and later, worked-out allocations) bundles for ext11 (dynamic BFW) */
1308 | typedef struct {
1309 | /* Ext 6 config */
1310 | bool_Bool ext6_set;
1311 | uint8_t ext6_rbg_size; /* number of PRBs allocated by bitmask */
1312 |
1313 | uint8_t ext6_num_bits_set;
1314 | uint8_t ext6_bits_set[28]; /* Which bit position this entry has */
1315 | /* TODO: store an f value for each bit position? */
1316 |
1317 | /* Ext 12 config */
1318 | bool_Bool ext12_set;
1319 | unsigned ext12_num_pairs;
1320 | #define MAX_BFW_EXT12_PAIRS128 128
1321 | struct {
1322 | uint8_t off_start_prb;
1323 | uint8_t num_prb;
1324 | } ext12_pairs[MAX_BFW_EXT12_PAIRS128];
1325 |
1326 | /* Ext 13 config */
1327 | bool_Bool ext13_set;
1328 | unsigned ext13_num_start_prbs;
1329 | #define MAX_BFW_EXT13_ALLOCATIONS128 128
1330 | unsigned ext13_start_prbs[MAX_BFW_EXT13_ALLOCATIONS128];
1331 | /* TODO: store nextSymbolId here too? */
1332 |
1333 | /* Ext 21 config */
1334 | bool_Bool ext21_set;
1335 | uint8_t ext21_ci_prb_group_size;
1336 |
1337 | /* Results/settings (after calling ext11_work_out_bundles()) */
1338 | uint32_t num_bundles;
1339 | #define MAX_BFW_BUNDLES512 512
1340 | struct {
1341 | uint32_t start; /* first prb of bundle */
1342 | uint32_t end; /* last prb of bundle*/
1343 | bool_Bool is_orphan; /* true if not complete (i.e., end-start < numBundPrb) */
1344 | } bundles[MAX_BFW_BUNDLES512];
1345 | } ext11_settings_t;
1346 |
1347 |
1348 | /* Work out bundle allocation for ext 11. Take into account ext6/ext21, ext12 or ext13 in this section before ext 11. */
1349 | /* Won't be called with numBundPrb=0 */
1350 | static void ext11_work_out_bundles(unsigned startPrbc,
1351 | unsigned numPrbc,
1352 | unsigned numBundPrb, /* number of PRBs pre (full) bundle */
1353 | ext11_settings_t *settings)
1354 | {
1355 | /* Allocation configured by ext 6 */
1356 | if (settings->ext6_set) {
1357 | unsigned bundles_per_entry = (settings->ext6_rbg_size / numBundPrb);
1358 |
1359 | /* Need to cope with these not dividing exactly, or even having more PRbs in a bundle that
1360 | rbg size. i.e. each bundle gets the correct number of PRBs until
1361 | all rbg entries are consumed... */
1362 |
1363 | /* TODO: need to check 7.9.4.2. Different cases depending upon value of RAD */
1364 |
1365 | if (bundles_per_entry == 0) {
1366 | bundles_per_entry = 1;
1367 | }
1368 |
1369 | /* Maybe also be affected by ext 21 */
1370 | if (settings->ext21_set) {
1371 | /* N.B., have already checked that numPrbc is not 0 */
1372 |
1373 | /* ciPrbGroupSize overrides number of contiguous PRBs in group */
1374 | bundles_per_entry = (settings->ext6_rbg_size / settings->ext21_ci_prb_group_size);
1375 |
1376 | /* numPrbc is the number of PRB groups per antenna - handled in call to dissect_bfw_bundle() */
1377 | }
1378 |
1379 | unsigned bundles_set = 0;
1380 | for (unsigned n=0;
1381 | n < (settings->ext6_num_bits_set * settings->ext6_rbg_size) / numBundPrb;
1382 | n++) {
1383 |
1384 | /* Watch out for array bound */
1385 | if (n >= 28) {
1386 | break;
1387 | }
1388 |
1389 | /* For each bundle... */
1390 |
1391 | /* TODO: Work out where first PRB is */
1392 | /* May not be the start of an rbg block... */
1393 | uint32_t prb_start = (settings->ext6_bits_set[n] * settings->ext6_rbg_size);
1394 |
1395 | /* For each bundle within identified rbgSize block */
1396 | for (unsigned m=0; m < bundles_per_entry; m++) {
1397 | settings->bundles[bundles_set].start = startPrbc+prb_start+(m*numBundPrb);
1398 | /* Start already beyond end, so doesn't count. */
1399 | if (settings->bundles[bundles_set].start > (startPrbc+numPrbc-1)) {
1400 | break;
1401 | }
1402 | /* Bundle consists of numBundPrb bundles */
1403 | /* TODO: may involve PRBs from >1 rbg blocks.. */
1404 | settings->bundles[bundles_set].end = startPrbc+prb_start+((m+1)*numBundPrb)-1;
1405 | if (settings->bundles[bundles_set].end > (startPrbc+numPrbc-1)) {
1406 | /* Extends beyond end, so counts but is an orphan bundle */
1407 | settings->bundles[bundles_set].end = numPrbc;
1408 | settings->bundles[bundles_set].is_orphan = true1;
1409 | }
1410 |
1411 | /* Get out if have reached array bound */
1412 | if (++bundles_set == MAX_BFW_BUNDLES512) {
1413 | return;
1414 | }
1415 | }
1416 | }
1417 | settings->num_bundles = bundles_set;
1418 | }
1419 |
1420 | /* Allocation configured by ext 12 */
1421 | else if (settings->ext12_set) {
1422 | /* First, allocate normally from startPrbc, numPrbc */
1423 | settings->num_bundles = (numPrbc+numBundPrb-1) / numBundPrb;
1424 |
1425 | /* Don't overflow settings->bundles[] ! */
1426 | settings->num_bundles = MIN(MAX_BFW_BUNDLES, settings->num_bundles)(((512) < (settings->num_bundles)) ? (512) : (settings-> num_bundles));
1427 |
1428 | for (uint32_t n=0; n < settings->num_bundles; n++) {
1429 | settings->bundles[n].start = startPrbc + n*numBundPrb;
1430 | settings->bundles[n].end = settings->bundles[n].start + numBundPrb-1;
1431 | /* Does it go beyond the end? */
1432 | if (settings->bundles[n].end > startPrbc+numPrbc) {
1433 | settings->bundles[n].end = numPrbc+numPrbc;
1434 | settings->bundles[n].is_orphan = true1;
1435 | }
1436 | }
1437 | if (settings->num_bundles == MAX_BFW_BUNDLES512) {
1438 | return;
1439 | }
1440 |
1441 | unsigned prb_offset = startPrbc + numPrbc;
1442 |
1443 | /* Loop over pairs, adding bundles for each */
1444 | for (unsigned p=0; p < settings->ext12_num_pairs; p++) {
1445 | prb_offset += settings->ext12_pairs[p].off_start_prb;
1446 | unsigned pair_bundles = (settings->ext12_pairs[p].num_prb+numBundPrb-1) / numBundPrb;
1447 |
1448 | for (uint32_t n=0; n < pair_bundles; n++) {
1449 | unsigned idx = settings->num_bundles;
1450 |
1451 | settings->bundles[idx].start = prb_offset + n*numBundPrb;
1452 | settings->bundles[idx].end = settings->bundles[idx].start + numBundPrb-1;
1453 | /* Does it go beyond the end? */
1454 | if (settings->bundles[idx].end > prb_offset + settings->ext12_pairs[p].num_prb) {
1455 | settings->bundles[idx].end = prb_offset + settings->ext12_pairs[p].num_prb;
1456 | settings->bundles[idx].is_orphan = true1;
1457 | }
1458 | /* Range check / return */
1459 | settings->num_bundles++;
1460 | if (settings->num_bundles == MAX_BFW_BUNDLES512) {
1461 | return;
1462 | }
1463 | }
1464 |
1465 | prb_offset += settings->ext12_pairs[p].num_prb;
1466 | }
1467 | }
1468 |
1469 | /* Allocation configured by ext 13 */
1470 | else if (settings->ext13_set) {
1471 | unsigned alloc_size = (numPrbc+numBundPrb-1) / numBundPrb;
1472 | settings->num_bundles = alloc_size * settings->ext13_num_start_prbs;
1473 |
1474 | /* Don't overflow settings->bundles[] ! */
1475 | settings->num_bundles = MIN(MAX_BFW_BUNDLES, settings->num_bundles)(((512) < (settings->num_bundles)) ? (512) : (settings-> num_bundles));
1476 |
1477 | for (unsigned alloc=0; alloc < settings->ext13_num_start_prbs; alloc++) {
1478 | unsigned alloc_start = alloc * alloc_size;
1479 | for (uint32_t n=0; n < alloc_size; n++) {
1480 | if ((alloc_start+n) >= MAX_BFW_BUNDLES512) {
1481 | /* ERROR */
1482 | return;
1483 | }
1484 | settings->bundles[alloc_start+n].start = settings->ext13_start_prbs[alloc] + startPrbc + n*numBundPrb;
1485 | settings->bundles[alloc_start+n].end = settings->bundles[alloc_start+n].start + numBundPrb-1;
1486 | if (settings->bundles[alloc_start+n].end > settings->ext13_start_prbs[alloc] + numPrbc) {
1487 | settings->bundles[alloc_start+n].end = settings->ext13_start_prbs[alloc] + numPrbc;
1488 | settings->bundles[alloc_start+n].is_orphan = true1;
1489 | }
1490 | }
1491 | }
1492 | }
1493 |
1494 | /* Case where bundles are not controlled by other extensions - just divide up range into bundles we have */
1495 | else {
1496 | settings->num_bundles = (numPrbc+numBundPrb-1) / numBundPrb; /* rounded up */
1497 |
1498 | /* Don't overflow settings->bundles[] */
1499 | settings->num_bundles = MIN(MAX_BFW_BUNDLES, settings->num_bundles)(((512) < (settings->num_bundles)) ? (512) : (settings-> num_bundles));
1500 |
1501 | /* For each bundle.. */
1502 | for (uint32_t n=0; n < settings->num_bundles; n++) {
1503 | /* Allocate start and end */
1504 | settings->bundles[n].start = startPrbc + n*numBundPrb;
1505 | settings->bundles[n].end = settings->bundles[n].start + numBundPrb - 1;
1506 | /* If would go beyond end of PRBs, limit and identify as orphan */
1507 | if (settings->bundles[n].end > startPrbc+numPrbc) {
1508 | settings->bundles[n].end = startPrbc+numPrbc;
1509 | settings->bundles[n].is_orphan = true1;
1510 | }
1511 | }
1512 | }
1513 | }
1514 |
1515 |
1516 | /*******************************************************/
1517 | /* Overall state of a flow (eAxC/plane) */
1518 | typedef struct {
1519 | /* State for sequence analysis [each direction] */
1520 | bool_Bool last_frame_seen[2];
1521 | uint32_t last_frame[2];
1522 | uint8_t next_expected_sequence_number[2];
1523 |
1524 | /* Table recording ackNack requests (ackNackId -> ack_nack_request_t*)
1525 | Note that this assumes that the same ackNackId will not be reused within a state,
1526 | which may well not be valid */
1527 | wmem_tree_t *ack_nack_requests;
1528 |
1529 | /* Store udCompHdr seen in C-Plane for UL - can be looked up and used by U-PLane.
1530 | Note that this appears in the common section header parts of ST1, ST3, ST5,
1531 | so can still be over-written per sectionId in the U-Plane */
1532 | unsigned ul_ud_comp_hdr_frame;
1533 | bool_Bool ul_ud_comp_hdr_set;
1534 | unsigned ul_ud_comp_hdr_bit_width;
1535 | int ul_ud_comp_hdr_compression;
1536 |
1537 | bool_Bool udcomphdrDownlink_heuristic_result_set;
1538 | bool_Bool udcomphdrDownlink_heuristic_result;
1539 | bool_Bool udcomphdrUplink_heuristic_result_set;
1540 | bool_Bool udcomphdrUplink_heuristic_result;
1541 |
1542 | /* Modulation compression params */
1543 | /* TODO: incomplete (see SE4, SE5, SE23), and needs to be per section! */
1544 | //uint16_t mod_comp_re_mask;
1545 | //bool mod_compr_csf;
1546 | //double mod_compr_mod_comp_scaler;
1547 | } flow_state_t;
1548 |
1549 | typedef struct {
1550 | uint32_t request_frame_number;
1551 | nstime_t request_frame_time;
1552 | enum {
1553 | SE22,
1554 | ST4Cmd1,
1555 | ST4Cmd2,
1556 | ST4Cmd3,
1557 | ST4Cmd4
1558 | } requestType;
1559 |
1560 | uint32_t response_frame_number;
1561 | nstime_t response_frame_time;
1562 | } ack_nack_request_t;
1563 |
1564 | static const value_string acknack_type_vals[] = {
1565 | { SE22, "SE 22" },
1566 | { ST4Cmd1, "ST4 (TIME_DOMAIN_BEAM_CONFIG)" },
1567 | { ST4Cmd2, "ST4 (TDD_CONFIG_PATTERN)" },
1568 | { ST4Cmd3, "ST4 (TRX_CONTROL)" },
1569 | { ST4Cmd4, "ST4 (ASM)" },
1570 | { 0, NULL((void*)0)}
1571 | };
1572 |
1573 | #define ORAN_C_PLANE0 0
1574 | #define ORAN_U_PLANE1 1
1575 |
1576 | /* Using parts of src/dst MAC address, so don't confuse UL messages with DL messages configuring UL.. */
1577 | static uint32_t make_flow_key(packet_info *pinfo, uint16_t eaxc_id, uint8_t plane, bool_Bool opposite_dir)
1578 | {
1579 | uint16_t eth_bits = 0;
1580 | if (pinfo->dl_src.len == 6 && pinfo->dl_dst.len == 6) {
1581 | /* Only using (most of) 2 bytes from addresses for now, but reluctant to make key longer.. */
1582 | uint8_t *src_eth = (uint8_t*)pinfo->dl_src.data;
1583 | uint8_t *dst_eth = (uint8_t*)pinfo->dl_dst.data;
1584 | if (!opposite_dir) {
1585 | eth_bits = (src_eth[0]<<8) | dst_eth[5];
1586 | }
1587 | else {
1588 | eth_bits = (dst_eth[0]<<8) | src_eth[5];
1589 | }
1590 | }
1591 | return eaxc_id | (plane << 16) | (eth_bits << 17);
1592 | }
1593 |
1594 |
1595 | /* Table maintained on first pass from flow_key(uint32_t) -> flow_state_t* */
1596 | static wmem_tree_t *flow_states_table;
1597 |
1598 | /* Table consulted on subsequent passes: frame_num -> flow_result_t* */
1599 | static wmem_tree_t *flow_results_table;
1600 |
1601 | typedef struct {
1602 | /* Sequence analysis */
1603 | bool_Bool unexpected_seq_number;
1604 | uint8_t expected_sequence_number;
1605 | uint32_t previous_frame;
1606 | } flow_result_t;
1607 |
1608 |
1609 | /* Uplink timing */
1610 | /* For a given symbol, track first to last UL frame to find out first-last time */
1611 | /* frameId (8) + subframeId (4) + slotId (6) + symbolId (6) = 24 bits */
1612 | /* N.B. if a capture lasts > 2.5s, may see same timing come around again... */
1613 | static uint32_t get_timing_key(uint8_t frameId, uint8_t subframeId, uint8_t slotId, uint8_t symbolId)
1614 | {
1615 | return symbolId + (slotId<<8) + (subframeId<<14) + (frameId<<18);
1616 | }
1617 |
1618 | typedef struct {
1619 | uint32_t first_frame;
1620 | nstime_t first_frame_time;
1621 | uint32_t frames_seen_in_symbol;
1622 | uint32_t last_frame_in_symbol;
1623 | } ul_timing_for_slot;
1624 |
1625 | /* Set during first pass. timing_key -> ul_timing_for_slot* */
1626 | static wmem_tree_t *ul_symbol_timing;
1627 |
1628 |
1629 | static void show_link_to_acknack_response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
1630 | ack_nack_request_t *response);
1631 |
1632 |
1633 |
1634 |
1635 | static void write_pdu_label_and_info(proto_item *ti1, proto_item *ti2,
1636 | packet_info *pinfo, const char *format, ...) G_GNUC_PRINTF(4, 5)__attribute__((__format__ (__printf__, 4, 5)));
1637 |
1638 | /* Write the given formatted text to:
1639 | - the info column (if pinfo != NULL)
1640 | - 1 or 2 other labels (optional)
1641 | */
1642 | static void write_pdu_label_and_info(proto_item *ti1, proto_item *ti2,
1643 | packet_info *pinfo, const char *format, ...)
1644 | {
1645 | #define MAX_INFO_BUFFER256 256
1646 | char info_buffer[MAX_INFO_BUFFER256];
1647 | va_list ap;
1648 |
1649 | if ((ti1 == NULL((void*)0)) && (ti2 == NULL((void*)0)) && (pinfo == NULL((void*)0))) {
1650 | return;
1651 | }
1652 |
1653 | va_start(ap, format)__builtin_va_start(ap, format);
1654 | vsnprintf(info_buffer, MAX_INFO_BUFFER256, format, ap);
1655 | va_end(ap)__builtin_va_end(ap);
1656 |
1657 | /* Add to indicated places */
1658 | if (pinfo != NULL((void*)0)) {
1659 | col_append_str(pinfo->cinfo, COL_INFO, info_buffer);
1660 | }
1661 | if (ti1 != NULL((void*)0)) {
1662 | proto_item_append_text(ti1, "%s", info_buffer);
1663 | }
1664 | if (ti2 != NULL((void*)0)) {
1665 | proto_item_append_text(ti2, "%s", info_buffer);
1666 | }
1667 | }
1668 |
1669 | /* Add section labels (type + PRB range) for C-Plane, U-Plane */
1670 | static void
1671 | write_section_info(proto_item *section_heading, packet_info *pinfo, proto_item *protocol_item,
1672 | uint32_t section_id, uint32_t start_prbx, uint32_t num_prbx, uint32_t rb)
1673 | {
1674 | switch (num_prbx) {
1675 | case 0:
1676 | /* None -> all */
1677 | write_pdu_label_and_info(section_heading, protocol_item, pinfo, ", Id: %4d (all PRBs)", section_id);
1678 | break;
1679 | case 1:
1680 | /* Single PRB */
1681 | write_pdu_label_and_info(section_heading, protocol_item, pinfo, ", Id: %4d (PRB: %7u)", section_id, start_prbx);
1682 | break;
1683 | default:
1684 | /* Range */
1685 | write_pdu_label_and_info(section_heading, protocol_item, pinfo, ", Id: %4d (PRB: %3u-%3u%s)", section_id, start_prbx,
1686 | start_prbx + (num_prbx-1)*(1+rb), rb ? " (every-other)" : "");
1687 | }
1688 | }
1689 |
1690 | static void
1691 | write_channel_section_info(proto_item *section_heading, packet_info *pinfo,
1692 | uint32_t section_id, uint32_t ueId, uint32_t start_prbx, uint32_t num_prbx,
1693 | uint32_t num_trx)
1694 | {
1695 | switch (num_prbx) {
1696 | case 0:
1697 | /* TODO: ?? */
1698 | break;
1699 | case 1:
1700 | /* Single PRB */
1701 | write_pdu_label_and_info(section_heading, NULL((void*)0), pinfo,
1702 | ", Id: %4d (UEId=%5u PRB %7u, %2u antennas)",
1703 | section_id, ueId, start_prbx, num_trx);
1704 | break;
1705 | default:
1706 | /* Range */
1707 | write_pdu_label_and_info(section_heading, NULL((void*)0), pinfo,
1708 | ", Id: %4d (UEId=%5u PRBs %3u-%3u, %2u antennas)",
1709 | section_id, ueId, start_prbx, start_prbx+num_prbx-1, num_trx);
1710 | }
1711 | }
1712 |
1713 |
1714 | /* 5.1.3.2.7 (real time control data / IQ data transfer message series identifier) */
1715 | static void
1716 | addPcOrRtcid(tvbuff_t *tvb, proto_tree *tree, int *offset, int hf, uint16_t *eAxC)
1717 | {
1718 | /* Subtree */
1719 | proto_item *oran_pcid_ti = proto_tree_add_item(tree, hf,
1720 | tvb, *offset, 2, ENC_NA0x00000000);
1721 | proto_tree *oran_pcid_tree = proto_item_add_subtree(oran_pcid_ti, ett_oran_ecpri_pcid);
1722 |
1723 | uint64_t duPortId, bandSectorId, ccId, ruPortId = 0;
1724 | int id_offset = *offset;
1725 |
1726 | /* All parts of eAxC should be above 0, and should total 16 bits (breakdown controlled by preferences) */
1727 | if (!((pref_du_port_id_bits > 0) && (pref_bandsector_id_bits > 0) && (pref_cc_id_bits > 0) && (pref_ru_port_id_bits > 0) &&
1728 | ((pref_du_port_id_bits + pref_bandsector_id_bits + pref_cc_id_bits + pref_ru_port_id_bits) == 16))) {
1729 | expert_add_info(NULL((void*)0), tree, &ei_oran_invalid_eaxc_bit_width);
1730 | *eAxC = 0;
1731 | *offset += 2;
1732 | return;
1733 | }
1734 |
1735 | unsigned bit_offset = *offset * 8;
1736 |
1737 | /* N.B. For sequence analysis / tapping, just interpret these 2 bytes as eAxC ID... */
1738 | *eAxC = tvb_get_uint16(tvb, *offset, ENC_BIG_ENDIAN0x00000000);
1739 |
1740 | /* DU Port ID */
1741 | 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);
1742 | bit_offset += pref_du_port_id_bits;
1743 | /* BandSector ID */
1744 | proto_tree_add_bits_ret_val(oran_pcid_tree, hf_oran_bandsector_id, tvb, bit_offset, pref_bandsector_id_bits, &bandSectorId, ENC_BIG_ENDIAN0x00000000);
1745 | bit_offset += pref_bandsector_id_bits;
1746 | /* CC ID */
1747 | proto_tree_add_bits_ret_val(oran_pcid_tree, hf_oran_cc_id, tvb, bit_offset, pref_cc_id_bits, &ccId, ENC_BIG_ENDIAN0x00000000);
1748 | bit_offset += pref_cc_id_bits;
1749 | /* RU Port ID */
1750 | 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);
1751 | *offset += 2;
1752 |
1753 | proto_item_append_text(oran_pcid_ti, " (DU_Port_ID: %d, BandSector_ID: %d, CC_ID: %d, RU_Port_ID: %d)",
1754 | (int)duPortId, (int)bandSectorId, (int)ccId, (int)ruPortId);
1755 | char id[16];
1756 | snprintf(id, 16, "%x:%x:%x:%x", (int)duPortId, (int)bandSectorId, (int)ccId, (int)ruPortId);
1757 | proto_item *pi = proto_tree_add_string(oran_pcid_tree, hf_oran_c_eAxC_ID, tvb, id_offset, 2, id);
1758 | proto_item_set_generated(pi);
1759 | }
1760 |
1761 | /* 5.1.3.2.8 ecpriSeqid (message identifier) */
1762 | static int
1763 | addSeqid(tvbuff_t *tvb, proto_tree *oran_tree, int offset, int plane, uint8_t *seq_id, proto_item **seq_id_ti, packet_info *pinfo)
1764 | {
1765 | /* Subtree */
1766 | proto_item *seqIdItem = proto_tree_add_item(oran_tree, hf_oran_ecpri_seqid, tvb, offset, 2, ENC_NA0x00000000);
1767 | proto_tree *oran_seqid_tree = proto_item_add_subtree(seqIdItem, ett_oran_ecpri_seqid);
1768 | uint32_t seqId, subSeqId, e = 0;
1769 |
1770 | /* Sequence ID (8 bits) */
1771 | *seq_id_ti = proto_tree_add_item_ret_uint(oran_seqid_tree, hf_oran_sequence_id, tvb, offset, 1, ENC_NA0x00000000, &seqId);
1772 | *seq_id = seqId;
1773 | offset += 1;
1774 |
1775 | /* Show link back to previous sequence ID, if set */
1776 | flow_result_t *result = wmem_tree_lookup32(flow_results_table, pinfo->num);
1777 | if (result) {
1778 | proto_item *prev_ti = proto_tree_add_uint(oran_seqid_tree, hf_oran_previous_frame, tvb, 0, 0, result->previous_frame);
1779 | proto_item_set_generated(prev_ti);
1780 | }
1781 |
1782 | /* E bit */
1783 | proto_tree_add_item_ret_uint(oran_seqid_tree, hf_oran_e_bit, tvb, offset, 1, ENC_NA0x00000000, &e);
1784 | /* Subsequence ID (7 bits) */
1785 | proto_tree_add_item_ret_uint(oran_seqid_tree, hf_oran_subsequence_id, tvb, offset, 1, ENC_NA0x00000000, &subSeqId);
1786 | offset += 1;
1787 |
1788 | /* radio-transport fragmentation not allowed for C-Plane messages */
1789 | if (plane == ORAN_C_PLANE0) {
1790 | if (e !=1 || subSeqId != 0) {
1791 | expert_add_info(NULL((void*)0), seqIdItem, &ei_oran_radio_fragmentation_c_plane);
1792 | }
1793 | }
1794 | else {
1795 | if (e !=1 || subSeqId != 0) {
1796 | /* TODO: Re-assembly of any radio-fragmentation on U-Plane */
1797 | expert_add_info(NULL((void*)0), seqIdItem, &ei_oran_radio_fragmentation_u_plane);
1798 | }
1799 | }
1800 |
1801 | /* Summary */
1802 | proto_item_append_text(seqIdItem, " (SeqId: %3d, E: %d, SubSeqId: %d)", seqId, e, subSeqId);
1803 | return offset;
1804 | }
1805 |
1806 | static int dissect_symbolmask(tvbuff_t *tvb, proto_tree *tree, int offset, uint32_t *symbol_mask, proto_item **ti)
1807 | {
1808 | uint64_t temp_val;
1809 |
1810 | static int * const symbol_mask_flags[] = {
1811 | &hf_oran_symbol_mask_s13,
1812 | &hf_oran_symbol_mask_s12,
1813 | &hf_oran_symbol_mask_s11,
1814 | &hf_oran_symbol_mask_s10,
1815 | &hf_oran_symbol_mask_s9,
1816 | &hf_oran_symbol_mask_s8,
1817 | &hf_oran_symbol_mask_s7,
1818 | &hf_oran_symbol_mask_s6,
1819 | &hf_oran_symbol_mask_s5,
1820 | &hf_oran_symbol_mask_s4,
1821 | &hf_oran_symbol_mask_s3,
1822 | &hf_oran_symbol_mask_s2,
1823 | &hf_oran_symbol_mask_s1,
1824 | &hf_oran_symbol_mask_s0,
1825 | NULL((void*)0)
1826 | };
1827 |
1828 | proto_item *temp_ti = proto_tree_add_bitmask_ret_uint64(tree, tvb, offset,
1829 | hf_oran_symbol_mask,
1830 | ett_oran_symbol_mask, symbol_mask_flags,
1831 | ENC_BIG_ENDIAN0x00000000, &temp_val);
1832 | /* Set out parameters */
1833 | if (symbol_mask) {
1834 | *symbol_mask = (uint32_t)temp_val;
1835 | }
1836 | if (ti) {
1837 | *ti = temp_ti;
1838 | }
1839 | return offset+2;
1840 | }
1841 |
1842 | /* 7.7.1.2 bfwCompHdr (beamforming weight compression header) */
1843 | static int dissect_bfwCompHdr(tvbuff_t *tvb, proto_tree *tree, int offset,
1844 | uint32_t *iq_width, uint32_t *comp_meth, proto_item **comp_meth_ti)
1845 | {
1846 | /* Subtree */
1847 | proto_item *bfwcomphdr_ti = proto_tree_add_string_format(tree, hf_oran_bfwCompHdr,
1848 | tvb, offset, 1, "",
1849 | "bfwCompHdr");
1850 | proto_tree *bfwcomphdr_tree = proto_item_add_subtree(bfwcomphdr_ti, ett_oran_bfwcomphdr);
1851 |
1852 | /* Width and method */
1853 | proto_tree_add_item_ret_uint(bfwcomphdr_tree, hf_oran_bfwCompHdr_iqWidth,
1854 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, iq_width);
1855 | /* Special case: 0 -> 16 */
1856 | *iq_width = (*iq_width==0) ? 16 : *iq_width;
1857 | *comp_meth_ti = proto_tree_add_item_ret_uint(bfwcomphdr_tree, hf_oran_bfwCompHdr_compMeth,
1858 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, comp_meth);
1859 | offset++;
1860 |
1861 | /* Summary */
1862 | proto_item_append_text(bfwcomphdr_ti, " (IqWidth=%u, compMeth=%s)",
1863 | *iq_width,
1864 | val_to_str_const(*comp_meth, bfw_comp_headers_comp_meth, "reserved"));
1865 |
1866 | return offset;
1867 | }
1868 |
1869 | /* Return offset */
1870 | /* Returning number of entries set - would be good to also return an array of set TRX# so could show which array element
1871 | each BFW is actually for.. */
1872 | static int dissect_active_beamspace_coefficient_mask(tvbuff_t *tvb, proto_tree *tree, int offset, unsigned *num_trx_entries, uint16_t **trx_entries)
1873 | {
1874 | /* activeBeamspaceCoefficientMask - ceil(K/8) octets */
1875 | /* K is the number of elements in uncompressed beamforming weight vector.
1876 | * Calculated from parameters describing tx-array or tx-array */
1877 | unsigned k_octets = (pref_data_plane_section_total_rbs + 7) / 8;
1878 |
1879 | static uint16_t trx_enabled[1024];
1880 |
1881 | /* TODO: could use a bigger bitmask array, but for now just uses this bytes-worth for each byte */
1882 | static int * const mask_bits[] = {
1883 | &hf_oran_active_beamspace_coefficient_n1,
1884 | &hf_oran_active_beamspace_coefficient_n2,
1885 | &hf_oran_active_beamspace_coefficient_n3,
1886 | &hf_oran_active_beamspace_coefficient_n4,
1887 | &hf_oran_active_beamspace_coefficient_n5,
1888 | &hf_oran_active_beamspace_coefficient_n6,
1889 | &hf_oran_active_beamspace_coefficient_n7,
1890 | &hf_oran_active_beamspace_coefficient_n8,
1891 | NULL((void*)0)
1892 | };
1893 |
1894 | *num_trx_entries = 0;
1895 | guint64 val;
1896 | for (unsigned n=0; n < k_octets; n++) {
1897 | proto_tree_add_bitmask_ret_uint64(tree, tvb, offset,
1898 | hf_oran_activeBeamspaceCoefficientMask,
1899 | ett_active_beamspace_coefficient_mask, mask_bits,
1900 | ENC_BIG_ENDIAN0x00000000, &val);
1901 | offset++;
1902 | /* Add up the set bits for this byte (but be careful not to count beyond last real K bit..) */
1903 | for (unsigned b=0; b < 8; b++) {
1904 | if ((1 << b) & (unsigned)val) {
1905 | if (((n*8)+b) < pref_data_plane_section_total_rbs) {
1906 | if (*num_trx_entries < 1024-1) { /* Don't write beyond array (which should be plenty big) */
1907 | trx_enabled[(*num_trx_entries)++] = (n*8) + b + 1;
1908 | }
1909 | }
1910 | }
1911 | }
1912 | }
1913 | /* Set pointer to static array */
1914 | *trx_entries = trx_enabled;
1915 |
1916 | /* Show how many bits set */
1917 | proto_item *ti = proto_tree_add_uint(tree, hf_oran_activeBeamspaceCoefficientMask_bits_set, tvb,
1918 | offset-k_octets, k_octets, *num_trx_entries);
1919 | proto_item_set_generated(ti);
1920 |
1921 | return offset;
1922 | }
1923 |
1924 | /* 7.7.1.3 bfwCompParam (beamforming weight compression parameter).
1925 | * Depends upon passed-in bfwCompMeth (field may be empty) */
1926 | static int dissect_bfwCompParam(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset,
1927 | proto_item *meth_ti, uint32_t *bfw_comp_method,
1928 | uint32_t *exponent, bool_Bool *supported, unsigned *num_trx_entries, uint16_t **trx_entries)
1929 | {
1930 | if (*bfw_comp_method == COMP_NONE0) {
33 | ← | Assuming the condition is true | →
34 | ← | Taking true branch | →
1931 | /* Absent! */
1932 | *supported = true1;
1933 | return offset;
35 | ← | Returning without writing to '*num_trx_entries' | →
1934 | }
1935 |
1936 | /* Subtree */
1937 | proto_item *bfwcompparam_ti = proto_tree_add_string_format(tree, hf_oran_bfwCompParam,
1938 | tvb, offset, 1, "",
1939 | "bfwCompParam");
1940 | proto_tree *bfwcompparam_tree = proto_item_add_subtree(bfwcompparam_ti, ett_oran_bfwcompparam);
1941 |
1942 | proto_item_append_text(bfwcompparam_ti,
1943 | " (meth=%s)", val_to_str_const(*bfw_comp_method, bfw_comp_headers_comp_meth, "reserved"));
1944 |
1945 | *num_trx_entries = 0;
1946 | *supported = false0;
1947 | switch (*bfw_comp_method) {
1948 | case COMP_BLOCK_FP1: /* block floating point */
1949 | /* 4 reserved bits + exponent */
1950 | proto_tree_add_item_ret_uint(bfwcompparam_tree, hf_oran_exponent,
1951 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, exponent);
1952 | proto_item_append_text(bfwcompparam_ti, " exponent=%u", *exponent);
1953 | *supported = true1;
1954 | offset++;
1955 | break;
1956 | case COMP_BLOCK_SCALE2: /* block scaling */
1957 | /* Separate into integer and fractional bits? */
1958 | proto_tree_add_item(bfwcompparam_tree, hf_oran_blockScaler,
1959 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1960 | offset++;
1961 | break;
1962 | case COMP_U_LAW3: /* u-law */
1963 | /* compBitWidth, compShift */
1964 | proto_tree_add_item(bfwcompparam_tree, hf_oran_compBitWidth,
1965 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1966 | proto_tree_add_item(bfwcompparam_tree, hf_oran_compShift,
1967 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1968 | offset++;
1969 | break;
1970 | case 4: /* beamspace I (BLOCK SCALING) */
1971 | /* activeBeamspaceCoefficientMask */
1972 | offset = dissect_active_beamspace_coefficient_mask(tvb, bfwcompparam_tree, offset, num_trx_entries, trx_entries);
1973 | *bfw_comp_method = COMP_BLOCK_SCALE2;
1974 | *supported = false0; /* TODO: true once BLOCK SCALE is supported */
1975 | break;
1976 | case 5: /* beamspace II (BLOCK FLOATING POINT) */
1977 | /* activeBeamspaceCoefficientMask */
1978 | offset = dissect_active_beamspace_coefficient_mask(tvb, bfwcompparam_tree, offset, num_trx_entries, trx_entries);
1979 | /* reserved (4 bits) + exponent (4 bits) */
1980 | proto_tree_add_item(bfwcompparam_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_NA0x00000000);
1981 | proto_tree_add_item_ret_uint(bfwcompparam_tree, hf_oran_exponent, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, exponent);
1982 | offset += 1;
1983 | *bfw_comp_method = COMP_BLOCK_FP1;
1984 | *supported = true1;
1985 | break;
1986 |
1987 | default:
1988 | /* Not handled */
1989 | break;
1990 | }
1991 |
1992 | /* Can't go on if compression scheme not supported */
1993 | if (!(*supported) && meth_ti) {
1994 | expert_add_info_format(pinfo, meth_ti, &ei_oran_unsupported_bfw_compression_method,
1995 | "BFW Compression method %u (%s) not decompressed by dissector",
1996 | *bfw_comp_method,
1997 | val_to_str_const(*bfw_comp_method, bfw_comp_headers_comp_meth, "reserved"));
1998 | }
1999 | return offset;
2000 | }
2001 |
2002 |
2003 | /* Special case for uncompressed/16-bit value */
2004 | static float uncompressed_to_float(uint32_t h)
2005 | {
2006 | int16_t i16 = h & 0x0000ffff;
2007 | if (show_unscaled_values) {
2008 | return (float)i16;
2009 | }
2010 | return ((float)i16) / 0x7fff;
2011 | }
2012 |
2013 | /* Decompress I/Q value, taking into account method, width, exponent, other input-specific methods */
2014 | /* TODO: pass in info needed for Modulation methods (reMask, csf, mcScaler values) gleaned from SE 4,5,23 */
2015 | static float decompress_value(uint32_t bits, uint32_t comp_method, uint8_t iq_width, uint32_t exponent)
2016 | {
2017 | switch (comp_method) {
2018 | case COMP_NONE0: /* no compression */
2019 | return uncompressed_to_float(bits);
2020 |
2021 | case COMP_BLOCK_FP1: /* block floating point */
2022 | case BFP_AND_SELECTIVE_RE5:
2023 | {
2024 | /* A.1.3 Block Floating Point Decompression Algorithm */
2025 | int32_t cPRB = bits;
2026 | uint32_t scaler = 1 << exponent; /* i.e. 2^exponent */
2027 |
2028 | /* Check last bit, in case we need to flip to -ve */
2029 | if (cPRB >= (1<<(iq_width-1))) {
2030 | cPRB -= (1<<iq_width);
2031 | }
2032 |
2033 | /* Unscale (8.1.3.1) */
2034 | cPRB *= scaler;
2035 | if (show_unscaled_values) {
2036 | return (float)cPRB;
2037 | }
2038 |
2039 | uint32_t mantissa_scale_factor = 1 << (iq_width-1); /* 2^(mantissabits-1) */
2040 | uint32_t exp_scale_factor = 1 << 15; /* 2^(2^exponentbits - 1 ) The exponent bit width is fixed to 4, so the maximum exponent is 15 */
2041 |
2042 | float ret = cPRB / ((float)(mantissa_scale_factor*exp_scale_factor));
2043 | return ret;
2044 | }
2045 |
2046 | case COMP_BLOCK_SCALE2:
2047 | case COMP_U_LAW3:
2048 | /* Not supported! But will be reported as expert info outside of this function! */
2049 | return 0.0;
2050 |
2051 | case COMP_MODULATION4:
2052 | case MOD_COMPR_AND_SELECTIVE_RE6:
2053 | /* TODO: ! */
2054 | return 0.0;
2055 |
2056 |
2057 | default:
2058 | /* Not supported! But will be reported as expert info outside of this function! */
2059 | return 0.0;
2060 | }
2061 | }
2062 |
2063 | /* Out-of-range value used for special case */
2064 | #define ORPHAN_BUNDLE_NUMBER999 999
2065 |
2066 | /* Bundle of PRBs/TRX I/Q samples (ext 11) */
2067 | static uint32_t dissect_bfw_bundle(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, unsigned offset,
2068 | proto_item *comp_meth_ti, uint32_t bfwcomphdr_comp_meth,
2069 | uint32_t num_weights_per_bundle,
2070 | uint8_t iq_width,
2071 | unsigned bundle_number,
2072 | unsigned first_prb, unsigned last_prb, bool_Bool is_orphan)
2073 | {
2074 | /* Set bundle name */
2075 | char bundle_name[32];
2076 | if (!is_orphan) {
2077 | snprintf(bundle_name, 32, "Bundle %3u", bundle_number);
2078 | }
2079 | else {
2080 | g_strlcpy(bundle_name, "Orphaned ", 32);
2081 | }
2082 |
2083 | /* Create Bundle root */
2084 | proto_item *bundle_ti;
2085 | if (first_prb != last_prb) {
2086 | bundle_ti = proto_tree_add_string_format(tree, hf_oran_bfw_bundle,
2087 | tvb, offset, 0, "",
2088 | "%s: (PRBs %3u-%3u)",
2089 | bundle_name,
2090 | first_prb, last_prb);
2091 | }
2092 | else {
2093 | bundle_ti = proto_tree_add_string_format(tree, hf_oran_bfw_bundle,
2094 | tvb, offset, 0, "",
2095 | "%s: (PRB %3u)",
2096 | bundle_name,
2097 | first_prb);
2098 | }
2099 | proto_tree *bundle_tree = proto_item_add_subtree(bundle_ti, ett_oran_bfw_bundle);
2100 |
2101 | /* Generated bundle id */
2102 | proto_item *bundleid_ti = proto_tree_add_uint(bundle_tree, hf_oran_bfw_bundle_id, tvb, 0, 0,
2103 | bundle_number);
2104 | proto_item_set_generated(bundleid_ti);
2105 | proto_item_set_hidden(bundleid_ti);
2106 |
2107 | /* bfwCompParam */
2108 | bool_Bool compression_method_supported = false0;
2109 | unsigned exponent = 0;
2110 | unsigned num_trx_entries = 0;
2111 | uint16_t *trx_entries;
2112 | offset = dissect_bfwCompParam(tvb, bundle_tree, pinfo, offset, comp_meth_ti,
2113 | &bfwcomphdr_comp_meth, &exponent, &compression_method_supported,
2114 | &num_trx_entries, &trx_entries);
2115 |
2116 | /* Can't show details of unsupported compression method */
2117 | if (!compression_method_supported) {
2118 | /* Don't know how to show, so give up */
2119 | return offset;
2120 | }
2121 |
2122 | /* Create Bundle subtree */
2123 | int bit_offset = offset*8;
2124 | int bfw_offset;
2125 | int prb_offset = offset;
2126 |
2127 | /* contInd */
2128 | proto_tree_add_item(bundle_tree, hf_oran_cont_ind,
2129 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2130 | /* beamId */
2131 | uint32_t beam_id;
2132 | proto_tree_add_item_ret_uint(bundle_tree, hf_oran_beam_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &beam_id);
2133 | proto_item_append_text(bundle_ti, " (beamId:%u) ", beam_id);
2134 | bit_offset += 16;
2135 |
2136 | /* Number of weights per bundle (from preference) */
2137 | proto_item *wpb_ti = proto_tree_add_uint(bundle_tree, hf_oran_num_weights_per_bundle, tvb, 0, 0,
2138 | num_weights_per_bundle);
2139 | proto_item_set_generated(wpb_ti);
2140 |
2141 | /* Add the weights for this bundle. Overwrite with what was seen in bfwCompParam if beamspace */
2142 | if (num_trx_entries != 0) {
2143 | num_weights_per_bundle = num_trx_entries;
2144 | }
2145 |
2146 | for (unsigned w=0; w < num_weights_per_bundle; w++) {
2147 |
2148 | uint16_t trx_index = (num_trx_entries) ? trx_entries[w] : w+1;
2149 |
2150 | /* Create subtree */
2151 | bfw_offset = bit_offset / 8;
2152 | uint8_t bfw_extent = ((bit_offset + (iq_width*2)) / 8) - bfw_offset;
2153 | proto_item *bfw_ti = proto_tree_add_string_format(bundle_tree, hf_oran_bfw,
2154 | tvb, bfw_offset, bfw_extent,
2155 | "", "TRX %3u: (", trx_index);
2156 | proto_tree *bfw_tree = proto_item_add_subtree(bfw_ti, ett_oran_bfw);
2157 |
2158 | /* I */
2159 | /* Get bits, and convert to float. */
2160 | uint32_t bits = tvb_get_bits32(tvb, bit_offset, iq_width, ENC_BIG_ENDIAN0x00000000);
2161 | float value = decompress_value(bits, bfwcomphdr_comp_meth, iq_width, exponent);
2162 | /* Add to tree. */
2163 | 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);
2164 | bit_offset += iq_width;
2165 | proto_item_append_text(bfw_ti, "I%u=%f ", w, value);
2166 |
2167 | /* Q */
2168 | /* Get bits, and convert to float. */
2169 | bits = tvb_get_bits32(tvb, bit_offset, iq_width, ENC_BIG_ENDIAN0x00000000);
2170 | value = decompress_value(bits, bfwcomphdr_comp_meth, iq_width, exponent);
2171 | /* Add to tree. */
2172 | 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);
2173 | bit_offset += iq_width;
2174 | proto_item_append_text(bfw_ti, "Q%u=%f)", w, value);
2175 | }
2176 |
2177 | /* Set extent of bundle */
2178 | proto_item_set_len(bundle_ti, (bit_offset+7)/8 - prb_offset);
2179 |
2180 | return (bit_offset+7)/8;
2181 | }
2182 |
2183 | /* Return new bit offset. in/out will always be byte-aligned.. */
2184 | static int dissect_ciCompParam(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U___attribute__((unused)), unsigned bit_offset,
2185 | unsigned comp_meth, uint8_t *exponent)
2186 | {
2187 | if (comp_meth == COMP_NONE0) {
2188 | /* Nothing in frame so don't even create subtree */
2189 | return bit_offset;
2190 | }
2191 |
2192 | /* Subtree */
2193 | proto_item *cicompparam_ti = proto_tree_add_string_format(tree, hf_oran_ciCompParam,
2194 | tvb, bit_offset/8, 1, "",
2195 | "ciCompParam");
2196 | proto_tree *cicompparam_tree = proto_item_add_subtree(cicompparam_ti, ett_oran_cicompparam);
2197 | uint32_t ci_exponent;
2198 |
2199 | /* Contents differ by compression method */
2200 | switch (comp_meth) {
2201 | case COMP_BLOCK_FP1:
2202 | proto_tree_add_item(cicompparam_tree, hf_oran_reserved_4bits, tvb, bit_offset/8, 1, ENC_NA0x00000000);
2203 | proto_tree_add_item_ret_uint(cicompparam_tree, hf_oran_exponent,
2204 | tvb, bit_offset/8, 1, ENC_BIG_ENDIAN0x00000000, &ci_exponent);
2205 | *exponent = ci_exponent;
2206 | proto_item_append_text(cicompparam_ti, " (Exponent=%u)", ci_exponent);
2207 | bit_offset += 8; /* one byte */
2208 | break;
2209 | case COMP_BLOCK_SCALE2:
2210 | /* Separate into integer (1) and fractional (7) bits? */
2211 | proto_tree_add_item(cicompparam_tree, hf_oran_blockScaler,
2212 | tvb, bit_offset/8, 1, ENC_BIG_ENDIAN0x00000000);
2213 | bit_offset += 8;
2214 | break;
2215 | case COMP_U_LAW3:
2216 | /* compBitWidth, compShift (4 bits each) */
2217 | proto_tree_add_item(cicompparam_tree, hf_oran_compBitWidth,
2218 | tvb, bit_offset/8, 1, ENC_BIG_ENDIAN0x00000000);
2219 | proto_tree_add_item(cicompparam_tree, hf_oran_compShift,
2220 | tvb, bit_offset/8, 1, ENC_BIG_ENDIAN0x00000000);
2221 | bit_offset += 8;
2222 | break;
2223 |
2224 | default:
2225 | /* reserved, ? bytes of zeros.. */
2226 | break;
2227 | }
2228 |
2229 | return bit_offset;
2230 | }
2231 |
2232 | /* frameStructure (7.5.2.13) */
2233 | static unsigned dissect_frame_structure(proto_item *tree, tvbuff_t *tvb, unsigned offset,
2234 | uint32_t subframeId, uint32_t slotId)
2235 | {
2236 | uint32_t scs;
2237 | /* FFT Size (4 bits) */
2238 | proto_tree_add_item(tree, hf_oran_frameStructure_fft, tvb, offset, 1, ENC_NA0x00000000);
2239 | /* Subcarrier spacing (SCS) */
2240 | proto_tree_add_item_ret_uint(tree, hf_oran_frameStructure_subcarrier_spacing, tvb, offset, 1, ENC_NA0x00000000, &scs);
2241 |
2242 | /* Show slot within frame as a generated field. See table 7.5.13-3 */
2243 | uint32_t slots_per_subframe = 1;
2244 | if (scs <= 4) {
2245 | slots_per_subframe = 1 << scs;
2246 | }
2247 | if (scs <= 4 || scs >= 12) {
2248 | proto_item *ti = proto_tree_add_uint(tree, hf_oran_slot_within_frame, tvb, 0, 0,
2249 | (slots_per_subframe*subframeId) + slotId);
2250 | proto_item_set_generated(ti);
2251 | }
2252 | return offset + 1;
2253 | }
2254 |
2255 | static unsigned dissect_csf(proto_item *tree, tvbuff_t *tvb, unsigned bit_offset,
2256 | unsigned iq_width, bool_Bool *p_csf)
2257 | {
2258 | proto_item *csf_ti;
2259 | uint64_t csf;
2260 | csf_ti = proto_tree_add_bits_ret_val(tree, hf_oran_csf, tvb, bit_offset, 1, &csf, ENC_BIG_ENDIAN0x00000000);
2261 | if (csf) {
2262 | /* Table 7.7.4.2-1 Constellation shift definition (index is udIqWidth) */
2263 | const char* shift_value[] = { "n/a", "1/2", "1/4", "1/8", "1/16", "1/32" };
2264 | if (iq_width >=1 && iq_width <= 5) {
2265 | proto_item_append_text(csf_ti, " (Shift Value is %s)", shift_value[iq_width]);
2266 | }
2267 | }
2268 |
2269 | /* Set out parameter */
2270 | if (p_csf != NULL((void*)0)) {
2271 | *p_csf = (csf!=0);
2272 | }
2273 | return bit_offset+1;
2274 | }
2275 |
2276 |
2277 | /* Section 7.
2278 | * N.B. these are the green parts of the tables showing Section Types, differing by section Type */
2279 | static int dissect_oran_c_section(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
2280 | flow_state_t* state,
2281 | uint32_t sectionType, oran_tap_info *tap_info, proto_item *protocol_item,
2282 | uint32_t subframeId, uint32_t slotId,
2283 | uint8_t ci_iq_width, uint8_t ci_comp_meth, unsigned ci_comp_opt,
2284 | unsigned num_sinr_per_prb)
2285 | {
2286 | unsigned offset = 0;
2287 | proto_tree *c_section_tree = NULL((void*)0);
2288 | proto_item *sectionHeading = NULL((void*)0);
2289 |
2290 | /* Section subtree */
2291 | sectionHeading = proto_tree_add_string_format(tree, hf_oran_c_section,
2292 | tvb, offset, 0, "", "Section");
2293 | c_section_tree = proto_item_add_subtree(sectionHeading, ett_oran_c_section);
2294 |
2295 | uint32_t sectionId = 0;
2296 |
2297 | uint32_t startPrbc=0, startPrbu=0;
2298 | uint32_t numPrbc=0, numPrbu=0;
2299 | uint32_t ueId = 0;
2300 | proto_item *ueId_ti = NULL((void*)0);
2301 | uint32_t beamId = 0;
2302 | proto_item *beamId_ti = NULL((void*)0);
2303 | bool_Bool beamId_ignored = false0;
2304 |
2305 | proto_item *numsymbol_ti = NULL((void*)0);
2306 | bool_Bool numsymbol_ignored = false0;
2307 |
2308 | proto_item *numprbc_ti = NULL((void*)0);
2309 |
2310 | /* Config affecting ext11 bundles (initially unset) */
2311 | ext11_settings_t ext11_settings;
2312 | memset(&ext11_settings, 0, sizeof(ext11_settings));
2313 |
2314 | /* Section Type 10 needs to keep track of PRB range that should be reported
2315 | for msgTypeId=5 (Interference plus Noise for unallocated PRBs) */
2316 | /* All PRBs start as false */
2317 | #define MAX_PRBS273 273
2318 | bool_Bool prbs_for_st10_type5[MAX_PRBS273];
2319 | memset(&prbs_for_st10_type5, 0, sizeof(prbs_for_st10_type5));
2320 |
2321 |
2322 | #define MAX_UEIDS16 16
2323 | uint32_t ueids[MAX_UEIDS16];
2324 | uint32_t number_of_ueids = 0;
2325 |
2326 | bool_Bool extension_flag = false0;
2327 |
2328 | /* These sections (ST0, ST1, ST2, ST3, ST5, ST9, ST10, ST11) are similar, so handle as common with per-type differences */
2329 | if (((sectionType <= SEC_C_UE_SCHED) || (sectionType >= SEC_C_SINR_REPORTING)) &&
1 | Assuming 'sectionType' is > SEC_C_UE_SCHED | →
2 | ← | Assuming 'sectionType' is < SEC_C_SINR_REPORTING | →
2330 | (sectionType != SEC_C_SLOT_CONTROL)) {
2331 |
2332 | /* sectionID */
2333 | proto_item *ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_section_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &sectionId);
2334 | if (sectionId == 4095) {
2335 | proto_item_append_text(ti, " (not default coupling C/U planes using sectionId)");
2336 | }
2337 | offset++;
2338 |
2339 | if (tap_info->num_section_ids < MAX_SECTION_IDs32) {
2340 | tap_info->section_ids[tap_info->num_section_ids++] = sectionId;
2341 | }
2342 |
2343 | /* rb */
2344 | uint32_t rb;
2345 | proto_tree_add_item_ret_uint(c_section_tree, hf_oran_rb, tvb, offset, 1, ENC_NA0x00000000, &rb);
2346 | /* symInc (1 bit) */
2347 | if (sectionType != SEC_C_RRM_MEAS_REPORTS && /* Section Type 10 */
2348 | sectionType != SEC_C_REQUEST_RRM_MEAS) { /* Section Type 11 */
2349 | unsigned int sym_inc;
2350 | proto_item *sym_inc_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_symInc, tvb, offset, 1, ENC_NA0x00000000, &sym_inc);
2351 | if (sym_inc !=0 && (sectionType == SEC_C_SINR_REPORTING)) { /* Section Type 9 */
2352 | /* "0 shall be used" */
2353 | proto_item_append_text(sym_inc_ti, " (should be 0)");
2354 | }
2355 | }
2356 | else {
2357 | /* reserved (1 bit) */
2358 | proto_tree_add_item(c_section_tree, hf_oran_reserved_bit5, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2359 | }
2360 |
2361 | /* startPrbx and numPrbx */
2362 | if (sectionType == SEC_C_SINR_REPORTING) {
2363 | /* startPrbu (10 bits) */
2364 | proto_tree_add_item_ret_uint(c_section_tree, hf_oran_startPrbu, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPrbu);
2365 | offset += 2;
2366 | /* numPrbu */
2367 | numprbc_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numPrbu, tvb, offset, 1, ENC_NA0x00000000, &numPrbu);
2368 | if (numPrbu == 0) {
2369 | proto_item_append_text(numprbc_ti, " (all PRBs - configured as %u)", pref_data_plane_section_total_rbs);
2370 | numPrbu = pref_data_plane_section_total_rbs;
2371 | }
2372 | offset += 1;
2373 | }
2374 | else {
2375 | /* startPrbc (10 bits) */
2376 | proto_tree_add_item_ret_uint(c_section_tree, hf_oran_startPrbc, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPrbc);
2377 | offset += 2;
2378 | /* numPrbc */
2379 | numprbc_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numPrbc, tvb, offset, 1, ENC_NA0x00000000, &numPrbc);
2380 | if (numPrbc == 0) {
2381 | proto_item_append_text(numprbc_ti, " (all PRBs - configured as %u)", pref_data_plane_section_total_rbs);
2382 | /* TODO: should probably set to pref_data_plane_section_total_rbs, and define MAX_PRBS to > 273 ? */
2383 | numPrbc = MAX_PRBS273;
2384 | }
2385 | offset += 1;
2386 | }
2387 |
2388 | /* Start with range from section. May get changed by SE6, SE12, SE20 */
2389 | for (unsigned n=startPrbc; n < startPrbc+numPrbc; n++) {
2390 | if (n < MAX_PRBS273) {
2391 | prbs_for_st10_type5[n] = true1;
2392 | }
2393 | }
2394 |
2395 | if (sectionType != SEC_C_SINR_REPORTING) { /* Section Type 9 */
2396 | static int * const remask_flags[] = {
2397 | &hf_oran_reMask_re1,
2398 | &hf_oran_reMask_re2,
2399 | &hf_oran_reMask_re3,
2400 | &hf_oran_reMask_re4,
2401 | &hf_oran_reMask_re5,
2402 | &hf_oran_reMask_re6,
2403 | &hf_oran_reMask_re7,
2404 | &hf_oran_reMask_re8,
2405 | &hf_oran_reMask_re9,
2406 | &hf_oran_reMask_re10,
2407 | &hf_oran_reMask_re11,
2408 | &hf_oran_reMask_re12,
2409 | NULL((void*)0)
2410 | };
2411 |
2412 | /* reMask */
2413 | uint64_t remask;
2414 | proto_tree_add_bitmask_ret_uint64(c_section_tree, tvb, offset,
2415 | hf_oran_reMask, ett_oran_remask, remask_flags, ENC_BIG_ENDIAN0x00000000, &remask);
2416 | offset++;
2417 | /* numSymbol */
2418 | /* TODO: should warn if startSymbol + numSymbol would be > 14? */
2419 | uint32_t numSymbol;
2420 | numsymbol_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numSymbol, tvb, offset, 1, ENC_NA0x00000000, &numSymbol);
2421 | if ((sectionType == SEC_C_RRM_MEAS_REPORTS) && (numSymbol != 14)) { /* Section type 10 */
2422 | proto_item_append_text(numsymbol_ti, " (for ST10, should be 14!)");
2423 | expert_add_info_format(pinfo, numsymbol_ti, &ei_oran_st10_numsymbol_not_14,
2424 | "numSymbol should be 14 for ST10 - found %u", numSymbol);
2425 | }
2426 | offset++;
2427 |
2428 | /* [ef] (extension flag) */
2429 | switch (sectionType) {
2430 | case SEC_C_UNUSED_RB: /* Section Type 0 */
2431 | case SEC_C_NORMAL: /* Section Type 1 */
2432 | case SEC_C_PRACH: /* Section Type 3 */
2433 | case SEC_C_UE_SCHED: /* Section Type 5 */
2434 | case SEC_C_RRM_MEAS_REPORTS: /* Section Type 10 */
2435 | case SEC_C_REQUEST_RRM_MEAS: /* Section Type 11 */
2436 | proto_tree_add_item_ret_boolean(c_section_tree, hf_oran_ef, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &extension_flag);
2437 | break;
2438 | default:
2439 | /* Other section types don't support extensions */
2440 | break;
2441 | }
2442 |
2443 | write_section_info(sectionHeading, pinfo, protocol_item, sectionId, startPrbc, numPrbc, rb);
2444 | proto_item_append_text(sectionHeading, ", Symbols: %2u", numSymbol);
2445 |
2446 | if (numPrbc == 0) {
2447 | /* Special case for all PRBs */
2448 | numPrbc = pref_data_plane_section_total_rbs;
2449 | startPrbc = 0; /* may already be 0... */
2450 | }
2451 | }
2452 | else {
2453 | /* Section Type 9 */
2454 | write_section_info(sectionHeading, pinfo, protocol_item, sectionId, startPrbu, numPrbu, rb);
2455 | proto_item_append_text(sectionHeading, ", numSinrPerPrb: %2u", num_sinr_per_prb);
2456 | }
2457 |
2458 | /* Section type specific fields (after 'numSymbol') */
2459 | switch (sectionType) {
2460 | case SEC_C_UNUSED_RB: /* Section Type 0 - Table 7.4.2-1 */
2461 | /* reserved (15 bits) */
2462 | proto_tree_add_item(c_section_tree, hf_oran_reserved_15bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2463 | offset += 2;
2464 | break;
2465 |
2466 | case SEC_C_NORMAL: /* Section Type 1 - Table 7.4.3-1 */
2467 | /* beamId */
2468 | beamId_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &beamId);
2469 | offset += 2;
2470 |
2471 | proto_item_append_text(sectionHeading, ", BeamId: %d", beamId);
2472 | break;
2473 |
2474 | case SEC_C_PRACH: /* Section Type 3 - Table 7.4.5-1 */
2475 | {
2476 | /* beamId */
2477 | beamId_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &beamId);
2478 | offset += 2;
2479 |
2480 | /* freqOffset */
2481 | int32_t freqOffset; /* Yes, this is signed, so the implicit cast is intentional. */
2482 | proto_item *freq_offset_item = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_freqOffset, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000, &freqOffset);
2483 | freqOffset |= 0xff000000; /* Must sign-extend */
2484 | proto_item_set_text(freq_offset_item, "Frequency offset: %d \u0394f", freqOffset);
2485 | offset += 3;
2486 |
2487 | /* reserved */
2488 | proto_tree_add_item(c_section_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_NA0x00000000);
2489 | offset += 1;
2490 |
2491 | proto_item_append_text(sectionHeading, ", BeamId: %d, FreqOffset: %d \u0394f", beamId, freqOffset);
2492 | break;
2493 | }
2494 |
2495 | case SEC_C_UE_SCHED: /* Section Type 5 - Table 7.4.7-1 */
2496 | case SEC_C_RRM_MEAS_REPORTS: /* Section Type 10 - Table 7.4.12-1 */
2497 | /* ueId */
2498 | ueId_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_ueId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ueId);
2499 | offset += 2;
2500 | if (ueId == 0x7fff) {
2501 | proto_item_append_text(ueId_ti, " (PRBs not scheduled for eAxC ID in transport header)");
2502 | }
2503 | else {
2504 | ueids[number_of_ueids++] = ueId;
2505 | }
2506 |
2507 | proto_item_append_text(sectionHeading, ", UEId: %d", ueId);
2508 | break;
2509 |
2510 | case SEC_C_SINR_REPORTING: /* Section Type 9 - SINR Reporting */
2511 | {
2512 | /* Hidden filter for bf (DMFS-BF) */
2513 | proto_item *bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
2514 | PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
2515 |
2516 | unsigned bit_offset = offset*8;
2517 |
2518 | /* sinr iqWidth */
2519 | proto_item *iq_width_item = proto_tree_add_uint(c_section_tree, hf_oran_sinrCompHdrIqWidth_pref, tvb, 0, 0, pref_sample_bit_width_sinr);
2520 | proto_item_append_text(iq_width_item, " (from preferences)");
2521 | proto_item_set_generated(iq_width_item);
2522 |
2523 | /* sinr compMethod */
2524 | proto_item *sinr_comp_meth_item = proto_tree_add_uint(c_section_tree, hf_oran_sinrCompHdrMeth_pref, tvb, 0, 0, pref_iqCompressionSINR);
2525 | proto_item_append_text(sinr_comp_meth_item, " (from preferences)");
2526 | proto_item_set_generated(sinr_comp_meth_item);
2527 |
2528 | /* Add SINR entries for each PRB */
2529 | for (unsigned prb=0; prb < numPrbu; prb++) {
2530 | /* TODO: create a subtree for each PRB entry with good summary? */
2531 |
2532 | /* Each prb starts byte-aligned */
2533 | bit_offset = ((bit_offset+7)/8) * 8;
2534 |
2535 | /* N.B., using width/method from UL U-plane preferences, not certain that this is correct.. */
2536 |
2537 | /* sinrCompParam (udCompParam format, may be empty) */
2538 | uint32_t exponent = 0; /* N.B. init to silence warnings, but will always be set if read in COMP_BLOCK_FP case */
2539 | uint16_t sReSMask;
2540 | bit_offset = dissect_udcompparam(tvb, pinfo, c_section_tree, bit_offset/8,
2541 | pref_iqCompressionSINR, &exponent, &sReSMask,
2542 | true1) * 8; /* last param is for_sinr */
2543 |
2544 | /* sinrValues for this PRB. */
2545 | /* TODO: not sure how numSinrPerPrb interacts with rb==1... */
2546 | for (unsigned n=0; n < num_sinr_per_prb; n++) {
2547 | unsigned sinr_bits = tvb_get_bits32(tvb, bit_offset, pref_sample_bit_width_sinr, ENC_BIG_ENDIAN0x00000000);
2548 |
2549 | /* Using SINR compression settings from preferences */
2550 | float value = decompress_value(sinr_bits,
2551 | pref_iqCompressionSINR, pref_sample_bit_width_sinr,
2552 | exponent);
2553 | unsigned sample_len_in_bytes = ((bit_offset%8)+pref_sample_bit_width_sinr+7)/8;
2554 | proto_item *val_ti = proto_tree_add_float(c_section_tree, hf_oran_sinr_value, tvb,
2555 | bit_offset/8, sample_len_in_bytes, value);
2556 |
2557 | /* Show here which subcarriers share which values (they all divide 12..) */
2558 | if (num_sinr_per_prb == 12) {
2559 | proto_item_append_text(val_ti, " (PRB=%u, subcarrier %u)",
2560 | startPrbu+(prb*(rb+1)),
2561 | n*(12/num_sinr_per_prb));
2562 | }
2563 | else {
2564 | proto_item_append_text(val_ti, " (PRB=%u, subcarriers %u-%u)",
2565 | startPrbu+(prb*(rb+1)),
2566 | n*(12/num_sinr_per_prb), (n+1)*(12/num_sinr_per_prb)-1);
2567 | }
2568 | bit_offset += pref_sample_bit_width_sinr;
2569 | }
2570 |
2571 | /* 1-byte alignment per PRB (7.2.11) */
2572 | offset = (bit_offset+7)/8;
2573 | bit_offset = offset*8;
2574 | }
2575 | break;
2576 | }
2577 | case SEC_C_REQUEST_RRM_MEAS: /* Section Type 11 - Request RRM Measurements */
2578 | /* Reserved (15 bits) */
2579 | proto_tree_add_item(c_section_tree, hf_oran_reserved_15bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2580 | offset += 2;
2581 | break;
2582 |
2583 | default:
2584 | break;
2585 | }
2586 | }
2587 | else if (sectionType == SEC_C_CH_INFO) { /* Section Type 6 */
3 | ← | Assuming 'sectionType' is equal to SEC_C_CH_INFO | →
4 | ← | Taking true branch | →
2588 | /* ef */
2589 | proto_tree_add_item_ret_boolean(c_section_tree, hf_oran_ef, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &extension_flag);
2590 | /* ueId */
2591 | proto_tree_add_item_ret_uint(c_section_tree, hf_oran_ueId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ueId);
2592 | offset += 2;
2593 | /* regularizationFactor */
2594 | proto_tree_add_item(c_section_tree, hf_oran_regularizationFactor, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2595 | offset += 2;
2596 | /* reserved (4 bits) */
2597 | proto_tree_add_item(c_section_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_NA0x00000000);
2598 | /* rb ("Value=0 shall be set") */
2599 | uint32_t rb;
2600 | proto_item *rb_ti = proto_tree_add_item_ret_uint(c_section_tree, hf_oran_rb, tvb, offset, 1, ENC_NA0x00000000, &rb);
2601 | if (rb != 0) {
5 | ← | Assuming 'rb' is equal to 0 | →
6 | ← | Taking false branch | →
2602 | proto_item_append_text(rb_ti, " (should be set to 0)");
2603 | expert_add_info(pinfo, rb_ti, &ei_oran_st6_rb_shall_be_0);
2604 | }
2605 | /* symInc */
2606 | proto_tree_add_item(c_section_tree, hf_oran_symInc, tvb, offset, 1, ENC_NA0x00000000);
2607 | /* startPrbc */
2608 | proto_tree_add_item_ret_uint(c_section_tree, hf_oran_startPrbc, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPrbc);
2609 | offset += 2;
2610 | /* numPrbc */
2611 | proto_tree_add_item_ret_uint(c_section_tree, hf_oran_numPrbc, tvb, offset, 1, ENC_NA0x00000000, &numPrbc);
2612 | offset += 1;
2613 |
2614 | /* Hidden filter for bf */
2615 | proto_item *bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
2616 | PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
2617 |
2618 | /* ciIsample,ciQsample pairs */
2619 | unsigned m;
2620 | unsigned prb;
2621 | uint32_t bit_offset = offset*8;
2622 |
2623 | /* Antenna count from preference */
2624 | unsigned num_trx = pref_num_bf_antennas;
2625 |
2626 | write_channel_section_info(sectionHeading, pinfo,
2627 | sectionId, ueId, startPrbc, numPrbc, num_trx);
2628 |
2629 | bool_Bool first_prb = true1;
2630 | uint8_t exponent = 0;
2631 | for (prb=startPrbc; prb < startPrbc+numPrbc; prb++) {
7 | ← | Assuming the condition is false | →
8 | ← | Loop condition is false. Execution continues on line 2682 | →
2632 |
2633 | /* PRB subtree */
2634 | unsigned prb_start_offset = bit_offset;
2635 | proto_item *prb_ti = proto_tree_add_string_format(c_section_tree, hf_oran_samples_prb,
2636 | tvb, bit_offset/8, 0,
2637 | "", "PRB=%u", prb);
2638 | proto_tree *prb_tree = proto_item_add_subtree(prb_ti, ett_oran_prb_cisamples);
2639 |
2640 | /* There may be a ciCompParam here.. */
2641 | if (first_prb || ci_comp_opt==1) {
2642 | bit_offset = dissect_ciCompParam(tvb, prb_tree, pinfo, bit_offset, ci_comp_meth, &exponent);
2643 | }
2644 | first_prb = false0;
2645 |
2646 | /* Antennas */
2647 | for (m=0; m < num_trx; m++) {
2648 |
2649 | unsigned sample_offset = bit_offset / 8;
2650 | uint8_t sample_extent = ((bit_offset + (ci_iq_width*2)) / 8) - sample_offset;
2651 |
2652 | /* Create subtree for antenna */
2653 | proto_item *sample_ti = proto_tree_add_string_format(prb_tree, hf_oran_ciSample,
2654 | tvb, sample_offset, sample_extent,
2655 | "", "TRX=%2u: ", m);
2656 | proto_tree *sample_tree = proto_item_add_subtree(sample_ti, ett_oran_cisample);
2657 |
2658 | /* I */
2659 | /* Get bits, and convert to float. */
2660 | uint32_t bits = tvb_get_bits32(tvb, bit_offset, ci_iq_width, ENC_BIG_ENDIAN0x00000000);
2661 | float value = decompress_value(bits, ci_comp_meth, ci_iq_width, exponent);
2662 |
2663 | /* Add to tree. */
2664 | proto_tree_add_float_format_value(sample_tree, hf_oran_ciIsample, tvb, bit_offset/8, (ci_iq_width+7)/8, value, "#%u=%f", m, value);
2665 | bit_offset += ci_iq_width;
2666 | proto_item_append_text(sample_ti, "I%u=%f ", m, value);
2667 |
2668 | /* Q */
2669 | /* Get bits, and convert to float. */
2670 | bits = tvb_get_bits32(tvb, bit_offset, ci_iq_width, ENC_BIG_ENDIAN0x00000000);
2671 | value = decompress_value(bits, ci_comp_meth, ci_iq_width, exponent);
2672 |
2673 | /* Add to tree. */
2674 | proto_tree_add_float_format_value(sample_tree, hf_oran_ciQsample, tvb, bit_offset/8, (ci_iq_width+7)/8, value, "#%u=%f", m, value);
2675 | bit_offset += ci_iq_width;
2676 | proto_item_append_text(sample_ti, "Q%u=%f ", m, value);
2677 | }
2678 | proto_item_set_len(prb_ti, (bit_offset-prb_start_offset+7)/8);
2679 | }
2680 |
2681 | /* Pad out by 1 or 4 bytes, according to preference */
2682 | if (!st6_4byte_alignment) {
9 | ← | Assuming 'st6_4byte_alignment' is true | →
10 | ← | Taking false branch | →
2683 | offset = (bit_offset + 7) / 8;
2684 | }
2685 | else {
2686 | int mode = bit_offset % 32;
2687 | if (mode
10.1 | 'mode' is not equal to 0
!= 0) {
11 | ← | Taking true branch | →
2688 | offset = (bit_offset + (32-mode))/8;
2689 | }
2690 | else {
2691 | offset = bit_offset/8;
2692 | }
2693 | }
2694 | proto_item_set_end(c_section_tree, tvb, offset);
2695 | }
2696 |
2697 | bool_Bool seen_se10 = false0;
2698 | uint32_t numPortc = 0;
2699 | proto_item *bf_ti = NULL((void*)0);
2700 |
2701 | /* Section extension commands */
2702 | while (extension_flag) {
12 | ← | Loop condition is true. Entering loop body | →
2703 | int extension_start_offset = offset;
2704 |
2705 | /* Prefetch extType so can use specific extension type ett */
2706 | uint32_t exttype = tvb_get_uint8(tvb, offset) & 0x7f;
2707 | uint32_t exttype_ett_index = exttype;
2708 | if (exttype == 0 || exttype > HIGHEST_EXTTYPE28) {
13 | ← | Assuming 'exttype' is not equal to 0 | →
14 | ← | Assuming 'exttype' is <= HIGHEST_EXTTYPE | →
15 | ← | Taking false branch | →
2709 | /* Just use first one if out of range */
2710 | exttype_ett_index = 1;
2711 | }
2712 |
2713 | /* Create subtree for each extension (with summary) */
2714 | proto_item *extension_ti = proto_tree_add_string_format(c_section_tree, hf_oran_extension,
2715 | tvb, offset, 0, "", "Extension");
2716 | proto_tree *extension_tree = proto_item_add_subtree(extension_ti, ett_oran_c_section_extension[exttype_ett_index-1]);
2717 |
2718 | /* ef (i.e. another extension after this one?) */
2719 | proto_tree_add_item_ret_boolean(extension_tree, hf_oran_ef, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &extension_flag);
2720 |
2721 | /* extType */
2722 | proto_item *exttype_ti;
2723 | exttype_ti = proto_tree_add_item(extension_tree, hf_oran_exttype, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2724 | offset++;
2725 | proto_item_append_text(sectionHeading, " (ext-%u)", exttype);
2726 |
2727 | proto_item_append_text(extension_ti, " (ext-%u: %s)", exttype, val_to_str_const(exttype, exttype_vals, "Reserved"));
2728 |
2729 | /* Don't tap if out of range. */
2730 | if (exttype
15.1 | 'exttype' is > 0
> 0 && exttype
15.2 | 'exttype' is <= HIGHEST_EXTTYPE
<= HIGHEST_EXTTYPE28) {
16 | ← | Taking true branch | →
2731 | tap_info->extensions[exttype] = true1;
2732 | }
2733 |
2734 | /* Is this SE allowed for this section type? */
2735 | if (!se_allowed_in_st(exttype, sectionType)) {
17 | ← | Assuming the condition is false | →
2736 | expert_add_info_format(pinfo, extension_tree, &ei_oran_se_on_unsupported_st,
2737 | "SE %u (%s) should not appear in ST %u (%s)!",
2738 | exttype, val_to_str_const(exttype, exttype_vals, "Reserved"),
2739 | sectionType, rval_to_str_const(sectionType, section_types, "Unknown"));
2740 | }
2741 |
2742 |
2743 | /* extLen (number of 32-bit words) */
2744 | uint32_t extlen_len = ((exttype==11)||(exttype==19)||(exttype==20)) ? 2 : 1; /* Extensions 11/19/20 are special */
18 | ← | Assuming 'exttype' is not equal to 11 | →
19 | ← | Assuming 'exttype' is equal to 19 | →
2745 | uint32_t extlen;
2746 | proto_item *extlen_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_extlen, tvb,
2747 | offset, extlen_len, ENC_BIG_ENDIAN0x00000000, &extlen);
2748 | proto_item_append_text(extlen_ti, " (%u bytes)", extlen*4);
2749 | offset += extlen_len;
2750 | if (extlen == 0) {
20 | ← | Assuming 'extlen' is not equal to 0 | →
21 | ← | Taking false branch | →
2751 | expert_add_info_format(pinfo, extlen_ti, &ei_oran_extlen_zero,
2752 | "extlen value of 0 is reserved");
2753 | /* Break out to avoid infinitely looping! */
2754 | break;
2755 | }
2756 |
2757 | bool_Bool ext_unhandled = false0;
2758 |
2759 | switch (exttype) {
22 | ← | Control jumps to 'case 19:' at line 3695 | →
2760 |
2761 | case 1: /* SE 1: Beamforming Weights */
2762 | {
2763 | uint32_t bfwcomphdr_iq_width, bfwcomphdr_comp_meth;
2764 | proto_item *comp_meth_ti = NULL((void*)0);
2765 |
2766 | /* Hidden filter for bf */
2767 | bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
2768 | PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
2769 |
2770 | /* bfwCompHdr (2 subheaders - bfwIqWidth and bfwCompMeth)*/
2771 | offset = dissect_bfwCompHdr(tvb, extension_tree, offset,
2772 | &bfwcomphdr_iq_width, &bfwcomphdr_comp_meth, &comp_meth_ti);
2773 |
2774 | /* bfwCompParam */
2775 | uint32_t exponent = 0;
2776 | bool_Bool compression_method_supported = false0;
2777 | unsigned num_trx = 0;
2778 | uint16_t *trx; /* ptr to array */
2779 | offset = dissect_bfwCompParam(tvb, extension_tree, pinfo, offset, comp_meth_ti,
2780 | &bfwcomphdr_comp_meth, &exponent, &compression_method_supported,
2781 | &num_trx, &trx);
2782 |
2783 | /* Can't show details of unsupported compression method */
2784 | if (!compression_method_supported) {
2785 | break;
2786 | }
2787 |
2788 | /* We know:
2789 | - iq_width (above)
2790 | - numBfWeights (taken from preference)
2791 | - remaining bytes in extension
2792 | We can therefore derive TRX (number of antennas).
2793 | */
2794 |
2795 | bool_Bool using_array = false0;
2796 |
2797 | /* I & Q samples
2798 | May know how many entries from activeBeamspaceCoefficientMask. */
2799 | if (num_trx == 0) {
2800 | /* Don't know how many there will be, so just fill available bytes... */
2801 | unsigned weights_bytes = (extlen*4)-3;
2802 | unsigned num_weights_pairs = (weights_bytes*8) / (bfwcomphdr_iq_width*2);
2803 | num_trx = num_weights_pairs;
2804 | }
2805 | else {
2806 | using_array = true1;
2807 | num_trx = pref_num_bf_antennas;
2808 | }
2809 |
2810 | int bit_offset = offset*8;
2811 |
2812 | for (unsigned n=0; n < num_trx; n++) {
2813 | /* Create antenna subtree */
2814 | int bfw_offset = bit_offset / 8;
2815 |
2816 | uint16_t trx_index = (using_array) ? trx[n] : n+1;
2817 |
2818 | proto_item *bfw_ti = proto_tree_add_string_format(extension_tree, hf_oran_bfw,
2819 | tvb, bfw_offset, 0, "", "TRX %3u: (", trx_index);
2820 | proto_tree *bfw_tree = proto_item_add_subtree(bfw_ti, ett_oran_bfw);
2821 |
2822 | /* I value */
2823 | /* Get bits, and convert to float. */
2824 | uint32_t bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
2825 | float value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent);
2826 | /* Add to tree. */
2827 | proto_tree_add_float(bfw_tree, hf_oran_bfw_i, tvb, bit_offset/8,
2828 | (bfwcomphdr_iq_width+7)/8, value);
2829 | bit_offset += bfwcomphdr_iq_width;
2830 | proto_item_append_text(bfw_ti, "I=%f ", value);
2831 |
2832 | /* Leave a gap between I and Q values */
2833 | proto_item_append_text(bfw_ti, " ");
2834 |
2835 | /* Q value */
2836 | /* Get bits, and convert to float. */
2837 | bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
2838 | value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent);
2839 | /* Add to tree. */
2840 | proto_tree_add_float(bfw_tree, hf_oran_bfw_q, tvb, bit_offset/8,
2841 | (bfwcomphdr_iq_width+7)/8, value);
2842 | bit_offset += bfwcomphdr_iq_width;
2843 | proto_item_append_text(bfw_ti, "Q=%f", value);
2844 |
2845 | proto_item_append_text(bfw_ti, ")");
2846 | proto_item_set_len(bfw_ti, (bit_offset+7)/8 - bfw_offset);
2847 | }
2848 | /* Need to round to next byte */
2849 | offset = (bit_offset+7)/8;
2850 |
2851 | break;
2852 | }
2853 |
2854 | case 2: /* SE 2: Beamforming attributes */
2855 | {
2856 | /* Hidden filter for bf */
2857 | bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
2858 | PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
2859 |
2860 | /* bfaCompHdr (get widths of fields to follow) */
2861 | uint32_t bfAzPtWidth, bfZePtWidth, bfAz3ddWidth, bfZe3ddWidth;
2862 | /* subtree */
2863 | proto_item *bfa_ti = proto_tree_add_string_format(extension_tree, hf_oran_bfaCompHdr,
2864 | tvb, offset, 2, "", "bfaCompHdr");
2865 | proto_tree *bfa_tree = proto_item_add_subtree(bfa_ti, ett_oran_bfacomphdr);
2866 |
2867 | /* reserved (2 bits) */
2868 | proto_tree_add_item(bfa_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2869 | /* bfAzPtWidth (3 bits) */
2870 | proto_tree_add_item_ret_uint(bfa_tree, hf_oran_bfAzPtWidth, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &bfAzPtWidth);
2871 | /* bfZePtWidth (3 bits) */
2872 | proto_tree_add_item_ret_uint(bfa_tree, hf_oran_bfZePtWidth, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &bfZePtWidth);
2873 | offset += 1;
2874 |
2875 | /* reserved (2 bits) */
2876 | proto_tree_add_item(bfa_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2877 | /* bfAz3ddWidth (3 bits) */
2878 | proto_tree_add_item_ret_uint(bfa_tree, hf_oran_bfAz3ddWidth, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &bfAz3ddWidth);
2879 | /* bfZe3ddWidth (3 bits) */
2880 | proto_tree_add_item_ret_uint(bfa_tree, hf_oran_bfZe3ddWidth, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &bfZe3ddWidth);
2881 | offset += 1;
2882 |
2883 | unsigned bit_offset = offset*8;
2884 |
2885 | /* bfAzPt */
2886 | if (bfAzPtWidth > 0) {
2887 | proto_tree_add_bits_item(extension_tree, hf_oran_bfAzPt, tvb, bit_offset, bfAzPtWidth+1, ENC_BIG_ENDIAN0x00000000);
2888 | bit_offset += (bfAzPtWidth+1);
2889 | }
2890 | /* bfZePt */
2891 | if (bfZePtWidth > 0) {
2892 | proto_tree_add_bits_item(extension_tree, hf_oran_bfZePt, tvb, bit_offset, bfZePtWidth+1, ENC_BIG_ENDIAN0x00000000);
2893 | bit_offset += (bfZePtWidth+1);
2894 | }
2895 | /* bfAz3dd */
2896 | if (bfAz3ddWidth > 0) {
2897 | proto_tree_add_bits_item(extension_tree, hf_oran_bfAz3dd, tvb, bit_offset, bfAz3ddWidth+1, ENC_BIG_ENDIAN0x00000000);
2898 | bit_offset += (bfAz3ddWidth+1);
2899 | }
2900 | /* bfZe3dd */
2901 | if (bfZe3ddWidth > 0) {
2902 | proto_tree_add_bits_item(extension_tree, hf_oran_bfZe3dd, tvb, bit_offset, bfZe3ddWidth+1, ENC_BIG_ENDIAN0x00000000);
2903 | bit_offset += (bfZe3ddWidth+1);
2904 | }
2905 |
2906 | /* Pad to next byte (unless last 2 fields already fit in this one) */
2907 | if ((bit_offset % 8) > 2) {
2908 | offset = (bit_offset+7) / 8;
2909 | }
2910 | else {
2911 | offset = bit_offset / 8;
2912 | }
2913 |
2914 | /* bfAzSl (3 bits) */
2915 | proto_tree_add_item(extension_tree, hf_oran_bfAzSl, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2916 | /* bfZeSl (3 bits) */
2917 | proto_tree_add_item(extension_tree, hf_oran_bfZeSl, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2918 | offset += 1;
2919 | break;
2920 | }
2921 |
2922 | case 3: /* SE 3: DL precoding parameters */
2923 | {
2924 | /* codebookindex (8 bits) */
2925 | /* "This parameter is not used and shall be set to zero." */
2926 | proto_tree_add_item(extension_tree, hf_oran_codebook_index, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2927 | offset += 1;
2928 | /* layerid */
2929 | uint32_t layerid;
2930 | proto_tree_add_item_ret_uint(extension_tree, hf_oran_layerid, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &layerid);
2931 | /* numLayers */
2932 | proto_tree_add_item(extension_tree, hf_oran_numlayers, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2933 | offset += 1;
2934 |
2935 | /* Stop here for non-first data layer */
2936 | if (layerid != 0 && layerid != 0xf) {
2937 | break;
2938 | }
2939 |
2940 | /* First data layer case */
2941 | /* txScheme */
2942 | proto_tree_add_item(extension_tree, hf_oran_txscheme, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2943 | /* crsReMask */
2944 | proto_tree_add_item(extension_tree, hf_oran_crs_remask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2945 | offset += 2;
2946 |
2947 | /* crsShift (1 bit) */
2948 | proto_tree_add_item(extension_tree, hf_oran_crs_shift, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2949 | /* reserved (3 bits) */
2950 | proto_tree_add_item(extension_tree, hf_oran_reserved_bits123, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2951 | /* crsSymNum (4 bits) */
2952 | proto_tree_add_item(extension_tree, hf_oran_crs_symnum, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2953 | offset += 1;
2954 | /* reserved */
2955 | proto_tree_add_item(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2956 | offset += 1;
2957 |
2958 | /* reserved (1 bit) */
2959 | proto_tree_add_item(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2960 | /* beamIdAP1 (15 bits) */
2961 | proto_tree_add_item(extension_tree, hf_oran_beamid_ap1, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2962 | offset += 2;
2963 | /* reserved (1 bit) */
2964 | proto_tree_add_item(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2965 | /* beamIdAP2 (15 bits) */
2966 | proto_tree_add_item(extension_tree, hf_oran_beamid_ap2, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2967 | offset += 2;
2968 | /* reserved (1 bit) */
2969 | proto_tree_add_item(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2970 | /* beamIdAP3 (15 bits) */
2971 | proto_tree_add_item(extension_tree, hf_oran_beamid_ap3, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2972 | offset += 2;
2973 | break;
2974 | }
2975 |
2976 | case 4: /* SE 4: Modulation compression params (5.4.7.4) */
2977 | {
2978 | /* csf */
2979 | dissect_csf(extension_tree, tvb, offset*8, ci_iq_width, NULL((void*)0));
2980 |
2981 | /* modCompScaler */
2982 | uint32_t modCompScaler;
2983 | proto_item *ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_modcompscaler,
2984 | tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &modCompScaler);
2985 | offset += 2;
2986 |
2987 | /* Work out and show floating point value too. exponent and mantissa are both unsigned */
2988 | uint16_t exponent = (modCompScaler >> 11) & 0x000f; /* m.s. 4 bits */
2989 | uint16_t mantissa = modCompScaler & 0x07ff; /* l.s. 11 bits */
2990 | double value = ((double)mantissa/(1<<11)) * (1.0 / (1 << exponent));
2991 | proto_item_append_text(ti, " (%f)", value);
2992 |
2993 | /* TODO: need to store these in per-section data in state that gets looked up by U-Plane */
2994 | break;
2995 | }
2996 |
2997 | case 5: /* SE 5: Modulation Compression Additional Parameters (7.7.5) */
2998 | {
2999 | /* Applies only to section types 1,3 and 5 */
3000 | /* N.B. there may be multiple instances of this SE in the same frame */
3001 |
3002 | /* There may be one or 2 entries, depending upon extlen */
3003 | int sets = 1, reserved_bits = 0;
3004 | switch (extlen) {
3005 | case 2:
3006 | sets = 1;
3007 | reserved_bits = 20;
3008 | break;
3009 | case 3:
3010 | sets = 2;
3011 | reserved_bits = 24;
3012 | break;
3013 | case 4:
3014 | /* sets can be 3 or 4, depending upon whether last 28 bits are 0.. */
3015 | if ((tvb_get_ntohl(tvb, offset+10) & 0x0fffffff) == 0) {
3016 | sets = 3;
3017 | reserved_bits = 28;
3018 | }
3019 | else {
3020 | sets = 4;
3021 | reserved_bits = 0;
3022 | }
3023 | break;
3024 |
3025 | default:
3026 | /* Malformed error!!! */
3027 | expert_add_info_format(pinfo, extlen_ti, &ei_oran_extlen_wrong,
3028 | "For section 5, extlen must be 2, 3 or 4, but %u was dissected",
3029 | extlen);
3030 | break;
3031 | }
3032 |
3033 | unsigned bit_offset = offset*8;
3034 |
3035 | for (int n=0; n < sets; n++) {
3036 | /* Subtree for each set */
3037 | unsigned set_start_offset = bit_offset/8;
3038 | proto_item *set_ti = proto_tree_add_string(extension_tree, hf_oran_modcomp_param_set,
3039 | tvb, set_start_offset, 0, "");
3040 | proto_tree *set_tree = proto_item_add_subtree(set_ti, ett_oran_modcomp_param_set);
3041 |
3042 | uint64_t mcScaleReMask, mcScaleOffset;
3043 | bool_Bool csf;
3044 |
3045 | /* mcScaleReMask (12 bits) */
3046 | proto_tree_add_bits_ret_val(set_tree, hf_oran_mc_scale_re_mask, tvb, bit_offset, 12, &mcScaleReMask, ENC_BIG_ENDIAN0x00000000);
3047 | bit_offset += 12;
3048 | /* csf (1 bit) */
3049 | bit_offset = dissect_csf(set_tree, tvb, bit_offset, ci_iq_width, &csf);
3050 | /* mcScaleOffset (15 bits) */
3051 | proto_item *ti = proto_tree_add_bits_ret_val(set_tree, hf_oran_mc_scale_offset, tvb, bit_offset, 15, &mcScaleOffset, ENC_BIG_ENDIAN0x00000000);
3052 | uint16_t exponent = (mcScaleOffset >> 11) & 0x000f; /* m.s. 4 bits */
3053 | uint16_t mantissa = mcScaleOffset & 0x07ff; /* l.s. 11 bits */
3054 | double mcScaleOffset_value = ((double)mantissa/(1<<11)) * (1.0 / (1 << exponent));
3055 | proto_item_append_text(ti, " (%f)", mcScaleOffset_value);
3056 | bit_offset += 15;
3057 |
3058 | /* Summary */
3059 | proto_item_set_len(set_ti, (bit_offset+7)/8 - set_start_offset);
3060 | proto_item_append_text(set_ti, " (mcScaleReMask=0x%03x csf=%5s mcScaleOffset=%f)",
3061 | (unsigned)mcScaleReMask, tfs_get_true_false(csf)tfs_get_string(csf, ((void*)0)), mcScaleOffset_value);
3062 | }
3063 |
3064 | proto_item_append_text(extension_ti, " (%u sets)", sets);
3065 |
3066 | /* Reserved (variable-length) */
3067 | if (reserved_bits) {
3068 | proto_tree_add_bits_item(extension_tree, hf_oran_reserved, tvb, bit_offset, reserved_bits, ENC_BIG_ENDIAN0x00000000);
3069 | bit_offset += reserved_bits;
3070 | }
3071 |
3072 | offset = bit_offset/8;
3073 | break;
3074 | }
3075 |
3076 | case 6: /* SE 6: Non-contiguous PRB allocation in time and frequency domain */
3077 | {
3078 | /* numSymbol not used in this case */
3079 | if (numsymbol_ti && !numsymbol_ignored) {
3080 | proto_item_append_text(numsymbol_ti, " (ignored)");
3081 | numsymbol_ignored = true1;
3082 | }
3083 |
3084 | /* Will update ext6 recorded info */
3085 | ext11_settings.ext6_set = true1;
3086 |
3087 | /* repetition */
3088 | proto_tree_add_bits_item(extension_tree, hf_oran_se6_repetition, tvb, offset*8, 1, ENC_BIG_ENDIAN0x00000000);
3089 | /* rbgSize (PRBs per bit set in rbgMask) */
3090 | uint32_t rbgSize;
3091 | proto_item *rbg_size_ti;
3092 | rbg_size_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_rbgSize, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rbgSize);
3093 | if (rbgSize == 0) {
3094 | /* N.B. this is only true if "se6-rb-bit-supported" is set... */
3095 | expert_add_info_format(pinfo, rbg_size_ti, &ei_oran_rbg_size_reserved,
3096 | "rbgSize value of 0 is reserved");
3097 | }
3098 | /* rbgMask (28 bits) */
3099 | uint32_t rbgMask;
3100 | proto_item *rbgmask_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_rbgMask, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000, &rbgMask);
3101 | if (rbgSize == 0) {
3102 | proto_item_append_text(rbgmask_ti, " (value ignored since rbgSize is 0)");
3103 | }
3104 |
3105 | /* TODO: if receiver detects non-zero bits outside the valid range, those shall be ignored. */
3106 | offset += 4;
3107 | /* priority */
3108 | proto_tree_add_item(extension_tree, hf_oran_noncontig_priority, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3109 | /* symbolMask */
3110 | offset = dissect_symbolmask(tvb, extension_tree, offset, NULL((void*)0), NULL((void*)0));
3111 |
3112 | /* Look up rbg_size enum -> value */
3113 | switch (rbgSize) {
3114 | case 0:
3115 | /* N.B. reserved, but covered above with expert info (would remain 0) */
3116 | break;
3117 | case 1:
3118 | ext11_settings.ext6_rbg_size = 1; break;
3119 | case 2:
3120 | ext11_settings.ext6_rbg_size = 2; break;
3121 | case 3:
3122 | ext11_settings.ext6_rbg_size = 3; break;
3123 | case 4:
3124 | ext11_settings.ext6_rbg_size = 4; break;
3125 | case 5:
3126 | ext11_settings.ext6_rbg_size = 6; break;
3127 | case 6:
3128 | ext11_settings.ext6_rbg_size = 8; break;
3129 | case 7:
3130 | ext11_settings.ext6_rbg_size = 16; break;
3131 | /* N.B., encoded in 3 bits, so no other values are possible */
3132 | }
3133 |
3134 | /* Set to looked-up value */
3135 | rbgSize = ext11_settings.ext6_rbg_size;
3136 |
3137 | uint32_t lastRbgid = 0;
3138 | if (rbgSize != 0) {
3139 | /* The O-DU shall not use combinations of startPrbc, numPrbc and rbgSize leading to a value of lastRbgid larger than 27 */
3140 | /* i.e., leftmost bit used should not need to go off left end of rbgMask! */
3141 | lastRbgid = (uint32_t)ceil((numPrbc + (startPrbc % rbgSize)) / (float)rbgSize) - 1;
3142 | if (lastRbgid > 27) {
3143 | expert_add_info_format(pinfo, rbg_size_ti, &ei_oran_lastRbdid_out_of_range,
3144 | "SE6: rbgSize (%u) not compatible with startPrbc(%u) and numPrbc(%u)",
3145 | rbgSize, startPrbc, numPrbc);
3146 | break;
3147 | }
3148 | }
3149 |
3150 | /* Record (and count) which bits are set in rbgMask */
3151 | bool_Bool first_seen = false0;
3152 | unsigned first_seen_pos=0, last_seen_pos=0;
3153 | for (unsigned n=0; n < 28 && ext11_settings.ext6_num_bits_set < 28; n++) {
3154 | if ((rbgMask >> n) & 0x01) {
3155 | ext11_settings.ext6_bits_set[ext11_settings.ext6_num_bits_set++] = n;
3156 | if (!first_seen) {
3157 | first_seen = true1;
3158 | first_seen_pos = n;
3159 | }
3160 | last_seen_pos = n;
3161 | }
3162 | }
3163 |
3164 | /* Show how many bits were set in rbgMask */
3165 | proto_item_append_text(rbgmask_ti, " (%u bits set)", ext11_settings.ext6_num_bits_set);
3166 | /* Also, that is the range of bits */
3167 | if (first_seen) {
3168 | proto_item_append_text(rbgmask_ti, " (%u bits spread)", last_seen_pos-first_seen_pos+1);
3169 | }
3170 |
3171 | /* Complain if last set bit is beyond lastRbgid */
3172 | if (first_seen) {
3173 | if (last_seen_pos > lastRbgid) {
3174 | expert_add_info_format(pinfo, rbgmask_ti, &ei_oran_rbgMask_beyond_last_rbdid,
3175 | "SE6: rbgMask (0x%07x) has bit %u set, but lastRbgId is %u",
3176 | rbgMask, last_seen_pos, lastRbgid);
3177 | }
3178 | }
3179 |
3180 | /* Also update prbs_for_st10_type5[] */
3181 | if (sectionType == 10 && rbgSize != 0) {
3182 | /* Unset all entries */
3183 | memset(&prbs_for_st10_type5, 0, sizeof(prbs_for_st10_type5));
3184 |
3185 | /* Work out which PRB first bit corresponds to */
3186 | unsigned firstPrbStart = (startPrbc/rbgSize) * rbgSize;
3187 |
3188 | /* Add PRBs corresponding to each bit set */
3189 | for (unsigned n=0; n < 28 ; n++) {
3190 | if ((rbgMask >> n) & 0x01) {
3191 | /* Lazy way to clip any values that lie outside of range for section */
3192 | for (unsigned p=0; p < rbgSize; p++) {
3193 | unsigned start = firstPrbStart + (n*rbgSize);
3194 | if ((start+p < MAX_PRBS273) && (start+p >= startPrbc) && (start+p <= startPrbc+numPrbc-1)) {
3195 | prbs_for_st10_type5[start+p] = true1;
3196 | }
3197 | }
3198 | }
3199 | }
3200 | }
3201 |
3202 | break;
3203 | }
3204 |
3205 | case 7: /* SE 7: eAxC mask */
3206 | /* Allow ST0 to address multiple eAxC_ID values for transmission blanking */
3207 | proto_tree_add_item(extension_tree, hf_oran_eAxC_mask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3208 | offset += 2;
3209 | break;
3210 |
3211 | case 8: /* SE 8: Regularization factor */
3212 | proto_tree_add_item(extension_tree, hf_oran_regularizationFactor, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3213 | offset += 2;
3214 | break;
3215 |
3216 | case 9: /* SE 9: Dynamic Spectrum Sharing parameters */
3217 | proto_tree_add_item(extension_tree, hf_oran_technology, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3218 | offset += 1;
3219 | proto_tree_add_item(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3220 | offset += 1;
3221 | break;
3222 |
3223 | case 10: /* SE 10: Group configuration of multiple ports */
3224 | {
3225 | seen_se10 = true1;
3226 |
3227 | /* beamGroupType */
3228 | uint32_t beam_group_type = 0;
3229 | proto_item *bgt_ti;
3230 | bgt_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_beamGroupType,
3231 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &beam_group_type);
3232 | proto_item_append_text(extension_ti, " (%s)", val_to_str_const(beam_group_type, beam_group_type_vals, "Unknown"));
3233 |
3234 | /* numPortc */
3235 | proto_tree_add_item_ret_uint(extension_tree, hf_oran_numPortc,
3236 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numPortc);
3237 | offset++;
3238 |
3239 | /* Will append all beamId values to extension_ti, regardless of beamGroupType */
3240 | unsigned n;
3241 |
3242 | switch (beam_group_type) {
3243 | case 0x0: /* common beam */
3244 | case 0x1: /* beam matrix indication */
3245 | /* Reserved byte */
3246 | proto_tree_add_item(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_NA0x00000000);
3247 | offset++;
3248 |
3249 | /* Explain how entries are allocated */
3250 | if (beam_group_type == 0x0) {
3251 | proto_item_append_text(extension_ti, " (all %u ueid/Beam entries are %u)", numPortc, ueId);
3252 | }
3253 | else {
3254 | /* 'numPortc' consecutive BeamIds from section header */
3255 | proto_item_append_text(extension_ti, " (ueId/beam entries are %u -> %u)", ueId, ueId+numPortc);
3256 | }
3257 |
3258 | if (sectionType == 5) {
3259 | /* These types are not allowed */
3260 | expert_add_info_format(pinfo, bgt_ti, &ei_oran_se10_not_allowed,
3261 | "SE10: beamGroupType %u is not allowed for section type 5", beam_group_type);
3262 | }
3263 | break;
3264 |
3265 | case 0x2: /* beam vector listing */
3266 | {
3267 | proto_item_append_text(extension_ti, " [ ");
3268 |
3269 | /* Beam listing vector case */
3270 | /* Work out how many port beam entries there is room for */
3271 | /* Using numPortC as visible in issue 18116 */
3272 | for (n=0; n < numPortc; n++) {
3273 | /* 1 reserved bit */
3274 | proto_tree_add_item(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3275 |
3276 | /* port beam ID (or UEID) (15 bits) */
3277 | uint32_t id;
3278 | proto_item *beamid_or_ueid_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_beamId,
3279 | tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &id);
3280 | proto_item_append_text(beamid_or_ueid_ti, " port #%u beam ID (or UEId) %u", n, id);
3281 | offset += 2;
3282 |
3283 | if (id != 0x7fff) {
3284 | if (number_of_ueids < MAX_UEIDS16) {
3285 | ueids[number_of_ueids++] = id;
3286 | }
3287 | }
3288 |
3289 | proto_item_append_text(extension_ti, "%u ", id);
3290 | }
3291 |
3292 | proto_item_append_text(extension_ti, "]");
3293 | break;
3294 | }
3295 | case 0x3: /* beamId/ueId listing with associated port-list index */
3296 | {
3297 | proto_item_append_text(extension_ti, " [ ");
3298 |
3299 | if (numPortc > 0) {
3300 | /* first portListIndex is outside loop */
3301 | uint32_t port_list_index;
3302 | proto_item *pli_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_port_list_index, tvb,
3303 | offset, 1, ENC_BIG_ENDIAN0x00000000, &port_list_index);
3304 | if (port_list_index == 0) {
3305 | /* Value 0 is reserved */
3306 | expert_add_info(pinfo, pli_ti, &ei_oran_port_list_index_zero);
3307 | }
3308 | offset += 1;
3309 |
3310 | for (n=0; n < numPortc-1; n++) {
3311 | /* 1 reserved bit */
3312 | proto_tree_add_item(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3313 |
3314 | /* port beam ID (or UEID) */
3315 | uint32_t id;
3316 | proto_item *beamid_or_ueid_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_beamId,
3317 | tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &id);
3318 | proto_item_append_text(beamid_or_ueid_ti, " port #%u beam ID (or UEId) %u", n, id);
3319 | offset += 2;
3320 |
3321 | if (id != 0x7fff) {
3322 | if (number_of_ueids < MAX_UEIDS16) {
3323 | ueids[number_of_ueids++] = id;
3324 | }
3325 | }
3326 |
3327 | /* subsequent portListIndex */
3328 | pli_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_port_list_index, tvb,
3329 | offset, 1, ENC_BIG_ENDIAN0x00000000, &port_list_index);
3330 | if (port_list_index == 0) {
3331 | /* Value 0 is reserved */
3332 | expert_add_info(pinfo, pli_ti, &ei_oran_port_list_index_zero);
3333 | }
3334 | offset += 1;
3335 |
3336 | proto_item_append_text(extension_ti, "%u:%u ", port_list_index, id);
3337 | }
3338 | }
3339 |
3340 | proto_item_append_text(extension_ti, "]");
3341 | break;
3342 | }
3343 |
3344 |
3345 | default:
3346 | /* Warning for unsupported/reserved value */
3347 | expert_add_info(NULL((void*)0), bgt_ti, &ei_oran_se10_unknown_beamgrouptype);
3348 | break;
3349 | }
3350 | break;
3351 | }
3352 |
3353 | case 11: /* SE 11: Flexible Weights Extension Type */
3354 | {
3355 | /* Hidden filter for bf */
3356 | bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
3357 | PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
3358 |
3359 | /* beamId in section header should be ignored. Guard against appending multiple times.. */
3360 | if (beamId_ti && !beamId_ignored) {
3361 | proto_item_append_text(beamId_ti, " (ignored)");
3362 | beamId_ignored = true1;
3363 | }
3364 |
3365 | bool_Bool disableBFWs;
3366 | uint32_t numBundPrb;
3367 | bool_Bool rad;
3368 |
3369 | /* disableBFWs */
3370 | proto_tree_add_item_ret_boolean(extension_tree, hf_oran_disable_bfws,
3371 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &disableBFWs);
3372 | if (disableBFWs) {
3373 | proto_item_append_text(extension_ti, " (disableBFWs)");
3374 | }
3375 |
3376 | /* RAD */
3377 | proto_tree_add_item_ret_boolean(extension_tree, hf_oran_rad,
3378 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rad);
3379 | /* bundleOffset (6 bits) */
3380 | proto_tree_add_item(extension_tree, hf_oran_bundle_offset, tvb,
3381 | offset, 1, ENC_BIG_ENDIAN0x00000000);
3382 | offset++;
3383 |
3384 | /* numBundPrb (number of prbs in each bundle) */
3385 | proto_item *num_bund_prb_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_bund_prbs,
3386 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numBundPrb);
3387 | offset++;
3388 | /* value zero is reserved.. */
3389 | if (numBundPrb == 0) {
3390 | expert_add_info_format(pinfo, num_bund_prb_ti, &ei_oran_reserved_numBundPrb,
3391 | "Reserved value 0 for numBundPrb seen - not valid");
3392 | }
3393 |
3394 | uint32_t num_bundles;
3395 | bool_Bool orphaned_prbs = false0;
3396 |
3397 | if (!disableBFWs) {
3398 | /********************************************/
3399 | /* Table 7.7.1.1-1 */
3400 | /********************************************/
3401 |
3402 | uint32_t bfwcomphdr_iq_width, bfwcomphdr_comp_meth;
3403 | proto_item *comp_meth_ti = NULL((void*)0);
3404 |
3405 | /* bfwCompHdr (2 subheaders - bfwIqWidth and bfwCompMeth)*/
3406 | offset = dissect_bfwCompHdr(tvb, extension_tree, offset,
3407 | &bfwcomphdr_iq_width, &bfwcomphdr_comp_meth, &comp_meth_ti);
3408 |
3409 | /* Work out number of bundles, but take care not to divide by zero. */
3410 | if (numBundPrb == 0) {
3411 | break;
3412 | }
3413 |
3414 | /* Work out bundles! */
3415 | ext11_work_out_bundles(startPrbc, numPrbc, numBundPrb, &ext11_settings);
3416 | num_bundles = ext11_settings.num_bundles;
3417 |
3418 | /* Add (complete) bundles */
3419 | for (unsigned b=0; b < num_bundles; b++) {
3420 |
3421 | offset = dissect_bfw_bundle(tvb, extension_tree, pinfo, offset,
3422 | comp_meth_ti, bfwcomphdr_comp_meth,
3423 | (ext11_settings.ext21_set) ?
3424 | numPrbc :
3425 | pref_num_bf_antennas,
3426 | bfwcomphdr_iq_width,
3427 | b, /* bundle number */
3428 | ext11_settings.bundles[b].start,
3429 | ext11_settings.bundles[b].end,
3430 | ext11_settings.bundles[b].is_orphan);
3431 | if (!offset) {
3432 | break;
3433 | }
3434 | }
3435 | if (num_bundles > 0) {
3436 | /* Set flag from last bundle entry */
3437 | orphaned_prbs = ext11_settings.bundles[num_bundles-1].is_orphan;
3438 | }
3439 | }
3440 | else {
3441 | /********************************************/
3442 | /* Table 7.7.1.1-2 */
3443 | /* No weights in this case */
3444 | /********************************************/
3445 |
3446 | /* Work out number of bundles, but take care not to divide by zero. */
3447 | if (numBundPrb == 0) {
3448 | break;
3449 | }
3450 |
3451 | ext11_work_out_bundles(startPrbc, numPrbc, numBundPrb, &ext11_settings);
3452 | num_bundles = ext11_settings.num_bundles;
3453 |
3454 | for (unsigned n=0; n < num_bundles; n++) {
3455 | /* contInd */
3456 | proto_tree_add_item(extension_tree, hf_oran_cont_ind,
3457 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3458 | /* beamId */
3459 | proto_item *ti = proto_tree_add_item(extension_tree, hf_oran_beam_id,
3460 | tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3461 | if (!ext11_settings.bundles[n].is_orphan) {
3462 | proto_item_append_text(ti, " (PRBs %3u-%3u) (Bundle %2u)",
3463 | ext11_settings.bundles[n].start,
3464 | ext11_settings.bundles[n].end,
3465 | n);
3466 | }
3467 | else {
3468 | orphaned_prbs = true1;
3469 | proto_item_append_text(ti, " (PRBs %3u-%3u) (Orphaned PRBs)",
3470 | ext11_settings.bundles[n].start,
3471 | ext11_settings.bundles[n].end);
3472 | }
3473 | offset += 2;
3474 | }
3475 | }
3476 |
3477 | /* Add summary to extension root */
3478 | if (orphaned_prbs) {
3479 | proto_item_append_text(extension_ti, " (%u full bundles + orphaned)", num_bundles-1);
3480 | }
3481 | else {
3482 | proto_item_append_text(extension_ti, " (%u bundles)", num_bundles);
3483 | }
3484 | }
3485 |
3486 | break;
3487 |
3488 | case 12: /* SE 12: Non-Contiguous PRB Allocation with Frequency Ranges */
3489 | {
3490 | /* numSymbol not used in this case */
3491 | if (numsymbol_ti && !numsymbol_ignored) {
3492 | proto_item_append_text(numsymbol_ti, " (ignored)");
3493 | numsymbol_ignored = true1;
3494 | }
3495 |
3496 | ext11_settings.ext12_set = true1;
3497 |
3498 | /* priority */
3499 | proto_tree_add_item(extension_tree, hf_oran_noncontig_priority, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3500 |
3501 | /* symbolMask */
3502 | offset = dissect_symbolmask(tvb, extension_tree, offset, NULL((void*)0), NULL((void*)0));
3503 |
3504 | /* There are now 'R' pairs of (offStartPrb, numPrb) values. Fill extlen bytes with values. If last one is not set,
3505 | should be populated with 0s. */
3506 | uint32_t extlen_remaining_bytes = (extlen*4) - 4;
3507 | uint8_t prb_index;
3508 |
3509 | /* This is for ST10/ST11. First pair starts after frames signalled there */
3510 | uint16_t st10_st11_offset = startPrbc + numPrbc;
3511 |
3512 | for (prb_index = 1; extlen_remaining_bytes > 0; prb_index++)
3513 | {
3514 | /* Create a subtree for each pair */
3515 | proto_item *pair_ti = proto_tree_add_string(extension_tree, hf_oran_frequency_range,
3516 | tvb, offset, 2, "");
3517 | proto_tree *pair_tree = proto_item_add_subtree(pair_ti, ett_oran_frequency_range);
3518 |
3519 | /* offStartPrb */
3520 | uint32_t off_start_prb;
3521 | proto_tree_add_item_ret_uint(pair_tree, hf_oran_off_start_prb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &off_start_prb);
3522 | offset++;
3523 |
3524 | /* numPrb */
3525 | uint32_t num_prb;
3526 | proto_tree_add_item_ret_uint(pair_tree, hf_oran_num_prb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_prb);
3527 | offset++;
3528 |
3529 | extlen_remaining_bytes -= 2;
3530 |
3531 | /* Last pair may be 0,0 if not used. Check for this */
3532 | if ((extlen_remaining_bytes == 0) && (off_start_prb == 0) && (num_prb == 0)) {
3533 | proto_item_append_text(pair_ti, " (not used)");
3534 | }
3535 | /* Add summary to pair root item, and configure details in ext11_settings */
3536 | else {
3537 | proto_item_append_text(pair_ti, "(%u) [%u : %u]",
3538 | prb_index, off_start_prb, num_prb);
3539 | proto_item_append_text(extension_ti, "[%u : %u]",
3540 | off_start_prb, num_prb);
3541 | if (ext11_settings.ext12_num_pairs < MAX_BFW_EXT12_PAIRS128) {
3542 | ext11_settings.ext12_pairs[ext11_settings.ext12_num_pairs].off_start_prb = off_start_prb;
3543 | ext11_settings.ext12_pairs[ext11_settings.ext12_num_pairs++].num_prb = num_prb;
3544 | }
3545 |
3546 | /* Also update PRBs to be covered for ST10 type 5 */
3547 | /* Original range from section is added to.. */
3548 | /* TODO: I don't think this is quite right.. */
3549 | for (unsigned prb=st10_st11_offset+off_start_prb; prb < st10_st11_offset+off_start_prb+num_prb; prb++) {
3550 | if (prb < MAX_PRBS273) {
3551 | prbs_for_st10_type5[prb] = true1;
3552 | }
3553 | }
3554 |
3555 | /* Any next pair will begin after this one */
3556 | st10_st11_offset += (off_start_prb + num_prb);
3557 | }
3558 | }
3559 | break;
3560 | }
3561 |
3562 | case 13: /* SE 13: PRB Allocation with Frequency Hopping */
3563 | {
3564 | /* Will update settings for ext11 */
3565 | ext11_settings.ext13_set = true1;
3566 |
3567 | uint32_t extlen_remaining_bytes = (extlen*4) - 2;
3568 | uint8_t allocation_index;
3569 |
3570 | unsigned prev_next_symbol_id = 0, prev_next_start_prbc = 0;
3571 |
3572 | for (allocation_index = 1; extlen_remaining_bytes > 0; allocation_index++)
3573 | {
3574 | /* Subtree for allocation */
3575 | proto_item *allocation_ti = proto_tree_add_string(extension_tree, hf_oran_prb_allocation,
3576 | tvb, offset, 2, "");
3577 | proto_tree *allocation_tree = proto_item_add_subtree(allocation_ti, ett_oran_prb_allocation);
3578 |
3579 | /* Reserved (2 bits) */
3580 | proto_tree_add_item(allocation_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3581 |
3582 | /* nextSymbolId (4 bits) */
3583 | uint32_t next_symbol_id;
3584 | proto_tree_add_item_ret_uint(allocation_tree, hf_oran_nextSymbolId, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &next_symbol_id);
3585 |
3586 | /* nextStartPrbc (10 bits) */
3587 | uint32_t next_start_prbc;
3588 | proto_tree_add_item_ret_uint(allocation_tree, hf_oran_nextStartPrbc, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &next_start_prbc);
3589 | offset += 2;
3590 |
3591 | /* Add summary to allocation root item */
3592 | proto_item_append_text(allocation_ti, "(%u) nextSymbolId=%3u, nextStartPrbc=%u",
3593 | allocation_index, next_symbol_id, next_start_prbc);
3594 |
3595 | /* Checking for duplicates (expected if e.g. had only 2 entries but extlen bytes still to fill */
3596 | if ((allocation_index > 1) && (next_symbol_id == prev_next_symbol_id) && (next_start_prbc == prev_next_start_prbc)) {
3597 | proto_item_append_text(allocation_ti, " (repeated - to fill up extlen)");
3598 | }
3599 | else {
3600 | /* Add entry for configuring ext11. don't store out of range */
3601 | if (ext11_settings.ext13_num_start_prbs < MAX_BFW_EXT13_ALLOCATIONS128) {
3602 | ext11_settings.ext13_start_prbs[ext11_settings.ext13_num_start_prbs++] = next_start_prbc;
3603 | }
3604 | }
3605 | prev_next_symbol_id = next_symbol_id;
3606 | prev_next_start_prbc = next_start_prbc;
3607 |
3608 | extlen_remaining_bytes -= 2;
3609 | }
3610 | break;
3611 | }
3612 |
3613 | case 14: /* SE 14: Nulling-layer Info. for ueId-based beamforming */
3614 | /* Hidden filter for bf (DMRS BF) */
3615 | bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
3616 | PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
3617 |
3618 | if (!seen_se10) {
3619 | proto_tree_add_item(extension_tree, hf_oran_nullLayerInd, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3620 | offset += 1;
3621 | proto_tree_add_item(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3622 | offset += 1;
3623 | }
3624 | else {
3625 | /* Loop over numPortc++1 (from SE 10) nullLayerInd fields */
3626 | for (unsigned port=0; port < numPortc+1; port++) {
3627 | proto_tree_add_item(extension_tree, hf_oran_nullLayerInd, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3628 | offset += 1;
3629 | }
3630 | }
3631 | break;
3632 |
3633 | case 15: /* SE 15: Mixed-numerology Info. for ueId-based beamforming */
3634 | {
3635 | /* frameStructure */
3636 | offset = dissect_frame_structure(extension_tree, tvb, offset,
3637 | subframeId, slotId);
3638 | /* freqOffset */
3639 | proto_tree_add_item(extension_tree, hf_oran_freqOffset, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000);
3640 | offset += 3;
3641 | /* cpLength */
3642 | proto_item *cplength_ti = proto_tree_add_item(extension_tree, hf_oran_cpLength, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3643 | if (sectionType != 0 && sectionType != 3) {
3644 | proto_item_append_text(cplength_ti, " (ignored - used only with ST0 and ST3)");
3645 | }
3646 | offset += 2;
3647 | break;
3648 | }
3649 |
3650 | case 16: /* SE 16: Antenna mapping in UE channel information based UL beamforming */
3651 | {
3652 | /* Just filling available bytes with antMask entries.
3653 | N.B., if SE 10 also used, could associate each antMask with (beamId or UEId) RX eAxC */
3654 | uint32_t extlen_remaining_bytes = (extlen*4) - 2;
3655 | unsigned num_ant_masks = extlen_remaining_bytes / 8;
3656 | for (unsigned n=0; n < num_ant_masks; n++) {
3657 | proto_item *ti = proto_tree_add_item(extension_tree, hf_oran_antMask, tvb, offset, 8, ENC_BIG_ENDIAN0x00000000);
3658 | proto_item_append_text(ti, " (RX eAxC #%u)", n+1);
3659 | offset += 8;
3660 | }
3661 | break;
3662 | }
3663 |
3664 | case 17: /* SE 17: Indication of user port group */
3665 | {
3666 | uint32_t extlen_remaining_bytes = (extlen*4) - 2;
3667 | uint32_t end_bit = (offset+extlen_remaining_bytes) * 8;
3668 | uint32_t ueid_index = 1;
3669 | /* TODO: just filling up all available bytes - some may actually be padding.. */
3670 | /* "the preceding Section Type and extension messages implicitly provide the number of scheduled users" */
3671 | for (uint32_t bit_offset=offset*8; bit_offset < end_bit; bit_offset+=4, ueid_index++) {
3672 | proto_item *ti = proto_tree_add_bits_item(extension_tree, hf_oran_num_ueid, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000);
3673 | proto_item_append_text(ti, " (user #%u)", ueid_index);
3674 | }
3675 | break;
3676 | }
3677 |
3678 | case 18: /* SE 18: Uplink transmission management */
3679 | /* transmissionWindowOffset */
3680 | proto_tree_add_item(extension_tree, hf_oran_transmissionWindowOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3681 | offset += 2;
3682 | /* reserved (2 bits) */
3683 | proto_tree_add_item(extension_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3684 | /* transmissionWindowSize (14 bits) */
3685 | proto_tree_add_item(extension_tree, hf_oran_transmissionWindowSize, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3686 | offset += 2;
3687 |
3688 | /* reserved (6 bits) */
3689 | proto_tree_add_item(extension_tree, hf_oran_reserved_6bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3690 | /* toT (2 bits) */
3691 | proto_tree_add_item(extension_tree, hf_oran_toT, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3692 | offset += 1;
3693 | break;
3694 |
3695 | case 19: /* SE 19: Compact beamforming information for multiple port */
3696 | {
3697 | /* beamId in section header should be ignored. Guard against appending multiple times.. */
3698 | if (beamId_ti
22.1 | 'beamId_ti' is null
&& !beamId_ignored) {
3699 | proto_item_append_text(beamId_ti, " (ignored)");
3700 | beamId_ignored = true1;
3701 | }
3702 |
3703 | /* numSymbol not used in this case */
3704 | if (numsymbol_ti
22.2 | 'numsymbol_ti' is null
&& !numsymbol_ignored) {
3705 | proto_item_append_text(numsymbol_ti, " (ignored)");
3706 | numsymbol_ignored = true1;
3707 | }
3708 |
3709 | /* disableBFWs */
3710 | bool_Bool disableBFWs;
3711 | proto_tree_add_item_ret_boolean(extension_tree, hf_oran_disable_bfws,
3712 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &disableBFWs);
3713 | if (disableBFWs) {
23 | ← | Assuming 'disableBFWs' is false | →
24 | ← | Taking false branch | →
3714 | proto_item_append_text(extension_ti, " (disableBFWs)");
3715 | }
3716 | /* repetition (1 bit) */
3717 | uint64_t repetition;
3718 | proto_tree_add_bits_ret_val(extension_tree, hf_oran_se19_repetition, tvb, (offset*8)+1, 1, &repetition, ENC_BIG_ENDIAN0x00000000);
3719 | /* numPortc (6 bits) */
3720 | proto_tree_add_item_ret_uint(extension_tree, hf_oran_numPortc,
3721 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numPortc);
3722 | offset++;
3723 |
3724 | /* priority (2 bits) */
3725 | proto_tree_add_item(extension_tree, hf_oran_noncontig_priority, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3726 | /* symbolMask (14 bits) */
3727 | offset = dissect_symbolmask(tvb, extension_tree, offset, NULL((void*)0), NULL((void*)0));
3728 |
3729 | uint32_t bfwcomphdr_iq_width, bfwcomphdr_comp_meth;
3730 | proto_item *comp_meth_ti = NULL((void*)0);
3731 |
3732 | if (!repetition) {
25 | ← | Assuming 'repetition' is 0 | →
26 | ← | Taking true branch | →
3733 |
3734 | if (!disableBFWs
26.1 | 'disableBFWs' is false
) {
27 | ← | Taking true branch | →
3735 | /* bfwCompHdr */
3736 | offset = dissect_bfwCompHdr(tvb, extension_tree, offset,
3737 | &bfwcomphdr_iq_width, &bfwcomphdr_comp_meth, &comp_meth_ti);
3738 | }
3739 |
3740 | /* Add entries for each port */
3741 | for (unsigned port=0; port < numPortc; port++) {
28 | ← | Assuming 'port' is < 'numPortc' | →
29 | ← | Loop condition is true. Entering loop body | →
3742 |
3743 | /* Create subtree for port entry*/
3744 | int port_start_offset = offset;
3745 | proto_item *port_ti = proto_tree_add_string_format(extension_tree, hf_oran_ext19_port,
3746 | tvb, offset, 0,
3747 | "", "Port %u: ", port);
3748 | proto_tree *port_tree = proto_item_add_subtree(port_ti, ett_oran_ext19_port);
3749 |
3750 | /* Reserved (4 bits) */
3751 | proto_tree_add_item(port_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3752 | /* portReMask (12 bits) */
3753 | proto_tree_add_item(port_tree, hf_oran_portReMask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3754 | offset += 2;
3755 |
3756 | /* Reserved (2 bits) */
3757 | proto_tree_add_item(port_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3758 | /* portSymbolMask (14 bits) */
3759 | proto_tree_add_item(port_tree, hf_oran_portSymbolMask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3760 | offset += 2;
3761 |
3762 | /* Reserved (1 bit) */
3763 | proto_tree_add_item(port_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3764 | /* beamID (15 bits) */
3765 | proto_tree_add_item_ret_uint(port_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &beamId);
3766 | proto_item_append_text(port_ti, " (beamId=%u)", beamId);
3767 | offset += 2;
3768 |
3769 | /* No weights present */
3770 | if (!disableBFWs
29.1 | 'disableBFWs' is false
) {
30 | ← | Taking true branch | →
3771 | /*******************************************************************/
3772 | /* Table 7.7.19.1-1 (there is no part -2 for disableBFWs case...), */
3773 | /* but for SE 11, bfwCompParam was only present for !disableBFWs */
3774 | /*******************************************************************/
3775 |
3776 | /* bfwCompParam */
3777 | bool_Bool compression_method_supported = false0;
3778 | uint32_t exponent = 0;
3779 | unsigned num_trx_entries;
31 | ← | 'num_trx_entries' declared without an initial value | →
3780 | uint16_t *trx;
3781 | offset = dissect_bfwCompParam(tvb, port_tree, pinfo, offset, comp_meth_ti,
32 | ← | Calling 'dissect_bfwCompParam' | →
36 | ← | Returning from 'dissect_bfwCompParam' | →
3782 | &bfwcomphdr_comp_meth, &exponent, &compression_method_supported,
3783 | &num_trx_entries, &trx);
3784 |
3785 | int bit_offset = offset*8;
3786 | int bfw_offset;
3787 |
3788 | /* Add weights for each TRX */
3789 | unsigned trx_to_add = (num_trx_entries==0) ? pref_num_bf_antennas : num_trx_entries;
37 | ← | The left operand of '==' is a garbage value
3790 | for (unsigned b=0; b < trx_to_add; b++) {
3791 |
3792 | uint16_t trx_index = (num_trx_entries) ? trx[b] : b+1;
3793 |
3794 | /* Create BFW subtree */
3795 | bfw_offset = bit_offset / 8;
3796 | uint8_t bfw_extent = ((bit_offset + (bfwcomphdr_iq_width*2)) / 8) - bfw_offset;
3797 | proto_item *bfw_ti = proto_tree_add_string_format(port_tree, hf_oran_bfw,
3798 | tvb, bfw_offset, bfw_extent,
3799 | "", "TRX %u: (", trx_index);
3800 | proto_tree *bfw_tree = proto_item_add_subtree(bfw_ti, ett_oran_bfw);
3801 |
3802 | /* I */
3803 | uint32_t bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
3804 | float value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent);
3805 | /* Add to tree. */
3806 | proto_tree_add_float_format_value(bfw_tree, hf_oran_bfw_i, tvb, bit_offset/8,
3807 | (bfwcomphdr_iq_width+7)/8, value, "#%u=%f", b, value);
3808 | bit_offset += bfwcomphdr_iq_width;
3809 | proto_item_append_text(bfw_ti, "I%u=%f ", b, value);
3810 |
3811 | /* Q */
3812 | bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
3813 | value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent);
3814 | /* Add to tree. */
3815 | proto_tree_add_float_format_value(bfw_tree, hf_oran_bfw_q, tvb, bit_offset/8,
3816 | (bfwcomphdr_iq_width+7)/8, value, "#%u=%f", b, value);
3817 | bit_offset += bfwcomphdr_iq_width;
3818 | proto_item_append_text(bfw_ti, "Q%u=%f)", b, value);
3819 | }
3820 |
3821 | offset = (bit_offset+7)/8;
3822 | }
3823 | else {
3824 | /* No weights... */
3825 | }
3826 |
3827 | /* Set length of this port entry */
3828 | proto_item_set_len(port_ti, offset-port_start_offset);
3829 | }
3830 | }
3831 | break;
3832 | }
3833 |
3834 | case 20: /* SE 20: Puncturing extension */
3835 | {
3836 | /* numPuncPatterns */
3837 | uint32_t numPuncPatterns;
3838 | proto_tree_add_item_ret_uint(extension_tree, hf_oran_numPuncPatterns, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numPuncPatterns);
3839 | offset += 1;
3840 |
3841 | /* Add each puncturing pattern */
3842 | for (uint32_t n=0; n < numPuncPatterns; n++) {
3843 | unsigned pattern_start_offset = offset;
3844 |
3845 | /* Subtree for this puncturing pattern */
3846 | proto_item *pattern_ti = proto_tree_add_string_format(extension_tree, hf_oran_puncPattern,
3847 | tvb, offset, 0,
3848 | "", "Puncturing Pattern: %u/%u", n+1, numPuncPatterns);
3849 | proto_tree *pattern_tree = proto_item_add_subtree(pattern_ti, ett_oran_punc_pattern);
3850 |
3851 | /* SymbolMask (14 bits) */
3852 | proto_tree_add_item(pattern_tree, hf_oran_symbolMask_ext20, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3853 | offset += 1;
3854 |
3855 | uint32_t startPuncPrb, numPuncPrb;
3856 |
3857 | /* startPuncPrb (10 bits) */
3858 | proto_tree_add_item_ret_uint(pattern_tree, hf_oran_startPuncPrb, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPuncPrb);
3859 | offset += 2;
3860 | /* numPuncPrb (8 bits) */
3861 | proto_tree_add_item_ret_uint(pattern_tree, hf_oran_numPuncPrb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &numPuncPrb);
3862 | offset += 1;
3863 |
3864 | proto_item_append_text(pattern_ti, " [%u->%u]", startPuncPrb, startPuncPrb+numPuncPrb-1);
3865 |
3866 | /* Make a hole in range of PRBs to report */
3867 | for (unsigned p=startPuncPrb; p < startPuncPrb+numPuncPrb; p++) {
3868 | if (p < MAX_PRBS273) {
3869 | prbs_for_st10_type5[p] = false0;
3870 | }
3871 | }
3872 |
3873 | /* puncReMask (12 bits) */
3874 | proto_tree_add_item(pattern_tree, hf_oran_puncReMask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3875 | offset += 1;
3876 | /* rb (1 bit) */
3877 | proto_item *rb_ti = proto_tree_add_item(pattern_tree, hf_oran_rb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3878 | /* reserved (1 bit) */
3879 | proto_tree_add_item(pattern_tree, hf_oran_reserved_bit5, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3880 | /* multiSDScope (1 bit) */
3881 | proto_tree_add_item(pattern_tree, hf_oran_multiSDScope, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3882 | /* rbgIncl (1 bit) */
3883 | bool_Bool rbgIncl;
3884 | proto_tree_add_item_ret_boolean(pattern_tree, hf_oran_RbgIncl, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rbgIncl);
3885 | offset += 1;
3886 |
3887 | if (rbgIncl) {
3888 | /* reserved (1 bit) */
3889 | proto_tree_add_item(pattern_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3890 | /* rbgSize(3 bits) */
3891 | proto_tree_add_item(pattern_tree, hf_oran_rbgSize, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3892 | /* rbgMask (28 bits) */
3893 | proto_tree_add_item(pattern_tree, hf_oran_rbgMask, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
3894 | offset += 4;
3895 |
3896 | proto_item_append_text(rb_ti, " (ignored)");
3897 | }
3898 |
3899 | proto_item_set_len(pattern_ti, offset-pattern_start_offset);
3900 | }
3901 |
3902 | break;
3903 | }
3904 | case 21: /* SE 21: Variable PRB group size for channel information */
3905 | {
3906 | /* ciPrbGroupSize */
3907 | uint32_t ci_prb_group_size;
3908 | 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);
3909 | offset += 1;
3910 |
3911 | switch (ci_prb_group_size) {
3912 | case 0:
3913 | case 1:
3914 | case 255:
3915 | /* Reserved value */
3916 | expert_add_info_format(pinfo, prb_group_size_ti, &ei_oran_ci_prb_group_size_reserved,
3917 | "SE 11 ciPrbGroupSize is reserved value %u - must be 2-254",
3918 | ci_prb_group_size);
3919 | break;
3920 | default:
3921 | /* This value affects how SE 11 is interpreted */
3922 | ext11_settings.ext21_set = true1;
3923 | ext11_settings.ext21_ci_prb_group_size = ci_prb_group_size;
3924 |
3925 | if (numPrbc == 0) {
3926 | expert_add_info(pinfo, numprbc_ti, &ei_oran_numprbc_ext21_zero);
3927 | }
3928 | break;
3929 | }
3930 |
3931 | /* reserved (6 bits) */
3932 | proto_tree_add_item(extension_tree, hf_oran_reserved_6bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3933 |
3934 | /* prgSize (2 bits). Interpretation depends upon section type (5 or 6), but also mplane parameters? */
3935 | if (sectionType == SEC_C_UE_SCHED) { /* Section Type 5 */
3936 | proto_tree_add_item(extension_tree, hf_oran_prg_size_st5, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3937 | }
3938 | else if (sectionType == SEC_C_CH_INFO) { /* Section Type 6 */
3939 | proto_tree_add_item(extension_tree, hf_oran_prg_size_st6, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3940 | }
3941 | offset += 1;
3942 | break;
3943 | }
3944 |
3945 | case 22: /* SE 22: ACK/NACK request */
3946 | {
3947 | uint32_t ack_nack_req_id;
3948 | proto_tree_add_item_ret_uint(extension_tree, hf_oran_ack_nack_req_id, tvb, offset, 2,
3949 | ENC_BIG_ENDIAN0x00000000, &ack_nack_req_id);
3950 | offset += 2;
3951 |
3952 | if (state) {
3953 | if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
3954 | /* Add this request into conversation state on first pass */
3955 | 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)));
3956 | request_details->request_frame_number = pinfo->num;
3957 | request_details->request_frame_time = pinfo->abs_ts;
3958 | request_details->requestType = SE22;
3959 | /* Insert into flow's tree */
3960 | wmem_tree_insert32(state->ack_nack_requests, ack_nack_req_id, request_details);
3961 | }
3962 | else {
3963 | /* Try to link forward to ST8 response */
3964 | ack_nack_request_t *response = wmem_tree_lookup32(state->ack_nack_requests,
3965 | ack_nack_req_id);
3966 | if (response) {
3967 | show_link_to_acknack_response(extension_tree, tvb, pinfo, response);
3968 | }
3969 | }
3970 | }
3971 | break;
3972 | }
3973 |
3974 | case 23: /* SE 23: Arbitrary symbol pattern modulation compression parameters */
3975 | {
3976 | /* Green common header */
3977 |
3978 | /* numSymPrbPattern (4 bits) */
3979 | uint32_t num_sym_prb_pattern;
3980 | proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_sym_prb_pattern, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_sym_prb_pattern);
3981 | /* reserved (3 bits) */
3982 | proto_tree_add_item(extension_tree, hf_oran_reserved_bits456, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3983 | /* prbMode (1 bit) */
3984 | bool_Bool prb_mode;
3985 | proto_tree_add_item_ret_boolean(extension_tree, hf_oran_prb_mode, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &prb_mode);
3986 | offset += 1;
3987 |
3988 | /* reserved (8 bits) */
3989 | proto_tree_add_item(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3990 | offset += 1;
3991 |
3992 | /* Dissect each SymPrbPattern */
3993 | for (uint32_t n=0; n < num_sym_prb_pattern; n++) {
3994 |
3995 | /* Subtree */
3996 | proto_item *pattern_ti = proto_tree_add_string_format(extension_tree, hf_oran_sym_prb_pattern,
3997 | tvb, offset, 1, "",
3998 | prb_mode ? "PRB-BLOCK" : "PRB-MASK");
3999 | proto_tree *pattern_tree = proto_item_add_subtree(pattern_ti, ett_oran_sym_prb_pattern);
4000 |
4001 |
4002 | /* Orange part */
4003 |
4004 | /* Reserved (2 bits) */
4005 | proto_tree_add_item(pattern_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4006 | /* symMask (14 bits) */
4007 | proto_tree_add_item(pattern_tree, hf_oran_sym_mask, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4008 | offset += 2;
4009 | /* numMcScaleOffset (4 bits) */
4010 | proto_tree_add_item(pattern_tree, hf_oran_num_mc_scale_offset, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4011 |
4012 | if (!prb_mode) { /* PRB-MASK */
4013 | /* prbPattern (4 bits) */
4014 | proto_tree_add_item(pattern_tree, hf_oran_prb_pattern, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4015 | offset += 1;
4016 | /* reserved (8 bits) */
4017 | proto_tree_add_item(pattern_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4018 | offset += 1;
4019 | }
4020 | else { /* PRB-BLOCK */
4021 | /* prbBlkOffset (8 bits) */
4022 | proto_tree_add_item(pattern_tree, hf_oran_prb_block_offset, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4023 | offset += 1;
4024 | /* prbBlkSize (4 bits) */
4025 | proto_tree_add_item(pattern_tree, hf_oran_prb_block_size, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4026 | offset += 1;
4027 | }
4028 |
4029 | /* Yellowish part */
4030 | if (prb_mode) { /* PRB-BLOCK */
4031 | /* prbBlkSize (4 bits) */
4032 | proto_tree_add_item(pattern_tree, hf_oran_prb_block_size, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4033 | }
4034 | else {
4035 | /* reserved (4 bits) */
4036 | proto_tree_add_item(pattern_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4037 | }
4038 |
4039 | /* mcScaleReMask (12 bits) */
4040 | uint64_t mcScaleReMask, mcScaleOffset;
4041 | proto_tree_add_bits_ret_val(pattern_tree, hf_oran_mc_scale_re_mask, tvb, offset*8 + 4, 12, &mcScaleReMask, ENC_BIG_ENDIAN0x00000000);
4042 | offset += 2;
4043 | /* csf */
4044 | dissect_csf(pattern_tree, tvb, offset*8, ci_iq_width, NULL((void*)0));
4045 | /* mcScaleOffset (15 bits) */
4046 | proto_tree_add_bits_ret_val(pattern_tree, hf_oran_mc_scale_offset, tvb, offset*8 + 1, 15, &mcScaleOffset, ENC_BIG_ENDIAN0x00000000);
4047 | offset += 2;
4048 |
4049 | proto_item_set_end(pattern_ti, tvb, offset);
4050 | }
4051 | break;
4052 | }
4053 |
4054 | case 24: /* SE 24: PUSCH DMRS configuration */
4055 | {
4056 | /* Hidden filter for bf (DMRS BF) */
4057 | bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
4058 | PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
4059 |
4060 | /* alpnPerSym (1 bit) */
4061 | proto_tree_add_item(extension_tree, hf_oran_alpn_per_sym, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4062 | /* antDmrsSnr (1 bit) */
4063 | proto_tree_add_item(extension_tree, hf_oran_ant_dmrs_snr, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4064 | /* reserved (1 bit) */
4065 | proto_tree_add_item(extension_tree, hf_oran_reserved_bit2, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4066 | /* userGroupSize (5 bits) */
4067 | uint32_t user_group_size;
4068 | proto_item *ugs_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_user_group_size, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &user_group_size);
4069 | if (user_group_size == 0) {
4070 | proto_item_append_text(ugs_ti, " (not used)");
4071 | }
4072 | else if (user_group_size > 12) {
4073 | proto_item_append_text(ugs_ti, " (reserved)");
4074 | }
4075 | offset += 1;
4076 | /* userGroupId (8 bits)*/
4077 | uint32_t user_group_id;
4078 | proto_item *ugi_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_user_group_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &user_group_id);
4079 | if (user_group_id == 0) {
4080 | /* TODO: Value 0 can happen in several cases, described in 7.7.24.7.. */
4081 | }
4082 | if (user_group_id == 255) {
4083 | /* Value 255 is reserved */
4084 | expert_add_info(pinfo, ugi_ti, &ei_oran_user_group_id_reserved_value);
4085 | }
4086 | offset += 1;
4087 |
4088 | bool_Bool seen_value_to_inherit = false0;
4089 | bool_Bool inherited_config_has_transform_precoding = false0;
4090 | int dmrs_configs_seen = 0;
4091 |
4092 | /* Dissect each entry until reach number of configured ueIds (or run out of extlen bytes..) */
4093 | uint32_t ueid_index = 0;
4094 | while ((offset < (extension_start_offset + extlen*4)) && (ueid_index < number_of_ueids)) {
4095 | dmrs_configs_seen++;
4096 |
4097 | /* Subtree */
4098 | proto_item *entry_ti = proto_tree_add_string_format(extension_tree, hf_oran_dmrs_entry,
4099 | tvb, offset, 0, "",
4100 | "Entry");
4101 | proto_tree *entry_tree = proto_item_add_subtree(entry_ti, ett_oran_dmrs_entry);
4102 |
4103 | /* entryType (3 bits) */
4104 | uint32_t entry_type;
4105 | proto_item *entry_type_ti;
4106 | entry_type_ti = proto_tree_add_item_ret_uint(entry_tree, hf_oran_entry_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &entry_type);
4107 | if (entry_type > 3) {
4108 | proto_item_append_text(entry_type_ti, " (reserved)");
4109 | }
4110 |
4111 | /* dmrsPortNumber (5 bits). Values 0-11 allowed */
4112 | unsigned int dmrs_port_number;
4113 | proto_item *dpn_ti = proto_tree_add_item_ret_uint(entry_tree, hf_oran_dmrs_port_number, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &dmrs_port_number);
4114 | if (dmrs_port_number > 11) {
4115 | proto_item_append_text(dpn_ti, " (12-31 are reserved)");
4116 | }
4117 | offset += 1;
4118 |
4119 | /* What follows depends upon entryType */
4120 | switch (entry_type) {
4121 | case 0: /* dmrsPortNumber config same as previous, ueId ueIdReset=0 */
4122 | case 1: /* dmrsPortNumber config same as previous, ueId ueIdReset=1 */
4123 | /* No further fields for these */
4124 | /* Error here if no previous values to inherit!! */
4125 | if (!seen_value_to_inherit) {
4126 | expert_add_info_format(pinfo, entry_type_ti, &ei_oran_se24_nothing_to_inherit,
4127 | "SE24: have seen entry type %u, but no previous config (type 2 or 3) to inherit config from", entry_type);
4128 |
4129 | }
4130 | /* TODO: would be useful to repeat whole inherited config here? */
4131 | break;
4132 |
4133 | case 2: /* transform precoding disabled */
4134 | case 3: /* transform precoding enabled */
4135 | {
4136 | /* Type 2/3 are very similar.. */
4137 |
4138 | /* ueIdReset (1 bit) */
4139 | proto_tree_add_item(entry_tree, hf_oran_ueid_reset, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4140 | /* reserved (1 bit) */
4141 | proto_tree_add_item(entry_tree, hf_oran_reserved_bit1, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4142 |
4143 | /* dmrsSymbolMask (14 bits) */
4144 | static int * const dmrs_symbol_mask_flags[] = {
4145 | &hf_oran_dmrs_symbol_mask_s13,
4146 | &hf_oran_dmrs_symbol_mask_s12,
4147 | &hf_oran_dmrs_symbol_mask_s11,
4148 | &hf_oran_dmrs_symbol_mask_s10,
4149 | &hf_oran_dmrs_symbol_mask_s9,
4150 | &hf_oran_dmrs_symbol_mask_s8,
4151 | &hf_oran_dmrs_symbol_mask_s7,
4152 | &hf_oran_dmrs_symbol_mask_s6,
4153 | &hf_oran_dmrs_symbol_mask_s5,
4154 | &hf_oran_dmrs_symbol_mask_s4,
4155 | &hf_oran_dmrs_symbol_mask_s3,
4156 | &hf_oran_dmrs_symbol_mask_s2,
4157 | &hf_oran_dmrs_symbol_mask_s1,
4158 | &hf_oran_dmrs_symbol_mask_s0,
4159 | NULL((void*)0)
4160 | };
4161 | proto_tree_add_bitmask(entry_tree, tvb, offset,
4162 | hf_oran_dmrs_symbol_mask, ett_oran_dmrs_symbol_mask, dmrs_symbol_mask_flags, ENC_BIG_ENDIAN0x00000000);
4163 | offset += 2;
4164 |
4165 | /* scrambling */
4166 | proto_tree_add_item(entry_tree, hf_oran_scrambling, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4167 | offset += 2;
4168 |
4169 | /* nscid (1 bit) */
4170 | proto_tree_add_item(entry_tree, hf_oran_nscid, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4171 |
4172 | /* These 5 bits differ depending upon entry type */
4173 | if (entry_type == 2) { /* type 2 */
4174 | /* dType (1 bit) */
4175 | proto_tree_add_item(entry_tree, hf_oran_dtype, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4176 | /* cdmWithoutData (2 bits) */
4177 | proto_tree_add_item(entry_tree, hf_oran_cmd_without_data, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4178 | /* lambda (2 bits) */
4179 | proto_tree_add_item(entry_tree, hf_oran_lambda, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4180 | }
4181 | else { /* type 3 */
4182 | /* reserved (1 bit) */
4183 | proto_tree_add_item(entry_tree, hf_oran_reserved_bit1, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4184 | /* lowPaprType (2 bits) */
4185 | proto_tree_add_item(entry_tree, hf_oran_low_papr_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4186 | /* hoppingMode (2 bits) */
4187 | proto_tree_add_item(entry_tree, hf_oran_hopping_mode, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4188 | }
4189 |
4190 | /* firstPrb (9 bits) */
4191 | proto_tree_add_item(entry_tree, hf_oran_first_prb, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4192 | offset += 1;
4193 | /* lastPrb (9 bits) */
4194 | proto_tree_add_item(entry_tree, hf_oran_last_prb, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4195 | offset += 2;
4196 | /* Reserved (16 bits) */
4197 | proto_tree_add_item(entry_tree, hf_oran_reserved_16bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4198 | offset += 2;
4199 |
4200 | /* Could now see entry types 0 or 1 - they have these values to inherit */
4201 | seen_value_to_inherit = true1;
4202 | inherited_config_has_transform_precoding = (entry_type == 3);
4203 | break;
4204 | }
4205 |
4206 | default:
4207 | /* reserved - expert info */
4208 | break;
4209 | }
4210 |
4211 | proto_item_append_text(entry_ti, " [UEId=%u] (dmrsPortNumber=%2u) (type %u - %s) ",
4212 | ueids[ueid_index++], dmrs_port_number, entry_type, val_to_str_const(entry_type, entry_type_vals, "Unknown"));
4213 | proto_item_set_end(entry_ti, tvb, offset);
4214 |
4215 | if (entry_type <= 1) {
4216 | proto_item_append_text(entry_ti, " [transform-precoding %s]",
4217 | inherited_config_has_transform_precoding ? "enabled" : "disabled");
4218 | }
4219 | }
4220 |
4221 | proto_item_append_text(extension_ti, " (%d DMRS configs seen)", dmrs_configs_seen);
4222 | break;
4223 | }
4224 |
4225 | case 25: /* SE 25: Symbol reordering for DMRS-BF */
4226 | /* Just dissect each available block of 7 bytes as the 14 symbols for a layer,
4227 | where each layer could be one or apply to all layers. */
4228 | {
4229 | /* TODO: should only appear in one section of a message - check? */
4230 | unsigned layer = 0;
4231 | proto_item *layer_ti;
4232 | while (offset+7 <= (extension_start_offset + extlen*4)) {
4233 | /* Layer subtree */
4234 | layer_ti = proto_tree_add_string_format(extension_tree, hf_oran_symbol_reordering_layer,
4235 | tvb, offset, 7, "",
4236 | "Layer");
4237 | proto_tree *layer_tree = proto_item_add_subtree(layer_ti, ett_oran_symbol_reordering_layer);
4238 |
4239 | /* All 14 symbols for a layer (or all layers) */
4240 | for (unsigned s=0; s < 14; s++) {
4241 | proto_item *sym_ti;
4242 | /* txWinForOnAirSymbol */
4243 | unsigned int tx_win_for_on_air_symbol;
4244 | sym_ti = proto_tree_add_item_ret_uint(layer_tree,
4245 | (s % 2) ? hf_oran_tx_win_for_on_air_symbol_r : hf_oran_tx_win_for_on_air_symbol_l,
4246 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &tx_win_for_on_air_symbol);
4247 | if (tx_win_for_on_air_symbol == 0x0F) {
4248 | /* Ordering not affected */
4249 | proto_item_append_text(sym_ti, " (sym %u - no info)", s);
4250 | }
4251 | else {
4252 | proto_item_append_text(sym_ti, " (sym %u)", s);
4253 | }
4254 | if (s % 2) {
4255 | offset += 1;
4256 | }
4257 | }
4258 |
4259 | proto_item_append_text(layer_ti, " (layer %u)", ++layer);
4260 | proto_item_append_text(extension_ti, " (layer %u)", layer);
4261 | }
4262 | /* Set layer subtree label */
4263 | if (layer == 1) {
4264 | proto_item_append_text(layer_ti, " (all)");
4265 | proto_item_append_text(extension_ti, " (all)");
4266 | }
4267 | if (layer == 0) {
4268 | /* TODO: are no layers valid? What does it mean? */
4269 | proto_item_append_text(extension_ti, " (none)");
4270 | }
4271 | break;
4272 | }
4273 |
4274 | case 26: /* SE 26: Frequency offset feedback */
4275 | /* Reserved (8 bits). N.B., added after draft? */
4276 | proto_tree_add_item(extension_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4277 | offset += 1;
4278 | /* Reserved (1 bit) */
4279 | proto_tree_add_item(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4280 | /* numFoFb (7 bits) */
4281 | unsigned num_fo_fb;
4282 | proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_fo_fb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_fo_fb);
4283 | offset += 1;
4284 |
4285 | /* Add each freqOffsetFb value */
4286 | for (unsigned n=0; n < num_fo_fb; n++) {
4287 | unsigned freq_offset_fb;
4288 | /* freqOffsetFb (16 bits) */
4289 | proto_item *offset_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_freq_offset_fb,
4290 | tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &freq_offset_fb);
4291 | /* Show if maps onto a -ve number */
4292 | if ((freq_offset_fb >= 0x8ad0) && (freq_offset_fb <= 0xffff)) {
4293 | proto_item_append_text(offset_ti, "(value %d)", -1 - (0xffff-freq_offset_fb));
4294 | }
4295 | proto_item_append_text(offset_ti, " [#%u]", n+1);
4296 | offset += 2;
4297 | }
4298 | break;
4299 |
4300 | case 27: /* SE 27: O-DU controlled dimensionality reduction */
4301 | {
4302 | /* Hidden filter for bf (DMRS BF) */
4303 | bf_ti = proto_tree_add_item(tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
4304 | PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
4305 |
4306 | /* beamType (2 bits) */
4307 | unsigned beam_type;
4308 | proto_tree_add_item_ret_uint(extension_tree, hf_oran_beam_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &beam_type);
4309 | /* reserved (6 bits) */
4310 | proto_tree_add_item(extension_tree, hf_oran_reserved_last_6bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4311 | offset += 1;
4312 |
4313 | /* numElements */
4314 | unsigned num_elements;
4315 | proto_item *num_elements_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_elements, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_elements);
4316 | if (num_elements == 0) {
4317 | num_elements = 256;
4318 | proto_item_append_text(num_elements_ti, " (256");
4319 | }
4320 |
4321 | offset += 1;
4322 |
4323 | /* beamId value(s) */
4324 | switch (beam_type) {
4325 | case 0:
4326 | for (unsigned n=0; n < num_elements; n++) {
4327 | /* reserved (1 bit) + beamId */
4328 | proto_tree_add_item(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4329 | proto_tree_add_item(c_section_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4330 | offset += 2;
4331 | }
4332 | break;
4333 | case 1:
4334 | /* reserved (1 bit) + beamId */
4335 | proto_tree_add_item(extension_tree, hf_oran_reserved_1bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4336 | proto_tree_add_item(c_section_tree, hf_oran_beamId, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4337 | offset += 2;
4338 | break;
4339 | default:
4340 | /* Unknown type... */
4341 | break;
4342 | }
4343 | break;
4344 | }
4345 |
4346 | case 28: /* SE 28: O-DU controlled frequency resolution for SINR reporting */
4347 | {
4348 | /* reserved (3 bits) */
4349 | proto_tree_add_item(extension_tree, hf_oran_reserved_3bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4350 | /* numUeSinrRpt */
4351 | uint32_t num_ue_sinr_rpt;
4352 | proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_ue_sinr_rpt, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_ue_sinr_rpt);
4353 | offset += 1;
4354 |
4355 | for (uint32_t n=0; n < num_ue_sinr_rpt; n++) {
4356 | /* reserved (1 bit) */
4357 | proto_tree_add_item(extension_tree, (n % 2) ? hf_oran_reserved_bit4 : hf_oran_reserved_1bit,
4358 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4359 |
4360 | /* numSinrPerPrb (3 bits). Taken from alternate nibbles within byte. */
4361 | proto_tree_add_item(extension_tree, (n % 2) ? hf_oran_num_sinr_per_prb_right : hf_oran_num_sinr_per_prb,
4362 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4363 | if (n % 2) {
4364 | offset += 1;
4365 | }
4366 | }
4367 |
4368 | /* May need to skip beyond half-used byte */
4369 | if (num_ue_sinr_rpt % 2) {
4370 | offset += 1;
4371 | }
4372 | break;
4373 | }
4374 |
4375 |
4376 | default:
4377 | /* Other/unexpected extension types */
4378 | expert_add_info_format(pinfo, exttype_ti, &ei_oran_unhandled_se,
4379 | "SE %u (%s) not supported by dissector",
4380 | exttype, val_to_str_const(exttype, exttype_vals, "Reserved"));
4381 | ext_unhandled = true1;
4382 | break;
4383 | }
4384 |
4385 | /* Check offset compared with extlen. There should be 0-3 bytes of padding */
4386 | int num_padding_bytes = (extension_start_offset + (extlen*4) - offset);
4387 | if (!ext_unhandled && ((num_padding_bytes<0) || (num_padding_bytes>3))) {
4388 | expert_add_info_format(pinfo, extlen_ti, &ei_oran_extlen_wrong,
4389 | "extlen signalled %u bytes (+ 0-3 bytes padding), but %u were dissected",
4390 | extlen*4, offset-extension_start_offset);
4391 | }
4392 |
4393 | /* Move offset to beyond signalled length of extension */
4394 | offset = extension_start_offset + (extlen*4);
4395 |
4396 | /* Set length of extension header. */
4397 | proto_item_set_len(extension_ti, extlen*4);
4398 | }
4399 | /* End of section extension handling */
4400 |
4401 |
4402 |
4403 | /* RRM measurement reports have measurement reports *after* extensions */
4404 | if (sectionType == SEC_C_RRM_MEAS_REPORTS) /* Section Type 10 */
4405 | {
4406 | /* Hidden filter for bf (DMFS-BF). No BF weights though.. */
4407 | bf_ti = proto_tree_add_item(c_section_tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
4408 | PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
4409 |
4410 | bool_Bool mf;
4411 | do {
4412 | /* Measurement report subtree */
4413 | proto_item *mr_ti = proto_tree_add_string_format(c_section_tree, hf_oran_measurement_report,
4414 | tvb, offset, 1, "", "Measurement Report");
4415 | proto_tree *mr_tree = proto_item_add_subtree(mr_ti, ett_oran_measurement_report);
4416 | unsigned report_start_offset = offset;
4417 |
4418 | /* more fragments (after this one) (1 bit) */
4419 | proto_tree_add_item_ret_boolean(mr_tree, hf_oran_mf, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &mf);
4420 |
4421 | /* measTypeId (7 bits) */
4422 | uint32_t meas_type_id;
4423 | proto_item *meas_type_id_ti;
4424 | 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);
4425 | offset += 1;
4426 |
4427 | /* Common to all measurement types */
4428 | unsigned num_elements = 0;
4429 | if (meas_type_id == 6) {
4430 | /* numElements */
4431 | proto_tree_add_item_ret_uint(mr_tree, hf_oran_num_elements, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_elements);
4432 | }
4433 | else {
4434 | /* All other meas ids have a reserved byte */
4435 | proto_tree_add_item(mr_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4436 | }
4437 | offset += 1;
4438 |
4439 | /* measDataSize (16 bits). N.B. begins at mf field, i.e. 2 bytes before this one */
4440 | unsigned meas_data_size;
4441 | proto_item *meas_data_size_ti;
4442 | 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);
4443 | meas_data_size *= 4;
4444 | proto_item_append_text(meas_data_size_ti, " (%u bytes)", meas_data_size);
4445 | offset += 2;
4446 |
4447 | /* Summary for measurement report root */
4448 | proto_item_append_text(mr_ti, " (measTypeId=%u - %s)",
4449 | meas_type_id, val_to_str_const(meas_type_id, meas_type_id_vals, "unknown"));
4450 | /* And section header */
4451 | proto_item_append_text(tree, " (%s)", val_to_str_const(meas_type_id, meas_type_id_vals, "unknown"));
4452 | /* And Info column */
4453 | col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", val_to_str_const(meas_type_id, meas_type_id_vals, "unknown"));
4454 |
4455 | /* Handle specific message type fields */
4456 | switch (meas_type_id) {
4457 | case 1:
4458 | {
4459 | /* ueTae */
4460 | unsigned ue_tae;
4461 | proto_item *ue_tae_ti;
4462 | ue_tae_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_ue_tae, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ue_tae);
4463 | /* Show if maps onto a -ve number */
4464 | if ((ue_tae >= 0x8ad0) && (ue_tae <= 0xffff)) {
4465 | proto_item_append_text(ue_tae_ti, "(value %d)", -1 - (0xffff-ue_tae));
4466 | }
4467 | offset += 2;
4468 |
4469 | /* Reserved (16 bits) */
4470 | proto_tree_add_item(mr_tree, hf_oran_reserved_16bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4471 | offset += 2;
4472 | break;
4473 | }
4474 | case 2:
4475 | /* ueLayerPower entries (how many? for now just use up meas_data_size..) */
4476 | /* TODO: add number of distinct dmrsPortNumber entries seen in SE24 and save in state? */
4477 | /* Or would it make sense to use the preference 'pref_num_bf_antennas' ? */
4478 | for (unsigned n=0; n < (meas_data_size-4)/2; n++) {
4479 | unsigned ue_layer_power;
4480 | proto_item *ue_layer_power_ti;
4481 | 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);
4482 | /* Show if maps onto a -ve number */
4483 | if ((ue_layer_power >= 0x8ad0) && (ue_layer_power <= 0xffff)) {
4484 | proto_item_append_text(ue_layer_power_ti, "(value %d)", -1 - (0xffff-ue_layer_power));
4485 | }
4486 | offset += 2;
4487 | }
4488 | /* padding out to 4 bytes */
4489 | break;
4490 | case 3:
4491 | {
4492 | /* ueFreqOffset */
4493 | unsigned ue_freq_offset;
4494 | proto_item *ue_freq_offset_ti;
4495 | 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);
4496 | /* Show if maps onto a -ve number */
4497 | if ((ue_freq_offset >= 0x8ad0) && (ue_freq_offset <= 0xffff)) {
4498 | proto_item_append_text(ue_freq_offset_ti, "(value %d)", -1 - (0xffff-ue_freq_offset));
4499 | }
4500 | offset += 2;
4501 |
4502 | /* Reserved (16 bits) */
4503 | proto_tree_add_item(mr_tree, hf_oran_reserved_16bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4504 | offset += 2;
4505 | break;
4506 | }
4507 | case 4:
4508 | case 5:
4509 | /* reserved (2 bits) */
4510 | proto_tree_add_item(mr_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4511 | /* symbolMask (14 bits) */
4512 | offset = dissect_symbolmask(tvb, mr_tree, offset, NULL((void*)0), NULL((void*)0));
4513 |
4514 | /* 2 bytes for each PRB ipnPower */
4515 | for (unsigned prb=0; prb<MAX_PRBS273; prb++) {
4516 | /* Skip if should not be reported */
4517 | if (!prbs_for_st10_type5[prb]) {
4518 | continue;
4519 | }
4520 | unsigned ipn_power;
4521 | proto_item *ipn_power_ti;
4522 | /* ipnPower (2 bytes) */
4523 | ipn_power_ti = proto_tree_add_item_ret_uint(mr_tree, hf_oran_ipn_power, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ipn_power);
4524 | proto_item_append_text(ipn_power_ti, " (PRB %3d)", prb);
4525 | /* Show if maps onto a -ve number */
4526 | if ((ipn_power >= 0x8ad0) && (ipn_power <= 0xffff)) {
4527 | proto_item_append_text(ipn_power_ti, " (value %d)", -1 - (0xffff-ipn_power));
4528 | }
4529 | offset += 2;
4530 | }
4531 | /* padding out to 4 bytes */
4532 | break;
4533 | case 6:
4534 | /* antDmrsSnrVal entries */
4535 | for (unsigned n=0; n < num_elements; n++) {
4536 | unsigned snr_value;
4537 | proto_item *snr_value_ti;
4538 | /* antDmrsSnrVal (2 bytes) */
4539 | 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);
4540 | proto_item_append_text(snr_value_ti, " (elem %2u)", n+1);
4541 | /* Show if maps onto a -ve number */
4542 | if ((snr_value >= 0x8ad0) && (snr_value <= 0xffff)) {
4543 | proto_item_append_text(snr_value_ti, " (value %d)", -1 - (0xffff-snr_value));
4544 | }
4545 | offset += 2;
4546 | }
4547 | break;
4548 |
4549 | default:
4550 | /* Anything else is not expected */
4551 | expert_add_info_format(pinfo, meas_type_id_ti, &ei_oran_unexpected_measTypeId,
4552 | "measTypeId %u (%s) not supported - only 1-6 are expected",
4553 | meas_type_id,
4554 | val_to_str_const(meas_type_id, meas_type_id_vals, "reserved"));
4555 | break;
4556 |
4557 | }
4558 |
4559 | /* Pad out to next 4 bytes */
4560 | offset += WS_PADDING_TO_4(offset-report_start_offset)((4U - ((offset-report_start_offset) % 4U)) % 4U);
4561 |
4562 | /* TODO: verify dissected size of report vs meas_data_size? */
4563 |
4564 | /* End of measurement report tree */
4565 | proto_item_set_end(mr_ti, tvb, offset);
4566 | } while (mf);
4567 | }
4568 |
4569 | /* Request for RRM Measurements has measurement commands after extensions */
4570 | else if (sectionType == SEC_C_REQUEST_RRM_MEAS) /* Section Type 11 */
4571 | {
4572 | bool_Bool mf = true1;
4573 | do {
4574 | /* Measurement command subtree */
4575 | proto_item *mc_ti = proto_tree_add_string_format(c_section_tree, hf_oran_measurement_command,
4576 | tvb, offset, 8, "", "Measurement Command");
4577 | proto_tree *mc_tree = proto_item_add_subtree(mc_ti, ett_oran_measurement_command);
4578 |
4579 | /* mf (1 bit). 1st measurement command is always preset */
4580 | proto_tree_add_item_ret_boolean(mc_tree, hf_oran_mf, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &mf);
4581 |
4582 | /* measTypeId (7 bits) */
4583 | uint32_t meas_type_id;
4584 | proto_item *meas_type_id_ti;
4585 | meas_type_id_ti = proto_tree_add_item_ret_uint(mc_tree, hf_oran_meas_type_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &meas_type_id);
4586 | offset += 1;
4587 |
4588 | proto_item *meas_command_ti;
4589 | uint32_t meas_command_size;
4590 |
4591 | switch (meas_type_id) {
4592 | case 5: /* command for IpN for unallocated PRBs */
4593 | /* reserved (1 byte) */
4594 | proto_tree_add_item(mc_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4595 | offset += 1;
4596 | /* measCmdSize. Presumably number of words so in future could skip unrecognised command types.. */
4597 | meas_command_ti = proto_tree_add_item_ret_uint(mc_tree, hf_oran_meas_cmd_size, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &meas_command_size);
4598 | proto_item_append_text(meas_command_ti, " (%u bytes)", meas_command_size*4);
4599 | offset += 2;
4600 | /* reserved (2 bits) */
4601 | proto_tree_add_item(mc_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4602 | /* symbolMask (14 bits) */
4603 | offset = dissect_symbolmask(tvb, mc_tree, offset, NULL((void*)0), NULL((void*)0));
4604 | /* reserved (16 bits) */
4605 | proto_tree_add_item(mc_tree, hf_oran_reserved_16bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4606 | offset += 2;
4607 | break;
4608 |
4609 | default:
4610 | /* Anything else is not expected */
4611 | expert_add_info_format(pinfo, meas_type_id_ti, &ei_oran_unexpected_measTypeId,
4612 | "measTypeId %u (%s) not supported - only 5 is expected",
4613 | meas_type_id,
4614 | val_to_str_const(meas_type_id, meas_type_id_vals, "reserved"));
4615 | break;
4616 | }
4617 | proto_item_append_text(mc_ti, " (%s)", val_to_str_const(meas_type_id, meas_type_id_vals, "unknown"));
4618 |
4619 | } while (mf);
4620 | }
4621 |
4622 | /* Set extent of overall section */
4623 | proto_item_set_len(sectionHeading, offset);
4624 |
4625 | return offset;
4626 | }
4627 |
4628 | /* Dissect udCompHdr (user data compression header, 7.5.2.10) */
4629 | /* bit_width and comp_meth are out params */
4630 | static int dissect_udcomphdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset,
4631 | bool_Bool ignore,
4632 | unsigned *bit_width, unsigned *comp_meth, proto_item **comp_meth_ti)
4633 | {
4634 | /* Subtree */
4635 | proto_item *udcomphdr_ti = proto_tree_add_string_format(tree, hf_oran_udCompHdr,
4636 | tvb, offset, 1, "",
4637 | "udCompHdr");
4638 | proto_tree *udcomphdr_tree = proto_item_add_subtree(udcomphdr_ti, ett_oran_udcomphdr);
4639 |
4640 | /* udIqWidth */
4641 | uint32_t hdr_iq_width;
4642 | proto_item *iq_width_item = proto_tree_add_item_ret_uint(udcomphdr_tree, hf_oran_udCompHdrIqWidth , tvb, offset, 1, ENC_NA0x00000000, &hdr_iq_width);
4643 | *bit_width = (hdr_iq_width) ? hdr_iq_width : 16;
4644 | proto_item_append_text(iq_width_item, " (%u bits)", *bit_width);
4645 |
4646 | /* udCompMeth */
4647 | uint32_t ud_comp_meth;
4648 | *comp_meth_ti = proto_tree_add_item_ret_uint(udcomphdr_tree, hf_oran_udCompHdrMeth, tvb, offset, 1, ENC_NA0x00000000, &ud_comp_meth);
4649 | if (comp_meth) {
4650 | *comp_meth = ud_comp_meth;
4651 | }
4652 |
4653 | /* Summary */
4654 | if (!ignore) {
4655 | proto_item_append_text(udcomphdr_ti, " (IqWidth=%u, udCompMeth=%s)",
4656 | *bit_width, rval_to_str_const(ud_comp_meth, ud_comp_header_meth, "Unknown"));
4657 | }
4658 | else {
4659 | proto_item_append_text(udcomphdr_ti, " (ignored)");
4660 | if (hdr_iq_width || ud_comp_meth) {
4661 | expert_add_info_format(pinfo, udcomphdr_ti, &ei_oran_udpcomphdr_should_be_zero,
4662 | "udCompHdr in C-Plane for DL should be 0 - found 0x%02x",
4663 | tvb_get_uint8(tvb, offset));
4664 | }
4665 |
4666 | }
4667 | return offset+1;
4668 | }
4669 |
4670 | /* Dissect udCompParam (user data compression parameter, 8.3.3.15) */
4671 | /* bit_width and comp_meth are out params */
4672 | static int dissect_udcompparam(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree, unsigned offset,
4673 | unsigned comp_meth,
4674 | uint32_t *exponent, uint16_t *sReSMask,
4675 | bool_Bool for_sinr)
4676 | {
4677 | if (for_sinr && (comp_meth != COMP_BLOCK_FP1)) {
4678 | /* sinrCompParam only present when bfp is used */
4679 | return offset;
4680 | }
4681 |
4682 | if (comp_meth == COMP_NONE0 ||
4683 | comp_meth == COMP_MODULATION4 ||
4684 | comp_meth == MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8) {
4685 |
4686 | /* Not even creating a subtree for udCompMeth 0, 4, 8 */
4687 | return offset;
4688 | }
4689 |
4690 | /* Subtree */
4691 | unsigned start_offset = offset;
4692 | proto_item *udcompparam_ti = proto_tree_add_string_format(tree, hf_oran_udCompParam,
4693 | tvb, offset, 1, "",
4694 | (for_sinr) ? "sinrCompParam" : "udCompParam");
4695 | proto_tree *udcompparam_tree = proto_item_add_subtree(udcompparam_ti, ett_oran_udcompparam);
4696 |
4697 | /* Show comp_meth as a generated field */
4698 | proto_item *meth_ti = proto_tree_add_uint(udcompparam_tree, hf_oran_udCompHdrMeth_pref, tvb, 0, 0, comp_meth);
4699 | proto_item_set_generated(meth_ti);
4700 |
4701 | uint32_t param_exponent;
4702 | uint64_t param_sresmask;
4703 |
4704 | static int * const sres_mask_flags[] = {
4705 | &hf_oran_sReSMask_re12,
4706 | &hf_oran_sReSMask_re11,
4707 | &hf_oran_sReSMask_re10,
4708 | &hf_oran_sReSMask_re9,
4709 | &hf_oran_sReSMask_re8,
4710 | &hf_oran_sReSMask_re7,
4711 | &hf_oran_sReSMask_re6,
4712 | &hf_oran_sReSMask_re5,
4713 | &hf_oran_sReSMask_re4,
4714 | &hf_oran_sReSMask_re3,
4715 | &hf_oran_sReSMask_re2,
4716 | &hf_oran_sReSMask_re1,
4717 | NULL((void*)0)
4718 | };
4719 |
4720 | switch (comp_meth) {
4721 | case COMP_BLOCK_FP1: /* 1 */
4722 | case BFP_AND_SELECTIVE_RE_WITH_MASKS7: /* 7 */
4723 | /* reserved (4 bits) */
4724 | proto_tree_add_item(udcompparam_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_NA0x00000000);
4725 | /* exponent (4 bits) */
4726 | proto_tree_add_item_ret_uint(udcompparam_tree, hf_oran_exponent,
4727 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &param_exponent);
4728 | *exponent = param_exponent;
4729 | proto_item_append_text(udcompparam_ti, " (Exponent=%u)", param_exponent);
4730 | offset += 1;
4731 | break;
4732 |
4733 | case COMP_BLOCK_SCALE2: /* 2 */
4734 | /* Separate into integer and fractional bits? */
4735 | proto_tree_add_item(udcompparam_tree, hf_oran_blockScaler,
4736 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4737 | offset++;
4738 | break;
4739 |
4740 | case COMP_U_LAW3: /* 3 */
4741 | /* compBitWidth, compShift */
4742 | proto_tree_add_item(udcompparam_tree, hf_oran_compBitWidth,
4743 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4744 | proto_tree_add_item(udcompparam_tree, hf_oran_compShift,
4745 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4746 | offset += 1;
4747 | break;
4748 |
4749 | case BFP_AND_SELECTIVE_RE5: /* 5 */
4750 | {
4751 | /* sReSMask (exponent in middle!) */
4752 | proto_item *sresmask_ti;
4753 | sresmask_ti = proto_tree_add_bitmask_ret_uint64(udcompparam_tree, tvb, offset,
4754 | hf_oran_sReSMask,
4755 | ett_oran_sresmask,
4756 | sres_mask_flags,
4757 | ENC_NA0x00000000,
4758 | &param_sresmask);
4759 |
4760 | /* Get rid of exponent-shaped gap */
4761 | param_sresmask = ((param_sresmask >> 4) & 0x0f00) | (param_sresmask & 0xff);
4762 | unsigned res = 0;
4763 | for (unsigned n=0; n < 12; n++) {
4764 | if ((param_sresmask >> n) & 0x1) {
4765 | res++;
4766 | }
4767 | }
4768 | proto_item_append_text(sresmask_ti, " (%2u REs)", res);
4769 |
4770 | /* exponent */
4771 | proto_tree_add_item_ret_uint(udcompparam_tree, hf_oran_exponent,
4772 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &param_exponent);
4773 | *sReSMask = (uint16_t)param_sresmask;
4774 | *exponent = param_exponent;
4775 |
4776 | proto_item_append_text(udcompparam_ti, " (exponent=%u, %u REs)", *exponent, res);
4777 | offset += 2;
4778 | break;
4779 | }
4780 |
4781 | case MOD_COMPR_AND_SELECTIVE_RE6: /* 6 */
4782 | {
4783 | /* sReSMask (exponent in middle!) */
4784 | proto_item *sresmask_ti;
4785 |
4786 | sresmask_ti = proto_tree_add_bitmask_ret_uint64(udcompparam_tree, tvb, offset,
4787 | hf_oran_sReSMask,
4788 | ett_oran_sresmask,
4789 | sres_mask_flags,
4790 | ENC_NA0x00000000,
4791 | &param_sresmask);
4792 |
4793 | /* Get rid of reserved-shaped gap */
4794 | param_sresmask = ((param_sresmask >> 4) & 0x0f00) | (param_sresmask & 0xff);
4795 | unsigned res = 0;
4796 | for (unsigned n=0; n < 12; n++) {
4797 | if ((param_sresmask >> n) & 0x1) {
4798 | res++;
4799 | }
4800 | }
4801 | proto_item_append_text(sresmask_ti, " (%u REs)", res);
4802 |
4803 | /* reserved (4 bits) */
4804 | proto_tree_add_item(udcompparam_tree, hf_oran_reserved_last_4bits,
4805 | tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4806 | *sReSMask = (uint16_t)param_sresmask;
4807 |
4808 | proto_item_append_text(udcompparam_ti, " (%u REs)", res);
4809 | offset += 2;
4810 | break;
4811 | }
4812 |
4813 | default:
4814 | /* reserved (set to all zeros), but how many bytes?? */
4815 | break;
4816 | }
4817 |
4818 | proto_item_set_len(udcompparam_ti, offset-start_offset);
4819 | return offset;
4820 | }
4821 |
4822 |
4823 | /* Dissect ciCompHdr (channel information compression header, 7.5.2.15) */
4824 | /* bit_width and comp_meth are out params */
4825 | static int dissect_cicomphdr(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree, unsigned offset,
4826 | unsigned *bit_width, unsigned *comp_meth, uint8_t *comp_opt)
4827 | {
4828 | /* Subtree */
4829 | proto_item *cicomphdr_ti = proto_tree_add_string_format(tree, hf_oran_ciCompHdr,
4830 | tvb, offset, 1, "",
4831 | "ciCompHdr");
4832 | proto_tree *cicomphdr_tree = proto_item_add_subtree(cicomphdr_ti, ett_oran_cicomphdr);
4833 |
4834 | /* ciIqWidth */
4835 | uint32_t hdr_iq_width;
4836 | proto_item *iq_width_item = proto_tree_add_item_ret_uint(cicomphdr_tree, hf_oran_ciCompHdrIqWidth , tvb, offset, 1, ENC_NA0x00000000, &hdr_iq_width);
4837 | hdr_iq_width = (hdr_iq_width) ? hdr_iq_width : 16;
4838 | if (bit_width) {
4839 | *bit_width = hdr_iq_width;
4840 | }
4841 | proto_item_append_text(iq_width_item, " (%u bits)", hdr_iq_width);
4842 |
4843 | /* ciCompMeth */
4844 | uint32_t ci_comp_meth;
4845 | proto_tree_add_item_ret_uint(cicomphdr_tree, hf_oran_ciCompHdrMeth, tvb, offset, 1, ENC_NA0x00000000, &ci_comp_meth);
4846 | if (comp_meth) {
4847 | *comp_meth = ci_comp_meth;
4848 | }
4849 |
4850 | /* ciCompOpt */
4851 | uint32_t opt;
4852 | proto_tree_add_item_ret_uint(cicomphdr_tree, hf_oran_ciCompOpt, tvb, offset, 1, ENC_NA0x00000000, &opt);
4853 | *comp_opt = opt;
4854 | offset += 1;
4855 |
4856 | /* Summary */
4857 | proto_item_append_text(cicomphdr_ti, " (IqWidth=%u, ciCompMeth=%s, ciCompOpt=%s)",
4858 | hdr_iq_width,
4859 | rval_to_str_const(ci_comp_meth, ud_comp_header_meth, "Unknown"),
4860 | (*comp_opt) ? "compression per PRB" : "compression per UE");
4861 | return offset;
4862 | }
4863 |
4864 | static void dissect_payload_version(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, unsigned offset)
4865 | {
4866 | unsigned version;
4867 | proto_item *ti = proto_tree_add_item_ret_uint(tree, hf_oran_payload_version, tvb, offset, 1, ENC_NA0x00000000, &version);
4868 | if (version != 1) {
4869 | expert_add_info_format(pinfo, ti, &ei_oran_version_unsupported,
4870 | "PayloadVersion %u not supported by dissector (only 1 is known)",
4871 | version);
4872 | /* TODO: should throw an exception? */
4873 | }
4874 | }
4875 |
4876 | static void show_link_to_acknack_request(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
4877 | ack_nack_request_t *request)
4878 | {
4879 | /* Request frame */
4880 | proto_item *ti = proto_tree_add_uint(tree, hf_oran_acknack_request_frame,
4881 | tvb, 0, 0, request->request_frame_number);
4882 | PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
4883 |
4884 | /* Work out gap between frames (in ms) */
4885 | int seconds_between_packets = (int)
4886 | (pinfo->abs_ts.secs - request->request_frame_time.secs);
4887 | int nseconds_between_packets =
4888 | pinfo->abs_ts.nsecs - request->request_frame_time.nsecs;
4889 |
4890 | int total_gap = (seconds_between_packets*1000) +
4891 | ((nseconds_between_packets+500000) / 1000000);
4892 |
4893 | ti = proto_tree_add_uint(tree, hf_oran_acknack_request_time,
4894 | tvb, 0, 0, total_gap);
4895 | PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
4896 |
4897 | /* Type of request */
4898 | ti = proto_tree_add_uint(tree, hf_oran_acknack_request_type,
4899 | tvb, 0, 0, request->requestType);
4900 | PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
4901 | }
4902 |
4903 | static void show_link_to_acknack_response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
4904 | ack_nack_request_t *response)
4905 | {
4906 | if (response->response_frame_number == 0) {
4907 | /* Requests may not get a response, and can't always tell when to expect one */
4908 | return;
4909 | }
4910 |
4911 | /* Response frame */
4912 | proto_item *ti = proto_tree_add_uint(tree, hf_oran_acknack_response_frame,
4913 | tvb, 0, 0, response->response_frame_number);
4914 | PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
4915 |
4916 | /* Work out gap between frames (in ms) */
4917 | int seconds_between_packets = (int)
4918 | (response->response_frame_time.secs - pinfo->abs_ts.secs);
4919 | int nseconds_between_packets =
4920 | response->response_frame_time.nsecs - pinfo->abs_ts.nsecs;
4921 |
4922 | int total_gap = (seconds_between_packets*1000) +
4923 | ((nseconds_between_packets+500000) / 1000000);
4924 |
4925 | ti = proto_tree_add_uint(tree, hf_oran_acknack_response_time,
4926 | tvb, 0, 0, total_gap);
4927 | PROTO_ITEM_SET_GENERATED(ti)proto_item_set_generated((ti));
4928 | }
4929 |
4930 |
4931 |
4932 | /* Control plane dissector (section 7). */
4933 | static int dissect_oran_c(tvbuff_t *tvb, packet_info *pinfo,
4934 | proto_tree *tree, oran_tap_info *tap_info, void *data _U___attribute__((unused)))
4935 | {
4936 | /* Hidden filter for plane */
4937 | proto_item *plane_ti = proto_tree_add_item(tree, hf_oran_cplane, tvb, 0, 0, ENC_NA0x00000000);
4938 | PROTO_ITEM_SET_HIDDEN(plane_ti)proto_item_set_hidden((plane_ti));
4939 |
4940 | /* Set up structures needed to add the protocol subtree and manage it */
4941 | unsigned offset = 0;
4942 |
4943 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "O-RAN-FH-C");
4944 | col_set_str(pinfo->cinfo, COL_INFO, "C-Plane");
4945 |
4946 | tap_info->userplane = false0;
4947 |
4948 | /* Create display subtree for the protocol */
4949 | proto_item *protocol_item = proto_tree_add_item(tree, proto_oran, tvb, 0, -1, ENC_NA0x00000000);
4950 | proto_item_append_text(protocol_item, "-C");
4951 | proto_tree *oran_tree = proto_item_add_subtree(protocol_item, ett_oran);
4952 |
4953 | /* ecpriRtcid (eAxC ID) */
4954 | uint16_t eAxC;
4955 | addPcOrRtcid(tvb, oran_tree, &offset, hf_oran_ecpri_rtcid, &eAxC);
4956 | tap_info->eaxc = eAxC;
4957 |
4958 | /* Look up any existing conversation state for eAxC+plane */
4959 | uint32_t key = make_flow_key(pinfo, eAxC, ORAN_C_PLANE0, false0);
4960 | flow_state_t* state = (flow_state_t*)wmem_tree_lookup32(flow_states_table, key);
4961 |
4962 | /* Message identifier */
4963 | uint8_t seq_id;
4964 | proto_item *seq_id_ti;
4965 | offset = addSeqid(tvb, oran_tree, offset, ORAN_C_PLANE0, &seq_id, &seq_id_ti, pinfo);
4966 |
4967 | /* Section common subtree */
4968 | int section_tree_offset = offset;
4969 | proto_item *sectionHeading = proto_tree_add_string_format(oran_tree, hf_oran_c_section_common,
4970 | tvb, offset, 0, "", "C-Plane Section Type ");
4971 | proto_tree *section_tree = proto_item_add_subtree(sectionHeading, ett_oran_c_section_common);
4972 |
4973 | /* Peek ahead at the section type */
4974 | uint32_t sectionType = 0;
4975 | sectionType = tvb_get_uint8(tvb, offset+5);
4976 |
4977 | uint32_t scs = 0;
4978 | proto_item *scs_ti = NULL((void*)0);
4979 |
4980 | /* dataDirection */
4981 | uint32_t direction = 0;
4982 | proto_item *datadir_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_data_direction, tvb, offset, 1, ENC_NA0x00000000, &direction);
4983 | tap_info->uplink = (direction==0);
4984 |
4985 | /* Update/report status of conversation */
4986 | if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
4987 |
4988 | if (state == NULL((void*)0)) {
4989 | /* Allocate new state */
4990 | state = wmem_new0(wmem_file_scope(), flow_state_t)((flow_state_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_state_t )));
4991 | state->ack_nack_requests = wmem_tree_new(wmem_epan_scope());
4992 | wmem_tree_insert32(flow_states_table, key, state);
4993 | }
4994 |
4995 | /* Check sequence analysis status */
4996 | if (state->last_frame_seen[direction] && (seq_id != state->next_expected_sequence_number[direction])) {
4997 | /* Store this result */
4998 | flow_result_t *result = wmem_new0(wmem_file_scope(), flow_result_t)((flow_result_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_result_t )));
4999 | result->unexpected_seq_number = true1;
5000 | result->expected_sequence_number = state->next_expected_sequence_number[direction];
5001 | result->previous_frame = state->last_frame[direction];
5002 | wmem_tree_insert32(flow_results_table, pinfo->num, result);
5003 | }
5004 | /* Update conversation info */
5005 | state->last_frame[direction] = pinfo->num;
5006 | state->last_frame_seen[direction] = true1;
5007 | state->next_expected_sequence_number[direction] = (seq_id+1) % 256;
5008 | }
5009 |
5010 | /* Show any issues associated with this frame number */
5011 | flow_result_t *result = wmem_tree_lookup32(flow_results_table, pinfo->num);
5012 | if (result!=NULL((void*)0) && result->unexpected_seq_number) {
5013 | expert_add_info_format(pinfo, seq_id_ti,
5014 | (direction == DIR_UPLINK0) ?
5015 | &ei_oran_cplane_unexpected_sequence_number_ul :
5016 | &ei_oran_cplane_unexpected_sequence_number_dl,
5017 | "Sequence number %u expected, but got %u",
5018 | result->expected_sequence_number, seq_id);
5019 |
5020 | /* Update tap info */
5021 | uint32_t missing_sns = (256 + seq_id - result->expected_sequence_number) % 256;
5022 | /* Don't get confused by being slightly out of order.. */
5023 | if (missing_sns < 128) {
5024 | tap_info->missing_sns = missing_sns;
5025 | }
5026 | else {
5027 | tap_info->missing_sns = 0;
5028 | }
5029 |
5030 | /* TODO: could add previous/next frames (in seqId tree?) ? */
5031 | }
5032 |
5033 | /* payloadVersion */
5034 | dissect_payload_version(section_tree, tvb, pinfo, offset);
5035 |
5036 | /* filterIndex */
5037 | if (sectionType == SEC_C_SLOT_CONTROL || sectionType == SEC_C_ACK_NACK_FEEDBACK) {
5038 | /* scs (for ST4 and ST8) */
5039 | scs_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_frameStructure_subcarrier_spacing, tvb, offset, 1, ENC_NA0x00000000, &scs);
5040 | }
5041 | else if (sectionType == SEC_C_RRM_MEAS_REPORTS || sectionType == SEC_C_REQUEST_RRM_MEAS) {
5042 | /* reserved (4 bits) */
5043 | proto_tree_add_item(section_tree, hf_oran_reserved_last_4bits, tvb, offset, 1, ENC_NA0x00000000);
5044 | }
5045 | else if (sectionType != SEC_C_LAA) {
5046 | /* filterIndex (most common case) */
5047 | proto_tree_add_item(section_tree, hf_oran_filter_index, tvb, offset, 1, ENC_NA0x00000000);
5048 | }
5049 | offset += 1;
5050 |
5051 | unsigned ref_a_offset = offset;
5052 | /* frameId */
5053 | uint32_t frameId = 0;
5054 | proto_tree_add_item_ret_uint(section_tree, hf_oran_frame_id, tvb, offset, 1, ENC_NA0x00000000, &frameId);
5055 | tap_info->frame = frameId;
5056 | offset += 1;
5057 |
5058 | /* subframeId */
5059 | uint32_t subframeId = 0;
5060 | proto_tree_add_item_ret_uint(section_tree, hf_oran_subframe_id, tvb, offset, 1, ENC_NA0x00000000, &subframeId);
5061 | /* slotId */
5062 | uint32_t slotId = 0;
5063 | proto_tree_add_item_ret_uint(section_tree, hf_oran_slot_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &slotId);
5064 | tap_info->slot = slotId;
5065 | offset++;
5066 |
5067 | /* startSymbolId */
5068 | uint32_t startSymbolId = 0;
5069 | proto_item *ssid_ti = NULL((void*)0);
5070 | if ((sectionType == SEC_C_ACK_NACK_FEEDBACK) || /* Section Type 8 */
5071 | (sectionType == SEC_C_SINR_REPORTING)) { /* Section Type 9 */
5072 | /* symbolId */
5073 | proto_tree_add_item_ret_uint(section_tree, hf_oran_symbolId, tvb, offset, 1, ENC_NA0x00000000, &startSymbolId);
5074 | }
5075 | else if (sectionType != SEC_C_LAA) {
5076 | /* startSymbolId is in most section types */
5077 | ssid_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_start_symbol_id, tvb, offset, 1, ENC_NA0x00000000, &startSymbolId);
5078 | if (startSymbolId && (sectionType == SEC_C_RRM_MEAS_REPORTS)) { /* Section Type 10 */
5079 | proto_item_append_text(ssid_ti, " (should be 0 for ST10!)");
5080 | expert_add_info_format(pinfo, ssid_ti, &ei_oran_st10_startsymbolid_not_0,
5081 | "startSymbolId should be 0 for ST10 - found %u", startSymbolId);
5082 | }
5083 | }
5084 | else {
5085 | /* reserved (6 bits) */
5086 | proto_tree_add_item(section_tree, hf_oran_reserved_last_6bits, tvb, offset, 1, ENC_NA0x00000000);
5087 | }
5088 | offset++;
5089 |
5090 | char id[16];
5091 | snprintf(id, 16, "%d-%d-%d-%d", frameId, subframeId, slotId, startSymbolId);
5092 | proto_item *pi = proto_tree_add_string(section_tree, hf_oran_refa, tvb, ref_a_offset, 3, id);
5093 | proto_item_set_generated(pi);
5094 |
5095 | uint32_t cmd_scope = 0;
5096 | bool_Bool st8_ready = false0;
5097 |
5098 | /* numberOfSections (or whatever section has instead) */
5099 | uint32_t nSections = 0;
5100 | if (sectionType == SEC_C_SLOT_CONTROL) { /* Section Type 4 */
5101 | /* Slot Control has these fields instead */
5102 | /* reserved (4 bits) */
5103 | proto_tree_add_item(section_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_NA0x00000000);
5104 | /* cmdScope (4 bits) */
5105 | proto_tree_add_item_ret_uint(section_tree, hf_oran_cmd_scope, tvb, offset, 1, ENC_NA0x00000000, &cmd_scope);
5106 | }
5107 | else if (sectionType == SEC_C_ACK_NACK_FEEDBACK) { /* Section Type 8 */
5108 | /* reserved (7 bits) */
5109 | proto_tree_add_item(section_tree, hf_oran_reserved_7bits, tvb, offset, 1, ENC_NA0x00000000);
5110 | /* ready (1 bit) */
5111 | /* TODO: when set, ready in slotId+1.. */
5112 | proto_tree_add_item_ret_boolean(section_tree, hf_oran_ready, tvb, offset, 1, ENC_NA0x00000000, &st8_ready);
5113 | if (!st8_ready) {
5114 | /* SCS value is ignored, and may be set to any value by O-RU */
5115 | proto_item_append_text(scs_ti, " (ignored)");
5116 | }
5117 | }
5118 | else if (sectionType != SEC_C_LAA) {
5119 | /* numberOfSections */
5120 | proto_tree_add_item_ret_uint(section_tree, hf_oran_numberOfSections, tvb, offset, 1, ENC_NA0x00000000, &nSections);
5121 | }
5122 | else {
5123 | proto_tree_add_item(section_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_NA0x00000000);
5124 | }
5125 | offset++;
5126 |
5127 | /* sectionType */
5128 | proto_tree_add_item_ret_uint(section_tree, hf_oran_sectionType, tvb, offset, 1, ENC_NA0x00000000, &sectionType);
5129 | offset += 1;
5130 |
5131 | /* Check that dataDirection is consistent with section type */
5132 | if (sectionType == SEC_C_SINR_REPORTING && direction != 0) { /* Section Type 9 */
5133 | expert_add_info(pinfo, datadir_ti, &ei_oran_st9_not_ul);
5134 | }
5135 | if (sectionType == SEC_C_RRM_MEAS_REPORTS && direction != 0) { /* Section Type 10 */
5136 | expert_add_info(pinfo, datadir_ti, &ei_oran_st10_not_ul);
5137 | }
5138 |
5139 | /* Note this section type in stats */
5140 | if (sectionType < SEC_C_MAX_INDEX) {
5141 | tap_info->section_types[sectionType] = true1;
5142 | }
5143 |
5144 | /* Section-type-specific fields following common header (white entries in Section Type diagrams) */
5145 | unsigned bit_width = 0;
5146 | int comp_meth = 0;
5147 | proto_item *comp_meth_ti;
5148 | unsigned ci_comp_method = 0;
5149 | uint8_t ci_comp_opt = 0;
5150 |
5151 | uint32_t num_ues = 0;
5152 | uint32_t number_of_acks = 0, number_of_nacks = 0;
5153 |
5154 | uint32_t num_sinr_per_prb = 0;
5155 |
5156 | switch (sectionType) {
5157 | case SEC_C_UNUSED_RB: /* Section Type 0 */
5158 | /* timeOffset */
5159 | proto_tree_add_item(section_tree, hf_oran_timeOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5160 | offset += 2;
5161 | /* frameStructure */
5162 | offset = dissect_frame_structure(section_tree, tvb, offset,
5163 | subframeId, slotId);
5164 |
5165 | /* cpLength */
5166 | proto_tree_add_item(section_tree, hf_oran_cpLength, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5167 | offset += 2;
5168 | /* reserved */
5169 | proto_tree_add_item(section_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_NA0x00000000);
5170 | offset += 1;
5171 | break;
5172 |
5173 | case SEC_C_NORMAL: /* Section Type 1 */
5174 | case SEC_C_UE_SCHED: /* Section Type 5 */
5175 | /* udCompHdr */
5176 | offset = dissect_udcomphdr(tvb, pinfo, section_tree, offset,
5177 | (direction==1), /* ignore for DL */
5178 | &bit_width, &comp_meth, &comp_meth_ti);
5179 | /* reserved */
5180 | proto_tree_add_item(section_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_NA0x00000000);
5181 | offset += 1;
5182 | break;
5183 |
5184 | case SEC_C_SLOT_CONTROL: /* Section Type 4 */
5185 | break;
5186 |
5187 | case SEC_C_PRACH: /* Section Type 3 */
5188 | /* timeOffset */
5189 | proto_tree_add_item(section_tree, hf_oran_timeOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5190 | offset += 2;
5191 | /* frameStructure */
5192 | offset = dissect_frame_structure(section_tree, tvb, offset,
5193 | subframeId, slotId);
5194 | /* cpLength */
5195 | proto_tree_add_item(section_tree, hf_oran_cpLength, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5196 | offset += 2;
5197 | /* udCompHdr */
5198 | offset = dissect_udcomphdr(tvb, pinfo, section_tree, offset,
5199 | (direction==1), /* ignore for DL */
5200 | &bit_width, &comp_meth, &comp_meth_ti);
5201 | break;
5202 |
5203 | case SEC_C_CH_INFO: /* Section Type 6 */
5204 | /* numberOfUEs */
5205 | proto_tree_add_item_ret_uint(section_tree, hf_oran_numberOfUEs, tvb, offset, 1, ENC_NA0x00000000, &num_ues);
5206 | offset += 1;
5207 | /* ciCompHdr (was reserved) */
5208 | offset = dissect_cicomphdr(tvb, pinfo, section_tree, offset, &bit_width, &ci_comp_method, &ci_comp_opt);
5209 |
5210 | /* Number of sections may not be filled in (at all, or correctly), so set to the number of UEs.
5211 | The data entries are per-UE... they don't have a sectionID, but they could have section extensions... */
5212 | if (nSections == 0 || num_ues > nSections) {
5213 | nSections = num_ues;
5214 | }
5215 | break;
5216 |
5217 | case SEC_C_RSVD2:
5218 | break;
5219 |
5220 | case SEC_C_LAA: /* Section Type 7 */
5221 | proto_tree_add_item(section_tree, hf_oran_reserved_16bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5222 | offset += 2;
5223 | break;
5224 |
5225 | case SEC_C_ACK_NACK_FEEDBACK: /* Section Type 8 */
5226 | /* numberOfAcks (1 byte) */
5227 | proto_tree_add_item_ret_uint(section_tree, hf_oran_number_of_acks, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &number_of_acks);
5228 | offset += 1;
5229 | /* numberOfNacks (1 byte) */
5230 | proto_tree_add_item_ret_uint(section_tree, hf_oran_number_of_nacks, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &number_of_nacks);
5231 | offset += 1;
5232 |
5233 | /* Show ACKs and NACKs. For both, try to link back to request. */
5234 | for (unsigned int n=1; n <= number_of_acks; n++) {
5235 | uint32_t ackid;
5236 | proto_item *ack_ti;
5237 | ack_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_ackid, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ackid);
5238 | offset += 2;
5239 |
5240 | /* Look up request table in state (which really should be set by now, but test anyway). */
5241 | if (state && state->ack_nack_requests) {
5242 | ack_nack_request_t *request = wmem_tree_lookup32(state->ack_nack_requests, ackid);
5243 | if (request != NULL((void*)0)) {
5244 | /* On first pass, update with this response */
5245 | if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
5246 | request->response_frame_number = pinfo->num;
5247 | request->response_frame_time = pinfo->abs_ts;
5248 | }
5249 |
5250 | /* Show request details */
5251 | show_link_to_acknack_request(section_tree, tvb, pinfo, request);
5252 | }
5253 | else {
5254 | /* Request not found */
5255 | expert_add_info_format(pinfo, ack_ti, &ei_oran_acknack_no_request,
5256 | "Response for ackId=%u received, but no request found",
5257 | ackid);
5258 | }
5259 | }
5260 | }
5261 | for (unsigned int m=1; m <= number_of_nacks; m++) {
5262 | uint32_t nackid;
5263 | proto_item *nack_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_nackid, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &nackid);
5264 | offset += 2;
5265 |
5266 | expert_add_info_format(pinfo, nack_ti, &ei_oran_st8_nackid,
5267 | "Received Nack for ackNackId=%u",
5268 | nackid);
5269 |
5270 | /* Look up request table in state. */
5271 | if (state && state->ack_nack_requests) {
5272 | ack_nack_request_t *request = wmem_tree_lookup32(state->ack_nack_requests, nackid);
5273 | if (request) {
5274 | /* On first pass, update with this response */
5275 | if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
5276 | request->response_frame_number = pinfo->num;
5277 | request->response_frame_time = pinfo->abs_ts;
5278 | }
5279 |
5280 | /* Show request details */
5281 | show_link_to_acknack_request(section_tree, tvb, pinfo, request);
5282 | }
5283 | else {
5284 | /* Request not found */
5285 | expert_add_info_format(pinfo, nack_ti, &ei_oran_acknack_no_request,
5286 | "Response for nackId=%u received, but no request found",
5287 | nackid);
5288 | }
5289 | }
5290 | }
5291 | break;
5292 |
5293 | case SEC_C_SINR_REPORTING: /* Section Type 9 */
5294 | {
5295 | /* numSinrPerPrb (3 bits) */
5296 | proto_item *nspp_ti;
5297 | nspp_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_num_sinr_per_prb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_sinr_per_prb);
5298 | switch (num_sinr_per_prb) {
5299 | case 0:
5300 | num_sinr_per_prb = 1; break;
5301 | case 1:
5302 | num_sinr_per_prb = 2; break;
5303 | case 2:
5304 | num_sinr_per_prb = 3; break;
5305 | case 3:
5306 | num_sinr_per_prb = 4; break;
5307 | case 4:
5308 | num_sinr_per_prb = 6; break;
5309 | case 5:
5310 | num_sinr_per_prb = 12; break;
5311 |
5312 | default:
5313 | proto_item_append_text(nspp_ti, " (invalid)");
5314 | num_sinr_per_prb = 1;
5315 | expert_add_info_format(pinfo, nspp_ti, &ei_oran_num_sinr_per_prb_unknown,
5316 | "Invalid numSinrPerPrb value (%u)",
5317 | num_sinr_per_prb);
5318 | }
5319 |
5320 | /* reserved (13 bits) */
5321 | proto_tree_add_item(section_tree, hf_oran_reserved_last_5bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5322 | offset += 1;
5323 | proto_tree_add_item(section_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5324 | offset += 1;
5325 | break;
5326 | }
5327 |
5328 | case SEC_C_RRM_MEAS_REPORTS: /* Section Type 10 */
5329 | case SEC_C_REQUEST_RRM_MEAS: /* Section Type 11 */
5330 | /* reserved (16 bits) */
5331 | proto_tree_add_item(section_tree, hf_oran_reserved_16bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5332 | offset += 2;
5333 | break;
5334 | };
5335 |
5336 | /* Update udCompHdr details in state for UL U-Plane */
5337 | if (state && direction==0) {
5338 | switch (sectionType) {
5339 | case SEC_C_NORMAL: /* Section Type 1 */
5340 | case SEC_C_PRACH: /* Section Type 3 */
5341 | case SEC_C_UE_SCHED: /* Section Type 5 */
5342 | state->ul_ud_comp_hdr_set = true1;
5343 | state->ul_ud_comp_hdr_bit_width = bit_width;
5344 | state->ul_ud_comp_hdr_compression = comp_meth;
5345 | state->ul_ud_comp_hdr_frame = pinfo->num;
5346 | break;
5347 | default:
5348 | break;
5349 | }
5350 | }
5351 |
5352 |
5353 | proto_item_append_text(sectionHeading, "%d, %s, frameId: %d, subframeId: %d, slotId: %d, startSymbolId: %d",
5354 | sectionType, val_to_str_const(direction, data_direction_vals, "Unknown"),
5355 | frameId, subframeId, slotId, startSymbolId);
5356 | if (nSections) {
5357 | proto_item_append_text(sectionHeading, ", numberOfSections=%u", nSections);
5358 | }
5359 |
5360 | write_pdu_label_and_info(protocol_item, NULL((void*)0), pinfo, ", Type: %2d %s", sectionType,
5361 | rval_to_str_const(sectionType, section_types_short, "Unknown"));
5362 |
5363 | /* Set actual length of C-Plane section header */
5364 | proto_item_set_len(section_tree, offset - section_tree_offset);
5365 |
5366 | if (sectionType == SEC_C_ACK_NACK_FEEDBACK) {
5367 | write_pdu_label_and_info(oran_tree, section_tree, pinfo,
5368 | (st8_ready) ? " (Ready)" : " (ACK)");
5369 | }
5370 |
5371 |
5372 | /* Section type 4 doesn't have normal sections, so deal with here before normal sections */
5373 | if (sectionType == SEC_C_SLOT_CONTROL) {
5374 | /* numberOfST4Cmds */
5375 | uint32_t no_st4_cmds, st4_cmd_len, num_slots, ack_nack_req_id, st4_cmd_type;
5376 | proto_item *no_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_number_of_st4_cmds,
5377 | tvb, offset, 1, ENC_NA0x00000000, &no_st4_cmds);
5378 | if (no_st4_cmds == 0) {
5379 | expert_add_info_format(pinfo, no_ti, &ei_oran_st4_no_cmds,
5380 | "Not valid for ST4 to carry no commands");
5381 | }
5382 | offset += 1;
5383 |
5384 | /* reserved (1 byte) */
5385 | proto_tree_add_item(section_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5386 | offset += 1;
5387 |
5388 | /* Loop over commands. Each has 8-byte common header, followed by cmd-specific payload */
5389 | proto_item *len_ti;
5390 | for (uint32_t n=0; n < no_st4_cmds; n++) {
5391 | /* Table 7.4.6-2: Section Type 4 Command common header format */
5392 | proto_item *hdr_ti = proto_tree_add_string_format(section_tree, hf_oran_st4_cmd_header,
5393 | tvb, offset, 8, "",
5394 | "Type 4 Command common header");
5395 | proto_tree *hdr_tree = proto_item_add_subtree(hdr_ti, ett_oran_st4_cmd_header);
5396 |
5397 | /* st4CmdType */
5398 | proto_tree_add_item_ret_uint(hdr_tree, hf_oran_st4_cmd_type, tvb, offset, 1, ENC_NA0x00000000, &st4_cmd_type);
5399 | offset += 1;
5400 |
5401 | /* st4CmdLen */
5402 | len_ti = proto_tree_add_item_ret_uint(hdr_tree, hf_oran_st4_cmd_len, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &st4_cmd_len);
5403 | if (st4_cmd_len == 0) {
5404 | /* Meaning of 0 not yet defined (v15.00) */
5405 | proto_item_append_text(len_ti, " (reserved)");
5406 | expert_add_info(pinfo, len_ti, &ei_oran_st4_zero_len_cmd);
5407 | }
5408 | else {
5409 | proto_item_append_text(len_ti, " (%u bytes)", st4_cmd_len*4);
5410 | }
5411 | offset += 2;
5412 |
5413 | /* numSlots */
5414 | 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);
5415 | if (num_slots == 0) {
5416 | proto_item_append_text(slots_ti, " (until changed)");
5417 | }
5418 | offset += 1;
5419 |
5420 | /* ackNackReqId */
5421 | proto_item *ack_nack_req_id_ti;
5422 | ack_nack_req_id_ti = proto_tree_add_item_ret_uint(hdr_tree, hf_oran_st4_cmd_ack_nack_req_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ack_nack_req_id);
5423 | offset += 2;
5424 | if (ack_nack_req_id == 0) {
5425 | proto_item_append_text(ack_nack_req_id_ti, " (no Section type 8 response expected)");
5426 | }
5427 |
5428 | /* reserved (16 bits) */
5429 | proto_tree_add_item(hdr_tree, hf_oran_reserved_16bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5430 | offset += 2;
5431 |
5432 | /* Set common header summary */
5433 | proto_item_append_text(hdr_ti, " (cmd=%s, len=%u, slots=%u, ackNackReqId=%u)",
5434 | rval_to_str_const(st4_cmd_type, st4_cmd_type_vals, "Unknown"),
5435 | st4_cmd_len, num_slots, ack_nack_req_id);
5436 |
5437 | col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
5438 | rval_to_str_const(st4_cmd_type, st4_cmd_type_vals, "Unknown"));
5439 |
5440 |
5441 | /* Subtree for this command body */
5442 | proto_item *command_ti = proto_tree_add_string_format(section_tree, hf_oran_st4_cmd,
5443 | tvb, offset, 0, "",
5444 | "Type 4 Command (%s)", rval_to_str_const(st4_cmd_type, st4_cmd_type_vals, "Unknown"));
5445 | proto_tree *command_tree = proto_item_add_subtree(command_ti, ett_oran_st4_cmd);
5446 |
5447 | unsigned command_start_offset = offset;
5448 |
5449 | /* Check fields compatible with chosen command. */
5450 | if (st4_cmd_type==1) {
5451 | if (num_slots != 0) {
5452 | /* "the value of numSlots should be set to zero for this command type" */
5453 | expert_add_info_format(pinfo, slots_ti, &ei_oran_numslots_not_zero,
5454 | "numSlots should be zero for ST4 command 1 - found %u",
5455 | num_slots);
5456 | }
5457 | }
5458 |
5459 | if (st4_cmd_type==3 || st4_cmd_type==4) {
5460 | if (startSymbolId != 0) {
5461 | /* "expected reception window for the commands is the symbol zero reception window" */
5462 | expert_add_info_format(pinfo, ssid_ti, &ei_oran_start_symbol_id_not_zero,
5463 | "startSymbolId should be zero for ST4 commands 3&4 - found %u",
5464 | startSymbolId);
5465 | }
5466 | }
5467 |
5468 | /* Add format for this command */
5469 | switch (st4_cmd_type) {
5470 | case 1: /* TIME_DOMAIN_BEAM_CONFIG */
5471 | {
5472 | bool_Bool disable_tdbfns;
5473 | uint32_t bfwcomphdr_iq_width, bfwcomphdr_comp_meth;
5474 |
5475 | /* Hidden filter for bf */
5476 | proto_item *bf_ti = proto_tree_add_item(command_tree, hf_oran_bf, tvb, 0, 0, ENC_NA0x00000000);
5477 | PROTO_ITEM_SET_HIDDEN(bf_ti)proto_item_set_hidden((bf_ti));
5478 |
5479 | /* reserved (2 bits) */
5480 | proto_tree_add_item(command_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5481 | /* symbolMask (14 bits) */
5482 | uint32_t symbol_mask;
5483 | proto_item *symbol_mask_ti;
5484 | offset = dissect_symbolmask(tvb, command_tree, offset, &symbol_mask, &symbol_mask_ti);
5485 | /* 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 */
5486 | /* lsb is symbol 0 */
5487 | for (unsigned s=0; s < 14; s++) {
5488 | if ((startSymbolId & (1 << s)) && (startSymbolId > s)) {
5489 | proto_item_append_text(symbol_mask_ti, " (startSymbolId is %u, so some lower symbol bits ignored!)", startSymbolId);
5490 | expert_add_info(pinfo, symbol_mask_ti, &ei_oran_start_symbol_id_bits_ignored);
5491 | break;
5492 | }
5493 | }
5494 |
5495 | /* disableTDBFNs (1 bit) */
5496 | proto_tree_add_item_ret_boolean(command_tree, hf_oran_disable_tdbfns, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &disable_tdbfns);
5497 |
5498 | /* tdBeamNum (15 bits) */
5499 | proto_tree_add_item(command_tree, hf_oran_td_beam_num, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5500 | offset += 2;
5501 |
5502 | /* bfwCompHdr (2 subheaders - bfwIqWidth and bfwCompMeth)*/
5503 | offset = dissect_bfwCompHdr(tvb, command_tree, offset,
5504 | &bfwcomphdr_iq_width, &bfwcomphdr_comp_meth, &comp_meth_ti);
5505 | /* reserved (3 bytes) */
5506 | proto_tree_add_bits_item(command_tree, hf_oran_reserved, tvb, offset*8, 24, ENC_BIG_ENDIAN0x00000000);
5507 | offset += 3;
5508 |
5509 | if (disable_tdbfns) {
5510 | /* No beamnum information to show so get out. */
5511 | break;
5512 | }
5513 |
5514 | /* Read beam entries until reach end of command length */
5515 | while ((offset - command_start_offset) < (st4_cmd_len * 4)) {
5516 |
5517 | /* disableTDBFWs (1 bit) */
5518 | bool_Bool disable_tdbfws;
5519 | proto_tree_add_item_ret_boolean(command_tree, hf_oran_disable_tdbfws, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &disable_tdbfws);
5520 |
5521 | /* tdBeamNum (15 bits) */
5522 | proto_tree_add_item(command_tree, hf_oran_td_beam_num, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5523 | offset += 2;
5524 |
5525 | /* Showing BFWs? */
5526 | if (!disable_tdbfws) {
5527 |
5528 | /* bfwCompParam */
5529 | unsigned exponent = 0;
5530 | bool_Bool supported = false0;
5531 | unsigned num_trx_entries;
5532 | uint16_t *trx_entries;
5533 | offset = dissect_bfwCompParam(tvb, command_tree, pinfo, offset, comp_meth_ti,
5534 | &bfwcomphdr_comp_meth, &exponent, &supported,
5535 | &num_trx_entries, &trx_entries);
5536 |
5537 | /* Antenna count from preference */
5538 | unsigned num_trx = pref_num_bf_antennas;
5539 | int bit_offset = offset*8;
5540 |
5541 | for (unsigned trx=0; trx < num_trx; trx++) {
5542 | /* Create antenna subtree */
5543 | int bfw_offset = bit_offset / 8;
5544 | proto_item *bfw_ti = proto_tree_add_string_format(command_tree, hf_oran_bfw,
5545 | tvb, bfw_offset, 0, "", "TRX %3u: (", trx);
5546 | proto_tree *bfw_tree = proto_item_add_subtree(bfw_ti, ett_oran_bfw);
5547 |
5548 | /* I value */
5549 | /* Get bits, and convert to float. */
5550 | uint32_t bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
5551 | float value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent);
5552 | /* Add to tree. */
5553 | proto_tree_add_float(bfw_tree, hf_oran_bfw_i, tvb, bit_offset/8,
5554 | (bfwcomphdr_iq_width+7)/8, value);
5555 | bit_offset += bfwcomphdr_iq_width;
5556 | proto_item_append_text(bfw_ti, "I=%f ", value);
5557 |
5558 | /* Leave a gap between I and Q values */
5559 | proto_item_append_text(bfw_ti, " ");
5560 |
5561 | /* Q value */
5562 | /* Get bits, and convert to float. */
5563 | bits = tvb_get_bits32(tvb, bit_offset, bfwcomphdr_iq_width, ENC_BIG_ENDIAN0x00000000);
5564 | value = decompress_value(bits, bfwcomphdr_comp_meth, bfwcomphdr_iq_width, exponent);
5565 | /* Add to tree. */
5566 | proto_tree_add_float(bfw_tree, hf_oran_bfw_q, tvb, bit_offset/8,
5567 | (bfwcomphdr_iq_width+7)/8, value);
5568 | bit_offset += bfwcomphdr_iq_width;
5569 | proto_item_append_text(bfw_ti, "Q=%f", value);
5570 |
5571 | proto_item_append_text(bfw_ti, ")");
5572 | proto_item_set_len(bfw_ti, (bit_offset+7)/8 - bfw_offset);
5573 | }
5574 | /* Need to round to next byte */
5575 | offset = (bit_offset+7)/8;
5576 | }
5577 | }
5578 | break;
5579 | }
5580 | case 2: /* TDD_CONFIG_PATTERN */
5581 | /* reserved (2 bits) */
5582 | proto_tree_add_item(command_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5583 | /* dirPattern (14 bits) */
5584 | proto_tree_add_item(command_tree, hf_oran_dir_pattern, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5585 | offset += 2;
5586 |
5587 | /* reserved (2 bits) */
5588 | proto_tree_add_item(command_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5589 | /* guardPattern (14 bits) */
5590 | proto_tree_add_item(command_tree, hf_oran_guard_pattern, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5591 | offset += 2;
5592 | break;
5593 |
5594 | case 3: /* TRX_CONTROL */
5595 | {
5596 | /* Only allowed cmdScope is ARRAY-COMMAND */
5597 | if (cmd_scope != 0) {
5598 | expert_add_info(pinfo, command_tree, &ei_oran_trx_control_cmd_scope);
5599 | }
5600 |
5601 | /* reserved (2 bits) */
5602 | proto_tree_add_item(command_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5603 | /* log2MaskBits (4 bits) */
5604 | unsigned log2maskbits;
5605 | proto_tree_add_item_ret_uint(command_tree, hf_oran_log2maskbits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &log2maskbits);
5606 | /* sleepMode */
5607 | uint32_t sleep_mode;
5608 | proto_tree_add_item_ret_uint(command_tree, hf_oran_sleepmode_trx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &sleep_mode);
5609 | offset += 1;
5610 |
5611 | /* reserved (4 bits) */
5612 | proto_tree_add_item(command_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5613 | /* numSlotsExt (20 bits) */
5614 | uint32_t num_slots_ext;
5615 | 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);
5616 | if (num_slots==0 && num_slots_ext==0) {
5617 | proto_item_append_text(num_slots_ext_ti, " (undefined sleep period)");
5618 | }
5619 | else {
5620 | /* Time should be rounded up according to SCS */
5621 | float total = (float)(num_slots + num_slots_ext);
5622 | /* From table 7.5.2.13-3 */
5623 | float slot_length_by_scs[16] = { 1000, 500, 250, 125, 62.5, 31.25,
5624 | 0, 0, 0, 0, 0, 0, /* reserved */
5625 | 1000, 1000, 1000, 1000 };
5626 | float slot_length = slot_length_by_scs[scs];
5627 | /* Only using valid SCS. TODO: is this test ok? */
5628 | if (slot_length != 0) {
5629 | /* Round up to next slot */
5630 | total = ((int)(total / slot_length) + 1) * slot_length;
5631 | proto_item_append_text(num_slots_ext_ti, " (defined sleep period of %f us)", total);
5632 | }
5633 | }
5634 | offset += 3;
5635 |
5636 | /* reserved (2 bits) */
5637 | proto_tree_add_item(command_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5638 |
5639 | /* symbolMask (14 bits) */
5640 | uint32_t symbol_mask;
5641 | proto_item *sm_ti;
5642 | offset = dissect_symbolmask(tvb, command_tree, offset, &symbol_mask, &sm_ti);
5643 | if (symbol_mask == 0x0) {
5644 | proto_item_append_text(sm_ti, " (wake)");
5645 | col_append_str(pinfo->cinfo, COL_INFO, " (wake)");
5646 | }
5647 | else if (symbol_mask == 0x3fff) {
5648 | proto_item_append_text(sm_ti, " (sleep)");
5649 | col_append_str(pinfo->cinfo, COL_INFO, " (sleep)");
5650 | }
5651 | else {
5652 | expert_add_info_format(pinfo, sm_ti, &ei_oran_bad_symbolmask,
5653 | "For non-zero sleepMode (%u), symbolMask should be 0x0 or 0x3fff - found 0x%05x",
5654 | sleep_mode, symbol_mask);
5655 | }
5656 | offset += 2;
5657 |
5658 | /* antMask (16-2048 bits). Size is lookup from log2MaskBits enum.. */
5659 | unsigned antmask_length = 2;
5660 | if (log2maskbits >= 4) {
5661 | antmask_length = (1 << log2maskbits) / 8;
5662 | }
5663 | proto_item *ant_mask_ti = proto_tree_add_item(command_tree, hf_oran_antMask_trx_control, tvb, offset, antmask_length, ENC_NA0x00000000);
5664 | /* show count */
5665 | unsigned antenna_count = 0;
5666 | for (unsigned b=0; b < antmask_length; b++) {
5667 | uint8_t byte = tvb_get_uint8(tvb, offset+b);
5668 | for (unsigned bit=0; bit < 8; bit++) {
5669 | if ((1 << bit) & byte) {
5670 | antenna_count++;
5671 | }
5672 | }
5673 | }
5674 | proto_item_append_text(ant_mask_ti, " (%u antennas)", antenna_count);
5675 | offset += antmask_length;
5676 |
5677 | /* Pad to next 4-byte boundary */
5678 | offset = WS_ROUNDUP_4(offset)(((offset) + ((unsigned)(4U-1U))) & (~((unsigned)(4U-1U)) ));
5679 | break;
5680 | }
5681 |
5682 | case 4: /* ASM (advanced sleep mode) */
5683 | /* reserved (2+4=6 bits) */
5684 | proto_tree_add_item(command_tree, hf_oran_reserved_6bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5685 | /* sleepMode (2 bits) */
5686 | uint32_t sleep_mode;
5687 | proto_tree_add_item_ret_uint(command_tree, hf_oran_sleepmode_asm, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &sleep_mode);
5688 | offset += 1;
5689 |
5690 | /* reserved (4 bits) */
5691 | proto_tree_add_item(command_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5692 | /* numSlotsExt (20 bits) */
5693 | proto_tree_add_item(command_tree, hf_oran_num_slots_ext, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000);
5694 | offset += 3;
5695 |
5696 | /* reserved (2 bits) */
5697 | proto_tree_add_item(command_tree, hf_oran_reserved_2bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5698 | /* symbolMask (14 bits) */
5699 | uint32_t symbol_mask;
5700 | proto_item *sm_ti;
5701 | offset = dissect_symbolmask(tvb, command_tree, offset, &symbol_mask, &sm_ti);
5702 | if (symbol_mask == 0x0) {
5703 | proto_item_append_text(sm_ti, " (wake)");
5704 | col_append_str(pinfo->cinfo, COL_INFO, " (wake)");
5705 | }
5706 | else if (symbol_mask == 0x3fff) {
5707 | proto_item_append_text(sm_ti, " (sleep)");
5708 | col_append_str(pinfo->cinfo, COL_INFO, " (sleep)");
5709 | }
5710 | else {
5711 | expert_add_info_format(pinfo, sm_ti, &ei_oran_bad_symbolmask,
5712 | "For non-zero sleepMode (%u), symbolMask should be 0x0 or 0x3fff - found 0x%05x",
5713 | sleep_mode, symbol_mask);
5714 | }
5715 | offset += 2;
5716 |
5717 | /* reserved (2 bytes) */
5718 | proto_tree_add_item(command_tree, hf_oran_reserved_16bits, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5719 | offset += 2;
5720 | break;
5721 |
5722 | default:
5723 | /* Error! */
5724 | expert_add_info_format(pinfo, len_ti, &ei_oran_st4_unknown_cmd,
5725 | "Dissected ST4 command (%u) not recognised",
5726 | st4_cmd_type);
5727 | break;
5728 | }
5729 |
5730 | /* Check apparent size of padding (0-3 bytes ok) */
5731 | long padding_remaining = command_start_offset + (st4_cmd_len * 4) - offset;
5732 | if (padding_remaining < 0 || padding_remaining > 3) {
5733 | expert_add_info_format(pinfo, len_ti, &ei_oran_st4_wrong_len_cmd,
5734 | "Dissected ST4 command does not match signalled st4CmdLen - set to %u (%u bytes) but dissected %u bytes",
5735 | st4_cmd_len, st4_cmd_len*4, offset-command_start_offset);
5736 | }
5737 |
5738 | /* Advance by signalled length (needs to be aligned on 4-byte boundary) */
5739 | offset = command_start_offset + (st4_cmd_len * 4);
5740 |
5741 | /* Set end of command tree */
5742 | proto_item_set_end(command_ti, tvb, offset);
5743 |
5744 | if (ack_nack_req_id != 0 && state && state->ack_nack_requests) {
5745 | if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
5746 | /* Add this request into conversation state on first pass */
5747 | 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)));
5748 | request_details->request_frame_number = pinfo->num;
5749 | request_details->request_frame_time = pinfo->abs_ts;
5750 | request_details->requestType = ST4Cmd1+st4_cmd_type-1;
5751 |
5752 | wmem_tree_insert32(state->ack_nack_requests,
5753 | ack_nack_req_id,
5754 | request_details);
5755 | }
5756 | else {
5757 | /* On later passes, try to link forward to ST8 response */
5758 | ack_nack_request_t *response = wmem_tree_lookup32(state->ack_nack_requests,
5759 | ack_nack_req_id);
5760 | if (response) {
5761 | show_link_to_acknack_response(section_tree, tvb, pinfo, response);
5762 | }
5763 | }
5764 | }
5765 | }
5766 | }
5767 | /* LAA doesn't have sections either.. */
5768 | else if (sectionType == SEC_C_LAA) { /* Section Type 7 */
5769 | /* 7.2.5 Table 6.4-6 */
5770 | unsigned mcot;
5771 | proto_item *mcot_ti;
5772 |
5773 | /* laaMsgType */
5774 | uint32_t laa_msg_type;
5775 | proto_item *laa_msg_type_ti;
5776 | laa_msg_type_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_laaMsgType, tvb, offset, 1, ENC_NA0x00000000, &laa_msg_type);
5777 | /* laaMsgLen */
5778 | uint32_t laa_msg_len;
5779 | proto_item *len_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_laaMsgLen, tvb, offset, 1, ENC_NA0x00000000, &laa_msg_len);
5780 | proto_item_append_text(len_ti, " (%u bytes)", 4*laa_msg_len);
5781 | if (laa_msg_len == 0) {
5782 | proto_item_append_text(len_ti, " (reserved)");
5783 | }
5784 | offset += 1;
5785 |
5786 | int payload_offset = offset;
5787 |
5788 | /* Payload */
5789 | switch (laa_msg_type) {
5790 | case 0:
5791 | /* LBT_PDSCH_REQ */
5792 | /* lbtHandle (16 bits) */
5793 | proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5794 | offset += 2;
5795 | /* lbtOffset (10 bits) */
5796 | proto_tree_add_item(section_tree, hf_oran_lbtOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5797 | offset += 1;
5798 | /* lbtMode (2 bits) */
5799 | proto_tree_add_bits_item(section_tree, hf_oran_lbtMode, tvb, offset*8+2, 2, ENC_BIG_ENDIAN0x00000000);
5800 | /* reserved (1 bit) */
5801 | proto_tree_add_item(section_tree, hf_oran_reserved_bit4, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5802 | /* lbtDeferFactor (3 bits) */
5803 | proto_tree_add_item(section_tree, hf_oran_lbtDeferFactor, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5804 | offset += 1;
5805 | /* lbtBackoffCounter (10 bits) */
5806 | proto_tree_add_item(section_tree, hf_oran_lbtBackoffCounter, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5807 | offset += 1;
5808 | /* MCOT (4 bits) */
5809 | mcot_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_MCOT, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &mcot);
5810 | if (mcot<1 || mcot>10) {
5811 | proto_item_append_text(mcot_ti, " (should be in range 1-10!)");
5812 | expert_add_info_format(pinfo, mcot_ti, &ei_oran_mcot_out_of_range,
5813 | "MCOT seen with value %u (must be 1-10)", mcot);
5814 |
5815 | }
5816 | /* reserved (10 bits) */
5817 | proto_tree_add_bits_item(section_tree, hf_oran_reserved, tvb, (offset*8)+6, 10, ENC_BIG_ENDIAN0x00000000);
5818 | break;
5819 | case 1:
5820 | /* LBT_DRS_REQ */
5821 | /* lbtHandle (16 bits) */
5822 | proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5823 | offset += 2;
5824 | /* lbtOffset (10 bits) */
5825 | proto_tree_add_item(section_tree, hf_oran_lbtOffset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5826 | offset += 1;
5827 | /* lbtMode (2 bits) */
5828 | proto_tree_add_bits_item(section_tree, hf_oran_lbtMode, tvb, offset*8+2, 2, ENC_BIG_ENDIAN0x00000000);
5829 | /* reserved (28 bits) */
5830 | proto_tree_add_bits_item(section_tree, hf_oran_reserved, tvb, (offset*8)+4, 28, ENC_BIG_ENDIAN0x00000000);
5831 | break;
5832 | case 2:
5833 | /* LBT_PDSCH_RSP */
5834 | /* lbtHandle (16 bits) */
5835 | proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5836 | offset += 2;
5837 | /* lbtPdschRes (2 bits) */
5838 | proto_tree_add_item(section_tree, hf_oran_lbtPdschRes, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5839 | /* inParSF (1 bit) */
5840 | proto_tree_add_item(section_tree, hf_oran_initialPartialSF, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5841 | /* sfStatus (1 bit) */
5842 | proto_tree_add_item(section_tree, hf_oran_sfStatus, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5843 | /* sfnSf (12 bits) */
5844 | proto_tree_add_item(section_tree, hf_oran_sfnSfEnd, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5845 | offset += 2;
5846 | /* reserved (24 bits) */
5847 | proto_tree_add_bits_item(section_tree, hf_oran_reserved, tvb, (offset*8), 24, ENC_BIG_ENDIAN0x00000000);
5848 | break;
5849 | case 3:
5850 | /* LBT_DRS_RSP */
5851 | /* lbtHandle (16 bits) */
5852 | proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5853 | offset += 2;
5854 | /* lbtDrsRes (1 bit) */
5855 | proto_tree_add_item(section_tree, hf_oran_lbtDrsRes, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5856 | /* reserved (7 bits) */
5857 | proto_tree_add_item(section_tree, hf_oran_reserved_last_7bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5858 | break;
5859 | case 4:
5860 | /* LBT_Buffer_Error */
5861 | /* lbtHandle (16 bits) */
5862 | proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5863 | offset += 2;
5864 | /* lbtBufErr (1 bit) */
5865 | proto_tree_add_item(section_tree, hf_oran_lbtBufErr, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5866 | /* reserved (7 bits) */
5867 | proto_tree_add_item(section_tree, hf_oran_reserved_last_7bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5868 | break;
5869 | case 5:
5870 | /* LBT_CWCONFIG_REQ */
5871 | /* lbtHandle (16 bits) */
5872 | proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5873 | offset += 2;
5874 | /* lbtCWConfig_H (8 bits) */
5875 | proto_tree_add_item(section_tree, hf_oran_lbtCWConfig_H, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5876 | offset += 1;
5877 | /* lbtCWConfig_T (8 bits) */
5878 | proto_tree_add_item(section_tree, hf_oran_lbtCWConfig_T, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5879 | offset += 1;
5880 | /* lbtMode (2 bits) */
5881 | proto_tree_add_bits_item(section_tree, hf_oran_lbtMode, tvb, offset*8, 2, ENC_BIG_ENDIAN0x00000000);
5882 | /* lbtTrafficClass (3 bits) */
5883 | proto_tree_add_item(section_tree, hf_oran_lbtTrafficClass, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5884 | /* reserved (19 bits) */
5885 | proto_tree_add_bits_item(section_tree, hf_oran_reserved, tvb, (offset*8)+5, 19, ENC_BIG_ENDIAN0x00000000);
5886 | break;
5887 | case 6:
5888 | /* LBT_CWCONFIG_RSP */
5889 | /* lbtHandle (16 bits) */
5890 | proto_tree_add_item(section_tree, hf_oran_lbtHandle, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5891 | offset += 2;
5892 | /* lbtCWR_Rst (1 bit) */
5893 | proto_tree_add_item(section_tree, hf_oran_lbtCWR_Rst, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5894 | /* reserved (7 bits) */
5895 | proto_tree_add_item(section_tree, hf_oran_reserved_last_7bits, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5896 | break;
5897 |
5898 | default:
5899 | /* Unhandled! */
5900 | expert_add_info_format(pinfo, laa_msg_type_ti, &ei_oran_laa_msg_type_unsupported,
5901 | "laaMsgType %u not supported by dissector",
5902 | laa_msg_type);
5903 |
5904 | break;
5905 | }
5906 | /* For now just skip indicated length of bytes */
5907 | offset = payload_offset + 4*(laa_msg_len+1);
5908 | }
5909 |
5910 |
5911 | /* Dissect each C section */
5912 | for (uint32_t i = 0; i < nSections; ++i) {
5913 | tvbuff_t *section_tvb = tvb_new_subset_length_caplen(tvb, offset, -1, -1);
5914 | offset += dissect_oran_c_section(section_tvb, oran_tree, pinfo, state, sectionType, tap_info,
5915 | protocol_item,
5916 | subframeId, slotId,
5917 | bit_width, ci_comp_method, ci_comp_opt,
5918 | num_sinr_per_prb);
5919 | }
5920 |
5921 | /* Expert error if we are short of tvb by > 3 bytes */
5922 | if (tvb_reported_length_remaining(tvb, offset) > 3) {
5923 | expert_add_info_format(pinfo, protocol_item, &ei_oran_frame_length,
5924 | "%u bytes remain at end of frame - should be 0-3",
5925 | tvb_reported_length_remaining(tvb, offset));
5926 | }
5927 |
5928 | return tvb_captured_length(tvb);
5929 | }
5930 |
5931 | static int dissect_oran_u_re(tvbuff_t *tvb, proto_tree *tree,
5932 | unsigned sample_number, int samples_offset,
5933 | oran_tap_info *tap_info,
5934 | unsigned sample_bit_width,
5935 | int comp_meth,
5936 | uint32_t exponent)
5937 | {
5938 | /* I */
5939 | unsigned i_bits = tvb_get_bits32(tvb, samples_offset, sample_bit_width, ENC_BIG_ENDIAN0x00000000);
5940 | float i_value = decompress_value(i_bits, comp_meth, sample_bit_width, exponent);
5941 | unsigned sample_len_in_bytes = ((samples_offset%8)+sample_bit_width+7)/8;
5942 | proto_item *i_ti = proto_tree_add_float(tree, hf_oran_iSample, tvb, samples_offset/8, sample_len_in_bytes, i_value);
5943 | proto_item_set_text(i_ti, "iSample: % 0.7f 0x%04x (RE-%2u in the PRB)", i_value, i_bits, sample_number);
5944 | samples_offset += sample_bit_width;
5945 | /* Q */
5946 | unsigned q_bits = tvb_get_bits32(tvb, samples_offset, sample_bit_width, ENC_BIG_ENDIAN0x00000000);
5947 | float q_value = decompress_value(q_bits, comp_meth, sample_bit_width, exponent);
5948 | sample_len_in_bytes = ((samples_offset%8)+sample_bit_width+7)/8;
5949 | proto_item *q_ti = proto_tree_add_float(tree, hf_oran_qSample, tvb, samples_offset/8, sample_len_in_bytes, q_value);
5950 | proto_item_set_text(q_ti, "qSample: % 0.7f 0x%04x (RE-%2u in the PRB)", q_value, q_bits, sample_number);
5951 | samples_offset += sample_bit_width;
5952 |
5953 | /* Update RE stats */
5954 | tap_info->num_res++;
5955 | /* if (i_value == 0.0 && q_value == 0.0) { */
5956 | /* TODO: is just checking bits from frame good enough - assuming this always corresponds to a zero value? */
5957 | if (i_bits == 0 && q_bits == 0) {
5958 | tap_info->num_res_zero++;
5959 | }
5960 | else {
5961 | tap_info->non_zero_re_in_current_prb = true1;
5962 | }
5963 | return samples_offset;
5964 | }
5965 |
5966 |
5967 | static bool_Bool udcomplen_appears_present(bool_Bool udcomphdr_present, tvbuff_t *tvb, int offset)
5968 | {
5969 | if (!udcomplen_heuristic_result_set) {
5970 | /* All sections will start the same way */
5971 | unsigned int section_bytes_before_field = (udcomphdr_present) ? 6 : 4;
5972 |
5973 | /* Move offset back to the start of the section */
5974 | offset -= section_bytes_before_field;
5975 |
5976 | do {
5977 | /* This field appears several bytes into the U-plane section */
5978 | uint32_t length_remaining = tvb_reported_length_remaining(tvb, offset);
5979 | /* Are there enough bytes to still read the length field? */
5980 | if (section_bytes_before_field+2 > length_remaining) {
5981 | udcomplen_heuristic_result = false0;
5982 | udcomplen_heuristic_result_set = true1;
5983 | break;
5984 | }
5985 |
5986 | /* Read the length field */
5987 | uint16_t udcomplen = tvb_get_ntohs(tvb, offset+section_bytes_before_field);
5988 |
5989 | /* Is this less than a valid section? Realistic minimal section will be bigger than this..
5990 | * Could take into account numPrbU, etc */
5991 | if (udcomplen < section_bytes_before_field+2) {
5992 | udcomplen_heuristic_result = false0;
5993 | udcomplen_heuristic_result_set = true1;
5994 | break;
5995 | }
5996 |
5997 | /* Does this section fit into the frame? */
5998 | if (udcomplen > length_remaining) {
5999 | udcomplen_heuristic_result = false0;
6000 | udcomplen_heuristic_result_set = true1;
6001 | break;
6002 | }
6003 |
6004 | /* Move past this section */
6005 | offset += udcomplen;
6006 |
6007 | /* Are we at the end of the frame? */
6008 | /* TODO: if frame is less than 60 bytes, there may be > 4 bytes, likely zeros.. */
6009 | if (tvb_reported_length_remaining(tvb, offset) < 4) {
6010 | udcomplen_heuristic_result = true1;
6011 | udcomplen_heuristic_result_set = true1;
6012 | }
6013 | } while (!udcomplen_heuristic_result_set);
6014 | }
6015 | return udcomplen_heuristic_result;
6016 | }
6017 |
6018 | static bool_Bool at_udcomphdr(tvbuff_t *tvb, int offset)
6019 | {
6020 | if (tvb_captured_length_remaining(tvb, offset) < 2) {
6021 | return false0;
6022 | }
6023 | uint8_t first_byte = tvb_get_uint8(tvb, offset);
6024 | uint8_t reserved_byte = tvb_get_uint8(tvb, offset+1);
6025 |
6026 | /* - iq width could be anything, though unlikely to be signalled as (say) < 1-3? */
6027 | /* - meth should be 0-8 */
6028 | /* - reserved byte should be 0 */
6029 | return (((first_byte & 0x0f) <= MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8) && (reserved_byte == 0));
6030 | }
6031 |
6032 | static bool_Bool udcomphdr_appears_present(flow_state_t *flow, uint32_t direction, tvbuff_t *tvb, int offset)
6033 | {
6034 | /* Should really not happen, but guard against this anyway. */
6035 | if (flow == NULL((void*)0)) {
6036 | /* No state to update. */
6037 | return false0;
6038 | }
6039 |
6040 | if (direction == DIR_UPLINK0) {
6041 | if (flow->udcomphdrUplink_heuristic_result_set) {
6042 | /* Return cached value */
6043 | return flow->udcomphdrUplink_heuristic_result;
6044 | }
6045 | else {
6046 | /* Work it out, and save answer for next time */
6047 | flow->udcomphdrUplink_heuristic_result_set = true1;
6048 | flow->udcomphdrUplink_heuristic_result = at_udcomphdr(tvb, offset);
6049 | return flow->udcomphdrUplink_heuristic_result;
6050 | }
6051 | }
6052 | else {
6053 | /* Downlink */
6054 | if (flow->udcomphdrDownlink_heuristic_result_set) {
6055 | /* Return cached value */
6056 | return flow->udcomphdrDownlink_heuristic_result;
6057 | }
6058 | else {
6059 | /* Work it out, and save answer for next time */
6060 | flow->udcomphdrDownlink_heuristic_result_set = true1;
6061 | flow->udcomphdrDownlink_heuristic_result = at_udcomphdr(tvb, offset);
6062 | return flow->udcomphdrDownlink_heuristic_result;
6063 | }
6064 | }
6065 | }
6066 |
6067 | /* User plane dissector (section 8) */
6068 | static int
6069 | dissect_oran_u(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
6070 | oran_tap_info *tap_info, void *data _U___attribute__((unused)))
6071 | {
6072 | /* Hidden filter for plane */
6073 | proto_item *plane_ti = proto_tree_add_item(tree, hf_oran_uplane, tvb, 0, 0, ENC_NA0x00000000);
6074 | PROTO_ITEM_SET_HIDDEN(plane_ti)proto_item_set_hidden((plane_ti));
6075 |
6076 | /* Set up structures needed to add the protocol subtree and manage it */
6077 | int offset = 0;
6078 |
6079 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "O-RAN-FH-U");
6080 | col_set_str(pinfo->cinfo, COL_INFO, "U-Plane");
6081 |
6082 | tap_info->userplane = true1;
6083 |
6084 | /* Create display subtree for the protocol */
6085 | proto_item *protocol_item = proto_tree_add_item(tree, proto_oran, tvb, 0, -1, ENC_NA0x00000000);
6086 | proto_item_append_text(protocol_item, "-U");
6087 | proto_tree *oran_tree = proto_item_add_subtree(protocol_item, ett_oran);
6088 |
6089 | /* Transport header */
6090 | /* Real-time control data / IQ data transfer message series identifier */
6091 | uint16_t eAxC;
6092 | addPcOrRtcid(tvb, oran_tree, &offset, hf_oran_ecpri_pcid, &eAxC);
6093 | tap_info->eaxc = eAxC;
6094 |
6095 | /* Update/report status of conversation */
6096 | uint32_t key = make_flow_key(pinfo, eAxC, ORAN_U_PLANE1, false0);
6097 | flow_state_t* state = (flow_state_t*)wmem_tree_lookup32(flow_states_table, key);
6098 |
6099 | /* Message identifier */
6100 | uint8_t seq_id;
6101 | proto_item *seq_id_ti;
6102 | offset = addSeqid(tvb, oran_tree, offset, ORAN_U_PLANE1, &seq_id, &seq_id_ti, pinfo);
6103 |
6104 | /* Common header for time reference */
6105 | proto_item *timingHeader = proto_tree_add_string_format(oran_tree, hf_oran_timing_header,
6106 | tvb, offset, 4, "", "Timing Header (");
6107 | proto_tree *timing_header_tree = proto_item_add_subtree(timingHeader, ett_oran_u_timing);
6108 |
6109 | /* dataDirection */
6110 | uint32_t direction;
6111 | proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_data_direction, tvb, offset, 1, ENC_NA0x00000000, &direction);
6112 | tap_info->uplink = (direction==0);
6113 | /* payloadVersion */
6114 | dissect_payload_version(timing_header_tree, tvb, pinfo, offset);
6115 | /* filterIndex */
6116 | proto_tree_add_item(timing_header_tree, hf_oran_filter_index, tvb, offset, 1, ENC_NA0x00000000);
6117 | offset += 1;
6118 |
6119 | int ref_a_offset = offset;
6120 |
6121 | /* frameId */
6122 | uint32_t frameId = 0;
6123 | proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_frame_id, tvb, offset, 1, ENC_NA0x00000000, &frameId);
6124 | tap_info->frame = frameId;
6125 | offset += 1;
6126 |
6127 | /* subframeId */
6128 | uint32_t subframeId = 0;
6129 | proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_subframe_id, tvb, offset, 1, ENC_NA0x00000000, &subframeId);
6130 | /* slotId */
6131 | uint32_t slotId = 0;
6132 | proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_slot_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &slotId);
6133 | tap_info->slot = slotId;
6134 | offset++;
6135 | /* symbolId */
6136 | uint32_t symbolId = 0;
6137 | proto_tree_add_item_ret_uint(timing_header_tree, hf_oran_symbolId, tvb, offset, 1, ENC_NA0x00000000, &symbolId);
6138 | offset++;
6139 |
6140 | char id[16];
6141 | snprintf(id, 16, "%d-%d-%d-%d", frameId, subframeId, slotId, symbolId);
6142 | proto_item *pi = proto_tree_add_string(timing_header_tree, hf_oran_refa, tvb, ref_a_offset, 3, id);
6143 | proto_item_set_generated(pi);
6144 |
6145 | proto_item_append_text(timingHeader, "%s, frameId: %d, subframeId: %d, slotId: %d, symbolId: %d)",
6146 | val_to_str_const(direction, data_direction_vals, "Unknown"), frameId, subframeId, slotId, symbolId);
6147 |
6148 | unsigned sample_bit_width;
6149 | int compression;
6150 | int includeUdCompHeader;
6151 |
6152 | /* Also look up C-PLANE state (sent in opposite direction) so may check current compression settings */
6153 | uint32_t cplane_key = make_flow_key(pinfo, eAxC, ORAN_C_PLANE0, true1);
6154 | flow_state_t* cplane_state = (flow_state_t*)wmem_tree_lookup32(flow_states_table, cplane_key);
6155 |
6156 | if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
6157 | /* Create conversation if doesn't exist yet */
6158 | if (!state) {
6159 | /* Allocate new state */
6160 | state = wmem_new0(wmem_file_scope(), flow_state_t)((flow_state_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_state_t )));
6161 | state->ack_nack_requests = wmem_tree_new(wmem_epan_scope());
6162 | wmem_tree_insert32(flow_states_table, key, state);
6163 | }
6164 |
6165 | /* Check sequence analysis status */
6166 | if (state->last_frame_seen[direction] && (seq_id != state->next_expected_sequence_number[direction])) {
6167 | /* Store this result */
6168 | flow_result_t *result = wmem_new0(wmem_file_scope(), flow_result_t)((flow_result_t*)wmem_alloc0((wmem_file_scope()), sizeof(flow_result_t )));
6169 | result->unexpected_seq_number = true1;
6170 | result->expected_sequence_number = state->next_expected_sequence_number[direction];
6171 | result->previous_frame = state->last_frame[direction];
6172 | wmem_tree_insert32(flow_results_table, pinfo->num, result);
6173 | }
6174 | /* Update sequence analysis state */
6175 | state->last_frame[direction] = pinfo->num;
6176 | state->last_frame_seen[direction] = true1;
6177 | state->next_expected_sequence_number[direction] = (seq_id+1) % 256;
6178 | }
6179 |
6180 | /* Show any issues associated with this frame number */
6181 | flow_result_t *result = wmem_tree_lookup32(flow_results_table, pinfo->num);
6182 | if (result) {
6183 | if (result->unexpected_seq_number) {
6184 | expert_add_info_format(pinfo, seq_id_ti,
6185 | (direction == DIR_UPLINK0) ?
6186 | &ei_oran_uplane_unexpected_sequence_number_ul :
6187 | &ei_oran_uplane_unexpected_sequence_number_dl,
6188 | "Sequence number %u expected, but got %u",
6189 | result->expected_sequence_number, seq_id);
6190 | tap_info->missing_sns = (256 + seq_id - result->expected_sequence_number) % 256;
6191 | /* TODO: could add previous/next frame (in seqId tree?) ? */
6192 | }
6193 | }
6194 |
6195 | /* Checking UL timing within current slot. Disabled if limit set to 0. */
6196 | /* N.B., timing is relative to first seen frame,
6197 | not some notion of the beginning of the slot from sync, offset by some timing.. */
6198 | if (direction == DIR_UPLINK0 && us_allowed_for_ul_in_symbol > 0) {
6199 | uint32_t timing_key = get_timing_key(frameId, subframeId, slotId, symbolId);
6200 | if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
6201 | /* Set state on first pass */
6202 | ul_timing_for_slot* timing = (ul_timing_for_slot*)wmem_tree_lookup32(ul_symbol_timing, timing_key);
6203 | if (!timing) {
6204 | /* Allocate new state */
6205 | timing = wmem_new0(wmem_file_scope(), ul_timing_for_slot)((ul_timing_for_slot*)wmem_alloc0((wmem_file_scope()), sizeof (ul_timing_for_slot)));
6206 | timing->first_frame = pinfo->num;
6207 | timing->first_frame_time = pinfo->abs_ts;
6208 | timing->frames_seen_in_symbol = 1;
6209 | timing->last_frame_in_symbol = pinfo->num;
6210 | wmem_tree_insert32(ul_symbol_timing, timing_key, timing);
6211 | }
6212 | else {
6213 | /* Update existing state */
6214 | timing->frames_seen_in_symbol++;
6215 | timing->last_frame_in_symbol = pinfo->num;
6216 | }
6217 | }
6218 | else {
6219 | /* Subsequent passes - look up result */
6220 | ul_timing_for_slot* timing = (ul_timing_for_slot*)wmem_tree_lookup32(ul_symbol_timing, timing_key);
6221 | if (timing) { /* Really shouldn't fail! */
6222 | if (timing->frames_seen_in_symbol > 1) {
6223 | /* Work out gap between frames (in microseconds) back to frame carrying first seen symbol */
6224 | int seconds_between_packets = (int)
6225 | (pinfo->abs_ts.secs - timing->first_frame_time.secs);
6226 | int nseconds_between_packets =
6227 | pinfo->abs_ts.nsecs - timing->first_frame_time.nsecs;
6228 |
6229 |
6230 | /* Round to nearest microsecond. */
6231 | uint32_t total_gap = (seconds_between_packets*1000000) +
6232 | ((nseconds_between_packets+500) / 1000);
6233 |
6234 | /* Show how long it has been */
6235 | proto_item *ti = NULL((void*)0);
6236 | if (pinfo->num != timing->first_frame) {
6237 | ti = proto_tree_add_uint(timingHeader, hf_oran_u_section_ul_symbol_time, tvb, 0, 0, total_gap);
6238 | proto_item_set_generated(ti);
6239 | }
6240 |
6241 | if (total_gap > us_allowed_for_ul_in_symbol) {
6242 | expert_add_info_format(pinfo, ti, &ei_oran_ul_uplane_symbol_too_long,
6243 | "UL U-Plane Tx took longer (%u us) than limit set in preferences (%u us)",
6244 | total_gap, us_allowed_for_ul_in_symbol);
6245 | }
6246 |
6247 | /* Show how many frames were received */
6248 | ti = proto_tree_add_uint(timingHeader, hf_oran_u_section_ul_symbol_frames, tvb, 0, 0, timing->frames_seen_in_symbol);
6249 | proto_item_set_generated(ti);
6250 |
6251 | /* Link to first frame for this symbol */
6252 | if (pinfo->num != timing->first_frame) {
6253 | ti = proto_tree_add_uint(timingHeader, hf_oran_u_section_ul_symbol_first_frame, tvb, 0, 0, timing->first_frame);
6254 | proto_item_set_generated(ti);
6255 | }
6256 |
6257 | /* And also last frame */
6258 | if (pinfo->num != timing->last_frame_in_symbol) {
6259 | ti = proto_tree_add_uint(timingHeader, hf_oran_u_section_ul_symbol_last_frame, tvb, 0, 0, timing->last_frame_in_symbol);
6260 | proto_item_set_generated(ti);
6261 | }
6262 |
6263 | tap_info->ul_delay_in_us = total_gap;
6264 | }
6265 | }
6266 | }
6267 | }
6268 |
6269 |
6270 | /* Look up preferences for samples */
6271 | if (direction == DIR_UPLINK0) {
6272 | sample_bit_width = pref_sample_bit_width_uplink;
6273 | compression = pref_iqCompressionUplink;
6274 | includeUdCompHeader = pref_includeUdCompHeaderUplink;
6275 | } else {
6276 | sample_bit_width = pref_sample_bit_width_downlink;
6277 | compression = pref_iqCompressionDownlink;
6278 | includeUdCompHeader = pref_includeUdCompHeaderDownlink;
6279 | }
6280 |
6281 | /* If uplink, load any udCompHdr settings written by C-Plane */
6282 | bool_Bool ud_cmp_hdr_cplane = false0;
6283 | if (cplane_state && direction == 0) {
6284 | /* Initialise settings from udpCompHdr from C-Plane */
6285 | if (cplane_state->ul_ud_comp_hdr_set) {
6286 | sample_bit_width = cplane_state->ul_ud_comp_hdr_bit_width;
6287 | compression = cplane_state->ul_ud_comp_hdr_compression;
6288 | ud_cmp_hdr_cplane = true1;
6289 | }
6290 | }
6291 |
6292 | /* Need a valid value (e.g. 9, 14). 0 definitely won't work, as won't progress around loop! */
6293 | /* N.B. may yet be overwritten by udCompHdr settings in sections below! */
6294 | if (sample_bit_width == 0) {
6295 | expert_add_info_format(pinfo, protocol_item, &ei_oran_invalid_sample_bit_width,
6296 | "%cL Sample bit width from %s (%u) not valid, so can't decode sections",
6297 | (direction == DIR_UPLINK0) ? 'U' : 'D',
6298 | !ud_cmp_hdr_cplane ? "preference" : "C-Plane",
6299 | sample_bit_width);
6300 | return offset;
6301 | }
6302 |
6303 | unsigned bytesLeft;
6304 | unsigned number_of_sections = 0;
6305 | unsigned nBytesPerPrb =0;
6306 |
6307 | /* Add each section (not from count, just keep parsing until payload used) */
6308 | do {
6309 | /* Section subtree */
6310 | unsigned section_start_offset = offset;
6311 | proto_item *sectionHeading = proto_tree_add_string_format(oran_tree, hf_oran_u_section,
6312 | tvb, offset, 0, "", "Section");
6313 | proto_tree *section_tree = proto_item_add_subtree(sectionHeading, ett_oran_u_section);
6314 |
6315 | /* Section Header fields (darker green part) */
6316 |
6317 | /* sectionId */
6318 | uint32_t sectionId = 0;
6319 | proto_item *ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_section_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &sectionId);
6320 | if (sectionId == 4095) {
6321 | proto_item_append_text(ti, " (not default coupling C/U planes using sectionId)");
6322 | }
6323 | offset++;
6324 |
6325 | if (tap_info->num_section_ids < MAX_SECTION_IDs32) {
6326 | tap_info->section_ids[tap_info->num_section_ids++] = sectionId;
6327 | }
6328 |
6329 | /* rb */
6330 | uint32_t rb;
6331 | proto_tree_add_item_ret_uint(section_tree, hf_oran_rb, tvb, offset, 1, ENC_NA0x00000000, &rb);
6332 | /* symInc */
6333 | proto_tree_add_item(section_tree, hf_oran_symInc, tvb, offset, 1, ENC_NA0x00000000);
6334 | /* startPrbu */
6335 | uint32_t startPrbu = 0;
6336 | proto_tree_add_item_ret_uint(section_tree, hf_oran_startPrbu, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &startPrbu);
6337 | offset += 2;
6338 |
6339 | /* numPrbu */
6340 | uint32_t numPrbu = 0;
6341 | proto_tree_add_item_ret_uint(section_tree, hf_oran_numPrbu, tvb, offset, 1, ENC_NA0x00000000, &numPrbu);
6342 | offset += 1;
6343 |
6344 | proto_item *ud_comp_meth_item, *ud_comp_len_ti=NULL((void*)0);
6345 | uint32_t ud_comp_len;
6346 |
6347 | /* udCompHdr (if preferences indicate will be present) */
6348 | bool_Bool included = (includeUdCompHeader==1) || /* 1 means present.. */
6349 | (includeUdCompHeader==2 && udcomphdr_appears_present(state, direction, tvb, offset));
6350 | if (included) {
6351 | /* 7.5.2.10 */
6352 | /* Extract these values to inform how wide IQ samples in each PRB will be. */
6353 | offset = dissect_udcomphdr(tvb, pinfo, section_tree, offset, false0, &sample_bit_width,
6354 | &compression, &ud_comp_meth_item);
6355 |
6356 | /* Not part of udCompHdr */
6357 | proto_tree_add_item(section_tree, hf_oran_reserved_8bits, tvb, offset, 1, ENC_NA0x00000000);
6358 | offset += 1;
6359 | }
6360 | else {
6361 | /* No fields to dissect - just showing comp values from prefs */
6362 | /* iqWidth */
6363 | proto_item *iq_width_item = proto_tree_add_uint(section_tree, hf_oran_udCompHdrIqWidth_pref, tvb, 0, 0, sample_bit_width);
6364 | proto_item_append_text(iq_width_item, (ud_cmp_hdr_cplane) ? " (from c-plane)" : " (from preferences)");
6365 | proto_item_set_generated(iq_width_item);
6366 |
6367 | /* udCompMethod */
6368 | ud_comp_meth_item = proto_tree_add_uint(section_tree, hf_oran_udCompHdrMeth_pref, tvb, 0, 0, compression);
6369 | proto_item_append_text(ud_comp_meth_item, (ud_cmp_hdr_cplane) ? " (from c-plane)" : " (from preferences)");
6370 | proto_item_set_generated(ud_comp_meth_item);
6371 |
6372 | /* Point back to C-Plane, if used */
6373 | /* TODO: doesn't work with multiple port mappings using SE10.. */
6374 | if (ud_cmp_hdr_cplane) {
6375 | proto_item *cplane_ti = proto_tree_add_uint(section_tree, hf_oran_ul_cplane_ud_comp_hdr_frame, tvb, offset, 0, cplane_state->ul_ud_comp_hdr_frame);
6376 | proto_item_set_generated(cplane_ti);
6377 | }
6378 | }
6379 |
6380 | /* Not supported! TODO: other places where comp method is looked up (e.g., bfw?) */
6381 | switch (compression) {
6382 | case COMP_NONE0:
6383 | case COMP_BLOCK_FP1:
6384 | case BFP_AND_SELECTIVE_RE5:
6385 | break;
6386 | default:
6387 | expert_add_info_format(pinfo, ud_comp_meth_item, &ei_oran_unsupported_compression_method,
6388 | "Compression method %u (%s) not supported by dissector",
6389 | compression,
6390 | rval_to_str_const(compression, ud_comp_header_meth, "reserved"));
6391 | }
6392 |
6393 | /* udCompLen (when supported, methods 5,6,7,8) */
6394 | if (compression >= BFP_AND_SELECTIVE_RE5) {
6395 | bool_Bool supported = (pref_support_udcompLen==1) || /* supported */
6396 | (pref_support_udcompLen==2 && udcomplen_appears_present(includeUdCompHeader, tvb, offset));
6397 |
6398 | if (supported) {
6399 | ud_comp_len_ti = proto_tree_add_item_ret_uint(section_tree, hf_oran_udCompLen, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ud_comp_len);
6400 | if (ud_comp_len <= 1) {
6401 | proto_item_append_text(ud_comp_len_ti, " (reserved)");
6402 | }
6403 | /* TODO: report if less than a viable section in frame? */
6404 | /* Check that there is this much length left in the frame */
6405 | if ((int)ud_comp_len > tvb_reported_length_remaining(tvb, section_start_offset)) {
6406 | expert_add_info_format(pinfo, ud_comp_len_ti, &ei_oran_ud_comp_len_wrong_size,
6407 | "udCompLen indicates %u bytes in section, but only %u are left in frame",
6408 | ud_comp_len, tvb_reported_length_remaining(tvb, section_start_offset));
6409 | }
6410 | /* Actual length of section will be checked below, at the end of the section */
6411 | offset += 2;
6412 | }
6413 | }
6414 |
6415 | /* sReSMask1 + sReSMask2 (depends upon compression method) */
6416 | uint64_t sresmask1=0, sresmask2=0;
6417 | if (compression == BFP_AND_SELECTIVE_RE_WITH_MASKS7 ||
6418 | compression == MOD_COMPR_AND_SELECTIVE_RE_WITH_MASKS8)
6419 | {
6420 | static int * const sres_mask1_2_flags[] = {
6421 | &hf_oran_sReSMask1_2_re12,
6422 | &hf_oran_sReSMask1_2_re11,
6423 | &hf_oran_sReSMask1_2_re10,
6424 | &hf_oran_sReSMask1_2_re9,
6425 | &hf_oran_sReSMask_re8,
6426 | &hf_oran_sReSMask_re7,
6427 | &hf_oran_sReSMask_re6,
6428 | &hf_oran_sReSMask_re5,
6429 | &hf_oran_sReSMask_re4,
6430 | &hf_oran_sReSMask_re3,
6431 | &hf_oran_sReSMask_re2,
6432 | &hf_oran_sReSMask_re1,
6433 | NULL((void*)0)
6434 | };
6435 |
6436 | /* reserved (4 bits) */
6437 | proto_tree_add_item(section_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_NA0x00000000);
6438 | /* sReSMask1 (12 bits) */
6439 | proto_item *sresmask_ti;
6440 | sresmask_ti = proto_tree_add_bitmask_ret_uint64(section_tree, tvb, offset,
6441 | hf_oran_sReSMask1,
6442 | ett_oran_sresmask,
6443 | sres_mask1_2_flags,
6444 | ENC_NA0x00000000,
6445 | &sresmask1);
6446 | offset += 2;
6447 | /* Count REs present */
6448 | unsigned res = 0;
6449 | for (unsigned n=0; n < 12; n++) {
6450 | if ((sresmask1 >> n) & 0x1) {
6451 | res++;
6452 | }
6453 | }
6454 | proto_item_append_text(sresmask_ti, " (%u REs)", res);
6455 |
6456 |
6457 | /* reserved (4 bits) */
6458 | proto_tree_add_item(section_tree, hf_oran_reserved_4bits, tvb, offset, 1, ENC_NA0x00000000);
6459 | /* sReSMask2 (12 bits) */
6460 | sresmask_ti = proto_tree_add_bitmask_ret_uint64(section_tree, tvb, offset,
6461 | hf_oran_sReSMask2,
6462 | ett_oran_sresmask,
6463 | sres_mask1_2_flags,
6464 | ENC_NA0x00000000,
6465 | &sresmask2);
6466 | offset += 2;
6467 |
6468 | if (rb == 1) {
6469 | proto_item_append_text(sresmask_ti, " (ignored)");
6470 | if (sresmask2 != 0) {
6471 | expert_add_info(pinfo, ud_comp_len_ti, &ei_oran_sresmask2_not_zero_with_rb);
6472 | }
6473 | }
6474 | else {
6475 | /* Count REs present */
6476 | res = 0;
6477 | for (unsigned n=0; n < 12; n++) {
6478 | if ((sresmask2 >> n) & 0x1) {
6479 | res++;
6480 | }
6481 | }
6482 | proto_item_append_text(sresmask_ti, " (%u REs)", res);
6483 | }
6484 | }
6485 |
6486 | write_section_info(sectionHeading, pinfo, protocol_item, sectionId, startPrbu, numPrbu, rb);
6487 |
6488 | /* TODO: should this use the same pref as c-plane? */
6489 | if (numPrbu == 0) {
6490 | /* Special case for all PRBs (NR: the total number of PRBs may be > 255) */
6491 | numPrbu = pref_data_plane_section_total_rbs;
6492 | startPrbu = 0; /* may already be 0... */
6493 | }
6494 |
6495 | /* Add each PRB */
6496 | for (unsigned i = 0; i < numPrbu; i++) {
6497 | /* Create subtree */
6498 | proto_item *prbHeading = proto_tree_add_string_format(section_tree, hf_oran_samples_prb,
6499 | tvb, offset, 0,
6500 | "", "PRB");
6501 | proto_tree *rb_tree = proto_item_add_subtree(prbHeading, ett_oran_u_prb);
6502 | uint32_t exponent = 0;
6503 | uint16_t sresmask = 0;
6504 |
6505 | /* udCompParam (depends upon compression method) */
6506 | int before = offset;
6507 | offset = dissect_udcompparam(tvb, pinfo, rb_tree, offset, compression, &exponent, &sresmask, false0);
6508 | int udcompparam_len = offset-before;
6509 |
6510 | /* Show PRB number in root */
6511 | proto_item_append_text(prbHeading, " %3u", startPrbu + i*(1+rb));
6512 |
6513 | /* Work out how many REs / PRB */
6514 | unsigned res_per_prb = 12;
6515 | uint16_t sresmask_to_use = 0x0fff;
6516 |
6517 | if (compression >= BFP_AND_SELECTIVE_RE5) {
6518 | /* Work out which mask should be used */
6519 | if (compression==BFP_AND_SELECTIVE_RE5 || compression==MOD_COMPR_AND_SELECTIVE_RE6) {
6520 | /* Selective RE cases, use value from compModParam */
6521 | sresmask_to_use = (uint16_t)sresmask;
6522 | }
6523 | else {
6524 | /* With masks (in section). Choose between sresmask1 and sresmask2 */
6525 | if (rb==1 || (i%1)==0) {
6526 | /* Even values */
6527 | sresmask_to_use = (uint16_t)sresmask1;
6528 | }
6529 | else {
6530 | /* Odd values */
6531 | sresmask_to_use = (uint16_t)sresmask2;
6532 | }
6533 | }
6534 |
6535 | /* Count REs present using sresmask */
6536 | res_per_prb = 0;
6537 | /* Use sresmask to pick out which REs are present */
6538 | for (unsigned n=0; n<12; n++) {
6539 | if (sresmask_to_use & (1<<n)) {
6540 | res_per_prb++;
6541 | }
6542 | }
6543 | }
6544 |
6545 | /* N.B. bytes for samples need to be padded out to next byte
6546 | (certainly where there aren't 12 REs in PRB..) */
6547 | unsigned nBytesForSamples = (sample_bit_width * res_per_prb * 2 + 7) / 8;
6548 | nBytesPerPrb = nBytesForSamples + udcompparam_len;
6549 |
6550 | proto_tree_add_item(rb_tree, hf_oran_iq_user_data, tvb, offset, nBytesForSamples, ENC_NA0x00000000);
6551 |
6552 | tap_info->non_zero_re_in_current_prb = false0;
6553 |
6554 | /* Optionally trying to show I/Q RE values */
6555 | if (pref_showIQSampleValues) {
6556 | /* Individual values */
6557 | unsigned samples_offset = offset*8;
6558 | unsigned samples = 0;
6559 |
6560 | if (compression >= BFP_AND_SELECTIVE_RE5) {
6561 | /* Use sresmask to pick out which REs are present */
6562 | for (unsigned n=1; n<=12; n++) {
6563 | if (sresmask_to_use & (1<<(n-1))) {
6564 | samples_offset = dissect_oran_u_re(tvb, rb_tree,
6565 | n, samples_offset, tap_info, sample_bit_width, compression, exponent);
6566 | samples++;
6567 | }
6568 | }
6569 | }
6570 | else {
6571 | /* All 12 REs are present */
6572 | for (unsigned n=1; n<=12; n++) {
6573 | samples_offset = dissect_oran_u_re(tvb, rb_tree,
6574 | n, samples_offset, tap_info, sample_bit_width, compression, exponent);
6575 | samples++;
6576 | }
6577 | }
6578 | proto_item_append_text(prbHeading, " (%u REs)", samples);
6579 |
6580 | /* Was this PRB all zeros? */
6581 | if (!tap_info->non_zero_re_in_current_prb) {
6582 | tap_info->num_prbs_zero++;
6583 | /* Add a filter to make zero-valued PRBs more findable */
6584 | proto_tree_add_item(rb_tree, hf_oran_zero_prb, tvb,
6585 | samples_offset/8, nBytesForSamples, ENC_NA0x00000000);
6586 | proto_item_append_text(prbHeading, " (all zeros)");
6587 | }
6588 | }
6589 |
6590 | tap_info->num_prbs++;
6591 |
6592 |
6593 | /* Advance past samples */
6594 | offset += nBytesForSamples;
6595 |
6596 | /* Set end of prb subtree */
6597 | proto_item_set_end(prbHeading, tvb, offset);
6598 | }
6599 |
6600 | /* Set extent of section */
6601 | proto_item_set_len(sectionHeading, offset-section_start_offset);
6602 | if (ud_comp_len_ti != NULL((void*)0) && ((offset-section_start_offset != ud_comp_len))) {
6603 | expert_add_info_format(pinfo, ud_comp_len_ti, &ei_oran_ud_comp_len_wrong_size,
6604 | "udCompLen indicates %u bytes in section, but dissected %u instead",
6605 | ud_comp_len, offset-section_start_offset);
6606 | }
6607 |
6608 | bytesLeft = tvb_captured_length(tvb) - offset;
6609 | number_of_sections++;
6610 | } while (bytesLeft >= (4 + nBytesPerPrb)); /* FIXME: bad heuristic */
6611 |
6612 | /* Show number of sections found */
6613 | proto_item *ti = proto_tree_add_uint(oran_tree, hf_oran_numberOfSections, tvb, 0, 0, number_of_sections);
6614 | proto_item_set_generated(ti);
6615 |
6616 | /* Expert error if we are short of tvb by > 3 bytes */
6617 | if (tvb_reported_length_remaining(tvb, offset) > 3) {
6618 | expert_add_info_format(pinfo, protocol_item, &ei_oran_frame_length,
6619 | "%u bytes remain at end of frame - should be 0-3",
6620 | tvb_reported_length_remaining(tvb, offset));
6621 | }
6622 |
6623 | return tvb_captured_length(tvb);
6624 | }
6625 |
6626 |
6627 | /**********************************************************************/
6628 | /* Main dissection function. */
6629 | /* N.B. ecpri message type passed in as 'data' arg by eCPRI dissector */
6630 | static int
6631 | dissect_oran(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
6632 | {
6633 | uint32_t ecpri_message_type = *(uint32_t *)data;
6634 | int offset = 0;
6635 |
6636 | /* Allocate and zero tap struct */
6637 | oran_tap_info *tap_info = wmem_new0(wmem_file_scope(), oran_tap_info)((oran_tap_info*)wmem_alloc0((wmem_file_scope()), sizeof(oran_tap_info )));
6638 | tap_info->pdu_size = pinfo->fd->pkt_len;
6639 |
6640 | switch (ecpri_message_type) {
6641 | case ECPRI_MT_IQ_DATA0:
6642 | offset = dissect_oran_u(tvb, pinfo, tree, tap_info, data);
6643 | break;
6644 | case ECPRI_MT_RT_CTRL_DATA2:
6645 | offset = dissect_oran_c(tvb, pinfo, tree, tap_info, data);
6646 | break;
6647 | default:
6648 | /* Not dissecting other types - assume these are handled by eCPRI dissector */
6649 | return 0;
6650 | }
6651 |
6652 | tap_queue_packet(oran_tap, pinfo, tap_info);
6653 |
6654 | return offset;
6655 | }
6656 |
6657 | static void oran_init_protocol(void)
6658 | {
6659 | udcomplen_heuristic_result_set = false0;
6660 | udcomplen_heuristic_result = false0;
6661 | }
6662 |
6663 |
6664 | /* Register the protocol with Wireshark. */
6665 | void
6666 | proto_register_oran(void)
6667 | {
6668 | static hf_register_info hf[] = {
6669 |
6670 | /* Section 5.1.3.2.7 */
6671 | { &hf_oran_du_port_id,
6672 | { "DU Port ID", "oran_fh_cus.du_port_id",
6673 | FT_UINT16, BASE_DEC,
6674 | NULL((void*)0), 0x0,
6675 | "Processing unit at O-RU - width set in dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6676 | },
6677 |
6678 | /* Section 5.1.3.2.7 */
6679 | { &hf_oran_bandsector_id,
6680 | { "BandSector ID", "oran_fh_cus.bandsector_id",
6681 | FT_UINT16, BASE_DEC,
6682 | NULL((void*)0), 0x0,
6683 | "Aggregated cell identified - width set in dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6684 | },
6685 |
6686 | /* Section 5.1.3.2.7 */
6687 | { &hf_oran_cc_id,
6688 | { "CC ID", "oran_fh_cus.cc_id",
6689 | FT_UINT16, BASE_DEC,
6690 | NULL((void*)0), 0x0,
6691 | "Component Carrier - width set in dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6692 | },
6693 |
6694 | /* Section 5.1.3.2.7 */
6695 | { &hf_oran_ru_port_id,
6696 | { "RU Port ID", "oran_fh_cus.ru_port_id",
6697 | FT_UINT16, BASE_DEC,
6698 | NULL((void*)0), 0x0,
6699 | "Logical flow - width set in dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6700 | },
6701 |
6702 | /* Section 5.1.3.2.8 */
6703 | { &hf_oran_sequence_id,
6704 | { "Sequence ID", "oran_fh_cus.sequence_id",
6705 | FT_UINT8, BASE_DEC,
6706 | NULL((void*)0), 0x0,
6707 | "The Sequence ID wraps around individually per eAxC", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6708 | },
6709 |
6710 | /* Section 5.1.3.2.8 */
6711 | { &hf_oran_e_bit,
6712 | { "E Bit", "oran_fh_cus.e_bit",
6713 | FT_UINT8, BASE_DEC,
6714 | VALS(e_bit)((0 ? (const struct _value_string*)0 : ((e_bit)))), 0x80,
6715 | "Indicate the last message of a subsequence (U-Plane only)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6716 | },
6717 |
6718 | /* Section 5.1.3.2.8 */
6719 | { &hf_oran_subsequence_id,
6720 | { "Subsequence ID", "oran_fh_cus.subsequence_id",
6721 | FT_UINT8, BASE_DEC,
6722 | NULL((void*)0), 0x7f,
6723 | "The subsequence ID (for eCPRI layer fragmentation)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6724 | },
6725 |
6726 | { &hf_oran_previous_frame,
6727 | { "Previous frame in stream", "oran_fh_cus.previous-frame",
6728 | FT_FRAMENUM, BASE_NONE,
6729 | FRAMENUM_TYPE(FT_FRAMENUM_NONE)((gpointer) (glong) (FT_FRAMENUM_NONE)), 0x0,
6730 | "Previous frame in sequence", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6731 | },
6732 |
6733 | /* Section 7.5.2.1 */
6734 | { &hf_oran_data_direction,
6735 | { "Data Direction", "oran_fh_cus.data_direction",
6736 | FT_UINT8, BASE_DEC,
6737 | VALS(data_direction_vals)((0 ? (const struct _value_string*)0 : ((data_direction_vals) ))), 0x80,
6738 | "gNB data direction", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6739 | },
6740 |
6741 | /* Section 7.5.2.2 */
6742 | { &hf_oran_payload_version,
6743 | { "Payload Version", "oran_fh_cus.payloadVersion",
6744 | FT_UINT8, BASE_DEC,
6745 | NULL((void*)0), 0x70,
6746 | "Payload protocol version the following IEs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6747 | },
6748 |
6749 | /* Section 7.5.2.3 */
6750 | { &hf_oran_filter_index,
6751 | { "Filter Index", "oran_fh_cus.filterIndex",
6752 | FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
6753 | RVALS(filter_indices)((0 ? (const struct _range_string*)0 : ((filter_indices)))), 0x0f,
6754 | "used between IQ data and air interface, both in DL and UL", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6755 | },
6756 |
6757 | /* Section 7.5.2.4 */
6758 | { &hf_oran_frame_id,
6759 | { "Frame ID", "oran_fh_cus.frameId",
6760 | FT_UINT8, BASE_DEC,
6761 | NULL((void*)0), 0x0,
6762 | "A counter for 10 ms frames (wrapping period 2.56 seconds)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6763 | },
6764 |
6765 | /* Section 7.5.2.5 */
6766 | { &hf_oran_subframe_id,
6767 | { "Subframe ID", "oran_fh_cus.subframe_id",
6768 | FT_UINT8, BASE_DEC,
6769 | NULL((void*)0), 0xf0,
6770 | "A counter for 1 ms sub-frames within 10ms frame", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6771 | },
6772 |
6773 | /* Section 7.5.2.6 */
6774 | { &hf_oran_slot_id,
6775 | { "Slot ID", "oran_fh_cus.slotId",
6776 | FT_UINT16, BASE_DEC,
6777 | NULL((void*)0), 0x0fc0,
6778 | "Slot number within a 1ms sub-frame", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6779 | },
6780 |
6781 | /* Generated for convenience */
6782 | { &hf_oran_slot_within_frame,
6783 | { "Slot within frame", "oran_fh_cus.slot-within-frame",
6784 | FT_UINT16, BASE_DEC,
6785 | NULL((void*)0), 0x0,
6786 | "Slot within frame, to match DCT logs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6787 | },
6788 |
6789 | /* Section 7.5.2.7 */
6790 | { &hf_oran_start_symbol_id,
6791 | { "Start Symbol ID", "oran_fh_cus.startSymbolId",
6792 | FT_UINT8, BASE_DEC,
6793 | NULL((void*)0), 0x3f,
6794 | "The first symbol number within slot affected", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6795 | },
6796 |
6797 | /* Section 7.5.2.8 */
6798 | { &hf_oran_numberOfSections,
6799 | { "Number of Sections", "oran_fh_cus.numberOfSections",
6800 | FT_UINT8, BASE_DEC,
6801 | NULL((void*)0), 0x0,
6802 | "The number of section IDs included in this message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6803 | },
6804 |
6805 | /* Section 7.5.2.9 */
6806 | { &hf_oran_sectionType,
6807 | { "Section Type", "oran_fh_cus.sectionType",
6808 | FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
6809 | RVALS(section_types)((0 ? (const struct _range_string*)0 : ((section_types)))), 0x0,
6810 | "Determines the characteristics of U-plane data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6811 | },
6812 |
6813 | /* Section 7.5.2.10 */
6814 | { &hf_oran_udCompHdr,
6815 | { "udCompHdr", "oran_fh_cus.udCompHdr",
6816 | FT_STRING, BASE_NONE,
6817 | NULL((void*)0), 0x0,
6818 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6819 | },
6820 |
6821 | /* Section 7.5.2.11 */
6822 | { &hf_oran_numberOfUEs,
6823 | { "Number Of UEs", "oran_fh_cus.numberOfUEs",
6824 | FT_UINT8, BASE_DEC,
6825 | NULL((void*)0), 0x0,
6826 | "Indicates number of UEs for which channel info is provided", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6827 | },
6828 |
6829 | /* Section 7.5.2.12 */
6830 | { &hf_oran_timeOffset,
6831 | { "Time Offset", "oran_fh_cus.timeOffset",
6832 | FT_UINT16, BASE_DEC,
6833 | NULL((void*)0), 0x0,
6834 | "from start of the slot to start of CP in samples", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6835 | },
6836 |
6837 | /* Section 7.5.2.13 */
6838 | { &hf_oran_frameStructure_fft,
6839 | { "FFT Size", "oran_fh_cus.frameStructure.fft",
6840 | FT_UINT8, BASE_HEX | BASE_RANGE_STRING0x00000100,
6841 | RVALS(frame_structure_fft)((0 ? (const struct _range_string*)0 : ((frame_structure_fft) ))), 0xf0,
6842 | "The FFT/iFFT size being used for all IQ data processing related to this message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6843 | },
6844 |
6845 | /* Section 7.5.2.13 */
6846 | { &hf_oran_frameStructure_subcarrier_spacing,
6847 | { "Subcarrier Spacing", "oran_fh_cus.frameStructure.spacing",
6848 | FT_UINT8, BASE_HEX | BASE_RANGE_STRING0x00000100,
6849 | RVALS(subcarrier_spacings)((0 ? (const struct _range_string*)0 : ((subcarrier_spacings) ))), 0x0f,
6850 | "The sub carrier spacing as well as the number of slots per 1ms sub-frame",
6851 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6852 | },
6853 |
6854 | /* Section 7.5.2.14 */
6855 | { &hf_oran_cpLength,
6856 | { "cpLength", "oran_fh_cus.cpLength",
6857 | FT_UINT16, BASE_DEC,
6858 | NULL((void*)0), 0x0,
6859 | "cyclic prefix length", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6860 | },
6861 |
6862 | { &hf_oran_timing_header,
6863 | { "Timing Header", "oran_fh_cus.timingHeader",
6864 | FT_STRING, BASE_NONE,
6865 | NULL((void*)0), 0x0,
6866 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6867 | },
6868 |
6869 | /* Section 7.5.3.1 */
6870 | { &hf_oran_section_id,
6871 | { "sectionId", "oran_fh_cus.sectionId",
6872 | FT_UINT16, BASE_DEC,
6873 | NULL((void*)0), 0xfff0,
6874 | "section identifier of data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6875 | },
6876 |
6877 | /* Section 7.5.3.2 */
6878 | { &hf_oran_rb,
6879 | { "rb", "oran_fh_cus.rb",
6880 | FT_UINT8, BASE_DEC,
6881 | VALS(rb_vals)((0 ? (const struct _value_string*)0 : ((rb_vals)))), 0x08,
6882 | "resource block indicator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6883 | },
6884 |
6885 | /* Section 7.5.5.3 */
6886 | { &hf_oran_symInc,
6887 | { "symInc", "oran_fh_cus.symInc",
6888 | FT_UINT8, BASE_DEC,
6889 | VALS(sym_inc_vals)((0 ? (const struct _value_string*)0 : ((sym_inc_vals)))), 0x04,
6890 | "Symbol Number Increment Command", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6891 | },
6892 |
6893 | /* Section 7.5.3.4 */
6894 | { &hf_oran_startPrbc,
6895 | { "startPrbc", "oran_fh_cus.startPrbc",
6896 | FT_UINT16, BASE_DEC,
6897 | NULL((void*)0), 0x03ff,
6898 | "Starting PRB of Control Plane Section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6899 | },
6900 |
6901 | /* Section 7.5.3.5 */
6902 | { &hf_oran_reMask_re1,
6903 | { "RE 1", "oran_fh_cus.reMask-RE1",
6904 | FT_BOOLEAN, 16,
6905 | TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable )))), 0x8000,
6906 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6907 | },
6908 | { &hf_oran_reMask_re2,
6909 | { "RE 2", "oran_fh_cus.reMask-RE2",
6910 | FT_BOOLEAN, 16,
6911 | TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable )))), 0x4000,
6912 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6913 | },
6914 | { &hf_oran_reMask_re3,
6915 | { "RE 3", "oran_fh_cus.reMask-RE3",
6916 | FT_BOOLEAN, 16,
6917 | TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable )))), 0x2000,
6918 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6919 | },
6920 | { &hf_oran_reMask_re4,
6921 | { "RE 4", "oran_fh_cus.reMask-RE4",
6922 | FT_BOOLEAN, 16,
6923 | TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable )))), 0x1000,
6924 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6925 | },
6926 | { &hf_oran_reMask_re5,
6927 | { "RE 5", "oran_fh_cus.reMask-RE5",
6928 | FT_BOOLEAN, 16,
6929 | TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable )))), 0x0800,
6930 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6931 | },
6932 | { &hf_oran_reMask_re6,
6933 | { "RE 6", "oran_fh_cus.reMask-RE6",
6934 | FT_BOOLEAN, 16,
6935 | TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable )))), 0x0400,
6936 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6937 | },
6938 | { &hf_oran_reMask_re7,
6939 | { "RE 7", "oran_fh_cus.reMask-RE7",
6940 | FT_BOOLEAN, 16,
6941 | TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable )))), 0x0200,
6942 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6943 | },
6944 | { &hf_oran_reMask_re8,
6945 | { "RE 8", "oran_fh_cus.reMask-RE8",
6946 | FT_BOOLEAN, 16,
6947 | TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable )))), 0x0100,
6948 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6949 | },
6950 | { &hf_oran_reMask_re9,
6951 | { "RE 9", "oran_fh_cus.reMask-RE9",
6952 | FT_BOOLEAN, 16,
6953 | TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable )))), 0x0080,
6954 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6955 | },
6956 | { &hf_oran_reMask_re10,
6957 | { "RE 10", "oran_fh_cus.reMask-RE10",
6958 | FT_BOOLEAN, 16,
6959 | TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable )))), 0x0040,
6960 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6961 | },
6962 | { &hf_oran_reMask_re11,
6963 | { "RE 11", "oran_fh_cus.reMask-RE11",
6964 | FT_BOOLEAN, 16,
6965 | TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable )))), 0x0020,
6966 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6967 | },
6968 | { &hf_oran_reMask_re12,
6969 | { "RE 12", "oran_fh_cus.reMask-RE12",
6970 | FT_BOOLEAN, 16,
6971 | TFS(&tfs_applicable_not_applicable)((0 ? (const struct true_false_string*)0 : ((&tfs_applicable_not_applicable )))), 0x0010,
6972 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6973 | },
6974 | { &hf_oran_reMask,
6975 | { "RE Mask", "oran_fh_cus.reMask",
6976 | FT_UINT16, BASE_HEX,
6977 | NULL((void*)0), 0xfff0,
6978 | "The Resource Element (RE) mask within a PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6979 | },
6980 |
6981 | /* Section 7.5.3.6 */
6982 | { &hf_oran_numPrbc,
6983 | { "numPrbc", "oran_fh_cus.numPrbc",
6984 | FT_UINT8, BASE_DEC,
6985 | NULL((void*)0), 0x0,
6986 | "Number of contiguous PRBs per data section description", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6987 | },
6988 |
6989 | /* Section 7.5.3.7 */
6990 | { &hf_oran_numSymbol,
6991 | { "Number of Symbols", "oran_fh_cus.numSymbol",
6992 | FT_UINT8, BASE_DEC,
6993 | NULL((void*)0), 0x0f,
6994 | "Defines number of symbols to which the section control is applicable", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
6995 | },
6996 |
6997 | /* Section 7.5.3.8 */
6998 | { &hf_oran_ef,
6999 | { "Extension Flag", "oran_fh_cus.ef",
7000 | FT_BOOLEAN, 8,
7001 | NULL((void*)0), 0x80,
7002 | "Indicates if more section extensions follow", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7003 | },
7004 |
7005 | /* Section 7.5.3.9 */
7006 | { &hf_oran_beamId,
7007 | { "Beam ID", "oran_fh_cus.beamId",
7008 | FT_UINT16, BASE_DEC,
7009 | NULL((void*)0), 0x7fff,
7010 | "Defines the beam pattern to be applied to the U-Plane data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7011 | },
7012 |
7013 | { &hf_oran_extension,
7014 | { "Extension", "oran_fh_cus.extension",
7015 | FT_STRING, BASE_NONE,
7016 | NULL((void*)0), 0x0,
7017 | "Section extension", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7018 | },
7019 |
7020 | /* Section 7.6.2.1 */
7021 | { &hf_oran_exttype,
7022 | { "extType", "oran_fh_cus.extType",
7023 | FT_UINT8, BASE_DEC,
7024 | VALS(exttype_vals)((0 ? (const struct _value_string*)0 : ((exttype_vals)))), 0x7f,
7025 | "The extension type, which provides additional parameters specific to subject data extension", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7026 | },
7027 |
7028 | /* Section 7.6.2.3 */
7029 | { &hf_oran_extlen,
7030 | { "extLen", "oran_fh_cus.extLen",
7031 | FT_UINT16, BASE_DEC,
7032 | NULL((void*)0), 0x0,
7033 | "Extension length in 32-bit words", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7034 | },
7035 |
7036 | /* Section 7.7.1 */
7037 | { &hf_oran_bfw,
7038 | { "bfw", "oran_fh_cus.bfw",
7039 | FT_STRING, BASE_NONE,
7040 | NULL((void*)0), 0x0,
7041 | "Set of weights for a particular antenna", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7042 | },
7043 | { &hf_oran_bfw_bundle,
7044 | { "Bundle", "oran_fh_cus.bfw.bundle",
7045 | FT_STRING, BASE_NONE,
7046 | NULL((void*)0), 0x0,
7047 | "Bundle of BFWs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7048 | },
7049 | { &hf_oran_bfw_bundle_id,
7050 | { "Bundle Id", "oran_fh_cus.bfw.bundleId",
7051 | FT_UINT32, BASE_DEC,
7052 | NULL((void*)0), 0x0,
7053 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7054 | },
7055 | /* Section 7.7.1.4 */
7056 | { &hf_oran_bfw_i,
7057 | { "bfwI", "oran_fh_cus.bfwI",
7058 | FT_FLOAT, BASE_NONE,
7059 | NULL((void*)0), 0x0,
7060 | "In-phase", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7061 | },
7062 | /* Section 7.7.1.5 */
7063 | { &hf_oran_bfw_q,
7064 | { "bfwQ", "oran_fh_cus.bfwQ",
7065 | FT_FLOAT, BASE_NONE,
7066 | NULL((void*)0), 0x0,
7067 | "Quadrature", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7068 | },
7069 |
7070 | /* Section 7.5.3.10 */
7071 | { &hf_oran_ueId,
7072 | { "UE ID", "oran_fh_cus.ueId",
7073 | FT_UINT16, BASE_DEC,
7074 | NULL((void*)0), 0x7fff,
7075 | "logical identifier for set of channel info", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7076 | },
7077 |
7078 | /* Section 7.5.3.11 */
7079 | { &hf_oran_freqOffset,
7080 | { "Frequency Offset", "oran_fh_cus.freqOffset",
7081 | FT_UINT24, BASE_DEC,
7082 | NULL((void*)0), 0x0,
7083 | "with respect to the carrier center frequency before additional filtering", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7084 | },
7085 |
7086 | /* Section 7.5.3.12 */
7087 | { &hf_oran_regularizationFactor,
7088 | { "Regularization Factor", "oran_fh_cus.regularizationFactor",
7089 | FT_INT16, BASE_DEC,
7090 | NULL((void*)0), 0x0,
7091 | "Signed value to support MMSE operation within O-RU", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7092 | },
7093 |
7094 | /* Section 7.5.3.14 */
7095 | { &hf_oran_laaMsgType,
7096 | { "LAA Message Type", "oran_fh_cus.laaMsgType",
7097 | FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
7098 | RVALS(laaMsgTypes)((0 ? (const struct _range_string*)0 : ((laaMsgTypes)))), 0xf0,
7099 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7100 | },
7101 |
7102 | /* Section 7.5.3.15 */
7103 | { &hf_oran_laaMsgLen,
7104 | { "LAA Message Length", "oran_fh_cus.laaMsgLen",
7105 | FT_UINT8, BASE_DEC,
7106 | NULL((void*)0), 0x0f,
7107 | "number of 32-bit words in the LAA section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7108 | },
7109 |
7110 | /* Section 7.5.3.16 */
7111 | { &hf_oran_lbtHandle,
7112 | { "LBT Handle", "oran_fh_cus.lbtHandle",
7113 | FT_UINT16, BASE_HEX,
7114 | NULL((void*)0), 0x0,
7115 | "label to identify transaction", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7116 | },
7117 |
7118 | /* Section 7.5.3.17 */
7119 | { &hf_oran_lbtDeferFactor,
7120 | { "Defer Factor", "oran_fh_cus.lbtDeferFactor",
7121 | FT_UINT8, BASE_DEC,
7122 | NULL((void*)0), 0x07,
7123 | "Defer factor in sensing slots as described in 3GPP TS 36.213 Section 15.1.1", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7124 | },
7125 |
7126 | /* Section 7.5.3.18 */
7127 | { &hf_oran_lbtBackoffCounter,
7128 | { "Backoff Counter", "oran_fh_cus.lbtBackoffCounter",
7129 | FT_UINT16, BASE_DEC,
7130 | NULL((void*)0), 0xffc0,
7131 | "LBT backoff counter in sensing slots as described in 3GPP TS 36.213 Section 15.1.1", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7132 | },
7133 |
7134 | /* Section 7.5.3.19 */
7135 | { &hf_oran_lbtOffset,
7136 | { "LBT Offset", "oran_fh_cus.lbtOffset",
7137 | FT_UINT16, BASE_DEC,
7138 | NULL((void*)0), 0xffc0,
7139 | "LBT start time in microseconds from the beginning of the subframe scheduled by this message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7140 | },
7141 |
7142 | /* Section 7.5.3.20 */
7143 | { &hf_oran_MCOT,
7144 | { "Maximum Channel Occupancy Time", "oran_fh_cus.MCOT",
7145 | FT_UINT8, BASE_DEC,
7146 | NULL((void*)0), 0x3c,
7147 | "LTE TXOP duration in subframes as described in 3GPP TS 36.213 Section 15.1.1", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7148 | },
7149 |
7150 | /* Section 7.5.3.21 */
7151 | { &hf_oran_lbtMode,
7152 | { "LBT Mode", "oran_fh_cus.lbtMode",
7153 | FT_UINT8, BASE_DEC,
7154 | VALS(lbtMode_vals)((0 ? (const struct _value_string*)0 : ((lbtMode_vals)))), 0x0,
7155 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7156 | },
7157 |
7158 | /* Section 7.5.3.22 */
7159 | { &hf_oran_lbtPdschRes,
7160 | { "lbtPdschRes", "oran_fh_cus.lbtPdschRes",
7161 | FT_UINT8, BASE_DEC,
7162 | VALS(lbtPdschRes_vals)((0 ? (const struct _value_string*)0 : ((lbtPdschRes_vals)))), 0xc0,
7163 | "LBT result of SFN/SF", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7164 | },
7165 |
7166 | /* Section 7.5.3.23 */
7167 | { &hf_oran_sfStatus,
7168 | { "sfStatus", "oran_fh_cus.sfStatus",
7169 | FT_BOOLEAN, 8,
7170 | TFS(&tfs_sfStatus)((0 ? (const struct true_false_string*)0 : ((&tfs_sfStatus )))), 0x10,
7171 | "Indicates whether the subframe was dropped or transmitted", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7172 | },
7173 |
7174 | /* Section 7.5.3.22 */
7175 | { &hf_oran_lbtDrsRes,
7176 | { "lbtDrsRes", "oran_fh_cus.lbtDrsRes",
7177 | FT_BOOLEAN, 8,
7178 | TFS(&tfs_fail_success)((0 ? (const struct true_false_string*)0 : ((&tfs_fail_success )))), 0x80,
7179 | "Indicates whether the subframe was dropped or transmitted", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7180 | },
7181 |
7182 | /* Section 7.5.3.25 */
7183 | { &hf_oran_initialPartialSF,
7184 | { "Initial partial SF", "oran_fh_cus.initialPartialSF",
7185 | FT_BOOLEAN, 8,
7186 | TFS(&tfs_partial_full_sf)((0 ? (const struct true_false_string*)0 : ((&tfs_partial_full_sf )))), 0x40,
7187 | "Indicates whether the initial SF in the LBT process is full or partial", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7188 | },
7189 |
7190 | /* Section 7.5.3.26. */
7191 | { &hf_oran_lbtBufErr,
7192 | { "lbtBufErr", "oran_fh_cus.lbtBufErr",
7193 | FT_BOOLEAN, 8,
7194 | TFS(&tfs_lbtBufErr)((0 ? (const struct true_false_string*)0 : ((&tfs_lbtBufErr )))), 0x80,
7195 | "LBT buffer error", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7196 | },
7197 |
7198 | /* Section 7.5.3.27 */
7199 | { &hf_oran_sfnSfEnd,
7200 | { "SFN/SF End", "oran_fh_cus.sfnSfEnd",
7201 | FT_UINT16, BASE_DEC,
7202 | NULL((void*)0), 0x0fff,
7203 | "SFN/SF by which the DRS window must end", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7204 | },
7205 |
7206 | /* Section 7.5.3.28 */
7207 | { &hf_oran_lbtCWConfig_H,
7208 | { "lbtCWConfig_H", "oran_fh_cus.lbtCWConfig_H",
7209 | FT_UINT8, BASE_DEC,
7210 | NULL((void*)0), 0x0,
7211 | "HARQ parameters for congestion window management", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7212 | },
7213 |
7214 | /* Section 7.5.3.29 */
7215 | { &hf_oran_lbtCWConfig_T,
7216 | { "lbtCWConfig_T", "oran_fh_cus.lbtCWConfig_T",
7217 | FT_UINT8, BASE_DEC,
7218 | NULL((void*)0), 0x0,
7219 | "TB parameters for congestion window management", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7220 | },
7221 |
7222 | /* Section 7.5.3.30 */
7223 | { &hf_oran_lbtTrafficClass,
7224 | { "lbtTrafficClass", "oran_fh_cus.lbtTrafficClass",
7225 | FT_UINT8, BASE_DEC,
7226 | VALS(lbtTrafficClass_vals)((0 ? (const struct _value_string*)0 : ((lbtTrafficClass_vals )))), 0x38,
7227 | "Traffic class priority for congestion window management", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7228 | },
7229 |
7230 | /* Section 7.5.3.31 */
7231 | { &hf_oran_lbtCWR_Rst,
7232 | { "lbtCWR_Rst", "oran_fh_cus.lbtCWR_Rst",
7233 | FT_BOOLEAN, 8,
7234 | TFS(&tfs_fail_success)((0 ? (const struct true_false_string*)0 : ((&tfs_fail_success )))), 0x80,
7235 | "notification about packet reception successful or not", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7236 | },
7237 |
7238 | /* Reserved fields */
7239 | { &hf_oran_reserved,
7240 | { "reserved", "oran_fh_cus.reserved",
7241 | FT_UINT64, BASE_HEX,
7242 | NULL((void*)0), 0x0,
7243 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7244 | },
7245 |
7246 | { &hf_oran_reserved_1bit,
7247 | { "reserved", "oran_fh_cus.reserved",
7248 | FT_UINT8, BASE_HEX,
7249 | NULL((void*)0), 0x80,
7250 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7251 | },
7252 | { &hf_oran_reserved_2bits,
7253 | { "reserved", "oran_fh_cus.reserved",
7254 | FT_UINT8, BASE_HEX,
7255 | NULL((void*)0), 0xc0,
7256 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7257 | },
7258 | { &hf_oran_reserved_3bits,
7259 | { "reserved", "oran_fh_cus.reserved",
7260 | FT_UINT8, BASE_HEX,
7261 | NULL((void*)0), 0xe0,
7262 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7263 | },
7264 | { &hf_oran_reserved_4bits,
7265 | { "reserved", "oran_fh_cus.reserved",
7266 | FT_UINT8, BASE_HEX,
7267 | NULL((void*)0), 0xf0,
7268 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7269 | },
7270 | { &hf_oran_reserved_last_4bits,
7271 | { "reserved", "oran_fh_cus.reserved",
7272 | FT_UINT8, BASE_HEX,
7273 | NULL((void*)0), 0x0f,
7274 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7275 | },
7276 | { &hf_oran_reserved_last_5bits,
7277 | { "reserved", "oran_fh_cus.reserved",
7278 | FT_UINT8, BASE_HEX,
7279 | NULL((void*)0), 0x1f,
7280 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7281 | },
7282 | { &hf_oran_reserved_6bits,
7283 | { "reserved", "oran_fh_cus.reserved",
7284 | FT_UINT8, BASE_HEX,
7285 | NULL((void*)0), 0xfc,
7286 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7287 | },
7288 | { &hf_oran_reserved_last_6bits,
7289 | { "reserved", "oran_fh_cus.reserved",
7290 | FT_UINT8, BASE_HEX,
7291 | NULL((void*)0), 0x3f,
7292 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7293 | },
7294 | { &hf_oran_reserved_7bits,
7295 | { "reserved", "oran_fh_cus.reserved",
7296 | FT_UINT8, BASE_HEX,
7297 | NULL((void*)0), 0xfe,
7298 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7299 | },
7300 | { &hf_oran_reserved_last_7bits,
7301 | { "reserved", "oran_fh_cus.reserved",
7302 | FT_UINT8, BASE_HEX,
7303 | NULL((void*)0), 0x7f,
7304 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7305 | },
7306 | { &hf_oran_reserved_8bits,
7307 | { "reserved", "oran_fh_cus.reserved",
7308 | FT_UINT8, BASE_HEX,
7309 | NULL((void*)0), 0x0,
7310 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7311 | },
7312 | { &hf_oran_reserved_16bits,
7313 | { "reserved", "oran_fh_cus.reserved",
7314 | FT_UINT16, BASE_HEX,
7315 | NULL((void*)0), 0x0,
7316 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7317 | },
7318 | { &hf_oran_reserved_15bits,
7319 | { "reserved", "oran_fh_cus.reserved",
7320 | FT_UINT16, BASE_HEX,
7321 | NULL((void*)0), 0x7fff,
7322 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7323 | },
7324 | { &hf_oran_reserved_bit1,
7325 | { "reserved", "oran_fh_cus.reserved",
7326 | FT_UINT8, BASE_HEX,
7327 | NULL((void*)0), 0x40,
7328 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7329 | },
7330 | { &hf_oran_reserved_bit2,
7331 | { "reserved", "oran_fh_cus.reserved",
7332 | FT_UINT8, BASE_HEX,
7333 | NULL((void*)0), 0x20,
7334 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7335 | },
7336 | { &hf_oran_reserved_bit4,
7337 | { "reserved", "oran_fh_cus.reserved",
7338 | FT_UINT8, BASE_HEX,
7339 | NULL((void*)0), 0x08,
7340 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7341 | },
7342 | { &hf_oran_reserved_bit5,
7343 | { "reserved", "oran_fh_cus.reserved",
7344 | FT_UINT8, BASE_HEX,
7345 | NULL((void*)0), 0x04,
7346 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7347 | },
7348 | { &hf_oran_reserved_bits123,
7349 | { "reserved", "oran_fh_cus.reserved",
7350 | FT_UINT8, BASE_HEX,
7351 | NULL((void*)0), 0x70,
7352 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7353 | },
7354 | { &hf_oran_reserved_bits456,
7355 | { "reserved", "oran_fh_cus.reserved",
7356 | FT_UINT8, BASE_HEX,
7357 | NULL((void*)0), 0x0e,
7358 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7359 | },
7360 |
7361 |
7362 | /* 7.7.11.10 */
7363 | { &hf_oran_bundle_offset,
7364 | { "BundleOffset", "oran_fh_cus.bundleOffset",
7365 | FT_UINT8, BASE_DEC,
7366 | NULL((void*)0), 0x3f,
7367 | "offset between start of first PRB bundle and startPrbc", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7368 | },
7369 | /* 7.7.11.9 */
7370 | { &hf_oran_cont_ind,
7371 | { "contInd", "oran_fh_cus.contInd",
7372 | FT_BOOLEAN, 8,
7373 | TFS(&continuity_indication_tfs)((0 ? (const struct true_false_string*)0 : ((&continuity_indication_tfs )))), 0x80,
7374 | "PRB region continuity flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7375 | },
7376 |
7377 | /* 7.7.1.2 bfwCompHdr (beamforming weight compression header) */
7378 | { &hf_oran_bfwCompHdr,
7379 | { "bfwCompHdr", "oran_fh_cus.bfwCompHdr",
7380 | FT_STRING, BASE_NONE,
7381 | NULL((void*)0), 0x0,
7382 | "Compression method and IQ bit width for beamforming weights", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7383 | },
7384 | { &hf_oran_bfwCompHdr_iqWidth,
7385 | { "IQ Bit Width", "oran_fh_cus.bfwCompHdr_iqWidth",
7386 | FT_UINT8, BASE_HEX,
7387 | VALS(bfw_comp_headers_iq_width)((0 ? (const struct _value_string*)0 : ((bfw_comp_headers_iq_width )))), 0xf0,
7388 | "IQ bit width for the beamforming weights", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7389 | },
7390 | { &hf_oran_bfwCompHdr_compMeth,
7391 | { "Compression Method", "oran_fh_cus.bfwCompHdr_compMeth",
7392 | FT_UINT8, BASE_HEX,
7393 | VALS(bfw_comp_headers_comp_meth)((0 ? (const struct _value_string*)0 : ((bfw_comp_headers_comp_meth )))), 0x0f,
7394 | "compression method for the beamforming weights", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7395 | },
7396 |
7397 | /* 7.5.3.32 */
7398 | { &hf_oran_ciCompParam,
7399 | { "ciCompParam", "oran_fh_cus.ciCompParam",
7400 | FT_STRING, BASE_NONE,
7401 | NULL((void*)0), 0x0,
7402 | "channel information compression parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7403 | },
7404 |
7405 | /* Table 7.5.3.32-1 */
7406 | { &hf_oran_blockScaler,
7407 | { "blockScaler", "oran_fh_cus.blockScaler",
7408 | FT_UINT8, BASE_HEX,
7409 | NULL((void*)0), 0x0,
7410 | "unsigned, 1 integer bit, 7 fractional bits", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7411 | },
7412 | { &hf_oran_compBitWidth,
7413 | { "compBitWidth", "oran_fh_cus.compBitWidth",
7414 | FT_UINT8, BASE_DEC,
7415 | NULL((void*)0), 0xf0,
7416 | "Length of I bits and length of Q bits after compression over entire PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7417 | },
7418 | { &hf_oran_compShift,
7419 | { "compShift", "oran_fh_cus.compShift",
7420 | FT_UINT8, BASE_DEC,
7421 | NULL((void*)0), 0x0f,
7422 | "The shift applied to the entire PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7423 | },
7424 |
7425 | { &hf_oran_active_beamspace_coefficient_n1,
7426 | { "N1", "oran_fh_cus.activeBeamspace_Coefficient_n1",
7427 | FT_BOOLEAN, 8,
7428 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x80,
7429 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7430 | },
7431 | { &hf_oran_active_beamspace_coefficient_n2,
7432 | { "N2", "oran_fh_cus.activeBeamspace_Coefficient_n2",
7433 | FT_BOOLEAN, 8,
7434 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x40,
7435 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7436 | },
7437 | { &hf_oran_active_beamspace_coefficient_n3,
7438 | { "N3", "oran_fh_cus.activeBeamspace_Coefficient_n3",
7439 | FT_BOOLEAN, 8,
7440 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x20,
7441 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7442 | },
7443 | { &hf_oran_active_beamspace_coefficient_n4,
7444 | { "N4", "oran_fh_cus.activeBeamspace_Coefficient_n4",
7445 | FT_BOOLEAN, 8,
7446 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x10,
7447 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7448 | },
7449 | { &hf_oran_active_beamspace_coefficient_n5,
7450 | { "N5", "oran_fh_cus.activeBeamspace_Coefficient_n5",
7451 | FT_BOOLEAN, 8,
7452 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x08,
7453 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7454 | },
7455 | { &hf_oran_active_beamspace_coefficient_n6,
7456 | { "N6", "oran_fh_cus.activeBeamspace_Coefficient_n6",
7457 | FT_BOOLEAN, 8,
7458 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x04,
7459 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7460 | },
7461 | { &hf_oran_active_beamspace_coefficient_n7,
7462 | { "N7", "oran_fh_cus.activeBeamspace_Coefficient_n7",
7463 | FT_BOOLEAN, 8,
7464 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x02,
7465 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7466 | },
7467 | { &hf_oran_active_beamspace_coefficient_n8,
7468 | { "N8", "oran_fh_cus.activeBeamspace_Coefficient_n8",
7469 | FT_BOOLEAN, 8,
7470 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x01,
7471 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7472 | },
7473 |
7474 | { &hf_oran_activeBeamspaceCoefficientMask,
7475 | { "activeBeamspaceCoefficientMask", "oran_fh_cus.activeBeamspaceCoefficientMask",
7476 | FT_UINT8, BASE_HEX,
7477 | NULL((void*)0), 0xff,
7478 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7479 | },
7480 | { &hf_oran_activeBeamspaceCoefficientMask_bits_set,
7481 | { "Array elements set", "oran_fh_cus.activeBeamspaceCoefficientMask.bits-set",
7482 | FT_UINT32, BASE_DEC,
7483 | NULL((void*)0), 0x0,
7484 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7485 | },
7486 |
7487 | /* Section 7.7.6.6 */
7488 | { &hf_oran_se6_repetition,
7489 | { "repetition", "oran_fh_cus.repetition",
7490 | FT_BOOLEAN, BASE_NONE,
7491 | TFS(&repetition_se6_tfs)((0 ? (const struct true_false_string*)0 : ((&repetition_se6_tfs )))), 0x0,
7492 | "Repetition of a highest priority data section for C-Plane", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7493 | },
7494 | /* 7.7.20.9 */
7495 | { &hf_oran_rbgSize,
7496 | { "rbgSize", "oran_fh_cus.rbgSize",
7497 | FT_UINT8, BASE_HEX,
7498 | VALS(rbg_size_vals)((0 ? (const struct _value_string*)0 : ((rbg_size_vals)))), 0x70,
7499 | "Number of PRBs of the resource block groups allocated by the bit mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7500 | },
7501 | /* 7.7.20.10 */
7502 | { &hf_oran_rbgMask,
7503 | { "rbgMask", "oran_fh_cus.rbgMask",
7504 | FT_UINT32, BASE_HEX,
7505 | NULL((void*)0), 0x0fffffff,
7506 | "Each bit indicates whether a corresponding resource block group is present", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7507 | },
7508 | /* 7.7.6.5. Also 7.7.12.3 and 7.7.19.5 */
7509 | { &hf_oran_noncontig_priority,
7510 | { "priority", "oran_fh_cus.priority",
7511 | FT_UINT8, BASE_HEX,
7512 | VALS(priority_vals)((0 ? (const struct _value_string*)0 : ((priority_vals)))), 0xc0,
7513 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7514 | },
7515 |
7516 | /* 7.7.6.4 */
7517 | { &hf_oran_symbol_mask,
7518 | { "symbolMask", "oran_fh_cus.symbolMask",
7519 | FT_UINT16, BASE_HEX,
7520 | NULL((void*)0), 0x3fff,
7521 | "Each bit indicates whether the rbgMask applies to a given symbol in the slot", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7522 | },
7523 | { &hf_oran_symbol_mask_s13,
7524 | { "symbol 13", "oran_fh_cus.symbolMask.symbol-13",
7525 | FT_BOOLEAN, 16,
7526 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x2000,
7527 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7528 | },
7529 | { &hf_oran_symbol_mask_s12,
7530 | { "symbol 12", "oran_fh_cus.symbolMask.symbol-12",
7531 | FT_BOOLEAN, 16,
7532 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x1000,
7533 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7534 | },
7535 | { &hf_oran_symbol_mask_s11,
7536 | { "symbol 11", "oran_fh_cus.symbolMask.symbol-11",
7537 | FT_BOOLEAN, 16,
7538 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0800,
7539 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7540 | },
7541 | { &hf_oran_symbol_mask_s10,
7542 | { "symbol 10", "oran_fh_cus.symbolMask.symbol-10",
7543 | FT_BOOLEAN, 16,
7544 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0400,
7545 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7546 | },
7547 | { &hf_oran_symbol_mask_s9,
7548 | { "symbol 9", "oran_fh_cus.symbolMask.symbol-9",
7549 | FT_BOOLEAN, 16,
7550 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0200,
7551 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7552 | },
7553 | { &hf_oran_symbol_mask_s8,
7554 | { "symbol 8", "oran_fh_cus.symbolMask.symbol-8",
7555 | FT_BOOLEAN, 16,
7556 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0100,
7557 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7558 | },
7559 | { &hf_oran_symbol_mask_s7,
7560 | { "symbol 7", "oran_fh_cus.symbolMask.symbol-7",
7561 | FT_BOOLEAN, 16,
7562 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0080,
7563 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7564 | },
7565 | { &hf_oran_symbol_mask_s6,
7566 | { "symbol 6", "oran_fh_cus.symbolMask.symbol-6",
7567 | FT_BOOLEAN, 16,
7568 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0040,
7569 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7570 | },
7571 | { &hf_oran_symbol_mask_s5,
7572 | { "symbol 5", "oran_fh_cus.symbolMask.symbol-5",
7573 | FT_BOOLEAN, 16,
7574 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0020,
7575 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7576 | },
7577 | { &hf_oran_symbol_mask_s4,
7578 | { "symbol 4", "oran_fh_cus.symbolMask.symbol-4",
7579 | FT_BOOLEAN, 16,
7580 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0010,
7581 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7582 | },
7583 | { &hf_oran_symbol_mask_s3,
7584 | { "symbol 3", "oran_fh_cus.symbolMask.symbol-3",
7585 | FT_BOOLEAN, 16,
7586 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0008,
7587 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7588 | },
7589 | { &hf_oran_symbol_mask_s2,
7590 | { "symbol 2", "oran_fh_cus.symbolMask.symbol-2",
7591 | FT_BOOLEAN, 16,
7592 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0004,
7593 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7594 | },
7595 | { &hf_oran_symbol_mask_s1,
7596 | { "symbol 1", "oran_fh_cus.symbolMask.symbol-1",
7597 | FT_BOOLEAN, 16,
7598 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0002,
7599 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7600 | },
7601 | { &hf_oran_symbol_mask_s0,
7602 | { "symbol 0", "oran_fh_cus.symbolMask.symbol-0",
7603 | FT_BOOLEAN, 16,
7604 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0001,
7605 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7606 | },
7607 |
7608 |
7609 | /* 7.7.22.2 */
7610 | { &hf_oran_ack_nack_req_id,
7611 | { "ackNackReqId", "oran_fh_cus.ackNackReqId",
7612 | FT_UINT16, BASE_HEX,
7613 | NULL((void*)0), 0x0,
7614 | "Indicates the ACK/NACK request ID of a section description", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7615 | },
7616 |
7617 | /* Subtree for next 2 items */
7618 | { &hf_oran_frequency_range,
7619 | { "Frequency Range", "oran_fh_cus.frequencyRange",
7620 | FT_STRING, BASE_NONE,
7621 | NULL((void*)0), 0x0,
7622 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7623 | },
7624 |
7625 | /* 7.7.12.4 */
7626 | { &hf_oran_off_start_prb,
7627 | { "offStartPrb", "oran_fh_cus.offStartPrb",
7628 | FT_UINT8, BASE_DEC,
7629 | NULL((void*)0), 0x0,
7630 | "Offset of PRB range start", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7631 | },
7632 | /* 7.7.12.5 */
7633 | { &hf_oran_num_prb,
7634 | { "numPrb", "oran_fh_cus.numPrb",
7635 | FT_UINT8, BASE_DEC,
7636 | NULL((void*)0), 0x0,
7637 | "Number of PRBs in PRB range", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7638 | },
7639 |
7640 | /* symbolId 8.3.3.7 */
7641 | { &hf_oran_symbolId,
7642 | { "Symbol Identifier", "oran_fh_cus.symbolId",
7643 | FT_UINT8, BASE_DEC,
7644 | NULL((void*)0), 0x3f,
7645 | "Identifies a symbol number within a slot", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7646 | },
7647 |
7648 | /* startPrbu 8.3.3.11 */
7649 | { &hf_oran_startPrbu,
7650 | { "startPrbu", "oran_fh_cus.startPrbu",
7651 | FT_UINT16, BASE_DEC,
7652 | NULL((void*)0), 0x03ff,
7653 | "starting PRB of user plane section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7654 | },
7655 |
7656 | /* numPrbu 8.3.3.12 */
7657 | { &hf_oran_numPrbu,
7658 | { "numPrbu", "oran_fh_cus.numPrbu",
7659 | FT_UINT8, BASE_DEC,
7660 | NULL((void*)0), 0x0,
7661 | "number of PRBs per user plane section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7662 | },
7663 |
7664 | /* 7.7.1.3 */
7665 | { &hf_oran_bfwCompParam,
7666 | { "bfwCompParam", "oran_fh_cus.bfwCompParam",
7667 | FT_STRING, BASE_NONE,
7668 | NULL((void*)0), 0x0,
7669 | "Beamforming weight compression parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7670 | },
7671 |
7672 | /* 6.3.3.13 */
7673 | { &hf_oran_udCompHdrMeth,
7674 | { "User Data Compression Method", "oran_fh_cus.udCompHdrMeth",
7675 | FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
7676 | RVALS(ud_comp_header_meth)((0 ? (const struct _range_string*)0 : ((ud_comp_header_meth) ))), 0x0f,
7677 | "Defines the compression method for the user data in every section in the C-Plane message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7678 | },
7679 | { &hf_oran_udCompHdrMeth_pref,
7680 | { "User Data Compression Method", "oran_fh_cus.udCompHdrMeth",
7681 | FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
7682 | RVALS(ud_comp_header_meth)((0 ? (const struct _range_string*)0 : ((ud_comp_header_meth) ))), 0x0,
7683 | "Defines the compression method for the user data in every section in the C-Plane message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7684 | },
7685 | /* 8.3.3.18 */
7686 | { &hf_oran_udCompLen,
7687 | { "udCompLen", "oran_fh_cus.udCompLen",
7688 | FT_UINT16, BASE_DEC,
7689 | NULL((void*)0), 0x0,
7690 | "PRB field length in octets", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7691 | },
7692 |
7693 | /* 6.3.3.13 */
7694 | { &hf_oran_udCompHdrIqWidth,
7695 | { "User Data IQ width", "oran_fh_cus.udCompHdrWidth",
7696 | FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
7697 | RVALS(ud_comp_header_width)((0 ? (const struct _range_string*)0 : ((ud_comp_header_width )))), 0xf0,
7698 | "Defines the IQ bit width for the user data in every section in the C-Plane message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7699 | },
7700 | { &hf_oran_udCompHdrIqWidth_pref,
7701 | { "User Data IQ width", "oran_fh_cus.udCompHdrWidth",
7702 | FT_UINT8, BASE_DEC,
7703 | NULL((void*)0), 0x0,
7704 | "Defines the IQ bit width for the user data in every section in the C-Plane message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7705 | },
7706 |
7707 | { &hf_oran_sinrCompHdrIqWidth_pref,
7708 | { "SINR IQ width", "oran_fh_cus.sinrCompHdrWidth",
7709 | FT_UINT8, BASE_DEC,
7710 | NULL((void*)0), 0x0,
7711 | "Defines the IQ bit width for SINR data in section type 9", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7712 | },
7713 | { &hf_oran_sinrCompHdrMeth_pref,
7714 | { "SINR Compression Method", "oran_fh_cus.sinrCompHdrMeth",
7715 | FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
7716 | RVALS(ud_comp_header_meth)((0 ? (const struct _range_string*)0 : ((ud_comp_header_meth) ))), 0x0,
7717 | "Defines the compression method for SINR data in section type 9", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7718 | },
7719 |
7720 | /* Section 8.3.3.15 (not always present - depends upon meth) */
7721 | { &hf_oran_udCompParam,
7722 | { "User Data Compression Parameter", "oran_fh_cus.udCompParam",
7723 | FT_STRING, BASE_NONE,
7724 | NULL((void*)0), 0x0,
7725 | "Applies to whatever compression method is specified by the associated sectionID's compMeth value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7726 | },
7727 | /* 8.3.3.18 */
7728 | { &hf_oran_sReSMask,
7729 | { "sReSMask", "oran_fh_cus.sReSMask",
7730 | FT_UINT16, BASE_HEX,
7731 | NULL((void*)0), 0xf0ff,
7732 | "selective RE sending mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7733 | },
7734 |
7735 | { &hf_oran_sReSMask_re12,
7736 | { "RE-12", "oran_fh_cus.sReSMask-re12",
7737 | FT_BOOLEAN, 16,
7738 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x8000,
7739 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7740 | },
7741 | { &hf_oran_sReSMask_re11,
7742 | { "RE-11", "oran_fh_cus.sReSMask-re11",
7743 | FT_BOOLEAN, 16,
7744 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x4000,
7745 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7746 | },
7747 | { &hf_oran_sReSMask_re10,
7748 | { "RE-10", "oran_fh_cus.sReSMask-re10",
7749 | FT_BOOLEAN, 16,
7750 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x2000,
7751 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7752 | },
7753 | { &hf_oran_sReSMask_re9,
7754 | { "RE-9", "oran_fh_cus.sReSMask-re9",
7755 | FT_BOOLEAN, 16,
7756 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x1000,
7757 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7758 | },
7759 | { &hf_oran_sReSMask_re8,
7760 | { "RE-8", "oran_fh_cus.sReSMask-re8",
7761 | FT_BOOLEAN, 16,
7762 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0080,
7763 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7764 | },
7765 | { &hf_oran_sReSMask_re7,
7766 | { "RE-7", "oran_fh_cus.sReSMask-re7",
7767 | FT_BOOLEAN, 16,
7768 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0040,
7769 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7770 | },
7771 | { &hf_oran_sReSMask_re6,
7772 | { "RE-6", "oran_fh_cus.sReSMask-re6",
7773 | FT_BOOLEAN, 16,
7774 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0020,
7775 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7776 | },
7777 | { &hf_oran_sReSMask_re5,
7778 | { "RE-5", "oran_fh_cus.sReSMask-re5",
7779 | FT_BOOLEAN, 16,
7780 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0010,
7781 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7782 | },
7783 | { &hf_oran_sReSMask_re4,
7784 | { "RE-4", "oran_fh_cus.sReSMask-re4",
7785 | FT_BOOLEAN, 16,
7786 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0008,
7787 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7788 | },
7789 | { &hf_oran_sReSMask_re3,
7790 | { "RE-3", "oran_fh_cus.sReSMask-re3",
7791 | FT_BOOLEAN, 16,
7792 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0004,
7793 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7794 | },
7795 | { &hf_oran_sReSMask_re2,
7796 | { "RE-2", "oran_fh_cus.sReSMask-re2",
7797 | FT_BOOLEAN, 16,
7798 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0002,
7799 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7800 | },
7801 | { &hf_oran_sReSMask_re1,
7802 | { "RE-1", "oran_fh_cus.sReSMask-re1",
7803 | FT_BOOLEAN, 16,
7804 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0001,
7805 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7806 | },
7807 |
7808 | /* 8.3.3.20 */
7809 | { &hf_oran_sReSMask1,
7810 | { "sReSMask1", "oran_fh_cus.sReSMask1",
7811 | FT_UINT16, BASE_HEX,
7812 | NULL((void*)0), 0x0fff,
7813 | "selective RE sending mask 1", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7814 | },
7815 | /* 8.3.3.21 */
7816 | { &hf_oran_sReSMask2,
7817 | { "sReSMask2", "oran_fh_cus.sReSMask2",
7818 | FT_UINT16, BASE_HEX,
7819 | NULL((void*)0), 0x0fff,
7820 | "selective RE sending mask 2", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7821 | },
7822 |
7823 | { &hf_oran_sReSMask1_2_re12,
7824 | { "RE-12", "oran_fh_cus.sReSMask-re12",
7825 | FT_BOOLEAN, 16,
7826 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0800,
7827 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7828 | },
7829 | { &hf_oran_sReSMask1_2_re11,
7830 | { "RE-11", "oran_fh_cus.sReSMask-re11",
7831 | FT_BOOLEAN, 16,
7832 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0400,
7833 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7834 | },
7835 | { &hf_oran_sReSMask1_2_re10,
7836 | { "RE-10", "oran_fh_cus.sReSMask-re10",
7837 | FT_BOOLEAN, 16,
7838 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0200,
7839 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7840 | },
7841 | { &hf_oran_sReSMask1_2_re9,
7842 | { "RE-9", "oran_fh_cus.sReSMask-re9",
7843 | FT_BOOLEAN, 16,
7844 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0100,
7845 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7846 | },
7847 |
7848 | /* Section 6.3.3.15 */
7849 | { &hf_oran_iSample,
7850 | { "iSample", "oran_fh_cus.iSample",
7851 | FT_FLOAT, BASE_NONE,
7852 | NULL((void*)0), 0x0,
7853 | "In-phase Sample value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7854 | },
7855 |
7856 | /* Section 6.3.3.16 */
7857 | { &hf_oran_qSample,
7858 | { "qSample", "oran_fh_cus.qSample",
7859 | FT_FLOAT, BASE_NONE,
7860 | NULL((void*)0), 0x0,
7861 | "Quadrature Sample value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7862 | },
7863 |
7864 | { &hf_oran_exponent,
7865 | { "Exponent", "oran_fh_cus.exponent",
7866 | FT_UINT8, BASE_DEC,
7867 | NULL((void*)0), 0x0f,
7868 | "Exponent applicable to the I & Q mantissas", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7869 | },
7870 |
7871 | { &hf_oran_iq_user_data,
7872 | { "IQ User Data", "oran_fh_cus.iq_user_data",
7873 | FT_BYTES, BASE_NONE,
7874 | NULL((void*)0), 0x0,
7875 | "Used for the In-phase and Quadrature sample mantissa", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7876 | },
7877 |
7878 |
7879 | { &hf_oran_u_section_ul_symbol_time,
7880 | { "Microseconds since first UL U-plane frame for this symbol", "oran_fh_cus.us-since-first-ul-frame",
7881 | FT_UINT32, BASE_DEC,
7882 | NULL((void*)0), 0x0,
7883 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7884 | },
7885 | { &hf_oran_u_section_ul_symbol_frames,
7886 | { "Number of UL frames sent for this symbol", "oran_fh_cus.number-ul-frames-in-symbol",
7887 | FT_UINT32, BASE_DEC,
7888 | NULL((void*)0), 0x0,
7889 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7890 | },
7891 | { &hf_oran_u_section_ul_symbol_first_frame,
7892 | { "First UL frame for this symbol", "oran_fh_cus.first-ul-frame-in-symbol",
7893 | FT_FRAMENUM, BASE_NONE,
7894 | FRAMENUM_TYPE(FT_FRAMENUM_NONE)((gpointer) (glong) (FT_FRAMENUM_NONE)), 0x0,
7895 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7896 | },
7897 | { &hf_oran_u_section_ul_symbol_last_frame,
7898 | { "Last UL frame for this symbol", "oran_fh_cus.last-ul-frame-in-symbol",
7899 | FT_FRAMENUM, BASE_NONE,
7900 | FRAMENUM_TYPE(FT_FRAMENUM_NONE)((gpointer) (glong) (FT_FRAMENUM_NONE)), 0x0,
7901 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7902 | },
7903 |
7904 | { &hf_oran_c_eAxC_ID,
7905 | { "c_eAxC_ID", "oran_fh_cus.c_eaxc_id",
7906 | FT_STRING, BASE_NONE,
7907 | NULL((void*)0), 0x0,
7908 | "This is a calculated field for the c_eAxC ID, which identifies the message stream", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7909 | },
7910 |
7911 | { &hf_oran_refa,
7912 | { "RefA", "oran_fh_cus.refa",
7913 | FT_STRING, BASE_NONE,
7914 | NULL((void*)0), 0x0,
7915 | "This is a calculated field for the RefA ID, which provides a reference in time", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7916 | },
7917 |
7918 |
7919 | /* Section 7.5.2.15 */
7920 | { &hf_oran_ciCompHdr,
7921 | { "ciCompHdr", "oran_fh_cus.ciCompHdr",
7922 | FT_STRING, BASE_NONE,
7923 | NULL((void*)0), 0x0,
7924 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7925 | },
7926 | { &hf_oran_ciCompHdrMeth,
7927 | { "User Data Compression Method", "oran_fh_cus.ciCompHdrMeth",
7928 | FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
7929 | RVALS(ud_comp_header_meth)((0 ? (const struct _range_string*)0 : ((ud_comp_header_meth) ))), 0x0e,
7930 | "Defines the compression method for the user data in every section in the C-Plane message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7931 | },
7932 | { &hf_oran_ciCompHdrIqWidth,
7933 | { "User Data IQ width", "oran_fh_cus.udCompHdrWidth",
7934 | FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
7935 | RVALS(ud_comp_header_width)((0 ? (const struct _range_string*)0 : ((ud_comp_header_width )))), 0xf0,
7936 | "Defines the IQ bit width for the user data in every section in the C-Plane message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7937 | },
7938 | { &hf_oran_ciCompOpt,
7939 | { "ciCompOpt", "oran_fh_cus.ciCompOpt",
7940 | FT_UINT8, BASE_DEC,
7941 | VALS(ci_comp_opt_vals)((0 ? (const struct _value_string*)0 : ((ci_comp_opt_vals)))), 0x01,
7942 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7943 | },
7944 |
7945 | /* 7.7.11.7 */
7946 | { &hf_oran_disable_bfws,
7947 | { "disableBFWs", "oran_fh_cus.disableBFWs",
7948 | FT_BOOLEAN, 8,
7949 | NULL((void*)0), 0x80,
7950 | "Indicate if BFWs under section extension are disabled", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7951 | },
7952 | /* 7.7.11.8 */
7953 | { &hf_oran_rad,
7954 | { "RAD", "oran_fh_cus.rad",
7955 | FT_BOOLEAN, 8,
7956 | NULL((void*)0), 0x40,
7957 | "Reset After PRB Discontinuity", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7958 | },
7959 | /* 7.7.11.4 */
7960 | { &hf_oran_num_bund_prbs,
7961 | { "numBundPrb", "oran_fh_cus.numBundPrb",
7962 | FT_UINT8, BASE_DEC,
7963 | NULL((void*)0), 0x0,
7964 | "Number of bundled PRBs per BFWs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7965 | },
7966 | { &hf_oran_beam_id,
7967 | { "beamId", "oran_fh_cus.beamId",
7968 | FT_UINT16, BASE_DEC,
7969 | NULL((void*)0), 0x7fff,
7970 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7971 | },
7972 | { &hf_oran_num_weights_per_bundle,
7973 | { "Num weights per bundle", "oran_fh_cus.num_weights_per_bundle",
7974 | FT_UINT16, BASE_DEC,
7975 | NULL((void*)0), 0x0,
7976 | "From dissector preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
7977 | },
7978 |
7979 | { &hf_oran_samples_prb,
7980 | {"PRB", "oran_fh_cus.prb",
7981 | FT_STRING, BASE_NONE,
7982 | NULL((void*)0), 0x0,
7983 | "Grouping of samples for a particular Physical Resource Block", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7984 | },
7985 |
7986 | /* 7.5.3.13 */
7987 | { &hf_oran_ciSample,
7988 | { "ciSample", "oran_fh_cus.ciSample",
7989 | FT_STRING, BASE_NONE,
7990 | NULL((void*)0), 0x0,
7991 | "Sample (I and Q values)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7992 | },
7993 | { &hf_oran_ciIsample,
7994 | { "ciIsample", "oran_fh_cus.ciISample",
7995 | FT_FLOAT, BASE_NONE,
7996 | NULL((void*)0), 0x0,
7997 | "Channel information complex value - I part", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
7998 | },
7999 | { &hf_oran_ciQsample,
8000 | { "ciQsample", "oran_fh_cus.ciQSample",
8001 | FT_FLOAT, BASE_NONE,
8002 | NULL((void*)0), 0x0,
8003 | "Channel information complex value - Q part", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8004 | },
8005 |
8006 | /* 7.7.10.2 */
8007 | { &hf_oran_beamGroupType,
8008 | { "beamGroupType", "oran_fh_cus.beamGroupType",
8009 | FT_UINT8, BASE_DEC,
8010 | VALS(beam_group_type_vals)((0 ? (const struct _value_string*)0 : ((beam_group_type_vals )))), 0xc0,
8011 | "The type of beam grouping", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8012 | },
8013 | /* 7.7.10.3 */
8014 | { &hf_oran_numPortc,
8015 | { "numPortc", "oran_fh_cus.numPortc",
8016 | FT_UINT8, BASE_DEC,
8017 | NULL((void*)0), 0x3f,
8018 | "The number of eAxC ports", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8019 | },
8020 |
8021 | /* 7.7.4.2 (1 bit) */
8022 | { &hf_oran_csf,
8023 | { "csf", "oran_fh_cus.csf",
8024 | FT_BOOLEAN, BASE_NONE,
8025 | NULL((void*)0), 0x0,
8026 | "constellation shift flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8027 | },
8028 | /* 7.7.4.3 */
8029 | { &hf_oran_modcompscaler,
8030 | { "modCompScaler", "oran_fh_cus.modcompscaler",
8031 | FT_UINT16, BASE_DEC,
8032 | NULL((void*)0), 0x7fff,
8033 | "modulation compression scaler value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8034 | },
8035 |
8036 | /* 7.7.5.1 */
8037 | { &hf_oran_modcomp_param_set,
8038 | { "Set", "oran_fh_cus.modcomp-param-set",
8039 | FT_STRING, BASE_NONE,
8040 | NULL((void*)0), 0x0,
8041 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8042 | },
8043 |
8044 | /* mcScaleReMask 7.7.5.2 (12 bits) */
8045 | { &hf_oran_mc_scale_re_mask,
8046 | { "mcScaleReMask", "oran_fh_cus.mcscaleremask",
8047 | FT_BOOLEAN, BASE_NONE,
8048 | NULL((void*)0), 0x0,
8049 | "modulation compression power scale RE mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8050 | },
8051 | /* mcScaleOffset 7.7.5.4 (15 bits) */
8052 | { &hf_oran_mc_scale_offset,
8053 | { "mcScaleOffset", "oran_fh_cus.mcscaleoffset",
8054 | FT_UINT24, BASE_DEC,
8055 | NULL((void*)0), 0x0,
8056 | "scaling value for modulation compression", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8057 | },
8058 | /* eAxCmask (7.7.7.2) */
8059 | { &hf_oran_eAxC_mask,
8060 | { "eAxC Mask", "oran_fh_cus.eaxcmask",
8061 | FT_UINT16, BASE_HEX,
8062 | NULL((void*)0), 0xffff,
8063 | "Which eAxC_ID values the C-Plane message applies to", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8064 | },
8065 | /* technology (interface name) 7.7.9.2 */
8066 | { &hf_oran_technology,
8067 | { "Technology", "oran_fh_cus.technology",
8068 | FT_UINT8, BASE_DEC,
8069 | VALS(interface_name_vals)((0 ? (const struct _value_string*)0 : ((interface_name_vals) ))), 0x0,
8070 | "Interface name (that C-PLane section applies to)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8071 | },
8072 | /* Exttype 14 (7.7.14.2) */
8073 | { &hf_oran_nullLayerInd,
8074 | { "nullLayerInd", "oran_fh_cus.nulllayerind",
8075 | FT_BOOLEAN, BASE_NONE,
8076 | NULL((void*)0), 0x0,
8077 | "Whether corresponding layer is nulling-layer or not", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8078 | },
8079 |
8080 | /* Exttype 19 */
8081 | /* 7.7.19.3 */
8082 | { &hf_oran_se19_repetition,
8083 | { "repetition", "oran_fh_cus.repetition",
8084 | FT_BOOLEAN, BASE_NONE,
8085 | TFS(&repetition_se19_tfs)((0 ? (const struct true_false_string*)0 : ((&repetition_se19_tfs )))), 0x0,
8086 | "repeat port info flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8087 | },
8088 | /* 7.7.19.8 */
8089 | /* TODO: break down into each RE as done for 7.5.3.5 ? */
8090 | { &hf_oran_portReMask,
8091 | { "portReMask", "oran_fh_cus.portReMask",
8092 | FT_BOOLEAN, 16,
8093 | TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset )))), 0x0fff,
8094 | "RE bitmask per port", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8095 | },
8096 | /* 7.7.19.9 */
8097 | { &hf_oran_portSymbolMask,
8098 | { "portSymbolMask", "oran_fh_cus.portSymbolMask",
8099 | FT_BOOLEAN, 16,
8100 | TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset )))), 0x3fff,
8101 | "Symbol bitmask port port", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8102 | },
8103 |
8104 | { &hf_oran_ext19_port,
8105 | {"Port", "oran_fh_cus.ext19.port",
8106 | FT_STRING, BASE_NONE,
8107 | NULL((void*)0), 0x0,
8108 | "Entry for a given port in ext19", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8109 | },
8110 |
8111 | /* Ext 13 */
8112 | { &hf_oran_prb_allocation,
8113 | {"PRB allocation", "oran_fh_cus.prb-allocation",
8114 | FT_STRING, BASE_NONE,
8115 | NULL((void*)0), 0x0,
8116 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8117 | },
8118 | /* 7.7.13.2 */
8119 | { &hf_oran_nextSymbolId,
8120 | { "nextSymbolId", "oran_fh_cus.nextSymbolId",
8121 | FT_UINT8, BASE_DEC,
8122 | NULL((void*)0), 0x3c,
8123 | "offset of PRB range start", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8124 | },
8125 | /* 7.7.13.3 */
8126 | { &hf_oran_nextStartPrbc,
8127 | { "nextStartPrbc", "oran_fh_cus.nextStartPrbc",
8128 | FT_UINT16, BASE_DEC,
8129 | NULL((void*)0), 0x03ff,
8130 | "number of PRBs in PRB range", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8131 | },
8132 |
8133 | /* Puncturing patters as appears in SE 20 */
8134 | { &hf_oran_puncPattern,
8135 | { "puncPattern", "oran_fh_cus.puncPattern",
8136 | FT_STRING, BASE_NONE,
8137 | NULL((void*)0), 0x0,
8138 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8139 | },
8140 |
8141 | /* 7.7.20.2 numPuncPatterns */
8142 | { &hf_oran_numPuncPatterns,
8143 | { "numPuncPatterns", "oran_fh_cus.numPuncPatterns",
8144 | FT_UINT8, BASE_DEC,
8145 | NULL((void*)0), 0x0,
8146 | "number of puncturing patterns", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
8147 | },
8148 | /* 7.7.20.3 symbolMask */
8149 | { &hf_oran_symbolMask_ext20,
8150 | { "symbolMask", "oran_fh_cus.symbolMask",
8151 | FT_UINT16, BASE_HEX,
8152 | NULL((void*)0), 0xfffc,
8153 | "Bitmask where each bit indicates the symbols associated with the puncturing pattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8154 | },
8155 | /* 7.7.20.4 startPuncPrb */
8156 | { &hf_oran_startPuncPrb,
8157 | { "startPuncPrb", "oran_fh_cus.startPuncPrb",
8158 | FT_UINT16, BASE_DEC,
8159 | NULL((void*)0), 0x03ff,
8160 | "starting PRB to which one puncturing pattern applies", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8161 | },
8162 | /* 7.7.20.5 numPuncPrb */
8163 | { &hf_oran_numPuncPrb,
8164 | { "numPuncPrb", "oran_fh_cus.numPuncPrb",
8165 | FT_UINT8, BASE_DEC,
8166 | NULL((void*)0), 0x0,
8167 | "the number of PRBs of the puncturing pattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8168 | },
8169 | /* 7.7.20.6 puncReMask */
8170 | { &hf_oran_puncReMask,
8171 | { "puncReMask", "oran_fh_cus.puncReMask",
8172 | FT_UINT16, BASE_DEC,
8173 | NULL((void*)0), 0xffc0,
8174 | "puncturing pattern RE mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8175 | },
8176 | /* 7.7.20.12 multiSDScope */
8177 | { &hf_oran_multiSDScope,
8178 | { "multiSDScope", "oran_fh_cus.multiSDScope",
8179 | FT_BOOLEAN, 8,
8180 | TFS(&multi_sd_scope_tfs)((0 ? (const struct true_false_string*)0 : ((&multi_sd_scope_tfs )))), 0x02,
8181 | "multiple section description scope flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8182 | },
8183 | /* 7.7.20.4 rbgIncl */
8184 | { &hf_oran_RbgIncl,
8185 | { "rbgIncl", "oran_fh_cus.rbgIncl",
8186 | FT_BOOLEAN, 8,
8187 | NULL((void*)0), 0x01,
8188 | "rbg included flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8189 | },
8190 |
8191 | /* 7.7.21.2 ciPrbGroupSize */
8192 | { &hf_oran_ci_prb_group_size,
8193 | { "ciPrbGroupSize", "oran_fh_cus.ciPrbGroupSize",
8194 | FT_UINT8, BASE_DEC,
8195 | NULL((void*)0), 0x0,
8196 | "channel information PRB group size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8197 | },
8198 | /* 7.21.3 */
8199 | { &hf_oran_prg_size_st5,
8200 | { "prgSize", "oran_fh_cus.prgSize",
8201 | FT_UINT8, BASE_DEC,
8202 | VALS(prg_size_st5_vals)((0 ? (const struct _value_string*)0 : ((prg_size_st5_vals))) ), 0x03,
8203 | "precoding resource block group size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8204 | },
8205 | { &hf_oran_prg_size_st6,
8206 | { "prgSize", "oran_fh_cus.prgSize",
8207 | FT_UINT8, BASE_DEC,
8208 | VALS(prg_size_st6_vals)((0 ? (const struct _value_string*)0 : ((prg_size_st6_vals))) ), 0x03,
8209 | "precoding resource block group size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8210 | },
8211 |
8212 | /* 7.7.17.2 numUeID */
8213 | { &hf_oran_num_ueid,
8214 | { "numUeID", "oran_fh_cus.numUeID",
8215 | FT_UINT8, BASE_DEC,
8216 | NULL((void*)0), 0x0,
8217 | "number of ueIDs per user", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8218 | },
8219 |
8220 | /* 7.7.16.2 antMask */
8221 | { &hf_oran_antMask,
8222 | { "antMask", "oran_fh_cus.antMask",
8223 | FT_UINT64, BASE_HEX,
8224 | NULL((void*)0), 0xffffffffffffffff,
8225 | "indices of antennas to be pre-combined per RX endpoint", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8226 | },
8227 |
8228 | /* 7.7.18.2 transmissionWindowOffset */
8229 | { &hf_oran_transmissionWindowOffset,
8230 | { "transmissionWindowOffset", "oran_fh_cus.transmissionWindowOffset",
8231 | FT_UINT16, BASE_DEC,
8232 | NULL((void*)0), 0x0,
8233 | "start of the transmission window as an offset to when the transmission window would have been without this parameter, i.e. (Ta3_max - Ta3_min)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8234 | },
8235 | /* 7.7.18.3 transmissionWindowSize */
8236 | { &hf_oran_transmissionWindowSize,
8237 | { "transmissionWindowSize", "oran_fh_cus.transmissionWindowSize",
8238 | FT_UINT16, BASE_DEC,
8239 | NULL((void*)0), 0x3fff,
8240 | "size of the transmission window in resolution µs", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8241 | },
8242 | /* 7.7.18.4 toT */
8243 | { &hf_oran_toT,
8244 | { "toT", "oran_fh_cus.toT",
8245 | FT_UINT8, BASE_DEC,
8246 | VALS(type_of_transmission_vals)((0 ? (const struct _value_string*)0 : ((type_of_transmission_vals )))), 0x03,
8247 | "type of transmission", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8248 | },
8249 |
8250 | /* 7.7.2.2 bfaCompHdr */
8251 | { &hf_oran_bfaCompHdr,
8252 | { "bfaCompHdr", "oran_fh_cus.bfaCompHdr",
8253 | FT_STRING, BASE_NONE,
8254 | NULL((void*)0), 0x0,
8255 | "beamforming attributes compression header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8256 | },
8257 | /* 7.7.2.2-2: bfAzPtWidth */
8258 | { &hf_oran_bfAzPtWidth,
8259 | { "bfAzPtWidth", "oran_fh_cus.bfAzPtWidth",
8260 | FT_UINT8, BASE_DEC,
8261 | VALS(bfa_bw_vals)((0 ? (const struct _value_string*)0 : ((bfa_bw_vals)))), 0x38,
8262 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8263 | },
8264 | /* 7.7.2.2-3: bfZePtWidth */
8265 | { &hf_oran_bfZePtWidth,
8266 | { "bfZePtWidth", "oran_fh_cus.bfZePtWidth",
8267 | FT_UINT8, BASE_DEC,
8268 | VALS(bfa_bw_vals)((0 ? (const struct _value_string*)0 : ((bfa_bw_vals)))), 0x07,
8269 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8270 | },
8271 | /* 7.7.2.2-4: bfAz3ddWidth */
8272 | { &hf_oran_bfAz3ddWidth,
8273 | { "bfAz3ddWidth", "oran_fh_cus.bfAz3ddWidth",
8274 | FT_UINT8, BASE_DEC,
8275 | VALS(bfa_bw_vals)((0 ? (const struct _value_string*)0 : ((bfa_bw_vals)))), 0x38,
8276 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8277 | },
8278 | /* 7.7.2.2-5: bfZe3ddWidth */
8279 | { &hf_oran_bfZe3ddWidth,
8280 | { "bfZe3ddWidth", "oran_fh_cus.bfZe3ddWidth",
8281 | FT_UINT8, BASE_DEC,
8282 | VALS(bfa_bw_vals)((0 ? (const struct _value_string*)0 : ((bfa_bw_vals)))), 0x07,
8283 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8284 | },
8285 |
8286 | /* 7.7.2.3 bfAzPt */
8287 | { &hf_oran_bfAzPt,
8288 | { "bfAzPt", "oran_fh_cus.bfAzPt",
8289 | FT_UINT8, BASE_DEC,
8290 | NULL((void*)0), 0x0,
8291 | "beamforming azimuth pointing parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8292 | },
8293 | /* 7.7.2.4 bfZePt */
8294 | { &hf_oran_bfZePt,
8295 | { "bfZePt", "oran_fh_cus.bfZePt",
8296 | FT_UINT8, BASE_DEC,
8297 | NULL((void*)0), 0x0,
8298 | "beamforming zenith pointing parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8299 | },
8300 | /* 7.7.2.5 bfAz3dd */
8301 | { &hf_oran_bfAz3dd,
8302 | { "bfAz3dd", "oran_fh_cus.bfAz3dd",
8303 | FT_UINT8, BASE_DEC,
8304 | NULL((void*)0), 0x0,
8305 | "beamforming azimuth beamwidth parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8306 | },
8307 | /* 7.7.2.6 bfZe3dd */
8308 | { &hf_oran_bfZe3dd,
8309 | { "bfZe3dd", "oran_fh_cus.bfZe3dd",
8310 | FT_UINT8, BASE_DEC,
8311 | NULL((void*)0), 0x0,
8312 | "beamforming zenith beamwidth parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8313 | },
8314 |
8315 | /* 7.7.2.7 bfAzSl */
8316 | { &hf_oran_bfAzSl,
8317 | { "bfAzSl", "oran_fh_cus.bfAzSl",
8318 | FT_UINT8, BASE_DEC,
8319 | VALS(sidelobe_suppression_vals)((0 ? (const struct _value_string*)0 : ((sidelobe_suppression_vals )))), 0x38,
8320 | "beamforming azimuth sidelobe parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8321 | },
8322 | /* 7.7.2.8 bfZeSl */
8323 | { &hf_oran_bfZeSl,
8324 | { "bfZeSl", "oran_fh_cus.bfZeSl",
8325 | FT_UINT8, BASE_DEC,
8326 | VALS(sidelobe_suppression_vals)((0 ? (const struct _value_string*)0 : ((sidelobe_suppression_vals )))), 0x07,
8327 | "beamforming zenith sidelobe parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8328 | },
8329 |
8330 | /* 7.5.2.17 */
8331 | { &hf_oran_cmd_scope,
8332 | { "cmdScope", "oran_fh_cus.cmdScope",
8333 | FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
8334 | RVALS(cmd_scope_vals)((0 ? (const struct _range_string*)0 : ((cmd_scope_vals)))), 0x0f,
8335 | "command scope", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8336 | },
8337 | /* 7.5.2.18 */
8338 | { &hf_oran_number_of_st4_cmds,
8339 | { "numberOfST4Cmds", "oran_fh_cus.numberOfST4Cmds",
8340 | FT_UINT8, BASE_DEC,
8341 | NULL((void*)0), 0x0,
8342 | "Number of Section Type 4 commands", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8343 | },
8344 |
8345 | { &hf_oran_st4_cmd_header,
8346 | { "Command common header", "oran_fh_cus.st4CmdCommonHeader",
8347 | FT_STRING, BASE_NONE,
8348 | NULL((void*)0), 0x0,
8349 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8350 | },
8351 |
8352 | /* 7.5.3.38 */
8353 | { &hf_oran_st4_cmd_type,
8354 | { "st4CmdType", "oran_fh_cus.st4CmdType",
8355 | FT_UINT8, BASE_DEC | BASE_RANGE_STRING0x00000100,
8356 | RVALS(st4_cmd_type_vals)((0 ? (const struct _range_string*)0 : ((st4_cmd_type_vals))) ), 0x0,
8357 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8358 | },
8359 | /* 7.5.3.39 */
8360 | { &hf_oran_st4_cmd_len,
8361 | { "st4CmdLen", "oran_fh_cus.st4CmdLen",
8362 | FT_UINT16, BASE_DEC,
8363 | NULL((void*)0), 0x0,
8364 | "Length of command in 32-bit words", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8365 | },
8366 | /* 7.5.3.40 */
8367 | { &hf_oran_st4_cmd_num_slots,
8368 | { "numSlots", "oran_fh_cus.st4NumSlots",
8369 | FT_UINT8, BASE_DEC,
8370 | NULL((void*)0), 0x0,
8371 | "Contiguous slots for which command is applicable", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8372 | },
8373 | /* 7.5.3.41 */
8374 | { &hf_oran_st4_cmd_ack_nack_req_id,
8375 | { "ackNackReqId", "oran_fh_cus.ackNackReqId",
8376 | FT_UINT16, BASE_DEC,
8377 | NULL((void*)0), 0x0,
8378 | "ACK/NACK Request Id", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8379 | },
8380 |
8381 | { &hf_oran_st4_cmd,
8382 | { "Command", "oran_fh_cus.st4Cmd",
8383 | FT_STRING, BASE_NONE,
8384 | NULL((void*)0), 0x0,
8385 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8386 | },
8387 |
8388 | /* 7.5.3.52 */
8389 | { &hf_oran_sleepmode_trx,
8390 | { "sleepMode", "oran_fh_cus.sleepMode",
8391 | FT_UINT8, BASE_HEX,
8392 | VALS(sleep_mode_trx_vals)((0 ? (const struct _value_string*)0 : ((sleep_mode_trx_vals) ))), 0x03,
8393 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8394 | },
8395 | { &hf_oran_sleepmode_asm,
8396 | { "sleepMode", "oran_fh_cus.sleepMode",
8397 | FT_UINT8, BASE_HEX,
8398 | VALS(sleep_mode_asm_vals)((0 ? (const struct _value_string*)0 : ((sleep_mode_asm_vals) ))), 0x03,
8399 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8400 | },
8401 |
8402 | /* 7.5.3.51 */
8403 | { &hf_oran_log2maskbits,
8404 | { "log2MaskBits", "oran_fh_cus.log2MaskBits",
8405 | FT_UINT8, BASE_HEX,
8406 | VALS(log2maskbits_vals)((0 ? (const struct _value_string*)0 : ((log2maskbits_vals))) ), 0x3c,
8407 | "Number of bits to appear in antMask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8408 | },
8409 | /* 7.5.3.53 */
8410 | { &hf_oran_num_slots_ext,
8411 | { "numSlotsExt", "oran_fh_cus.numSlotsExt",
8412 | FT_UINT24, BASE_HEX,
8413 | NULL((void*)0), 0x0fffff,
8414 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8415 | },
8416 | /* 7.5.3.54 */
8417 | { &hf_oran_antMask_trx_control,
8418 | { "antMask", "oran_fh_cus.trxControl.antMask",
8419 | FT_BYTES, BASE_NONE,
8420 | NULL((void*)0), 0x0,
8421 | "which antennas should sleep or wake-up", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8422 | },
8423 | /* 7.5.3.55 */
8424 | { &hf_oran_ready,
8425 | { "ready", "oran_fh_cus.ready",
8426 | FT_BOOLEAN, 8,
8427 | TFS(&ready_tfs)((0 ? (const struct true_false_string*)0 : ((&ready_tfs)) )), 0x01,
8428 | "wake-up ready indicator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8429 | },
8430 | /* 7.5.3.34 */
8431 | { &hf_oran_number_of_acks,
8432 | { "numberOfAcks", "oran_fh_cus.numberOfAcks",
8433 | FT_UINT8, BASE_DEC,
8434 | NULL((void*)0), 0x0,
8435 | "number of ACKs for one eAxC_ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8436 | },
8437 | /* 7.5.3.35 */
8438 | { &hf_oran_number_of_nacks,
8439 | { "numberOfNacks", "oran_fh_cus.numberOfNacks",
8440 | FT_UINT8, BASE_DEC,
8441 | NULL((void*)0), 0x0,
8442 | "number of NACKs for one eAxC_ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8443 | },
8444 | /* 7.5.3.36 */
8445 | { &hf_oran_ackid,
8446 | { "ackId", "oran_fh_cus.ackId",
8447 | FT_UINT16, BASE_DEC,
8448 | NULL((void*)0), 0x0,
8449 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8450 | },
8451 | /* 7.5.3.37 */
8452 | { &hf_oran_nackid,
8453 | { "nackId", "oran_fh_cus.nackId",
8454 | FT_UINT16, BASE_DEC,
8455 | NULL((void*)0), 0x0,
8456 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8457 | },
8458 |
8459 | /* Links between acknack requests & responses */
8460 | { &hf_oran_acknack_request_frame,
8461 | { "Request Frame", "oran_fh_cus.ackNackId.request-frame",
8462 | FT_FRAMENUM, BASE_NONE,
8463 | FRAMENUM_TYPE(FT_FRAMENUM_REQUEST)((gpointer) (glong) (FT_FRAMENUM_REQUEST)), 0x0,
8464 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8465 | },
8466 | { &hf_oran_acknack_request_time,
8467 | { "Time since request in ms", "oran_fh_cus.ackNackId.time-since-request",
8468 | FT_UINT32, BASE_DEC,
8469 | NULL((void*)0), 0x0,
8470 | "Time between request and response", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8471 | },
8472 | { &hf_oran_acknack_request_type,
8473 | { "Request Type", "oran_fh_cus.ackNackId.request-type",
8474 | FT_UINT32, BASE_DEC,
8475 | VALS(acknack_type_vals)((0 ? (const struct _value_string*)0 : ((acknack_type_vals))) ), 0x0,
8476 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8477 | },
8478 | { &hf_oran_acknack_response_frame,
8479 | { "Response Frame", "oran_fh_cus.ackNackId.response-frame",
8480 | FT_FRAMENUM, BASE_NONE,
8481 | FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE)((gpointer) (glong) (FT_FRAMENUM_RESPONSE)), 0x0,
8482 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8483 | },
8484 | { &hf_oran_acknack_response_time,
8485 | { "Time to response in ms", "oran_fh_cus.ackNackId.time-to-response",
8486 | FT_UINT32, BASE_DEC,
8487 | NULL((void*)0), 0x0,
8488 | "Time between request and response", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8489 | },
8490 |
8491 | /* 7.5.3.43 */
8492 | { &hf_oran_disable_tdbfns,
8493 | { "disableTDBFNs", "oran_fh_cus.disableTDBFNs",
8494 | FT_BOOLEAN, 8,
8495 | TFS(&disable_tdbfns_tfs)((0 ? (const struct true_false_string*)0 : ((&disable_tdbfns_tfs )))), 0x80,
8496 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8497 | },
8498 |
8499 | /* 7.5.3.44 */
8500 | { &hf_oran_td_beam_group,
8501 | { "tdBeamGrp", "oran_fh_cus.tdBeamGrp",
8502 | FT_UINT16, BASE_HEX,
8503 | NULL((void*)0), 0x7fff,
8504 | "Applies to symbolMask in command header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8505 | },
8506 | /* 7.5.3.43 */
8507 | { &hf_oran_disable_tdbfws,
8508 | { "disableTDBFWs", "oran_fh_cus.disableTDBFWs",
8509 | FT_BOOLEAN, 8,
8510 | TFS(&beam_numbers_included_tfs)((0 ? (const struct true_false_string*)0 : ((&beam_numbers_included_tfs )))), 0x80,
8511 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8512 | },
8513 |
8514 | /* 7.5.3.56 */
8515 | { &hf_oran_td_beam_num,
8516 | { "tdBeamNum", "oran_fh_cus.tdBeamNum",
8517 | FT_UINT16, BASE_HEX,
8518 | NULL((void*)0), 0x7fff,
8519 | "time-domain beam number", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8520 | },
8521 |
8522 | /* 7.5.3.49 */
8523 | { &hf_oran_dir_pattern,
8524 | { "dirPattern", "oran_fh_cus.dirPattern",
8525 | FT_BOOLEAN, 16,
8526 | TFS(&symbol_direction_tfs)((0 ? (const struct true_false_string*)0 : ((&symbol_direction_tfs )))), 0x3fff,
8527 | "symbol data direction (gNB Tx/Rx) pattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8528 | },
8529 | /* 7.5.3.50 */
8530 | { &hf_oran_guard_pattern,
8531 | { "guardPattern", "oran_fh_cus.guardPattern",
8532 | FT_BOOLEAN, 16,
8533 | TFS(&symbol_guard_tfs)((0 ? (const struct true_false_string*)0 : ((&symbol_guard_tfs )))), 0x3fff,
8534 | "guard pattern bitmask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8535 | },
8536 |
8537 | /* For convenient filtering */
8538 | { &hf_oran_cplane,
8539 | { "C-Plane", "oran_fh_cus.c-plane",
8540 | FT_NONE, BASE_NONE,
8541 | NULL((void*)0), 0x0,
8542 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8543 | },
8544 | { &hf_oran_uplane,
8545 | { "U-Plane", "oran_fh_cus.u-plane",
8546 | FT_NONE, BASE_NONE,
8547 | NULL((void*)0), 0x0,
8548 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8549 | },
8550 | { &hf_oran_bf,
8551 | { "BeamForming", "oran_fh_cus.bf",
8552 | FT_NONE, BASE_NONE,
8553 | NULL((void*)0), 0x0,
8554 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8555 | },
8556 | { &hf_oran_zero_prb,
8557 | { "Zero PRB", "oran_fh_cus.zero-prb",
8558 | FT_NONE, BASE_NONE,
8559 | NULL((void*)0), 0x0,
8560 | "All of the REs in this PRB are zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8561 | },
8562 |
8563 | /* 5.1.3.2.7 */
8564 | { &hf_oran_ecpri_pcid,
8565 | { "ecpriPcid", "oran_fh_cus.ecpriPcid",
8566 | FT_NONE, BASE_NONE,
8567 | NULL((void*)0), 0x0,
8568 | "IQ data transfer message series identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8569 | },
8570 | { &hf_oran_ecpri_rtcid,
8571 | { "ecpriRtcid", "oran_fh_cus.ecpriRtcid",
8572 | FT_NONE, BASE_NONE,
8573 | NULL((void*)0), 0x0,
8574 | "Real time control data identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8575 | },
8576 | /* 5.1.3.2.8 */
8577 | { &hf_oran_ecpri_seqid,
8578 | { "ecpriSeqid", "oran_fh_cus.ecpriSeqid",
8579 | FT_NONE, BASE_NONE,
8580 | NULL((void*)0), 0x0,
8581 | "message identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8582 | },
8583 |
8584 | /* 7.7.23.2 */
8585 | { &hf_oran_num_sym_prb_pattern,
8586 | { "numSymPrbPattern", "oran_fh_cus.numSymPrbPattern",
8587 | FT_UINT8, BASE_DEC,
8588 | NULL((void*)0), 0xf0,
8589 | "number of symbol and resource block patterns", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8590 | },
8591 | /* 7.7.23.11 */
8592 | { &hf_oran_prb_mode,
8593 | { "prbMode", "oran_fh_cus.prbMode",
8594 | FT_BOOLEAN, 8,
8595 | TFS(&prb_mode_tfs)((0 ? (const struct true_false_string*)0 : ((&prb_mode_tfs )))), 0x01,
8596 | "PRB Mode", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8597 | },
8598 |
8599 | { &hf_oran_sym_prb_pattern,
8600 | { "symPrbPattern", "oran_fh_cus.symPrbPattern",
8601 | FT_STRING, BASE_NONE,
8602 | NULL((void*)0), 0x0,
8603 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8604 | },
8605 |
8606 | /* 7.7.23.3 */
8607 | { &hf_oran_sym_mask,
8608 | { "symMask", "oran_fh_cus.symMask",
8609 | FT_UINT16, BASE_HEX,
8610 | NULL((void*)0), 0x3fff,
8611 | "symbol mask part of symPrbPattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8612 | },
8613 | /* 7.7.23.5 */
8614 | {&hf_oran_num_mc_scale_offset,
8615 | {"numMcScaleOffset", "oran_fh_cus.numMcScaleOffset",
8616 | FT_UINT8, BASE_DEC,
8617 | NULL((void*)0), 0xf0,
8618 | "number of modulation compression scaling value per symPrbPattern",
8619 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8620 | },
8621 | /* 7.7.23.4 */
8622 | { &hf_oran_prb_pattern,
8623 | { "prbPattern", "oran_fh_cus.prbPattern",
8624 | FT_UINT8, BASE_DEC,
8625 | NULL((void*)0), 0x0f,
8626 | "resource block pattern part of symPrbPattern", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8627 | },
8628 |
8629 | /* 7.7.3.2 */
8630 | { &hf_oran_codebook_index,
8631 | { "codebookIndex", "oran_fh_cus.codebookIndex",
8632 | FT_UINT8, BASE_DEC,
8633 | NULL((void*)0), 0x0,
8634 | "precoder codebook used for transmission", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8635 | },
8636 | /* 7.7.3.3 */
8637 | { &hf_oran_layerid,
8638 | { "layerID", "oran_fh_cus.layerID",
8639 | FT_UINT8, BASE_DEC,
8640 | NULL((void*)0), 0xf0,
8641 | "Layer ID for DL transmission", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8642 | },
8643 | /* 7.7.3.5 */
8644 | { &hf_oran_numlayers,
8645 | { "numLayers", "oran_fh_cus.numLayers",
8646 | FT_UINT8, BASE_DEC,
8647 | NULL((void*)0), 0x0f,
8648 | "number of layers for DL transmission", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8649 | },
8650 | /* 7.7.3.4 */
8651 | { &hf_oran_txscheme,
8652 | { "txScheme", "oran_fh_cus.txScheme",
8653 | FT_UINT8, BASE_DEC,
8654 | NULL((void*)0), 0xf0,
8655 | "transmission scheme", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8656 | },
8657 | /* 7.7.3.6 */
8658 | { &hf_oran_crs_remask,
8659 | { "crsReMask", "oran_fh_cus.crsReMask",
8660 | FT_UINT16, BASE_HEX,
8661 | NULL((void*)0), 0x0fff,
8662 | "CRS resource element mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8663 | },
8664 | /* 7.7.3.8 */
8665 | { &hf_oran_crs_shift,
8666 | { "crsShift", "oran_fh_cus.crsShift",
8667 | FT_UINT8, BASE_HEX,
8668 | NULL((void*)0), 0x80,
8669 | "CRS resource element mask", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8670 | },
8671 | /* 7.7.3.7 */
8672 | { &hf_oran_crs_symnum,
8673 | { "crsSymNum", "oran_fh_cus.crsSymNum",
8674 | FT_UINT8, BASE_DEC,
8675 | NULL((void*)0), 0x0f,
8676 | "CRS symbol number indication", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8677 | },
8678 | /* 7.7.3.9 */
8679 | { &hf_oran_beamid_ap1,
8680 | { "beamIdAP1", "oran_fh_cus.beamIdAP1",
8681 | FT_UINT16, BASE_DEC,
8682 | NULL((void*)0), 0x7f,
8683 | "beam id to be used for antenna port 1", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8684 | },
8685 | /* 7.7.3.10 */
8686 | { &hf_oran_beamid_ap2,
8687 | { "beamIdAP2", "oran_fh_cus.beamIdAP2",
8688 | FT_UINT16, BASE_DEC,
8689 | NULL((void*)0), 0x7f,
8690 | "beam id to be used for antenna port 2", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8691 | },
8692 | /* 7.7.3.11 */
8693 | { &hf_oran_beamid_ap3,
8694 | { "beamIdAP3", "oran_fh_cus.beamIdAP3",
8695 | FT_UINT16, BASE_DEC,
8696 | NULL((void*)0), 0x7f,
8697 | "beam id to be used for antenna port 3", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8698 | },
8699 |
8700 | /* 7.7.10.3a */
8701 | { &hf_oran_port_list_index,
8702 | { "portListIndex", "oran_fh_cus.portListIndex",
8703 | FT_UINT8, BASE_DEC,
8704 | NULL((void*)0), 0x0,
8705 | "the index of an eAxC_ID in the port-list", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8706 | },
8707 |
8708 | { &hf_oran_alpn_per_sym,
8709 | { "alpnPerSym", "oran_fh_cus.alpnPerSym",
8710 | FT_UINT8, BASE_HEX,
8711 | VALS(alpn_per_sym_vals)((0 ? (const struct _value_string*)0 : ((alpn_per_sym_vals))) ), 0x80,
8712 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8713 | },
8714 | { &hf_oran_ant_dmrs_snr,
8715 | { "antDmrsSnr", "oran_fh_cus.antDmrsSnr",
8716 | FT_UINT8, BASE_HEX,
8717 | VALS(ant_dmrs_snr_vals)((0 ? (const struct _value_string*)0 : ((ant_dmrs_snr_vals))) ), 0x40,
8718 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8719 | },
8720 |
8721 | /* 7.7.24.6 */
8722 | { &hf_oran_user_group_size,
8723 | { "userGroupSize", "oran_fh_cus.userGroupSize",
8724 | FT_UINT8, BASE_DEC,
8725 | NULL((void*)0), 0x1f,
8726 | "number of UE data layers in the user group identified by userGroupId", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8727 | },
8728 | /* 7.7.24.7 */
8729 | { &hf_oran_user_group_id,
8730 | { "userGroupId", "oran_fh_cus.userGroupId",
8731 | FT_UINT8, BASE_DEC,
8732 | NULL((void*)0), 0x0,
8733 | "indicates user group described by the section", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8734 | },
8735 | /* 7.7.24.8 */
8736 | { &hf_oran_entry_type,
8737 | { "entryType", "oran_fh_cus.entryType",
8738 | FT_UINT8, BASE_DEC,
8739 | VALS(entry_type_vals)((0 ? (const struct _value_string*)0 : ((entry_type_vals)))), 0xe0,
8740 | "indicates format of the entry", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8741 | },
8742 | /* 7.7.24.9 */
8743 | { &hf_oran_dmrs_port_number,
8744 | { "dmrsPortNumber", "oran_fh_cus.dmrsPortNumber",
8745 | FT_UINT8, BASE_DEC,
8746 | NULL((void*)0), 0x1f,
8747 | "DMRS antenna port number for the associated ueId", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8748 | },
8749 | /* 7.7.24.10 */
8750 | { &hf_oran_ueid_reset,
8751 | { "ueidReset", "oran_fh_cus.ueidReset",
8752 | FT_BOOLEAN, 8,
8753 | TFS(&tfs_ueid_reset)((0 ? (const struct true_false_string*)0 : ((&tfs_ueid_reset )))), 0x80,
8754 | "same UEID as the previous slot", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8755 | },
8756 | /* 7.7.24.11 */
8757 | { &hf_oran_dmrs_symbol_mask,
8758 | { "dmrsSymbolMask", "oran_fh_cus.dmrsSymbolMask",
8759 | FT_UINT16, BASE_HEX,
8760 | NULL((void*)0), 0x3fff,
8761 | "symbols within the slot containing DMRS", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8762 | },
8763 | { &hf_oran_dmrs_symbol_mask_s13,
8764 | { "symbol 13", "oran_fh_cus.dmrsSymbolMask.symbol-13",
8765 | FT_BOOLEAN, 16,
8766 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x2000,
8767 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8768 | },
8769 | { &hf_oran_dmrs_symbol_mask_s12,
8770 | { "symbol 12", "oran_fh_cus.dmrsSymbolMask.symbol-12",
8771 | FT_BOOLEAN, 16,
8772 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x1000,
8773 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8774 | },
8775 | { &hf_oran_dmrs_symbol_mask_s11,
8776 | { "symbol 11", "oran_fh_cus.dmrsSymbolMask.symbol-11",
8777 | FT_BOOLEAN, 16,
8778 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0800,
8779 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8780 | },
8781 | { &hf_oran_dmrs_symbol_mask_s10,
8782 | { "symbol 10", "oran_fh_cus.dmrsSymbolMask.symbol-10",
8783 | FT_BOOLEAN, 16,
8784 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0400,
8785 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8786 | },
8787 | { &hf_oran_dmrs_symbol_mask_s9,
8788 | { "symbol 9", "oran_fh_cus.dmrsSymbolMask.symbol-9",
8789 | FT_BOOLEAN, 16,
8790 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0200,
8791 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8792 | },
8793 | { &hf_oran_dmrs_symbol_mask_s8,
8794 | { "symbol 8", "oran_fh_cus.dmrsSymbolMask.symbol-8",
8795 | FT_BOOLEAN, 16,
8796 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0100,
8797 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8798 | },
8799 | { &hf_oran_dmrs_symbol_mask_s7,
8800 | { "symbol 7", "oran_fh_cus.dmrsSymbolMask.symbol-7",
8801 | FT_BOOLEAN, 16,
8802 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0080,
8803 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8804 | },
8805 | { &hf_oran_dmrs_symbol_mask_s6,
8806 | { "symbol 6", "oran_fh_cus.dmrsSymbolMask.symbol-6",
8807 | FT_BOOLEAN, 16,
8808 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0040,
8809 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8810 | },
8811 | { &hf_oran_dmrs_symbol_mask_s5,
8812 | { "symbol 5", "oran_fh_cus.dmrsSymbolMask.symbol-5",
8813 | FT_BOOLEAN, 16,
8814 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0020,
8815 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8816 | },
8817 | { &hf_oran_dmrs_symbol_mask_s4,
8818 | { "symbol 4", "oran_fh_cus.dmrsSymbolMask.symbol-4",
8819 | FT_BOOLEAN, 16,
8820 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0010,
8821 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8822 | },
8823 | { &hf_oran_dmrs_symbol_mask_s3,
8824 | { "symbol 3", "oran_fh_cus.dmrsSymbolMask.symbol-3",
8825 | FT_BOOLEAN, 16,
8826 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0008,
8827 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8828 | },
8829 | { &hf_oran_dmrs_symbol_mask_s2,
8830 | { "symbol 2", "oran_fh_cus.dmrsSymbolMask.symbol-2",
8831 | FT_BOOLEAN, 16,
8832 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0004,
8833 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8834 | },
8835 | { &hf_oran_dmrs_symbol_mask_s1,
8836 | { "symbol 1", "oran_fh_cus.dmrsSymbolMask.symbol-1",
8837 | FT_BOOLEAN, 16,
8838 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0002,
8839 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8840 | },
8841 | { &hf_oran_dmrs_symbol_mask_s0,
8842 | { "symbol 0", "oran_fh_cus.dmrsSymbolMask.symbol-0",
8843 | FT_BOOLEAN, 16,
8844 | TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x0001,
8845 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8846 | },
8847 |
8848 | /* 7.7.24.12 */
8849 | { &hf_oran_scrambling,
8850 | { "scrambling", "oran_fh_cus.scrambling",
8851 | FT_UINT16, BASE_HEX,
8852 | NULL((void*)0), 0x0,
8853 | "used to calculate the seed value required to initialize pseudo-random generator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8854 | },
8855 | /* 7.7.24.13 */
8856 | { &hf_oran_nscid,
8857 | { "nscid", "oran_fh_cus.nscid",
8858 | FT_UINT8, BASE_HEX,
8859 | NULL((void*)0), 0x80,
8860 | "used to calculate the seed value for pseudo-random generator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8861 | },
8862 | /* 7.7.24.14 */
8863 | { &hf_oran_dtype,
8864 | { "dType", "oran_fh_cus.dType",
8865 | FT_UINT8, BASE_HEX,
8866 | VALS(dtype_vals)((0 ? (const struct _value_string*)0 : ((dtype_vals)))), 0x40,
8867 | "PUSCH DMRS configuration type", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8868 | },
8869 | /* 7.7.24.15 */
8870 | { &hf_oran_cmd_without_data,
8871 | { "cmdWithoutData", "oran_fh_cus.cmdWithoutData",
8872 | FT_UINT8, BASE_HEX,
8873 | NULL((void*)0), 0x30,
8874 | "number of DMRS CDM groups without data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8875 | },
8876 | /* 7.7.24.16 */
8877 | { &hf_oran_lambda,
8878 | { "lambda", "oran_fh_cus.lambda",
8879 | FT_UINT8, BASE_HEX,
8880 | NULL((void*)0), 0x0c,
8881 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8882 | },
8883 | /* 7.7.24.19 */
8884 | { &hf_oran_first_prb,
8885 | { "firstPrb", "oran_fh_cus.firstPrb",
8886 | FT_UINT16, BASE_DEC,
8887 | NULL((void*)0), 0x03fe,
8888 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8889 | },
8890 | /* 7.7.24.20 */
8891 | { &hf_oran_last_prb,
8892 | { "lastPrb", "oran_fh_cus.lastPrb",
8893 | FT_UINT16, BASE_DEC,
8894 | NULL((void*)0), 0x01ff,
8895 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8896 | },
8897 |
8898 | /* 7.7.24.17 */
8899 | /* TODO: add value_string */
8900 | { &hf_oran_low_papr_type,
8901 | { "lowPaprType", "oran_fh_cus.lowPaprType",
8902 | FT_UINT8, BASE_HEX,
8903 | VALS(papr_type_vals)((0 ? (const struct _value_string*)0 : ((papr_type_vals)))), 0x30,
8904 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8905 | },
8906 | /* 7.7.24.18 */
8907 | { &hf_oran_hopping_mode,
8908 | { "hoppingMode", "oran_fh_cus.hoppingMode",
8909 | FT_UINT8, BASE_HEX,
8910 | VALS(hopping_mode_vals)((0 ? (const struct _value_string*)0 : ((hopping_mode_vals))) ), 0x0c,
8911 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8912 | },
8913 |
8914 | { &hf_oran_tx_win_for_on_air_symbol_l,
8915 | { "txWinForOnAirSymbol", "oran_fh_cus.txWinForOnAirSymbol",
8916 | FT_UINT8, BASE_DEC,
8917 | NULL((void*)0), 0xf0,
8918 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8919 | },
8920 | { &hf_oran_tx_win_for_on_air_symbol_r,
8921 | { "txWinForOnAirSymbol", "oran_fh_cus.txWinForOnAirSymbol",
8922 | FT_UINT8, BASE_DEC,
8923 | NULL((void*)0), 0x0f,
8924 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8925 | },
8926 | /* 7.7.26.2 */
8927 | { &hf_oran_num_fo_fb,
8928 | { "numFoFb", "oran_fh_cus.numFoFb",
8929 | FT_UINT8, BASE_DEC,
8930 | NULL((void*)0), 0x7f,
8931 | "number of frequency offset feedback", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8932 | },
8933 | /* 7.7.26.3 */
8934 | { &hf_oran_freq_offset_fb,
8935 | { "freqOffsetFb", "oran_fh_cus.freqOffsetFb",
8936 | FT_UINT16, BASE_HEX_DEC | BASE_RANGE_STRING0x00000100,
8937 | RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values )))), 0x0,
8938 | "UE frequency offset feedback", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8939 | },
8940 |
8941 | /* 7.7.28.2 */
8942 | { &hf_oran_num_ue_sinr_rpt,
8943 | { "numUeSinrRpt", "oran_fh_cus.numUeSinrRpt",
8944 | FT_UINT8, BASE_DEC,
8945 | NULL((void*)0), 0x1f,
8946 | "number of sinr reported UEs {1 - 12}", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8947 | },
8948 |
8949 | /* 7.5.2.19 */
8950 | { &hf_oran_num_sinr_per_prb,
8951 | { "numSinrPerPrb", "oran_fh_cus.numSinrPerPrb",
8952 | FT_UINT8, BASE_DEC,
8953 | VALS(num_sinr_per_prb_vals)((0 ? (const struct _value_string*)0 : ((num_sinr_per_prb_vals )))), 0x70,
8954 | "number of SINR values per PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8955 | },
8956 | { &hf_oran_num_sinr_per_prb_right,
8957 | { "numSinrPerPrb", "oran_fh_cus.numSinrPerPrb",
8958 | FT_UINT8, BASE_DEC,
8959 | VALS(num_sinr_per_prb_vals)((0 ? (const struct _value_string*)0 : ((num_sinr_per_prb_vals )))), 0x07,
8960 | "number of SINR values per PRB", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8961 | },
8962 |
8963 | /* 7.5.3.68 */
8964 | { &hf_oran_sinr_value,
8965 | { "sinrValue", "oran_fh_cus.sinrValue",
8966 | FT_FLOAT, BASE_NONE,
8967 | NULL((void*)0), 0x0,
8968 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8969 | },
8970 |
8971 | { &hf_oran_measurement_report,
8972 | { "Measurement Report", "oran_fh_cus.measurement-report",
8973 | FT_STRING, BASE_NONE,
8974 | NULL((void*)0), 0x0,
8975 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8976 | },
8977 | /* 7.5.3.57 */
8978 | { &hf_oran_mf,
8979 | { "mf", "oran_fh_cus.mf",
8980 | FT_BOOLEAN, 8,
8981 | TFS(&measurement_flag_tfs)((0 ? (const struct true_false_string*)0 : ((&measurement_flag_tfs )))), 0x80,
8982 | "measurement flag", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8983 | },
8984 | /* 7.5.3.59 */
8985 | { &hf_oran_meas_data_size,
8986 | { "measDataSize", "oran_fh_cus.measDataSize",
8987 | FT_UINT16, BASE_DEC,
8988 | NULL((void*)0), 0x0,
8989 | "measurement data size (in words)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8990 | },
8991 |
8992 | /* 7.5.3.58 */
8993 | { &hf_oran_meas_type_id,
8994 | { "measTypeId", "oran_fh_cus.measTypeId",
8995 | FT_UINT8, BASE_DEC,
8996 | VALS(meas_type_id_vals)((0 ? (const struct _value_string*)0 : ((meas_type_id_vals))) ), 0x7F,
8997 | "measurement report type identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
8998 | },
8999 | /* 7.5.3.66 */
9000 | { &hf_oran_num_elements,
9001 | { "numElements", "oran_fh_cus.numElements",
9002 | FT_UINT8, BASE_DEC,
9003 | NULL((void*)0), 0x0,
9004 | "measurement report type identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9005 | },
9006 | /* 7.5.3.60 */
9007 | { &hf_oran_ue_tae,
9008 | { "ueTae", "oran_fh_cus.ueTae",
9009 | FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
9010 | RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values )))), 0x0,
9011 | "UE Timing Advance Error", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9012 | },
9013 | /* 7.5.3.61 */
9014 | { &hf_oran_ue_layer_power,
9015 | { "ueLayerPower", "oran_fh_cus.ueLayerPower",
9016 | FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
9017 | RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values )))), 0x0,
9018 | "UE Layer Power", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9019 | },
9020 |
9021 | /* 7.5.3.62 */
9022 | { &hf_oran_ue_freq_offset,
9023 | { "ueFreqOffset", "oran_fh_cus.ueFreqOffset",
9024 | FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
9025 | RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values )))), 0x0,
9026 | "UE frequency offset", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9027 | },
9028 | /* 7.5.3.63 */
9029 | { &hf_oran_ipn_power,
9030 | { "ipnPower", "oran_fh_cus.ipnPower",
9031 | FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
9032 | RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values )))), 0x0,
9033 | "Interference plus Noise power", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9034 | },
9035 | /* 7.5.3.64 */
9036 | { &hf_oran_ant_dmrs_snr_val,
9037 | { "antDmrsSnrVal", "oran_fh_cus.antDmrsSnrVal",
9038 | FT_UINT16, BASE_DEC | BASE_RANGE_STRING0x00000100,
9039 | RVALS(freq_offset_fb_values)((0 ? (const struct _range_string*)0 : ((freq_offset_fb_values )))), 0x0,
9040 | "antenna DMRS-SNR", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9041 | },
9042 |
9043 | { &hf_oran_measurement_command,
9044 | { "Measurement Command", "oran_fh_cus.measurement-command",
9045 | FT_STRING, BASE_NONE,
9046 | NULL((void*)0), 0x0,
9047 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9048 | },
9049 |
9050 | /* 7.5.27.2 */
9051 | { &hf_oran_beam_type,
9052 | {"beamType", "oran_fh_cus.beamType",
9053 | FT_UINT16, BASE_DEC,
9054 | VALS(beam_type_vals)((0 ? (const struct _value_string*)0 : ((beam_type_vals)))), 0xc0,
9055 | NULL((void*)0),
9056 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9057 | },
9058 | /* 7.5.3.65 */
9059 | { &hf_oran_meas_cmd_size,
9060 | {"measCmdSize", "oran_fh_cus.measCmdSize",
9061 | FT_UINT16, BASE_DEC,
9062 | NULL((void*)0), 0x0,
9063 | "measurement command size in words",
9064 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9065 | },
9066 |
9067 | { &hf_oran_symbol_reordering_layer,
9068 | { "Layer", "oran_fh_cus.layer",
9069 | FT_STRING, BASE_NONE,
9070 | NULL((void*)0), 0x0,
9071 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9072 | },
9073 | { &hf_oran_dmrs_entry,
9074 | { "Entry", "oran_fh_cus.dmrs-entry",
9075 | FT_STRING, BASE_NONE,
9076 | NULL((void*)0), 0x0,
9077 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9078 | },
9079 |
9080 | { &hf_oran_c_section_common,
9081 | { "Common Section", "oran_fh_cus.c-plane.section.common",
9082 | FT_STRING, BASE_NONE,
9083 | NULL((void*)0), 0x0,
9084 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9085 | },
9086 | { &hf_oran_c_section,
9087 | { "Section", "oran_fh_cus.c-plane.section",
9088 | FT_STRING, BASE_NONE,
9089 | NULL((void*)0), 0x0,
9090 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9091 | },
9092 | { &hf_oran_u_section,
9093 | { "Section", "oran_fh_cus.u-plane.section",
9094 | FT_STRING, BASE_NONE,
9095 | NULL((void*)0), 0x0,
9096 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9097 | },
9098 |
9099 | /* Link back to UL C-plane where udCompHdr was recorded */
9100 | { &hf_oran_ul_cplane_ud_comp_hdr_frame,
9101 | { "C-Plane UL udCompHdr frame", "oran_fh_cus.ul-cplane.udCompHdr",
9102 | FT_FRAMENUM, BASE_NONE,
9103 | FRAMENUM_TYPE(FT_FRAMENUM_REQUEST)((gpointer) (glong) (FT_FRAMENUM_REQUEST)), 0x0,
9104 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
9105 | },
9106 | };
9107 |
9108 | /* Setup protocol subtree array */
9109 | static int *ett[] = {
9110 | &ett_oran,
9111 | &ett_oran_ecpri_pcid,
9112 | &ett_oran_ecpri_rtcid,
9113 | &ett_oran_ecpri_seqid,
9114 | &ett_oran_section_type,
9115 | &ett_oran_u_timing,
9116 | &ett_oran_u_section,
9117 | &ett_oran_u_prb,
9118 | &ett_oran_section,
9119 | &ett_oran_iq,
9120 | &ett_oran_bfw_bundle,
9121 | &ett_oran_bfw,
9122 | &ett_oran_frequency_range,
9123 | &ett_oran_prb_cisamples,
9124 | &ett_oran_cisample,
9125 | &ett_oran_udcomphdr,
9126 | &ett_oran_udcompparam,
9127 | &ett_oran_cicomphdr,
9128 | &ett_oran_cicompparam,
9129 | &ett_oran_bfwcomphdr,
9130 | &ett_oran_bfwcompparam,
9131 | &ett_oran_ext19_port,
9132 | &ett_oran_prb_allocation,
9133 | &ett_oran_punc_pattern,
9134 | &ett_oran_bfacomphdr,
9135 | &ett_oran_modcomp_param_set,
9136 | &ett_oran_st4_cmd_header,
9137 | &ett_oran_st4_cmd,
9138 | &ett_oran_sym_prb_pattern,
9139 | &ett_oran_measurement_report,
9140 | &ett_oran_measurement_command,
9141 | &ett_oran_sresmask,
9142 | &ett_oran_c_section_common,
9143 | &ett_oran_c_section,
9144 | &ett_oran_remask,
9145 | &ett_oran_symbol_reordering_layer,
9146 | &ett_oran_dmrs_entry,
9147 | &ett_oran_dmrs_symbol_mask,
9148 | &ett_oran_symbol_mask,
9149 | &ett_active_beamspace_coefficient_mask
9150 | };
9151 |
9152 | static int *ext_ett[HIGHEST_EXTTYPE28];
9153 | for (unsigned extno=0; extno<HIGHEST_EXTTYPE28; extno++) {
9154 | ext_ett[extno] = &ett_oran_c_section_extension[extno];
9155 | }
9156 |
9157 | expert_module_t* expert_oran;
9158 |
9159 | static ei_register_info ei[] = {
9160 | { &ei_oran_unsupported_bfw_compression_method, { "oran_fh_cus.unsupported_bfw_compression_method", PI_UNDECODED0x05000000, PI_WARN0x00600000, "Unsupported BFW Compression Method", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9161 | { &ei_oran_invalid_sample_bit_width, { "oran_fh_cus.invalid_sample_bit_width", PI_UNDECODED0x05000000, PI_ERROR0x00800000, "Unsupported sample bit width", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9162 | { &ei_oran_reserved_numBundPrb, { "oran_fh_cus.reserved_numBundPrb", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "Reserved value of numBundPrb", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9163 | { &ei_oran_extlen_wrong, { "oran_fh_cus.extlen_wrong", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "extlen doesn't match number of dissected bytes", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9164 | { &ei_oran_invalid_eaxc_bit_width, { "oran_fh_cus.invalid_eaxc_bit_width", PI_UNDECODED0x05000000, PI_ERROR0x00800000, "Inconsistent eAxC bit width", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9165 | { &ei_oran_extlen_zero, { "oran_fh_cus.extlen_zero", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "extlen - zero is reserved value", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9166 | { &ei_oran_rbg_size_reserved, { "oran_fh_cus.rbg_size_reserved", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "rbgSize - zero is reserved value", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9167 | { &ei_oran_frame_length, { "oran_fh_cus.frame_length", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "there should be 0-3 bytes remaining after PDU in frame", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9168 | { &ei_oran_numprbc_ext21_zero, { "oran_fh_cus.numprbc_ext21_zero", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "numPrbc shall not be set to 0 when ciPrbGroupSize is configured", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9169 | { &ei_oran_ci_prb_group_size_reserved, { "oran_fh_cus.ci_prb_group_size_reserved", PI_MALFORMED0x07000000, PI_WARN0x00600000, "ciPrbGroupSize should be 2-254", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9170 | { &ei_oran_st8_nackid, { "oran_fh_cus.st8_nackid", PI_SEQUENCE0x02000000, PI_WARN0x00600000, "operation for this ackId failed", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9171 | { &ei_oran_st4_no_cmds, { "oran_fh_cus.st4_nackid", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "Not valid to have no commands in ST4", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9172 | { &ei_oran_st4_zero_len_cmd, { "oran_fh_cus.st4_zero_len_cmd", PI_MALFORMED0x07000000, PI_WARN0x00600000, "ST4 cmd with length 0 is reserved", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9173 | { &ei_oran_st4_wrong_len_cmd, { "oran_fh_cus.st4_wrong_len_cmd", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "ST4 cmd with length not matching contents", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9174 | { &ei_oran_st4_unknown_cmd, { "oran_fh_cus.st4_unknown_cmd", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "ST4 cmd with unknown command code", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9175 | { &ei_oran_mcot_out_of_range, { "oran_fh_cus.mcot_out_of_range", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "MCOT should be 1-10", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9176 | { &ei_oran_se10_unknown_beamgrouptype, { "oran_fh_cus.se10_unknown_beamgrouptype", PI_MALFORMED0x07000000, PI_WARN0x00600000, "SE10 - unknown BeamGroupType value", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9177 | { &ei_oran_se10_not_allowed, { "oran_fh_cus.se10_not_allowed", PI_MALFORMED0x07000000, PI_WARN0x00600000, "SE10 - type not allowed for sectionType", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9178 | { &ei_oran_start_symbol_id_not_zero, { "oran_fh_cus.startsymbolid_shall_be_zero", PI_MALFORMED0x07000000, PI_WARN0x00600000, "For ST4 commands 3&4, startSymbolId shall be 0", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9179 | { &ei_oran_trx_control_cmd_scope, { "oran_fh_cus.trx_command.bad_cmdscope", PI_MALFORMED0x07000000, PI_WARN0x00600000, "TRX command must have cmdScope of ARRAY-COMMAND", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9180 | { &ei_oran_unhandled_se, { "oran_fh_cus.se_not_handled", PI_UNDECODED0x05000000, PI_WARN0x00600000, "SE not recognised/handled by dissector", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9181 | { &ei_oran_bad_symbolmask, { "oran_fh_cus.bad_symbol_mask", PI_MALFORMED0x07000000, PI_WARN0x00600000, "For non-zero sleepMode, symbolMask must be 0x0 or 0x3ffff", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9182 | { &ei_oran_numslots_not_zero, { "oran_fh_cus.numslots_not_zero", PI_MALFORMED0x07000000, PI_WARN0x00600000, "For ST4 TIME_DOMAIN_BEAM_WEIGHTS, numSlots should be 0", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9183 | { &ei_oran_version_unsupported, { "oran_fh_cus.version_unsupported", PI_UNDECODED0x05000000, PI_WARN0x00600000, "Protocol version unsupported", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9184 | { &ei_oran_laa_msg_type_unsupported, { "oran_fh_cus.laa_msg_type_unsupported", PI_UNDECODED0x05000000, PI_WARN0x00600000, "laaMsgType unsupported", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9185 | { &ei_oran_se_on_unsupported_st, { "oran_fh_cus.se_on_unsupported_st", PI_MALFORMED0x07000000, PI_WARN0x00600000, "Section Extension should not appear on this Section Type", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9186 | { &ei_oran_cplane_unexpected_sequence_number_ul, { "oran_fh_cus.unexpected_seq_no_cplane.ul", PI_SEQUENCE0x02000000, PI_WARN0x00600000, "Unexpected sequence number seen in C-Plane UL", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9187 | { &ei_oran_cplane_unexpected_sequence_number_dl, { "oran_fh_cus.unexpected_seq_no_cplane.dl", PI_SEQUENCE0x02000000, PI_WARN0x00600000, "Unexpected sequence number seen in C-Plane DL", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9188 | { &ei_oran_uplane_unexpected_sequence_number_ul, { "oran_fh_cus.unexpected_seq_no_uplane.ul", PI_SEQUENCE0x02000000, PI_WARN0x00600000, "Unexpected sequence number seen in U-Plane UL", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9189 | { &ei_oran_uplane_unexpected_sequence_number_dl, { "oran_fh_cus.unexpected_seq_no_uplane.dl", PI_SEQUENCE0x02000000, PI_WARN0x00600000, "Unexpected sequence number seen in U-Plane DL", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9190 | { &ei_oran_acknack_no_request, { "oran_fh_cus.acknack_no_request", PI_SEQUENCE0x02000000, PI_WARN0x00600000, "Have ackNackId response, but no request", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9191 | { &ei_oran_udpcomphdr_should_be_zero, { "oran_fh_cus.udcomphdr_should_be_zero", PI_MALFORMED0x07000000, PI_WARN0x00600000, "C-Plane udCompHdr in DL should be set to 0", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9192 | { &ei_oran_radio_fragmentation_c_plane, { "oran_fh_cus.radio_fragmentation_c_plane", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "Radio fragmentation not allowed in C-PLane", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9193 | { &ei_oran_radio_fragmentation_u_plane, { "oran_fh_cus.radio_fragmentation_u_plane", PI_UNDECODED0x05000000, PI_WARN0x00600000, "Radio fragmentation in C-PLane not yet supported", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9194 | { &ei_oran_lastRbdid_out_of_range, { "oran_fh_cus.lastrbdid_out_of_range", PI_MALFORMED0x07000000, PI_WARN0x00600000, "SE 6 has bad rbgSize", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9195 | { &ei_oran_rbgMask_beyond_last_rbdid, { "oran_fh_cus.rbgmask_beyond_lastrbdid", PI_MALFORMED0x07000000, PI_WARN0x00600000, "rbgMask has bits set beyond lastRbgId", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9196 | { &ei_oran_unexpected_measTypeId, { "oran_fh_cus.unexpected_meastypeid", PI_MALFORMED0x07000000, PI_WARN0x00600000, "unexpected measTypeId", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9197 | { &ei_oran_unsupported_compression_method, { "oran_fh_cus.compression_type_unsupported", PI_UNDECODED0x05000000, PI_WARN0x00600000, "Unsupported compression type", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9198 | { &ei_oran_ud_comp_len_wrong_size, { "oran_fh_cus.ud_comp_len_wrong_size", PI_MALFORMED0x07000000, PI_WARN0x00600000, "udCompLen does not match length of U-Plane section", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9199 | { &ei_oran_sresmask2_not_zero_with_rb, { "oran_fh_cus.sresmask2_not_zero", PI_MALFORMED0x07000000, PI_WARN0x00600000, "sReSMask2 should be zero when rb set", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9200 | { &ei_oran_st6_rb_shall_be_0, { "oran_fh_cus.st6_rb_set", PI_MALFORMED0x07000000, PI_WARN0x00600000, "rb should not be set for Section Type 6", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9201 | { &ei_oran_st9_not_ul, { "oran_fh_cus.st9_not_ul", PI_MALFORMED0x07000000, PI_WARN0x00600000, "Section Type 9 should only be sent in uplink direction", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9202 | { &ei_oran_st10_numsymbol_not_14, { "oran_fh_cus.st10_numsymbol_not_14", PI_MALFORMED0x07000000, PI_WARN0x00600000, "numSymbol should be 14 for Section Type 10", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9203 | { &ei_oran_st10_startsymbolid_not_0, { "oran_fh_cus.st10_startsymbolid_not_0", PI_MALFORMED0x07000000, PI_WARN0x00600000, "startSymbolId should be 0 for Section Type 10", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9204 | { &ei_oran_st10_not_ul, { "oran_fh_cus.st10_not_ul", PI_MALFORMED0x07000000, PI_WARN0x00600000, "Section Type 10 should only be sent in uplink direction", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9205 | { &ei_oran_se24_nothing_to_inherit, { "oran_fh_cus.se24_nothing_to_inherit", PI_MALFORMED0x07000000, PI_WARN0x00600000, "SE10 doesn't have type 2 or 3 before trying to inherit", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9206 | { &ei_oran_num_sinr_per_prb_unknown, { "oran_fh_cus.unexpected_num_sinr_per_prb", PI_MALFORMED0x07000000, PI_WARN0x00600000, "invalid numSinrPerPrb value", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9207 | { &ei_oran_start_symbol_id_bits_ignored, { "oran_fh_cus.start_symbol_id_bits_ignored", PI_MALFORMED0x07000000, PI_WARN0x00600000, "some startSymbolId lower bits ignored", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9208 | { &ei_oran_user_group_id_reserved_value, { "oran_fh_cus.user_group_id.reserved_value", PI_MALFORMED0x07000000, PI_WARN0x00600000, "userGroupId value 255 is reserved", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9209 | { &ei_oran_port_list_index_zero, { "oran_fh_cus.port_list_index.zero", PI_MALFORMED0x07000000, PI_WARN0x00600000, "portListIndex should not be zero", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9210 | { &ei_oran_ul_uplane_symbol_too_long, { "oran_fh_cus.ul_uplane_symbol_tx_too_slow", PI_RECEIVE0x0f000000, PI_WARN0x00600000, "UL U-Plane Tx took too long for symbol (limit set in preference)", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
9211 | };
9212 |
9213 | /* Register the protocol name and description */
9214 | proto_oran = proto_register_protocol("O-RAN Fronthaul CUS", "O-RAN FH CUS", "oran_fh_cus");
9215 |
9216 | /* Allow dissector to find be found by name. */
9217 | register_dissector("oran_fh_cus", dissect_oran, proto_oran);
9218 |
9219 | /* Register the tap name. */
9220 | oran_tap = register_tap("oran-fh-cus");
9221 |
9222 | /* Required function calls to register the header fields and subtrees */
9223 | proto_register_field_array(proto_oran, hf, array_length(hf)(sizeof (hf) / sizeof (hf)[0]));
9224 | proto_register_subtree_array(ett, array_length(ett)(sizeof (ett) / sizeof (ett)[0]));
9225 | proto_register_subtree_array(ext_ett, array_length(ext_ett)(sizeof (ext_ett) / sizeof (ext_ett)[0]));
9226 |
9227 |
9228 | expert_oran = expert_register_protocol(proto_oran);
9229 | expert_register_field_array(expert_oran, ei, array_length(ei)(sizeof (ei) / sizeof (ei)[0]));
9230 |
9231 | module_t * oran_module = prefs_register_protocol(proto_oran, NULL((void*)0));
9232 |
9233 | /* prefs_register_static_text_preference(oran_module, "oran.stream", "", ""); */
9234 |
9235 | /* Register bit width/compression preferences separately by direction. */
9236 | prefs_register_uint_preference(oran_module, "oran.du_port_id_bits", "DU Port ID bits [a]",
9237 | "The bit width of DU Port ID - sum of a,b,c&d (eAxC) must be 16", 10, &pref_du_port_id_bits);
9238 | prefs_register_uint_preference(oran_module, "oran.bandsector_id_bits", "BandSector ID bits [b]",
9239 | "The bit width of BandSector ID - sum of a,b,c&d (eAxC) must be 16", 10, &pref_bandsector_id_bits);
9240 | prefs_register_uint_preference(oran_module, "oran.cc_id_bits", "CC ID bits [c]",
9241 | "The bit width of CC ID - sum of a,b,c&d (eAxC) must be 16", 10, &pref_cc_id_bits);
9242 | prefs_register_uint_preference(oran_module, "oran.ru_port_id_bits", "RU Port ID bits [d]",
9243 | "The bit width of RU Port ID - sum of a,b,c&d (eAxC) must be 16", 10, &pref_ru_port_id_bits);
9244 |
9245 | prefs_register_static_text_preference(oran_module, "oran.ul", "", "");
9246 |
9247 | /* Uplink userplane */
9248 | prefs_register_uint_preference(oran_module, "oran.iq_bitwidth_up", "IQ Bitwidth Uplink",
9249 | "The bit width of a sample in the Uplink (if no udcompHdr and no C-Plane)", 10, &pref_sample_bit_width_uplink);
9250 | prefs_register_enum_preference(oran_module, "oran.ud_comp_up", "Uplink User Data Compression",
9251 | "Uplink User Data Compression (if no udcompHdr and no C-Plane)", &pref_iqCompressionUplink, ul_compression_options, false0);
9252 | prefs_register_enum_preference(oran_module, "oran.ud_comp_hdr_up", "udCompHdr field is present for uplink",
9253 | "The udCompHdr field in U-Plane messages may or may not be present, depending on the "
9254 | "configuration of the O-RU. This preference instructs the dissector to expect "
9255 | "this field to be present in uplink messages",
9256 | &pref_includeUdCompHeaderUplink, udcomphdr_present_options, false0);
9257 | prefs_register_uint_preference(oran_module, "oran.ul_slot_us_limit", "Microseconds allowed for UL tx in symbol",
9258 | "Maximum number of microseconds allowed for UL slot transmission before expert warning (zero to disable). N.B. timing relative to first frame seen for same symbol",
9259 | 10, &us_allowed_for_ul_in_symbol);
9260 |
9261 |
9262 |
9263 | prefs_register_static_text_preference(oran_module, "oran.dl", "", "");
9264 |
9265 | /* Downlink userplane */
9266 | prefs_register_uint_preference(oran_module, "oran.iq_bitwidth_down", "IQ Bitwidth Downlink",
9267 | "The bit width of a sample in the Downlink (if no udcompHdr)", 10, &pref_sample_bit_width_downlink);
9268 | prefs_register_enum_preference(oran_module, "oran.ud_comp_down", "Downlink User Data Compression",
9269 | "Downlink User Data Compression", &pref_iqCompressionDownlink, dl_compression_options, false0);
9270 | prefs_register_enum_preference(oran_module, "oran.ud_comp_hdr_down", "udCompHdr field is present for downlink",
9271 | "The udCompHdr field in U-Plane messages may or may not be present, depending on the "
9272 | "configuration of the O-RU. This preference instructs the dissector to expect "
9273 | "this field to be present in downlink messages",
9274 | &pref_includeUdCompHeaderDownlink, udcomphdr_present_options, false0);
9275 |
9276 | prefs_register_static_text_preference(oran_module, "oran.sinr", "", "");
9277 |
9278 | /* SINR */
9279 | prefs_register_uint_preference(oran_module, "oran.iq_bitwidth_sinr", "IQ Bitwidth SINR",
9280 | "The bit width of a sample in SINR", 10, &pref_sample_bit_width_sinr);
9281 | prefs_register_enum_preference(oran_module, "oran.ud_comp_sinr", "SINR Compression",
9282 | "SINR Compression", &pref_iqCompressionSINR, ul_compression_options, false0);
9283 |
9284 |
9285 | /* BF-related */
9286 | prefs_register_static_text_preference(oran_module, "oran.bf", "", "");
9287 |
9288 | prefs_register_obsolete_preference(oran_module, "oran.num_weights_per_bundle");
9289 |
9290 | prefs_register_uint_preference(oran_module, "oran.num_bf_antennas", "Number of beam weights",
9291 | "Number of array elements that BF weights will be provided for", 10, &pref_num_bf_antennas);
9292 |
9293 | prefs_register_obsolete_preference(oran_module, "oran.num_bf_weights");
9294 |
9295 | prefs_register_bool_preference(oran_module, "oran.st6_4byte_alignment_required", "Use 4-byte alignment for ST6 sections",
9296 | "Default is 1-byte alignment", &st6_4byte_alignment);
9297 |
9298 |
9299 | /* Misc (and will seldom need to be accessed) */
9300 | prefs_register_static_text_preference(oran_module, "oran.misc", "", "");
9301 |
9302 | prefs_register_bool_preference(oran_module, "oran.show_iq_samples", "Show IQ Sample values",
9303 | "When enabled, for U-Plane frames show each I and Q value in PRB", &pref_showIQSampleValues);
9304 |
9305 | prefs_register_enum_preference(oran_module, "oran.support_udcomplen", "udCompLen supported",
9306 | "When enabled, U-Plane messages with relevant compression schemes will include udCompLen",
9307 | &pref_support_udcompLen, udcomplen_support_options, false0);
9308 |
9309 | prefs_register_uint_preference(oran_module, "oran.rbs_in_uplane_section", "Total RBs in User-Plane data section",
9310 | "This is used if numPrbu is signalled as 0", 10, &pref_data_plane_section_total_rbs);
9311 |
9312 | prefs_register_bool_preference(oran_module, "oran.unscaled_iq", "Show unscaled I/Q values",
9313 | "", &show_unscaled_values);
9314 |
9315 | prefs_register_obsolete_preference(oran_module, "oran.k_antenna_ports");
9316 |
9317 |
9318 | flow_states_table = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
9319 | flow_results_table = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
9320 | ul_symbol_timing = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
9321 |
9322 | register_init_routine(&oran_init_protocol);
9323 | }
9324 |
9325 | /* Simpler form of proto_reg_handoff_oran which can be used if there are
9326 | * no prefs-dependent registration function calls. */
9327 | void
9328 | proto_reg_handoff_oran(void)
9329 | {
9330 | }
9331 |
9332 | /*
9333 | * Editor modelines - http://www.wireshark.org/tools/modelines.html
9334 | *
9335 | * Local Variables:
9336 | * c-basic-offset: 4
9337 | * tab-width: 8
9338 | * indent-tabs-mode: nil
9339 | * End:
9340 | *
9341 | * ex: set shiftwidth=4 tabstop=8 expandtab:
9342 | * :indentSize=4:tabSize=8:noTabs=true:
9343 | */