Bug Summary

File:builds/wireshark/wireshark/epan/dissectors/packet-dect-nr.c
Warning:line 2639, column 3
Value stored to 'offset' is never read

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name packet-dect-nr.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-nonliteral -std=gnu17 -ferror-limit 19 -fvisibility=hidden -fwrapv -fwrapv-pointer -fstrict-flex-arrays=3 -stack-protector 2 -fstack-clash-protection -fcf-protection=full -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fexceptions -fcolor-diagnostics -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /builds/wireshark/wireshark/sbout/2026-05-21-100355-3660-1 -x c /builds/wireshark/wireshark/epan/dissectors/packet-dect-nr.c
1/* packet-dect-nr.c
2 *
3 * Routines for DECT NR+ MAC layer, and DLC and Convergence layers
4 * - ETSI TS 103 636-4 V2.1.1 (2024-10)
5 * - ETSI TS 103 636-5 V2.1.1 (2024-10)
6 *
7 * Copyright 2025, Stig Bjørlykke <[email protected]>
8 *
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <[email protected]>
11 * Copyright 1998 Gerald Combs
12 *
13 * SPDX-License-Identifier: GPL-2.0-or-later
14 */
15
16#include "config.h"
17
18#include <epan/packet.h>
19#include <epan/expert.h>
20#include <epan/unit_strings.h>
21#include <epan/strutil.h>
22#include <epan/tfs.h>
23#include <epan/reassemble.h>
24#include <epan/conversation.h>
25#include <wsutil/str_util.h>
26#include <wiretap/wtap.h>
27#include <gcrypt.h>
28
29static int proto_dect_nr;
30
31/* 6.2: Physical Header Field */
32static int hf_dect_nr_phf;
33static int hf_dect_nr_header_format_type1;
34static int hf_dect_nr_header_format_type2;
35static int hf_dect_nr_len_type;
36static int hf_dect_nr_packet_len;
37static int hf_dect_nr_short_nw_id;
38static int hf_dect_nr_transmitter_id;
39static int hf_dect_nr_tx_pwr;
40static int hf_dect_nr_res1;
41static int hf_dect_nr_df_mcs_t1;
42static int hf_dect_nr_df_mcs_t2;
43static int hf_dect_nr_receiver_id;
44static int hf_dect_nr_spatial_streams;
45static int hf_dect_nr_df_red_version;
46static int hf_dect_nr_df_ind;
47static int hf_dect_nr_df_harq_proc;
48static int hf_dect_nr_res1_hdr_format_001;
49static int hf_dect_nr_fb_format;
50static int hf_dect_nr_fbi1_harq_pn;
51static int hf_dect_nr_fbi1_tx_fb;
52static int hf_dect_nr_fbi1_bs;
53static int hf_dect_nr_fbi1_cqi;
54static int hf_dect_nr_fbi2_cb_index;
55static int hf_dect_nr_fbi2_mimo_fb;
56static int hf_dect_nr_fbi2_bs;
57static int hf_dect_nr_fbi2_cqi;
58static int hf_dect_nr_fbi3_harq_pn_1;
59static int hf_dect_nr_fbi3_tx_fb_1;
60static int hf_dect_nr_fbi3_harq_pn_2;
61static int hf_dect_nr_fbi3_tx_fb_2;
62static int hf_dect_nr_fbi3_cqi;
63static int hf_dect_nr_fbi4_harq_fb_bm;
64static int hf_dect_nr_fbi4_cqi;
65static int hf_dect_nr_fbi5_harq_pn;
66static int hf_dect_nr_fbi5_tx_fb;
67static int hf_dect_nr_fbi5_mimo_fb;
68static int hf_dect_nr_fbi5_cb_index;
69static int hf_dect_nr_fbi6_harq_pn;
70static int hf_dect_nr_fbi6_res1;
71static int hf_dect_nr_fbi6_bs;
72static int hf_dect_nr_fbi6_cqi;
73static int hf_dect_nr_fbi7_bs;
74static int hf_dect_nr_fbi7_cqi_field;
75static int hf_dect_nr_fbi7_cqi;
76static int hf_dect_nr_fbi7_res1;
77static int hf_dect_nr_fb_info;
78static int hf_dect_nr_phf_padding;
79
80/* 6.3: MAC PDU */
81static int hf_dect_nr_mac_pdu;
82static int hf_dect_nr_mac_version;
83static int hf_dect_nr_mac_security;
84static int hf_dect_nr_mac_hdr_type;
85
86/* 6.3.3.1: Data MAC PDU Header */
87static int hf_dect_nr_data_hdr;
88static int hf_dect_nr_data_hdr_res1;
89static int hf_dect_nr_data_hdr_reset;
90static int hf_dect_nr_data_hdr_sn;
91static int hf_dect_nr_data_hdr_rx_addr;
92static int hf_dect_nr_data_hdr_tx_addr;
93
94/* 6.3.3.2: Beacon Header */
95static int hf_dect_nr_bc_hdr;
96static int hf_dect_nr_bc_hdr_nw_id;
97static int hf_dect_nr_bc_hdr_tx_addr;
98
99/* 6.3.3.3: Unicast Header */
100static int hf_dect_nr_uc_hdr;
101static int hf_dect_nr_uc_hdr_res1;
102static int hf_dect_nr_uc_hdr_rst;
103static int hf_dect_nr_uc_hdr_sn;
104static int hf_dect_nr_uc_hdr_rx_addr;
105static int hf_dect_nr_uc_hdr_tx_addr;
106
107/* 6.3.3.4: RD Broadcasting Header */
108static int hf_dect_nr_rdbh_hdr;
109static int hf_dect_nr_rdbh_hdr_res1;
110static int hf_dect_nr_rdbh_hdr_reset;
111static int hf_dect_nr_rdbh_hdr_sn;
112static int hf_dect_nr_rdbh_hdr_tx_addr;
113
114/* 6.3.4: MAC Multiplexing Header */
115static int hf_dect_nr_mux_hdr;
116static int hf_dect_nr_mux_mac_ext;
117static int hf_dect_nr_mux_len_bit;
118static int hf_dect_nr_mux_ie_type_long;
119static int hf_dect_nr_mux_ie_type_short_pl0;
120static int hf_dect_nr_mux_ie_type_short_pl1;
121static int hf_dect_nr_mux_mac_ie_len;
122
123/* 6.4.2.2: Network Beacon message */
124static int hf_dect_nr_nb_msg;
125static int hf_dect_nr_nb_res1;
126static int hf_dect_nr_nb_tx_pwr_field;
127static int hf_dect_nr_nb_pwr_const;
128static int hf_dect_nr_nb_current_field;
129static int hf_dect_nr_nb_channels;
130static int hf_dect_nr_nb_nb_period;
131static int hf_dect_nr_nb_cb_period;
132static int hf_dect_nr_nb_res2;
133static int hf_dect_nr_nb_next_cl_chan;
134static int hf_dect_nr_nb_time_to_next;
135static int hf_dect_nr_nb_res3;
136static int hf_dect_nr_nb_cl_max_tx_pwr;
137static int hf_dect_nr_nb_res4;
138static int hf_dect_nr_nb_curr_cl_chan;
139static int hf_dect_nr_nb_res5;
140static int hf_dect_nr_nb_additional_nb_channels;
141
142/* 6.4.2.3: Cluster Beacon message */
143static int hf_dect_nr_cb_msg;
144static int hf_dect_nr_cb_sfn;
145static int hf_dect_nr_cb_res1;
146static int hf_dect_nr_cb_tx_pwr_field;
147static int hf_dect_nr_cb_pwr_const;
148static int hf_dect_nr_cb_fo_field;
149static int hf_dect_nr_cb_next_chan_field;
150static int hf_dect_nr_cb_time_to_next_field;
151static int hf_dect_nr_cb_nb_period;
152static int hf_dect_nr_cb_cb_period;
153static int hf_dect_nr_cb_ctt;
154static int hf_dect_nr_cb_rel_qual;
155static int hf_dect_nr_cb_min_qual;
156static int hf_dect_nr_cb_res2;
157static int hf_dect_nr_cb_cl_max_tx_pwr;
158static int hf_dect_nr_cb_frame_offset;
159static int hf_dect_nr_cb_res3;
160static int hf_dect_nr_cb_next_cl_chan;
161static int hf_dect_nr_cb_time_to_next;
162
163/* 6.4.2.4: Association Request message */
164static int hf_dect_nr_a_req_msg;
165static int hf_dect_nr_a_req_setup_cause;
166static int hf_dect_nr_a_req_num_flows;
167static int hf_dect_nr_a_req_pwr_const;
168static int hf_dect_nr_a_req_ft_mode_field;
169static int hf_dect_nr_a_req_current;
170static int hf_dect_nr_a_req_res1;
171static int hf_dect_nr_a_req_harq_proc_tx;
172static int hf_dect_nr_a_req_max_harq_retx;
173static int hf_dect_nr_a_req_harq_proc_rx;
174static int hf_dect_nr_a_req_max_harq_rerx;
175static int hf_dect_nr_a_req_res2;
176static int hf_dect_nr_a_req_flow_id;
177static int hf_dect_nr_a_req_nb_period;
178static int hf_dect_nr_a_req_cb_period;
179static int hf_dect_nr_a_req_res3;
180static int hf_dect_nr_a_req_next_cl_chan;
181static int hf_dect_nr_a_req_time_to_next;
182static int hf_dect_nr_a_req_res4;
183static int hf_dect_nr_a_req_curr_cl_chan;
184
185/* 6.4.2.5: Association Response message */
186static int hf_dect_nr_a_rsp_msg;
187static int hf_dect_nr_a_rsp_ack_field;
188static int hf_dect_nr_a_rsp_res1;
189static int hf_dect_nr_a_rsp_harq_mod_field;
190static int hf_dect_nr_a_rsp_num_flows;
191static int hf_dect_nr_a_rsp_group_field;
192static int hf_dect_nr_a_rsp_res2;
193static int hf_dect_nr_a_rsp_rej_cause;
194static int hf_dect_nr_a_rsp_rej_timer;
195static int hf_dect_nr_a_rsp_harq_proc_rx;
196static int hf_dect_nr_a_rsp_max_harq_rerx;
197static int hf_dect_nr_a_rsp_harq_proc_tx;
198static int hf_dect_nr_a_rsp_max_harq_retx;
199static int hf_dect_nr_a_rsp_res3;
200static int hf_dect_nr_a_rsp_flow_id;
201static int hf_dect_nr_a_rsp_res4;
202static int hf_dect_nr_a_rsp_group_id;
203static int hf_dect_nr_a_rsp_res5;
204static int hf_dect_nr_a_rsp_res_tag;
205static int hf_dect_nr_a_rsp_res6;
206
207/* 6.4.2.6: Association Release message */
208static int hf_dect_nr_a_rel_msg;
209static int hf_dect_nr_a_rel_cause;
210static int hf_dect_nr_a_rel_res1;
211
212/* 6.4.2.7: Reconfiguration Request message */
213static int hf_dect_nr_rc_req_msg;
214static int hf_dect_nr_rc_req_tx_harq_field;
215static int hf_dect_nr_rc_req_rx_harq_field;
216static int hf_dect_nr_rc_req_rd_capability;
217static int hf_dect_nr_rc_req_num_flows;
218static int hf_dect_nr_rc_req_radio_resources;
219static int hf_dect_nr_rc_req_harq_proc_tx;
220static int hf_dect_nr_rc_req_max_harq_retx;
221static int hf_dect_nr_rc_req_harq_proc_rx;
222static int hf_dect_nr_rc_req_max_harq_rerx;
223static int hf_dect_nr_rc_req_setup_release;
224static int hf_dect_nr_rc_req_res;
225static int hf_dect_nr_rc_req_flow_id;
226
227/* 6.4.2.8: Reconfiguration Response message */
228static int hf_dect_nr_rc_rsp_msg;
229static int hf_dect_nr_rc_rsp_tx_harq_field;
230static int hf_dect_nr_rc_rsp_rx_harq_field;
231static int hf_dect_nr_rc_rsp_rd_capability;
232static int hf_dect_nr_rc_rsp_num_flows;
233static int hf_dect_nr_rc_rsp_radio_resources;
234static int hf_dect_nr_rc_rsp_harq_proc_tx;
235static int hf_dect_nr_rc_rsp_max_harq_retx;
236static int hf_dect_nr_rc_rsp_harq_proc_rx;
237static int hf_dect_nr_rc_rsp_max_harq_rerx;
238static int hf_dect_nr_rc_rsp_setup_release;
239static int hf_dect_nr_rc_rsp_res;
240static int hf_dect_nr_rc_rsp_flow_id;
241
242/* 6.4.2.9: Additional MAC message */
243static int hf_dect_nr_am_msg;
244
245/* 6.4.2.10 Joining Beacon message */
246static int hf_dect_nr_jb_msg;
247static int hf_dect_nr_jb_nb_channels;
248static int hf_dect_nr_jb_nb_period;
249static int hf_dect_nr_jb_res1;
250static int hf_dect_nr_jb_res2;
251static int hf_dect_nr_jb_nc;
252
253/* 6.4.3.1: MAC Security Info IE */
254static int hf_dect_nr_msi_ie;
255static int hf_dect_nr_msi_version;
256static int hf_dect_nr_msi_key;
257static int hf_dect_nr_msi_ivt;
258static int hf_dect_nr_msi_hpc;
259
260/* 6.4.3.2: Route Info IE */
261static int hf_dect_nr_ri_ie;
262static int hf_dect_nr_ri_sink_address;
263static int hf_dect_nr_ri_route_cost;
264static int hf_dect_nr_ri_application_sn;
265
266/* 6.4.3.3: Resource Allocation IE */
267static int hf_dect_nr_ra_ie;
268static int hf_dect_nr_ra_alloc_type;
269static int hf_dect_nr_ra_add_field;
270static int hf_dect_nr_ra_id_field;
271static int hf_dect_nr_ra_repeat;
272static int hf_dect_nr_ra_sfn_field;
273static int hf_dect_nr_ra_channel_field;
274static int hf_dect_nr_ra_rlf_field;
275static int hf_dect_nr_ra_res1;
276static int hf_dect_nr_ra_res2;
277static int hf_dect_nr_ra_start_ss_dl_9;
278static int hf_dect_nr_ra_start_ss_dl_8;
279static int hf_dect_nr_ra_len_type_dl;
280static int hf_dect_nr_ra_len_dl;
281static int hf_dect_nr_ra_start_ss_ul_9;
282static int hf_dect_nr_ra_start_ss_ul_8;
283static int hf_dect_nr_ra_len_type_ul;
284static int hf_dect_nr_ra_len_ul;
285static int hf_dect_nr_ra_short_rd_id;
286static int hf_dect_nr_ra_repetition;
287static int hf_dect_nr_ra_validity;
288static int hf_dect_nr_ra_sfn_value;
289static int hf_dect_nr_ra_res3;
290static int hf_dect_nr_ra_channel;
291static int hf_dect_nr_ra_res4;
292static int hf_dect_nr_ra_rlf;
293
294/* 6.4.3.4: Random Access Resource IE */
295static int hf_dect_nr_rar_ie;
296static int hf_dect_nr_rar_res1;
297static int hf_dect_nr_rar_repeat;
298static int hf_dect_nr_rar_sfn_field;
299static int hf_dect_nr_rar_channel_field;
300static int hf_dect_nr_rar_chan_2_field;
301static int hf_dect_nr_rar_res2;
302static int hf_dect_nr_rar_start_ss_9;
303static int hf_dect_nr_rar_start_ss_8;
304static int hf_dect_nr_rar_len_type;
305static int hf_dect_nr_rar_len;
306static int hf_dect_nr_rar_max_len_type;
307static int hf_dect_nr_rar_max_rach_len;
308static int hf_dect_nr_rar_cw_min_sig;
309static int hf_dect_nr_rar_dect_delay;
310static int hf_dect_nr_rar_resp_win;
311static int hf_dect_nr_rar_cw_max_sig;
312static int hf_dect_nr_rar_repetition;
313static int hf_dect_nr_rar_validity;
314static int hf_dect_nr_rar_sfn_value;
315static int hf_dect_nr_rar_res3;
316static int hf_dect_nr_rar_channel;
317static int hf_dect_nr_rar_channel_2;
318
319/* 6.4.3.5: RD Capability IE */
320static int hf_dect_nr_rdc_ie;
321static int hf_dect_nr_rdc_num_phy_cap;
322static int hf_dect_nr_rdc_release;
323static int hf_dect_nr_rdc_res1;
324static int hf_dect_nr_rdc_group_ass;
325static int hf_dect_nr_rdc_paging;
326static int hf_dect_nr_rdc_op_modes;
327static int hf_dect_nr_rdc_mesh;
328static int hf_dect_nr_rdc_sched;
329static int hf_dect_nr_rdc_mac_security;
330static int hf_dect_nr_rdc_dlc_type;
331static int hf_dect_nr_rdc_res2;
332static int hf_dect_nr_rdc_res3;
333static int hf_dect_nr_rdc_pwr_class;
334static int hf_dect_nr_rdc_max_nss_rx;
335static int hf_dect_nr_rdc_rx_for_tx_div;
336static int hf_dect_nr_rdc_rx_gain;
337static int hf_dect_nr_rdc_max_mcs;
338static int hf_dect_nr_rdc_soft_buf_size;
339static int hf_dect_nr_rdc_num_harq_proc;
340static int hf_dect_nr_rdc_res4;
341static int hf_dect_nr_rdc_harq_fb_delay;
342static int hf_dect_nr_rdc_d_delay;
343static int hf_dect_nr_rdc_half_dup;
344static int hf_dect_nr_rdc_res5;
345static int hf_dect_nr_rdc_phy_cap;
346static int hf_dect_nr_rdc_rd_class_mu;
347static int hf_dect_nr_rdc_rd_class_b;
348static int hf_dect_nr_rdc_res6;
349static int hf_dect_nr_rdc_res7;
350
351/* 6.4.3.6: Neighbouring IE */
352static int hf_dect_nr_n_ie;
353static int hf_dect_nr_n_res1;
354static int hf_dect_nr_n_id_field;
355static int hf_dect_nr_n_mu_field;
356static int hf_dect_nr_n_snr_field;
357static int hf_dect_nr_n_rssi2_field;
358static int hf_dect_nr_n_pwr_const;
359static int hf_dect_nr_n_next_channel_field;
360static int hf_dect_nr_n_ttn_field;
361static int hf_dect_nr_n_nb_period;
362static int hf_dect_nr_n_cb_period;
363static int hf_dect_nr_n_long_rd_id;
364static int hf_dect_nr_n_res2;
365static int hf_dect_nr_n_next_cl_channel;
366static int hf_dect_nr_n_time_to_next;
367static int hf_dect_nr_n_rssi2;
368static int hf_dect_nr_n_snr;
369static int hf_dect_nr_n_rd_class_u;
370static int hf_dect_nr_n_rd_class_b;
371static int hf_dect_nr_n_res3;
372
373/* 6.4.3.7: Broadcast Indication IE */
374static int hf_dect_nr_bi_ie;
375static int hf_dect_nr_bi_ind_type;
376static int hf_dect_nr_bi_idtype;
377static int hf_dect_nr_bi_ack;
378static int hf_dect_nr_bi_res1;
379static int hf_dect_nr_bi_fb;
380static int hf_dect_nr_bi_res_alloc;
381static int hf_dect_nr_bi_short_rd_id;
382static int hf_dect_nr_bi_long_rd_id;
383static int hf_dect_nr_bi_mcs_res1;
384static int hf_dect_nr_bi_mcs_channel_quality;
385static int hf_dect_nr_bi_mimo2_res1;
386static int hf_dect_nr_bi_mimo2_num_layers;
387static int hf_dect_nr_bi_mimo2_cb_index;
388static int hf_dect_nr_bi_mimo4_num_layers;
389static int hf_dect_nr_bi_mimo4_cb_index;
390
391/* 6.4.3.8: Padding IE */
392static int hf_dect_nr_pd_ie;
393static int hf_dect_nr_pd_bytes;
394
395/* 6.4.3.9: Group Assignment IE */
396static int hf_dect_nr_ga_ie;
397static int hf_dect_nr_ga_single_field;
398static int hf_dect_nr_ga_group_id;
399static int hf_dect_nr_ga_direct;
400static int hf_dect_nr_ga_resource_tag;
401
402/* 6.4.3.10: Load Info IE */
403static int hf_dect_nr_li_ie;
404static int hf_dect_nr_li_res1;
405static int hf_dect_nr_li_max_assoc_field;
406static int hf_dect_nr_li_rd_pt_load_field;
407static int hf_dect_nr_li_rach_load_field;
408static int hf_dect_nr_li_channel_load_field;
409static int hf_dect_nr_li_traffic_load_pct;
410static int hf_dect_nr_li_max_assoc_8;
411static int hf_dect_nr_li_max_assoc_16;
412static int hf_dect_nr_li_curr_ft_pct;
413static int hf_dect_nr_li_curr_pt_pct;
414static int hf_dect_nr_li_rach_load_pct;
415static int hf_dect_nr_li_subslots_free_pct;
416static int hf_dect_nr_li_subslots_busy_pct;
417
418/* 6.4.3.12: Measurement Report IE */
419static int hf_dect_nr_mr_ie;
420static int hf_dect_nr_mr_res1;
421static int hf_dect_nr_mr_snr_field;
422static int hf_dect_nr_mr_rssi2_field;
423static int hf_dect_nr_mr_rssi1_field;
424static int hf_dect_nr_mr_tx_count_field;
425static int hf_dect_nr_mr_rach;
426static int hf_dect_nr_mr_snr;
427static int hf_dect_nr_mr_rssi2;
428static int hf_dect_nr_mr_rssi1;
429static int hf_dect_nr_mr_tx_count;
430
431/* 6.4.3.13: Radio Device Status IE */
432static int hf_dect_nr_rds_ie;
433static int hf_dect_nr_rds_res1;
434static int hf_dect_nr_rds_assoc;
435static int hf_dect_nr_rds_sf;
436static int hf_dect_nr_rds_dur;
437
438/* 6.4.3.15 RD Capability short IE */
439static int hf_dect_nr_rdcs_ie;
440static int hf_dect_nr_rdcs_res1;
441static int hf_dect_nr_rdcs_cb_mc;
442static int hf_dect_nr_rdcs_harq_fb_delay;
443static int hf_dect_nr_rdcs_dwa;
444
445/* 6.4.3.16 Source Routing IE */
446static int hf_dect_nr_sr_ie;
447static int hf_dect_nr_sr_id;
448static int hf_dect_nr_sr_hop_limit;
449static int hf_dect_nr_sr_hop_count;
450static int hf_dect_nr_sr_reg_validity_timer;
451
452/* 6.4.3.17 Joining Information IE */
453static int hf_dect_nr_ji_ie;
454static int hf_dect_nr_ji_res1;
455static int hf_dect_nr_ji_num_eps;
456static int hf_dect_nr_ji_ep;
457
458/* 6.4.3.18 Association Control IE */
459static int hf_dect_nr_ac_ie;
460static int hf_dect_nr_ac_cb_m;
461static int hf_dect_nr_ac_dl_data_reception;
462static int hf_dect_nr_ac_ul_period;
463
464/* Escape */
465static int hf_dect_nr_escape;
466
467/* IE type extension */
468static int hf_dect_nr_ie_type_extension;
469static int hf_dect_nr_ie_extension;
470
471/* MIC */
472static int hf_dect_nr_mic_bytes;
473
474/* DLC */
475static int hf_dect_nr_dlc_pdu;
476static int hf_dect_nr_dlc_ie_type;
477static int hf_dect_nr_dlc_res1;
478static int hf_dect_nr_dlc_si;
479static int hf_dect_nr_dlc_sn;
480static int hf_dect_nr_dlc_segm_offset;
481static int hf_dect_nr_dlc_timers;
482
483/* DLC Routing header */
484static int hf_dect_nr_dlc_routing_hdr;
485static int hf_dect_nr_dlc_routing_res1;
486static int hf_dect_nr_dlc_routing_qos;
487static int hf_dect_nr_dlc_routing_delay_field;
488static int hf_dect_nr_dlc_routing_hop_count_limit;
489static int hf_dect_nr_dlc_routing_dest_add;
490static int hf_dect_nr_dlc_routing_type;
491static int hf_dect_nr_dlc_routing_src_addr;
492static int hf_dect_nr_dlc_routing_dst_addr;
493static int hf_dect_nr_dlc_routing_hop_count;
494static int hf_dect_nr_dlc_routing_hop_limit;
495static int hf_dect_nr_dlc_routing_delay;
496static int hf_dect_nr_dlc_routing_seq_num;
497
498/* DLC Extension header */
499static int hf_dect_nr_dlc_ext_hdr;
500static int hf_dect_nr_dlc_ext_coding;
501static int hf_dect_nr_dlc_ext_ie_type;
502static int hf_dect_nr_dlc_ext_len;
503static int hf_dect_nr_dlc_ext_next_hop_addr;
504static int hf_dect_nr_dlc_ext_source_routing_id;
505static int hf_dect_nr_dlc_ext_route_error_reason;
506static int hf_dect_nr_dlc_ext_invalid_next_hop_addr;
507
508/* Higher layer signalling */
509static int hf_dect_nr_hls_bin;
510
511/* DLC Reassembly */
512static int hf_dect_nr_segments;
513static int hf_dect_nr_segment;
514static int hf_dect_nr_segment_overlap;
515static int hf_dect_nr_segment_overlap_conflict;
516static int hf_dect_nr_segment_multiple_tails;
517static int hf_dect_nr_segment_too_long_segment;
518static int hf_dect_nr_segment_error;
519static int hf_dect_nr_segment_count;
520static int hf_dect_nr_reassembled_in;
521static int hf_dect_nr_reassembled_length;
522
523/* CVG */
524static int hf_dect_nr_cvg_pdu;
525
526/* CVG Header */
527static int hf_dect_nr_cvg_header;
528static int hf_dect_nr_cvg_header_cvg_ext;
529static int hf_dect_nr_cvg_header_mt;
530static int hf_dect_nr_cvg_header_ie_type;
531static int hf_dect_nr_cvg_header_f2c;
532static int hf_dect_nr_cvg_header_mux_tag;
533static int hf_dect_nr_cvg_header_length;
534
535/* CVG IEs */
536static int hf_dect_nr_cvg_ep_mux_ie;
537static int hf_dect_nr_cvg_ep_mux_ie_endpoint;
538static int hf_dect_nr_cvg_data_ie;
539static int hf_dect_nr_cvg_data_ie_si;
540static int hf_dect_nr_cvg_data_ie_sli;
541static int hf_dect_nr_cvg_data_ie_seq_num;
542static int hf_dect_nr_cvg_data_ie_sdu_len;
543static int hf_dect_nr_cvg_data_ie_seg_offset;
544static int hf_dect_nr_cvg_data_ep_ie;
545static int hf_dect_nr_cvg_data_ep_ie_endpoint;
546static int hf_dect_nr_cvg_data_transp_ie;
547static int hf_dect_nr_cvg_security_ie;
548static int hf_dect_nr_cvg_tx_services_conf_ie;
549static int hf_dect_nr_cvg_arq_fb_ie;
550static int hf_dect_nr_cvg_arq_poll_ie;
551static int hf_dect_nr_cvg_flow_status_ie;
552static int hf_dect_nr_cvg_escape;
553
554/* Miscellaneous */
555static int hf_dect_nr_mac_encrypted;
556static int hf_dect_nr_conv_index;
557static int hf_dect_nr_undecoded;
558
559/* Expert info */
560static expert_field ei_dect_nr_ie_length_not_set;
561static expert_field ei_dect_nr_pdu_cut_short;
562static expert_field ei_dect_nr_length_mismatch;
563static expert_field ei_dect_nr_res_non_zero;
564static expert_field ei_dect_nr_mac_encrypted;
565static expert_field ei_dect_nr_undecoded;
566
567/* Protocol subtrees */
568static int ett_dect_nr;
569static int ett_dect_nr_phf;
570static int ett_dect_nr_mac_pdu;
571static int ett_dect_nr_mac_encrypted;
572static int ett_dect_nr_data_hdr;
573static int ett_dect_nr_bc_hdr;
574static int ett_dect_nr_uc_hdr;
575static int ett_dect_nr_rdbh_hdr;
576static int ett_dect_nr_mux_hdr;
577static int ett_dect_nr_nb_msg;
578static int ett_dect_nr_cb_msg;
579static int ett_dect_nr_a_req_msg;
580static int ett_dect_nr_a_rsp_msg;
581static int ett_dect_nr_a_rel_msg;
582static int ett_dect_nr_rc_req_msg;
583static int ett_dect_nr_rc_rsp_msg;
584static int ett_dect_nr_am_msg;
585static int ett_dect_nr_jb_msg;
586static int ett_dect_nr_msi_ie;
587static int ett_dect_nr_ri_ie;
588static int ett_dect_nr_ra_ie;
589static int ett_dect_nr_rar_ie;
590static int ett_dect_nr_rdc_ie;
591static int ett_dect_nr_rdc_phy_cap;
592static int ett_dect_nr_n_ie;
593static int ett_dect_nr_bi_ie;
594static int ett_dect_nr_ga_ie;
595static int ett_dect_nr_li_ie;
596static int ett_dect_nr_mr_ie;
597static int ett_dect_nr_rds_ie;
598static int ett_dect_nr_rdcs_ie;
599static int ett_dect_nr_sr_ie;
600static int ett_dect_nr_ji_ie;
601static int ett_dect_nr_ac_ie;
602static int ett_dect_nr_dlc_pdu;
603static int ett_dect_nr_dlc_routing_hdr;
604static int ett_dect_nr_dlc_ext_hdr;
605static int ett_dect_nr_segment;
606static int ett_dect_nr_segments;
607static int ett_dect_nr_cvg;
608static int ett_dect_nr_cvg_header;
609static int ett_dect_nr_cvg_ep_mux_ie;
610static int ett_dect_nr_cvg_data_ep_ie;
611static int ett_dect_nr_cvg_data_ie;
612static int ett_dect_nr_cvg_data_transp_ie;
613static int ett_dect_nr_cvg_security_ie;
614static int ett_dect_nr_cvg_tx_services_conf_ie;
615static int ett_dect_nr_cvg_arq_fb_ie;
616static int ett_dect_nr_cvg_arq_poll_ie;
617static int ett_dect_nr_cvg_flow_status_ie;
618
619static dissector_handle_t dect_nr_handle;
620static dissector_handle_t data_handle;
621static dissector_handle_t ipv6_handle;
622static dissector_handle_t sixlowpan_handle;
623
624static dissector_table_t mac_hdr_dissector_table;
625static dissector_table_t ie_dissector_table;
626static dissector_table_t ie_short_dissector_table;
627static dissector_table_t ie_extension_dissector_table;
628
629static heur_dissector_list_t heur_subdissector_list;
630
631static wmem_map_t *rd_id_map;
632
633/* Preference to configure PHY header type */
634typedef enum {
635 PHF_TYPE_TYPE_1,
636 PHF_TYPE_TYPE_2,
637 PHF_TYPE_TYPE_AUTO,
638} phf_type_t;
639
640static int phf_type_pref = PHF_TYPE_TYPE_AUTO;
641static const enum_val_t phf_type_pref_vals[] = {
642 { "auto", "Automatic", PHF_TYPE_TYPE_AUTO },
643 { "type1", "Type 1: 40 bits", PHF_TYPE_TYPE_1 },
644 { "type2", "Type 2: 80 bits", PHF_TYPE_TYPE_2 },
645 { NULL((void*)0), NULL((void*)0), -1 }
646};
647
648/* Preference to configure DLC data type */
649typedef enum {
650 DLC_DATA_TYPE_AUTO,
651 DLC_DATA_TYPE_BINARY,
652 DLC_DATA_TYPE_CVG,
653 DLC_DATA_TYPE_IPv6,
654} dlc_data_type_t;
655
656static int dlc_data_type_pref = DLC_DATA_TYPE_AUTO;
657static const enum_val_t dlc_data_type_pref_vals[] = {
658 { "auto", "Automatic", DLC_DATA_TYPE_AUTO },
659 { "binary", "Binary (data)", DLC_DATA_TYPE_BINARY },
660 { "cvg", "CVG layer", DLC_DATA_TYPE_CVG },
661 { "ipv6", "IPv6", DLC_DATA_TYPE_IPv6 },
662 { NULL((void*)0), NULL((void*)0), -1 }
663};
664
665#define KEY_MAX4 4
666static bool_Bool mac_pdus_decrypted_pref;
667static const char *cipher_key_pref[KEY_MAX4];
668
669static const value_string dect_plcf_size_vals[] = {
670 { 0, "Type 1: 40 bits" },
671 { 1, "Type 2: 80 bits" },
672 { 0, NULL((void*)0) }
673};
674
675/* Table 4.2.3.2-1: Use of Long RD ID address space */
676static const value_string long_rd_id_address_vals[] = {
677 { 0x00000000, "Reserved address" },
678 { 0xFFFFFFFE, "Backend address" },
679 { 0xFFFFFFFF, "Broadcast address" },
680 { 0, NULL((void*)0) }
681};
682
683/* Table 4.2.3.3-1: Use of Short RD ID address space */
684static const value_string short_rd_id_address_vals[] = {
685 { 0x0000, "Reserved address" },
686 { 0xFFFF, "Broadcast address" },
687 { 0, NULL((void*)0) }
688};
689
690/* Table 6.2.1-1: Physical Layer Control Field: Type 1 */
691static const value_string header_formats_type1_vals[] = {
692 { 0, "Format 0" },
693 { 0, NULL((void*)0) }
694};
695
696/* Table 6.2.1-2: Physical Layer Control Field: Type 2 */
697static const value_string header_formats_type2_vals[] = {
698 { 0, "Format 0 - Transmitter does request HARQ feedback" },
699 { 1, "Format 1 - Transmitter does not request HARQ feedback" },
700 { 0, NULL((void*)0) }
701};
702
703/* Table 6.2.1-3a: Transmit Power */
704static const value_string tx_powers_3a_vals[] = {
705 { 0, "-40 dBm" },
706 { 1, "-30 dBm" },
707 { 2, "-20 dBm" },
708 { 3, "-16 dBm" },
709 { 4, "-12 dBm" },
710 { 5, "-8 dBm" },
711 { 6, "-4 dBm" },
712 { 7, "0 dBm" },
713 { 8, "4 dBm" },
714 { 9, "7 dBm" },
715 { 10, "10 dBm" },
716 { 11, "13 dBm" },
717 { 12, "16 dBm" },
718 { 13, "19 dBm" },
719 { 14, "21 dBm" },
720 { 15, "23 dBm" },
721 { 0, NULL((void*)0) }
722};
723
724/* Table 6.2.1-3b: Transmit Power */
725static const value_string tx_powers_3b_vals[] = {
726 { 0, "Reserved" },
727 { 1, "Reserved" },
728 { 2, "Reserved" },
729 { 3, "Reserved" },
730 { 4, "-12 dBm" },
731 { 5, "-8 dBm" },
732 { 6, "-4 dBm" },
733 { 7, "0 dBm" },
734 { 8, "4 dBm" },
735 { 9, "7 dBm" },
736 { 10, "10 dBm" },
737 { 11, "13 dBm" },
738 { 12, "16 dBm" },
739 { 13, "19 dBm" },
740 { 14, "21 dBm" },
741 { 15, "23 dBm" },
742 { 0, NULL((void*)0) }
743};
744
745static const true_false_string pkt_len_type_tfs = {
746 "slots",
747 "subslots"
748};
749
750/* ETSI TS 103 636-3 */
751static const value_string mcse_vals[] = {
752 { 0, "BPSK" },
753 { 1, "QPSK, R=1/2" },
754 { 2, "QPSK, R=3/4" },
755 { 3, "16-QAM, R=1/2" },
756 { 4, "16-QAM, R=3/4" },
757 { 5, "64-QAM, R=2/3" },
758 { 6, "64-QAM, R=3/4" },
759 { 7, "64-QAM, R=5/6" },
760 { 8, "256-QAM, R=3/4" },
761 { 9, "256-QAM, R=5/6" },
762 { 10, "1024-QAM, R=3/4" },
763 { 11, "1024-QAM, R=5/6" },
764 { 12, "Reserved" },
765 { 13, "Reserved" },
766 { 14, "Reserved" },
767 { 15, "Reserved" },
768 { 0, NULL((void*)0) }
769};
770
771/* Table 6.2.1-4: Number of Spatial Streams */
772static const value_string num_spatial_stream_vals[] = {
773 { 0, "Single spatial stream" },
774 { 1, "Two spatial streams" },
775 { 2, "Four spatial streams" },
776 { 3, "Eight spatial streams" },
777 { 0, NULL((void*)0) }
778};
779
780/* Table 6.2.2-1: Feedback format for 12-bit Feedback Info */
781static const value_string feedback_format_vals[] = {
782 { 0, "No feedback, receiver shall ignore feedback info bits" },
783 { 1, "Format 1" },
784 { 2, "Format 2" },
785 { 3, "Format 3" },
786 { 4, "Format 4" },
787 { 5, "Format 5" },
788 { 6, "Format 6" },
789 { 7, "Format 7" },
790 { 15, "Escape" },
791 { 0, NULL((void*)0) }
792};
793
794/* Table 6.2.2-2b: Feedback info format 2: MIMO feedback */
795static const true_false_string fbi2_mimo_fb_tfs = {
796 "Dual layers",
797 "Single layer"
798};
799
800/* Table 6.2.2-2e: Feedback info format 5: MIMO feedback */
801static const value_string fbi5_mimo_fb_vals[] = {
802 { 0, "Single layer, codebook index included" },
803 { 1, "Dual layers, codebook index included" },
804 { 2, "Four layers, codebook index included" },
805 { 3, "Reserved" },
806 { 0, NULL((void*)0) }
807};
808
809/* Table 6.2.2-3: Channel Quality Indicator */
810static const value_string cqi_vals[] = {
811 { 0, "Out of Range" },
812 { 1, "MCS-0" },
813 { 2, "MCS-1" },
814 { 3, "MCS-2" },
815 { 4, "MCS-3" },
816 { 5, "MCS-4" },
817 { 6, "MCS-5" },
818 { 7, "MCS-6" },
819 { 8, "MCS-7" },
820 { 9, "MCS-8" },
821 { 10, "MCS-9" },
822 { 11, "MCS-10" },
823 { 12, "MCS-11" },
824 { 13, "Reserved" },
825 { 14, "Reserved" },
826 { 15, "Reserved" },
827 { 0, NULL((void*)0) }
828};
829
830/* Table 6.2.2-4: Buffer Status */
831static const value_string buffer_status_vals[] = {
832 { 0, "BS = 0" },
833 { 1, "0 < BS ≤ 16" },
834 { 2, "16 < BS ≤ 32" },
835 { 3, "32 < BS ≤ 64" },
836 { 4, "64 < BS ≤ 128" },
837 { 5, "128 < BS ≤ 256" },
838 { 6, "256 < BS ≤ 512" },
839 { 7, "512 < BS ≤ 1 024" },
840 { 8, "1 024 < BS ≤ 2 048" },
841 { 9, "2 048 < BS ≤ 4 096" },
842 { 10, "4 096 < BS ≤ 8 192" },
843 { 11, "8 192 < BS ≤ 16 384" },
844 { 12, "16 384 < BS ≤ 32 768" },
845 { 13, "32 768 < BS ≤ 65 536" },
846 { 14, "65 536 < BS ≤ 131 072" },
847 { 15, "BS > 131 072" },
848 { 0, NULL((void*)0) }
849};
850
851/* Table 6.3.2-1 */
852static const value_string mac_security_vals[] = {
853 { 0, "MAC security is not used for this MAC PDU" },
854 /* 1: The MAC PDU sequence number is used as PSN for security. */
855 /* The ciphered part starts immediately after the MAC Common header. */
856 { 1, "MAC security is used and the MAC Security IE is not present" },
857 /* 2: The ciphered part starts immediately after the MAC Security info. */
858 { 2, "MAC security is used and a MAC Security Info IE is in the MAC PDU" },
859 { 3, "Reserved" },
860 { 0, NULL((void*)0) }
861};
862
863/* Table 6.3.2-2: MAC header Type field */
864static const value_string mac_header_type_vals[] = {
865 { 0, "Data MAC PDU Header" },
866 { 1, "Beacon Header" },
867 { 2, "Unicast Header" },
868 { 3, "RD Broadcasting Header" },
869 { 15, "Escape" },
870 { 0, NULL((void*)0) }
871};
872
873/* Table 6.3.4-1 */
874static const value_string mac_ext_vals[] = {
875 { 0, "No length field is included in the IE header, the IE type defines the length of the IE payload" },
876 { 1, "8 bit length included indicating the length of the IE payload" },
877 { 2, "16 bit length included indicating the length of the IE payload" },
878 { 3, "Short IE, a one bit length field is included in the IE header" },
879 { 0, NULL((void*)0) }
880};
881
882/* Table 6.3.4-1 with value 3: IE payload size */
883static const value_string mac_ext_len_bit_vals[] = {
884 { 0, "IE payload size 0 bytes" },
885 { 1, "IE payload size 1 byte" },
886 { 0, NULL((void*)0) }
887};
888
889/* Table 6.3.4-2: IE type field encoding for MAC Extension field encoding 00, 01, 10 */
890static const value_string mux_hdr_ie_type_mac_ext_012_vals[] = {
891 { 0, "Padding IE" },
892 { 1, "Higher layer signalling - flow 1" },
893 { 2, "Higher layer signalling - flow 2" },
894 { 3, "User plane data - flow 1" },
895 { 4, "User plane data - flow 2" },
896 { 5, "User plane data - flow 3" },
897 { 6, "User plane data - flow 4" },
898 { 7, "Reserved" },
899 { 8, "Network Beacon message" },
900 { 9, "Cluster Beacon message" },
901 { 10, "Association Request message" },
902 { 11, "Association Response message" },
903 { 12, "Association Release message" },
904 { 13, "Reconfiguration Request message" },
905 { 14, "Reconfiguration Response message" },
906 { 15, "Additional MAC message" },
907 { 16, "MAC Security Info IE" },
908 { 17, "Route Info IE" },
909 { 18, "Resource Allocation IE" },
910 { 19, "Random Access Resource IE" },
911 { 20, "RD Capability IE" },
912 { 21, "Neighbouring IE" },
913 { 22, "Broadcast Indication IE" },
914 { 23, "Group Assignment IE" },
915 { 24, "Load Info IE" },
916 { 25, "Measurement Report IE" },
917 { 26, "Source Routing IE" },
918 { 27, "Joining Beacon message" },
919 { 28, "Joining Information IE" },
920 /* 29 - 61 Reserved */
921 { 62, "Escape" },
922 { 63, "IE type extension" },
923 { 0, NULL((void*)0) }
924};
925
926/* Table 6.3.4-3: IE type field encoding for MAC extension field encoding 11 and payload length 0 byte */
927static const value_string mux_hdr_ie_type_mac_ext_3_pl_0_vals[] = {
928 { 0, "Padding IE" },
929 { 1, "Configuration Request IE" },
930 { 2, "Keep Alive IE" },
931 /* 3 - 15 Reserved */
932 { 16, "MAC Security Info IE" },
933 /* 17 - 29 Reserved */
934 { 30, "Escape" },
935 { 0, NULL((void*)0) }
936};
937
938/* Table 6.3.4-4: IE type field encoding for MAC extension field encoding 11 and payload length of 1 byte */
939static const value_string mux_hdr_ie_type_mac_ext_3_pl_1_vals[] = {
940 { 0, "Padding IE" },
941 { 1, "Radio Device Status IE" },
942 { 2, "RD Capability Short IE" },
943 { 3, "Association Control IE" },
944 /* 4 - 29 Reserved */
945 { 30, "Escape" },
946 { 0, NULL((void*)0) }
947};
948
949/* Table 6.4.2.2-1: Current */
950static const true_false_string nb_ie_current_tfs = {
951 "Not the same as the next cluster channel",
952 "The same as the next cluster channel"
953};
954
955/* Network Beacon channels */
956
957/* Table 6.4.2.2-1: Network Beacon period */
958static const value_string nb_ie_nb_period_vals[] = {
959 { 0, "50 ms" },
960 { 1, "100 ms" },
961 { 2, "500 ms" },
962 { 3, "1000 ms" },
963 { 4, "1500 ms" },
964 { 5, "2000 ms" },
965 { 6, "4000 ms" },
966 { 7, "Reserved" },
967 { 8, "Reserved" },
968 { 9, "Reserved" },
969 { 10, "Reserved" },
970 { 11, "Reserved" },
971 { 12, "Reserved" },
972 { 13, "Reserved" },
973 { 14, "Reserved" },
974 { 15, "Reserved" },
975 { 0, NULL((void*)0) }
976};
977
978/* Table 6.4.2.2-1: Cluster Beacon period */
979static const value_string nb_ie_cb_period_vals[] = {
980 { 0, "10 ms" },
981 { 1, "50 ms" },
982 { 2, "100 ms" },
983 { 3, "500 ms" },
984 { 4, "1000 ms" },
985 { 5, "1500 ms" },
986 { 6, "2000 ms" },
987 { 7, "4000 ms" },
988 { 8, "8000 ms" },
989 { 9, "16000 ms" },
990 { 10, "32000 ms" },
991 { 11, "Reserved" },
992 { 12, "Reserved" },
993 { 13, "Reserved" },
994 { 14, "Reserved" },
995 { 15, "Reserved" },
996 { 0, NULL((void*)0) }
997};
998
999/* Table 6.4.2.3-1: Cluster beacon IE field definitions */
1000static const true_false_string cb_next_chan_tfs = {
1001 "Different cluster channel; the next cluster channel field is included",
1002 "The same as the current cluster channel"
1003};
1004
1005/* Table 6.4.2.3-1: Cluster beacon IE field definitions */
1006static const true_false_string cb_ttn_tfs = {
1007 "Transmitted in a time location, the Time to next field is present",
1008 "Transmitted based on Cluster beacon period"
1009};
1010
1011/* Table 6.4.3.1-1: Version */
1012static const value_string msi_version_vals[] = {
1013 { 0, "Mode 1" },
1014 { 1, "Reserved" },
1015 { 2, "Reserved" },
1016 { 3, "Reserved" },
1017 { 0, NULL((void*)0) }
1018};
1019
1020/* Table 6.4.3.1-2: Security IV type for Mode 1 */
1021static const value_string msi_ivt_vals[] = {
1022 { 0, "One time HPC" },
1023 { 1, "Resynchronizing HPC, initiate Mode 1 security by using this HPC value in both UL and DL communication" },
1024 { 2, "One time HPC, with HPC request" },
1025 { 3, "Reserved" },
1026 { 4, "Reserved" },
1027 { 5, "Reserved" },
1028 { 6, "Reserved" },
1029 { 7, "Reserved" },
1030 { 8, "Reserved" },
1031 { 9, "Reserved" },
1032 { 10, "Reserved" },
1033 { 11, "Reserved" },
1034 { 12, "Reserved" },
1035 { 13, "Reserved" },
1036 { 14, "Reserved" },
1037 { 15, "Reserved" },
1038 { 0, NULL((void*)0) }
1039};
1040
1041/* Table 6.4.3.4-1: RACH Resource allocation bitmap */
1042static const value_string rar_repeat_vals[] = {
1043 { 0, "Single allocation; repetition and validity fields not present" },
1044 { 1, "Repeated in the following frames; periodicity in the Repetition field" },
1045 { 2, "Repeated in the following subslots; periodicity in the Repetition field" },
1046 { 3, "Reserved" },
1047 { 0, NULL((void*)0) }
1048};
1049
1050/* Table 6.4.3.4-1: RACH Resource allocation bitmap */
1051static const true_false_string rar_sfn_tfs = {
1052 "Resource allocation is valid from the frame indicated in SFN value field onwards",
1053 "Resource allocation is immediately valid from this frame onwards (no SFN value field)"
1054};
1055
1056/* Table 6.4.3.4-1: RACH Resource allocation bitmap */
1057static const true_false_string rar_channel_tfs = {
1058 "The channel where resource allocation is valid is indicated in the channel field of the IE",
1059 "The resource allocation is valid for current channel, the channel field is not present in the IE"
1060};
1061
1062/* Table 6.4.3.4-1: RACH Resource allocation bitmap */
1063static const true_false_string rar_chan_2_tfs = {
1064 "The channel for Random access response message is included in the end of the IE",
1065 "The random access response is sent on the same channel as the random access message"
1066};
1067
1068/* Table 6.4.3.4-1: RACH Resource allocation bitmap */
1069static const true_false_string rar_dect_delay_tfs = {
1070 "Response window starts 0.5 frames after the start of the frame where the RA transmission was initiated",
1071 "Response window starts 3 subslots after the last subslot of the Random Access packet transmission"
1072};
1073
1074/* Table 6.4.2.4-2: Association Setup Cause IE */
1075static const value_string ar_setup_cause_vals[] = {
1076 { 0, "Initial association" },
1077 { 1, "Association to request new set of flows" },
1078 { 2, "Association due to mobility" },
1079 { 3, "Re-association after error: Loss of connection, Security error or Other error" },
1080 { 4, "Change of operating channel of this FT device" },
1081 { 5, "Change of operating mode (PT->FT or FT->PT)" },
1082 { 6, "Paging response" },
1083 { 7, "Reserved" },
1084 { 0, NULL((void*)0) }
1085};
1086
1087/* Table 6.4.2.4-1: Association Request IE: Number of flows */
1088static const value_string a_req_num_flow_vals[] = {
1089 { 7, "Reserved" },
1090 { 0, NULL((void*)0) }
1091};
1092
1093/* Table 6.4.2.4-1: Association Request - operating modes */
1094static const true_false_string ar_ft_mode_tfs = {
1095 "The RD operates also in FT mode, NB/CB Period, Next Cluster Channel and TTN fields are included",
1096 "The RD operates only in PT Mode"
1097};
1098
1099/* Table 6.4.2.4-1: Association Request - MAX HARQ RE-TX or RE-RX */
1100static const value_string ar_max_harq_re_rxtx_vals[] = {
1101 { 0, "0.105 ms" },
1102 { 1, "0.2 ms" },
1103 { 2, "0.4 ms" },
1104 { 3, "0.8 ms" },
1105 { 4, "1 ms" },
1106 { 5, "2 ms" },
1107 { 6, "4 ms" },
1108 { 7, "6 ms" },
1109 { 8, "8 ms" },
1110 { 9, "10 ms" },
1111 { 10, "20 ms" },
1112 { 11, "30 ms" },
1113 { 12, "40 ms" },
1114 { 13, "50 ms" },
1115 { 14, "60 ms" },
1116 { 15, "70 ms" },
1117 { 16, "80 ms" },
1118 { 17, "90 ms" },
1119 { 18, "100 ms" },
1120 { 19, "120 ms" },
1121 { 20, "140 ms" },
1122 { 21, "160 ms" },
1123 { 22, "180 ms" },
1124 { 23, "200 ms" },
1125 { 24, "240 ms" },
1126 { 25, "280 ms" },
1127 { 26, "320 ms" },
1128 { 27, "360 ms" },
1129 { 28, "400 ms" },
1130 { 29, "450 ms" },
1131 { 30, "500 ms" },
1132 { 31, "Reserved" },
1133 { 0, NULL((void*)0) }
1134};
1135
1136/* Table 6.4.2.5-1: Association Response: HARQ-mod */
1137static const true_false_string ar_harq_mod_tfs = {
1138 "Present",
1139 "Not present, accepted as configured in the Association Request"
1140};
1141
1142/* Table 6.4.2.5-1: Association Response: Number of flows */
1143static const value_string a_rsp_num_flow_vals[] = {
1144 { 7, "All flows accepted as configured in the Association Request" },
1145 { 0, NULL((void*)0) }
1146};
1147
1148/* Table 6.4.2.5-2: Reject Cause */
1149static const value_string assoc_rej_cause_vals[] = {
1150 { 0, "No sufficient radio capacity" },
1151 { 1, "No sufficient HW capacity" },
1152 { 2, "Conflict with Short RD ID detected" },
1153 { 3, "Non-secured Association Requests not accepted" },
1154 { 4, "Other reason" },
1155 { 5, "Reserved" },
1156 { 6, "Reserved" },
1157 { 7, "Reserved" },
1158 { 8, "Reserved" },
1159 { 9, "Reserved" },
1160 { 10, "Reserved" },
1161 { 11, "Reserved" },
1162 { 12, "Reserved" },
1163 { 13, "Reserved" },
1164 { 14, "Reserved" },
1165 { 15, "Reserved" },
1166 { 0, NULL((void*)0) }
1167};
1168
1169/* Table 6.4.2.5-2: Reject Time */
1170/* Time how long the other RDs shall prohibit sending new Association Requests to this RD */
1171static const value_string assoc_rej_time_vals[] = {
1172 { 0, "0 s" },
1173 { 1, "5 s" },
1174 { 2, "10 s" },
1175 { 3, "30 s" },
1176 { 4, "60 s" },
1177 { 5, "120 s" },
1178 { 6, "180 s" },
1179 { 7, "300 s" },
1180 { 8, "600 s" },
1181 { 9, "Reserved" },
1182 { 10, "Reserved" },
1183 { 11, "Reserved" },
1184 { 12, "Reserved" },
1185 { 13, "Reserved" },
1186 { 14, "Reserved" },
1187 { 15, "Reserved" },
1188 { 0, NULL((void*)0) }
1189};
1190
1191/* Table 6.4.2.6-1: Association Release: Release Cause */
1192static const value_string assoc_rel_cause_vals[] = {
1193 { 0, "Connection termination" },
1194 { 1, "Mobility" },
1195 { 2, "Long inactivity" },
1196 { 3, "Incompatible configuration" },
1197 { 4, "No sufficient HW or memory resource" },
1198 { 5, "No sufficient radio resources" },
1199 { 6, "Bad radio quality" },
1200 { 7, "Security error" },
1201 { 8, "Short RD ID Conflict detected in PT side" },
1202 { 9, "Short RD ID Conflict detected in FT side" },
1203 { 10, "Not associated" },
1204 { 11, "Reserved" },
1205 { 12, "Not operating in FT mode" },
1206 { 13, "Other error" },
1207 { 14, "Reserved" },
1208 { 15, "Reserved" },
1209 { 0, NULL((void*)0) }
1210};
1211
1212/* Table 6.4.2.7-1: Reconfiguration Request IE field definitions */
1213static const true_false_string rc_harq_req_tfs = {
1214 "Requested to be modified",
1215 "Not requested to be modified"
1216};
1217
1218/* Table 6.4.2.7-1: Reconfiguration Request IE field definitions */
1219static const true_false_string rc_rd_capability_req_tfs = {
1220 "The RD capability is changed",
1221 "Ignore",
1222};
1223
1224/* Table 6.4.2.7-1: Reconfiguration Request IE: Number of flows */
1225static const value_string rc_req_num_flow_vals[] = {
1226 { 7, "Reserved" },
1227 { 0, NULL((void*)0) }
1228};
1229
1230/* Table 6.4.2.7-1: Reconfiguration Request IE field definitions */
1231static const value_string rc_radio_resource_vals[] = {
1232 { 0, "No Change" },
1233 { 1, "Requesting more resources" },
1234 { 2, "Requesting less resources" },
1235 { 3, "The Resource allocation" },
1236 { 0, NULL((void*)0) }
1237};
1238
1239/* Table 6.4.2.7-1: Reconfiguration Request IE field definitions */
1240static const true_false_string rc_setup_release_tfs = {
1241 "Released",
1242 "Setup or reconfiguration"
1243};
1244
1245/* Table 6.4.2.8-1: Reconfiguration Response IE field definitions */
1246static const true_false_string rc_harq_rsp_tfs = {
1247 "Not accepted",
1248 "Accepted or is not modified in the reconfiguration request"
1249};
1250
1251/* Table 6.4.2.8-1: Reconfiguration Response IE field definitions */
1252static const true_false_string rc_rd_capability_rsp_tfs = {
1253 "The RD indicates that its capability is changed",
1254 "Ignore"
1255};
1256
1257/* Table 6.4.2.8-1: Reconfiguration Response IE: Number of flows */
1258static const value_string rc_rsp_num_flow_vals[] = {
1259 { 7, "All flows accepted as configured in the Reconfiguration Request" },
1260 { 0, NULL((void*)0) }
1261};
1262
1263/* Table 6.4.3.3-1: Resource allocation bitmap */
1264static const value_string ra_alloc_type_vals[] = {
1265 { 0, "The receiving RD shall release all previously allocated scheduled resources" },
1266 { 1, "Downlink allocation" },
1267 { 2, "Uplink allocation " },
1268 { 3, "Downlink and Uplink resources" },
1269 { 0, NULL((void*)0) }
1270};
1271
1272/* Table 6.4.3.3-1: Resource allocation bitmap */
1273static const true_false_string ra_add_tfs = {
1274 "The additional allocation for existing allocation",
1275 "New or replaces the previous allocation"
1276};
1277
1278/* Table 6.4.3.3-1: Resource allocation bitmap */
1279static const value_string ra_repeat_vals[] = {
1280 { 0, "Resource allocation is single allocation" },
1281 { 1, "Resource allocation is repeated in the following frames" },
1282 { 2, "Resource allocation is repeated in the following subslots" },
1283 { 3, "Resource allocation is repeated in the following frames, use of specific repeated resources is allowed" },
1284 { 4, "Resource allocation is repeated in the following subslots, use of specific repeated resources is allowed" },
1285 { 5, "Reserved" },
1286 { 6, "Reserved" },
1287 { 7, "Reserved" },
1288 { 0, NULL((void*)0) }
1289};
1290
1291/* Table 6.4.3.3-1: Resource allocation bitmap */
1292static const true_false_string ra_sfn_tfs = {
1293 "Valid from the frame indicated in SFN value field onwards",
1294 "Immediately valid from this frame onwards"
1295};
1296
1297/* Table 6.4.3.3-1: Resource allocation bitmap */
1298static const true_false_string ra_channel_tfs = {
1299 "The channel where resource allocation(s) is valid is indicated in channel field of the IE",
1300 "The resource allocation(s) is valid for the channel where the IE is received"
1301};
1302
1303/* Table 6.4.3.3-2: Timer dectScheduledResourceFailure values */
1304static const value_string ra_scheduled_resource_failure_vals[] = {
1305 { 0, "Reserved" },
1306 { 1, "Reserved" },
1307 { 2, "20 ms" },
1308 { 3, "50 ms" },
1309 { 4, "100 ms" },
1310 { 5, "200 ms" },
1311 { 6, "500 ms" },
1312 { 7, "1 000 ms" },
1313 { 8, "1 500 ms" },
1314 { 9, "3 000 ms" },
1315 { 10, "4 000 ms" },
1316 { 11, "5 000 ms" },
1317 { 12, "Reserved" },
1318 { 13, "Reserved" },
1319 { 14, "Reserved" },
1320 { 15, "Reserved" },
1321 { 0, NULL((void*)0) }
1322};
1323
1324/* Table 6.4.3.5-1: RD Capability IE: Release */
1325static const value_string rdc_release_vals[] = {
1326 { 0, "Reserved" },
1327 { 1, "Release 1" },
1328 { 2, "Release 2" },
1329 { 3, "Release 3" },
1330 { 4, "Release 4" },
1331 { 5, "Reserved" },
1332 { 6, "Reserved" },
1333 { 7, "Reserved" },
1334 { 0, NULL((void*)0) }
1335};
1336
1337/* Table 6.4.3.5-1: RD Capability IE: Operating modes */
1338static const value_string rdc_op_mode_vals[] = {
1339 { 0, "PT mode only" },
1340 { 1, "FT mode only" },
1341 { 2, "PT and FT modes" },
1342 { 3, "Reserved" },
1343 { 0, NULL((void*)0) }
1344};
1345
1346static const value_string rdc_mac_security_vals[] = {
1347 { 0, "Not supported" },
1348 { 1, "Mode 1 supported" },
1349 { 2, "Reserved" },
1350 { 3, "Reserved" },
1351 { 4, "Reserved" },
1352 { 5, "Reserved" },
1353 { 6, "Reserved" },
1354 { 7, "Reserved" },
1355 { 0, NULL((void*)0) }
1356};
1357
1358/* Table 6.4.3.5-1: RD Capability IE: DLC service type */
1359static const value_string rdc_dlc_serv_type_vals[] = {
1360 { 0, "DLC Service type 0 supported" },
1361 { 1, "DLC Service type 1 supported" },
1362 { 2, "DLC Service type 2 supported" },
1363 { 3, "DLC Service types 1, 2, 3 supported" },
1364 { 4, "DLC Service types 0, 1, 2, 3 supported" },
1365 { 5, "Reserved" },
1366 { 6, "Reserved" },
1367 { 7, "Reserved" },
1368 { 0, NULL((void*)0) }
1369};
1370
1371/* Table 6.4.3.5-1: RD Capability IE: RD Power Class */
1372static const value_string rdc_pwr_class_vals[] = {
1373 { 0, "Power class I" },
1374 { 1, "Power class II" },
1375 { 2, "Power class III" },
1376 { 3, "Power class IV" },
1377 { 4, "Reserved" },
1378 { 5, "Reserved" },
1379 { 6, "Reserved" },
1380 { 7, "Reserved" },
1381 { 0, NULL((void*)0) }
1382};
1383
1384/* Table 6.4.3.5-1: RD Capability IE: power of two coded fields */
1385static const value_string rdc_pwr_two_field_vals[] = {
1386 { 0, "1" },
1387 { 1, "2" },
1388 { 2, "4" },
1389 { 3, "8" },
1390 { 0, NULL((void*)0) }
1391};
1392
1393/* Table 6.4.3.5-1: RD Capability IE: RX Gain */
1394static const value_string rdc_rx_gain_vals[] = {
1395 { 0, "-10 dB" },
1396 { 1, "-8 dB" },
1397 { 2, "-6 dB" },
1398 { 3, "-4 dB" },
1399 { 4, "-2 dB" },
1400 { 5, "-0 dB" },
1401 { 6, "2 dB" },
1402 { 7, "4 dB" },
1403 { 8, "6 dB" },
1404 { 9, "Reserved" },
1405 { 10, "Reserved" },
1406 { 11, "Reserved" },
1407 { 12, "Reserved" },
1408 { 13, "Reserved" },
1409 { 14, "Reserved" },
1410 { 15, "Reserved" },
1411 { 0, NULL((void*)0) }
1412};
1413
1414/* Table 6.4.3.5-1: RD Capability IE: Max MCS */
1415static const value_string rdc_max_mcse_vals[] = {
1416 { 0, "MCS0" },
1417 { 1, "MCS1" },
1418 { 2, "MCS2" },
1419 { 3, "MCS3" },
1420 { 4, "MCS4" },
1421 { 5, "MCS5" },
1422 { 6, "MCS6" },
1423 { 7, "MCS7" },
1424 { 8, "MCS8" },
1425 { 9, "MCS9" },
1426 { 10, "MCS10" },
1427 { 11, "MCS11" },
1428 { 12, "Reserved" },
1429 { 13, "Reserved" },
1430 { 14, "Reserved" },
1431 { 15, "Reserved" },
1432 { 0, NULL((void*)0) }
1433};
1434
1435/* Table 6.4.3.5-1: RD Capability IE: Soft buffer sizes */
1436static const value_string rdc_soft_buf_size_vals[] = {
1437 { 0, "16 000 B" },
1438 { 1, "25 344 B" },
1439 { 2, "32 000 B" },
1440 { 3, "64 000 B" },
1441 { 4, "128 000 B" },
1442 { 5, "256 000 B" },
1443 { 6, "512 000 B" },
1444 { 7, "1 024 000 B" },
1445 { 8, "2 048 000 B" },
1446 { 9, "Reserved" },
1447 { 10, "Reserved" },
1448 { 11, "Reserved" },
1449 { 12, "Reserved" },
1450 { 13, "Reserved" },
1451 { 14, "Reserved" },
1452 { 15, "Reserved" },
1453 { 0, NULL((void*)0) }
1454};
1455
1456/* Table 6.4.3.5-1: RD Capability IE: HARQ feedback delay */
1457static const value_string rdc_harq_fb_delay_vals[] = {
1458 { 0, "0 subslots" },
1459 { 1, "1 subslot" },
1460 { 2, "2 subslots" },
1461 { 3, "3 subslots" },
1462 { 4, "4 subslots" },
1463 { 5, "5 subslots" },
1464 { 6, "6 subslots" },
1465 { 7, "Reserved" },
1466 { 8, "Reserved" },
1467 { 9, "Reserved" },
1468 { 10, "Reserved" },
1469 { 11, "Reserved" },
1470 { 12, "Reserved" },
1471 { 13, "Reserved" },
1472 { 14, "Reserved" },
1473 { 15, "Reserved" },
1474 { 0, NULL((void*)0) }
1475};
1476
1477/* Table 6.4.3.5-1: RD Capability IE: Fourier transform scaling factor */
1478static const value_string rdc_fourier_factor_vals[] = {
1479 { 0, "1" },
1480 { 1, "2" },
1481 { 2, "4" },
1482 { 3, "8" },
1483 { 4, "12" },
1484 { 5, "16" },
1485 { 6, "Reserved" },
1486 { 7, "Reserved" },
1487 { 8, "Reserved" },
1488 { 9, "Reserved" },
1489 { 10, "Reserved" },
1490 { 11, "Reserved" },
1491 { 12, "Reserved" },
1492 { 13, "Reserved" },
1493 { 14, "Reserved" },
1494 { 15, "Reserved" },
1495 { 0, NULL((void*)0) }
1496};
1497
1498/* Table 5.4.3.6-1: Neighbouring IE field definitions: µ */
1499static const true_false_string radio_device_class_tfs = {
1500 "Present, the indicated RD operates with the indicated µ and β factor",
1501 "Not present, the indicated RD operates with same µ and β factor as the RD sending this IE"
1502};
1503
1504/* Table 6.4.3.7-1: Broadcast Indication IE field definitions: Indication type */
1505static const value_string bi_ind_type_vals[] = {
1506 { 0, "Paging" },
1507 { 1, "RA Response" },
1508 { 2, "Reserved" },
1509 { 3, "Reserved" },
1510 { 4, "Reserved" },
1511 { 5, "Reserved" },
1512 { 6, "Reserved" },
1513 { 7, "Reserved" },
1514 { 0, NULL((void*)0) }
1515};
1516
1517/* Table 6.4.3.7-1: Broadcast Indication IE field definitions: IDType */
1518static const value_string bi_idtype_vals[] = {
1519 { 0, "Short RD ID" },
1520 { 1, "Long RD ID" },
1521 { 0, NULL((void*)0) }
1522};
1523
1524/* Table 6.4.3.7-1: Broadcast Indication IE field definitions: ACK/NACK */
1525static const true_false_string bi_ack_nack_tfs = {
1526 "Correctly received MAC PDU in RA TX",
1527 "Incorrectly received MAC PDU in RA TX"
1528};
1529
1530/* Table 6.4.3.7-1: Broadcast Indication IE field definitions: ACK/NACK */
1531static const value_string bi_feedback_vals[] = {
1532 { 0, "No feedback" },
1533 { 1, "MCS" },
1534 { 2, "MIMO 2 antenna" },
1535 { 3, "MIMO 4 antenna" },
1536 { 0, NULL((void*)0) }
1537};
1538
1539/* Table 6.2.2-2b: Feedback info format 2 */
1540static const true_false_string bi_mimo2_num_layer_tfs = {
1541 "Dual layer",
1542 "Single layer"
1543};
1544
1545/* Table 6.2.2-2e: Feedback info format 5 */
1546static const value_string bi_mimo4_num_layer_vals[] = {
1547 { 0, "Single layer" },
1548 { 1, "Dual layer" },
1549 { 2, "Four layers" },
1550 { 3, "Reserved" },
1551 { 0, NULL((void*)0) }
1552};
1553
1554/* Table 6.4.3.9-1: Group Assignment IE field definitions: Single */
1555static const true_false_string dect_nr_ga_single_tfs = {
1556 "Single resource assignment for the group member",
1557 "Multiple resource assignments follow for a group"
1558};
1559
1560/* Table 6.4.3.9-1: Group Assignment IE field definitions: Direct */
1561static const true_false_string ga_direct_tfs = {
1562 "The Resource allocation direction is inverted",
1563 "The assignment follows the Resource allocation direction",
1564};
1565
1566/* Table 6.4.3.10-1: Load Info IE field definitions: Max assoc */
1567static const true_false_string li_max_assoc_tfs = {
1568 "16 bit field",
1569 "8 bit field"
1570};
1571
1572/* Table 6.4.3.12-1 Measurement Report IE field definitions: RACH */
1573static const true_false_string mr_rach_tfs = {
1574 "From DL reception of Random access response",
1575 "From DL scheduled resources"
1576};
1577
1578/* Table 6.4.3.12-1 Measurement Report IE field definitions: TX Count result */
1579static const value_string mr_tx_count_vals[] = {
1580 { 0xFF, "Transmission of MAC PDU has completely failed" },
1581 { 0, NULL((void*)0) }
1582};
1583
1584/* Table 6.4.3.13-1: Radio Device Status IE field definitions: Association */
1585static const true_false_string rds_assoc_tfs = {
1586 "(re-)association needed",
1587 "Not set"
1588};
1589
1590/* Table 6.4.3.13-1: Radio Device Status IE field definitions: Status flag */
1591static const value_string rds_status_vals[] = {
1592 { 0, "Reserved" },
1593 { 1, "Memory Full" },
1594 { 2, "Normal operation resumed" },
1595 { 3, "Reserved" },
1596 { 0, NULL((void*)0) }
1597};
1598
1599/* Table 6.4.3.13-1: Radio Device Status IE field definitions: Duration */
1600static const value_string rds_duration_vals[] = {
1601 { 0, "50 ms" },
1602 { 1, "100 ms" },
1603 { 2, "200 ms" },
1604 { 3, "400 ms" },
1605 { 4, "600 ms" },
1606 { 5, "800 ms" },
1607 { 6, "1 000 ms" },
1608 { 7, "1 500 ms" },
1609 { 8, "2 000 ms" },
1610 { 9, "3 000 ms" },
1611 { 10, "4 000 ms" },
1612 { 11, "Unknown" },
1613 { 12, "Reserved" },
1614 { 13, "Reserved" },
1615 { 14, "Reserved" },
1616 { 15, "Reserved" },
1617 { 0, NULL((void*)0) }
1618};
1619
1620/* Table 6.4.3.15-1: RD Capability Short IE field definitions: CB_MC */
1621static const true_false_string rdcs_cb_mc_tfs = {
1622 "RD in FT mode supports association without monitoring Cluster Beacon messages",
1623 "RD in FT mode does not support association without monitoring Cluster Beacon messages"
1624};
1625
1626/* Table 6.4.3.15-1: RD Capability Short IE field definitions: DWA */
1627static const true_false_string rdcs_dwa_tfs = {
1628 "RD in FT mode supports uplink data transmission without association",
1629 "RD in FT mode does not support uplink data transmission without association"
1630};
1631
1632/* Table 6.4.3.16-1: Source Routing IE field definitions: Source routing registration validity timer */
1633static const value_string sr_reg_validity_timer_vals[] = {
1634 { 0, "Interval not defined" },
1635 { 1, "1 second" },
1636 { 2, "2 seconds" },
1637 { 3, "10 seconds" },
1638 { 4, "30 seconds" },
1639 { 5, "1 minute" },
1640 { 6, "2 minutes" },
1641 { 7, "5 minutes" },
1642 { 8, "10 minutes" },
1643 { 9, "30 minutes" },
1644 { 10, "1 hour" },
1645 { 11, "2 hours" },
1646 { 12, "5 hours" },
1647 { 13, "10 hours" },
1648 { 14, "20 hours" },
1649 { 15, "50 hours" },
1650 { 16, "100 hours" },
1651 { 17, "200 hours" },
1652 { 18, "500 hours" },
1653 { 19, "1000 hours" },
1654 { 0, NULL((void*)0) }
1655};
1656
1657/* Table 6.4.3.18-1: Association Control IE field definitions: CB_M */
1658static const true_false_string ac_cb_m_tfs = {
1659 "The associated RD on does not maintains cluster beacon message reception",
1660 "The associated RD on maintains cluster beacon message reception"
1661};
1662
1663/* Table 6.4.3.18-1: Association Control IE field definitions: DL Data Reception */
1664static const value_string ac_dl_data_reception_vals[] = {
1665 { 0, "0 ms" },
1666 { 1, "5 ms" },
1667 { 2, "10 ms" },
1668 { 3, "20 ms" },
1669 { 4, "40 ms" },
1670 { 5, "80 ms" },
1671 { 6, "Reserved" },
1672 { 7, "Reserved" },
1673 { 0, NULL((void*)0) }
1674};
1675
1676/* Table 6.4.3.18-1: Association Control IE field definitions: UL Period */
1677static const value_string ac_ul_period_vals[] = {
1678 { 0, "10 sec" },
1679 { 1, "20 sec" },
1680 { 2, "48 sec" },
1681 { 3, "90 sec" },
1682 { 4, "5 min" },
1683 { 5, "10 min" },
1684 { 6, "30 min" },
1685 { 7, "1 h" },
1686 { 8, "6 h" },
1687 { 9, "12 h" },
1688 { 10, "24 h" },
1689 { 11, "48 h" },
1690 { 12, "Reserved" },
1691 { 13, "Reserved" },
1692 { 14, "Reserved" },
1693 { 15, "Reserved" },
1694 { 0, NULL((void*)0) }
1695};
1696
1697/* ETSI TS 103 636-5: DLC and Convergence layer definitions */
1698
1699/* Table 5.3.1-1: DLC IE Type coding */
1700static const value_string dlc_ie_type_vals[] = {
1701 { 0, "Data: DLC Service type 0 with routing header" },
1702 { 1, "Data: DLC Service type 0 without routing header" },
1703 { 2, "Data: DLC Service type 1 or 2 or 3 with routing header" },
1704 { 3, "Data: DLC Service type 1 or 2 or 3 without routing header" },
1705 { 4, "DLC Timers configuration control IE" },
1706 { 5, "Data: DLC Service type 0 followed by DLC extension header" },
1707 { 6, "Data: DLC Service type 1 or 2 or 3 followed by DLC extension header" },
1708 { 14, "Escape" },
1709 { 0, NULL((void*)0) }
1710};
1711
1712/* Table 5.3.3.1-1: DLC SI coding */
1713static const value_string dlc_si_type_vals[] = {
1714 { 0, "Data field contains the complete higher layer SDU" },
1715 { 1, "Data field contains the first segment of the higher layer SDU" },
1716 { 2, "Data field contains the last segment of the higher layer SDU" },
1717 { 3, "Data field contains neither the first nor the last segment of the higher layer SDU" },
1718 { 0, NULL((void*)0) }
1719};
1720
1721/* Table 5.3.3.2-2: TX_SDU_discard_timer and RX_PDU_discard_timer */
1722static const value_string dlc_discard_timer_vals[] = {
1723 { 0, "Reserved" },
1724 { 1, "0.5 ms" },
1725 { 2, "1 ms" },
1726 { 3, "5 ms" },
1727 { 4, "10 ms" },
1728 { 5, "20 ms" },
1729 { 6, "30 ms" },
1730 { 7, "40 ms" },
1731 { 8, "50 ms" },
1732 { 9, "60 ms" },
1733 { 10, "70 ms" },
1734 { 11, "80 ms" },
1735 { 12, "90 ms" },
1736 { 13, "100 ms" },
1737 { 14, "150 ms" },
1738 { 15, "200 ms" },
1739 { 16, "250 ms" },
1740 { 17, "300 ms" },
1741 { 18, "500 ms" },
1742 { 19, "750 ms" },
1743 { 20, "1 s" },
1744 { 21, "1.5 s" },
1745 { 22, "2 s" },
1746 { 23, "2.5 s" },
1747 { 24, "3 s" },
1748 { 25, "4 s" },
1749 { 26, "5 s" },
1750 { 27, "6 s" },
1751 { 28, "8 s" },
1752 { 29, "16 s" },
1753 { 30, "32 s" },
1754 { 31, "60 s" },
1755 /* 32 - 254 Reserved */
1756 { 255, "Infinity" },
1757 { 0, NULL((void*)0) }
1758};
1759
1760/* ETSI TS 103 636-5 Table 5.3.3.3-1: DLC Ext coding */
1761static const value_string dlc_ext_vals[] = {
1762 { 0, "No length field included; IE type is fixed length" },
1763 { 1, "8-bit length included indicating the length of the IE payload" },
1764 { 2, "16-bit length included indicating the length of the IE payload" },
1765 { 3, "Reserved" },
1766 { 0, NULL((void*)0) }
1767};
1768
1769/* ETSI TS 103 636-5 Table 5.3.3.3-2: Extension IE Type coding */
1770static const value_string dlc_ext_ie_type_vals[] = {
1771 { 0, "Routing header" },
1772 { 1, "CVG PDU" },
1773 { 2, "Next hop address IE" },
1774 { 3, "Route Register IE" },
1775 { 4, "Route Error IE" },
1776 { 62, "Escape" },
1777 { 0, NULL((void*)0) }
1778};
1779
1780static const value_string dlc_route_error_reason_vals[] = {
1781 { 0, "Next hop lost" },
1782 { 1, "Next hop released" },
1783 { 0, NULL((void*)0) }
1784};
1785
1786/* ETSI TS 103 636-5 Table 5.3.4-1: A routing bitmap field - bit definition */
1787static const value_string dlc_qos_vals[] = {
1788 { 0, "Low priority data" },
1789 { 1, "Reserved" },
1790 { 2, "Reserved" },
1791 { 3, "High priority data" },
1792 { 4, "Reserved" },
1793 { 5, "Reserved" },
1794 { 6, "High priority signalling" },
1795 { 7, "Reserved" },
1796 { 0, NULL((void*)0) }
1797};
1798
1799/* ETSI TS 103 636-5 Table 5.3.4-1: A routing bitmap field - bit definition */
1800static const value_string dlc_hop_count_limit_vals[] = {
1801 { 0, "Hop-count and Hop-limit are not present" },
1802 { 1, "Hop-count is present and Hop-limit is not present" },
1803 { 2, "Hop-count and Hop-limit are present" },
1804 { 3, "Reserved" },
1805 { 0, NULL((void*)0) }
1806};
1807
1808/* ETSI TS 103 636-5 Table 5.3.4-1: A routing bitmap field - bit definition */
1809static const value_string dlc_dest_add_vals[] = {
1810 { 0, "Destination and Source addresses are present" },
1811 { 1, "Destination address is broadcast" },
1812 { 2, "Destination address is backend" },
1813 { 3, "Source address is backend" },
1814 { 4, "Source address is backend and Destination address is broadcast" },
1815 { 5, "Reserved" },
1816 { 6, "Reserved" },
1817 { 7, "Reserved" },
1818 { 0, NULL((void*)0) }
1819};
1820
1821/* ETSI TS 103 636-5 Table 5.3.4-1: A routing bitmap field - bit definition */
1822static const value_string dlc_routing_type_vals[] = {
1823 { 0, "Uplink hop by hop routing for Packet Routing to backend (uplink)" },
1824 { 1, "Reserved" },
1825 { 2, "Reserved" },
1826 { 3, "Downlink flooding for Packet Routing from backend (downlink)" },
1827 { 4, "Selective Source Routing" },
1828 { 5, "Local flooding RD to RD, or RD to multicast Group, for Hop-limited flooding" },
1829 { 6, "Reserved" },
1830 { 7, "Reserved" },
1831 { 0, NULL((void*)0) }
1832};
1833
1834/** ETSI TS 103 636-5 Table 6.3.2-1: CVG Ext coding */
1835static const value_string dect_nr_cvg_header_ext_vals[] = {
1836 { 0, "No length field included" },
1837 { 1, "8-bit length included" },
1838 { 2, "16-bit length included" },
1839 { 3, "Reserved" },
1840 { 0, NULL((void*)0) }
1841};
1842
1843/** ETSI TS 103 636-5 Table 6.3.2-2: CVG IE Type coding */
1844static const value_string dect_nr_cvg_header_ie_type_vals[] = {
1845 { 0, "EP mux IE" },
1846 { 1, "Data IE" },
1847 { 2, "Data EP IE" },
1848 { 3, "Data Transparent IE" },
1849 { 4, "Security IE" },
1850 { 5, "TX Services Config IE" },
1851 { 6, "ARQ Feedback IE" },
1852 { 7, "ARQ Poll IE" },
1853 { 8, "Flow Status IE" },
1854 { 30, "Escape" },
1855 { 31, "Reserved" },
1856 { 0, NULL((void*)0) }
1857};
1858
1859static const value_string dect_nr_cvg_header_mt_vals[] = {
1860 { 0, "Header Format 1" },
1861 { 1, "Header Format 2" },
1862 { 0, NULL((void*)0) }
1863};
1864
1865/** ETSI TS 103 636-5 Table 6.3.2-3: F2C coding */
1866static const value_string dect_nr_cvg_header_f2c_vals[] = {
1867 { 0, "Data IE" },
1868 { 1, "ARQ Feedback IE" },
1869 { 2, "IE coding with CVG IE Type field" },
1870 { 3, "Reserved" },
1871 { 0, NULL((void*)0) }
1872};
1873
1874/** ETSI TS 103 636-5 Table 6.3.4-1: CVG SI Coding */
1875static const value_string dect_nr_cvg_si_coding[] = {
1876 { 0, "Payload field contains a complete SDU" },
1877 { 1, "Payload field contains the first segment of an SDU" },
1878 { 2, "Payload field contains the last segment of an SDU" },
1879 { 3, "Payload field contains neither the first nor the last segment of an SDU" },
1880 { 0, NULL((void*)0) }
1881};
1882
1883/** ETSI TS 103 636-5 Table 6.3.4-2: CVG SLI Coding */
1884static const value_string dect_nr_cvg_sli_coding[] = {
1885 { 0, "SDU length not included" },
1886 { 1, "SDU length included" },
1887 { 0, NULL((void*)0) }
1888};
1889
1890/** DECT-2020 NR Endpoint Multiplexing Address Allocation: values for public specs */
1891static const value_string dect_nr_cvg_ep_mux_values[] = {
1892 { 0x8002, "IETF RFC8200: Internet Protocol, Version 6 (IPv6)" },
1893 { 0x8003, "IETF RFC6282: IPv6 LoWPAN Header Compression" },
1894 { 0, NULL((void*)0) }
1895};
1896
1897/* DLC Reassembly */
1898
1899static const fragment_items dect_nr_segment_items = {
1900 /* Segment subtrees */
1901 &ett_dect_nr_segment,
1902 &ett_dect_nr_segments,
1903 /* Segment fields */
1904 &hf_dect_nr_segments,
1905 &hf_dect_nr_segment,
1906 &hf_dect_nr_segment_overlap,
1907 &hf_dect_nr_segment_overlap_conflict,
1908 &hf_dect_nr_segment_multiple_tails,
1909 &hf_dect_nr_segment_too_long_segment,
1910 &hf_dect_nr_segment_error,
1911 &hf_dect_nr_segment_count,
1912 /* Reassembled in field */
1913 &hf_dect_nr_reassembled_in,
1914 /* Reassembled length field */
1915 &hf_dect_nr_reassembled_length,
1916 /* Reassembled data field */
1917 NULL((void*)0),
1918 /* Tag */
1919 "DLC PDU segments"
1920};
1921
1922typedef struct dect_nr_sec_info {
1923 uint32_t version;
1924 uint32_t key;
1925 uint32_t hpc;
1926} dect_nr_sec_info_t;
1927
1928typedef struct dect_nr_conv_info {
1929 uint32_t last_psn[2];
1930 wmem_tree_t *hpc_tree;
1931} dect_nr_conv_info_t;
1932
1933typedef struct {
1934 uint32_t nw_id;
1935 uint32_t tx_id;
1936 uint32_t rx_id;
1937 uint32_t ie_type;
1938 uint32_t ie_length;
1939 bool_Bool ie_length_present;
1940 bool_Bool sec_info_present;
1941 dect_nr_sec_info_t sec_info;
1942 uint32_t psn;
1943 dect_nr_conv_info_t *conv_info;
1944} dect_nr_context_t;
1945
1946typedef struct {
1947 uint32_t nw_id;
1948 uint32_t tx_id;
1949 uint32_t rx_id;
1950 uint32_t ie_type;
1951 uint32_t sn;
1952} dect_nr_fragment_key_t;
1953
1954static unsigned dect_nr_reassembly_hash_func(const void *k)
1955{
1956 dect_nr_fragment_key_t *key = (dect_nr_fragment_key_t *)k;
1957 unsigned hash_val;
1958
1959 hash_val = key->sn;
1960
1961 return hash_val;
1962}
1963
1964static int dect_nr_reassembly_equal_func(const void *k1, const void *k2)
1965{
1966 dect_nr_fragment_key_t *key1 = (dect_nr_fragment_key_t *)k1;
1967 dect_nr_fragment_key_t *key2 = (dect_nr_fragment_key_t *)k2;
1968
1969 return ((key1->nw_id == key2->nw_id) && (key1->tx_id == key2->tx_id) &&
1970 (key1->rx_id == key2->rx_id) && (key1->sn == key2->sn));
1971}
1972
1973static void *dect_nr_reassembly_key_func(const packet_info *pinfo _U___attribute__((unused)), uint32_t id, const void *data)
1974{
1975 dect_nr_fragment_key_t *key = g_slice_new(dect_nr_fragment_key_t)((dect_nr_fragment_key_t*) g_slice_alloc (sizeof (dect_nr_fragment_key_t
)))
;
1976 dect_nr_context_t *ctx = (dect_nr_context_t *)data;
1977
1978 key->nw_id = ctx->nw_id;
1979 key->tx_id = ctx->tx_id;
1980 key->rx_id = ctx->rx_id;
1981 key->ie_type = ctx->ie_type;
1982 key->sn = id;
1983
1984 return (void *)key;
1985}
1986
1987static void dect_nr_reassembly_free_key_func(void *ptr)
1988{
1989 dect_nr_fragment_key_t *key = (dect_nr_fragment_key_t *)ptr;
1990 g_slice_free(dect_nr_fragment_key_t, key)do { if (1) g_slice_free1 (sizeof (dect_nr_fragment_key_t), (
key)); else (void) ((dect_nr_fragment_key_t*) 0 == (key)); } while
(0)
;
1991}
1992
1993static const reassembly_table_functions dect_nr_reassembly_functions = {
1994 dect_nr_reassembly_hash_func,
1995 dect_nr_reassembly_equal_func,
1996 dect_nr_reassembly_key_func,
1997 dect_nr_reassembly_key_func,
1998 dect_nr_reassembly_free_key_func,
1999 dect_nr_reassembly_free_key_func,
2000};
2001
2002static reassembly_table dect_nr_reassembly_table;
2003
2004/* Add expert info to reserved bits which is not zero */
2005static void dect_tree_add_reserved_item(proto_tree *tree, int hf_index, tvbuff_t *tvb, int offset, int length, packet_info *pinfo, const unsigned encoding)
2006{
2007 uint32_t reserved;
2008 proto_item *item;
2009
2010 item = proto_tree_add_item_ret_uint(tree, hf_index, tvb, offset, length, encoding, &reserved);
2011 if (reserved != 0) {
2012 expert_add_info(pinfo, item, &ei_dect_nr_res_non_zero);
2013 }
2014}
2015
2016/* ETSI TS 103 636-2 Table 8.2.3-1: RSSI-1 measurement report mapping */
2017static void format_rssi_result_cf_func(char *result, uint32_t value)
2018{
2019 if (value == 0x74) {
2020 snprintf(result, ITEM_LABEL_LENGTH240, "x ≤ -139.5 dBm");
2021 } else if (value > 0x74 && value <= 0xFE) {
2022 double x = (0xFF - value + 1) * -1.0;
2023 snprintf(result, ITEM_LABEL_LENGTH240, "%.1f ≤ x < %.1f dBm", x + 0.5, x - 0.5);
2024 } else if (value == 0xFF) {
2025 snprintf(result, ITEM_LABEL_LENGTH240, "-1.5 < x dBm");
2026 } else {
2027 snprintf(result, ITEM_LABEL_LENGTH240, "Reserved");
2028 }
2029}
2030
2031/* ETSI TS 103 636-2 Table 8.4.3-1: Demodulated signal to noise quality measurement report mapping */
2032static void format_snr_result_cf_func(char *result, uint32_t value)
2033{
2034 if (value < 0x7F) {
2035 double x = value * 0.5;
2036 snprintf(result, ITEM_LABEL_LENGTH240, "%.2f ≤ x < %.2f dB", x - 0.25, x + 0.25);
2037 } else if (value == 0x7F) {
2038 snprintf(result, ITEM_LABEL_LENGTH240, "63.25 ≤ x");
2039 } else if (value == 0xE0) {
2040 snprintf(result, ITEM_LABEL_LENGTH240, "x < -15.75");
2041 } else if (value > 0xE0 && value <= 0xFF) {
2042 double x = (0xFF - value + 1) * -0.5;
2043 snprintf(result, ITEM_LABEL_LENGTH240, "%.2f ≤ x < %.2f dB", x - 0.25, x + 0.25);
2044 } else {
2045 snprintf(result, ITEM_LABEL_LENGTH240, "Reserved");
2046 }
2047}
2048
2049/* Signalled subslot length index starts from 0 in some cases:
2050 * - Packet length type in the Physical Header Field (See Table 6.2.1-1)
2051 * - Response window: (See Ch. 6.4.3.4 Random Access Resource IE)
2052 */
2053static void subslot_len_cf_func(char *result, uint32_t value)
2054{
2055 snprintf(result, ITEM_LABEL_LENGTH240, "%u", value + 1);
2056}
2057
2058/* Table 6.4.3.10-1: Load Info IE field definitions */
2059static void format_hex_pct_cf_func(char *result, uint32_t value)
2060{
2061 snprintf(result, ITEM_LABEL_LENGTH240, "%.2f %%", (value * 100.0) / 255.0);
2062}
2063
2064static void insert_long_rd_id(uint32_t nw_id, uint32_t short_rd_id, uint32_t long_rd_id)
2065{
2066 /* nw_id is 8 bits and short_rd_id is 16 bits */
2067 uint32_t rd_id_key = (nw_id << 16) | short_rd_id;
2068
2069 if (!wmem_map_contains(rd_id_map, GUINT_TO_POINTER(rd_id_key)((gpointer) (gulong) (rd_id_key)))) {
2070 wmem_map_insert(rd_id_map, GUINT_TO_POINTER(rd_id_key)((gpointer) (gulong) (rd_id_key)), GUINT_TO_POINTER(long_rd_id)((gpointer) (gulong) (long_rd_id)));
2071 }
2072}
2073
2074static uint32_t lookup_long_rd_id(uint32_t nw_id, uint32_t short_rd_id)
2075{
2076 /* nw_id is 8 bits and short_rd_id is 16 bits */
2077 uint32_t rd_id_key = (nw_id << 16) | short_rd_id;
2078 uint32_t long_rd_id;
2079
2080 if (wmem_map_contains(rd_id_map, GUINT_TO_POINTER(rd_id_key)((gpointer) (gulong) (rd_id_key)))) {
2081 long_rd_id = GPOINTER_TO_UINT(wmem_map_lookup(rd_id_map, GUINT_TO_POINTER(rd_id_key)))((guint) (gulong) (wmem_map_lookup(rd_id_map, ((gpointer) (gulong
) (rd_id_key)))))
;
2082 } else {
2083 long_rd_id = 0xFFFFFFFF; /* Broadcast address */
2084 }
2085
2086 return long_rd_id;
2087}
2088
2089static void set_last_psn(dect_nr_context_t *ctx, uint32_t psn)
2090{
2091 int idx = (ctx->tx_id < ctx->rx_id) ? 1 : 0;
2092 ctx->conv_info->last_psn[idx] = psn;
2093}
2094
2095static uint32_t get_last_psn(dect_nr_context_t *ctx)
2096{
2097 int idx = (ctx->tx_id < ctx->rx_id) ? 1 : 0;
2098 return ctx->conv_info->last_psn[idx];
2099}
2100
2101static void insert_sec_info(packet_info *pinfo, dect_nr_context_t *ctx, dect_nr_sec_info_t *sec_info)
2102{
2103 /* Only insert when having a conversation */
2104 if (ctx->conv_info) {
2105 wmem_tree_key_t key[2];
2106 dect_nr_sec_info_t *new_sec_info;
2107
2108 key[0].length = 1;
2109 key[0].key = &pinfo->num;
2110 key[1].length = 0;
2111 key[1].key = NULL((void*)0);
2112
2113 new_sec_info = wmem_new(wmem_file_scope(), dect_nr_sec_info_t)((dect_nr_sec_info_t*)wmem_alloc((wmem_file_scope()), sizeof(
dect_nr_sec_info_t)))
;
2114 *new_sec_info = *sec_info;
2115 wmem_tree_insert32_array(ctx->conv_info->hpc_tree, key, new_sec_info);
2116 }
2117}
2118
2119static const dect_nr_sec_info_t *lookup_sec_info(packet_info *pinfo, const dect_nr_context_t *ctx)
2120{
2121 /* Only lookup when having a conversation */
2122 if (ctx->conv_info) {
2123 wmem_tree_key_t key[2];
2124
2125 key[0].length = 1;
2126 key[0].key = &pinfo->num;
2127 key[1].length = 0;
2128 key[1].key = NULL((void*)0);
2129
2130 return wmem_tree_lookup32_array_le(ctx->conv_info->hpc_tree, key);
2131 }
2132
2133 return NULL((void*)0);
2134}
2135
2136static void conversation_setup(packet_info *pinfo, proto_tree *tree, dect_nr_context_t *ctx)
2137{
2138 conversation_t *conversation;
2139 address tx_addr;
2140 address rx_addr;
2141
2142 if (ctx->rx_id == 0 || ctx->rx_id == 0xFFFF) {
2143 /* Receiver ID is zero or broadcast, no conversation */
2144 return;
2145 }
2146
2147 /* nw_id is 8 bits and tx_id/rx_id is 16 bits */
2148 uint32_t tx_id_key = (ctx->nw_id << 16) | ctx->tx_id;
2149 set_address(&tx_addr, AT_NUMERIC, 4, &tx_id_key);
2150 uint32_t rx_id_key = (ctx->nw_id << 16) | ctx->rx_id;
2151 set_address(&rx_addr, AT_NUMERIC, 4, &rx_id_key);
2152
2153 conversation = find_conversation(pinfo->num, &tx_addr, &rx_addr, CONVERSATION_NONE, 0, 0, 0);
2154 if (!conversation) {
2155 conversation = conversation_new(pinfo->num, &tx_addr, &rx_addr, CONVERSATION_NONE, 0, 0, 0);
2156 }
2157
2158 ctx->conv_info = (dect_nr_conv_info_t *)conversation_get_proto_data(conversation, proto_dect_nr);
2159 if (!ctx->conv_info) {
2160 ctx->conv_info = wmem_new0(wmem_file_scope(), dect_nr_conv_info_t)((dect_nr_conv_info_t*)wmem_alloc0((wmem_file_scope()), sizeof
(dect_nr_conv_info_t)))
;
2161 ctx->conv_info->hpc_tree = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
2162 conversation_add_proto_data(conversation, proto_dect_nr, ctx->conv_info);
2163 }
2164
2165 proto_item *item = proto_tree_add_uint(tree, hf_dect_nr_conv_index, NULL((void*)0), 0, 0, conversation->conv_index);
2166 proto_item_set_generated(item);
2167}
2168
2169/* Table 6.2.2-2a: Feedback info format 1 */
2170static void handle_feedback_format_1(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo)
2171{
2172 uint32_t harq, bs, cqi;
2173 bool_Bool tx_fb;
2174
2175 proto_tree_add_item_ret_uint(tree, hf_dect_nr_fbi1_harq_pn, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &harq);
2176 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_fbi1_tx_fb, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &tx_fb);
2177 proto_tree_add_item_ret_uint(tree, hf_dect_nr_fbi1_bs, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &bs);
2178 proto_tree_add_item_ret_uint(tree, hf_dect_nr_fbi1_cqi, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &cqi);
2179
2180 col_append_fstr(pinfo->cinfo, COL_INFO, " (HARQ proc #%d %s, %s, CQI: %s)",
2181 harq, tfs_get_string(tx_fb, &tfs_ack_nack),
2182 val_to_str_const(bs, buffer_status_vals, "Unknown"),
2183 val_to_str_const(cqi, cqi_vals, "Unknown"));
2184}
2185
2186/* Table 6.2.2-2b: Feedback info format 2 */
2187static void handle_feedback_format_2(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo _U___attribute__((unused)))
2188{
2189 proto_tree_add_item(tree, hf_dect_nr_fbi2_cb_index, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2190 proto_tree_add_item(tree, hf_dect_nr_fbi2_mimo_fb, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2191 proto_tree_add_item(tree, hf_dect_nr_fbi2_bs, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2192 proto_tree_add_item(tree, hf_dect_nr_fbi2_cqi, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2193}
2194
2195/* Table 6.2.2-2c: Feedback info format 3 */
2196static void handle_feedback_format_3(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo)
2197{
2198 uint32_t harq_1, harq_2, cqi;
2199 bool_Bool tx_fb_1, tx_fb_2;
2200
2201 proto_tree_add_item_ret_uint(tree, hf_dect_nr_fbi3_harq_pn_1, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &harq_1);
2202 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_fbi3_tx_fb_1, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &tx_fb_1);
2203 proto_tree_add_item_ret_uint(tree, hf_dect_nr_fbi3_harq_pn_2, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &harq_2);
2204 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_fbi3_tx_fb_2, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &tx_fb_2);
2205 proto_tree_add_item_ret_uint(tree, hf_dect_nr_fbi3_cqi, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &cqi);
2206
2207 col_append_fstr(pinfo->cinfo, COL_INFO, " (HARQ proc #%d %s, HARQ proc #%d %s, CQI: %s)",
2208 harq_1, tfs_get_string(tx_fb_1, &tfs_ack_nack),
2209 harq_2, tfs_get_string(tx_fb_2, &tfs_ack_nack),
2210 val_to_str_const(cqi, cqi_vals, "Unknown"));
2211}
2212
2213/* Table 6.2.2-2d: Feedback info format 4 */
2214static void handle_feedback_format_4(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo)
2215{
2216 uint32_t harq, cqi;
2217
2218 proto_tree_add_item_ret_uint(tree, hf_dect_nr_fbi4_harq_fb_bm, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &harq);
2219
2220 col_append_str(pinfo->cinfo, COL_INFO, " (HARQ procs: ");
2221 /* Cycle from 0th to 8th HARQ bitmap */
2222 for (uint16_t bitCycle = 0, i = 0; i <= 8; i++) {
2223 bitCycle = (1 << i);
2224 if (harq & bitCycle)
2225 col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", " #%d", i + 1);
2226 }
2227
2228 proto_tree_add_item_ret_uint(tree, hf_dect_nr_fbi4_cqi, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &cqi);
2229 col_append_fstr(pinfo->cinfo, COL_INFO, ", CQI: %s)", val_to_str_const(cqi, cqi_vals, "Unknown"));
2230}
2231
2232/* Table 6.2.2-2e: Feedback info format 5 */
2233static void handle_feedback_format_5(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo)
2234{
2235 uint32_t harq;
2236 bool_Bool tx_fb;
2237
2238 proto_tree_add_item_ret_uint(tree, hf_dect_nr_fbi5_harq_pn, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &harq);
2239 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_fbi5_tx_fb, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &tx_fb);
2240 proto_tree_add_item(tree, hf_dect_nr_fbi5_mimo_fb, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2241 proto_tree_add_item(tree, hf_dect_nr_fbi5_cb_index, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2242
2243 col_append_fstr(pinfo->cinfo, COL_INFO, " (HARQ proc #%d %s)", harq, tfs_get_string(tx_fb, &tfs_ack_nack));
2244}
2245
2246/* Table 6.2.2-2f: Feedback info format 6 */
2247static void handle_feedback_format_6(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo)
2248{
2249 uint32_t harq, bs, cqi;
2250
2251 proto_tree_add_item_ret_uint(tree, hf_dect_nr_fbi6_harq_pn, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &harq);
2252 dect_tree_add_reserved_item(tree, hf_dect_nr_fbi6_res1, tvb, offset, 2, pinfo, ENC_BIG_ENDIAN0x00000000);
2253 proto_tree_add_item_ret_uint(tree, hf_dect_nr_fbi6_bs, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &bs);
2254 proto_tree_add_item_ret_uint(tree, hf_dect_nr_fbi6_cqi, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &cqi);
2255
2256 col_append_fstr(pinfo->cinfo, COL_INFO, " (HARQ proc #%d, %s, CQI: %s)",
2257 harq,
2258 val_to_str_const(bs, buffer_status_vals, "Unknown"),
2259 val_to_str_const(cqi, cqi_vals, "Unknown"));
2260}
2261
2262/* Table 6.2.2-2g: Feedback info format 7 */
2263static void handle_feedback_format_7(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo)
2264{
2265 uint32_t bs, cqi;
2266 bool_Bool cqi_sel;
2267
2268 proto_tree_add_item_ret_uint(tree, hf_dect_nr_fbi7_bs, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &bs);
2269 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_fbi7_cqi_field, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &cqi_sel);
2270 proto_tree_add_item_ret_uint(tree, hf_dect_nr_fbi7_cqi, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &cqi);
2271 dect_tree_add_reserved_item(tree, hf_dect_nr_fbi7_res1, tvb, offset, 2, pinfo, ENC_BIG_ENDIAN0x00000000);
2272
2273 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s", val_to_str_const(bs, buffer_status_vals, "Unknown"));
2274 if (cqi_sel)
2275 col_append_fstr(pinfo->cinfo, COL_INFO, ", CQI: %s", val_to_str_const(cqi, cqi_vals, "Unknown"));
2276 col_append_str(pinfo->cinfo, COL_INFO, ")");
2277}
2278
2279/* 6.2: Physical Header Field */
2280static int dissect_physical_header_field(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, dect_nr_context_t *ctx)
2281{
2282 uint32_t header_format = 0;
2283 bool_Bool len_type;
2284 uint32_t packet_len;
2285 int plcf;
2286
2287 if (phf_type_pref == PHF_TYPE_TYPE_AUTO) {
2288 /* Physical Header Field Type is determined from 6th and 7th packet byte.
2289 * For Type 1 they are always zero.
2290 * (Type 1: 40 bits (HF 000), or Type 2: 80 bits, (HF 000 or 001))
2291 */
2292 plcf = (tvb_get_ntohs(tvb, offset + 5) == 0) ? PHF_TYPE_TYPE_1 : PHF_TYPE_TYPE_2;
2293 } else {
2294 plcf = phf_type_pref;
2295 }
2296
2297 /* In dect_nr, device always reserves 10 bytes for the PHF.
2298 * If 5-byte version used, the remaining 5 bytes is just padding.
2299 */
2300 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_phf, tvb, offset, 10, ENC_NA0x00000000);
2301 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_phf);
2302 proto_tree *len_item;
2303
2304 proto_item_append_text(item, " (%s)", val_to_str_const(plcf, dect_plcf_size_vals, "Unknown"));
2305
2306 if (plcf == PHF_TYPE_TYPE_1) {
2307 proto_tree_add_item(tree, hf_dect_nr_header_format_type1, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2308 } else {
2309 proto_tree_add_item_ret_uint(tree, hf_dect_nr_header_format_type2, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &header_format);
2310 }
2311 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_len_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &len_type);
2312 len_item = proto_tree_add_item_ret_uint(tree, hf_dect_nr_packet_len, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &packet_len);
2313 if (len_type) {
2314 proto_item_append_text(len_item, " slot%s", plurality(packet_len + 1, "", "s")((packet_len + 1) == 1 ? ("") : ("s")));
2315 } else {
2316 proto_item_append_text(len_item, " subslot%s", plurality(packet_len + 1, "", "s")((packet_len + 1) == 1 ? ("") : ("s")));
2317 }
2318 offset++;
2319
2320 proto_tree_add_item_ret_uint(tree, hf_dect_nr_short_nw_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &ctx->nw_id);
2321 offset++;
2322
2323 proto_tree_add_item_ret_uint(tree, hf_dect_nr_transmitter_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ctx->tx_id);
2324 offset += 2;
2325
2326 proto_tree_add_item(tree, hf_dect_nr_tx_pwr, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2327 /* DF MCS length is 3 bits in Type 1 header, and 4 bits in Type 2 header */
2328 if (plcf == PHF_TYPE_TYPE_2) {
2329 proto_tree_add_item(tree, hf_dect_nr_df_mcs_t2, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2330 } else {
2331 dect_tree_add_reserved_item(tree, hf_dect_nr_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
2332 proto_tree_add_item(tree, hf_dect_nr_df_mcs_t1, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2333 }
2334 offset++;
2335
2336 /* If 80-bit (type 2) PHF is used */
2337 if (plcf == PHF_TYPE_TYPE_2) {
2338 uint32_t fb_format;
2339
2340 proto_tree_add_item_ret_uint(tree, hf_dect_nr_receiver_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ctx->rx_id);
2341 offset += 2;
2342
2343 proto_tree_add_item(tree, hf_dect_nr_spatial_streams, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2344 if (header_format == 0) {
2345 proto_tree_add_item(tree, hf_dect_nr_df_red_version, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2346 proto_tree_add_item(tree, hf_dect_nr_df_ind, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2347 proto_tree_add_item(tree, hf_dect_nr_df_harq_proc, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2348 } else {
2349 proto_tree_add_item(tree, hf_dect_nr_res1_hdr_format_001, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2350 }
2351 offset++;
2352
2353 proto_tree_add_item_ret_uint(tree, hf_dect_nr_fb_format, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &fb_format);
2354
2355 if (fb_format != 0) {
2356 col_set_str(pinfo->cinfo, COL_INFO, "Feedback");
2357 }
2358
2359 switch (fb_format) {
2360 case 1: /* Format 1, Table 6.2.2-2a */
2361 handle_feedback_format_1(tree, tvb, offset, pinfo);
2362 break;
2363
2364 case 2: /* Format 2, Table 6.2.2-2b */
2365 handle_feedback_format_2(tree, tvb, offset, pinfo);
2366 break;
2367
2368 case 3: /* Format 3, Table 6.2.2-2c */
2369 handle_feedback_format_3(tree, tvb, offset, pinfo);
2370 break;
2371
2372 case 4: /* Format 4, Table 6.2.2-2d */
2373 handle_feedback_format_4(tree, tvb, offset, pinfo);
2374 break;
2375
2376 case 5: /* Format 5, Table 6.2.2-2e */
2377 handle_feedback_format_5(tree, tvb, offset, pinfo);
2378 break;
2379
2380 case 6: /* Format 6, Table 6.2.2-2f */
2381 /* Using this feedback info format implicitly means a Negative Acknowledgement (NACK)
2382 * for the corresponding HARQ process. The HARQ retransmission with the process number
2383 * shall use DF Redundancy Version 0.
2384 */
2385 handle_feedback_format_6(tree, tvb, offset, pinfo);
2386 break;
2387
2388 case 7: /* Format 7, Table 6.2.2-2g */
2389 handle_feedback_format_7(tree, tvb, offset, pinfo);
2390 break;
2391
2392 case 15: /* Escape */
2393 proto_tree_add_item(tree, hf_dect_nr_escape, tvb, offset, 2, ENC_NA0x00000000);
2394 break;
2395
2396 default:
2397 proto_tree_add_item(tree, hf_dect_nr_fb_info, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2398 break;
2399 }
2400 offset += 2;
2401 } else if (phf_type_pref == PHF_TYPE_TYPE_AUTO) {
2402 ctx->rx_id = 0;
2403 proto_tree_add_item(tree, hf_dect_nr_phf_padding, tvb, offset, 5, ENC_NA0x00000000);
2404 offset += 5;
2405 }
2406
2407 conversation_setup(pinfo, tree, ctx);
2408
2409 return offset;
2410}
2411
2412/* 6.3.3.1: Data MAC PDU Header */
2413static int dissect_mac_data_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data)
2414{
2415 int offset = 0;
2416 uint32_t long_rd_id;
2417
2418 dect_nr_context_t *ctx = (dect_nr_context_t *)data;
2419
2420 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_data_hdr, tvb, offset, 2, ENC_NA0x00000000);
2421 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_data_hdr);
2422
2423 dect_tree_add_reserved_item(tree, hf_dect_nr_data_hdr_res1, tvb, offset, 2, pinfo, ENC_BIG_ENDIAN0x00000000);
2424 proto_tree_add_item(tree, hf_dect_nr_data_hdr_reset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2425 proto_tree_add_item_ret_uint(tree, hf_dect_nr_data_hdr_sn, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ctx->psn);
2426 offset += 2;
2427
2428 long_rd_id = lookup_long_rd_id(ctx->nw_id, ctx->rx_id);
2429 item = proto_tree_add_uint(tree, hf_dect_nr_data_hdr_rx_addr, NULL((void*)0), 0, 0, long_rd_id);
2430 proto_item_set_generated(item);
2431
2432 if (long_rd_id != 0xFFFFFFFF) {
2433 col_add_fstr(pinfo->cinfo, COL_DEF_DST, "0x%08x", long_rd_id);
2434 }
2435
2436 long_rd_id = lookup_long_rd_id(ctx->nw_id, ctx->tx_id);
2437 item = proto_tree_add_uint(tree, hf_dect_nr_data_hdr_tx_addr, NULL((void*)0), 0, 0, long_rd_id);
2438 proto_item_set_generated(item);
2439
2440 if (long_rd_id != 0xFFFFFFFF) {
2441 col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "0x%08x", long_rd_id);
2442 }
2443
2444 return offset;
2445}
2446
2447/* 6.3.3.2: Beacon Header */
2448static int dissect_mac_beacon_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data)
2449{
2450 int offset = 0;
2451 uint32_t tx_addr;
2452
2453 dect_nr_context_t *ctx = (dect_nr_context_t *)data;
2454
2455 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_bc_hdr, tvb, offset, 7, ENC_NA0x00000000);
2456 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_bc_hdr);
2457
2458 proto_tree_add_item(tree, hf_dect_nr_bc_hdr_nw_id, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000);
2459 offset += 3;
2460
2461 proto_tree_add_item_ret_uint(tree, hf_dect_nr_bc_hdr_tx_addr, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000, &tx_addr);
2462 col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "0x%08x", tx_addr);
2463 offset += 4;
2464
2465 insert_long_rd_id(ctx->nw_id, ctx->tx_id, tx_addr);
2466
2467 return offset;
2468}
2469
2470/* 6.3.3.3: Unicast Header */
2471static int dissect_mac_unicast_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data)
2472{
2473 int offset = 0;
2474 uint32_t tx_addr;
2475 uint32_t rx_addr;
2476
2477 dect_nr_context_t *ctx = (dect_nr_context_t *)data;
2478
2479 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_uc_hdr, tvb, offset, 10, ENC_NA0x00000000);
2480 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_uc_hdr);
2481
2482 dect_tree_add_reserved_item(tree, hf_dect_nr_uc_hdr_res1, tvb, offset, 2, pinfo, ENC_BIG_ENDIAN0x00000000);
2483 proto_tree_add_item(tree, hf_dect_nr_uc_hdr_rst, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2484 proto_tree_add_item_ret_uint(tree, hf_dect_nr_uc_hdr_sn, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ctx->psn);
2485 offset += 2;
2486
2487 proto_tree_add_item_ret_uint(tree, hf_dect_nr_uc_hdr_rx_addr, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000, &rx_addr);
2488 col_add_fstr(pinfo->cinfo, COL_DEF_DST, "0x%08x", rx_addr);
2489 offset += 4;
2490
2491 proto_tree_add_item_ret_uint(tree, hf_dect_nr_uc_hdr_tx_addr, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000, &tx_addr);
2492 col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "0x%08x", tx_addr);
2493 offset += 4;
2494
2495 insert_long_rd_id(ctx->nw_id, ctx->tx_id, tx_addr);
2496 insert_long_rd_id(ctx->nw_id, ctx->rx_id, rx_addr);
2497
2498 return offset;
2499}
2500
2501/* 6.3.3.4: RD Broadcasting Header */
2502static int dissect_mac_rd_broadcasting_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data)
2503{
2504 int offset = 0;
2505 uint32_t tx_addr;
2506
2507 dect_nr_context_t *ctx = (dect_nr_context_t *)data;
2508
2509 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_rdbh_hdr, tvb, offset, 6, ENC_NA0x00000000);
2510 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_rdbh_hdr);
2511
2512 dect_tree_add_reserved_item(tree, hf_dect_nr_rdbh_hdr_res1, tvb, offset, 2, pinfo, ENC_BIG_ENDIAN0x00000000);
2513 proto_tree_add_item(tree, hf_dect_nr_rdbh_hdr_reset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2514 proto_tree_add_item_ret_uint(tree, hf_dect_nr_rdbh_hdr_sn, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ctx->psn);
2515 offset += 2;
2516
2517 proto_tree_add_item_ret_uint(tree, hf_dect_nr_rdbh_hdr_tx_addr, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000, &tx_addr);
2518 col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "0x%08x", tx_addr);
2519 offset += 4;
2520
2521 insert_long_rd_id(ctx->nw_id, ctx->tx_id, tx_addr);
2522
2523 return offset;
2524}
2525
2526/* 6.3.3: MAC Common Header */
2527static int dissect_mac_common_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, dect_nr_context_t *ctx, uint32_t mac_hdr_type)
2528{
2529 int sublen;
2530
2531 sublen = dissector_try_uint_with_data(mac_hdr_dissector_table, mac_hdr_type, tvb, pinfo, parent_tree, false0, ctx);
2532
2533 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited) && ctx->conv_info) {
2534 /* Check if PSN is 0 or significantly less than the last PSN */
2535 if (ctx->psn == 0 || (ctx->psn + 0x7FF) < get_last_psn(ctx)) {
2536 const dect_nr_sec_info_t *sec_info;
2537
2538 /* 5.9.1.3 Ciphering
2539 * If MAC PDU sequence number is 0 or rolls over 0 from the previously
2540 * received sequence number: increment the HPC by one.
2541 */
2542 sec_info = lookup_sec_info(pinfo, ctx);
2543
2544 if (sec_info) {
2545 dect_nr_sec_info_t next_sec_info = *sec_info;
2546 next_sec_info.hpc++;
2547 insert_sec_info(pinfo, ctx, &next_sec_info);
2548 }
2549 }
2550
2551 set_last_psn(ctx, ctx->psn);
2552 }
2553
2554 if (sublen <= 0 && tvb_reported_length(tvb) > 0) {
2555 /* Unknown header type with unknown length */
2556 proto_item *uc_item = proto_tree_add_item(parent_tree, hf_dect_nr_undecoded, tvb, 0, -1, ENC_NA0x00000000);
2557 col_add_fstr(pinfo->cinfo, COL_INFO, "Header Type %u", mac_hdr_type);
2558 expert_add_info(pinfo, uc_item, &ei_dect_nr_undecoded);
2559 sublen = tvb_reported_length(tvb);
2560 }
2561
2562 /* Return length of MAC Common Header */
2563 return sublen;
2564}
2565
2566/* DLC Routing Header */
2567static int dissect_dlc_routing_header(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree)
2568{
2569 int start = offset;
2570 bool_Bool delay_field;
2571 uint32_t hop_count_limit;
2572 uint32_t dest_add;
2573 uint32_t routing_type;
2574
2575 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_dlc_routing_hdr, tvb, offset, -1, ENC_NA0x00000000);
2576 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_dlc_routing_hdr);
2577
2578 dect_tree_add_reserved_item(tree, hf_dect_nr_dlc_routing_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
2579 proto_tree_add_item(tree, hf_dect_nr_dlc_routing_qos, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2580 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_dlc_routing_delay_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &delay_field);
2581 offset++;
2582
2583 proto_tree_add_item_ret_uint(tree, hf_dect_nr_dlc_routing_hop_count_limit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &hop_count_limit);
2584 proto_tree_add_item_ret_uint(tree, hf_dect_nr_dlc_routing_dest_add, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &dest_add);
2585 proto_tree_add_item_ret_uint(tree, hf_dect_nr_dlc_routing_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &routing_type);
2586 offset++;
2587
2588 if (dest_add != 3 && dest_add != 4) {
2589 proto_tree_add_item(tree, hf_dect_nr_dlc_routing_src_addr, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
2590 offset += 4;
2591 }
2592
2593 if (dest_add != 1 && dest_add != 2 && dest_add != 4) {
2594 proto_tree_add_item(tree, hf_dect_nr_dlc_routing_dst_addr, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
2595 offset += 4;
2596 }
2597
2598 if (hop_count_limit == 1 || hop_count_limit == 2) {
2599 proto_tree_add_item(tree, hf_dect_nr_dlc_routing_hop_count, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2600 offset++;
2601 }
2602
2603 if (hop_count_limit == 2) {
2604 proto_tree_add_item(tree, hf_dect_nr_dlc_routing_hop_limit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2605 offset++;
2606 }
2607
2608 if (delay_field) {
2609 proto_tree_add_item(tree, hf_dect_nr_dlc_routing_delay, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
2610 offset += 4;
2611 }
2612
2613 if (routing_type == 5) {
2614 proto_tree_add_item(tree, hf_dect_nr_dlc_routing_seq_num, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2615 offset++;
2616 }
2617
2618 proto_item_set_len(item, offset - start);
2619
2620 return offset;
2621}
2622
2623static int dissect_dect_nr_cvg_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, uint8_t ie_type, uint32_t offset, uint32_t ie_len)
2624{
2625 uint16_t ep_mux, seq_num, sdu_len, seg_offset;
2626 uint8_t si, sli;
2627
2628 proto_item *item;
2629 proto_item *tree;
2630 proto_item *uc_item;
2631
2632 tvbuff_t *subtvb;
2633
2634 switch (ie_type) {
2635 case 0: /* EP Mux IE */
2636 item = proto_tree_add_item(parent_tree, hf_dect_nr_cvg_ep_mux_ie, tvb, offset, ie_len, ENC_NA0x00000000);
2637 tree = proto_item_add_subtree(item, ett_dect_nr_cvg_ep_mux_ie);
2638 proto_tree_add_item_ret_uint16(tree, hf_dect_nr_cvg_ep_mux_ie_endpoint, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ep_mux);
2639 offset += 2;
Value stored to 'offset' is never read
2640 break;
2641
2642 case 1: /* Data IE */
2643 item = proto_tree_add_item(parent_tree, hf_dect_nr_cvg_data_ie, tvb, offset, ie_len, ENC_NA0x00000000);
2644 tree = proto_item_add_subtree(item, ett_dect_nr_cvg_data_ie);
2645
2646 proto_tree_add_item_ret_uint8(tree, hf_dect_nr_cvg_data_ie_si, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &si);
2647 proto_tree_add_item_ret_uint8(tree, hf_dect_nr_cvg_data_ie_sli, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &sli);
2648 proto_tree_add_item_ret_uint16(tree, hf_dect_nr_cvg_data_ie_seq_num, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &seq_num);
2649 offset += 2;
2650
2651 if (sli == 1) { /* Length included */
2652 proto_tree_add_item_ret_uint16(tree, hf_dect_nr_cvg_data_ie_sdu_len, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &sdu_len);
2653 offset += 2;
2654 }
2655 if (si == 2 || si == 3) { /* The payload field contains an incomplete SDU and is not the first segment */
2656 proto_tree_add_item_ret_uint16(tree, hf_dect_nr_cvg_data_ie_seg_offset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &seg_offset);
2657 offset += 2;
2658 }
2659 subtvb = tvb_new_subset_length(tvb, offset, ie_len);
2660
2661 /* No COL_INFO updates from the data dissector */
2662 col_set_writable(pinfo->cinfo, COL_INFO, false0);
2663 call_dissector(data_handle, subtvb, pinfo, proto_tree_get_root(tree));
2664 col_set_writable(pinfo->cinfo, COL_INFO, true1);
2665 break;
2666
2667 case 2: /* Data EP IE */
2668 item = proto_tree_add_item(parent_tree, hf_dect_nr_cvg_data_ep_ie, tvb, offset, ie_len, ENC_NA0x00000000);
2669 tree = proto_item_add_subtree(item, ett_dect_nr_cvg_data_ep_ie);
2670 proto_tree_add_item_ret_uint16(tree, hf_dect_nr_cvg_data_ep_ie_endpoint, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ep_mux);
2671 offset += 2;
2672
2673 proto_tree_add_item_ret_uint8(tree, hf_dect_nr_cvg_data_ie_si, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &si);
2674 proto_tree_add_item_ret_uint8(tree, hf_dect_nr_cvg_data_ie_sli, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &sli);
2675 proto_tree_add_item_ret_uint16(tree, hf_dect_nr_cvg_data_ie_seq_num, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &seq_num);
2676 offset += 2;
2677
2678 if (sli == 1) { /* Length included */
2679 proto_tree_add_item_ret_uint16(tree, hf_dect_nr_cvg_data_ie_sdu_len, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &sdu_len);
2680 offset += 2;
2681 } else { /* Length not included */
2682 sdu_len = ie_len;
2683 }
2684
2685 if (si == 2 || si == 3) { /* The payload field contains an incomplete SDU and is not the first segment */
2686 proto_tree_add_item_ret_uint16(tree, hf_dect_nr_cvg_data_ie_seg_offset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &seg_offset);
2687 offset += 2;
2688 }
2689
2690 subtvb = tvb_new_subset_length(tvb, offset, sdu_len);
2691
2692 /* DECT-2020 NR Endpoint Multiplexing Address Allocation */
2693 switch (ep_mux) {
2694 case 0x8002:
2695 /* No COL_INFO updates from the dect_nr dissector after IPv6 */
2696 col_set_writable(pinfo->cinfo, COL_INFO, true1);
2697 call_dissector(ipv6_handle, subtvb, pinfo, proto_tree_get_root(tree));
2698 col_prepend_fstr(pinfo->cinfo, COL_PROTOCOL, "DECT NR+/");
2699 col_set_writable(pinfo->cinfo, COL_INFO, false0);
2700 break;
2701
2702 case 0x8003:
2703 /* No COL_INFO updates from the dect_nr dissector after 6LoWPAN */
2704 col_set_writable(pinfo->cinfo, COL_INFO, true1);
2705 call_dissector(sixlowpan_handle, subtvb, pinfo, proto_tree_get_root(tree));
2706 col_prepend_fstr(pinfo->cinfo, COL_PROTOCOL, "DECT NR+/");
2707 col_set_writable(pinfo->cinfo, COL_INFO, false0);
2708 break;
2709
2710 default:
2711 /* No COL_INFO updates from the data dissector */
2712 col_set_writable(pinfo->cinfo, COL_INFO, false0);
2713 call_dissector(data_handle, subtvb, pinfo, proto_tree_get_root(tree));
2714 col_set_writable(pinfo->cinfo, COL_INFO, true1);
2715 break;
2716 }
2717 break;
2718
2719 case 3: /* Data Transparent IE */
2720 item = proto_tree_add_item(parent_tree, hf_dect_nr_cvg_data_transp_ie, tvb, offset, ie_len, ENC_NA0x00000000);
2721 tree = proto_item_add_subtree(item, ett_dect_nr_cvg_data_transp_ie);
2722
2723 subtvb = tvb_new_subset_length(tvb, offset, ie_len);
2724
2725 /* No COL_INFO updates from the data dissector */
2726 col_set_writable(pinfo->cinfo, COL_INFO, false0);
2727 call_dissector(data_handle, subtvb, pinfo, tree);
2728 col_set_writable(pinfo->cinfo, COL_INFO, true1);
2729
2730 col_add_fstr(pinfo->cinfo, COL_INFO, "CVG: Data Transparent IE, Length: %u", ie_len);
2731 break;
2732
2733 case 4: /* Security IE */
2734 item = proto_tree_add_item(parent_tree, hf_dect_nr_cvg_security_ie, tvb, offset, ie_len, ENC_NA0x00000000);
2735 tree = proto_item_add_subtree(item, ett_dect_nr_cvg_security_ie);
2736
2737 /* TODO: Dissect Security IE */
2738 call_dissector(data_handle, tvb, pinfo, tree);
2739 break;
2740
2741 case 5: /* TX Services Config IE */
2742 item = proto_tree_add_item(parent_tree, hf_dect_nr_cvg_tx_services_conf_ie, tvb, offset, ie_len, ENC_NA0x00000000);
2743 tree = proto_item_add_subtree(item, ett_dect_nr_cvg_tx_services_conf_ie);
2744
2745 /* TODO: Dissect TX Services Config IE */
2746 call_dissector(data_handle, tvb, pinfo, tree);
2747 break;
2748
2749 case 6: /* ARQ Feedback IE */
2750 item = proto_tree_add_item(parent_tree, hf_dect_nr_cvg_arq_fb_ie, tvb, offset, ie_len, ENC_NA0x00000000);
2751 tree = proto_item_add_subtree(item, ett_dect_nr_cvg_arq_fb_ie);
2752
2753 /* TODO: ARQ Feedback IE */
2754 call_dissector(data_handle, tvb, pinfo, tree);
2755 break;
2756
2757 case 7: /* ARQ Poll IE */
2758 item = proto_tree_add_item(parent_tree, hf_dect_nr_cvg_arq_poll_ie, tvb, offset, ie_len, ENC_NA0x00000000);
2759 tree = proto_item_add_subtree(item, ett_dect_nr_cvg_arq_poll_ie);
2760
2761 /* TODO: ARQ Poll IE */
2762 call_dissector(data_handle, tvb, pinfo, tree);
2763 break;
2764
2765 case 8: /* Flow Status IE */
2766 item = proto_tree_add_item(parent_tree, hf_dect_nr_cvg_flow_status_ie, tvb, offset, ie_len, ENC_NA0x00000000);
2767 tree = proto_item_add_subtree(item, ett_dect_nr_cvg_flow_status_ie);
2768
2769 /* TODO: Flow Status IE */
2770 call_dissector(data_handle, tvb, pinfo, tree);
2771 break;
2772
2773 case 30: /* Escape */
2774 proto_tree_add_item(parent_tree, hf_dect_nr_cvg_escape, tvb, offset, ie_len, ENC_NA0x00000000);
2775 break;
2776
2777 default: /* Reserved */
2778 uc_item = proto_tree_add_item(parent_tree, hf_dect_nr_undecoded, tvb, offset, ie_len, ENC_NA0x00000000);
2779 expert_add_info(pinfo, uc_item, &ei_dect_nr_undecoded);
2780 return -1;
2781 }
2782
2783 return 0;
2784}
2785
2786static void dissect_cvg_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
2787{
2788 uint32_t ie_type, cvg_ext, mt, f2c, mux_tag;
2789 int cvg_layer_len;
2790 proto_item *cvg_header_item;
2791 proto_tree *cvg_header_tree;
2792 proto_tree *cvg_header_length_item = NULL((void*)0);
2793 uint32_t header_len, ie_len;
2794 uint32_t len;
2795
2796 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_cvg_pdu, tvb, 0, -1, ENC_NA0x00000000);
2797 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_cvg);
2798
2799 cvg_layer_len = tvb_captured_length(tvb);
2800 proto_item_set_len(item, cvg_layer_len);
2801
2802 /* CVG header tree */
2803 header_len = 1;
2804 cvg_header_item = proto_tree_add_item(tree, hf_dect_nr_cvg_header, tvb, 0, 1, ENC_NA0x00000000);
2805 cvg_header_tree = proto_item_add_subtree(cvg_header_item, ett_dect_nr_cvg_header);
2806
2807 proto_tree_add_item_ret_uint(cvg_header_tree, hf_dect_nr_cvg_header_cvg_ext, tvb, 0, 1, ENC_BIG_ENDIAN0x00000000, &cvg_ext);
2808 proto_tree_add_item_ret_uint(cvg_header_tree, hf_dect_nr_cvg_header_mt, tvb, 0, 1, ENC_BIG_ENDIAN0x00000000, &mt);
2809
2810 if (mt == 0) { /* CVG Header format 1 */
2811 proto_tree_add_item_ret_uint(cvg_header_tree, hf_dect_nr_cvg_header_ie_type, tvb, 0, 1, ENC_BIG_ENDIAN0x00000000, &ie_type);
2812 proto_item_append_text(cvg_header_tree, ": IE type: %s", val_to_str_const(ie_type, dect_nr_cvg_header_ie_type_vals, "Unknown"));
2813 proto_item_append_text(item, ": %s", val_to_str_const(ie_type, dect_nr_cvg_header_ie_type_vals, "Unknown"));
2814 } else { /* CVG Header format 2 */
2815 proto_tree_add_item_ret_uint(cvg_header_tree, hf_dect_nr_cvg_header_f2c, tvb, 0, 1, ENC_BIG_ENDIAN0x00000000, &f2c);
2816 proto_item_append_text(cvg_header_tree, ": F2C: %s", val_to_str_const(f2c, dect_nr_cvg_header_f2c_vals, "Unknown"));
2817 proto_item_append_text(item, ": %s", val_to_str_const(f2c, dect_nr_cvg_header_f2c_vals, "Unknown"));
2818
2819 proto_tree_add_item_ret_uint(cvg_header_tree, hf_dect_nr_cvg_header_mux_tag, tvb, 0, 1, ENC_BIG_ENDIAN0x00000000, &mux_tag);
2820 proto_item_append_text(cvg_header_tree, ": Mux Tag: %u", mux_tag);
2821 proto_item_append_text(item, ": %u", mux_tag);
2822
2823 /* TODO: Add Mux Tag checking */
2824 }
2825
2826 /* CVG Ext coding */
2827 switch (cvg_ext) {
2828 case 0: /* No length field included in CVG header */
2829 break;
2830
2831 case 1: /* 8-bit length included indicating the length of the IE payload. */
2832 header_len += 1;
2833 cvg_header_length_item = proto_tree_add_item_ret_uint(cvg_header_tree, hf_dect_nr_cvg_header_length, tvb, 1, 1, ENC_BIG_ENDIAN0x00000000, &len);
2834 proto_item_append_text(cvg_header_tree, ", length: %u", len);
2835 break;
2836
2837 case 2: /* 16-bit length included indicating the length of the IE payload. */
2838 header_len += 2;
2839 cvg_header_length_item = proto_tree_add_item_ret_uint(cvg_header_tree, hf_dect_nr_cvg_header_length, tvb, 1, 2, ENC_BIG_ENDIAN0x00000000, &len);
2840 proto_item_append_text(cvg_header_tree, ", length: %u", len);
2841 break;
2842
2843 default: /* Reserved */
2844 break;
2845 }
2846
2847 if (mt == 1 && f2c == 2) { /* IE coding with CVG IE Type field */
2848 proto_tree_add_item_ret_uint(cvg_header_tree, hf_dect_nr_cvg_header_ie_type, tvb, header_len, 1, ENC_BIG_ENDIAN0x00000000, &ie_type);
2849 proto_item_append_text(cvg_header_tree, ": IE type: %s", val_to_str_const(ie_type, dect_nr_cvg_header_ie_type_vals, "Unknown"));
2850 proto_item_append_text(item, ": %s", val_to_str_const(ie_type, dect_nr_cvg_header_ie_type_vals, "Unknown"));
2851 header_len += 1;
2852 }
2853
2854 proto_item_set_len(cvg_header_item, header_len);
2855 if (cvg_header_length_item != NULL((void*)0)) {
2856 proto_item_set_len(cvg_header_length_item, header_len - 1);
2857 }
2858 if (mt == 0 || (mt == 1 && f2c == 2)) {
2859 ie_len = cvg_layer_len - header_len;
2860 dissect_dect_nr_cvg_ie(tvb, pinfo, tree, ie_type, header_len, ie_len);
2861 }
2862}
2863
2864bool_Bool dissect_cvg_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))
2865{
2866 uint8_t hdr, cvg_ext, mt, ie_type, f2c;
2867 uint16_t len;
2868
2869 /*
2870 * CVG Header Format 1
2871 *
2872 * 0 1 2 3 4 5 6 7
2873 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2874 * | CVG Ext | MT | CVG IE Type |
2875 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2876 *
2877 * CVG Header Format 2
2878 * 0 1 2 3 4 5 6 7
2879 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2880 * | CVG Ext | MT | F2C | Mux Tag |
2881 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2882 *
2883 */
2884
2885 if (tvb_captured_length(tvb) < 1) {
2886 return false0;
2887 }
2888
2889 hdr = tvb_get_uint8(tvb, 0);
2890 cvg_ext = (hdr & 0xC0) >> 6;
2891
2892 if (cvg_ext == 0) {
2893 len = 1; /* At least 1 byte */
2894 } else if (cvg_ext == 1) {
2895 len = tvb_get_uint8(tvb, 1);
2896 } else if (cvg_ext == 2) {
2897 len = tvb_get_uint16(tvb, 1, ENC_BIG_ENDIAN0x00000000);
2898 } else {
2899 return false0;
2900 }
2901
2902 /* Check that len is valid for an IE and that the data exists */
2903 if (len == 0 || tvb_reported_length_remaining(tvb, 1 + cvg_ext) < len) {
2904 return false0;
2905 }
2906
2907 /* indicates the header format */
2908 mt = (hdr & 0x20);
2909
2910 if (mt == 0) { /* header format 1 */
2911 ie_type = (hdr & 0x1F);
2912 if ((ie_type >= 9 && ie_type <= 29) || ie_type == 31) {
2913 return false0;
2914 }
2915 } else { /* header format 2 */
2916 f2c = (hdr & 0x18) >> 3;
2917 if (f2c == 3) {
2918 return false0;
2919 }
2920 }
2921
2922 dissect_cvg_pdu(tvb, pinfo, tree);
2923
2924 return true1;
2925}
2926
2927static void dissect_dlc_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
2928{
2929 heur_dtbl_entry_t *hdtbl_entry;
2930
2931 switch (dlc_data_type_pref) {
2932 case DLC_DATA_TYPE_AUTO:
2933 /* No COL_INFO updates from the dect_nr dissector after heuristic */
2934 col_set_writable(pinfo->cinfo, COL_INFO, true1);
2935 if (dissector_try_heuristic(heur_subdissector_list, tvb, pinfo, parent_tree, &hdtbl_entry, NULL((void*)0))) {
2936 const char *dect_nr_text = col_get_text(pinfo->cinfo, COL_PROTOCOL);
2937 if (dect_nr_text && strstr(dect_nr_text, "DECT NR+") == NULL((void*)0)) {
2938 col_prepend_fstr(pinfo->cinfo, COL_PROTOCOL, "DECT NR+/");
2939 }
2940 col_set_writable(pinfo->cinfo, COL_INFO, false0);
2941 break;
2942 }
2943 /* FALLTHRU */
2944
2945 case DLC_DATA_TYPE_BINARY:
2946 /* No COL_INFO updates from the data dissector */
2947 col_set_writable(pinfo->cinfo, COL_INFO, false0);
2948 call_dissector(data_handle, tvb, pinfo, parent_tree);
2949 col_set_writable(pinfo->cinfo, COL_INFO, true1);
2950 break;
2951
2952 case DLC_DATA_TYPE_CVG:
2953 /* Standard CVG parsing */
2954 dissect_cvg_pdu(tvb, pinfo, parent_tree);
2955 break;
2956
2957 case DLC_DATA_TYPE_IPv6:
2958 /* No COL_INFO updates from the dect_nr dissector after IPv6 */
2959 col_set_writable(pinfo->cinfo, COL_INFO, true1);
2960 call_dissector(ipv6_handle, tvb, pinfo, parent_tree);
2961 col_prepend_fstr(pinfo->cinfo, COL_PROTOCOL, "DECT NR+/");
2962 col_set_writable(pinfo->cinfo, COL_INFO, false0);
2963 break;
2964 }
2965}
2966
2967/* DLC Extension Header */
2968static int dissect_dlc_extension_header(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree)
2969{
2970 int start = offset;
2971 uint32_t dlc_ext;
2972 uint32_t ext_ie_type;
2973 uint32_t ext_length;
2974 tvbuff_t *subtvb;
2975 proto_item *uc_item;
2976
2977 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_dlc_ext_hdr, tvb, offset, -1, ENC_NA0x00000000);
2978 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_dlc_ext_hdr);
2979
2980 proto_tree_add_item_ret_uint(tree, hf_dect_nr_dlc_ext_coding, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &dlc_ext);
2981 proto_tree_add_item_ret_uint(tree, hf_dect_nr_dlc_ext_ie_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &ext_ie_type);
2982 offset++;
2983
2984 switch (dlc_ext) {
2985 case 0: /* No length field included; IE Type is fixed length */
2986 ext_length = tvb_captured_length_remaining(tvb, offset);
2987 break;
2988
2989 case 1: /* 8-bit length field for the extension header */
2990 proto_tree_add_item_ret_uint(tree, hf_dect_nr_dlc_ext_len, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &ext_length);
2991 offset++;
2992 break;
2993
2994 case 2: /* 16-bit length field for the extension header */
2995 proto_tree_add_item_ret_uint(tree, hf_dect_nr_dlc_ext_len, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ext_length);
2996 offset += 2;
2997 break;
2998
2999 default: /* Reserved */
3000 proto_item_set_len(item, offset - start);
3001 return offset;
3002 }
3003
3004 switch (ext_ie_type) {
3005 case 0: /* Routing header */
3006 offset = dissect_dlc_routing_header(tvb, offset, pinfo, tree);
3007 break;
3008
3009 case 1: /* CVG PDU */
3010 proto_tree_add_item(tree, hf_dect_nr_hls_bin, tvb, offset, ext_length, ENC_NA0x00000000);
3011 subtvb = tvb_new_subset_length(tvb, offset, ext_length);
3012 dissect_dlc_data(subtvb, pinfo, proto_tree_get_root(tree));
3013 offset += ext_length;
3014 break;
3015
3016 case 2: /* Next hop address IE */
3017 proto_tree_add_item(tree, hf_dect_nr_dlc_ext_next_hop_addr, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
3018 offset += 4;
3019 break;
3020
3021 case 3: /* Route Register IE */
3022 proto_tree_add_item(tree, hf_dect_nr_dlc_ext_source_routing_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
3023 offset += 4;
3024 break;
3025
3026 case 4: /* Route Error IE */
3027 proto_tree_add_item(tree, hf_dect_nr_dlc_ext_route_error_reason, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3028 offset++;
3029
3030 proto_tree_add_item(tree, hf_dect_nr_dlc_ext_invalid_next_hop_addr, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
3031 offset += 4;
3032 break;
3033
3034 case 62: /* Escape */
3035 proto_tree_add_item(tree, hf_dect_nr_escape, tvb, offset, ext_length, ENC_NA0x00000000);
3036 offset += ext_length;
3037 break;
3038
3039 default:
3040 uc_item = proto_tree_add_item(tree, hf_dect_nr_undecoded, tvb, offset, ext_length, ENC_NA0x00000000);
3041 expert_add_info(pinfo, uc_item, &ei_dect_nr_undecoded);
3042 offset += ext_length;
3043 break;
3044 }
3045
3046 proto_item_set_len(item, offset - start);
3047
3048 return offset;
3049}
3050
3051/* DLC Service Type */
3052static int dissect_dlc_service_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data)
3053{
3054 int offset = 0;
3055 proto_item *uc_item;
3056 proto_item *data_item = NULL((void*)0);
3057 uint32_t dlc_ie_type;
3058 uint32_t si = 0;
3059 uint32_t sn = 0;
3060 uint32_t segm_offset = 0;
3061 int data_len;
3062 uint32_t length;
3063 bool_Bool data_incomplete = false0;
3064 tvbuff_t *subtvb;
3065 wmem_strbuf_t *data_info;
3066 wmem_strbuf_t *segm_info;
3067
3068 dect_nr_context_t *ctx = (dect_nr_context_t *)data;
3069
3070 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_dlc_pdu, tvb, offset, -1, ENC_NA0x00000000);
3071 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_dlc_pdu);
3072
3073 length = tvb_captured_length_remaining(tvb, offset);
3074
3075 if (!ctx || !ctx->ie_length_present) {
3076 expert_add_info(pinfo, tree, &ei_dect_nr_ie_length_not_set);
3077 return offset + length;
3078 }
3079
3080 if (length < ctx->ie_length) {
3081 /* DLC PDU not completely stored, try best effort */
3082 proto_item_set_len(item, length);
3083
3084 if (length == 0) {
3085 col_append_sep_fstr(pinfo->cinfo, COL_INFO, ", ", "DLC PDU missing");
3086 return offset;
3087 }
3088 }
3089
3090 proto_tree_add_item_ret_uint(tree, hf_dect_nr_dlc_ie_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &dlc_ie_type);
3091
3092 switch (dlc_ie_type) {
3093 case 0: /* Data: DLC Service type 0 with routing header */
3094 dect_tree_add_reserved_item(tree, hf_dect_nr_dlc_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3095 offset++;
3096
3097 offset = dissect_dlc_routing_header(tvb, offset, pinfo, tree);
3098 break;
3099
3100 case 1: /* Data: DLC Service type 0 without a routing header */
3101 case 5: /* Data: DLC Service type 0 followed by DLC extension header */
3102 dect_tree_add_reserved_item(tree, hf_dect_nr_dlc_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3103 offset++;
3104 break;
3105
3106 case 2: /* Data: DLC Service type 1 or 2 or 3 with routing header */
3107 proto_tree_add_item_ret_uint(tree, hf_dect_nr_dlc_si, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &si);
3108 proto_tree_add_item_ret_uint(tree, hf_dect_nr_dlc_sn, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &sn);
3109 offset += 2;
3110
3111 /* Segmentation offset field is present if this is a data segment, and not the first or last one:
3112 * 2 = the last segment of the higher layer SDU
3113 * 3 = neither the first nor the last segment of the higher layer SDU
3114 */
3115 if (si == 2 || si == 3) {
3116 proto_tree_add_item_ret_uint(tree, hf_dect_nr_dlc_segm_offset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &segm_offset);
3117 offset += 2;
3118 }
3119
3120 offset = dissect_dlc_routing_header(tvb, offset, pinfo, tree);
3121 break;
3122
3123 case 3: /* Data: DLC Service type 1 or 2 or 3 without routing header */
3124 case 6: /* Data: DLC Service type 1 or 2 or 3 followed by DLC extension header */
3125 proto_tree_add_item_ret_uint(tree, hf_dect_nr_dlc_si, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &si);
3126 proto_tree_add_item_ret_uint(tree, hf_dect_nr_dlc_sn, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &sn);
3127 offset += 2;
3128
3129 /* Segmentation offset field is present if this is a data segment, and not the first or last one:
3130 * 2 = the last segment of the higher layer SDU
3131 * 3 = neither the first nor the last segment of the higher layer SDU
3132 */
3133 if (si == 2 || si == 3) {
3134 proto_tree_add_item_ret_uint(tree, hf_dect_nr_dlc_segm_offset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &segm_offset);
3135 offset += 2;
3136 }
3137 break;
3138
3139 case 4: /* DLC Timers configuration control IE */
3140 dect_tree_add_reserved_item(tree, hf_dect_nr_dlc_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3141 offset++;
3142
3143 proto_tree_add_item(tree, hf_dect_nr_dlc_timers, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3144 offset++;
3145
3146 proto_item_set_len(item, offset);
3147 return offset;
3148
3149 case 14: /* Escape */
3150 proto_tree_add_item(tree, hf_dect_nr_escape, tvb, offset, ctx->ie_length, ENC_NA0x00000000);
3151 offset += ctx->ie_length;
3152
3153 proto_item_set_len(item, offset);
3154 return offset;
3155
3156 default:
3157 uc_item = proto_tree_add_item(tree, hf_dect_nr_undecoded, tvb, offset, ctx->ie_length, ENC_NA0x00000000);
3158 expert_add_info(pinfo, uc_item, &ei_dect_nr_undecoded);
3159 offset += ctx->ie_length;
3160
3161 proto_item_set_len(item, offset);
3162 return offset;
3163 }
3164
3165 /* DLC SDU */
3166
3167 length -= offset;
3168 if (length < (ctx->ie_length - offset)) {
3169 data_len = length;
3170 data_incomplete = true1;
3171 } else {
3172 data_len = ctx->ie_length - offset;
3173 }
3174
3175 if (dlc_ie_type != 5 && dlc_ie_type != 6) {
3176 data_item = proto_tree_add_item(tree, hf_dect_nr_hls_bin, tvb, offset, data_len, ENC_NA0x00000000);
3177 }
3178
3179 segm_info = wmem_strbuf_create(pinfo->pool)wmem_strbuf_new(pinfo->pool, "");
3180
3181 if (dlc_ie_type == 2 || dlc_ie_type == 3 || dlc_ie_type == 6) {
3182 fragment_head *frag_msg;
3183
3184 if (si == 0) {
3185 wmem_strbuf_append_printf(segm_info, "SN %u, ", sn);
3186 } else if (si == 1) {
3187 wmem_strbuf_append_printf(segm_info, "SN %u (first segment), ", sn);
3188 } else if (si == 2) {
3189 wmem_strbuf_append_printf(segm_info, "SN %u (last segment at %u), ", sn, segm_offset);
3190 } else if (si == 3) {
3191 wmem_strbuf_append_printf(segm_info, "SN %u (segment at %u), ", sn, segm_offset);
3192 }
3193
3194 /* Reassemble segments */
3195 frag_msg = fragment_add_seq_next(&dect_nr_reassembly_table, tvb, offset, pinfo,
3196 sn, ctx, data_len, (si == 1 || si == 3));
3197 subtvb = process_reassembled_data(tvb, offset, pinfo, "Reassembled DLC",
3198 frag_msg, &dect_nr_segment_items, NULL((void*)0), tree);
3199 } else {
3200 subtvb = tvb_new_subset_length(tvb, offset, data_len);
3201 }
3202
3203 data_info = wmem_strbuf_create(pinfo->pool)wmem_strbuf_new(pinfo->pool, "");
3204 wmem_strbuf_append_printf(data_info, " [ %s%d bytes ]",
3205 wmem_strbuf_finalize(segm_info), ctx->ie_length);
3206
3207 if (subtvb) {
3208 if (dlc_ie_type == 5 || dlc_ie_type == 6) {
3209 while (offset < (int)ctx->ie_length) {
3210 offset = dissect_dlc_extension_header(tvb, offset, pinfo, tree);
3211 }
3212 } else {
3213 dissect_dlc_data(subtvb, pinfo, proto_tree_get_root(tree));
3214 offset += data_len;
3215 }
3216 } else {
3217 offset += data_len;
3218 }
3219
3220 if (data_incomplete) {
3221 wmem_strbuf_append(data_info, " [data incomplete]");
3222 expert_add_info(pinfo, data_item, &ei_dect_nr_pdu_cut_short);
3223 }
3224
3225 col_append_str(pinfo->cinfo, COL_INFO, wmem_strbuf_finalize(data_info));
3226 proto_item_set_len(item, offset);
3227
3228 return offset;
3229}
3230
3231/* Higher layer signalling - flow 1 */
3232static int dissect_higher_layer_sig_flow_1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data)
3233{
3234 return dissect_dlc_service_type(tvb, pinfo, parent_tree, data);
3235}
3236
3237/* Higher layer signalling - flow 2 */
3238static int dissect_higher_layer_sig_flow_2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data)
3239{
3240 return dissect_dlc_service_type(tvb, pinfo, parent_tree, data);
3241}
3242
3243/* User plane data - flow 1*/
3244static int dissect_user_plane_data_flow_1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data)
3245{
3246 return dissect_dlc_service_type(tvb, pinfo, parent_tree, data);
3247}
3248
3249/* User plane data - flow 2 */
3250static int dissect_user_plane_data_flow_2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data)
3251{
3252 return dissect_dlc_service_type(tvb, pinfo, parent_tree, data);
3253}
3254
3255/* User plane data - flow 3 */
3256static int dissect_user_plane_data_flow_3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data)
3257{
3258 return dissect_dlc_service_type(tvb, pinfo, parent_tree, data);
3259}
3260
3261/* User plane data - flow 4 */
3262static int dissect_user_plane_data_flow_4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data)
3263{
3264 return dissect_dlc_service_type(tvb, pinfo, parent_tree, data);
3265}
3266
3267/* 6.4.2.2: Network Beacon message */
3268static int dissect_network_beacon_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U___attribute__((unused)))
3269{
3270 int offset = 0;
3271 bool_Bool tx_pwr_field;
3272 bool_Bool nb_current_field;
3273 uint32_t nb_channels;
3274 uint32_t nb_period;
3275 uint32_t cb_period;
3276 uint32_t cluster_chan;
3277 uint32_t ttn;
3278
3279 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_nb_msg, tvb, offset, -1, ENC_NA0x00000000);
3280 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_nb_msg);
3281
3282 dect_tree_add_reserved_item(tree, hf_dect_nr_nb_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3283 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_nb_tx_pwr_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &tx_pwr_field);
3284 proto_tree_add_item(tree, hf_dect_nr_nb_pwr_const, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3285 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_nb_current_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &nb_current_field);
3286 proto_tree_add_item_ret_uint(tree, hf_dect_nr_nb_channels, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &nb_channels);
3287 offset++;
3288
3289 proto_tree_add_item_ret_uint(tree, hf_dect_nr_nb_nb_period, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &nb_period);
3290 proto_tree_add_item_ret_uint(tree, hf_dect_nr_nb_cb_period, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &cb_period);
3291 offset++;
3292
3293 dect_tree_add_reserved_item(tree, hf_dect_nr_nb_res2, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3294 proto_tree_add_item_ret_uint(tree, hf_dect_nr_nb_next_cl_chan, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &cluster_chan);
3295 offset += 2;
3296
3297 proto_tree_add_item_ret_uint(tree, hf_dect_nr_nb_time_to_next, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000, &ttn);
3298 offset += 4;
3299
3300 if (tx_pwr_field) {
3301 dect_tree_add_reserved_item(tree, hf_dect_nr_nb_res3, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3302 proto_tree_add_item(tree, hf_dect_nr_nb_cl_max_tx_pwr, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3303 offset++;
3304 }
3305
3306 if (nb_current_field) {
3307 dect_tree_add_reserved_item(tree, hf_dect_nr_nb_res4, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3308 proto_tree_add_item(tree, hf_dect_nr_nb_curr_cl_chan, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3309 offset += 2;
3310 }
3311
3312 for (uint32_t i = 0; i < nb_channels; i++) {
3313 dect_tree_add_reserved_item(tree, hf_dect_nr_nb_res5, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3314 proto_tree_add_item(tree, hf_dect_nr_nb_additional_nb_channels, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3315 offset += 2;
3316 }
3317
3318 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s, Cluster: %u (%s), TTN: %u µs)",
3319 val_to_str_const(nb_period, nb_ie_nb_period_vals, "Unknown"), cluster_chan,
3320 val_to_str_const(cb_period, nb_ie_cb_period_vals, "Unknown"), ttn);
3321 proto_item_set_len(item, offset);
3322
3323 return offset;
3324}
3325
3326/* 6.4.2.3: Cluster Beacon message */
3327static int dissect_cluster_beacon_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U___attribute__((unused)))
3328{
3329 int offset = 0;
3330 bool_Bool tx_pwr_field;
3331 bool_Bool fo_field;
3332 bool_Bool next_chan_field;
3333 bool_Bool ttn_field;
3334 uint32_t cb_period;
3335
3336 wmem_strbuf_t *next_chan_info = wmem_strbuf_create(pinfo->pool)wmem_strbuf_new(pinfo->pool, "");
3337
3338 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_cb_msg, tvb, offset, -1, ENC_NA0x00000000);
3339 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_cb_msg);
3340
3341 proto_tree_add_item(tree, hf_dect_nr_cb_sfn, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3342 offset++;
3343
3344 dect_tree_add_reserved_item(tree, hf_dect_nr_cb_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3345 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_cb_tx_pwr_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &tx_pwr_field);
3346 proto_tree_add_item(tree, hf_dect_nr_cb_pwr_const, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3347 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_cb_fo_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &fo_field);
3348 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_cb_next_chan_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &next_chan_field);
3349 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_cb_time_to_next_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &ttn_field);
3350 offset++;
3351
3352 proto_tree_add_item(tree, hf_dect_nr_cb_nb_period, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3353 proto_tree_add_item_ret_uint(tree, hf_dect_nr_cb_cb_period, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &cb_period);
3354 offset++;
3355
3356 proto_tree_add_item(tree, hf_dect_nr_cb_ctt, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3357 proto_tree_add_item(tree, hf_dect_nr_cb_rel_qual, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3358 proto_tree_add_item(tree, hf_dect_nr_cb_min_qual, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3359 offset++;
3360
3361 if (tx_pwr_field) {
3362 dect_tree_add_reserved_item(tree, hf_dect_nr_cb_res2, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3363 proto_tree_add_item(tree, hf_dect_nr_cb_cl_max_tx_pwr, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3364 offset++;
3365 }
3366
3367 if (fo_field) {
3368 proto_tree_add_item(tree, hf_dect_nr_cb_frame_offset, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3369 offset++;
3370 }
3371
3372 if (next_chan_field) {
3373 uint32_t next_chan;
3374
3375 dect_tree_add_reserved_item(tree, hf_dect_nr_cb_res3, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3376 proto_tree_add_item_ret_uint(tree, hf_dect_nr_cb_next_cl_chan, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &next_chan);
3377 wmem_strbuf_append_printf(next_chan_info, ", Next channel: %u", next_chan);
3378 offset += 2;
3379 }
3380
3381 if (ttn_field) {
3382 proto_tree_add_item(tree, hf_dect_nr_cb_time_to_next, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
3383 offset += 4;
3384 }
3385
3386 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s%s)",
3387 val_to_str_const(cb_period, nb_ie_cb_period_vals, "Unknown"),
3388 wmem_strbuf_finalize(next_chan_info));
3389 proto_item_set_len(item, offset);
3390
3391 return offset;
3392}
3393
3394/* 6.4.2.4: Association Request message */
3395static int dissect_association_request_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U___attribute__((unused)))
3396{
3397 int offset = 0;
3398 uint32_t setup_cause;
3399 uint32_t num_flows;
3400 bool_Bool ft_mode_field;
3401 bool_Bool current_field;
3402
3403 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_a_req_msg, tvb, offset, -1, ENC_NA0x00000000);
3404 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_a_req_msg);
3405
3406 proto_tree_add_item_ret_uint(tree, hf_dect_nr_a_req_setup_cause, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &setup_cause);
3407 proto_tree_add_item_ret_uint(tree, hf_dect_nr_a_req_num_flows, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_flows);
3408 proto_tree_add_item(tree, hf_dect_nr_a_req_pwr_const, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3409 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_a_req_ft_mode_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &ft_mode_field);
3410 offset++;
3411
3412 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_a_req_current, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &current_field);
3413 dect_tree_add_reserved_item(tree, hf_dect_nr_a_req_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3414 offset++;
3415
3416 proto_tree_add_item(tree, hf_dect_nr_a_req_harq_proc_tx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3417 proto_tree_add_item(tree, hf_dect_nr_a_req_max_harq_retx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3418 offset++;
3419
3420 proto_tree_add_item(tree, hf_dect_nr_a_req_harq_proc_rx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3421 proto_tree_add_item(tree, hf_dect_nr_a_req_max_harq_rerx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3422 offset++;
3423
3424 /* Value 7 is 'Reserved' */
3425 if (num_flows < 7) {
3426 for (uint32_t i = 0; i < num_flows; i++) {
3427 dect_tree_add_reserved_item(tree, hf_dect_nr_a_req_res2, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3428 proto_tree_add_item(tree, hf_dect_nr_a_req_flow_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3429 offset++;
3430 }
3431 }
3432
3433 if (ft_mode_field) {
3434 /* Table 6.4.2.4-1: "The RD operates also in FT mode. RD shall include Network Beacon period,
3435 * Cluster beacon Period, Next Cluster channel and Time to next fields"
3436 */
3437 proto_tree_add_item(tree, hf_dect_nr_a_req_nb_period, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3438 proto_tree_add_item(tree, hf_dect_nr_a_req_cb_period, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3439 offset++;
3440
3441 dect_tree_add_reserved_item(tree, hf_dect_nr_a_req_res3, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3442 proto_tree_add_item(tree, hf_dect_nr_a_req_next_cl_chan, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3443 offset += 2;
3444
3445 proto_tree_add_item(tree, hf_dect_nr_a_req_time_to_next, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
3446 offset += 4;
3447 }
3448
3449 if (current_field) {
3450 dect_tree_add_reserved_item(tree, hf_dect_nr_a_req_res4, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3451 proto_tree_add_item(tree, hf_dect_nr_a_req_curr_cl_chan, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3452 offset += 2;
3453 }
3454
3455 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", val_to_str_const(setup_cause, ar_setup_cause_vals, "Unknown"));
3456 proto_item_set_len(item, offset);
3457
3458 return offset;
3459}
3460
3461/* 6.4.2.5: Association Response message */
3462static int dissect_association_response_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U___attribute__((unused)))
3463{
3464 int offset = 0;
3465 bool_Bool ack_field;
3466
3467 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_a_rsp_msg, tvb, offset, -1, ENC_NA0x00000000);
3468 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_a_rsp_msg);
3469
3470 /* The first octet contains the ACK flag */
3471 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_a_rsp_ack_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &ack_field);
3472
3473 if (ack_field) { /* Association accepted */
3474 bool_Bool harq_mod_field;
3475 uint32_t num_flows;
3476 bool_Bool group_field;
3477
3478 dect_tree_add_reserved_item(tree, hf_dect_nr_a_rsp_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3479 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_a_rsp_harq_mod_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &harq_mod_field);
3480 proto_tree_add_item_ret_uint(tree, hf_dect_nr_a_rsp_num_flows, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_flows);
3481 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_a_rsp_group_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &group_field);
3482 dect_tree_add_reserved_item(tree, hf_dect_nr_a_rsp_res2, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3483 offset++;
3484
3485 if (harq_mod_field) {
3486 /* HARQ configuration was not accepted as requested -> HARQ configuration is present */
3487 proto_tree_add_item(tree, hf_dect_nr_a_rsp_harq_proc_rx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3488 proto_tree_add_item(tree, hf_dect_nr_a_rsp_max_harq_rerx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3489 offset++;
3490
3491 proto_tree_add_item(tree, hf_dect_nr_a_rsp_harq_proc_tx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3492 proto_tree_add_item(tree, hf_dect_nr_a_rsp_max_harq_retx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3493 offset++;
3494 }
3495
3496 /* Value 7 indicates 'All flows accepted as configured in Association Request' */
3497 if (num_flows < 7) {
3498 for (uint32_t i = 0; i < num_flows; i++) {
3499 dect_tree_add_reserved_item(tree, hf_dect_nr_a_rsp_res3, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3500 proto_tree_add_item(tree, hf_dect_nr_a_rsp_flow_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3501 offset++;
3502 }
3503 }
3504
3505 if (group_field) {
3506 /* Group ID and Resource Tag are included */
3507 dect_tree_add_reserved_item(tree, hf_dect_nr_a_rsp_res4, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3508 proto_tree_add_item(tree, hf_dect_nr_a_rsp_group_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3509 offset++;
3510
3511 dect_tree_add_reserved_item(tree, hf_dect_nr_a_rsp_res5, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3512 proto_tree_add_item(tree, hf_dect_nr_a_rsp_res_tag, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3513 offset++;
3514 }
3515
3516 col_append_str(pinfo->cinfo, COL_INFO, " (Accepted)");
3517 } else { /* Association Rejected */
3518 uint32_t rej_cause;
3519
3520 dect_tree_add_reserved_item(tree, hf_dect_nr_a_rsp_res6, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3521 offset++;
3522
3523 proto_tree_add_item_ret_uint(tree, hf_dect_nr_a_rsp_rej_cause, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rej_cause);
3524 proto_tree_add_item(tree, hf_dect_nr_a_rsp_rej_timer, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3525 offset++;
3526 col_append_fstr(pinfo->cinfo, COL_INFO, " (Rejected cause: %s)", val_to_str_const(rej_cause, assoc_rej_cause_vals, "Unknown"));
3527 }
3528
3529 proto_item_set_len(item, offset);
3530
3531 return offset;
3532}
3533
3534/* 6.4.2.6: Association Release message */
3535static int dissect_association_release_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U___attribute__((unused)))
3536{
3537 int offset = 0;
3538 uint32_t rel_cause;
3539
3540 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_a_rel_msg, tvb, offset, -1, ENC_NA0x00000000);
3541 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_a_rel_msg);
3542
3543 proto_tree_add_item_ret_uint(tree, hf_dect_nr_a_rel_cause, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rel_cause);
3544 dect_tree_add_reserved_item(tree, hf_dect_nr_a_rel_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3545 offset++;
3546
3547 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", val_to_str_const(rel_cause, assoc_rel_cause_vals, "Unknown"));
3548 proto_item_set_len(item, offset);
3549
3550 return offset;
3551}
3552
3553/* 6.4.2.7: Reconfiguration Request message */
3554static int dissect_reconfiguration_request_msg(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *parent_tree, void *data _U___attribute__((unused)))
3555{
3556 int offset = 0;
3557 bool_Bool tx_harq_field;
3558 bool_Bool rx_harq_field;
3559 uint32_t num_flows;
3560
3561 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_rc_req_msg, tvb, offset, -1, ENC_NA0x00000000);
3562 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_rc_req_msg);
3563
3564 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_rc_req_tx_harq_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &tx_harq_field);
3565 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_rc_req_rx_harq_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rx_harq_field);
3566 proto_tree_add_item(tree, hf_dect_nr_rc_req_rd_capability, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3567 proto_tree_add_item_ret_uint(tree, hf_dect_nr_rc_req_num_flows, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_flows);
3568 proto_tree_add_item(tree, hf_dect_nr_rc_req_radio_resources, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3569 offset++;
3570
3571 if (tx_harq_field) {
3572 proto_tree_add_item(tree, hf_dect_nr_rc_req_harq_proc_tx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3573 proto_tree_add_item(tree, hf_dect_nr_rc_req_max_harq_retx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3574 offset++;
3575 }
3576
3577 if (rx_harq_field) {
3578 proto_tree_add_item(tree, hf_dect_nr_rc_req_harq_proc_rx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3579 proto_tree_add_item(tree, hf_dect_nr_rc_req_max_harq_rerx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3580 offset++;
3581 }
3582
3583 /* Value 7 is 'Reserved' */
3584 if (num_flows < 7) {
3585 for (uint32_t i = 0; i < num_flows; i++) {
3586 proto_tree_add_item(tree, hf_dect_nr_rc_req_setup_release, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3587 proto_tree_add_item(tree, hf_dect_nr_rc_req_res, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3588 proto_tree_add_item(tree, hf_dect_nr_rc_req_flow_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3589 offset++;
3590 }
3591 }
3592
3593 proto_item_set_len(item, offset);
3594
3595 return offset;
3596}
3597
3598/* 6.4.2.8: Reconfiguration Response message */
3599static int dissect_reconfiguration_response_msg(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *parent_tree, void *data _U___attribute__((unused)))
3600{
3601 int offset = 0;
3602 bool_Bool tx_harq_field;
3603 bool_Bool rx_harq_field;
3604 uint32_t num_flows;
3605
3606 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_rc_rsp_msg, tvb, offset, -1, ENC_NA0x00000000);
3607 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_rc_rsp_msg);
3608
3609 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_rc_rsp_tx_harq_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &tx_harq_field);
3610 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_rc_rsp_rx_harq_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rx_harq_field);
3611 proto_tree_add_item(tree, hf_dect_nr_rc_rsp_rd_capability, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3612 proto_tree_add_item_ret_uint(tree, hf_dect_nr_rc_rsp_num_flows, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_flows);
3613 proto_tree_add_item(tree, hf_dect_nr_rc_rsp_radio_resources, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3614 offset++;
3615
3616 if (tx_harq_field) {
3617 proto_tree_add_item(tree, hf_dect_nr_rc_rsp_harq_proc_tx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3618 proto_tree_add_item(tree, hf_dect_nr_rc_rsp_max_harq_retx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3619 offset++;
3620 }
3621
3622 if (rx_harq_field) {
3623 proto_tree_add_item(tree, hf_dect_nr_rc_rsp_harq_proc_rx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3624 proto_tree_add_item(tree, hf_dect_nr_rc_rsp_max_harq_rerx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3625 offset++;
3626 }
3627
3628 /* Value 7 indicates 'All flows accepted as configured in the Reconfiguration Request' */
3629 if (num_flows < 7) {
3630 for (uint32_t i = 0; i < num_flows; i++) {
3631 proto_tree_add_item(tree, hf_dect_nr_rc_rsp_setup_release, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3632 proto_tree_add_item(tree, hf_dect_nr_rc_rsp_res, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3633 proto_tree_add_item(tree, hf_dect_nr_rc_rsp_flow_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3634 offset++;
3635 }
3636 }
3637
3638 proto_item_set_len(item, offset);
3639
3640 return offset;
3641}
3642
3643/* 6.4.2.9 Additional MAC message */
3644static int dissect_additional_mac_msg(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *parent_tree, void *data)
3645{
3646 dect_nr_context_t *ctx = (dect_nr_context_t *)data;
3647 int length = ((ctx && ctx->ie_length_present) ? ctx->ie_length : tvb_reported_length(tvb));
3648
3649 if (length > 0) {
3650 proto_tree_add_item(parent_tree, hf_dect_nr_am_msg, tvb, 0, length, ENC_NA0x00000000);
3651 }
3652
3653 return length;
3654}
3655
3656/* 6.4.2.10 Joining Beacon message */
3657static int dissect_joining_beacon_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U___attribute__((unused)))
3658{
3659 int offset = 0;
3660 uint32_t nb_channels;
3661
3662 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_jb_msg, tvb, offset, -1, ENC_NA0x00000000);
3663 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_jb_msg);
3664
3665 proto_tree_add_item_ret_uint(tree, hf_dect_nr_jb_nb_channels, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &nb_channels);
3666 proto_tree_add_item(tree, hf_dect_nr_jb_nb_period, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3667 dect_tree_add_reserved_item(tree, hf_dect_nr_jb_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3668 offset++;
3669
3670 for (uint32_t i = 0; i < nb_channels; i++) {
3671 dect_tree_add_reserved_item(tree, hf_dect_nr_jb_res2, tvb, offset, 2, pinfo, ENC_BIG_ENDIAN0x00000000);
3672 proto_tree_add_item(tree, hf_dect_nr_jb_nc, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3673 offset += 2;
3674 }
3675
3676 proto_item_set_len(item, offset);
3677
3678 return offset;
3679}
3680
3681/* 6.4.3.1: MAC Security Info IE */
3682static int dissect_security_info_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data)
3683{
3684 int offset = 0;
3685 uint32_t iv_type;
3686
3687 dect_nr_context_t *ctx = (dect_nr_context_t *)data;
3688
3689 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_msi_ie, tvb, offset, -1, ENC_NA0x00000000);
3690 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_msi_ie);
3691
3692 proto_tree_add_item_ret_uint(tree, hf_dect_nr_msi_version, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &ctx->sec_info.version);
3693 proto_tree_add_item_ret_uint(tree, hf_dect_nr_msi_key, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &ctx->sec_info.key);
3694 proto_tree_add_item_ret_uint(tree, hf_dect_nr_msi_ivt, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &iv_type);
3695 offset++;
3696
3697 proto_tree_add_item_ret_uint(tree, hf_dect_nr_msi_hpc, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000, &ctx->sec_info.hpc);
3698 offset += 4;
3699
3700 ctx->sec_info_present = true1;
3701 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited) && ctx->sec_info.version == 0 && iv_type == 1) {
3702 insert_sec_info(pinfo, ctx, &ctx->sec_info);
3703 }
3704
3705 proto_item_set_len(item, offset);
3706
3707 return offset;
3708}
3709
3710/* 6.4.3.2: Route Info IE */
3711static int dissect_route_info_ie(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *parent_tree, void *data _U___attribute__((unused)))
3712{
3713 int offset = 0;
3714
3715 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_ri_ie, tvb, offset, -1, ENC_NA0x00000000);
3716 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_ri_ie);
3717
3718 proto_tree_add_item(tree, hf_dect_nr_ri_sink_address, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
3719 offset += 4;
3720
3721 proto_tree_add_item(tree, hf_dect_nr_ri_route_cost, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3722 offset++;
3723
3724 proto_tree_add_item(tree, hf_dect_nr_ri_application_sn, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3725 offset++;
3726
3727 proto_item_set_len(item, offset);
3728
3729 return offset;
3730}
3731
3732/* 6.4.3.3: Resource Allocation IE */
3733static int dissect_resource_allocation_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data)
3734{
3735 int offset = 0;
3736 uint32_t allocation_type;
3737 bool_Bool add_field;
3738 bool_Bool id_field;
3739 uint32_t repeat;
3740 bool_Bool sfn_field;
3741 bool_Bool channel_field;
3742 bool_Bool rlf_field;
3743 bool_Bool use_9_bits = false0;
3744
3745 dect_nr_context_t *ctx = (dect_nr_context_t *)data;
3746
3747 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_ra_ie, tvb, offset, -1, ENC_NA0x00000000);
3748 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_ra_ie);
3749
3750 proto_tree_add_item_ret_uint(tree, hf_dect_nr_ra_alloc_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &allocation_type);
3751
3752 if (allocation_type == 0) {
3753 /* The receiving RD shall release all previously allocated scheduled resources.
3754 * No other fields are present in this IE.
3755 */
3756 dect_tree_add_reserved_item(tree, hf_dect_nr_ra_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3757 offset++;
3758
3759 proto_item_set_len(item, 1);
3760
3761 return offset;
3762 }
3763
3764 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_ra_add_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &add_field);
3765 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_ra_id_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &id_field);
3766 proto_tree_add_item_ret_uint(tree, hf_dect_nr_ra_repeat, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &repeat);
3767 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_ra_sfn_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &sfn_field);
3768 offset++;
3769
3770 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_ra_channel_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &channel_field);
3771 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_ra_rlf_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rlf_field);
3772 dect_tree_add_reserved_item(tree, hf_dect_nr_ra_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3773 offset++;
3774
3775 /* 8 bits or 9 bits. The start subslot indicates the first subslot where the resource allocation
3776 * is valid in the indicated frame. The indicated frame depends on the SFN field.
3777 * The 8 bits version is used when µ ≤ 4 and the 9 bits version is used when µ > 4.
3778 */
3779
3780 if (ctx && ctx->ie_length_present) {
3781 /* Determine 8 bits or 9 bits based on expected length */
3782 uint32_t len = 2 + (allocation_type == 3 ? 4 : 2) + (id_field ? 2 : 0) + (repeat ? 2 : 0) +
3783 (sfn_field ? 1 : 0) + (channel_field ? 2 : 0) + (rlf_field ? 1 : 0);
3784 if (ctx->ie_length == len + (allocation_type == 3 ? 2 : 1)) {
3785 /* 9 bits version */
3786 use_9_bits = true1;
3787 }
3788 }
3789
3790 if (allocation_type == 3) {
3791 if (use_9_bits) {
3792 dect_tree_add_reserved_item(tree, hf_dect_nr_ra_res2, tvb, offset, 2, pinfo, ENC_BIG_ENDIAN0x00000000);
3793 proto_tree_add_item(tree, hf_dect_nr_ra_start_ss_dl_9, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3794 offset += 2;
3795 } else {
3796 proto_tree_add_item(tree, hf_dect_nr_ra_start_ss_dl_8, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3797 offset++;
3798 }
3799
3800 proto_tree_add_item(tree, hf_dect_nr_ra_len_type_dl, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3801 proto_tree_add_item(tree, hf_dect_nr_ra_len_dl, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3802 offset++;
3803
3804 if (use_9_bits) {
3805 dect_tree_add_reserved_item(tree, hf_dect_nr_ra_res2, tvb, offset, 2, pinfo, ENC_BIG_ENDIAN0x00000000);
3806 proto_tree_add_item(tree, hf_dect_nr_ra_start_ss_ul_9, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3807 offset += 2;
3808 } else {
3809 proto_tree_add_item(tree, hf_dect_nr_ra_start_ss_ul_8, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3810 offset++;
3811 }
3812
3813 proto_tree_add_item(tree, hf_dect_nr_ra_len_type_ul, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3814 proto_tree_add_item(tree, hf_dect_nr_ra_len_ul, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3815 offset++;
3816
3817 } else {
3818 if (use_9_bits) {
3819 if (allocation_type == 1) {
3820 dect_tree_add_reserved_item(tree, hf_dect_nr_ra_res2, tvb, offset, 2, pinfo, ENC_BIG_ENDIAN0x00000000);
3821 proto_tree_add_item(tree, hf_dect_nr_ra_start_ss_dl_9, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3822 } else {
3823 dect_tree_add_reserved_item(tree, hf_dect_nr_ra_res2, tvb, offset, 2, pinfo, ENC_BIG_ENDIAN0x00000000);
3824 proto_tree_add_item(tree, hf_dect_nr_ra_start_ss_ul_9, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3825 }
3826 offset += 2;
3827 } else {
3828 if (allocation_type == 1) {
3829 proto_tree_add_item(tree, hf_dect_nr_ra_start_ss_dl_8, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3830 } else {
3831 proto_tree_add_item(tree, hf_dect_nr_ra_start_ss_ul_8, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3832 }
3833 offset++;
3834 }
3835
3836 if (allocation_type == 1) {
3837 proto_tree_add_item(tree, hf_dect_nr_ra_len_type_dl, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3838 proto_tree_add_item(tree, hf_dect_nr_ra_len_dl, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3839 } else {
3840 proto_tree_add_item(tree, hf_dect_nr_ra_len_type_ul, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3841 proto_tree_add_item(tree, hf_dect_nr_ra_len_ul, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3842 }
3843 offset++;
3844 }
3845
3846 if (id_field) {
3847 proto_tree_add_item(tree, hf_dect_nr_ra_short_rd_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3848 offset += 2;
3849 }
3850
3851 if (repeat) {
3852 proto_tree_add_item(tree, hf_dect_nr_ra_repetition, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3853 offset++;
3854 proto_tree_add_item(tree, hf_dect_nr_ra_validity, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3855 offset++;
3856 }
3857
3858 if (sfn_field) {
3859 proto_tree_add_item(tree, hf_dect_nr_ra_sfn_value, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3860 offset++;
3861 }
3862
3863 if (channel_field) {
3864 dect_tree_add_reserved_item(tree, hf_dect_nr_ra_res3, tvb, offset, 2, pinfo, ENC_BIG_ENDIAN0x00000000);
3865 proto_tree_add_item(tree, hf_dect_nr_ra_channel, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3866 offset += 2;
3867 }
3868
3869 if (rlf_field) {
3870 dect_tree_add_reserved_item(tree, hf_dect_nr_ra_res4, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3871 proto_tree_add_item(tree, hf_dect_nr_ra_rlf, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3872 offset++;
3873 }
3874
3875 proto_item_set_len(item, offset);
3876
3877 return offset;
3878}
3879
3880/* 6.4.3.4: Random Access Resource IE */
3881static int dissect_random_access_resource_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data)
3882{
3883 int offset = 0;
3884 uint32_t rar_repeat;
3885 bool_Bool rar_sfn_field;
3886 bool_Bool rar_channel_field;
3887 bool_Bool rar_chan_2_field;
3888 bool_Bool use_9_bits = false0;
3889 uint32_t resp_win;
3890
3891 dect_nr_context_t *ctx = (dect_nr_context_t *)data;
3892
3893 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_rar_ie, tvb, offset, -1, ENC_NA0x00000000);
3894 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_rar_ie);
3895 proto_item *resp_win_item;
3896
3897 dect_tree_add_reserved_item(tree, hf_dect_nr_rar_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3898 proto_tree_add_item_ret_uint(tree, hf_dect_nr_rar_repeat, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rar_repeat);
3899 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_rar_sfn_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rar_sfn_field);
3900 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_rar_channel_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rar_channel_field);
3901 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_rar_chan_2_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rar_chan_2_field);
3902 offset++;
3903
3904 /* 8 bits or 9 bits. The start subslot indicates the first subslot where the RACH
3905 * resource allocation is valid in the frame.
3906 * The 8 bits version is used when µ ≤ 4 and the 9 bits version is used when µ > 4.
3907 */
3908
3909 if (ctx && ctx->ie_length_present) {
3910 /* Determine 8 bits or 9 bits based on expected length */
3911 uint32_t len = 4 + (rar_repeat ? 2 : 0) + (rar_sfn_field ? 1 : 0) +
3912 (rar_channel_field ? 2 : 0) + (rar_chan_2_field ? 2 : 0);
3913 if (ctx->ie_length == len + 2) {
3914 /* 9 bits version */
3915 use_9_bits = true1;
3916 }
3917 }
3918
3919 if (use_9_bits) {
3920 dect_tree_add_reserved_item(tree, hf_dect_nr_rar_res2, tvb, offset, 2, pinfo, ENC_BIG_ENDIAN0x00000000);
3921 proto_tree_add_item(tree, hf_dect_nr_rar_start_ss_9, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3922 offset += 2;
3923 } else {
3924 proto_tree_add_item(tree, hf_dect_nr_rar_start_ss_8, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3925 offset++;
3926 }
3927
3928 proto_tree_add_item(tree, hf_dect_nr_rar_len_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3929 proto_tree_add_item(tree, hf_dect_nr_rar_len, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3930 offset++;
3931
3932 proto_tree_add_item(tree, hf_dect_nr_rar_max_len_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3933 proto_tree_add_item(tree, hf_dect_nr_rar_max_rach_len, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3934 proto_tree_add_item(tree, hf_dect_nr_rar_cw_min_sig, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3935 offset++;
3936
3937 proto_tree_add_item(tree, hf_dect_nr_rar_dect_delay, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3938 resp_win_item = proto_tree_add_item_ret_uint(tree, hf_dect_nr_rar_resp_win, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &resp_win);
3939 proto_item_append_text(resp_win_item, " subslot%s", plurality(resp_win + 1, "", "s")((resp_win + 1) == 1 ? ("") : ("s")));
3940 proto_tree_add_item(tree, hf_dect_nr_rar_cw_max_sig, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3941 offset++;
3942
3943 if (rar_repeat) {
3944 proto_tree_add_item(tree, hf_dect_nr_rar_repetition, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3945 offset++;
3946 proto_tree_add_item(tree, hf_dect_nr_rar_validity, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3947 offset++;
3948 }
3949
3950 if (rar_sfn_field) {
3951 proto_tree_add_item(tree, hf_dect_nr_rar_sfn_value, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3952 offset++;
3953 }
3954
3955 if (rar_channel_field) {
3956 dect_tree_add_reserved_item(tree, hf_dect_nr_rar_res3, tvb, offset, 2, pinfo, ENC_BIG_ENDIAN0x00000000);
3957 proto_tree_add_item(tree, hf_dect_nr_rar_channel, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3958 offset += 2;
3959 }
3960
3961 if (rar_chan_2_field) {
3962 dect_tree_add_reserved_item(tree, hf_dect_nr_rar_res3, tvb, offset, 2, pinfo, ENC_BIG_ENDIAN0x00000000);
3963 proto_tree_add_item(tree, hf_dect_nr_rar_channel_2, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3964 offset += 2;
3965 }
3966
3967 proto_item_set_len(item, offset);
3968
3969 return offset;
3970}
3971
3972/* 6.4.3.5: RD Capability IE */
3973static int dissect_rd_capability_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U___attribute__((unused)))
3974{
3975 int offset = 0;
3976 uint32_t num_phy_cap;
3977
3978 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_rdc_ie, tvb, offset, -1, ENC_NA0x00000000);
3979 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_rdc_ie);
3980 proto_tree *phy_tree = tree;
3981
3982 proto_tree_add_item_ret_uint(tree, hf_dect_nr_rdc_num_phy_cap, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_phy_cap);
3983 proto_tree_add_item(tree, hf_dect_nr_rdc_release, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3984 offset++;
3985
3986 dect_tree_add_reserved_item(tree, hf_dect_nr_rdc_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3987 proto_tree_add_item(tree, hf_dect_nr_rdc_group_ass, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3988 proto_tree_add_item(tree, hf_dect_nr_rdc_paging, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3989 proto_tree_add_item(tree, hf_dect_nr_rdc_op_modes, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3990 proto_tree_add_item(tree, hf_dect_nr_rdc_mesh, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3991 proto_tree_add_item(tree, hf_dect_nr_rdc_sched, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3992 offset++;
3993
3994 proto_tree_add_item(tree, hf_dect_nr_rdc_mac_security, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3995 proto_tree_add_item(tree, hf_dect_nr_rdc_dlc_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3996 dect_tree_add_reserved_item(tree, hf_dect_nr_rdc_res2, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
3997 offset++;
3998
3999 for (uint32_t i = 0; i <= num_phy_cap; i++) {
4000 if (i > 0) {
4001 /* Put subsequent PHY layer capabilities in a subtree */
4002 proto_item *phy_item = proto_tree_add_item(tree, hf_dect_nr_rdc_phy_cap, tvb, offset, 5, ENC_NA0x00000000);
4003 proto_item_append_text(phy_item, " %u", i);
4004 phy_tree = proto_item_add_subtree(phy_item, ett_dect_nr_rdc_phy_cap);
4005
4006 /* Subsequent PHY layer capabilities begin with RD class µ and β */
4007 proto_tree_add_item(phy_tree, hf_dect_nr_rdc_rd_class_mu, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4008 proto_tree_add_item(phy_tree, hf_dect_nr_rdc_rd_class_b, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4009 dect_tree_add_reserved_item(phy_tree, hf_dect_nr_rdc_res6, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
4010 offset++;
4011 }
4012
4013 dect_tree_add_reserved_item(phy_tree, hf_dect_nr_rdc_res3, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
4014 proto_tree_add_item(phy_tree, hf_dect_nr_rdc_pwr_class, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4015 proto_tree_add_item(phy_tree, hf_dect_nr_rdc_max_nss_rx, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4016 proto_tree_add_item(phy_tree, hf_dect_nr_rdc_rx_for_tx_div, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4017 offset++;
4018
4019 proto_tree_add_item(phy_tree, hf_dect_nr_rdc_rx_gain, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4020 proto_tree_add_item(phy_tree, hf_dect_nr_rdc_max_mcs, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4021 offset++;
4022
4023 proto_tree_add_item(phy_tree, hf_dect_nr_rdc_soft_buf_size, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4024 proto_tree_add_item(phy_tree, hf_dect_nr_rdc_num_harq_proc, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4025 dect_tree_add_reserved_item(phy_tree, hf_dect_nr_rdc_res4, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
4026 offset++;
4027
4028 proto_tree_add_item(phy_tree, hf_dect_nr_rdc_harq_fb_delay, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4029 if (i == 0) {
4030 proto_tree_add_item(phy_tree, hf_dect_nr_rdc_d_delay, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4031 proto_tree_add_item(phy_tree, hf_dect_nr_rdc_half_dup, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4032 dect_tree_add_reserved_item(phy_tree, hf_dect_nr_rdc_res5, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
4033 } else {
4034 dect_tree_add_reserved_item(phy_tree, hf_dect_nr_rdc_res7, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
4035 }
4036 offset++;
4037 }
4038
4039 col_append_fstr(pinfo->cinfo, COL_INFO, " (Num PHY: %u)", num_phy_cap);
4040 proto_item_set_len(item, offset);
4041
4042 return offset;
4043}
4044
4045/* 6.4.3.6: Neighbouring IE */
4046static int dissect_neighbouring_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U___attribute__((unused)))
4047{
4048 int offset = 0;
4049 bool_Bool id_field;
4050 bool_Bool mu_field;
4051 bool_Bool snr_field;
4052 bool_Bool rssi2_field;
4053 bool_Bool next_channel_field;
4054 bool_Bool time_to_next_field;
4055
4056 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_n_ie, tvb, offset, -1, ENC_NA0x00000000);
4057 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_n_ie);
4058
4059 dect_tree_add_reserved_item(tree, hf_dect_nr_n_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
4060 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_n_id_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &id_field);
4061 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_n_mu_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &mu_field);
4062 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_n_snr_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &snr_field);
4063 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_n_rssi2_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rssi2_field);
4064 proto_tree_add_item(tree, hf_dect_nr_n_pwr_const, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4065 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_n_next_channel_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &next_channel_field);
4066 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_n_ttn_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &time_to_next_field);
4067 offset++;
4068
4069 proto_tree_add_item(tree, hf_dect_nr_n_nb_period, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4070 proto_tree_add_item(tree, hf_dect_nr_n_cb_period, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4071 offset++;
4072
4073 if (id_field) {
4074 proto_tree_add_item(tree, hf_dect_nr_n_long_rd_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
4075 offset += 4;
4076 }
4077
4078 if (next_channel_field) {
4079 dect_tree_add_reserved_item(tree, hf_dect_nr_n_res2, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
4080 proto_tree_add_item(tree, hf_dect_nr_n_next_cl_channel, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4081 offset += 2;
4082 }
4083
4084 if (time_to_next_field) {
4085 proto_tree_add_item(tree, hf_dect_nr_n_time_to_next, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
4086 offset += 4;
4087 }
4088
4089 if (rssi2_field) {
4090 proto_tree_add_item(tree, hf_dect_nr_n_rssi2, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4091 offset++;
4092 }
4093
4094 if (snr_field) {
4095 proto_tree_add_item(tree, hf_dect_nr_n_snr, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4096 offset++;
4097 }
4098
4099 if (mu_field) {
4100 proto_tree_add_item(tree, hf_dect_nr_n_rd_class_u, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4101 proto_tree_add_item(tree, hf_dect_nr_n_rd_class_b, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4102 dect_tree_add_reserved_item(tree, hf_dect_nr_n_res3, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
4103 offset++;
4104 }
4105
4106 proto_item_set_len(item, offset);
4107
4108 return offset;
4109}
4110
4111/* 6.4.3.7: Broadcast Indication IE */
4112static int dissect_broadcast_indication_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U___attribute__((unused)))
4113{
4114 int offset = 0;
4115 uint32_t ind_type;
4116 uint32_t idtype;
4117 uint32_t feedback = 0;
4118 uint32_t rd_id;
4119 char *bi_target;
4120
4121 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_bi_ie, tvb, offset, -1, ENC_NA0x00000000);
4122 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_bi_ie);
4123
4124 proto_tree_add_item_ret_uint(tree, hf_dect_nr_bi_ind_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &ind_type);
4125 proto_tree_add_item_ret_uint(tree, hf_dect_nr_bi_idtype, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &idtype);
4126
4127 if (ind_type == 1) {
4128 /* Table 6.4.3.7-1: 'ACK/NACK' and 'Feedback' fields are present when the
4129 * indication Type is 'Random access response' (1)
4130 */
4131 proto_tree_add_item(tree, hf_dect_nr_bi_ack, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4132 proto_tree_add_item_ret_uint(tree, hf_dect_nr_bi_fb, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &feedback);
4133 } else {
4134 dect_tree_add_reserved_item(tree, hf_dect_nr_bi_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
4135 }
4136 proto_tree_add_item(tree, hf_dect_nr_bi_res_alloc, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4137 offset++;
4138
4139 /* Short or Long RD ID follows as defined by the IDType field */
4140 if (idtype == 0) {
4141 proto_tree_add_item_ret_uint(tree, hf_dect_nr_bi_short_rd_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &rd_id);
4142 bi_target = wmem_strdup_printf(pinfo->pool, "0x%04x", rd_id);
4143 offset += 2;
4144 } else {
4145 proto_tree_add_item_ret_uint(tree, hf_dect_nr_bi_long_rd_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000, &rd_id);
4146 bi_target = wmem_strdup_printf(pinfo->pool, "0x%08x", rd_id);
4147 offset += 4;
4148 }
4149
4150 switch (feedback) {
4151 case 1: /* MCS */
4152 dect_tree_add_reserved_item(tree, hf_dect_nr_bi_mcs_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
4153 proto_tree_add_item(tree, hf_dect_nr_bi_mcs_channel_quality, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4154 offset++;
4155 break;
4156
4157 case 2: /* MIMO 2 antenna */
4158 dect_tree_add_reserved_item(tree, hf_dect_nr_bi_mimo2_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
4159 proto_tree_add_item(tree, hf_dect_nr_bi_mimo2_num_layers, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4160 proto_tree_add_item(tree, hf_dect_nr_bi_mimo2_cb_index, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4161 offset++;
4162 break;
4163
4164 case 3: /* MIMO 4 antenna */
4165 proto_tree_add_item(tree, hf_dect_nr_bi_mimo4_num_layers, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4166 proto_tree_add_item(tree, hf_dect_nr_bi_mimo4_cb_index, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4167 offset++;
4168 break;
4169 }
4170
4171 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s to %s)", val_to_str_const(ind_type, bi_ind_type_vals, "Unknown"), bi_target);
4172 proto_item_set_len(item, offset);
4173
4174 return offset;
4175}
4176
4177/* 6.4.3.8: Padding IE */
4178static int dissect_padding_ie(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *parent_tree, void *data)
4179{
4180 dect_nr_context_t *ctx = (dect_nr_context_t *)data;
4181 int length = ((ctx && ctx->ie_length_present) ? ctx->ie_length : tvb_reported_length(tvb));
4182
4183 if (length > 0) {
4184 proto_tree_add_item(parent_tree, hf_dect_nr_pd_bytes, tvb, 0, length, ENC_NA0x00000000);
4185 }
4186
4187 return length;
4188}
4189
4190/* 6.4.3.9: Group Assignment IE */
4191static int dissect_group_assignment_ie(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *parent_tree, void *data)
4192{
4193 int offset = 0;
4194 bool_Bool single_field;
4195 int num_resource_tags;
4196
4197 dect_nr_context_t *ctx = (dect_nr_context_t *)data;
4198
4199 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_ga_ie, tvb, offset, -1, ENC_NA0x00000000);
4200 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_ga_ie);
4201
4202 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_ga_single_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &single_field);
4203 proto_tree_add_item(tree, hf_dect_nr_ga_group_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4204 offset++;
4205
4206 if (ctx && ctx->ie_length_present) {
4207 /* Determine number of Resource Tags based on expected length */
4208 num_resource_tags = ctx->ie_length - offset;
4209 } else {
4210 num_resource_tags = (single_field ? 1 : 2);
4211 }
4212
4213 for (int i = 0; i < num_resource_tags; i++) {
4214 proto_tree_add_item(tree, hf_dect_nr_ga_direct, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4215 proto_tree_add_item(tree, hf_dect_nr_ga_resource_tag, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4216 offset++;
4217 }
4218
4219 proto_item_set_len(item, offset);
4220
4221 return offset;
4222}
4223
4224/* 6.4.3.10: Load Info IE */
4225static int dissect_load_info_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U___attribute__((unused)))
4226{
4227 int offset = 0;
4228 bool_Bool max_assoc_field;
4229 bool_Bool rd_pt_load_field;
4230 bool_Bool rach_load_field;
4231 bool_Bool channel_load_field;
4232
4233 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_li_ie, tvb, offset, -1, ENC_NA0x00000000);
4234 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_li_ie);
4235
4236 dect_tree_add_reserved_item(tree, hf_dect_nr_li_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
4237 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_li_max_assoc_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &max_assoc_field);
4238 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_li_rd_pt_load_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rd_pt_load_field);
4239 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_li_rach_load_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rach_load_field);
4240 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_li_channel_load_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &channel_load_field);
4241 offset++;
4242
4243 proto_tree_add_item(tree, hf_dect_nr_li_traffic_load_pct, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4244 offset++;
4245
4246 if (max_assoc_field) {
4247 proto_tree_add_item(tree, hf_dect_nr_li_max_assoc_16, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4248 offset += 2;
4249 } else {
4250 proto_tree_add_item(tree, hf_dect_nr_li_max_assoc_8, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4251 offset++;
4252 }
4253
4254 proto_tree_add_item(tree, hf_dect_nr_li_curr_ft_pct, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4255 offset++;
4256
4257 if (rd_pt_load_field) {
4258 proto_tree_add_item(tree, hf_dect_nr_li_curr_pt_pct, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4259 offset++;
4260 }
4261
4262 if (rach_load_field) {
4263 proto_tree_add_item(tree, hf_dect_nr_li_rach_load_pct, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4264 offset++;
4265 }
4266
4267 if (channel_load_field) {
4268 proto_tree_add_item(tree, hf_dect_nr_li_subslots_free_pct, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4269 offset++;
4270 proto_tree_add_item(tree, hf_dect_nr_li_subslots_busy_pct, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4271 offset++;
4272 }
4273
4274 proto_item_set_len(item, offset);
4275
4276 return offset;
4277}
4278
4279/* 6.4.3.12: Measurement Report IE */
4280static int dissect_measurement_report_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U___attribute__((unused)))
4281{
4282 int offset = 0;
4283 bool_Bool snr_field;
4284 bool_Bool rssi2_field;
4285 bool_Bool rssi1_field;
4286 bool_Bool tx_count_field;
4287
4288 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_mr_ie, tvb, offset, -1, ENC_NA0x00000000);
4289 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_mr_ie);
4290
4291 dect_tree_add_reserved_item(tree, hf_dect_nr_mr_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
4292 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_mr_snr_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &snr_field);
4293 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_mr_rssi2_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rssi2_field);
4294 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_mr_rssi1_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &rssi1_field);
4295 proto_tree_add_item_ret_boolean(tree, hf_dect_nr_mr_tx_count_field, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &tx_count_field);
4296 proto_tree_add_item(tree, hf_dect_nr_mr_rach, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4297 offset++;
4298
4299 if (snr_field) {
4300 proto_tree_add_item(tree, hf_dect_nr_mr_snr, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4301 offset++;
4302 }
4303
4304 if (rssi2_field) {
4305 proto_tree_add_item(tree, hf_dect_nr_mr_rssi2, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4306 offset++;
4307 }
4308
4309 if (rssi1_field) {
4310 proto_tree_add_item(tree, hf_dect_nr_mr_rssi1, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4311 offset++;
4312 }
4313
4314 if (tx_count_field) {
4315 proto_tree_add_item(tree, hf_dect_nr_mr_tx_count, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4316 offset++;
4317 }
4318
4319 proto_item_set_len(item, offset);
4320
4321 return offset;
4322}
4323
4324/* 6.4.3.13: Radio Device Status IE */
4325static int dissect_radio_device_status_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U___attribute__((unused)))
4326{
4327 int offset = 0;
4328 uint32_t status_field;
4329
4330 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_rds_ie, tvb, offset, -1, ENC_NA0x00000000);
4331 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_rds_ie);
4332
4333 dect_tree_add_reserved_item(tree, hf_dect_nr_rds_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
4334 proto_tree_add_item(tree, hf_dect_nr_rds_assoc, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4335 proto_tree_add_item_ret_uint(tree, hf_dect_nr_rds_sf, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &status_field);
4336 proto_tree_add_item(tree, hf_dect_nr_rds_dur, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4337 offset++;
4338
4339 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", val_to_str_const(status_field, rds_status_vals, "Unknown"));
4340 proto_item_set_len(item, offset);
4341
4342 return offset;
4343}
4344
4345/* 6.4.3.15 RD Capability short IE */
4346static int dissect_rd_capability_short_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U___attribute__((unused)))
4347{
4348 int offset = 0;
4349
4350 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_rdcs_ie, tvb, offset, -1, ENC_NA0x00000000);
4351 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_rdcs_ie);
4352
4353 dect_tree_add_reserved_item(tree, hf_dect_nr_rdcs_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
4354 proto_tree_add_item(tree, hf_dect_nr_rdcs_cb_mc, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4355 proto_tree_add_item(tree, hf_dect_nr_rdcs_harq_fb_delay, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4356 proto_tree_add_item(tree, hf_dect_nr_rdcs_dwa, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4357 offset++;
4358
4359 proto_item_set_len(item, offset);
4360
4361 return offset;
4362}
4363
4364/* 6.4.3.16 Source Routing IE */
4365static int dissect_source_routing_ie(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *parent_tree, void *data _U___attribute__((unused)))
4366{
4367 int offset = 0;
4368
4369 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_sr_ie, tvb, offset, -1, ENC_NA0x00000000);
4370 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_sr_ie);
4371
4372 proto_tree_add_item(tree, hf_dect_nr_sr_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
4373 offset += 4;
4374
4375 proto_tree_add_item(tree, hf_dect_nr_sr_hop_limit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4376 proto_tree_add_item(tree, hf_dect_nr_sr_hop_count, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4377 offset++;
4378
4379 proto_tree_add_item(tree, hf_dect_nr_sr_reg_validity_timer, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4380 offset++;
4381
4382 proto_item_set_len(item, offset);
4383
4384 return offset;
4385}
4386
4387/* 6.4.3.17 Joining Information IE */
4388static int dissect_joining_information_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U___attribute__((unused)))
4389{
4390 int offset = 0;
4391 uint32_t num_eps;
4392
4393 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_ji_ie, tvb, offset, -1, ENC_NA0x00000000);
4394 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_ji_ie);
4395
4396 dect_tree_add_reserved_item(tree, hf_dect_nr_ji_res1, tvb, offset, 1, pinfo, ENC_BIG_ENDIAN0x00000000);
4397 proto_tree_add_item_ret_uint(tree, hf_dect_nr_ji_num_eps, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &num_eps);
4398 offset++;
4399
4400 for (uint32_t i = 0; i < num_eps; i++) {
4401 proto_tree_add_item(tree, hf_dect_nr_ji_ep, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4402 offset += 2;
4403 }
4404
4405 proto_item_set_len(item, offset);
4406
4407 return offset;
4408}
4409
4410/* 6.4.3.18 Association Control IE */
4411static int dissect_association_control_ie(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *parent_tree, void *data _U___attribute__((unused)))
4412{
4413 int offset = 0;
4414
4415 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_ac_ie, tvb, offset, -1, ENC_NA0x00000000);
4416 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_ac_ie);
4417
4418 proto_tree_add_item(tree, hf_dect_nr_ac_cb_m, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4419 proto_tree_add_item(tree, hf_dect_nr_ac_dl_data_reception, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4420 proto_tree_add_item(tree, hf_dect_nr_ac_ul_period, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4421 offset++;
4422
4423 proto_item_set_len(item, offset);
4424
4425 return offset;
4426}
4427
4428/* Escape */
4429static int dissect_escape(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree, void *data)
4430{
4431 dect_nr_context_t *ctx = (dect_nr_context_t *)data;
4432 int length = ((ctx && ctx->ie_length_present) ? ctx->ie_length : tvb_reported_length(tvb));
4433
4434 proto_tree_add_item(tree, hf_dect_nr_escape, tvb, 0, length, ENC_NA0x00000000);
4435
4436 return length;
4437}
4438
4439/* IE type Extension */
4440static int dissect_ie_type_extension(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree, void *data)
4441{
4442 int offset = 0;
4443 uint32_t extension_type;
4444 tvbuff_t *subtvb;
4445 int sublen;
4446
4447 dect_nr_context_t *ctx = (dect_nr_context_t *)data;
4448 int length = ((ctx && ctx->ie_length_present) ? ctx->ie_length : tvb_reported_length(tvb));
4449
4450 proto_tree_add_item_ret_uint(tree, hf_dect_nr_ie_type_extension, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &extension_type);
4451 offset++;
4452
4453 subtvb = tvb_new_subset_length(tvb, offset, length - offset);
4454 sublen = dissector_try_uint_with_data(ie_extension_dissector_table, extension_type, subtvb, pinfo, tree, false0, data);
4455
4456 if (sublen > 0) {
4457 offset += sublen;
4458 } else {
4459 proto_tree_add_item(tree, hf_dect_nr_ie_extension, subtvb, 0, -1, ENC_NA0x00000000);
4460 offset = length;
4461 }
4462
4463 return offset;
4464}
4465
4466static tvbuff_t *decrypt_mac_pdus(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dect_nr_context_t *ctx)
4467{
4468 unsigned length = tvb_captured_length_remaining(tvb, offset);
4469 proto_item *item = proto_tree_add_item(tree, hf_dect_nr_mac_encrypted, tvb, offset, length, ENC_NA0x00000000);
4470
4471 const dect_nr_sec_info_t *sec_info;
4472 GByteArray *cipher_key;
4473
4474 if (ctx->sec_info_present) {
4475 sec_info = &ctx->sec_info;
4476 } else {
4477 sec_info = lookup_sec_info(pinfo, ctx);
4478
4479 if (sec_info) {
4480 proto_item *hpc_item;
4481
4482 tree = proto_item_add_subtree(item, ett_dect_nr_mac_encrypted);
4483 hpc_item = proto_tree_add_uint(tree, hf_dect_nr_msi_hpc, NULL((void*)0), 0, 0, sec_info->hpc);
4484 proto_item_set_generated(hpc_item);
4485 } else {
4486 item = expert_add_info(pinfo, item, &ei_dect_nr_mac_encrypted);
4487 proto_item_append_text(item, " (missing security info)");
4488 col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "[Missing Security Info IE]");
4489 return NULL((void*)0);
4490 }
4491 }
4492
4493 if (sec_info->version > 0) {
4494 item = expert_add_info(pinfo, item, &ei_dect_nr_mac_encrypted);
4495 proto_item_append_text(item, " (unknown security version %u)", sec_info->version);
4496 col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "[Unknown Security Version %u]", sec_info->version);
4497 return NULL((void*)0);
4498 }
4499
4500 if (sec_info->key >= KEY_MAX4 || !cipher_key_pref[sec_info->key] || strlen(cipher_key_pref[sec_info->key]) == 0) {
4501 item = expert_add_info(pinfo, item, &ei_dect_nr_mac_encrypted);
4502 proto_item_append_text(item, " (no cipher key #%u)", sec_info->key);
4503 col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "[No Cipher Key #%u]", sec_info->key);
4504 return NULL((void*)0);
4505 }
4506
4507 cipher_key = g_byte_array_new();
4508 if (!hex_str_to_bytes(cipher_key_pref[sec_info->key], cipher_key, false0)) {
4509 item = expert_add_info(pinfo, item, &ei_dect_nr_mac_encrypted);
4510 proto_item_append_text(item, " (illegal cipher key #%u)", sec_info->key);
4511 col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "[Illegal Cipher Key #%u]", sec_info->key);
4512 g_byte_array_free(cipher_key, true1);
4513 return NULL((void*)0);
4514 }
4515
4516 uint32_t tx_long_rd_id = lookup_long_rd_id(ctx->nw_id, ctx->tx_id);
4517 uint32_t rx_long_rd_id = lookup_long_rd_id(ctx->nw_id, ctx->rx_id);
4518
4519 /*
4520 * The bit 0 is the most significant bit and bit 127 is the least significant bit
4521 * of the initialization vector.
4522 *
4523 * 0 to 31 (octets 0 to 3) Long RD ID of the transmitter.
4524 * 32 to 63 (octets 4 to 7) Long RD ID of the receiver.
4525 * 64 to 95 (octets 8 to 11) Hyper Packet Counter (HPC).
4526 * 96 to 107 (12 bits) Packet Sequence Number (PSN), transmitted in MAC PDU.
4527 * 108 to 127 (20 bits) Ciphering engine internal byte counter.
4528 * Increased by one at every 16 byte ciphered block.
4529 * Set to zero for the first 16 byte block of the MAC PDU.
4530 */
4531 unsigned char iv[16];
4532
4533 *(uint32_t *)&iv[0] = GUINT32_TO_BE(tx_long_rd_id)((((guint32) ( (((guint32) (tx_long_rd_id) & (guint32) 0x000000ffU
) << 24) | (((guint32) (tx_long_rd_id) & (guint32) 0x0000ff00U
) << 8) | (((guint32) (tx_long_rd_id) & (guint32) 0x00ff0000U
) >> 8) | (((guint32) (tx_long_rd_id) & (guint32) 0xff000000U
) >> 24)))))
;
4534 *(uint32_t *)&iv[4] = GUINT32_TO_BE(rx_long_rd_id)((((guint32) ( (((guint32) (rx_long_rd_id) & (guint32) 0x000000ffU
) << 24) | (((guint32) (rx_long_rd_id) & (guint32) 0x0000ff00U
) << 8) | (((guint32) (rx_long_rd_id) & (guint32) 0x00ff0000U
) >> 8) | (((guint32) (rx_long_rd_id) & (guint32) 0xff000000U
) >> 24)))))
;
4535 *(uint32_t *)&iv[8] = GUINT32_TO_BE(sec_info->hpc)((((guint32) ( (((guint32) (sec_info->hpc) & (guint32)
0x000000ffU) << 24) | (((guint32) (sec_info->hpc) &
(guint32) 0x0000ff00U) << 8) | (((guint32) (sec_info->
hpc) & (guint32) 0x00ff0000U) >> 8) | (((guint32) (
sec_info->hpc) & (guint32) 0xff000000U) >> 24)))
))
;
4536 *(uint32_t *)&iv[12] = GUINT32_TO_BE(ctx->psn << 20)((((guint32) ( (((guint32) (ctx->psn << 20) & (guint32
) 0x000000ffU) << 24) | (((guint32) (ctx->psn <<
20) & (guint32) 0x0000ff00U) << 8) | (((guint32) (
ctx->psn << 20) & (guint32) 0x00ff0000U) >>
8) | (((guint32) (ctx->psn << 20) & (guint32) 0xff000000U
) >> 24)))))
;
4537
4538 uint8_t *payload_data = (uint8_t *)tvb_memdup(pinfo->pool, tvb, offset, length);
4539
4540 gcry_cipher_hd_t handle;
4541 gcry_error_t err;
4542
4543 /* Decrypt the payload data in place */
4544 err = gcry_cipher_open(&handle, GCRY_CIPHER_AES128GCRY_CIPHER_AES, GCRY_CIPHER_MODE_CTR, 0) ||
4545 gcry_cipher_setkey(handle, cipher_key->data, cipher_key->len) ||
4546 gcry_cipher_setctr(handle, iv, sizeof(iv)) ||
4547 gcry_cipher_decrypt(handle, payload_data, length, NULL((void*)0), 0);
4548 gcry_cipher_close(handle);
4549
4550 if (err) {
4551 item = expert_add_info(pinfo, item, &ei_dect_nr_mac_encrypted);
4552 proto_item_append_text(item, " (decryption failed)");
4553 col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "[Decryption failed]");
4554 g_byte_array_free(cipher_key, true1);
4555 return NULL((void*)0);
4556 }
4557
4558 tvbuff_t *decrypt_tvb = tvb_new_real_data(payload_data, length, length);
4559 add_new_data_source(pinfo, decrypt_tvb, "Decrypted MAC PDUs");
4560 g_byte_array_free(cipher_key, true1);
4561
4562 return decrypt_tvb;
4563}
4564
4565static int dissect_mac_mux_msg_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, dissector_table_t dissector_table, dect_nr_context_t *ctx)
4566{
4567 tvbuff_t *subtvb;
4568 int sublen;
4569 unsigned length;
4570
4571 length = (ctx->ie_length_present ? ctx->ie_length : tvb_reported_length_remaining(tvb, offset));
4572 subtvb = tvb_new_subset_length(tvb, offset, length);
4573 sublen = dissector_try_uint_with_data(dissector_table, ctx->ie_type, subtvb, pinfo, parent_tree, false0, ctx);
4574
4575 if (sublen > 0) {
4576 offset += sublen;
4577 } else if (tvb_reported_length_remaining(tvb, offset) > 0) {
4578 /* Unknown message */
4579 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_undecoded, tvb, offset, length, ENC_NA0x00000000);
4580 expert_add_info(pinfo, item, &ei_dect_nr_undecoded);
4581 offset += length;
4582 }
4583
4584 return offset;
4585}
4586
4587/* 6.3.4: MAC Multiplexing Header */
4588static int dissect_mac_mux_header(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, dect_nr_context_t *ctx)
4589{
4590 int start = offset;
4591 uint32_t mac_ext;
4592 const char *ie_type_name;
4593 dissector_table_t dissector_table;
4594
4595 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_mux_hdr, tvb, offset, -1, ENC_NA0x00000000);
4596 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_mux_hdr);
4597
4598 proto_tree_add_item_ret_uint(tree, hf_dect_nr_mux_mac_ext, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &mac_ext);
4599
4600 if (mac_ext == 3) {
4601 /* One bit length field is included in the IE header. IE type is 5 bits (6.3.4-1 options a) and b)) */
4602 dissector_table = ie_short_dissector_table;
4603 proto_tree_add_item_ret_uint(tree, hf_dect_nr_mux_len_bit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &ctx->ie_length);
4604 if (ctx->ie_length == 0) {
4605 /* 6.3.4-1 option a) */
4606 proto_tree_add_item_ret_uint(tree, hf_dect_nr_mux_ie_type_short_pl0, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &ctx->ie_type);
4607 /* The IE payload size is 0 bytes when the length bit (bit 2) is set to 0 */
4608 ie_type_name = val_to_str(pinfo->pool, ctx->ie_type, mux_hdr_ie_type_mac_ext_3_pl_0_vals, "0 byte IE type %u");
4609 } else {
4610 /* 6.3.4-1 option b) */
4611 proto_tree_add_item_ret_uint(tree, hf_dect_nr_mux_ie_type_short_pl1, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &ctx->ie_type);
4612 /* Expect exactly one byte MAC SDU */
4613 ie_type_name = val_to_str(pinfo->pool, ctx->ie_type, mux_hdr_ie_type_mac_ext_3_pl_1_vals, "1 byte IE type %u");
4614 }
4615 ctx->ie_length_present = true1;
4616 offset++;
4617 } else {
4618 /* IE type is 6 bits (6.3.4-1 options c), d), e) and f)) */
4619 dissector_table = ie_dissector_table;
4620 proto_tree_add_item_ret_uint(tree, hf_dect_nr_mux_ie_type_long, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &ctx->ie_type);
4621 ie_type_name = val_to_str(pinfo->pool, ctx->ie_type, mux_hdr_ie_type_mac_ext_012_vals, "IE type %u");
4622 offset++;
4623
4624 if (mac_ext == 0) {
4625 /* 6.3.4-1 option c)
4626 * No length field is included in the IE header. IE type defines the length of the IE payload
4627 * Expect at least one byte (length unknown at this point)
4628 */
4629 ctx->ie_length = -1;
4630 ctx->ie_length_present = false0;
4631 } else if (mac_ext == 1) {
4632 /* 6.3.4-1 option d)
4633 * 8 bit length included indicating the length of the IE payload
4634 */
4635 proto_tree_add_item_ret_uint(tree, hf_dect_nr_mux_mac_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &ctx->ie_length);
4636 offset++;
4637 ctx->ie_length_present = true1;
4638 } else if (mac_ext == 2) {
4639 /* 6.3.4-1 option e)
4640 * 16 bit length included indicating the length of the IE payload
4641 */
4642 proto_tree_add_item_ret_uint(tree, hf_dect_nr_mux_mac_ie_len, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &ctx->ie_length);
4643 offset += 2;
4644 ctx->ie_length_present = true1;
4645 }
4646 }
4647
4648 col_append_sep_fstr(pinfo->cinfo, COL_INFO, ", ", "%s", ie_type_name);
4649
4650 /* ie_length 0 is Short SDU with no payload (no more processing needed) */
4651 if (ctx->ie_length != 0) {
4652 int ie_start = offset;
4653
4654 /* 6.4 MAC Messages and IEs */
4655 offset = dissect_mac_mux_msg_ie(tvb, offset, pinfo, tree, dissector_table, ctx);
4656
4657 if ((ctx->ie_length_present) && (ie_start + (int)ctx->ie_length) != offset) {
4658 expert_add_info_format(pinfo, tree, &ei_dect_nr_length_mismatch,
4659 "Length mismatch: expected %d, used %d",
4660 ctx->ie_length, offset - ie_start);
4661 /* Use expected length */
4662 offset = ie_start + (int)ctx->ie_length;
4663 }
4664 }
4665
4666 proto_item_append_text(item, " (%s)", ie_type_name);
4667 proto_item_set_len(item, offset - start);
4668
4669 /* Return length of MAC Multiplexing Header */
4670 return offset - start;
4671}
4672
4673/* 6.3 MAC PDU */
4674static int dissect_mac_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, dect_nr_context_t *ctx)
4675{
4676 uint32_t mac_security;
4677 uint32_t mac_hdr_type;
4678 tvbuff_t *subtvb;
4679 int start;
4680 int length;
4681 bool_Bool decrypted = false0;
4682
4683 proto_item *item = proto_tree_add_item(parent_tree, hf_dect_nr_mac_pdu, tvb, offset, -1, ENC_NA0x00000000);
4684 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr_mac_pdu);
4685
4686 /* 6.3.2 MAC Header type */
4687 proto_tree_add_item(tree, hf_dect_nr_mac_version, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4688 proto_tree_add_item_ret_uint(tree, hf_dect_nr_mac_security, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &mac_security);
4689 proto_tree_add_item_ret_uint(tree, hf_dect_nr_mac_hdr_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &mac_hdr_type);
4690 offset++;
4691
4692 /* Use a tvb subset for MAC Common header and MAC multiplexing header to preserve trailing MIC */
4693 length = tvb_reported_length(tvb);
4694 if (mac_security != 0 && mac_pdus_decrypted_pref && length > 5) {
4695 /* 5 bytes MIC at the end */
4696 length -= 5;
4697 }
4698 subtvb = tvb_new_subset_length(tvb, offset, length - offset);
4699 start = offset;
4700
4701 /* 6.3.3 MAC Common header */
4702 offset += dissect_mac_common_header(subtvb, pinfo, tree, ctx, mac_hdr_type);
4703
4704 /* One or more MAC SDUs included in MAC PDU with MAC multiplexing header */
4705 while (offset < length) {
4706 if (!decrypted && !mac_pdus_decrypted_pref && (mac_security == 1 || (mac_security == 2 && ctx->ie_type == 16))) {
4707 /* Decrypt the MAC PDUs */
4708 subtvb = decrypt_mac_pdus(tvb, offset, pinfo, tree, ctx);
4709
4710 if (subtvb) {
4711 tvb = subtvb;
4712 start = offset = 0;
4713 length = tvb_reported_length(tvb) - 5; /* 5 bytes MIC at the end */
4714 subtvb = tvb_new_subset_length(tvb, 0, length);
4715 decrypted = true1;
4716 } else {
4717 return tvb_reported_length(tvb);
4718 }
4719 }
4720
4721 /* 6.3.4 MAC multiplexing header */
4722 offset += dissect_mac_mux_header(subtvb, offset - start, pinfo, tree, ctx);
4723 }
4724
4725 /* 5.9.1: Message Integrity Code (MIC) */
4726 if (mac_security != 0) {
4727 int mic_len = tvb_reported_length_remaining(tvb, offset) >= 5 ? 5 : 0;
4728
4729 item = proto_tree_add_item(tree, hf_dect_nr_mic_bytes, tvb, offset, mic_len, ENC_NA0x00000000);
4730 offset += mic_len;
4731
4732 if (mic_len == 0) {
4733 expert_add_info(pinfo, item, &ei_dect_nr_pdu_cut_short);
4734 col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "[MIC missing]");
4735 }
4736 }
4737
4738 return offset;
4739}
4740
4741static int dissect_dect_nr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U___attribute__((unused)))
4742{
4743 dect_nr_context_t ctx = { 0 };
4744 int offset = 0;
4745
4746 proto_item *item = proto_tree_add_item(parent_tree, proto_dect_nr, tvb, offset, -1, ENC_NA0x00000000);
4747 proto_tree *tree = proto_item_add_subtree(item, ett_dect_nr);
4748
4749 col_set_str(pinfo->cinfo, COL_PROTOCOL, "DECT NR+");
4750 col_clear(pinfo->cinfo, COL_INFO);
4751
4752 /* 6.2 Physical Header Field */
4753 offset = dissect_physical_header_field(tvb, offset, pinfo, tree, &ctx);
4754
4755 /* Check if this is a PCC-only feedback message */
4756 if (tvb_captured_length(tvb) - offset == 0) {
4757 return offset;
4758 }
4759
4760 /* 6.3 MAC PDU */
4761 offset = dissect_mac_pdu(tvb, offset, pinfo, tree, &ctx);
4762
4763 return offset;
4764}
4765
4766void proto_register_dect_nr(void)
4767{
4768 static hf_register_info hf[] = {
4769 /* 6.2: Physical Header Field */
4770 { &hf_dect_nr_phf,
4771 { "Physical Header Field", "dect_nr.phf", FT_NONE, BASE_NONE,
4772 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4773 },
4774 { &hf_dect_nr_header_format_type1,
4775 { "Header Format", "dect_nr.phf.hf", FT_UINT8, BASE_DEC,
4776 VALS(header_formats_type1_vals)((0 ? (const struct _value_string*)0 : ((header_formats_type1_vals
))))
, 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4777 },
4778 { &hf_dect_nr_header_format_type2,
4779 { "Header Format", "dect_nr.phf.hf", FT_UINT8, BASE_DEC,
4780 VALS(header_formats_type2_vals)((0 ? (const struct _value_string*)0 : ((header_formats_type2_vals
))))
, 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4781 },
4782 { &hf_dect_nr_len_type,
4783 { "Packet length type", "dect_nr.phf.len_type", FT_BOOLEAN, 8,
4784 TFS(&pkt_len_type_tfs)((0 ? (const struct true_false_string*)0 : ((&pkt_len_type_tfs
))))
, 0x10, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4785 },
4786 { &hf_dect_nr_packet_len,
4787 { "Packet length", "dect_nr.phf.pkt_len", FT_UINT8, BASE_CUSTOM,
4788 CF_FUNC(subslot_len_cf_func)((const void *) (size_t) (subslot_len_cf_func)), 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4789 },
4790 { &hf_dect_nr_short_nw_id,
4791 { "Short Network ID", "dect_nr.phf.short_nw_id", FT_UINT8, BASE_HEX,
4792 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4793 },
4794 { &hf_dect_nr_transmitter_id,
4795 { "Transmitter Short RD ID", "dect_nr.phf.transmitter_id", FT_UINT16, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
4796 VALS(short_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((short_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4797 },
4798 { &hf_dect_nr_tx_pwr,
4799 { "Transmit Power", "dect_nr.phf.tx_pwr", FT_UINT8, BASE_DEC,
4800 VALS(tx_powers_3a_vals)((0 ? (const struct _value_string*)0 : ((tx_powers_3a_vals)))
)
, 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4801 },
4802 { &hf_dect_nr_res1,
4803 { "Reserved", "dect_nr.phf.res1", FT_UINT8, BASE_DEC,
4804 NULL((void*)0), 0x08, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4805 },
4806 { &hf_dect_nr_df_mcs_t1,
4807 { "DF MCS (Type 1)", "dect_nr.phf.df_mcs_t1", FT_UINT8, BASE_DEC,
4808 VALS(mcse_vals)((0 ? (const struct _value_string*)0 : ((mcse_vals)))), 0x07, "Data Field Modulation and Coding Scheme (Type 1)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4809 },
4810 { &hf_dect_nr_df_mcs_t2,
4811 { "DF MCS (Type 2)", "dect_nr.phf.df_mcs_t2", FT_UINT8, BASE_DEC,
4812 VALS(mcse_vals)((0 ? (const struct _value_string*)0 : ((mcse_vals)))), 0x0F, "Data Field Modulation and Coding Scheme (Type 2)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4813 },
4814 { &hf_dect_nr_receiver_id,
4815 { "Receiver Short RD ID", "dect_nr.phf.receiver_id", FT_UINT16, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
4816 VALS(short_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((short_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4817 },
4818 { &hf_dect_nr_spatial_streams,
4819 { "Number of Spatial Streams", "dect_nr.phf.spatial_streams", FT_UINT8, BASE_DEC,
4820 VALS(num_spatial_stream_vals)((0 ? (const struct _value_string*)0 : ((num_spatial_stream_vals
))))
, 0xC0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4821 },
4822 { &hf_dect_nr_df_red_version,
4823 { "DF Redundancy Version", "dect_nr.phf.df_red_version", FT_UINT8, BASE_DEC,
4824 NULL((void*)0), 0x30, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4825 },
4826 { &hf_dect_nr_df_ind,
4827 { "DF New Data Indication", "dect_nr.phf.df_ind", FT_BOOLEAN, 8,
4828 NULL((void*)0), 0x08, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4829 },
4830 { &hf_dect_nr_df_harq_proc,
4831 { "DF HARQ Process Number", "dect_nr.phf.df_harq_proc", FT_UINT8, BASE_DEC,
4832 NULL((void*)0), 0x07, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4833 },
4834 { &hf_dect_nr_res1_hdr_format_001,
4835 { "Reserved", "dect_nr.phf.res1", FT_UINT8, BASE_DEC,
4836 NULL((void*)0), 0x3F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4837 },
4838 { &hf_dect_nr_fb_format,
4839 { "Feedback format", "dect_nr.phf.fb_format", FT_UINT16, BASE_DEC,
4840 VALS(feedback_format_vals)((0 ? (const struct _value_string*)0 : ((feedback_format_vals
))))
, 0xF000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4841 },
4842
4843 /* Table 6.2.2-2a: Feedback info format 1 */
4844 { &hf_dect_nr_fbi1_harq_pn,
4845 { "HARQ Process number", "dect_nr.phf.fbi1.harq_pn", FT_UINT16, BASE_DEC,
4846 NULL((void*)0), 0x0E00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4847 },
4848 { &hf_dect_nr_fbi1_tx_fb,
4849 { "Transmission feedback", "dect_nr.phf.fbi1.tx_feedback", FT_BOOLEAN, 16,
4850 TFS(&tfs_ack_nack)((0 ? (const struct true_false_string*)0 : ((&tfs_ack_nack
))))
, 0x0100, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4851 },
4852 { &hf_dect_nr_fbi1_bs,
4853 { "Buffer status", "dect_nr.phf.fbi1.bs", FT_UINT16, BASE_DEC,
4854 VALS(buffer_status_vals)((0 ? (const struct _value_string*)0 : ((buffer_status_vals))
))
, 0x00F0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4855 },
4856 { &hf_dect_nr_fbi1_cqi,
4857 { "Channel Quality Indicator", "dect_nr.phf.fbi1.cqi", FT_UINT16, BASE_DEC,
4858 VALS(cqi_vals)((0 ? (const struct _value_string*)0 : ((cqi_vals)))), 0x000F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4859 },
4860
4861 /* Table 6.2.2-2b: Feedback info format 2 */
4862 { &hf_dect_nr_fbi2_cb_index,
4863 { "Codebook index", "dect_nr.phf.fbi2.cb_index", FT_UINT16, BASE_DEC,
4864 NULL((void*)0), 0x0E00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4865 },
4866 { &hf_dect_nr_fbi2_mimo_fb,
4867 { "MIMO feedback", "dect_nr.phf.fbi2.mimo_fb", FT_BOOLEAN, 16,
4868 TFS(&fbi2_mimo_fb_tfs)((0 ? (const struct true_false_string*)0 : ((&fbi2_mimo_fb_tfs
))))
, 0x0100, "Multiple Input Multiple Output feedback", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4869 },
4870 { &hf_dect_nr_fbi2_bs,
4871 { "Buffer status", "dect_nr.phf.fbi2.bs", FT_UINT16, BASE_DEC,
4872 VALS(buffer_status_vals)((0 ? (const struct _value_string*)0 : ((buffer_status_vals))
))
, 0x00F0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4873 },
4874 { &hf_dect_nr_fbi2_cqi,
4875 { "Channel Quality Indicator", "dect_nr.phf.fbi2.cqi", FT_UINT16, BASE_DEC,
4876 VALS(cqi_vals)((0 ? (const struct _value_string*)0 : ((cqi_vals)))), 0x000F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4877 },
4878
4879 /* Table 6.2.2-2c: Feedback info format 3 */
4880 { &hf_dect_nr_fbi3_harq_pn_1,
4881 { "HARQ Process number", "dect_nr.phf.fbi3.harq_pn", FT_UINT16, BASE_DEC,
4882 NULL((void*)0), 0x0E00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4883 },
4884 { &hf_dect_nr_fbi3_tx_fb_1,
4885 { "Transmission feedback", "dect_nr.phf.fbi3.tx_feedback", FT_BOOLEAN, 16,
4886 TFS(&tfs_ack_nack)((0 ? (const struct true_false_string*)0 : ((&tfs_ack_nack
))))
, 0x0100, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4887 },
4888 { &hf_dect_nr_fbi3_harq_pn_2,
4889 { "HARQ Process number", "dect_nr.phf.fbi3.harq_pn", FT_UINT16, BASE_DEC,
4890 NULL((void*)0), 0x00E0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4891 },
4892 { &hf_dect_nr_fbi3_tx_fb_2,
4893 { "Transmission feedback", "dect_nr.phf.fbi3.tx_feedback", FT_BOOLEAN, 16,
4894 TFS(&tfs_ack_nack)((0 ? (const struct true_false_string*)0 : ((&tfs_ack_nack
))))
, 0x0010, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4895 },
4896 { &hf_dect_nr_fbi3_cqi,
4897 { "Channel Quality Indicator", "dect_nr.phf.fbi3.cqi", FT_UINT16, BASE_DEC,
4898 VALS(cqi_vals)((0 ? (const struct _value_string*)0 : ((cqi_vals)))), 0x000F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4899 },
4900
4901 /* Table 6.2.2-2d: Feedback info format 4 */
4902 { &hf_dect_nr_fbi4_harq_fb_bm,
4903 { "HARQ FB Bitmap", "dect_nr.phf.fbi4.harq_fb_bm", FT_UINT16, BASE_HEX,
4904 NULL((void*)0), 0x0FF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4905 },
4906 { &hf_dect_nr_fbi4_cqi,
4907 { "Channel Quality Indicator", "dect_nr.phf.fbi4.cqi", FT_UINT16, BASE_DEC,
4908 VALS(cqi_vals)((0 ? (const struct _value_string*)0 : ((cqi_vals)))), 0x000F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4909 },
4910
4911 /* Table 6.2.2-2e: Feedback info format 5 */
4912 { &hf_dect_nr_fbi5_harq_pn,
4913 { "HARQ Process number", "dect_nr.phf.fbi5.harq_pn", FT_UINT16, BASE_DEC,
4914 NULL((void*)0), 0x0E00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4915 },
4916 { &hf_dect_nr_fbi5_tx_fb,
4917 { "Transmission feedback", "dect_nr.phf.fbi5.tx_feedback", FT_BOOLEAN, 16,
4918 TFS(&tfs_ack_nack)((0 ? (const struct true_false_string*)0 : ((&tfs_ack_nack
))))
, 0x0100, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4919 },
4920 { &hf_dect_nr_fbi5_mimo_fb,
4921 { "MIMO feedback", "dect_nr.phf.fbi5.mimo_fb", FT_UINT16, BASE_DEC,
4922 VALS(fbi5_mimo_fb_vals)((0 ? (const struct _value_string*)0 : ((fbi5_mimo_fb_vals)))
)
, 0x00C0, "Multiple Input Multiple Output feedback", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4923 },
4924 { &hf_dect_nr_fbi5_cb_index,
4925 { "Codebook index", "dect_nr.phf.fbi5.cb_index", FT_UINT16, BASE_DEC,
4926 NULL((void*)0), 0x003F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4927 },
4928
4929 /* Table 6.2.2-2f: Feedback info format 6 */
4930 { &hf_dect_nr_fbi6_harq_pn,
4931 { "HARQ Process number", "dect_nr.phf.fbi6.harq_pn", FT_UINT16, BASE_DEC,
4932 NULL((void*)0), 0x0E00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4933 },
4934 { &hf_dect_nr_fbi6_res1,
4935 { "Reserved", "dect_nr.phf.fbi6.res1", FT_UINT16, BASE_DEC,
4936 NULL((void*)0), 0x0100, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4937 },
4938 { &hf_dect_nr_fbi6_bs,
4939 { "Buffer status", "dect_nr.phf.fbi6.bs", FT_UINT16, BASE_DEC,
4940 VALS(buffer_status_vals)((0 ? (const struct _value_string*)0 : ((buffer_status_vals))
))
, 0x00F0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4941 },
4942 { &hf_dect_nr_fbi6_cqi,
4943 { "Channel Quality Indicator", "dect_nr.phf.fbi6.cqi", FT_UINT16, BASE_DEC,
4944 VALS(cqi_vals)((0 ? (const struct _value_string*)0 : ((cqi_vals)))), 0x000F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4945 },
4946
4947 /* Table 6.2.2-2g: Feedback info format 7 */
4948 { &hf_dect_nr_fbi7_bs,
4949 { "Buffer status", "dect_nr.phf.fbi7.bs", FT_UINT16, BASE_DEC,
4950 VALS(buffer_status_vals)((0 ? (const struct _value_string*)0 : ((buffer_status_vals))
))
, 0x0F00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4951 },
4952 { &hf_dect_nr_fbi7_cqi_field,
4953 { "CQI included", "dect_nr.phf.fbi7.cqi_field", FT_BOOLEAN, 16,
4954 TFS(&tfs_included_not_included)((0 ? (const struct true_false_string*)0 : ((&tfs_included_not_included
))))
, 0x0080, "Channel Quality Indicator included", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4955 },
4956 { &hf_dect_nr_fbi7_cqi,
4957 { "Channel Quality Indicator", "dect_nr.phf.fbi7.cqi", FT_UINT16, BASE_DEC,
4958 VALS(cqi_vals)((0 ? (const struct _value_string*)0 : ((cqi_vals)))), 0x0078, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4959 },
4960 { &hf_dect_nr_fbi7_res1,
4961 { "Reserved", "dect_nr.phf.fbi7.res1", FT_UINT16, BASE_DEC,
4962 NULL((void*)0), 0x0007, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4963 },
4964
4965 /* Feedback info format unknown */
4966 { &hf_dect_nr_fb_info,
4967 { "Feedback info", "dect_nr.phf.fb_info", FT_UINT16, BASE_HEX,
4968 NULL((void*)0), 0x0FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4969 },
4970
4971 /* PHF padding used after Type 1: 40 bits */
4972 { &hf_dect_nr_phf_padding,
4973 { "Padding", "dect_nr.phf.padding", FT_NONE, BASE_NONE,
4974 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4975 },
4976
4977 /* 6.3: MAC PDU */
4978
4979 { &hf_dect_nr_mac_pdu,
4980 { "MAC PDU", "dect_nr.mac", FT_NONE, BASE_NONE,
4981 NULL((void*)0), 0x0, "Medium Access Control (layer) PDU", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4982 },
4983 { &hf_dect_nr_mac_version,
4984 { "Version", "dect_nr.mac.version", FT_UINT8, BASE_DEC,
4985 NULL((void*)0), 0xC0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4986 },
4987 { &hf_dect_nr_mac_security,
4988 { "MAC security", "dect_nr.mac.security", FT_UINT8, BASE_DEC,
4989 VALS(mac_security_vals)((0 ? (const struct _value_string*)0 : ((mac_security_vals)))
)
, 0x30, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4990 },
4991 { &hf_dect_nr_mac_hdr_type,
4992 { "MAC Header Type", "dect_nr.mac.hdr_type", FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS0x00008000,
4993 VALS(mac_header_type_vals)((0 ? (const struct _value_string*)0 : ((mac_header_type_vals
))))
, 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
4994 },
4995
4996 /* 6.3.3.1: Data MAC PDU Header */
4997 { &hf_dect_nr_data_hdr,
4998 { "Data MAC PDU Header", "dect_nr.mac.hdr.data", FT_NONE, BASE_NONE,
4999 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5000 },
5001 { &hf_dect_nr_data_hdr_res1,
5002 { "Reserved", "dect_nr.mac.hdr.data.res1", FT_UINT16, BASE_DEC,
5003 NULL((void*)0), 0xE000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5004 },
5005 { &hf_dect_nr_data_hdr_reset,
5006 { "Reset", "dect_nr.mac.hdr.data.reset", FT_BOOLEAN, 16,
5007 NULL((void*)0), 0x1000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5008 },
5009 { &hf_dect_nr_data_hdr_sn,
5010 { "Sequence number", "dect_nr.mac.hdr.data.sn", FT_UINT16, BASE_DEC,
5011 NULL((void*)0), 0x0FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5012 },
5013 { &hf_dect_nr_data_hdr_rx_addr,
5014 { "Receiver Address", "dect_nr.mac.hdr.data.rx_addr", FT_UINT32, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
5015 VALS(long_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((long_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5016 },
5017 { &hf_dect_nr_data_hdr_tx_addr,
5018 { "Transmitter Address", "dect_nr.mac.hdr.data.tx_addr", FT_UINT32, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
5019 VALS(long_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((long_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5020 },
5021
5022 /* 6.3.3.2: Beacon Header */
5023 { &hf_dect_nr_bc_hdr,
5024 { "Beacon Header", "dect_nr.mac.hdr.bc", FT_NONE, BASE_NONE,
5025 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5026 },
5027 { &hf_dect_nr_bc_hdr_nw_id,
5028 { "Network ID", "dect_nr.mac.hdr.bc.nw_id", FT_UINT24, BASE_HEX,
5029 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5030 },
5031 { &hf_dect_nr_bc_hdr_tx_addr,
5032 { "Transmitter Address", "dect_nr.mac.hdr.bc.tx_addr", FT_UINT32, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
5033 VALS(long_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((long_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5034 },
5035
5036 /* 6.3.3.3: Unicast Header */
5037 { &hf_dect_nr_uc_hdr,
5038 { "Unicast Header", "dect_nr.mac.hdr.uc", FT_NONE, BASE_NONE,
5039 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5040 },
5041 { &hf_dect_nr_uc_hdr_res1,
5042 { "Reserved", "dect_nr.mac.hdr.uc.res1", FT_UINT16, BASE_DEC,
5043 NULL((void*)0), 0xE000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5044 },
5045 { &hf_dect_nr_uc_hdr_rst,
5046 { "Reset", "dect_nr.mac.hdr.uc.rst", FT_BOOLEAN, 16,
5047 NULL((void*)0), 0x1000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5048 },
5049 { &hf_dect_nr_uc_hdr_sn,
5050 { "Sequence Number", "dect_nr.mac.hdr.uc.sn", FT_UINT16, BASE_DEC,
5051 NULL((void*)0), 0x0FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5052 },
5053 { &hf_dect_nr_uc_hdr_rx_addr,
5054 { "Receiver Address", "dect_nr.mac.hdr.uc.rx_addr", FT_UINT32, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
5055 VALS(long_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((long_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5056 },
5057 { &hf_dect_nr_uc_hdr_tx_addr,
5058 { "Transmitter Address", "dect_nr.mac.hdr.uc.tx_addr", FT_UINT32, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
5059 VALS(long_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((long_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5060 },
5061
5062 /* 6.3.3.4: RD Broadcasting Header */
5063 { &hf_dect_nr_rdbh_hdr,
5064 { "RD Broadcasting Header", "dect_nr.mac.hdr.rdbh", FT_NONE, BASE_NONE,
5065 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5066 },
5067 { &hf_dect_nr_rdbh_hdr_res1,
5068 { "Reserved", "dect_nr.mac.hdr.rdbh.res1", FT_UINT16, BASE_DEC,
5069 NULL((void*)0), 0xE000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5070 },
5071 { &hf_dect_nr_rdbh_hdr_reset,
5072 { "Reset", "dect_nr.mac.hdr.rdbh.reset", FT_BOOLEAN, 16,
5073 NULL((void*)0), 0x1000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5074 },
5075 { &hf_dect_nr_rdbh_hdr_sn,
5076 { "Sequence number", "dect_nr.mac.hdr.rdbh.sn", FT_UINT16, BASE_DEC,
5077 NULL((void*)0), 0x0FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5078 },
5079 { &hf_dect_nr_rdbh_hdr_tx_addr,
5080 { "Transmitter Address", "dect_nr.mac.hdr.rdbh.tx_addr", FT_UINT32, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
5081 VALS(long_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((long_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5082 },
5083
5084 /* 6.3.4: MAC Multiplexing Header */
5085 { &hf_dect_nr_mux_hdr,
5086 { "MAC Multiplexing Header", "dect_nr.mac.mux_hdr", FT_NONE, BASE_NONE,
5087 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5088 },
5089 { &hf_dect_nr_mux_mac_ext,
5090 { "MAC extension", "dect_nr.mac.mux_hdr.mac_ext", FT_UINT8, BASE_DEC,
5091 VALS(mac_ext_vals)((0 ? (const struct _value_string*)0 : ((mac_ext_vals)))), 0xC0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5092 },
5093 { &hf_dect_nr_mux_len_bit,
5094 { "Length bit", "dect_nr.mac.mux_hdr.len", FT_UINT8, BASE_DEC,
5095 VALS(mac_ext_len_bit_vals)((0 ? (const struct _value_string*)0 : ((mac_ext_len_bit_vals
))))
, 0x20, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5096 },
5097 { &hf_dect_nr_mux_ie_type_long,
5098 { "IE type", "dect_nr.mac.mux_hdr.ie_type_long", FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS0x00008000,
5099 VALS(mux_hdr_ie_type_mac_ext_012_vals)((0 ? (const struct _value_string*)0 : ((mux_hdr_ie_type_mac_ext_012_vals
))))
, 0x3F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5100 },
5101 { &hf_dect_nr_mux_ie_type_short_pl0,
5102 { "IE type (no payload)", "dect_nr.mac.mux_hdr.ie_type_short_pl0", FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS0x00008000,
5103 VALS(mux_hdr_ie_type_mac_ext_3_pl_0_vals)((0 ? (const struct _value_string*)0 : ((mux_hdr_ie_type_mac_ext_3_pl_0_vals
))))
, 0x1F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5104 },
5105 { &hf_dect_nr_mux_ie_type_short_pl1,
5106 { "IE type (1-byte payload)", "dect_nr.mac.mux_hdr.ie_type_short_pl1", FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS0x00008000,
5107 VALS(mux_hdr_ie_type_mac_ext_3_pl_1_vals)((0 ? (const struct _value_string*)0 : ((mux_hdr_ie_type_mac_ext_3_pl_1_vals
))))
, 0x1F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5108 },
5109 { &hf_dect_nr_mux_mac_ie_len,
5110 { "IE length in bytes", "dect_nr.mac.mux_hdr.ie_len", FT_UINT16, BASE_DEC,
5111 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5112 },
5113
5114 /* 6.4.2: MAC Messages */
5115
5116 /* 6.4.2.2: Network Beacon message */
5117 { &hf_dect_nr_nb_msg,
5118 { "Network Beacon message", "dect_nr.mac.nb", FT_NONE, BASE_NONE,
5119 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5120 },
5121 { &hf_dect_nr_nb_res1,
5122 { "Reserved", "dect_nr.mac.nb.res1", FT_UINT8, BASE_DEC,
5123 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5124 },
5125 { &hf_dect_nr_nb_tx_pwr_field,
5126 { "TX Power", "dect_nr.mac.nb.tx_pwr_field", FT_BOOLEAN, 8,
5127 TFS(&tfs_included_not_included)((0 ? (const struct true_false_string*)0 : ((&tfs_included_not_included
))))
, 0x10, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5128 },
5129 { &hf_dect_nr_nb_pwr_const,
5130 { "Power Const", "dect_nr.mac.nb.pwr_const", FT_BOOLEAN, 8,
5131 TFS(&tfs_yes_no)((0 ? (const struct true_false_string*)0 : ((&tfs_yes_no)
)))
, 0x08, "Power Constraints", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5132 },
5133 { &hf_dect_nr_nb_current_field,
5134 { "Current", "dect_nr.mac.nb.current_field", FT_BOOLEAN, 8,
5135 TFS(&nb_ie_current_tfs)((0 ? (const struct true_false_string*)0 : ((&nb_ie_current_tfs
))))
, 0x04, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5136 },
5137 { &hf_dect_nr_nb_channels,
5138 { "Network beacon channels", "dect_nr.mac.nb.nb_channels", FT_UINT8, BASE_DEC,
5139 NULL((void*)0), 0x03, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5140 },
5141 { &hf_dect_nr_nb_nb_period,
5142 { "Network beacon period", "dect_nr.mac.nb.nb_period", FT_UINT8, BASE_DEC,
5143 VALS(nb_ie_nb_period_vals)((0 ? (const struct _value_string*)0 : ((nb_ie_nb_period_vals
))))
, 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5144 },
5145 { &hf_dect_nr_nb_cb_period,
5146 { "Cluster beacon period", "dect_nr.mac.nb.cb_period", FT_UINT8, BASE_DEC,
5147 VALS(nb_ie_cb_period_vals)((0 ? (const struct _value_string*)0 : ((nb_ie_cb_period_vals
))))
, 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5148 },
5149 { &hf_dect_nr_nb_res2,
5150 { "Reserved", "dect_nr.mac.nb.res2", FT_UINT8, BASE_DEC,
5151 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5152 },
5153 { &hf_dect_nr_nb_next_cl_chan,
5154 { "Next Cluster Channel", "dect_nr.mac.nb.next_cl_chan", FT_UINT16, BASE_DEC,
5155 NULL((void*)0), 0x1FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5156 },
5157 { &hf_dect_nr_nb_time_to_next,
5158 { "Time to next", "dect_nr.mac.nb.ttn", FT_UINT32, BASE_DEC|BASE_UNIT_STRING0x00001000,
5159 UNS(&units_microseconds)((0 ? (const struct unit_name_string*)0 : ((&units_microseconds
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5160 },
5161 { &hf_dect_nr_nb_res3,
5162 { "Reserved", "dect_nr.mac.nb.res3", FT_UINT8, BASE_DEC,
5163 NULL((void*)0), 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5164 },
5165 { &hf_dect_nr_nb_cl_max_tx_pwr,
5166 { "Clusters Max TX Power", "dect_nr.mac.nb.cl_max_tx_pwr", FT_UINT8, BASE_DEC,
5167 VALS(tx_powers_3b_vals)((0 ? (const struct _value_string*)0 : ((tx_powers_3b_vals)))
)
, 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5168 },
5169 { &hf_dect_nr_nb_res4,
5170 { "Reserved", "dect_nr.mac.nb.res4", FT_UINT8, BASE_DEC,
5171 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5172 },
5173 { &hf_dect_nr_nb_curr_cl_chan,
5174 { "Current Cluster Channel", "dect_nr.mac.nb.curr_cl_chan", FT_UINT16, BASE_DEC,
5175 NULL((void*)0), 0x1FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5176 },
5177 { &hf_dect_nr_nb_res5,
5178 { "Reserved", "dect_nr.mac.nb.res5", FT_UINT8, BASE_DEC,
5179 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5180 },
5181 { &hf_dect_nr_nb_additional_nb_channels,
5182 { "Additional Network Beacon Channels", "dect_nr.mac.nb.additional_nb_channels", FT_UINT16, BASE_DEC,
5183 NULL((void*)0), 0x1FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5184 },
5185
5186 /* 6.4.2.3: Cluster Beacon message */
5187 { &hf_dect_nr_cb_msg,
5188 { "Cluster Beacon message", "dect_nr.mac.cb", FT_NONE, BASE_NONE,
5189 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5190 },
5191 { &hf_dect_nr_cb_sfn,
5192 { "System Frame Number", "dect_nr.mac.cb.sfn", FT_UINT8, BASE_DEC,
5193 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5194 },
5195 { &hf_dect_nr_cb_res1,
5196 { "Reserved", "dect_nr.mac.cb.res1", FT_UINT8, BASE_DEC,
5197 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5198 },
5199 { &hf_dect_nr_cb_tx_pwr_field,
5200 { "TX Power", "dect_nr.mac.cb.tx_pwr_field", FT_BOOLEAN, 8,
5201 TFS(&tfs_included_not_included)((0 ? (const struct true_false_string*)0 : ((&tfs_included_not_included
))))
, 0x10, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5202 },
5203 { &hf_dect_nr_cb_pwr_const,
5204 { "Power Const", "dect_nr.mac.cb.pwr_const", FT_BOOLEAN, 8,
5205 TFS(&tfs_yes_no)((0 ? (const struct true_false_string*)0 : ((&tfs_yes_no)
)))
, 0x08, "Power Constraints", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5206 },
5207 { &hf_dect_nr_cb_fo_field,
5208 { "FO", "dect_nr.mac.cb.fo_field", FT_BOOLEAN, 8,
5209 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x04, "Frame Offset", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5210 },
5211 { &hf_dect_nr_cb_next_chan_field,
5212 { "Next Channel", "dect_nr.mac.cb.next_chan_field", FT_BOOLEAN, 8,
5213 TFS(&cb_next_chan_tfs)((0 ? (const struct true_false_string*)0 : ((&cb_next_chan_tfs
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5214 },
5215 { &hf_dect_nr_cb_time_to_next_field,
5216 { "Time to next", "dect_nr.mac.cb.ttn_field", FT_BOOLEAN, 8,
5217 TFS(&cb_ttn_tfs)((0 ? (const struct true_false_string*)0 : ((&cb_ttn_tfs)
)))
, 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5218 },
5219 { &hf_dect_nr_cb_nb_period,
5220 { "Network beacon period", "dect_nr.mac.cb.nb_period", FT_UINT8, BASE_DEC,
5221 VALS(nb_ie_nb_period_vals)((0 ? (const struct _value_string*)0 : ((nb_ie_nb_period_vals
))))
, 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5222 },
5223 { &hf_dect_nr_cb_cb_period,
5224 { "Cluster beacon period", "dect_nr.mac.cb.cb_period", FT_UINT8, BASE_DEC,
5225 VALS(nb_ie_cb_period_vals)((0 ? (const struct _value_string*)0 : ((nb_ie_cb_period_vals
))))
, 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5226 },
5227 { &hf_dect_nr_cb_ctt,
5228 { "Count To Trigger", "dect_nr.mac.cb.ctt", FT_UINT8, BASE_DEC,
5229 NULL((void*)0), 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5230 },
5231 { &hf_dect_nr_cb_rel_qual,
5232 { "Relative Quality", "dect_nr.mac.cb.rel_qual", FT_UINT8, BASE_DEC,
5233 NULL((void*)0), 0x0C, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5234 },
5235 { &hf_dect_nr_cb_min_qual,
5236 { "Minimum Quality", "dect_nr.mac.cb.min_qual", FT_UINT8, BASE_DEC,
5237 NULL((void*)0), 0x03, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5238 },
5239 { &hf_dect_nr_cb_res2,
5240 { "Reserved", "dect_nr.mac.cb.res2", FT_UINT8, BASE_DEC,
5241 NULL((void*)0), 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5242 },
5243 { &hf_dect_nr_cb_cl_max_tx_pwr,
5244 { "Cluster Max TX Power", "dect_nr.mac.cb.cl_max_tx_pwr", FT_UINT8, BASE_DEC,
5245 VALS(tx_powers_3b_vals)((0 ? (const struct _value_string*)0 : ((tx_powers_3b_vals)))
)
, 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5246 },
5247 { &hf_dect_nr_cb_frame_offset,
5248 { "Frame Offset", "dect_nr.mac.cb.frame_offset", FT_UINT8, BASE_DEC,
5249 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5250 },
5251 { &hf_dect_nr_cb_res3,
5252 { "Reserved", "dect_nr.mac.cb.res3", FT_UINT8, BASE_DEC,
5253 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5254 },
5255 { &hf_dect_nr_cb_next_cl_chan,
5256 { "Next Cluster Channel", "dect_nr.mac.cb.next_cl_chan", FT_UINT16, BASE_DEC,
5257 NULL((void*)0), 0x1FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5258 },
5259 { &hf_dect_nr_cb_time_to_next,
5260 { "Time to next", "dect_nr.mac.cb.ttn", FT_UINT32, BASE_DEC|BASE_UNIT_STRING0x00001000,
5261 UNS(&units_microseconds)((0 ? (const struct unit_name_string*)0 : ((&units_microseconds
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5262 },
5263
5264 /* 6.4.2.4: Association Request message */
5265 { &hf_dect_nr_a_req_msg,
5266 { "Association Request message", "dect_nr.mac.areq", FT_NONE, BASE_NONE,
5267 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5268 },
5269 { &hf_dect_nr_a_req_setup_cause,
5270 { "Setup Cause", "dect_nr.mac.areq.sc", FT_UINT8, BASE_DEC,
5271 VALS(ar_setup_cause_vals)((0 ? (const struct _value_string*)0 : ((ar_setup_cause_vals)
)))
, 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5272 },
5273 { &hf_dect_nr_a_req_num_flows,
5274 { "Number of flows", "dect_nr.mac.areq.num_flows", FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS0x00008000,
5275 VALS(a_req_num_flow_vals)((0 ? (const struct _value_string*)0 : ((a_req_num_flow_vals)
)))
, 0x1C, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5276 },
5277 { &hf_dect_nr_a_req_pwr_const,
5278 { "Power Const", "dect_nr.mac.areq.pwr_const", FT_BOOLEAN, 8,
5279 TFS(&tfs_yes_no)((0 ? (const struct true_false_string*)0 : ((&tfs_yes_no)
)))
, 0x02, "Power Constraints", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5280 },
5281 { &hf_dect_nr_a_req_ft_mode_field,
5282 { "FT Mode", "dect_nr.mac.areq.ft_mode_field", FT_BOOLEAN, 8,
5283 TFS(&ar_ft_mode_tfs)((0 ? (const struct true_false_string*)0 : ((&ar_ft_mode_tfs
))))
, 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5284 },
5285 { &hf_dect_nr_a_req_current,
5286 { "Current", "dect_nr.mac.areq.current_field", FT_BOOLEAN, 8,
5287 TFS(&nb_ie_current_tfs)((0 ? (const struct true_false_string*)0 : ((&nb_ie_current_tfs
))))
, 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5288 },
5289 { &hf_dect_nr_a_req_res1,
5290 { "Reserved", "dect_nr.mac.areq.res1", FT_UINT8, BASE_DEC,
5291 NULL((void*)0), 0x7F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5292 },
5293 { &hf_dect_nr_a_req_harq_proc_tx,
5294 { "HARQ Processes TX", "dect_nr.mac.areq.harq_proc_tx", FT_UINT8, BASE_DEC,
5295 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5296 },
5297 { &hf_dect_nr_a_req_max_harq_retx,
5298 { "Max HARQ RE-TX", "dect_nr.mac.areq.max_harq_retx", FT_UINT8, BASE_DEC,
5299 VALS(ar_max_harq_re_rxtx_vals)((0 ? (const struct _value_string*)0 : ((ar_max_harq_re_rxtx_vals
))))
, 0x1F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5300 },
5301 { &hf_dect_nr_a_req_harq_proc_rx,
5302 { "HARQ Processes RX", "dect_nr.mac.areq.harq_proc_rx", FT_UINT8, BASE_DEC,
5303 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5304 },
5305 { &hf_dect_nr_a_req_max_harq_rerx,
5306 { "Max HARQ RE-RX", "dect_nr.mac.areq.max_harq_rerx", FT_UINT8, BASE_DEC,
5307 VALS(ar_max_harq_re_rxtx_vals)((0 ? (const struct _value_string*)0 : ((ar_max_harq_re_rxtx_vals
))))
, 0x1F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5308 },
5309 { &hf_dect_nr_a_req_res2,
5310 { "Reserved", "dect_nr.mac.areq.res2", FT_UINT8, BASE_DEC,
5311 NULL((void*)0), 0xC0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5312 },
5313 { &hf_dect_nr_a_req_flow_id,
5314 { "Flow ID", "dect_nr.mac.areq.flow_id", FT_UINT8, BASE_DEC,
5315 VALS(mux_hdr_ie_type_mac_ext_012_vals)((0 ? (const struct _value_string*)0 : ((mux_hdr_ie_type_mac_ext_012_vals
))))
, 0x3F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5316 },
5317 { &hf_dect_nr_a_req_nb_period,
5318 { "Network beacon period", "dect_nr.mac.areq.nb_period", FT_UINT8, BASE_DEC,
5319 VALS(nb_ie_nb_period_vals)((0 ? (const struct _value_string*)0 : ((nb_ie_nb_period_vals
))))
, 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5320 },
5321 { &hf_dect_nr_a_req_cb_period,
5322 { "Cluster beacon period", "dect_nr.mac.areq.cb_period", FT_UINT8, BASE_DEC,
5323 VALS(nb_ie_cb_period_vals)((0 ? (const struct _value_string*)0 : ((nb_ie_cb_period_vals
))))
, 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5324 },
5325 { &hf_dect_nr_a_req_res3,
5326 { "Reserved", "dect_nr.mac.areq.res3", FT_UINT8, BASE_DEC,
5327 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5328 },
5329 { &hf_dect_nr_a_req_next_cl_chan,
5330 { "Next Cluster Channel", "dect_nr.mac.areq.next_cl_chan", FT_UINT16, BASE_DEC,
5331 NULL((void*)0), 0x1FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5332 },
5333 { &hf_dect_nr_a_req_time_to_next,
5334 { "Time to next", "dect_nr.mac.areq.ttn", FT_UINT32, BASE_DEC|BASE_UNIT_STRING0x00001000,
5335 UNS(&units_microseconds)((0 ? (const struct unit_name_string*)0 : ((&units_microseconds
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5336 },
5337 { &hf_dect_nr_a_req_res4,
5338 { "Reserved", "dect_nr.mac.areq.res4", FT_UINT8, BASE_DEC,
5339 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5340 },
5341 { &hf_dect_nr_a_req_curr_cl_chan,
5342 { "Current Cluster Channel", "dect_nr.mac.areq.curr_cl_chan", FT_UINT16, BASE_DEC,
5343 NULL((void*)0), 0x1FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5344 },
5345
5346 /* 6.4.2.5: Association Response message */
5347 { &hf_dect_nr_a_rsp_msg,
5348 { "Association Response message", "dect_nr.mac.arsp", FT_NONE, BASE_NONE,
5349 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5350 },
5351 { &hf_dect_nr_a_rsp_ack_field,
5352 { "ACK/NACK", "dect_nr.mac.arsp.ack_nack_field", FT_BOOLEAN, 8,
5353 TFS(&tfs_accepted_rejected)((0 ? (const struct true_false_string*)0 : ((&tfs_accepted_rejected
))))
, 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5354 },
5355 { &hf_dect_nr_a_rsp_res1,
5356 { "Reserved", "dect_nr.mac.arsp.res1", FT_UINT8, BASE_DEC,
5357 NULL((void*)0), 0x40, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5358 },
5359 { &hf_dect_nr_a_rsp_harq_mod_field,
5360 { "HARQ-mod", "dect_nr.mac.arsp.harq_mod_field", FT_BOOLEAN, 8,
5361 TFS(&ar_harq_mod_tfs)((0 ? (const struct true_false_string*)0 : ((&ar_harq_mod_tfs
))))
, 0x20, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5362 },
5363 { &hf_dect_nr_a_rsp_num_flows,
5364 { "Number of flows", "dect_nr.mac.arsp.num_flows", FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS0x00008000,
5365 VALS(a_rsp_num_flow_vals)((0 ? (const struct _value_string*)0 : ((a_rsp_num_flow_vals)
)))
, 0x1C, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5366 },
5367 { &hf_dect_nr_a_rsp_group_field,
5368 { "Group", "dect_nr.mac.arsp.group_field", FT_BOOLEAN, 8,
5369 TFS(&tfs_included_not_included)((0 ? (const struct true_false_string*)0 : ((&tfs_included_not_included
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5370 },
5371 { &hf_dect_nr_a_rsp_res2,
5372 { "Reserved", "dect_nr.mac.arsp.res2", FT_UINT8, BASE_DEC,
5373 NULL((void*)0), 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5374 },
5375 { &hf_dect_nr_a_rsp_rej_cause,
5376 { "Reject Cause", "dect_nr.mac.arsp.rej_cause", FT_UINT8, BASE_DEC,
5377 VALS(assoc_rej_cause_vals)((0 ? (const struct _value_string*)0 : ((assoc_rej_cause_vals
))))
, 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5378 },
5379 { &hf_dect_nr_a_rsp_rej_timer,
5380 { "Reject Timer", "dect_nr.mac.arsp.rej_timer", FT_UINT8, BASE_DEC,
5381 VALS(assoc_rej_time_vals)((0 ? (const struct _value_string*)0 : ((assoc_rej_time_vals)
)))
, 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5382 },
5383 { &hf_dect_nr_a_rsp_harq_proc_rx,
5384 { "HARQ Processes RX", "dect_nr.mac.arsp.harq_proc_rx", FT_UINT8, BASE_DEC,
5385 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5386 },
5387 { &hf_dect_nr_a_rsp_max_harq_rerx,
5388 { "Max HARQ RE-RX", "dect_nr.mac.arsp.max_harq_rerx", FT_UINT8, BASE_DEC,
5389 VALS(ar_max_harq_re_rxtx_vals)((0 ? (const struct _value_string*)0 : ((ar_max_harq_re_rxtx_vals
))))
, 0x1F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5390 },
5391 { &hf_dect_nr_a_rsp_harq_proc_tx,
5392 { "HARQ Processes TX", "dect_nr.mac.arsp.harq_proc_tx", FT_UINT8, BASE_DEC,
5393 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5394 },
5395 { &hf_dect_nr_a_rsp_max_harq_retx,
5396 { "(RX) Max HARQ RE-TX", "dect_nr.mac.arsp.max_harq_retx", FT_UINT8, BASE_DEC,
5397 VALS(ar_max_harq_re_rxtx_vals)((0 ? (const struct _value_string*)0 : ((ar_max_harq_re_rxtx_vals
))))
, 0x1F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5398 },
5399 { &hf_dect_nr_a_rsp_res3,
5400 { "Reserved", "dect_nr.mac.arsp.res3", FT_UINT8, BASE_DEC,
5401 NULL((void*)0), 0xC0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5402 },
5403 { &hf_dect_nr_a_rsp_flow_id,
5404 { "Flow ID", "dect_nr.mac.arsp.flow_id", FT_UINT8, BASE_DEC,
5405 VALS(mux_hdr_ie_type_mac_ext_012_vals)((0 ? (const struct _value_string*)0 : ((mux_hdr_ie_type_mac_ext_012_vals
))))
, 0x3F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5406 },
5407 { &hf_dect_nr_a_rsp_res4,
5408 { "Reserved", "dect_nr.mac.arsp.res4", FT_UINT8, BASE_DEC,
5409 NULL((void*)0), 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5410 },
5411 { &hf_dect_nr_a_rsp_group_id,
5412 { "Group ID", "dect_nr.mac.arsp.group_id", FT_UINT8, BASE_DEC,
5413 NULL((void*)0), 0x7F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5414 },
5415 { &hf_dect_nr_a_rsp_res5,
5416 { "Reserved", "dect_nr.mac.arsp.res5", FT_UINT8, BASE_DEC,
5417 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5418 },
5419 { &hf_dect_nr_a_rsp_res_tag,
5420 { "Resource Tag", "dect_nr.mac.arsp.res_tag", FT_UINT8, BASE_DEC,
5421 NULL((void*)0), 0x1F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5422 },
5423 { &hf_dect_nr_a_rsp_res6,
5424 { "Reserved", "dect_nr.mac.arsp.res6", FT_UINT8, BASE_DEC,
5425 NULL((void*)0), 0x7F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5426 },
5427
5428 /* 6.4.2.6: Association Release message */
5429 { &hf_dect_nr_a_rel_msg,
5430 { "Association Release message", "dect_nr.mac.arel", FT_NONE, BASE_NONE,
5431 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5432 },
5433 { &hf_dect_nr_a_rel_cause,
5434 { "Release Cause", "dect_nr.mac.arel.cause", FT_UINT8, BASE_DEC,
5435 VALS(assoc_rel_cause_vals)((0 ? (const struct _value_string*)0 : ((assoc_rel_cause_vals
))))
, 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5436 },
5437 { &hf_dect_nr_a_rel_res1,
5438 { "Reserved", "dect_nr.mac.arel.res1", FT_UINT8, BASE_DEC,
5439 NULL((void*)0), 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5440 },
5441
5442 /* 6.4.2.7: Reconfiguration Request message */
5443 { &hf_dect_nr_rc_req_msg,
5444 { "Reconfiguration Request message", "dect_nr.mac.rcreq", FT_NONE, BASE_NONE,
5445 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5446 },
5447 { &hf_dect_nr_rc_req_tx_harq_field,
5448 { "TX HARQ", "dect_nr.mac.rcreq.tx_harq_field", FT_BOOLEAN, 8,
5449 TFS(&rc_harq_req_tfs)((0 ? (const struct true_false_string*)0 : ((&rc_harq_req_tfs
))))
, 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5450 },
5451 { &hf_dect_nr_rc_req_rx_harq_field,
5452 { "RX HARQ", "dect_nr.mac.rcreq.rx_harq_field", FT_BOOLEAN, 8,
5453 TFS(&rc_harq_req_tfs)((0 ? (const struct true_false_string*)0 : ((&rc_harq_req_tfs
))))
, 0x40, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5454 },
5455 { &hf_dect_nr_rc_req_rd_capability,
5456 { "RD Capability", "dect_nr.mac.rcreq.rd_capability", FT_BOOLEAN, 8,
5457 TFS(&rc_rd_capability_req_tfs)((0 ? (const struct true_false_string*)0 : ((&rc_rd_capability_req_tfs
))))
, 0x20, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5458 },
5459 { &hf_dect_nr_rc_req_num_flows,
5460 { "Number of flows", "dect_nr.mac.rcreq.num_flows", FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS0x00008000,
5461 VALS(rc_req_num_flow_vals)((0 ? (const struct _value_string*)0 : ((rc_req_num_flow_vals
))))
, 0x1C, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5462 },
5463 { &hf_dect_nr_rc_req_radio_resources,
5464 { "Radio Resource", "dect_nr.mac.rcreq.radio_resources", FT_UINT8, BASE_DEC,
5465 VALS(rc_radio_resource_vals)((0 ? (const struct _value_string*)0 : ((rc_radio_resource_vals
))))
, 0x03, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5466 },
5467 { &hf_dect_nr_rc_req_harq_proc_tx,
5468 { "HARQ Processes TX", "dect_nr.mac.rcreq.harq_proc_tx", FT_UINT8, BASE_DEC,
5469 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5470 },
5471 { &hf_dect_nr_rc_req_max_harq_retx,
5472 { "Max HARQ RE-TX", "dect_nr.mac.rcreq.max_harq_retx", FT_UINT8, BASE_DEC,
5473 VALS(ar_max_harq_re_rxtx_vals)((0 ? (const struct _value_string*)0 : ((ar_max_harq_re_rxtx_vals
))))
, 0x1F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5474 },
5475 { &hf_dect_nr_rc_req_harq_proc_rx,
5476 { "HARQ Processes RX", "dect_nr.mac.rcreq.harq_proc_rx", FT_UINT8, BASE_DEC,
5477 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5478 },
5479 { &hf_dect_nr_rc_req_max_harq_rerx,
5480 { "Max HARQ RE-RX", "dect_nr.mac.rcreq.max_harq_rerx", FT_UINT8, BASE_DEC,
5481 VALS(ar_max_harq_re_rxtx_vals)((0 ? (const struct _value_string*)0 : ((ar_max_harq_re_rxtx_vals
))))
, 0x1F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5482 },
5483 { &hf_dect_nr_rc_req_setup_release,
5484 { "Setup/Release", "dect_nr.mac.rcreq.setup_release", FT_BOOLEAN, 8,
5485 TFS(&rc_setup_release_tfs)((0 ? (const struct true_false_string*)0 : ((&rc_setup_release_tfs
))))
, 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5486 },
5487 { &hf_dect_nr_rc_req_res,
5488 { "Reserved", "dect_nr.mac.rcreq.res1", FT_UINT8, BASE_DEC,
5489 NULL((void*)0), 0x40, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5490 },
5491 { &hf_dect_nr_rc_req_flow_id,
5492 { "Flow ID", "dect_nr.mac.rcreq.flow_id", FT_UINT8, BASE_DEC,
5493 NULL((void*)0), 0x3F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5494 },
5495
5496 /* 6.4.2.8: Reconfiguration Response message */
5497 { &hf_dect_nr_rc_rsp_msg,
5498 { "Reconfiguration Response message", "dect_nr.mac.rcrsp", FT_NONE, BASE_NONE,
5499 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5500 },
5501 { &hf_dect_nr_rc_rsp_tx_harq_field,
5502 { "TX HARQ", "dect_nr.mac.rcrsp.tx_harq_field", FT_BOOLEAN, 8,
5503 TFS(&rc_harq_rsp_tfs)((0 ? (const struct true_false_string*)0 : ((&rc_harq_rsp_tfs
))))
, 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5504 },
5505 { &hf_dect_nr_rc_rsp_rx_harq_field,
5506 { "RX HARQ", "dect_nr.mac.rcrsp.rx_harq_field", FT_BOOLEAN, 8,
5507 TFS(&rc_harq_rsp_tfs)((0 ? (const struct true_false_string*)0 : ((&rc_harq_rsp_tfs
))))
, 0x40, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5508 },
5509 { &hf_dect_nr_rc_rsp_rd_capability,
5510 { "RD Capability", "dect_nr.mac.rcrsp.rd_capability", FT_BOOLEAN, 8,
5511 TFS(&rc_rd_capability_rsp_tfs)((0 ? (const struct true_false_string*)0 : ((&rc_rd_capability_rsp_tfs
))))
, 0x20, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5512 },
5513 { &hf_dect_nr_rc_rsp_num_flows,
5514 { "Number of flows", "dect_nr.mac.rcrsp.num_flows", FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS0x00008000,
5515 VALS(rc_rsp_num_flow_vals)((0 ? (const struct _value_string*)0 : ((rc_rsp_num_flow_vals
))))
, 0x1C, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5516 },
5517 { &hf_dect_nr_rc_rsp_radio_resources,
5518 { "Radio Resource", "dect_nr.mac.rcrsp.radio_resources", FT_UINT8, BASE_DEC,
5519 VALS(rc_radio_resource_vals)((0 ? (const struct _value_string*)0 : ((rc_radio_resource_vals
))))
, 0x03, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5520 },
5521 { &hf_dect_nr_rc_rsp_harq_proc_tx,
5522 { "HARQ Processes TX", "dect_nr.mac.rcrsp.harq_proc_tx", FT_UINT8, BASE_DEC,
5523 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5524 },
5525 { &hf_dect_nr_rc_rsp_max_harq_retx,
5526 { "Max HARQ RE-TX", "dect_nr.mac.rcrsp.max_harq_retx", FT_UINT8, BASE_DEC,
5527 VALS(ar_max_harq_re_rxtx_vals)((0 ? (const struct _value_string*)0 : ((ar_max_harq_re_rxtx_vals
))))
, 0x1F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5528 },
5529 { &hf_dect_nr_rc_rsp_harq_proc_rx,
5530 { "HARQ Processes RX", "dect_nr.mac.rcrsp.harq_proc_rx", FT_UINT8, BASE_DEC,
5531 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5532 },
5533 { &hf_dect_nr_rc_rsp_max_harq_rerx,
5534 { "Max HARQ RE-RX", "dect_nr.mac.rcrsp.max_harq_rerx", FT_UINT8, BASE_DEC,
5535 VALS(ar_max_harq_re_rxtx_vals)((0 ? (const struct _value_string*)0 : ((ar_max_harq_re_rxtx_vals
))))
, 0x1F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5536 },
5537 { &hf_dect_nr_rc_rsp_setup_release,
5538 { "Setup/Release", "dect_nr.mac.rcrsp.setup_release", FT_BOOLEAN, 8,
5539 TFS(&rc_setup_release_tfs)((0 ? (const struct true_false_string*)0 : ((&rc_setup_release_tfs
))))
, 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5540 },
5541 { &hf_dect_nr_rc_rsp_res,
5542 { "Reserved", "dect_nr.mac.rcrsp.res1", FT_UINT8, BASE_DEC,
5543 NULL((void*)0), 0x40, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5544 },
5545 { &hf_dect_nr_rc_rsp_flow_id,
5546 { "Flow ID", "dect_nr.mac.rcrsp.flow_id", FT_UINT8, BASE_DEC,
5547 NULL((void*)0), 0x3F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5548 },
5549
5550 /* 6.4.2.9: Additional MAC message */
5551 { &hf_dect_nr_am_msg,
5552 { "Additional MAC message", "dect_nr.mac.am", FT_NONE, BASE_NONE,
5553 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5554 },
5555
5556 /* 6.4.2.10 Joining Beacon message */
5557 { &hf_dect_nr_jb_msg,
5558 { "Joining Beacon message", "dect_nr.mac.jb", FT_NONE, BASE_NONE,
5559 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5560 },
5561 { &hf_dect_nr_jb_nb_channels,
5562 { "Network beacon channels", "dect_nr.mac.jb.nb_channels", FT_UINT8, BASE_DEC,
5563 NULL((void*)0), 0xC0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5564 },
5565 { &hf_dect_nr_jb_nb_period,
5566 { "Network beacon period", "dect_nr.mac.jb.nb_period", FT_UINT8, BASE_DEC,
5567 VALS(nb_ie_nb_period_vals)((0 ? (const struct _value_string*)0 : ((nb_ie_nb_period_vals
))))
, 0x3C, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5568 },
5569 { &hf_dect_nr_jb_res1,
5570 { "Reserved", "dect_nr.mac.jb.res1", FT_UINT8, BASE_DEC,
5571 NULL((void*)0), 0x03, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5572 },
5573 { &hf_dect_nr_jb_res2,
5574 { "Reserved", "dect_nr.mac.jb.res2", FT_UINT16, BASE_DEC,
5575 NULL((void*)0), 0xE000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5576 },
5577 { &hf_dect_nr_jb_nc,
5578 { "Network Channel", "dect_nr.mac.jb.network_channel", FT_UINT16, BASE_DEC,
5579 NULL((void*)0), 0x1FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5580 },
5581
5582 /* 6.4.3: MAC Information Elements */
5583
5584 /* 6.4.3.1: MAC Security Info IE */
5585 { &hf_dect_nr_msi_ie,
5586 { "MAC Security Info IE", "dect_nr.mac.msi", FT_NONE, BASE_NONE,
5587 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5588 },
5589 { &hf_dect_nr_msi_version,
5590 { "Version", "dect_nr.mac.msi.version", FT_UINT8, BASE_DEC,
5591 VALS(msi_version_vals)((0 ? (const struct _value_string*)0 : ((msi_version_vals)))), 0xC0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5592 },
5593 { &hf_dect_nr_msi_key,
5594 { "Key Index", "dect_nr.mac.msi.key", FT_UINT8, BASE_DEC,
5595 NULL((void*)0), 0x30, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5596 },
5597 { &hf_dect_nr_msi_ivt,
5598 { "Security IV Type", "dect_nr.mac.msi.ivt", FT_UINT8, BASE_DEC,
5599 VALS(msi_ivt_vals)((0 ? (const struct _value_string*)0 : ((msi_ivt_vals)))), 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5600 },
5601 { &hf_dect_nr_msi_hpc,
5602 { "HPC", "dect_nr.mac.msi.hpc", FT_UINT32, BASE_HEX,
5603 NULL((void*)0), 0x0, "Hyper Packet Counter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5604 },
5605
5606 /* 6.4.3.2: Route Info IE */
5607 { &hf_dect_nr_ri_ie,
5608 { "Route Info IE", "dect_nr.mac.ri", FT_NONE, BASE_NONE,
5609 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5610 },
5611 { &hf_dect_nr_ri_sink_address,
5612 { "Sink Address", "dect_nr.mac.ri.sink_address", FT_UINT32, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
5613 VALS(long_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((long_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5614 },
5615 { &hf_dect_nr_ri_route_cost,
5616 { "Route Cost", "dect_nr.mac.ri.route_cost", FT_UINT8, BASE_DEC,
5617 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5618 },
5619 { &hf_dect_nr_ri_application_sn,
5620 { "Application Sequence Number", "dect_nr.mac.ri.application_sn", FT_UINT8, BASE_DEC,
5621 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5622 },
5623
5624 /* 6.4.3.3: Resource Allocation IE */
5625 { &hf_dect_nr_ra_ie,
5626 { "Resource Allocation IE", "dect_nr.mac.ra", FT_NONE, BASE_NONE,
5627 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5628 },
5629 { &hf_dect_nr_ra_alloc_type,
5630 { "Allocation Type", "dect_nr.mac.ra.alloc_type", FT_UINT8, BASE_DEC,
5631 VALS(ra_alloc_type_vals)((0 ? (const struct _value_string*)0 : ((ra_alloc_type_vals))
))
, 0xC0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5632 },
5633 { &hf_dect_nr_ra_add_field,
5634 { "Add", "dect_nr.mac.ra.add_field", FT_BOOLEAN, 8,
5635 TFS(&ra_add_tfs)((0 ? (const struct true_false_string*)0 : ((&ra_add_tfs)
)))
, 0x20, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5636 },
5637 { &hf_dect_nr_ra_id_field,
5638 { "ID", "dect_nr.mac.ra.id_field", FT_BOOLEAN, 8,
5639 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x10, "Short RD ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5640 },
5641 { &hf_dect_nr_ra_repeat,
5642 { "Repeat", "dect_nr.mac.ra.repeat", FT_UINT8, BASE_DEC,
5643 VALS(ra_repeat_vals)((0 ? (const struct _value_string*)0 : ((ra_repeat_vals)))), 0x0E, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5644 },
5645 { &hf_dect_nr_ra_sfn_field,
5646 { "SFN", "dect_nr.mac.ra.sfn_field", FT_BOOLEAN, 8,
5647 TFS(&ra_sfn_tfs)((0 ? (const struct true_false_string*)0 : ((&ra_sfn_tfs)
)))
, 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5648 },
5649 { &hf_dect_nr_ra_channel_field,
5650 { "Channel", "dect_nr.mac.ra.channel_field", FT_BOOLEAN, 8,
5651 TFS(&ra_channel_tfs)((0 ? (const struct true_false_string*)0 : ((&ra_channel_tfs
))))
, 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5652 },
5653 { &hf_dect_nr_ra_rlf_field,
5654 { "RLF", "dect_nr.mac.ra.rlf_field", FT_BOOLEAN, 8,
5655 TFS(&tfs_included_not_included)((0 ? (const struct true_false_string*)0 : ((&tfs_included_not_included
))))
, 0x40, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5656 },
5657 { &hf_dect_nr_ra_res1,
5658 { "Reserved", "dect_nr.mac.ra.res1", FT_UINT8, BASE_DEC,
5659 NULL((void*)0), 0x3F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5660 },
5661 { &hf_dect_nr_ra_res2,
5662 { "Reserved", "dect_nr.mac.ra.res2", FT_UINT16, BASE_DEC,
5663 NULL((void*)0), 0xE000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5664 },
5665 { &hf_dect_nr_ra_start_ss_dl_9,
5666 { "DL Start subslot", "dect_nr.mac.ra.start_ss_dl", FT_UINT16, BASE_DEC,
5667 NULL((void*)0), 0x1FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5668 },
5669 { &hf_dect_nr_ra_start_ss_dl_8,
5670 { "DL Start subslot", "dect_nr.mac.ra.start_ss_dl", FT_UINT8, BASE_DEC,
5671 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5672 },
5673 { &hf_dect_nr_ra_len_type_dl,
5674 { "DL Length type", "dect_nr.mac.ra.len_type_dl", FT_UINT8, BASE_DEC,
5675 NULL((void*)0), 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5676 },
5677 { &hf_dect_nr_ra_len_dl,
5678 { "DL Length", "dect_nr.mac.ra.len_dl", FT_UINT8, BASE_DEC,
5679 NULL((void*)0), 0x7F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5680 },
5681 { &hf_dect_nr_ra_start_ss_ul_9,
5682 { "UL Start subslot", "dect_nr.mac.ra.start_ss_ul", FT_UINT16, BASE_DEC,
5683 NULL((void*)0), 0x1FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5684 },
5685 { &hf_dect_nr_ra_start_ss_ul_8,
5686 { "UL Start subslot", "dect_nr.mac.ra.start_ss_ul", FT_UINT8, BASE_DEC,
5687 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5688 },
5689 { &hf_dect_nr_ra_len_type_ul,
5690 { "UL Length type", "dect_nr.mac.ra.len_type_ul", FT_UINT8, BASE_DEC,
5691 NULL((void*)0), 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5692 },
5693 { &hf_dect_nr_ra_len_ul,
5694 { "UL Length", "dect_nr.mac.ra.len_ul", FT_UINT8, BASE_DEC,
5695 NULL((void*)0), 0x7F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5696 },
5697 { &hf_dect_nr_ra_short_rd_id,
5698 { "Short RD ID", "dect_nr.mac.ra.short_rd_id", FT_UINT16, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
5699 VALS(short_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((short_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5700 },
5701 { &hf_dect_nr_ra_repetition,
5702 { "Repetition", "dect_nr.mac.ra.repetition", FT_UINT8, BASE_DEC,
5703 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5704 },
5705 { &hf_dect_nr_ra_validity,
5706 { "Validity", "dect_nr.mac.ra.validity", FT_UINT8, BASE_DEC,
5707 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5708 },
5709 { &hf_dect_nr_ra_sfn_value,
5710 { "SFN value", "dect_nr.mac.ra.sfn_value", FT_UINT8, BASE_DEC,
5711 NULL((void*)0), 0x0, "System Frame Number Value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5712 },
5713 { &hf_dect_nr_ra_res3,
5714 { "Reserved", "dect_nr.mac.ra.res3", FT_UINT16, BASE_DEC,
5715 NULL((void*)0), 0xE000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5716 },
5717 { &hf_dect_nr_ra_channel,
5718 { "Channel", "dect_nr.mac.ra.channel", FT_UINT16, BASE_DEC,
5719 NULL((void*)0), 0x1FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5720 },
5721 { &hf_dect_nr_ra_res4,
5722 { "Reserved", "dect_nr.mac.ra.res4", FT_UINT8, BASE_DEC,
5723 NULL((void*)0), 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5724 },
5725 { &hf_dect_nr_ra_rlf,
5726 { "dectScheduledResourceFailure", "dect_nr.mac.ra.scheduled_resource_failure", FT_UINT8, BASE_DEC,
5727 VALS(ra_scheduled_resource_failure_vals)((0 ? (const struct _value_string*)0 : ((ra_scheduled_resource_failure_vals
))))
, 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5728 },
5729
5730 /* 6.4.3.4: Random Access Resource IE */
5731 { &hf_dect_nr_rar_ie,
5732 { "Random Access Resource IE", "dect_nr.mac.rar", FT_NONE, BASE_NONE,
5733 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5734 },
5735 { &hf_dect_nr_rar_res1,
5736 { "Reserved", "dect_nr.mac.rar.res1", FT_UINT8, BASE_DEC,
5737 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5738 },
5739 { &hf_dect_nr_rar_repeat,
5740 { "Repeat", "dect_nr.mac.rar.repeat", FT_UINT8, BASE_DEC,
5741 VALS(rar_repeat_vals)((0 ? (const struct _value_string*)0 : ((rar_repeat_vals)))), 0x18, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5742 },
5743 { &hf_dect_nr_rar_sfn_field,
5744 { "SFN", "dect_nr.mac.rar.sfn_field", FT_BOOLEAN, 8,
5745 TFS(&rar_sfn_tfs)((0 ? (const struct true_false_string*)0 : ((&rar_sfn_tfs
))))
, 0x04, "System Frame Number", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5746 },
5747 { &hf_dect_nr_rar_channel_field,
5748 { "Channel", "dect_nr.mac.rar.channel_field", FT_BOOLEAN, 8,
5749 TFS(&rar_channel_tfs)((0 ? (const struct true_false_string*)0 : ((&rar_channel_tfs
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5750 },
5751 { &hf_dect_nr_rar_chan_2_field,
5752 { "Chan_2", "dect_nr.mac.rar.chan2_field", FT_BOOLEAN, 8,
5753 TFS(&rar_chan_2_tfs)((0 ? (const struct true_false_string*)0 : ((&rar_chan_2_tfs
))))
, 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5754 },
5755 { &hf_dect_nr_rar_res2,
5756 { "Reserved", "dect_nr.mac.rar.res2", FT_UINT16, BASE_DEC,
5757 NULL((void*)0), 0xFE00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5758 },
5759 { &hf_dect_nr_rar_start_ss_9,
5760 { "Start subslot", "dect_nr.mac.rar.start_ss", FT_UINT16, BASE_DEC,
5761 NULL((void*)0), 0x01FF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5762 },
5763 { &hf_dect_nr_rar_start_ss_8,
5764 { "Start subslot", "dect_nr.mac.rar.start_ss", FT_UINT8, BASE_DEC,
5765 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5766 },
5767 { &hf_dect_nr_rar_len_type,
5768 { "Length type", "dect_nr.mac.rar.len_type", FT_BOOLEAN, 8,
5769 TFS(&pkt_len_type_tfs)((0 ? (const struct true_false_string*)0 : ((&pkt_len_type_tfs
))))
, 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5770 },
5771 { &hf_dect_nr_rar_len,
5772 { "Length", "dect_nr.mac.rar.len", FT_UINT8, BASE_DEC,
5773 NULL((void*)0), 0x7F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5774 },
5775 { &hf_dect_nr_rar_max_len_type,
5776 { "Max Len type", "dect_nr.mac.rar.max_len_type", FT_BOOLEAN, 8,
5777 TFS(&pkt_len_type_tfs)((0 ? (const struct true_false_string*)0 : ((&pkt_len_type_tfs
))))
, 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5778 },
5779 { &hf_dect_nr_rar_max_rach_len,
5780 { "Max RACH Length", "dect_nr.mac.rar.max_rach_len", FT_UINT8, BASE_DEC,
5781 NULL((void*)0), 0x78, "Max Random Access Channel Length", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5782 },
5783 { &hf_dect_nr_rar_cw_min_sig,
5784 { "CW Min sig", "dect_nr.mac.rar.cw_min_sig", FT_UINT8, BASE_DEC,
5785 NULL((void*)0), 0x07, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5786 },
5787 { &hf_dect_nr_rar_dect_delay,
5788 { "DECT delay", "dect_nr.mac.rar.dect_delay", FT_BOOLEAN, 8,
5789 TFS(&rar_dect_delay_tfs)((0 ? (const struct true_false_string*)0 : ((&rar_dect_delay_tfs
))))
, 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5790 },
5791 { &hf_dect_nr_rar_resp_win,
5792 { "Response window", "dect_nr.mac.rar.resp_win", FT_UINT8, BASE_CUSTOM,
5793 CF_FUNC(subslot_len_cf_func)((const void *) (size_t) (subslot_len_cf_func)), 0x78, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5794 },
5795 { &hf_dect_nr_rar_cw_max_sig,
5796 { "CW Max sig", "dect_nr.mac.rar.cw_max_sig", FT_UINT8, BASE_DEC,
5797 NULL((void*)0), 0x07, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5798 },
5799 { &hf_dect_nr_rar_repetition,
5800 { "Repetition", "dect_nr.mac.rar.repetition", FT_UINT8, BASE_DEC,
5801 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5802 },
5803 { &hf_dect_nr_rar_validity,
5804 { "Validity", "dect_nr.mac.rar.validity", FT_UINT8, BASE_DEC,
5805 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5806 },
5807 { &hf_dect_nr_rar_sfn_value,
5808 { "SFN value", "dect_nr.mac.rar.sfn_value", FT_UINT8, BASE_DEC,
5809 NULL((void*)0), 0x0, "System Frame Number Value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5810 },
5811 { &hf_dect_nr_rar_res3,
5812 { "Reserved", "dect_nr.mac.rar.res3", FT_UINT16, BASE_DEC,
5813 NULL((void*)0), 0xE000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5814 },
5815 { &hf_dect_nr_rar_channel,
5816 { "Channel", "dect_nr.mac.rar.channel", FT_UINT16, BASE_DEC,
5817 NULL((void*)0), 0x1FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5818 },
5819 { &hf_dect_nr_rar_channel_2,
5820 { "Channel 2", "dect_nr.mac.rar.channel_2", FT_UINT16, BASE_DEC,
5821 NULL((void*)0), 0x1FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5822 },
5823
5824 /* 6.4.3.5: RD Capability IE */
5825 { &hf_dect_nr_rdc_ie,
5826 { "RD Capability IE", "dect_nr.mac.rdc", FT_NONE, BASE_NONE,
5827 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5828 },
5829 { &hf_dect_nr_rdc_num_phy_cap,
5830 { "Number of PHY Capabilities", "dect_nr.mac.rdc.num_phy_cap", FT_UINT8, BASE_DEC,
5831 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5832 },
5833 { &hf_dect_nr_rdc_release,
5834 { "Release", "dect_nr.mac.rdc.release", FT_UINT8, BASE_DEC,
5835 VALS(rdc_release_vals)((0 ? (const struct _value_string*)0 : ((rdc_release_vals)))), 0x1F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5836 },
5837 { &hf_dect_nr_rdc_res1,
5838 { "Reserved", "dect_nr.mac.rdc.res1", FT_UINT8, BASE_DEC,
5839 NULL((void*)0), 0xC0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5840 },
5841 { &hf_dect_nr_rdc_group_ass,
5842 { "Group Assignment", "dect_nr.mac.rdc.group_ass", FT_BOOLEAN, 8,
5843 TFS(&tfs_supported_not_supported)((0 ? (const struct true_false_string*)0 : ((&tfs_supported_not_supported
))))
, 0x20, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5844 },
5845 { &hf_dect_nr_rdc_paging,
5846 { "Paging", "dect_nr.mac.rdc.paging", FT_BOOLEAN, 8,
5847 TFS(&tfs_supported_not_supported)((0 ? (const struct true_false_string*)0 : ((&tfs_supported_not_supported
))))
, 0x10, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5848 },
5849 { &hf_dect_nr_rdc_op_modes,
5850 { "Operating Modes", "dect_nr.mac.rdc.op_modes", FT_UINT8, BASE_DEC,
5851 VALS(rdc_op_mode_vals)((0 ? (const struct _value_string*)0 : ((rdc_op_mode_vals)))), 0x0C, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5852 },
5853 { &hf_dect_nr_rdc_mesh,
5854 { "Mesh", "dect_nr.mac.rdc.mesh", FT_BOOLEAN, 8,
5855 TFS(&tfs_supported_not_supported)((0 ? (const struct true_false_string*)0 : ((&tfs_supported_not_supported
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5856 },
5857 { &hf_dect_nr_rdc_sched,
5858 { "Scheduled", "dect_nr.mac.rdc.scheduled", FT_BOOLEAN, 8,
5859 TFS(&tfs_supported_not_supported)((0 ? (const struct true_false_string*)0 : ((&tfs_supported_not_supported
))))
, 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5860 },
5861 { &hf_dect_nr_rdc_mac_security,
5862 { "MAC Security", "dect_nr.mac.rdc.mac_security", FT_UINT8, BASE_DEC,
5863 VALS(rdc_mac_security_vals)((0 ? (const struct _value_string*)0 : ((rdc_mac_security_vals
))))
, 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5864 },
5865 { &hf_dect_nr_rdc_dlc_type,
5866 { "DLC Service Type", "dect_nr.mac.rdc.dlc_type", FT_UINT8, BASE_DEC,
5867 VALS(rdc_dlc_serv_type_vals)((0 ? (const struct _value_string*)0 : ((rdc_dlc_serv_type_vals
))))
, 0x1C, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5868 },
5869 { &hf_dect_nr_rdc_res2,
5870 { "Reserved", "dect_nr.mac.rdc.res2", FT_UINT8, BASE_DEC,
5871 NULL((void*)0), 0x03, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5872 },
5873 { &hf_dect_nr_rdc_res3,
5874 { "Reserved", "dect_nr.mac.rdc.res3", FT_UINT8, BASE_DEC,
5875 NULL((void*)0), 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5876 },
5877 { &hf_dect_nr_rdc_pwr_class,
5878 { "RD Power Class", "dect_nr.mac.rdc.rd_pwr_class", FT_UINT8, BASE_DEC,
5879 VALS(rdc_pwr_class_vals)((0 ? (const struct _value_string*)0 : ((rdc_pwr_class_vals))
))
, 0x70, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5880 },
5881 { &hf_dect_nr_rdc_max_nss_rx,
5882 { "Max NSS for RX", "dect_nr.mac.rdc.max_nss_rx", FT_UINT8, BASE_DEC,
5883 VALS(rdc_pwr_two_field_vals)((0 ? (const struct _value_string*)0 : ((rdc_pwr_two_field_vals
))))
, 0x0C, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5884 },
5885 { &hf_dect_nr_rdc_rx_for_tx_div,
5886 { "RX for TX Diversity", "dect_nr.mac.rdc.rx_for_tx_div", FT_UINT8, BASE_DEC,
5887 VALS(rdc_pwr_two_field_vals)((0 ? (const struct _value_string*)0 : ((rdc_pwr_two_field_vals
))))
, 0x03, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5888 },
5889 { &hf_dect_nr_rdc_rx_gain,
5890 { "RX Gain", "dect_nr.mac.rdc.rx_gain", FT_UINT8, BASE_DEC,
5891 VALS(rdc_rx_gain_vals)((0 ? (const struct _value_string*)0 : ((rdc_rx_gain_vals)))), 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5892 },
5893 { &hf_dect_nr_rdc_max_mcs,
5894 { "Max MCS", "dect_nr.mac.rdc.max_mcs", FT_UINT8, BASE_DEC,
5895 VALS(rdc_max_mcse_vals)((0 ? (const struct _value_string*)0 : ((rdc_max_mcse_vals)))
)
, 0x0F, "Max Modulation and Coding Scheme", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5896 },
5897 { &hf_dect_nr_rdc_soft_buf_size,
5898 { "Soft-buffer Size", "dect_nr.mac.rdc.soft_buf_size", FT_UINT8, BASE_DEC,
5899 VALS(rdc_soft_buf_size_vals)((0 ? (const struct _value_string*)0 : ((rdc_soft_buf_size_vals
))))
, 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5900 },
5901 { &hf_dect_nr_rdc_num_harq_proc,
5902 { "Number of HARQ Processes", "dect_nr.mac.rdc.num_harq_proc", FT_UINT8, BASE_DEC,
5903 VALS(rdc_pwr_two_field_vals)((0 ? (const struct _value_string*)0 : ((rdc_pwr_two_field_vals
))))
, 0x0C, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5904 },
5905 { &hf_dect_nr_rdc_res4,
5906 { "Reserved", "dect_nr.mac.rdc.res4", FT_UINT8, BASE_DEC,
5907 NULL((void*)0), 0x03, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5908 },
5909 { &hf_dect_nr_rdc_harq_fb_delay,
5910 { "HARQ feedback delay", "dect_nr.mac.rdc.harq_fb_delay", FT_UINT8, BASE_DEC,
5911 VALS(rdc_harq_fb_delay_vals)((0 ? (const struct _value_string*)0 : ((rdc_harq_fb_delay_vals
))))
, 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5912 },
5913 { &hf_dect_nr_rdc_d_delay,
5914 { "D_Delay", "dect_nr.mac.rdc.d_delay", FT_BOOLEAN, 8,
5915 TFS(&tfs_supported_not_supported)((0 ? (const struct true_false_string*)0 : ((&tfs_supported_not_supported
))))
, 0x08, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5916 },
5917 { &hf_dect_nr_rdc_half_dup,
5918 { "Half Duplex", "dect_nr.mac.rdc.half_dup", FT_BOOLEAN, 8,
5919 TFS(&tfs_supported_not_supported)((0 ? (const struct true_false_string*)0 : ((&tfs_supported_not_supported
))))
, 0x04, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5920 },
5921 { &hf_dect_nr_rdc_res5,
5922 { "Reserved", "dect_nr.mac.rdc.res5", FT_UINT8, BASE_DEC,
5923 NULL((void*)0), 0x03, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5924 },
5925 { &hf_dect_nr_rdc_phy_cap,
5926 { "PHY Capability", "dect_nr.mac.rdc.phy_cap", FT_NONE, BASE_NONE,
5927 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5928 },
5929 { &hf_dect_nr_rdc_rd_class_mu,
5930 { "Radio Device Class: µ", "dect_nr.mac.rdc.rd_class_mu", FT_UINT8, BASE_DEC,
5931 VALS(rdc_pwr_two_field_vals)((0 ? (const struct _value_string*)0 : ((rdc_pwr_two_field_vals
))))
, 0xE0, "µ = Subcarrier scaling factor", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5932 },
5933 { &hf_dect_nr_rdc_rd_class_b,
5934 { "Radio Device Class: β", "dect_nr.mac.rdc.rd_class_b", FT_UINT8, BASE_DEC,
5935 VALS(rdc_fourier_factor_vals)((0 ? (const struct _value_string*)0 : ((rdc_fourier_factor_vals
))))
, 0x1E, "β = Fourier transform scaling factor", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5936 },
5937 { &hf_dect_nr_rdc_res6,
5938 { "Reserved", "dect_nr.mac.rdc.res6", FT_UINT8, BASE_DEC,
5939 NULL((void*)0), 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5940 },
5941 { &hf_dect_nr_rdc_res7,
5942 { "Reserved", "dect_nr.mac.rdc.res7", FT_UINT8, BASE_DEC,
5943 NULL((void*)0), 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5944 },
5945
5946 /* 6.4.3.6: Neighbouring IE */
5947 { &hf_dect_nr_n_ie,
5948 { "Neighbouring IE", "dect_nr.mac.n", FT_NONE, BASE_NONE,
5949 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5950 },
5951 { &hf_dect_nr_n_res1,
5952 { "Reserved", "dect_nr.mac.n.res1", FT_UINT8, BASE_DEC,
5953 NULL((void*)0), 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5954 },
5955 { &hf_dect_nr_n_id_field,
5956 { "ID", "dect_nr.mac.n.id_field", FT_BOOLEAN, 8,
5957 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x40, "Long RD ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5958 },
5959 { &hf_dect_nr_n_mu_field,
5960 { "µ", "dect_nr.mac.n.mu_field", FT_BOOLEAN, 8,
5961 TFS(&radio_device_class_tfs)((0 ? (const struct true_false_string*)0 : ((&radio_device_class_tfs
))))
, 0x20, "Radio device class signalling", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5962 },
5963 { &hf_dect_nr_n_snr_field,
5964 { "SNR", "dect_nr.mac.n.snr_field", FT_BOOLEAN, 8,
5965 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x10, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5966 },
5967 { &hf_dect_nr_n_rssi2_field,
5968 { "RSSI-2", "dect_nr.mac.n.rssi2_field", FT_BOOLEAN, 8,
5969 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x08, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5970 },
5971 { &hf_dect_nr_n_pwr_const,
5972 { "Power Const", "dect_nr.mac.n.pwr_const", FT_BOOLEAN, 8,
5973 TFS(&tfs_yes_no)((0 ? (const struct true_false_string*)0 : ((&tfs_yes_no)
)))
, 0x04, "Power Constraints", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5974 },
5975 { &hf_dect_nr_n_next_channel_field,
5976 { "Next Channel", "dect_nr.mac.n.next_channel_field", FT_BOOLEAN, 8,
5977 TFS(&cb_next_chan_tfs)((0 ? (const struct true_false_string*)0 : ((&cb_next_chan_tfs
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5978 },
5979 { &hf_dect_nr_n_ttn_field,
5980 { "Time to next", "dect_nr.mac.n.ttn_field", FT_BOOLEAN, 8,
5981 TFS(&cb_ttn_tfs)((0 ? (const struct true_false_string*)0 : ((&cb_ttn_tfs)
)))
, 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5982 },
5983 { &hf_dect_nr_n_nb_period,
5984 { "Network beacon period", "dect_nr.mac.n.nb_period", FT_UINT8, BASE_DEC,
5985 VALS(nb_ie_nb_period_vals)((0 ? (const struct _value_string*)0 : ((nb_ie_nb_period_vals
))))
, 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5986 },
5987 { &hf_dect_nr_n_cb_period,
5988 { "Cluster beacon period", "dect_nr.mac.n.cb_period", FT_UINT8, BASE_DEC,
5989 VALS(nb_ie_cb_period_vals)((0 ? (const struct _value_string*)0 : ((nb_ie_cb_period_vals
))))
, 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5990 },
5991 { &hf_dect_nr_n_long_rd_id,
5992 { "Long RD ID", "dect_nr.mac.n.long_rd_id", FT_UINT32, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
5993 VALS(long_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((long_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5994 },
5995 { &hf_dect_nr_n_res2,
5996 { "Reserved", "dect_nr.mac.n.res2", FT_UINT8, BASE_DEC,
5997 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
5998 },
5999 { &hf_dect_nr_n_next_cl_channel,
6000 { "Next Cluster Channel", "dect_nr.mac.n.next_cl_channel", FT_UINT16, BASE_DEC,
6001 NULL((void*)0), 0x1FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6002 },
6003 { &hf_dect_nr_n_time_to_next,
6004 { "Time to next", "dect_nr.mac.n.ttn", FT_UINT32, BASE_DEC|BASE_UNIT_STRING0x00001000,
6005 UNS(&units_microseconds)((0 ? (const struct unit_name_string*)0 : ((&units_microseconds
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6006 },
6007 { &hf_dect_nr_n_rssi2,
6008 { "RSSI-2", "dect_nr.mac.n.rssi2", FT_UINT8, BASE_CUSTOM,
6009 CF_FUNC(format_rssi_result_cf_func)((const void *) (size_t) (format_rssi_result_cf_func)), 0x0, "RSSI-2 measurement result", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6010 },
6011 { &hf_dect_nr_n_snr,
6012 { "SNR", "dect_nr.mac.n.snr", FT_UINT8, BASE_CUSTOM,
6013 CF_FUNC(format_snr_result_cf_func)((const void *) (size_t) (format_snr_result_cf_func)), 0x0, "SNR measurement result", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6014 },
6015 { &hf_dect_nr_n_rd_class_u,
6016 { "Radio Device Class: µ", "dect_nr.mac.n.rd_class_mu", FT_UINT8, BASE_DEC,
6017 VALS(rdc_pwr_two_field_vals)((0 ? (const struct _value_string*)0 : ((rdc_pwr_two_field_vals
))))
, 0xE0, "µ = Subcarrier scaling factor", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6018 },
6019 { &hf_dect_nr_n_rd_class_b,
6020 { "Radio Device Class: β", "dect_nr.mac.n.rd_class_b", FT_UINT8, BASE_DEC,
6021 VALS(rdc_fourier_factor_vals)((0 ? (const struct _value_string*)0 : ((rdc_fourier_factor_vals
))))
, 0x1E, "β = Fourier transform scaling factor", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6022 },
6023 { &hf_dect_nr_n_res3,
6024 { "Reserved", "dect_nr.mac.n.res3", FT_UINT8, BASE_DEC,
6025 NULL((void*)0), 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6026 },
6027
6028 /* 6.4.3.7: Broadcast Indication IE */
6029 { &hf_dect_nr_bi_ie,
6030 { "Broadcast Indication IE", "dect_nr.mac.bi", FT_NONE, BASE_NONE,
6031 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6032 },
6033 { &hf_dect_nr_bi_ind_type,
6034 { "Indication Type", "dect_nr.mac.bi.ind_type", FT_UINT8, BASE_DEC,
6035 VALS(bi_ind_type_vals)((0 ? (const struct _value_string*)0 : ((bi_ind_type_vals)))), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6036 },
6037 { &hf_dect_nr_bi_idtype,
6038 { "IDType", "dect_nr.mac.bi.idtype", FT_UINT8, BASE_DEC,
6039 VALS(bi_idtype_vals)((0 ? (const struct _value_string*)0 : ((bi_idtype_vals)))), 0x10, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6040 },
6041 { &hf_dect_nr_bi_ack,
6042 { "ACK/NACK", "dect_nr.mac.bi.ack", FT_BOOLEAN, 8,
6043 TFS(&bi_ack_nack_tfs)((0 ? (const struct true_false_string*)0 : ((&bi_ack_nack_tfs
))))
, 0x08, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6044 },
6045 { &hf_dect_nr_bi_res1,
6046 { "Reserved", "dect_nr.mac.bi.res1", FT_UINT8, BASE_DEC,
6047 NULL((void*)0), 0x0E, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6048 },
6049 { &hf_dect_nr_bi_fb,
6050 { "Feedback", "dect_nr.mac.bi.feedback", FT_UINT8, BASE_DEC,
6051 VALS(bi_feedback_vals)((0 ? (const struct _value_string*)0 : ((bi_feedback_vals)))), 0x06, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6052 },
6053 { &hf_dect_nr_bi_res_alloc,
6054 { "Resource Allocation", "dect_nr.mac.bi.res_alloc", FT_BOOLEAN, 8,
6055 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6056 },
6057 { &hf_dect_nr_bi_short_rd_id,
6058 { "Short RD ID", "dect_nr.mac.bi.short_rd_id", FT_UINT16, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
6059 VALS(short_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((short_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6060 },
6061 { &hf_dect_nr_bi_long_rd_id,
6062 { "Long RD ID", "dect_nr.mac.bi.long_rd_id", FT_UINT32, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
6063 VALS(long_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((long_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6064 },
6065 { &hf_dect_nr_bi_mcs_res1,
6066 { "Reserved", "dect_nr.mac.bi.mcs.res1", FT_UINT8, BASE_DEC,
6067 NULL((void*)0), 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6068 },
6069 { &hf_dect_nr_bi_mcs_channel_quality,
6070 { "Channel Quality", "dect_nr.mac.bi.mcs.channel_quality", FT_UINT8, BASE_DEC,
6071 VALS(cqi_vals)((0 ? (const struct _value_string*)0 : ((cqi_vals)))), 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6072 },
6073 { &hf_dect_nr_bi_mimo2_res1,
6074 { "Reserved", "dect_nr.mac.bi.mimo2.res1", FT_UINT8, BASE_DEC,
6075 NULL((void*)0), 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6076 },
6077 { &hf_dect_nr_bi_mimo2_num_layers,
6078 { "Number of layers", "dect_nr.mac.bi.mimo2.num_layers", FT_BOOLEAN, 8,
6079 TFS(&bi_mimo2_num_layer_tfs)((0 ? (const struct true_false_string*)0 : ((&bi_mimo2_num_layer_tfs
))))
, 0x08, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6080 },
6081 { &hf_dect_nr_bi_mimo2_cb_index,
6082 { "Codebook index", "dect_nr.mac.bi.mimo2.cb_index", FT_UINT8, BASE_DEC,
6083 NULL((void*)0), 0x07, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6084 },
6085 { &hf_dect_nr_bi_mimo4_num_layers,
6086 { "Number of layers", "dect_nr.mac.bi.mimo4.num_layers", FT_UINT8, BASE_DEC,
6087 VALS(bi_mimo4_num_layer_vals)((0 ? (const struct _value_string*)0 : ((bi_mimo4_num_layer_vals
))))
, 0xC0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6088 },
6089 { &hf_dect_nr_bi_mimo4_cb_index,
6090 { "Codebook index", "dect_nr.mac.bi.mimo4.cb_index", FT_UINT8, BASE_DEC,
6091 NULL((void*)0), 0x3F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6092 },
6093
6094 /* 6.4.3.8: Padding IE */
6095 { &hf_dect_nr_pd_ie,
6096 { "Padding IE", "dect_nr.mac.pd", FT_NONE, BASE_NONE,
6097 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6098 },
6099 { &hf_dect_nr_pd_bytes,
6100 { "Padding", "dect_nr.mac.pd.bytes", FT_BYTES, BASE_NONE,
6101 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6102 },
6103
6104 /* 6.4.3.9: Group Assignment IE */
6105 { &hf_dect_nr_ga_ie,
6106 { "Group Assignment IE", "dect_nr.mac.ga", FT_NONE, BASE_NONE,
6107 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6108 },
6109 { &hf_dect_nr_ga_single_field,
6110 { "Single", "dect_nr.mac.ga.single_field", FT_BOOLEAN, 8,
6111 TFS(&dect_nr_ga_single_tfs)((0 ? (const struct true_false_string*)0 : ((&dect_nr_ga_single_tfs
))))
, 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6112 },
6113 { &hf_dect_nr_ga_group_id,
6114 { "Group ID", "dect_nr.mac.ga.group_id", FT_UINT8, BASE_DEC,
6115 NULL((void*)0), 0x7F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6116 },
6117 { &hf_dect_nr_ga_direct,
6118 { "Direct", "dect_nr.mac.ga.direct", FT_BOOLEAN, 8,
6119 TFS(&ga_direct_tfs)((0 ? (const struct true_false_string*)0 : ((&ga_direct_tfs
))))
, 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6120 },
6121 { &hf_dect_nr_ga_resource_tag,
6122 { "Resource Tag", "dect_nr.mac.ga.resource_tag", FT_UINT8, BASE_DEC,
6123 NULL((void*)0), 0x7F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6124 },
6125
6126 /* 6.4.3.10: Load Info IE */
6127 { &hf_dect_nr_li_ie,
6128 { "Load Info IE", "dect_nr.mac.li", FT_NONE, BASE_NONE,
6129 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6130 },
6131 { &hf_dect_nr_li_res1,
6132 { "Reserved", "dect_nr.mac.li.res1", FT_UINT8, BASE_DEC,
6133 NULL((void*)0), 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6134 },
6135 { &hf_dect_nr_li_max_assoc_field,
6136 { "Max assoc", "dect_nr.mac.li.max_assoc_field", FT_BOOLEAN, 8,
6137 TFS(&li_max_assoc_tfs)((0 ? (const struct true_false_string*)0 : ((&li_max_assoc_tfs
))))
, 0x08, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6138 },
6139 { &hf_dect_nr_li_rd_pt_load_field,
6140 { "RD PT load", "dect_nr.mac.li.rd_pt_load_field", FT_BOOLEAN, 8,
6141 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x04, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6142 },
6143 { &hf_dect_nr_li_rach_load_field,
6144 { "RACH load", "dect_nr.mac.li.rach_load_field", FT_BOOLEAN, 8,
6145 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x02, "Random Access Channel load", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6146 },
6147 { &hf_dect_nr_li_channel_load_field,
6148 { "Channel Load", "dect_nr.mac.li.channel_load_field", FT_BOOLEAN, 8,
6149 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6150 },
6151 { &hf_dect_nr_li_traffic_load_pct,
6152 { "Traffic Load percentage", "dect_nr.mac.li.traffic_load_pct", FT_UINT8, BASE_CUSTOM,
6153 CF_FUNC(format_hex_pct_cf_func)((const void *) (size_t) (format_hex_pct_cf_func)), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6154 },
6155 { &hf_dect_nr_li_max_assoc_8,
6156 { "Max number of associated RDs", "dect_nr.mac.li.max_num_assoc", FT_UINT8, BASE_DEC,
6157 NULL((void*)0), 0x0, "8-bit value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6158 },
6159 { &hf_dect_nr_li_max_assoc_16,
6160 { "Max number of associated RDs", "dect_nr.mac.li.max_num_assoc", FT_UINT16, BASE_DEC,
6161 NULL((void*)0), 0x0, "16-bit value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6162 },
6163 { &hf_dect_nr_li_curr_ft_pct,
6164 { "Currently associated RDs in FT mode", "dect_nr.mac.li.curr_ft_pct", FT_UINT8, BASE_CUSTOM,
6165 CF_FUNC(format_hex_pct_cf_func)((const void *) (size_t) (format_hex_pct_cf_func)), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6166 },
6167 { &hf_dect_nr_li_curr_pt_pct,
6168 { "Currently associated RDs in PT mode", "dect_nr.mac.li.curr_pt_pct", FT_UINT8, BASE_CUSTOM,
6169 CF_FUNC(format_hex_pct_cf_func)((const void *) (size_t) (format_hex_pct_cf_func)), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6170 },
6171 { &hf_dect_nr_li_rach_load_pct,
6172 { "RACH load in percentage", "dect_nr.mac.li.rach_load_pct", FT_UINT8, BASE_CUSTOM,
6173 CF_FUNC(format_hex_pct_cf_func)((const void *) (size_t) (format_hex_pct_cf_func)), 0x0, "Random Access Channel load in percentage", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6174 },
6175 { &hf_dect_nr_li_subslots_free_pct,
6176 { "Percentage of subslots detected free", "dect_nr.mac.li.subslots_free_pct", FT_UINT8, BASE_CUSTOM,
6177 CF_FUNC(format_hex_pct_cf_func)((const void *) (size_t) (format_hex_pct_cf_func)), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6178 },
6179 { &hf_dect_nr_li_subslots_busy_pct,
6180 { "Percentage of subslots detected busy", "dect_nr.mac.li.subslots_busy_pct", FT_UINT8, BASE_CUSTOM,
6181 CF_FUNC(format_hex_pct_cf_func)((const void *) (size_t) (format_hex_pct_cf_func)), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6182 },
6183
6184 /* 6.4.3.12: Measurement Report IE */
6185 { &hf_dect_nr_mr_ie,
6186 { "Measurement Report IE", "dect_nr.mac.mr", FT_NONE, BASE_NONE,
6187 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6188 },
6189 { &hf_dect_nr_mr_res1,
6190 { "Reserved", "dect_nr.mac.mr.res1", FT_UINT8, BASE_DEC,
6191 NULL((void*)0), 0xE0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6192 },
6193 { &hf_dect_nr_mr_snr_field,
6194 { "SNR", "dect_nr.mac.mr.snr_field", FT_BOOLEAN, 8,
6195 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x10, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6196 },
6197 { &hf_dect_nr_mr_rssi2_field,
6198 { "RSSI-2", "dect_nr.mac.mr.rssi2_field", FT_BOOLEAN, 8,
6199 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x08, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6200 },
6201 { &hf_dect_nr_mr_rssi1_field,
6202 { "RSSI-1", "dect_nr.mac.mr.rssi1_field", FT_BOOLEAN, 8,
6203 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x04, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6204 },
6205 { &hf_dect_nr_mr_tx_count_field,
6206 { "TX count", "dect_nr.mac.mr.tx_count_field", FT_BOOLEAN, 8,
6207 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6208 },
6209 { &hf_dect_nr_mr_rach,
6210 { "RACH", "dect_nr.mac.mr.rach", FT_BOOLEAN, 8,
6211 TFS(&mr_rach_tfs)((0 ? (const struct true_false_string*)0 : ((&mr_rach_tfs
))))
, 0x01, "Random Access Channel", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6212 },
6213 { &hf_dect_nr_mr_snr,
6214 { "SNR result", "dect_nr.mac.mr.snr", FT_UINT8, BASE_CUSTOM,
6215 CF_FUNC(format_snr_result_cf_func)((const void *) (size_t) (format_snr_result_cf_func)), 0x0, "SNR measurement result", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6216 },
6217 { &hf_dect_nr_mr_rssi2,
6218 { "RSSI-2 result", "dect_nr.mac.mr.rssi2", FT_UINT8, BASE_CUSTOM,
6219 CF_FUNC(format_rssi_result_cf_func)((const void *) (size_t) (format_rssi_result_cf_func)), 0x0, "RSSI-2 measurement result", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6220 },
6221 { &hf_dect_nr_mr_rssi1,
6222 { "RSSI-1 result", "dect_nr.mac.mr.rssi1", FT_UINT8, BASE_CUSTOM,
6223 CF_FUNC(format_rssi_result_cf_func)((const void *) (size_t) (format_rssi_result_cf_func)), 0x0, "RSSI-1 measurement result", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6224 },
6225 { &hf_dect_nr_mr_tx_count,
6226 { "TX Count result", "dect_nr.mac.mr.tx_count", FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS0x00008000,
6227 VALS(mr_tx_count_vals)((0 ? (const struct _value_string*)0 : ((mr_tx_count_vals)))), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6228 },
6229
6230 /* 6.4.3.13: Radio Device Status IE */
6231 { &hf_dect_nr_rds_ie,
6232 { "Radio Device Status IE", "dect_nr.mac.rds", FT_NONE, BASE_NONE,
6233 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6234 },
6235 { &hf_dect_nr_rds_res1,
6236 { "Reserved", "dect_nr.mac.rds.res1", FT_UINT8, BASE_DEC,
6237 NULL((void*)0), 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6238 },
6239 { &hf_dect_nr_rds_assoc,
6240 { "Association", "dect_nr.mac.rds.association", FT_BOOLEAN, 8,
6241 TFS(&rds_assoc_tfs)((0 ? (const struct true_false_string*)0 : ((&rds_assoc_tfs
))))
, 0x40, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6242 },
6243 { &hf_dect_nr_rds_sf,
6244 { "Status Flag", "dect_nr.mac.rds.sf", FT_UINT8, BASE_DEC,
6245 VALS(rds_status_vals)((0 ? (const struct _value_string*)0 : ((rds_status_vals)))), 0x30, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6246 },
6247 { &hf_dect_nr_rds_dur,
6248 { "Duration", "dect_nr.mac.rds.duration", FT_UINT8, BASE_DEC,
6249 VALS(rds_duration_vals)((0 ? (const struct _value_string*)0 : ((rds_duration_vals)))
)
, 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6250 },
6251
6252 /* 6.4.3.15 RD Capability short IE */
6253 { &hf_dect_nr_rdcs_ie,
6254 { "RD Capability short IE", "dect_nr.mac.rdcs", FT_NONE, BASE_NONE,
6255 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6256 },
6257 { &hf_dect_nr_rdcs_res1,
6258 { "Reserved", "dect_nr.mac.rdcs.res1", FT_UINT8, BASE_DEC,
6259 NULL((void*)0), 0xC0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6260 },
6261 { &hf_dect_nr_rdcs_cb_mc,
6262 { "CB/MC capability", "dect_nr.mac.rdcs.cb_mc", FT_BOOLEAN, 8,
6263 TFS(&rdcs_cb_mc_tfs)((0 ? (const struct true_false_string*)0 : ((&rdcs_cb_mc_tfs
))))
, 0x20, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6264 },
6265 { &hf_dect_nr_rdcs_harq_fb_delay,
6266 { "HARQ feedback delay", "dect_nr.mac.rdcs.harq_fb_delay", FT_UINT8, BASE_DEC,
6267 VALS(rdc_harq_fb_delay_vals)((0 ? (const struct _value_string*)0 : ((rdc_harq_fb_delay_vals
))))
, 0x1E, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6268 },
6269 { &hf_dect_nr_rdcs_dwa,
6270 { "DWA", "dect_nr.mac.rdcs.dwa", FT_BOOLEAN, 8,
6271 TFS(&rdcs_dwa_tfs)((0 ? (const struct true_false_string*)0 : ((&rdcs_dwa_tfs
))))
, 0x01, "Uplink data transmission without association", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6272 },
6273
6274 /* 6.4.3.16 Source Routing IE */
6275 { &hf_dect_nr_sr_ie,
6276 { "Source Routing IE", "dect_nr.mac.sr", FT_NONE, BASE_NONE,
6277 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6278 },
6279 { &hf_dect_nr_sr_id,
6280 { "Source Route ID", "dect_nr.mac.sr.id", FT_UINT32, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
6281 VALS(long_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((long_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6282 },
6283 { &hf_dect_nr_sr_hop_limit,
6284 { "Hop-limit", "dect_nr.mac.sr.hop_limit", FT_UINT8, BASE_DEC,
6285 NULL((void*)0), 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6286 },
6287 { &hf_dect_nr_sr_hop_count,
6288 { "Hop-count", "dect_nr.mac.sr.hop_count", FT_UINT8, BASE_DEC,
6289 NULL((void*)0), 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6290 },
6291 { &hf_dect_nr_sr_reg_validity_timer,
6292 { "Registration validity timer", "dect_nr.mac.sr.reg_validity_timer", FT_UINT8, BASE_DEC,
6293 VALS(sr_reg_validity_timer_vals)((0 ? (const struct _value_string*)0 : ((sr_reg_validity_timer_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6294 },
6295
6296 /* 6.4.3.17 Joining Information IE */
6297 { &hf_dect_nr_ji_ie,
6298 { "Joining Information IE", "dect_nr.mac.ji", FT_NONE, BASE_NONE,
6299 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6300 },
6301 { &hf_dect_nr_ji_res1,
6302 { "Reserved", "dect_nr.mac.ji.res1", FT_UINT8, BASE_DEC,
6303 NULL((void*)0), 0xFC, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6304 },
6305 { &hf_dect_nr_ji_num_eps,
6306 { "Number of EPs", "dect_nr.mac.ji.num_eps", FT_UINT8, BASE_DEC,
6307 NULL((void*)0), 0x03, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6308 },
6309 { &hf_dect_nr_ji_ep,
6310 { "EP", "dect_nr.mac.ji.ep", FT_UINT16, BASE_DEC,
6311 NULL((void*)0), 0x0, "Protocol Endpoint", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6312 },
6313
6314 /* 6.4.3.18 Association Control IE */
6315 { &hf_dect_nr_ac_ie,
6316 { "Association Control IE", "dect_nr.mac.ac", FT_NONE, BASE_NONE,
6317 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6318 },
6319 { &hf_dect_nr_ac_cb_m,
6320 { "CB_M", "dect_nr.mac.ac.cb_m", FT_BOOLEAN, 8,
6321 TFS(&ac_cb_m_tfs)((0 ? (const struct true_false_string*)0 : ((&ac_cb_m_tfs
))))
, 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6322 },
6323 { &hf_dect_nr_ac_dl_data_reception,
6324 { "DL data reception", "dect_nr.mac.ac.dl_data_reception", FT_UINT8, BASE_DEC,
6325 VALS(ac_dl_data_reception_vals)((0 ? (const struct _value_string*)0 : ((ac_dl_data_reception_vals
))))
, 0x70, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6326 },
6327 { &hf_dect_nr_ac_ul_period,
6328 { "UL period", "dect_nr.mac.ac.ul_period", FT_UINT8, BASE_DEC,
6329 VALS(ac_ul_period_vals)((0 ? (const struct _value_string*)0 : ((ac_ul_period_vals)))
)
, 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6330 },
6331
6332 /* Escape */
6333 { &hf_dect_nr_escape,
6334 { "Escape", "dect_nr.mac.escape", FT_BYTES, BASE_NONE,
6335 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6336 },
6337
6338 /* IE type extension */
6339 { &hf_dect_nr_ie_type_extension,
6340 { "IE Type Extension", "dect_nr.mac.ie_type_extension", FT_UINT8, BASE_DEC_HEX,
6341 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6342 },
6343 { &hf_dect_nr_ie_extension,
6344 { "Extension data", "dect_nr.mac.ie_extension", FT_BYTES, BASE_NONE,
6345 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6346 },
6347
6348 /* MIC */
6349 { &hf_dect_nr_mic_bytes,
6350 { "Message Integrity Code (MIC)", "dect_nr.mac.mic_bytes", FT_BYTES, BASE_NONE,
6351 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6352 },
6353
6354 /* DLC Headers and Messages */
6355
6356 { &hf_dect_nr_dlc_pdu,
6357 { "DLC PDU", "dect_nr.dlc", FT_NONE, BASE_NONE,
6358 NULL((void*)0), 0x0, "Data Link Control (layer) PDU", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6359 },
6360 { &hf_dect_nr_dlc_ie_type,
6361 { "IE Type", "dect_nr.dlc.ie_type", FT_UINT8, BASE_DEC,
6362 VALS(dlc_ie_type_vals)((0 ? (const struct _value_string*)0 : ((dlc_ie_type_vals)))), 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6363 },
6364
6365 /* DLC Service Type 0 */
6366 { &hf_dect_nr_dlc_res1,
6367 { "Reserved", "dect_nr.dlc.res1", FT_UINT8, BASE_DEC,
6368 NULL((void*)0), 0x0F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6369 },
6370
6371 /* DLC Service Type 1 */
6372 { &hf_dect_nr_dlc_si,
6373 { "Segmentation indication", "dect_nr.dlc.si", FT_UINT8, BASE_DEC,
6374 VALS(dlc_si_type_vals)((0 ? (const struct _value_string*)0 : ((dlc_si_type_vals)))), 0x0C, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6375 },
6376 { &hf_dect_nr_dlc_sn,
6377 { "Sequence number", "dect_nr.dlc.sn", FT_UINT16, BASE_DEC,
6378 NULL((void*)0), 0x03FF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6379 },
6380 { &hf_dect_nr_dlc_segm_offset,
6381 { "Segmentation offset", "dect_nr.dlc.so", FT_UINT16, BASE_DEC,
6382 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6383 },
6384
6385 /* DLC Timers configuration control IE */
6386 { &hf_dect_nr_dlc_timers,
6387 { "DLC SDU lifetime timer", "dect_nr.dlc.sdu_lifetime_timer", FT_UINT8, BASE_DEC,
6388 VALS(dlc_discard_timer_vals)((0 ? (const struct _value_string*)0 : ((dlc_discard_timer_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6389 },
6390
6391 /* DLC Routing header */
6392 { &hf_dect_nr_dlc_routing_hdr,
6393 { "DLC Routing header", "dect_nr.dlc.routing", FT_NONE, BASE_NONE,
6394 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6395 },
6396 { &hf_dect_nr_dlc_routing_res1,
6397 { "Reserved", "dect_nr.dlc.routing.res1", FT_UINT8, BASE_DEC,
6398 NULL((void*)0), 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6399 },
6400 { &hf_dect_nr_dlc_routing_qos,
6401 { "QoS", "dect_nr.dlc.routing.qos", FT_UINT8, BASE_DEC,
6402 VALS(dlc_qos_vals)((0 ? (const struct _value_string*)0 : ((dlc_qos_vals)))), 0x0E, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6403 },
6404 { &hf_dect_nr_dlc_routing_delay_field,
6405 { "Delay", "dect_nr.dlc.routing.delay_field", FT_BOOLEAN, 8,
6406 TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present
))))
, 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6407 },
6408 { &hf_dect_nr_dlc_routing_hop_count_limit,
6409 { "Hop-Count/Limit", "dect_nr.dlc.routing.hop_count_limit", FT_UINT8, BASE_DEC,
6410 VALS(dlc_hop_count_limit_vals)((0 ? (const struct _value_string*)0 : ((dlc_hop_count_limit_vals
))))
, 0xC0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6411 },
6412 { &hf_dect_nr_dlc_routing_dest_add,
6413 { "Dest_Add", "dect_nr.dlc.routing.dest_addr", FT_UINT8, BASE_DEC,
6414 VALS(dlc_dest_add_vals)((0 ? (const struct _value_string*)0 : ((dlc_dest_add_vals)))
)
, 0x38, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6415 },
6416 { &hf_dect_nr_dlc_routing_type,
6417 { "Routing type", "dect_nr.dlc.routing.type", FT_UINT8, BASE_DEC,
6418 VALS(dlc_routing_type_vals)((0 ? (const struct _value_string*)0 : ((dlc_routing_type_vals
))))
, 0x07, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6419 },
6420 { &hf_dect_nr_dlc_routing_src_addr,
6421 { "Source Address", "dect_nr.dlc.routing.src_addr", FT_UINT32, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
6422 VALS(long_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((long_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6423 },
6424 { &hf_dect_nr_dlc_routing_dst_addr,
6425 { "Destination Address", "dect_nr.dlc.routing.dst_addr", FT_UINT32, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
6426 VALS(long_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((long_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6427 },
6428 { &hf_dect_nr_dlc_routing_hop_count,
6429 { "Hop-count", "dect_nr.dlc.routing.hop_count", FT_UINT8, BASE_DEC,
6430 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6431 },
6432 { &hf_dect_nr_dlc_routing_hop_limit,
6433 { "Hop-limit", "dect_nr.dlc.routing.hop_limit", FT_UINT8, BASE_DEC,
6434 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6435 },
6436 { &hf_dect_nr_dlc_routing_delay,
6437 { "Delay", "dect_nr.dlc.routing.delay", FT_UINT32, BASE_DEC|BASE_UNIT_STRING0x00001000,
6438 UNS(&units_microseconds)((0 ? (const struct unit_name_string*)0 : ((&units_microseconds
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6439 },
6440 { &hf_dect_nr_dlc_routing_seq_num,
6441 { "Sequence number", "dect_nr.dlc.routing.sn", FT_UINT8, BASE_DEC,
6442 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6443 },
6444
6445 /* DLC Extension header */
6446 { &hf_dect_nr_dlc_ext_hdr,
6447 { "DLC Extension header", "dect_nr.dlc.ext", FT_NONE, BASE_NONE,
6448 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6449 },
6450 { &hf_dect_nr_dlc_ext_coding,
6451 { "DLC Ext", "dect_nr.dlc.ext.coding", FT_UINT8, BASE_DEC,
6452 VALS(dlc_ext_vals)((0 ? (const struct _value_string*)0 : ((dlc_ext_vals)))), 0xC0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6453 },
6454 { &hf_dect_nr_dlc_ext_ie_type,
6455 { "Extension IE Type", "dect_nr.dlc.ext.ie_type", FT_UINT8, BASE_DEC,
6456 VALS(dlc_ext_ie_type_vals)((0 ? (const struct _value_string*)0 : ((dlc_ext_ie_type_vals
))))
, 0x3F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6457 },
6458 { &hf_dect_nr_dlc_ext_len,
6459 { "Length", "dect_nr.dlc.ext.length", FT_UINT16, BASE_DEC,
6460 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6461 },
6462 { &hf_dect_nr_dlc_ext_next_hop_addr,
6463 { "Next Hop Address", "dect_nr.dlc.ext.next_hop_addr", FT_UINT32, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
6464 VALS(long_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((long_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6465 },
6466 { &hf_dect_nr_dlc_ext_source_routing_id,
6467 { "Source Routing ID", "dect_nr.dlc.ext.source_routing_id", FT_UINT32, BASE_HEX,
6468 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6469 },
6470 { &hf_dect_nr_dlc_ext_route_error_reason,
6471 { "Error Reason", "dect_nr.dlc.ext.route_error_reason", FT_UINT8, BASE_DEC,
6472 VALS(dlc_route_error_reason_vals)((0 ? (const struct _value_string*)0 : ((dlc_route_error_reason_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6473 },
6474 { &hf_dect_nr_dlc_ext_invalid_next_hop_addr,
6475 { "Invalid Next Hop Address", "dect_nr.dlc.ext.invalid_next_hop_addr", FT_UINT32, BASE_HEX|BASE_SPECIAL_VALS0x00008000,
6476 VALS(long_rd_id_address_vals)((0 ? (const struct _value_string*)0 : ((long_rd_id_address_vals
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6477 },
6478
6479 /* Higher layer signalling */
6480 { &hf_dect_nr_hls_bin,
6481 { "DLC data", "dect_nr.dlc.data", FT_BYTES, BASE_NONE,
6482 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6483 },
6484
6485 /* CVG Headers and Messages */
6486 { &hf_dect_nr_cvg_pdu,
6487 { "CVG PDU", "dect_nr.cvg", FT_NONE, BASE_NONE,
6488 NULL((void*)0), 0x0, "Convergence (layer) PDU", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6489 },
6490 { &hf_dect_nr_cvg_header,
6491 { "CVG Header", "dect_nr.cvg.header", FT_NONE, BASE_NONE,
6492 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6493 },
6494 { &hf_dect_nr_cvg_header_cvg_ext,
6495 { "Ext", "dect_nr.cvg.header.ext", FT_UINT8, BASE_HEX,
6496 VALS(dect_nr_cvg_header_ext_vals)((0 ? (const struct _value_string*)0 : ((dect_nr_cvg_header_ext_vals
))))
, 0xC0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6497 },
6498 { &hf_dect_nr_cvg_header_mt,
6499 { "MT", "dect_nr.cvg.header.mt", FT_UINT8, BASE_HEX,
6500 VALS(dect_nr_cvg_header_mt_vals)((0 ? (const struct _value_string*)0 : ((dect_nr_cvg_header_mt_vals
))))
, 0x20, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6501 },
6502 { &hf_dect_nr_cvg_header_ie_type,
6503 { "IE Type", "dect_nr.cvg.header.ie_type", FT_UINT8, BASE_HEX,
6504 VALS(dect_nr_cvg_header_ie_type_vals)((0 ? (const struct _value_string*)0 : ((dect_nr_cvg_header_ie_type_vals
))))
, 0x1F, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6505 },
6506 { &hf_dect_nr_cvg_header_f2c,
6507 { "F2C", "dect_nr.cvg.header.f2c", FT_UINT8, BASE_HEX,
6508 VALS(dect_nr_cvg_header_f2c_vals)((0 ? (const struct _value_string*)0 : ((dect_nr_cvg_header_f2c_vals
))))
, 0x18, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6509 },
6510 { &hf_dect_nr_cvg_header_mux_tag,
6511 { "Mux Tag", "dect_nr.cvg.header.mux_tag", FT_UINT8, BASE_HEX,
6512 NULL((void*)0), 0x07, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6513 },
6514 { &hf_dect_nr_cvg_header_length,
6515 { "Length", "dect_nr.cvg.header.length", FT_UINT16, BASE_DEC,
6516 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6517 },
6518
6519 /* CVG IEs */
6520 { &hf_dect_nr_cvg_ep_mux_ie,
6521 { "EP mux IE", "dect_nr.cvg.ep_mux_ie", FT_NONE, BASE_NONE,
6522 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6523 },
6524 { &hf_dect_nr_cvg_ep_mux_ie_endpoint,
6525 { "Endpoint Mux", "dect_nr.cvg.ep_mux_ie.endpoint", FT_UINT16, BASE_HEX,
6526 VALS(dect_nr_cvg_ep_mux_values)((0 ? (const struct _value_string*)0 : ((dect_nr_cvg_ep_mux_values
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6527 },
6528 { &hf_dect_nr_cvg_data_ie,
6529 { "Data IE", "dect_nr.cvg.data_ie", FT_NONE, BASE_NONE,
6530 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6531 },
6532 { &hf_dect_nr_cvg_data_ie_si,
6533 { "Segmentation Indication", "dect_nr.cvg.data_ie.si", FT_UINT8, BASE_DEC,
6534 VALS(dect_nr_cvg_si_coding)((0 ? (const struct _value_string*)0 : ((dect_nr_cvg_si_coding
))))
, 0xC0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6535 },
6536 { &hf_dect_nr_cvg_data_ie_sli,
6537 { "SDU Length Indicator", "dect_nr.cvg.data_ie.sli", FT_UINT8, BASE_DEC,
6538 VALS(dect_nr_cvg_sli_coding)((0 ? (const struct _value_string*)0 : ((dect_nr_cvg_sli_coding
))))
, 0x20, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6539 },
6540 { &hf_dect_nr_cvg_data_ie_seq_num,
6541 { "Sequence number", "dect_nr.cvg.data_ie.seq_num", FT_UINT16, BASE_DEC,
6542 NULL((void*)0), 0x0FFF, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6543 },
6544 { &hf_dect_nr_cvg_data_ie_sdu_len,
6545 { "Payload length", "dect_nr.cvg.data_ie.sdu_len", FT_UINT16, BASE_DEC,
6546 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6547 },
6548 { &hf_dect_nr_cvg_data_ie_seg_offset,
6549 { "Sequence number", "dect_nr.cvg.data_ie.seg_offset", FT_UINT16, BASE_DEC,
6550 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6551 },
6552 { &hf_dect_nr_cvg_data_ep_ie,
6553 { "Data EP IE", "dect_nr.cvg.data_ep_ie", FT_NONE, BASE_NONE,
6554 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6555 },
6556 { &hf_dect_nr_cvg_data_ep_ie_endpoint,
6557 { "Endpoint Mux", "dect_nr.cvg.data_ep_ie.endpoint", FT_UINT16, BASE_HEX,
6558 VALS(dect_nr_cvg_ep_mux_values)((0 ? (const struct _value_string*)0 : ((dect_nr_cvg_ep_mux_values
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6559 },
6560 { &hf_dect_nr_cvg_data_transp_ie,
6561 { "Data Transparent IE", "dect_nr.cvg.data_transparent_ie", FT_NONE, BASE_NONE,
6562 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6563 },
6564 { &hf_dect_nr_cvg_security_ie,
6565 { "Security IE", "dect_nr.cvg.security_ie", FT_NONE, BASE_NONE,
6566 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6567 },
6568 { &hf_dect_nr_cvg_tx_services_conf_ie,
6569 { "TX Services Config IE", "dect_nr.cvg.services_conf_ie", FT_NONE, BASE_NONE,
6570 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6571 },
6572 { &hf_dect_nr_cvg_arq_fb_ie,
6573 { "ARQ Feedback IE", "dect_nr.cvg.arq_fb_ie", FT_NONE, BASE_NONE,
6574 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6575 },
6576 { &hf_dect_nr_cvg_arq_poll_ie,
6577 { "ARQ Poll IE", "dect_nr.cvg.arq_poll_ie", FT_NONE, BASE_NONE,
6578 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6579 },
6580 { &hf_dect_nr_cvg_flow_status_ie,
6581 { "Flow Status IE", "dect_nr.cvg.flow_status_ie", FT_NONE, BASE_NONE,
6582 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6583 },
6584 { &hf_dect_nr_cvg_escape,
6585 { "Escape", "dect_nr.cvg.escape", FT_BYTES, BASE_NONE,
6586 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6587 },
6588
6589 /* Miscellaneous */
6590 { &hf_dect_nr_mac_encrypted,
6591 { "Encrypted MAC PDUs", "dect_nr.mac.encrypted", FT_NONE, BASE_NONE,
6592 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6593 },
6594 { &hf_dect_nr_conv_index,
6595 { "Conversation Index", "dect_nr.conv_index", FT_UINT32, BASE_DEC,
6596 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6597 },
6598 { &hf_dect_nr_undecoded,
6599 { "Undecoded", "dect_nr.undecoded", FT_BYTES, BASE_NONE,
6600 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6601 },
6602
6603 /* Fragment entries */
6604 { &hf_dect_nr_segments,
6605 { "DLC segments", "dect_nr.dlc.segments", FT_NONE, BASE_NONE,
6606 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6607 },
6608 { &hf_dect_nr_segment,
6609 { "DLC segment", "dect_nr.dlc.segment", FT_FRAMENUM, BASE_NONE,
6610 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6611 },
6612 { &hf_dect_nr_segment_overlap,
6613 { "DLC segment overlap", "dect_nr.dlc.segment.overlap", FT_BOOLEAN, BASE_NONE,
6614 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6615 },
6616 { &hf_dect_nr_segment_overlap_conflict,
6617 { "DLC segment overlapping with conflicting data", "dect_nr.dlc.segment.overlap.conflict", FT_BOOLEAN, BASE_NONE,
6618 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6619 },
6620 { &hf_dect_nr_segment_multiple_tails,
6621 { "DLC has multiple tails", "dect_nr.dlc.segment.multiple_tails", FT_BOOLEAN, BASE_NONE,
6622 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6623 },
6624 { &hf_dect_nr_segment_too_long_segment,
6625 { "DLC segment too long", "dect_nr.dlc.segment.too_long_segment", FT_BOOLEAN, BASE_NONE,
6626 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6627 },
6628 { &hf_dect_nr_segment_error,
6629 { "DLC segment error", "dect_nr.dlc.segment.error", FT_FRAMENUM, BASE_NONE,
6630 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6631 },
6632 { &hf_dect_nr_segment_count,
6633 { "DLC segment count", "dect_nr.dlc.segment.count", FT_UINT32, BASE_DEC,
6634 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6635 },
6636 { &hf_dect_nr_reassembled_in,
6637 { "Reassembled DLC in frame", "dect_nr.dlc.reassembled.in", FT_FRAMENUM, BASE_NONE,
6638 NULL((void*)0), 0x0, "This DLC data is reassembled in this frame", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6639 },
6640 { &hf_dect_nr_reassembled_length,
6641 { "Reassembled DLC length", "dect_nr.dlc.reassembled.length", FT_UINT32, BASE_DEC,
6642 NULL((void*)0), 0x0, "The total length of the reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
6643 },
6644 };
6645
6646 static int *ett[] = {
6647 &ett_dect_nr,
6648 &ett_dect_nr_phf,
6649 &ett_dect_nr_mac_pdu,
6650 &ett_dect_nr_mac_encrypted,
6651 &ett_dect_nr_data_hdr,
6652 &ett_dect_nr_bc_hdr,
6653 &ett_dect_nr_uc_hdr,
6654 &ett_dect_nr_rdbh_hdr,
6655 &ett_dect_nr_mux_hdr,
6656 &ett_dect_nr_nb_msg,
6657 &ett_dect_nr_cb_msg,
6658 &ett_dect_nr_a_req_msg,
6659 &ett_dect_nr_a_rsp_msg,
6660 &ett_dect_nr_a_rel_msg,
6661 &ett_dect_nr_rc_req_msg,
6662 &ett_dect_nr_rc_rsp_msg,
6663 &ett_dect_nr_am_msg,
6664 &ett_dect_nr_jb_msg,
6665 &ett_dect_nr_msi_ie,
6666 &ett_dect_nr_ri_ie,
6667 &ett_dect_nr_ra_ie,
6668 &ett_dect_nr_rar_ie,
6669 &ett_dect_nr_rdc_ie,
6670 &ett_dect_nr_rdc_phy_cap,
6671 &ett_dect_nr_n_ie,
6672 &ett_dect_nr_bi_ie,
6673 &ett_dect_nr_ga_ie,
6674 &ett_dect_nr_li_ie,
6675 &ett_dect_nr_mr_ie,
6676 &ett_dect_nr_rds_ie,
6677 &ett_dect_nr_rdcs_ie,
6678 &ett_dect_nr_sr_ie,
6679 &ett_dect_nr_ji_ie,
6680 &ett_dect_nr_ac_ie,
6681 &ett_dect_nr_dlc_pdu,
6682 &ett_dect_nr_dlc_routing_hdr,
6683 &ett_dect_nr_dlc_ext_hdr,
6684 &ett_dect_nr_segment,
6685 &ett_dect_nr_segments,
6686 &ett_dect_nr_cvg,
6687 &ett_dect_nr_cvg_header,
6688 &ett_dect_nr_cvg_ep_mux_ie,
6689 &ett_dect_nr_cvg_data_ep_ie,
6690 &ett_dect_nr_cvg_data_ie,
6691 &ett_dect_nr_cvg_data_transp_ie,
6692 &ett_dect_nr_cvg_security_ie,
6693 &ett_dect_nr_cvg_tx_services_conf_ie,
6694 &ett_dect_nr_cvg_arq_fb_ie,
6695 &ett_dect_nr_cvg_arq_poll_ie,
6696 &ett_dect_nr_cvg_flow_status_ie,
6697 };
6698
6699 static ei_register_info ei[] = {
6700 { &ei_dect_nr_ie_length_not_set,
6701 { "dect_nr.expert.ie_length_not_set", PI_MALFORMED0x07000000, PI_ERROR0x00800000,
6702 "IE length not 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)}}
}
6703 },
6704 { &ei_dect_nr_pdu_cut_short,
6705 { "dect_nr.expert.pdu_cut_short", PI_MALFORMED0x07000000, PI_WARN0x00600000,
6706 "PDU incomplete, perhaps trace was cut off", 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)}}
}
6707 },
6708 { &ei_dect_nr_length_mismatch,
6709 { "dect_nr.expert.length_mismatch", PI_PROTOCOL0x09000000, PI_WARN0x00600000,
6710 "Length mismatch", 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)}}
}
6711 },
6712 { &ei_dect_nr_res_non_zero,
6713 { "dect_nr.expert.res_non_zero", PI_PROTOCOL0x09000000, PI_WARN0x00600000,
6714 "Reserved bits are non-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)}}
}
6715 },
6716 { &ei_dect_nr_mac_encrypted,
6717 { "dect_nr.expert.mac_encrypted", PI_PROTOCOL0x09000000, PI_NOTE0x00400000,
6718 "Encrypted MAC PDUs", 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)}}
}
6719 },
6720 { &ei_dect_nr_undecoded,
6721 { "dect_nr.expert.undecoded", PI_PROTOCOL0x09000000, PI_WARN0x00600000,
6722 "Undecoded", 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)}}
}
6723 }
6724 };
6725
6726 proto_dect_nr = proto_register_protocol("DECT NR+ (DECT-2020 New Radio)", "DECT NR+", "dect_nr");
6727 proto_register_field_array(proto_dect_nr, hf, array_length(hf)(sizeof (hf) / sizeof (hf)[0]));
6728 proto_register_subtree_array(ett, array_length(ett)(sizeof (ett) / sizeof (ett)[0]));
6729
6730 expert_module_t *expert = expert_register_protocol(proto_dect_nr);
6731 expert_register_field_array(expert, ei, array_length(ei)(sizeof (ei) / sizeof (ei)[0]));
6732
6733 reassembly_table_register(&dect_nr_reassembly_table, &dect_nr_reassembly_functions);
6734
6735 dect_nr_handle = register_dissector("dect_nr", dissect_dect_nr, proto_dect_nr);
6736
6737 mac_hdr_dissector_table = register_dissector_table("dect_nr.mac_hdr", "DECT NR+ MAC header type", proto_dect_nr, FT_UINT32, BASE_DEC);
6738 ie_dissector_table = register_dissector_table("dect_nr.msg_ie", "DECT NR+ IE type", proto_dect_nr, FT_UINT32, BASE_DEC);
6739 ie_short_dissector_table = register_dissector_table("dect_nr.msg_ie_short", "DECT NR+ IE 1-byte type", proto_dect_nr, FT_UINT32, BASE_DEC);
6740 ie_extension_dissector_table = register_dissector_table("dect_nr.ie_extension", "DECT NR+ IE extension", proto_dect_nr, FT_UINT32, BASE_DEC);
6741
6742 module_t *module = prefs_register_protocol(proto_dect_nr, NULL((void*)0));
6743 prefs_register_enum_preference(module, "phf_type", "Physical Header Field Type",
6744 "Automatic will determine type from 6th and 7th packet byte.",
6745 &phf_type_pref, phf_type_pref_vals, false0);
6746 prefs_register_enum_preference(module, "dlc_data_type", "DLC PDU data type",
6747 "Automatic will use heuristics to determine payload.",
6748 &dlc_data_type_pref, dlc_data_type_pref_vals, false0);
6749 prefs_register_bool_preference(module, "mac_pdus_decrypted", "Handle MAC PDUs as decrypted",
6750 "Always handle MAC PDUs as decrypted",
6751 &mac_pdus_decrypted_pref);
6752 prefs_register_string_preference(module, "cipher_key_0", "Cipher Key 0",
6753 "Cipher Key 0 as HEX string.",
6754 &cipher_key_pref[0]);
6755 prefs_register_string_preference(module, "cipher_key_1", "Cipher Key 1",
6756 "Cipher Key 1 as HEX string.",
6757 &cipher_key_pref[1]);
6758 prefs_register_string_preference(module, "cipher_key_2", "Cipher Key 2",
6759 "Cipher Key 2 as HEX string.",
6760 &cipher_key_pref[2]);
6761 prefs_register_string_preference(module, "cipher_key_3", "Cipher Key 3",
6762 "Cipher Key 3 as HEX string.",
6763 &cipher_key_pref[3]);
6764
6765 heur_subdissector_list = register_heur_dissector_list("dect_nr.dlc", proto_dect_nr);
6766
6767 rd_id_map = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), g_direct_hash, g_direct_equal);
6768}
6769
6770void proto_reg_handoff_dect_nr(void)
6771{
6772 data_handle = find_dissector("data");
6773 ipv6_handle = find_dissector("ipv6");
6774 sixlowpan_handle = find_dissector("6lowpan");
6775
6776 /* Table 6.3.2-2: MAC header type field */
6777 dissector_add_uint("dect_nr.mac_hdr", 0, create_dissector_handle(dissect_mac_data_header, proto_dect_nr));
6778 dissector_add_uint("dect_nr.mac_hdr", 1, create_dissector_handle(dissect_mac_beacon_header, proto_dect_nr));
6779 dissector_add_uint("dect_nr.mac_hdr", 2, create_dissector_handle(dissect_mac_unicast_header, proto_dect_nr));
6780 dissector_add_uint("dect_nr.mac_hdr", 3, create_dissector_handle(dissect_mac_rd_broadcasting_header, proto_dect_nr));
6781 dissector_add_uint("dect_nr.mac_hdr", 15, create_dissector_handle(dissect_escape, proto_dect_nr));
6782
6783 /* Table 6.3.4-2: IE type field encoding for MAC Extension field encoding 00, 01, 10 */
6784 dissector_add_uint("dect_nr.msg_ie", 0, create_dissector_handle(dissect_padding_ie, proto_dect_nr));
6785 dissector_add_uint("dect_nr.msg_ie", 1, create_dissector_handle(dissect_higher_layer_sig_flow_1, proto_dect_nr));
6786 dissector_add_uint("dect_nr.msg_ie", 2, create_dissector_handle(dissect_higher_layer_sig_flow_2, proto_dect_nr));
6787 dissector_add_uint("dect_nr.msg_ie", 3, create_dissector_handle(dissect_user_plane_data_flow_1, proto_dect_nr));
6788 dissector_add_uint("dect_nr.msg_ie", 4, create_dissector_handle(dissect_user_plane_data_flow_2, proto_dect_nr));
6789 dissector_add_uint("dect_nr.msg_ie", 5, create_dissector_handle(dissect_user_plane_data_flow_3, proto_dect_nr));
6790 dissector_add_uint("dect_nr.msg_ie", 6, create_dissector_handle(dissect_user_plane_data_flow_4, proto_dect_nr));
6791 /* 7: Reserved */
6792 dissector_add_uint("dect_nr.msg_ie", 8, create_dissector_handle(dissect_network_beacon_msg, proto_dect_nr));
6793 dissector_add_uint("dect_nr.msg_ie", 9, create_dissector_handle(dissect_cluster_beacon_msg, proto_dect_nr));
6794 dissector_add_uint("dect_nr.msg_ie", 10, create_dissector_handle(dissect_association_request_msg, proto_dect_nr));
6795 dissector_add_uint("dect_nr.msg_ie", 11, create_dissector_handle(dissect_association_response_msg, proto_dect_nr));
6796 dissector_add_uint("dect_nr.msg_ie", 12, create_dissector_handle(dissect_association_release_msg, proto_dect_nr));
6797 dissector_add_uint("dect_nr.msg_ie", 13, create_dissector_handle(dissect_reconfiguration_request_msg, proto_dect_nr));
6798 dissector_add_uint("dect_nr.msg_ie", 14, create_dissector_handle(dissect_reconfiguration_response_msg, proto_dect_nr));
6799 dissector_add_uint("dect_nr.msg_ie", 15, create_dissector_handle(dissect_additional_mac_msg, proto_dect_nr));
6800 dissector_add_uint("dect_nr.msg_ie", 16, create_dissector_handle(dissect_security_info_ie, proto_dect_nr));
6801 dissector_add_uint("dect_nr.msg_ie", 17, create_dissector_handle(dissect_route_info_ie, proto_dect_nr));
6802 dissector_add_uint("dect_nr.msg_ie", 18, create_dissector_handle(dissect_resource_allocation_ie, proto_dect_nr));
6803 dissector_add_uint("dect_nr.msg_ie", 19, create_dissector_handle(dissect_random_access_resource_ie, proto_dect_nr));
6804 dissector_add_uint("dect_nr.msg_ie", 20, create_dissector_handle(dissect_rd_capability_ie, proto_dect_nr));
6805 dissector_add_uint("dect_nr.msg_ie", 21, create_dissector_handle(dissect_neighbouring_ie, proto_dect_nr));
6806 dissector_add_uint("dect_nr.msg_ie", 22, create_dissector_handle(dissect_broadcast_indication_ie, proto_dect_nr));
6807 dissector_add_uint("dect_nr.msg_ie", 23, create_dissector_handle(dissect_group_assignment_ie, proto_dect_nr));
6808 dissector_add_uint("dect_nr.msg_ie", 24, create_dissector_handle(dissect_load_info_ie, proto_dect_nr));
6809 dissector_add_uint("dect_nr.msg_ie", 25, create_dissector_handle(dissect_measurement_report_ie, proto_dect_nr));
6810 dissector_add_uint("dect_nr.msg_ie", 26, create_dissector_handle(dissect_source_routing_ie, proto_dect_nr));
6811 dissector_add_uint("dect_nr.msg_ie", 27, create_dissector_handle(dissect_joining_beacon_msg, proto_dect_nr));
6812 dissector_add_uint("dect_nr.msg_ie", 28, create_dissector_handle(dissect_joining_information_ie, proto_dect_nr));
6813 /* 29 - 61: Reserved */
6814 dissector_add_uint("dect_nr.msg_ie", 62, create_dissector_handle(dissect_escape, proto_dect_nr));
6815 dissector_add_uint("dect_nr.msg_ie", 63, create_dissector_handle(dissect_ie_type_extension, proto_dect_nr));
6816
6817 /* Table 6.3.4-4: IE type field encoding for MAC extension field encoding 11 and payload length of 1 byte */
6818 dissector_add_uint("dect_nr.msg_ie_short", 0, create_dissector_handle(dissect_padding_ie, proto_dect_nr));
6819 dissector_add_uint("dect_nr.msg_ie_short", 1, create_dissector_handle(dissect_radio_device_status_ie, proto_dect_nr));
6820 dissector_add_uint("dect_nr.msg_ie_short", 2, create_dissector_handle(dissect_rd_capability_short_ie, proto_dect_nr));
6821 dissector_add_uint("dect_nr.msg_ie_short", 3, create_dissector_handle(dissect_association_control_ie, proto_dect_nr));
6822 /* 4 - 29: Reserved */
6823 dissector_add_uint("dect_nr.msg_ie_short", 30, create_dissector_handle(dissect_escape, proto_dect_nr));
6824
6825 heur_dissector_add("dect_nr.dlc", dissect_cvg_heur, "CVG layer over DLC DECT NR+", "cvg_dect_nr", proto_dect_nr, HEURISTIC_ENABLE);
6826
6827 dissector_add_uint("wtap_encap", WTAP_ENCAP_DECT_NR225, dect_nr_handle);
6828 dissector_add_for_decode_as_with_preference("udp.port", dect_nr_handle);
6829}
6830
6831/*
6832 * Editor modelines - https://www.wireshark.org/tools/modelines.html
6833 *
6834 * Local variables:
6835 * c-basic-offset: 4
6836 * tab-width: 8
6837 * indent-tabs-mode: nil
6838 * End:
6839 *
6840 * vi: set shiftwidth=4 tabstop=8 expandtab:
6841 * :indentSize=4:tabSize=8:noTabs=true:
6842 */