### Bug Summary

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

### Annotated Source Code

Press '?' to see keyboard shortcuts

Show analyzer invocation
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name packet-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-23-100321-3658-1 -x c /builds/wireshark/wireshark/epan/dissectors/packet-dect-nr.c

Keyboard shortcuts:

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

Close
Show only relevant lines Show control flow arrows

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