1 /* wimax_compact_dlmap_ie_decoder.c
2 * WiMax HARQ Map Message decoder
4 * Copyright (c) 2007 by Intel Corporation.
6 * Author: Lu Pan <lu.pan@intel.com>
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1999 Gerald Combs
12 * SPDX-License-Identifier: GPL-2.0-or-later
19 #include <epan/packet.h>
21 #include <wsutil/array.h>
22 #include "wimax_compact_dlmap_ie_decoder.h"
24 extern int proto_wimax
;
27 #define MSB_NIBBLE_MASK 0xF0
28 #define LSB_NIBBLE_MASK 0x0F
30 #define CID_TYPE_NORMAL 0
31 #define CID_TYPE_RCID11 1
32 #define CID_TYPE_RCID7 2
33 #define CID_TYPE_RCID3 3
35 /* Global Variables */
37 unsigned band_amc_subchannel_type
;
38 unsigned max_logical_bands
= 12;
39 unsigned num_of_broadcast_symbols
;
40 unsigned num_of_dl_band_amc_symbols
;
41 unsigned num_of_ul_band_amc_symbols
;
42 /* from switch HARQ mode extension IE */
45 /* forward reference */
46 static unsigned wimax_compact_dlmap_format_configuration_ie_decoder(proto_tree
*tree
, packet_info
*pinfo
, tvbuff_t
*tvb
, unsigned offset
, unsigned nibble_offset
);
47 static unsigned wimax_compact_dlmap_rcid_ie_decoder(proto_tree
*tree
, packet_info
*pinfo
, tvbuff_t
*tvb
, unsigned offset
, unsigned nibble_offset
);
48 static unsigned wimax_compact_dlmap_harq_control_ie_decoder(proto_tree
*tree
, packet_info
*pinfo
, tvbuff_t
*tvb
, unsigned offset
, unsigned nibble_offset
);
49 static unsigned wimax_compact_dlmap_cqich_control_ie_decoder(proto_tree
*tree
, packet_info
*pinfo
, tvbuff_t
*tvb
, unsigned offset
, unsigned nibble_offset
);
50 static unsigned wimax_cdlmap_extension_ie_decoder(proto_tree
*tree
, packet_info
*pinfo
, tvbuff_t
*tvb
, unsigned offset
, unsigned nibble_offset
);
51 unsigned wimax_extended_diuc_dependent_ie_decoder(proto_tree
*tree
, packet_info
*pinfo
, tvbuff_t
*tvb
, unsigned offset
, unsigned nibble_offset
);
53 static int proto_wimax_compact_dlmap_ie_decoder
;
55 #if 0 /* not used ?? */
56 static int ett_wimax_compact_dlmap_ie_decoder
;
57 static int ett_wimax_format_configuration_ie_decoder
;
58 static int ett_wimax_rcid_ie_decoder
;
59 static int ett_wimax_harq_control_ie_decoder
;
60 static int ett_wimax_extended_diuc_dependent_ie_decoder
;
61 static int ett_wimax_cqich_control_ie_decoder
;
62 static int ett_wimax_extension_type_ie_decoder
;
65 /* New Format Indications */
66 static const true_false_string tfs_indication
=
73 static const true_false_string tfs_prefix
=
76 "Temporary Disable HARQ"
80 static const true_false_string tfs_cqich_ind
=
82 "With CQICH Control IE",
87 static const value_string vals_cid_types
[] =
90 { 1, "RCID11 (default)" },
96 /* Subchannel Types */
97 static const value_string vals_subchannel_types
[] =
99 { 0, "Default Type" },
100 { 1, "1 bin x 6 symbols Type" },
101 { 2, "2 bin x 3 symbols Type" },
102 { 3, "3 bin x 2 symbols Type" },
106 /* Max Logical Bands */
107 static const value_string vals_max_logical_bands
[] =
111 { 2, "12 Bands (default)" },
116 /* Repetition Coding Indications */
117 static const value_string rep_msgs
[] =
119 { 0, "No Repetition Coding" },
120 { 1, "Repetition Coding of 2 Used" },
121 { 2, "Repetition Coding of 4 Used" },
122 { 3, "Repetition Coding of 6 Used" },
126 /* Repetition Coding Indications */
127 static const value_string vals_allocation_modes
[] =
129 { 0, "Same Number Of Subchannels For The Selected Bands" },
130 { 1, "Different Same Number Of Subchannels For The Selected Bands" },
131 { 2, "Total Number Of Subchannels For The Selected Bands Determined by Nsch Code and Nep Code" },
137 #define DL_MAP_TYPE_MASK 0xE0
138 #define UL_MAP_APPEND_MASK 0x10
139 #define SHORTENED_DIUC_MASK 0xE0
140 #define COMPANDED_SC_MASK 0x1F
141 #define DL_MAP_TYPE_MASK_1 0x0E
142 #define UL_MAP_APPEND_MASK_1 0x01
143 #define SHORTENED_DIUC_MASK_1 0x0E00
144 #define COMPANDED_SC_MASK_1 0x01F0
146 /* display indices */
147 static int hf_cdlmap_dl_map_type
;
148 static int hf_cdlmap_ul_map_append
;
149 static int hf_cdlmap_reserved
;
150 static int hf_cdlmap_nep_code
;
151 static int hf_cdlmap_nsch_code
;
152 static int hf_cdlmap_num_bands
;
153 static int hf_cdlmap_band_index
;
154 static int hf_cdlmap_nb_bitmap
;
155 static int hf_cdlmap_dl_map_type_1
;
156 static int hf_cdlmap_ul_map_append_1
;
157 static int hf_cdlmap_reserved_1
;
158 static int hf_cdlmap_nep_code_1
;
159 static int hf_cdlmap_nsch_code_1
;
160 static int hf_cdlmap_num_bands_1
;
161 /*static int hf_cdlmap_band_index_1;*/
162 static int hf_cdlmap_nb_bitmap_1
;
164 static int hf_cdlmap_shortened_diuc
;
165 static int hf_cdlmap_companded_sc
;
166 static int hf_cdlmap_shortened_uiuc
;
167 static int hf_cdlmap_shortened_diuc_1
;
168 static int hf_cdlmap_companded_sc_1
;
169 static int hf_cdlmap_shortened_uiuc_1
;
171 static int hf_cdlmap_bin_offset
;
172 static int hf_cdlmap_bin_offset_1
;
174 static int hf_cdlmap_diuc_num_of_subchannels
;
175 static int hf_cdlmap_diuc_num_of_subchannels_1
;
176 static int hf_cdlmap_diuc_repetition_coding_indication
;
177 static int hf_cdlmap_diuc_repetition_coding_indication_1
;
178 static int hf_cdlmap_diuc_reserved
;
179 static int hf_cdlmap_diuc_reserved_1
;
181 static int hf_cdlmap_bit_map_length
;
182 static int hf_cdlmap_bit_map_length_1
;
183 static int hf_cdlmap_bit_map
;
185 static int hf_cdlmap_diuc
;
186 static int hf_cdlmap_diuc_1
;
188 static int hf_cdlmap_allocation_mode
;
189 static int hf_cdlmap_allocation_mode_rsvd
;
190 static int hf_cdlmap_num_subchannels
;
191 static int hf_cdlmap_allocation_mode_1
;
192 static int hf_cdlmap_allocation_mode_rsvd_1
;
193 static int hf_cdlmap_num_subchannels_1
;
195 /* static int hf_cdlmap_reserved_type; */
196 static int hf_cdlmap_reserved_type_1
;
198 /* display indexies */
199 static int hf_format_config_ie_dl_map_type
;
200 static int hf_format_config_ie_dl_map_type_1
;
201 static int hf_format_config_ie_dl_map_type_32
;
202 static int hf_format_config_ie_new_format_indication
;
203 static int hf_format_config_ie_new_format_indication_1
;
204 static int hf_format_config_ie_new_format_indication_32
;
205 static int hf_format_config_ie_cid_type
;
206 static int hf_format_config_ie_cid_type_1
;
207 static int hf_format_config_ie_safety_pattern
;
208 static int hf_format_config_ie_safety_pattern_1
;
209 static int hf_format_config_ie_subchannel_type
;
210 static int hf_format_config_ie_subchannel_type_1
;
211 static int hf_format_config_ie_max_logical_bands
;
212 static int hf_format_config_ie_max_logical_bands_1
;
213 static int hf_format_config_ie_num_of_broadcast_symbol
;
214 static int hf_format_config_ie_num_of_broadcast_symbol_1
;
215 static int hf_format_config_ie_num_of_dl_band_amc_symbol
;
216 static int hf_format_config_ie_num_of_dl_band_amc_symbol_1
;
217 static int hf_format_config_ie_num_of_ul_band_amc_symbol
;
218 static int hf_format_config_ie_num_of_ul_band_amc_symbol_1
;
220 /* Format Configuration IE Masks */
221 #define FORMAT_CONFIG_IE_DL_MAP_TYPE_MASK 0xE0000000
222 #define FORMAT_CONFIG_IE_NEW_FORMAT_IND_MASK 0x10000000
223 #define CID_TYPE_MASK_1 0x0C000000
224 #define SAFETY_PATTERN_MASK_1 0x03E00000
225 #define BAND_AMC_SUBCHANNEL_TYPE_MASK_1 0x00180000
226 #define MAX_LOGICAL_BANDS_MASK_1 0x00060000
227 #define NUM_BROADCAST_SYMBOLS_MASK_1 0x0001F000
228 #define NUM_DL_AMC_SYMBOLS_MASK_1 0x00000FC0
229 #define NUM_UL_AMC_SYMBOLS_MASK_1 0x0000003F
230 #define CID_TYPE_MASK 0xC0000000
231 #define SAFETY_PATTERN_MASK 0x3E000000
232 #define BAND_AMC_SUBCHANNEL_TYPE_MASK 0x01800000
233 #define MAX_LOGICAL_BANDS_MASK 0x00600000
234 #define NUM_BROADCAST_SYMBOLS_MASK 0x001F0000
235 #define NUM_DL_AMC_SYMBOLS_MASK 0x0000FC00
236 #define NUM_UL_AMC_SYMBOLS_MASK 0x000003F0
238 /* display indexies */
239 static int hf_harq_rcid_ie_prefix
;
240 static int hf_harq_rcid_ie_prefix_1
;
241 static int hf_harq_rcid_ie_normal_cid
;
242 static int hf_harq_rcid_ie_normal_cid_1
;
243 static int hf_harq_rcid_ie_cid3
;
244 static int hf_harq_rcid_ie_cid3_1
;
245 static int hf_harq_rcid_ie_cid7
;
246 static int hf_harq_rcid_ie_cid7_1
;
247 static int hf_harq_rcid_ie_cid11
;
248 static int hf_harq_rcid_ie_cid11_1
;
249 static int hf_harq_rcid_ie_cid11_2
;
250 static int hf_harq_rcid_ie_cid11_3
;
253 #define WIMAX_RCID_IE_NORMAL_CID_MASK_1 0x0FFFF0
254 #define WIMAX_RCID_IE_PREFIX_MASK 0x8000
255 #define WIMAX_RCID_IE_PREFIX_MASK_1 0x0800
256 #define WIMAX_RCID_IE_CID3_MASK 0x7000
257 #define WIMAX_RCID_IE_CID3_MASK_1 0x0700
258 #define WIMAX_RCID_IE_CID7_MASK 0x7F00
259 #define WIMAX_RCID_IE_CID7_MASK_1 0x07F0
260 #define WIMAX_RCID_IE_CID11_MASK 0x7FF0
261 #define WIMAX_RCID_IE_CID11_MASK_1 0x07FF
263 /* HARQ MAP HARQ Control IE display indexies */
264 static int hf_harq_control_ie_prefix
;
265 static int hf_harq_control_ie_ai_sn
;
266 static int hf_harq_control_ie_spid
;
267 static int hf_harq_control_ie_acid
;
268 static int hf_harq_control_ie_reserved
;
269 static int hf_harq_control_ie_prefix_1
;
270 static int hf_harq_control_ie_ai_sn_1
;
271 static int hf_harq_control_ie_spid_1
;
272 static int hf_harq_control_ie_acid_1
;
273 static int hf_harq_control_ie_reserved_1
;
276 #define WIMAX_HARQ_CONTROL_IE_PREFIX_MASK 0x80
277 #define WIMAX_HARQ_CONTROL_IE_AI_SN_MASK 0x40
278 #define WIMAX_HARQ_CONTROL_IE_SPID_MASK 0x30
279 #define WIMAX_HARQ_CONTROL_IE_ACID_MASK 0x0F
280 #define WIMAX_HARQ_CONTROL_IE_RESERVED_MASK 0x70
281 #define WIMAX_HARQ_CONTROL_IE_PREFIX_MASK_1 0x0800
282 #define WIMAX_HARQ_CONTROL_IE_AI_SN_MASK_1 0x0400
283 #define WIMAX_HARQ_CONTROL_IE_SPID_MASK_1 0x0300
284 #define WIMAX_HARQ_CONTROL_IE_ACID_MASK_1 0x00F0
285 #define WIMAX_HARQ_CONTROL_IE_RESERVED_MASK_1 0x0700
287 /* HARQ MAP CQICH Control IE display indexies */
288 static int hf_cqich_control_ie_indicator
;
289 static int hf_cqich_control_ie_alloc_id
;
290 static int hf_cqich_control_ie_period
;
291 static int hf_cqich_control_ie_frame_offset
;
292 static int hf_cqich_control_ie_duration
;
293 static int hf_cqich_control_ie_cqi_rep_threshold
;
294 static int hf_cqich_control_ie_indicator_1
;
295 static int hf_cqich_control_ie_alloc_id_1
;
296 static int hf_cqich_control_ie_period_1
;
297 static int hf_cqich_control_ie_frame_offset_1
;
298 static int hf_cqich_control_ie_duration_1
;
299 static int hf_cqich_control_ie_cqi_rep_threshold_1
;
302 #define WIMAX_CQICH_CONTROL_IE_INDICATOR_MASK 0x8000
303 #define WIMAX_CQICH_CONTROL_IE_ALLOCATION_INDEX_MASK 0x7E00
304 #define WIMAX_CQICH_CONTROL_IE_PERIOD_MASK 0x0180
305 #define WIMAX_CQICH_CONTROL_IE_FRAME_OFFSET_MASK 0x0070
306 #define WIMAX_CQICH_CONTROL_IE_DURATION_MASK 0x000F
307 #define WIMAX_CQICH_CONTROL_IE_CQI_REP_THRESHOLD_MASK 0x7000
308 #define WIMAX_CQICH_CONTROL_IE_INDICATOR_MASK_1 0x080000
309 #define WIMAX_CQICH_CONTROL_IE_ALLOCATION_INDEX_MASK_1 0x07E000
310 #define WIMAX_CQICH_CONTROL_IE_PERIOD_MASK_1 0x001800
311 #define WIMAX_CQICH_CONTROL_IE_FRAME_OFFSET_MASK_1 0x000700
312 #define WIMAX_CQICH_CONTROL_IE_DURATION_MASK_1 0x0000F0
313 #define WIMAX_CQICH_CONTROL_IE_CQI_REP_THRESHOLD_MASK_1 0x070000
316 #define EXTENSION_TYPE_MASK 0xE000
317 #define EXTENSION_TYPE_MASK_1 0x0E00
318 #define EXTENSION_SUBTYPE_MASK 0x1F00
319 #define EXTENSION_SUBTYPE_MASK_1 0x01F0
320 #define EXTENSION_LENGTH_MASK 0x00F0
321 #define EXTENSION_LENGTH_MASK_1 0x000F
323 static int hf_cdlmap_extension_type
;
324 static int hf_cdlmap_extension_subtype
;
325 static int hf_cdlmap_extension_length
;
326 static int hf_cdlmap_extension_type_1
;
327 static int hf_cdlmap_extension_subtype_1
;
328 static int hf_cdlmap_extension_length_1
;
330 static int hf_cdlmap_extension_time_diversity_mbs
;
331 static int hf_cdlmap_extension_harq_mode
;
332 static int hf_cdlmap_extension_unknown_sub_type
;
333 static int hf_cdlmap_extension_time_diversity_mbs_1
;
334 static int hf_cdlmap_extension_harq_mode_1
;
335 static int hf_cdlmap_extension_unknown_sub_type_1
;
337 /* Extended DIUC dependent IE display indexies */
338 static int hf_extended_diuc_dependent_ie_diuc
;
339 static int hf_extended_diuc_dependent_ie_diuc_1
;
340 static int hf_extended_diuc_dependent_ie_length
;
341 static int hf_extended_diuc_dependent_ie_length_1
;
342 static int hf_extended_diuc_dependent_ie_channel_measurement
;
343 static int hf_extended_diuc_dependent_ie_stc_zone
;
344 static int hf_extended_diuc_dependent_ie_aas_dl
;
345 static int hf_extended_diuc_dependent_ie_data_location
;
346 static int hf_extended_diuc_dependent_ie_cid_switch
;
347 static int hf_extended_diuc_dependent_ie_mimo_dl_basic
;
348 static int hf_extended_diuc_dependent_ie_mimo_dl_enhanced
;
349 static int hf_extended_diuc_dependent_ie_harq_map_pointer
;
350 static int hf_extended_diuc_dependent_ie_phymod_dl
;
351 static int hf_extended_diuc_dependent_ie_dl_pusc_burst_allocation
;
352 static int hf_extended_diuc_dependent_ie_ul_interference_and_noise_level
;
353 static int hf_extended_diuc_dependent_ie_unknown_diuc
;
356 /* Compact DL-MAP IE Types (table 89) */
357 #define COMPACT_DL_MAP_TYPE_NORMAL_SUBCHANNEL 0
358 #define COMPACT_DL_MAP_TYPE_BAND_AMC 1
359 #define COMPACT_DL_MAP_TYPE_SAFETY 2
360 #define COMPACT_DL_MAP_TYPE_UIUC 3
361 #define COMPACT_DL_MAP_TYPE_FORMAT_CONF_IE 4
362 #define COMPACT_DL_MAP_TYPE_HARQ_ACK_BITMAP_IE 5
363 #define COMPACT_DL_MAP_TYPE_RESERVED 6
364 #define COMPACT_DL_MAP_TYPE_EXTENSION 7
366 /* Compact DL-MAP IE decoder */
367 unsigned wimax_compact_dlmap_ie_decoder(proto_tree
*tree
, packet_info
*pinfo
, tvbuff_t
*tvb
, unsigned offset
, unsigned nibble_offset
)
369 unsigned diuc
, byte
, length
= 0;
370 unsigned dl_map_type
, ul_map_append
;
371 unsigned dl_map_offset
, nibble_length
, bit_map_length
;
372 unsigned nband
, band_count
, i
, allocation_mode
;
375 /* update the info column */
376 col_append_sep_str(pinfo
->cinfo
, COL_INFO
, NULL
, "Compact DL-MAP IEs");
378 /* set the local offset */
379 dl_map_offset
= offset
;
380 /* Get the first byte */
381 byte
= tvb_get_uint8(tvb
, dl_map_offset
);
382 if(nibble_offset
& 1)
384 dl_map_type
= ((byte
& DL_MAP_TYPE_MASK_1
) >> 1);
385 ul_map_append
= (byte
& UL_MAP_APPEND_MASK_1
);
389 dl_map_type
= ((byte
& DL_MAP_TYPE_MASK
) >> 5);
390 ul_map_append
= (byte
& UL_MAP_APPEND_MASK
);
394 case COMPACT_DL_MAP_TYPE_NORMAL_SUBCHANNEL
:/* 6.3.2.3.43.6.1 */
395 if(nibble_offset
& 1)
396 { /* display the DL-MAP type */
397 proto_tree_add_item(tree
, hf_cdlmap_dl_map_type_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
398 /* display the UL-MAP append */
399 proto_tree_add_item(tree
, hf_cdlmap_ul_map_append_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
400 /* move to next byte */
405 { /* display the DL-MAP type */
406 proto_tree_add_item(tree
, hf_cdlmap_dl_map_type
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
407 /* display the UL-MAP append */
408 proto_tree_add_item(tree
, hf_cdlmap_ul_map_append
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
413 nibble_length
= wimax_compact_dlmap_rcid_ie_decoder(tree
, pinfo
, tvb
, dl_map_offset
, nibble_offset
);
414 length
+= nibble_length
;
415 dl_map_offset
+= (nibble_length
>> 1);
416 nibble_offset
= (nibble_length
& 1);
417 /* check harq mode */
419 { /* display the Nep and Nsch Code */
420 if(nibble_offset
& 1)
422 proto_tree_add_item(tree
, hf_cdlmap_nep_code_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
423 /* move to next byte */
425 proto_tree_add_item(tree
, hf_cdlmap_nsch_code
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
429 proto_tree_add_item(tree
, hf_cdlmap_nep_code
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
430 proto_tree_add_item(tree
, hf_cdlmap_nsch_code_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
431 /* move to next byte */
436 else if(harq_mode
== 1)
437 { /* display the Shortened DIUC and Companded SC */
438 if(nibble_offset
& 1)
440 proto_tree_add_item(tree
, hf_cdlmap_shortened_diuc_1
, tvb
, dl_map_offset
, 2, ENC_BIG_ENDIAN
);
441 proto_tree_add_item(tree
, hf_cdlmap_companded_sc_1
, tvb
, dl_map_offset
, 2, ENC_BIG_ENDIAN
);
445 proto_tree_add_item(tree
, hf_cdlmap_shortened_diuc
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
446 proto_tree_add_item(tree
, hf_cdlmap_companded_sc
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
448 /* move to next byte */
452 /* decode HARQ Control IE */
453 nibble_length
= wimax_compact_dlmap_harq_control_ie_decoder(tree
, pinfo
, tvb
, dl_map_offset
, nibble_offset
);
454 length
+= nibble_length
;
455 dl_map_offset
+= ((nibble_offset
+ nibble_length
) >> 1);
456 nibble_offset
= ((nibble_offset
+ nibble_length
) & 1);
457 /* decode CQICH Control IE */
458 nibble_length
= wimax_compact_dlmap_cqich_control_ie_decoder(tree
, pinfo
, tvb
, dl_map_offset
, nibble_offset
);
459 length
+= nibble_length
;
460 dl_map_offset
+= ((nibble_offset
+ nibble_length
) >> 1);
461 nibble_offset
= ((nibble_offset
+ nibble_length
) & 1);
463 { /* check harq mode */
465 { /* display the Shortened UIUC and Companded SC */
466 if(nibble_offset
& 1)
468 proto_tree_add_item(tree
, hf_cdlmap_shortened_uiuc_1
, tvb
, dl_map_offset
, 2, ENC_BIG_ENDIAN
);
469 proto_tree_add_item(tree
, hf_cdlmap_companded_sc_1
, tvb
, dl_map_offset
, 2, ENC_BIG_ENDIAN
);
473 proto_tree_add_item(tree
, hf_cdlmap_shortened_uiuc
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
474 proto_tree_add_item(tree
, hf_cdlmap_companded_sc
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
476 /* move to next byte */
481 { /* display the Nep and Nsch Code */
482 if(nibble_offset
& 1)
484 proto_tree_add_item(tree
, hf_cdlmap_nep_code_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
485 /* move to next byte */
487 proto_tree_add_item(tree
, hf_cdlmap_nsch_code
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
491 proto_tree_add_item(tree
, hf_cdlmap_nep_code
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
492 proto_tree_add_item(tree
, hf_cdlmap_nsch_code_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
493 /* move to next byte */
498 /* decode HARQ Control IE */
499 nibble_length
= wimax_compact_dlmap_harq_control_ie_decoder(tree
, pinfo
, tvb
, dl_map_offset
, nibble_offset
);
500 length
+= nibble_length
;
503 case COMPACT_DL_MAP_TYPE_BAND_AMC
:/* 6.3.2.3.43.6.2 */
504 if(nibble_offset
& 1)
505 { /* display the DL-MAP type */
506 proto_tree_add_item(tree
, hf_cdlmap_dl_map_type_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
507 /* display the reserved */
508 proto_tree_add_item(tree
, hf_cdlmap_reserved_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
509 /* move to next byte */
514 { /* display the DL-MAP type */
515 proto_tree_add_item(tree
, hf_cdlmap_dl_map_type
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
516 /* display the reserved */
517 proto_tree_add_item(tree
, hf_cdlmap_reserved
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
522 nibble_length
= wimax_compact_dlmap_rcid_ie_decoder(tree
, pinfo
, tvb
, dl_map_offset
, nibble_offset
);
523 length
+= nibble_length
;
524 dl_map_offset
+= (nibble_length
>> 1);
525 nibble_offset
= (nibble_length
& 1);
526 /* check harq mode */
528 { /* display the Nep and Nsch Code */
529 if(nibble_offset
& 1)
531 proto_tree_add_item(tree
, hf_cdlmap_nep_code_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
532 /* move to next byte */
534 proto_tree_add_item(tree
, hf_cdlmap_nsch_code
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
538 proto_tree_add_item(tree
, hf_cdlmap_nep_code
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
539 proto_tree_add_item(tree
, hf_cdlmap_nsch_code_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
540 /* move to next byte */
545 else if(harq_mode
== 1)
546 { /* display the Shortened DIUC and Companded SC */
547 if(nibble_offset
& 1)
549 proto_tree_add_item(tree
, hf_cdlmap_shortened_diuc_1
, tvb
, dl_map_offset
, 2, ENC_BIG_ENDIAN
);
550 proto_tree_add_item(tree
, hf_cdlmap_companded_sc_1
, tvb
, dl_map_offset
, 2, ENC_BIG_ENDIAN
);
554 proto_tree_add_item(tree
, hf_cdlmap_shortened_diuc
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
555 proto_tree_add_item(tree
, hf_cdlmap_companded_sc
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
557 /* move to next byte */
562 if(max_logical_bands
)
563 { /* get and display the Nband */
564 nband
= tvb_get_uint8(tvb
, dl_map_offset
);
565 if(nibble_offset
& 1)
567 nband
= (nband
& LSB_NIBBLE_MASK
);
568 /* display the Nband */
569 proto_tree_add_item(tree
, hf_cdlmap_num_bands_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
570 /* move to next byte */
573 if(max_logical_bands
== 3)
575 proto_tree_add_item(tree
, hf_cdlmap_band_index
, tvb
, dl_map_offset
, nband
, ENC_NA
);
576 length
+= (nband
* 2);
578 dl_map_offset
+= nband
;
582 nibble_offset
= (nband
& 1);
583 proto_tree_add_item(tree
, hf_cdlmap_band_index
, tvb
, dl_map_offset
, ((nband
>> 1) + nibble_offset
), ENC_NA
);
586 dl_map_offset
+= (nband
>> 1);
591 nband
= ((nband
& MSB_NIBBLE_MASK
) >> 4);
592 /* display the Nband */
593 proto_tree_add_item(tree
, hf_cdlmap_num_bands
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
595 if(max_logical_bands
== 3)
597 proto_tree_add_item(tree
, hf_cdlmap_band_index
, tvb
, dl_map_offset
, (nband
+ nibble_offset
), ENC_NA
);
598 length
+= (nband
* 2);
600 dl_map_offset
+= nband
;
604 proto_tree_add_item(tree
, hf_cdlmap_band_index
, tvb
, dl_map_offset
, ((nband
>> 1) + nibble_offset
), ENC_NA
);
607 dl_map_offset
+= ((nband
+ nibble_offset
) >> 1);
618 /* display the Nb-BITMAP */
619 if(nibble_offset
& 1)
621 proto_tree_add_item(tree
, hf_cdlmap_nb_bitmap_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
622 /* move to next byte */
628 proto_tree_add_item(tree
, hf_cdlmap_nb_bitmap
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
633 /* Get the Allocation Mode */
634 byte
= tvb_get_uint8(tvb
, dl_map_offset
);
635 if(nibble_offset
& 1)
637 allocation_mode
= ((byte
& 0x0C) >> 2);
638 proto_tree_add_item(tree
, hf_cdlmap_allocation_mode_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
639 proto_tree_add_item(tree
, hf_cdlmap_allocation_mode_rsvd_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
645 allocation_mode
= ((byte
& 0xC0) >> 6);
646 proto_tree_add_item(tree
, hf_cdlmap_allocation_mode
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
647 proto_tree_add_item(tree
, hf_cdlmap_allocation_mode_rsvd
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
650 /* Decode Allocation Mode - need to be done */
653 if(nibble_offset
& 1)
655 proto_tree_add_item(tree
, hf_cdlmap_num_subchannels_1
, tvb
, dl_map_offset
, 2, ENC_BIG_ENDIAN
);
659 proto_tree_add_item(tree
, hf_cdlmap_num_subchannels
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
663 else if(allocation_mode
== 1)
665 for(i
=0; i
<band_count
; i
++)
667 if(nibble_offset
& 1)
669 proto_tree_add_item(tree
, hf_cdlmap_num_subchannels_1
, tvb
, dl_map_offset
, 2, ENC_BIG_ENDIAN
);
673 proto_tree_add_item(tree
, hf_cdlmap_num_subchannels
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
678 /* decode HARQ Control IE */
679 nibble_length
= wimax_compact_dlmap_harq_control_ie_decoder(tree
, pinfo
, tvb
, dl_map_offset
, nibble_offset
);
680 length
+= nibble_length
;
681 dl_map_offset
+= ((nibble_offset
+ nibble_length
) >> 1);
682 nibble_offset
= ((nibble_offset
+ nibble_length
) & 1);
683 /* decode CQICH Control IE */
684 nibble_length
= wimax_compact_dlmap_cqich_control_ie_decoder(tree
, pinfo
, tvb
, dl_map_offset
, nibble_offset
);
685 length
+= nibble_length
;
687 case COMPACT_DL_MAP_TYPE_SAFETY
:/* 6.3.2.3.43.6.3 */
688 if(nibble_offset
& 1)
689 { /* display the DL-MAP type */
690 proto_tree_add_item(tree
, hf_cdlmap_dl_map_type_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
691 /* display the UL-MAP append */
692 proto_tree_add_item(tree
, hf_cdlmap_ul_map_append_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
693 /* move to next byte */
698 { /* display the DL-MAP type */
699 proto_tree_add_item(tree
, hf_cdlmap_dl_map_type
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
700 /* display the UL-MAP append */
701 proto_tree_add_item(tree
, hf_cdlmap_ul_map_append
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
706 nibble_length
= wimax_compact_dlmap_rcid_ie_decoder(tree
, pinfo
, tvb
, dl_map_offset
, nibble_offset
);
707 length
+= nibble_length
;
708 dl_map_offset
+= (nibble_length
>> 1);
709 nibble_offset
= (nibble_length
& 1);
710 /* check harq mode */
712 { /* display the Nep and Nsch Code */
713 if(nibble_offset
& 1)
715 proto_tree_add_item(tree
, hf_cdlmap_nep_code_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
716 /* move to next byte */
718 proto_tree_add_item(tree
, hf_cdlmap_nsch_code
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
722 proto_tree_add_item(tree
, hf_cdlmap_nep_code
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
723 proto_tree_add_item(tree
, hf_cdlmap_nsch_code_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
724 /* move to next byte */
729 else if(harq_mode
== 1)
730 { /* display the Shortened DIUC and Companded SC */
731 if(nibble_offset
& 1)
733 proto_tree_add_item(tree
, hf_cdlmap_shortened_diuc_1
, tvb
, dl_map_offset
, 2, ENC_BIG_ENDIAN
);
734 proto_tree_add_item(tree
, hf_cdlmap_companded_sc_1
, tvb
, dl_map_offset
, 2, ENC_BIG_ENDIAN
);
738 proto_tree_add_item(tree
, hf_cdlmap_shortened_diuc
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
739 proto_tree_add_item(tree
, hf_cdlmap_companded_sc
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
741 /* move to next byte */
745 /* display BIN offset */
746 if(nibble_offset
& 1)
748 proto_tree_add_item(tree
, hf_cdlmap_bin_offset_1
, tvb
, dl_map_offset
, 2, ENC_BIG_ENDIAN
);
749 /* move to next byte */
754 proto_tree_add_item(tree
, hf_cdlmap_bin_offset
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
755 /* move to next byte */
759 /* decode HARQ Control IE */
760 nibble_length
= wimax_compact_dlmap_harq_control_ie_decoder(tree
, pinfo
, tvb
, dl_map_offset
, nibble_offset
);
761 length
+= nibble_length
;
762 dl_map_offset
+= ((nibble_offset
+ nibble_length
) >> 1);
763 nibble_offset
= ((nibble_offset
+ nibble_length
) & 1);
764 /* decode CQICH Control IE */
765 nibble_length
= wimax_compact_dlmap_cqich_control_ie_decoder(tree
, pinfo
, tvb
, dl_map_offset
, nibble_offset
);
766 length
+= nibble_length
;
767 dl_map_offset
+= ((nibble_offset
+ nibble_length
) >> 1);
768 nibble_offset
= ((nibble_offset
+ nibble_length
) & 1);
770 { /* check harq mode */
772 { /* display the Shortened DIUC and Companded SC */
773 if(nibble_offset
& 1)
775 proto_tree_add_item(tree
, hf_cdlmap_shortened_diuc_1
, tvb
, dl_map_offset
, 2, ENC_BIG_ENDIAN
);
776 proto_tree_add_item(tree
, hf_cdlmap_companded_sc_1
, tvb
, dl_map_offset
, 2, ENC_BIG_ENDIAN
);
780 proto_tree_add_item(tree
, hf_cdlmap_shortened_diuc
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
781 proto_tree_add_item(tree
, hf_cdlmap_companded_sc
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
783 /* move to next byte */
788 { /* display the Nep and Nsch Code */
789 if(nibble_offset
& 1)
791 proto_tree_add_item(tree
, hf_cdlmap_nep_code_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
792 /* move to next byte */
794 proto_tree_add_item(tree
, hf_cdlmap_nsch_code
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
798 proto_tree_add_item(tree
, hf_cdlmap_nep_code
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
799 proto_tree_add_item(tree
, hf_cdlmap_nsch_code_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
800 /* move to next byte */
805 /* display BIN offset */
806 if(nibble_offset
& 1)
808 proto_tree_add_item(tree
, hf_cdlmap_bin_offset_1
, tvb
, dl_map_offset
, 2, ENC_BIG_ENDIAN
);
809 /* move to next byte */
814 proto_tree_add_item(tree
, hf_cdlmap_bin_offset
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
815 /* move to next byte */
819 /* decode HARQ Control IE */
820 nibble_length
= wimax_compact_dlmap_harq_control_ie_decoder(tree
, pinfo
, tvb
, dl_map_offset
, nibble_offset
);
821 length
+= nibble_length
;
824 case COMPACT_DL_MAP_TYPE_UIUC
:/* 6.3.2.3.43.6.4 */
825 if(nibble_offset
& 1)
826 { /* display the DL-MAP type */
827 proto_tree_add_item(tree
, hf_cdlmap_dl_map_type_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
828 /* display the reserved */
829 proto_tree_add_item(tree
, hf_cdlmap_reserved_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
830 /* move to next byte */
832 /* get the new byte */
833 byte
= tvb_get_uint8(tvb
, dl_map_offset
);
835 diuc
= ((byte
& MSB_NIBBLE_MASK
) >> 4);
836 /* display the DIUC */
837 proto_tree_add_item(tree
, hf_cdlmap_diuc
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
841 /* display the DL-MAP type */
842 proto_tree_add_item(tree
, hf_cdlmap_dl_map_type
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
843 /* display the reserved */
844 proto_tree_add_item(tree
, hf_cdlmap_reserved
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
846 diuc
= (tvb_get_uint8(tvb
, dl_map_offset
) & LSB_NIBBLE_MASK
);
847 /* display the DIUC */
848 proto_tree_add_item(tree
, hf_cdlmap_diuc_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
849 /* move to next byte */
854 { /* Extended DIUC dependent IE */
855 nibble_length
= wimax_extended_diuc_dependent_ie_decoder(tree
, pinfo
, tvb
, dl_map_offset
, nibble_offset
);
856 length
+= nibble_length
;
857 dl_map_offset
+= (nibble_length
>> 1);
858 nibble_offset
= (nibble_length
& 1);
861 { /* decode RCID IE */
862 nibble_length
= wimax_compact_dlmap_rcid_ie_decoder(tree
, pinfo
, tvb
, dl_map_offset
, nibble_offset
);
863 length
+= nibble_length
;
864 dl_map_offset
+= (nibble_length
>> 1);
865 nibble_offset
= (nibble_length
& 1);
866 /* display Number of subchannels */
867 if(nibble_offset
& 1)
868 proto_tree_add_item(tree
, hf_cdlmap_diuc_num_of_subchannels_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
870 proto_tree_add_item(tree
, hf_cdlmap_diuc_num_of_subchannels
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
872 /* display the repetition coding indication and reserved bits */
873 if(nibble_offset
& 1)
875 proto_tree_add_item(tree
, hf_cdlmap_diuc_repetition_coding_indication_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
876 proto_tree_add_item(tree
, hf_cdlmap_diuc_reserved_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
880 proto_tree_add_item(tree
, hf_cdlmap_diuc_repetition_coding_indication
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
881 proto_tree_add_item(tree
, hf_cdlmap_diuc_reserved
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
885 /* decode HARQ Control IE */
886 nibble_length
= wimax_compact_dlmap_harq_control_ie_decoder(tree
, pinfo
, tvb
, dl_map_offset
, nibble_offset
);
887 length
+= nibble_length
;
888 dl_map_offset
+= ((nibble_offset
+ nibble_length
) >> 1);
889 nibble_offset
= ((nibble_offset
+ nibble_length
) & 1);
890 /* decode CQICH Control IE */
891 nibble_length
= wimax_compact_dlmap_cqich_control_ie_decoder(tree
, pinfo
, tvb
, dl_map_offset
, nibble_offset
);
892 length
+= nibble_length
;
894 case COMPACT_DL_MAP_TYPE_FORMAT_CONF_IE
:/* 6.3.2.3.43.2 */
895 /* decode the format configuration IE */
896 nibble_length
= wimax_compact_dlmap_format_configuration_ie_decoder(tree
, pinfo
, tvb
, dl_map_offset
, nibble_offset
);
897 length
= nibble_length
;
899 case COMPACT_DL_MAP_TYPE_HARQ_ACK_BITMAP_IE
:/* 6.3.2.3.43.6.5 */
900 if(nibble_offset
& 1)
901 { /* display the DL-MAP type */
902 proto_tree_add_item(tree
, hf_cdlmap_dl_map_type_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
903 /* display the reserved */
904 proto_tree_add_item(tree
, hf_cdlmap_reserved_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
906 /* move to next byte */
908 /* get the bit map length */
909 byte
= tvb_get_uint8(tvb
, dl_map_offset
);
910 bit_map_length
= ((byte
& MSB_NIBBLE_MASK
) >> 4);
911 /* display BITMAP Length */
912 proto_tree_add_item(tree
, hf_cdlmap_bit_map_length
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
914 proto_tree_add_item(tree
, hf_cdlmap_bit_map
, tvb
, dl_map_offset
, bit_map_length
+ 1, ENC_NA
);
915 length
+= (1 + bit_map_length
* 2);
919 /* display the DL-MAP type */
920 proto_tree_add_item(tree
, hf_cdlmap_dl_map_type
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
921 /* display the reserved */
922 proto_tree_add_item(tree
, hf_cdlmap_reserved
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
923 /* display BITMAP Length */
924 proto_tree_add_item(tree
, hf_cdlmap_bit_map_length_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
926 /* get the bit map length */
927 bit_map_length
= (byte
& LSB_NIBBLE_MASK
);
928 /* move to next byte */
931 proto_tree_add_item(tree
, hf_cdlmap_bit_map
, tvb
, dl_map_offset
, bit_map_length
, ENC_NA
);
932 length
+= (bit_map_length
* 2);
935 case COMPACT_DL_MAP_TYPE_EXTENSION
:/* 6.3.2.3.43.6.6 */
936 /* decode the Compact DL-MAP extension IE */
937 nibble_length
= wimax_cdlmap_extension_ie_decoder(tree
, pinfo
, tvb
, dl_map_offset
, nibble_offset
);/*, cqich_indicator);*/
938 length
= nibble_length
;
940 default:/* Reserved Type */
941 /* display the reserved type */
942 proto_tree_add_item(tree
, hf_cdlmap_reserved_type_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
946 /* Update the nibble_offset and length */
950 /* Format Configuration IE shifts */
951 #define CID_TYPE_SHIFT 30
952 #define SAFETY_PATTERN_SHIFT 25
953 #define BAND_AMC_SUBCHANNEL_TYPE_SHIFT 23
954 #define MAX_LOGICAL_BANDS_SHIFT 21
955 #define NUM_BROADCAST_SYMBOLS_SHIFT 16
956 #define NUM_DL_AMC_SYMBOLS_SHIFT 10
957 #define NUM_UL_AMC_SYMBOLS_SHIFT 4
958 #define CID_TYPE_SHIFT_1 (CID_TYPE_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
959 #define SAFETY_PATTERN_SHIFT_1 (SAFETY_PATTERN_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
960 #define BAND_AMC_SUBCHANNEL_TYPE_SHIFT_1 (BAND_AMC_SUBCHANNEL_TYPE_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
961 #define MAX_LOGICAL_BANDS_SHIFT_1 (MAX_LOGICAL_BANDS_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
962 #define NUM_BROADCAST_SYMBOLS_SHIFT_1 (NUM_BROADCAST_SYMBOLS_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
963 #define NUM_DL_AMC_SYMBOLS_SHIFT_1 (NUM_DL_AMC_SYMBOLS_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
964 /*#define NUM_UL_AMC_SYMBOLS_SHIFT_1 0*/
966 /* Compact DL-MAP Format Configuration IE (6.3.2.3.43.2) decoder */
967 static unsigned wimax_compact_dlmap_format_configuration_ie_decoder(proto_tree
*tree
, packet_info
*pinfo _U_
, tvbuff_t
*tvb
, unsigned offset
, unsigned nibble_offset
)
970 unsigned dl_map_type
, new_format_ind
;
971 unsigned dl_map_offset
;
975 /* update the info column */
976 col_append_sep_str(pinfo
->cinfo
, COL_INFO
, NULL
, "Format Configuration IE");
978 /* set the local offset */
979 dl_map_offset
= offset
;
980 /* Get the first byte */
981 tvb_value
= tvb_get_uint8(tvb
, dl_map_offset
);
982 if(nibble_offset
& 1)
983 { /* get the DL-MAP type */
984 dl_map_type
= ((tvb_value
& DL_MAP_TYPE_MASK_1
) >> 1);
985 /* ensure the dl-map type is Format Configuration IE */
986 if(dl_map_type
!= COMPACT_DL_MAP_TYPE_FORMAT_CONF_IE
)
988 new_format_ind
= (tvb_value
& 0x01);
989 /* display the DL-MAP type */
990 proto_tree_add_item(tree
, hf_format_config_ie_dl_map_type_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
991 /* display the New format Indication */
992 proto_tree_add_item(tree
, hf_format_config_ie_new_format_indication_1
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
993 /* update the length in nibble */
995 /* move to next byte */
998 { /* display the CID Type */
999 proto_tree_add_item(tree
, hf_format_config_ie_cid_type
, tvb
, dl_map_offset
, 4, ENC_BIG_ENDIAN
);
1000 /* display the Safety Pattern */
1001 proto_tree_add_item(tree
, hf_format_config_ie_safety_pattern
, tvb
, dl_map_offset
, 4, ENC_BIG_ENDIAN
);
1002 /* display the Subchannel pattern */
1003 proto_tree_add_item(tree
, hf_format_config_ie_subchannel_type
, tvb
, dl_map_offset
, 4, ENC_BIG_ENDIAN
);
1004 /* display the max logical bands */
1005 proto_tree_add_item(tree
, hf_format_config_ie_max_logical_bands
, tvb
, dl_map_offset
, 4, ENC_BIG_ENDIAN
);
1006 /* display the number of broadcast symbols */
1007 proto_tree_add_item(tree
, hf_format_config_ie_num_of_broadcast_symbol
, tvb
, dl_map_offset
, 4, ENC_BIG_ENDIAN
);
1008 /* display the number of dl band AMC symbols */
1009 proto_tree_add_item(tree
, hf_format_config_ie_num_of_dl_band_amc_symbol
, tvb
, dl_map_offset
, 4, ENC_BIG_ENDIAN
);
1010 /* display the number of ul band AMC symbols */
1011 proto_tree_add_item(tree
, hf_format_config_ie_num_of_ul_band_amc_symbol
, tvb
, dl_map_offset
, 4, ENC_BIG_ENDIAN
);
1012 /* update the length in nibble */
1014 /* Get the next 32-bit word */
1015 tvb_value
= tvb_get_ntohl(tvb
, dl_map_offset
);
1016 /* get the CID type */
1017 cid_type
= ((tvb_value
& CID_TYPE_MASK
) >> CID_TYPE_SHIFT
);
1018 /* get the subchannel type for band AMC */
1019 band_amc_subchannel_type
= ((tvb_value
& BAND_AMC_SUBCHANNEL_TYPE_MASK
) >> BAND_AMC_SUBCHANNEL_TYPE_SHIFT
);
1020 /* get the max logical bands */
1021 max_logical_bands
= ((tvb_value
& MAX_LOGICAL_BANDS_MASK
) >> MAX_LOGICAL_BANDS_SHIFT
);
1022 /* get the number of symbols for broadcast */
1023 num_of_broadcast_symbols
= ((tvb_value
& NUM_BROADCAST_SYMBOLS_MASK
) >> NUM_BROADCAST_SYMBOLS_SHIFT
);
1024 /* get the number of symbols for DL band AMC */
1025 num_of_dl_band_amc_symbols
= ((tvb_value
& NUM_DL_AMC_SYMBOLS_MASK
) >> NUM_DL_AMC_SYMBOLS_SHIFT
);
1026 /* get the number of symbols for UL band AMC */
1027 num_of_ul_band_amc_symbols
= ((tvb_value
& NUM_UL_AMC_SYMBOLS_MASK
) >> NUM_UL_AMC_SYMBOLS_SHIFT
);
1032 dl_map_type
= ((tvb_value
& DL_MAP_TYPE_MASK
) >> 5);
1033 /* ensure the dl-map type is Format Configuration IE */
1034 if(dl_map_type
!= COMPACT_DL_MAP_TYPE_FORMAT_CONF_IE
)
1036 new_format_ind
= (tvb_value
& 0x10);
1038 { /* display the DL-MAP type */
1039 proto_tree_add_item(tree
, hf_format_config_ie_dl_map_type_32
, tvb
, dl_map_offset
, 4, ENC_BIG_ENDIAN
);
1040 /* display the New format Indication */
1041 proto_tree_add_item(tree
, hf_format_config_ie_new_format_indication_32
, tvb
, dl_map_offset
, 4, ENC_BIG_ENDIAN
);
1042 /* display the CID Type */
1043 proto_tree_add_item(tree
, hf_format_config_ie_cid_type_1
, tvb
, dl_map_offset
, 4, ENC_BIG_ENDIAN
);
1044 /* display the Safety Pattern */
1045 proto_tree_add_item(tree
, hf_format_config_ie_safety_pattern_1
, tvb
, dl_map_offset
, 4, ENC_BIG_ENDIAN
);
1046 /* display the Subchannel pattern */
1047 proto_tree_add_item(tree
, hf_format_config_ie_subchannel_type_1
, tvb
, dl_map_offset
, 4, ENC_BIG_ENDIAN
);
1048 /* display the max logical bands */
1049 proto_tree_add_item(tree
, hf_format_config_ie_max_logical_bands_1
, tvb
, dl_map_offset
, 4, ENC_BIG_ENDIAN
);
1050 /* display the number of broadcast symbols */
1051 proto_tree_add_item(tree
, hf_format_config_ie_num_of_broadcast_symbol_1
, tvb
, dl_map_offset
, 4, ENC_BIG_ENDIAN
);
1052 /* display the number of dl band AMC symbols */
1053 proto_tree_add_item(tree
, hf_format_config_ie_num_of_dl_band_amc_symbol_1
, tvb
, dl_map_offset
, 4, ENC_BIG_ENDIAN
);
1054 /* display the number of ul band AMC symbols */
1055 proto_tree_add_item(tree
, hf_format_config_ie_num_of_ul_band_amc_symbol_1
, tvb
, dl_map_offset
, 4, ENC_BIG_ENDIAN
);
1056 /* update the length in nibble */
1058 /* Get the next 32-bit word */
1059 tvb_value
= tvb_get_ntohl(tvb
, dl_map_offset
);
1060 /* get the CID type */
1061 cid_type
= ((tvb_value
& CID_TYPE_MASK_1
) >> CID_TYPE_SHIFT_1
);
1062 /* get the subchannel type for band AMC */
1063 band_amc_subchannel_type
= ((tvb_value
& BAND_AMC_SUBCHANNEL_TYPE_MASK_1
) >> BAND_AMC_SUBCHANNEL_TYPE_SHIFT_1
);
1064 /* get the max logical bands */
1065 max_logical_bands
= ((tvb_value
& MAX_LOGICAL_BANDS_MASK_1
) >> MAX_LOGICAL_BANDS_SHIFT_1
);
1066 /* get the number of symbols for broadcast */
1067 num_of_broadcast_symbols
= ((tvb_value
& NUM_BROADCAST_SYMBOLS_MASK_1
) >> NUM_BROADCAST_SYMBOLS_SHIFT_1
);
1068 /* get the number of symbols for DL band AMC */
1069 num_of_dl_band_amc_symbols
= ((tvb_value
& NUM_DL_AMC_SYMBOLS_MASK_1
) >> NUM_DL_AMC_SYMBOLS_SHIFT_1
);
1070 /* get the number of symbols for UL band AMC */
1071 num_of_ul_band_amc_symbols
= (tvb_value
& NUM_UL_AMC_SYMBOLS_MASK_1
);
1074 { /* display the DL-MAP type */
1075 proto_tree_add_item(tree
, hf_format_config_ie_dl_map_type
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
1076 /* display the New format Indication */
1077 proto_tree_add_item(tree
, hf_format_config_ie_new_format_indication
, tvb
, dl_map_offset
, 1, ENC_BIG_ENDIAN
);
1078 /* update the length in nibble */
1082 /* return the IE length in nibbles */
1086 /* Compact DL-MAP Reduced CID IE (6.3.2.3.43.3) decoder */
1087 static unsigned wimax_compact_dlmap_rcid_ie_decoder(proto_tree
*tree
, packet_info
*pinfo _U_
, tvbuff_t
*tvb
, unsigned offset
, unsigned nibble_offset
)
1089 unsigned length
= 0;
1093 /* update the info column */
1094 col_append_sep_str(pinfo
->cinfo
, COL_INFO
, NULL
, "RCID IE");
1096 if(nibble_offset
& 1)
1098 if(cid_type
== CID_TYPE_NORMAL
)
1099 { /* display the normal CID */
1100 proto_tree_add_item(tree
, hf_harq_rcid_ie_normal_cid_1
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1104 { /* Get the prefix bit */
1105 prefix
= (tvb_get_uint8(tvb
, offset
) & 0x08);
1106 /* display the prefix */
1107 proto_tree_add_item(tree
, hf_harq_rcid_ie_prefix_1
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1109 { /* display the CID11 */
1110 proto_tree_add_item(tree
, hf_harq_rcid_ie_cid11_3
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1115 if(cid_type
== CID_TYPE_RCID11
)
1116 { /* display the CID11 */
1117 proto_tree_add_item(tree
, hf_harq_rcid_ie_cid11_1
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1120 else if(cid_type
== CID_TYPE_RCID7
)
1121 { /* display the normal CID7 */
1122 proto_tree_add_item(tree
, hf_harq_rcid_ie_cid7_1
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1125 else if(cid_type
== CID_TYPE_RCID3
)
1126 { /* display the CID3 */
1127 proto_tree_add_item(tree
, hf_harq_rcid_ie_cid3_1
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1135 if(cid_type
== CID_TYPE_NORMAL
)
1136 { /* display the normal CID */
1137 proto_tree_add_item(tree
, hf_harq_rcid_ie_normal_cid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1141 { /* Get the prefix bit */
1142 prefix
= (tvb_get_uint8(tvb
, offset
) & 0x08);
1143 /* display the prefix */
1144 proto_tree_add_item(tree
, hf_harq_rcid_ie_prefix
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1145 if(prefix
|| (cid_type
== CID_TYPE_RCID11
))
1146 { /* display the CID11 */
1147 proto_tree_add_item(tree
, hf_harq_rcid_ie_cid11_2
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1152 if(cid_type
== CID_TYPE_RCID11
)
1153 { /* display the CID11 */
1154 proto_tree_add_item(tree
, hf_harq_rcid_ie_cid11
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1157 else if(cid_type
== CID_TYPE_RCID7
)
1158 { /* display the CID7 */
1159 proto_tree_add_item(tree
, hf_harq_rcid_ie_cid7
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1162 else if(cid_type
== CID_TYPE_RCID3
)
1163 { /* display the CID3 */
1164 proto_tree_add_item(tree
, hf_harq_rcid_ie_cid3
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1170 /* return the IE length in nibbles */
1174 /* Compact DL-MAP HARQ Control IE (6.3.2.3.43.4) decoder */
1175 static unsigned wimax_compact_dlmap_harq_control_ie_decoder(proto_tree
*tree
, packet_info
*pinfo _U_
, tvbuff_t
*tvb
, unsigned offset
, unsigned nibble_offset
)
1177 unsigned byte
, prefix
, length
= 0;
1180 /* update the info column */
1181 col_append_sep_str(pinfo
->cinfo
, COL_INFO
, NULL
, "HARQ Control IE");
1183 /* Get the first byte */
1184 byte
= tvb_get_uint8(tvb
, offset
);
1185 if(nibble_offset
& 1)
1186 { /* Get the prefix bit */
1187 prefix
= (byte
& 0x08);
1188 /* display the prefix */
1189 proto_tree_add_item(tree
, hf_harq_control_ie_prefix_1
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1191 { /* display the ai_sn */
1192 proto_tree_add_item(tree
, hf_harq_control_ie_ai_sn_1
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1193 /* display the spid */
1194 proto_tree_add_item(tree
, hf_harq_control_ie_spid_1
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1195 /* display the acid */
1196 proto_tree_add_item(tree
, hf_harq_control_ie_acid_1
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1200 { /* display the reserved bits */
1201 proto_tree_add_item(tree
, hf_harq_control_ie_reserved_1
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1206 { /* Get the prefix bit */
1207 prefix
= (byte
& 0x80);
1208 /* display the prefix */
1209 proto_tree_add_item(tree
, hf_harq_control_ie_prefix
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1211 { /* display the ai_sn */
1212 proto_tree_add_item(tree
, hf_harq_control_ie_ai_sn
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1213 /* display the spid */
1214 proto_tree_add_item(tree
, hf_harq_control_ie_spid
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1215 /* display the acid */
1216 proto_tree_add_item(tree
, hf_harq_control_ie_acid
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1220 { /* display the reserved bits */
1221 proto_tree_add_item(tree
, hf_harq_control_ie_reserved
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1225 /* return the IE length in nibbles */
1229 /* Compact DL-MAP CQICH Control IE (6.3.2.3.43.5) decoder */
1230 static unsigned wimax_compact_dlmap_cqich_control_ie_decoder(proto_tree
*tree
, packet_info
*pinfo _U_
, tvbuff_t
*tvb
, unsigned offset
, unsigned nibble_offset
)
1232 unsigned byte
, cqich_indicator
, length
= 0;
1235 /* update the info column */
1236 col_append_sep_str(pinfo
->cinfo
, COL_INFO
, NULL
, "CQICH Control IE");
1238 /* Get the first byte */
1239 byte
= tvb_get_uint8(tvb
, offset
);
1240 if(nibble_offset
& 1)
1241 { /* Get the CQICH indicator */
1242 cqich_indicator
= (byte
& 0x08);
1244 { /* display the CQICH indicator */
1245 proto_tree_add_item(tree
, hf_cqich_control_ie_indicator_1
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1246 /* display the allocation index */
1247 proto_tree_add_item(tree
, hf_cqich_control_ie_alloc_id_1
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1248 /* display the period */
1249 proto_tree_add_item(tree
, hf_cqich_control_ie_period_1
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1250 /* display the frame offset */
1251 proto_tree_add_item(tree
, hf_cqich_control_ie_frame_offset_1
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1252 /* display the duration */
1253 proto_tree_add_item(tree
, hf_cqich_control_ie_duration_1
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1257 { /* display the CQICH indicator */
1258 proto_tree_add_item(tree
, hf_cqich_control_ie_indicator_1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1259 /* display the CQI reporting threshold */
1260 proto_tree_add_item(tree
, hf_cqich_control_ie_cqi_rep_threshold_1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1265 { /* Get the CQICH indicator */
1266 cqich_indicator
= (byte
& 0x80);
1268 { /* display the CQICH indicator */
1269 proto_tree_add_item(tree
, hf_cqich_control_ie_indicator
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1270 /* display the allocation index */
1271 proto_tree_add_item(tree
, hf_cqich_control_ie_alloc_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1272 /* display the period */
1273 proto_tree_add_item(tree
, hf_cqich_control_ie_period
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1274 /* display the frame offset */
1275 proto_tree_add_item(tree
, hf_cqich_control_ie_frame_offset
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1276 /* display the duration */
1277 proto_tree_add_item(tree
, hf_cqich_control_ie_duration
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1281 { /* display the CQICH indicator */
1282 proto_tree_add_item(tree
, hf_cqich_control_ie_indicator
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1283 /* display the CQI reporting threshold */
1284 proto_tree_add_item(tree
, hf_cqich_control_ie_cqi_rep_threshold
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1288 /* return the IE length in nibbles */
1292 /* DL-MAP Extension IE sub-types */
1293 #define TIME_DIVERSITY_MBS 0
1294 #define HARQ_MODE_SWITCH 1
1296 /* Compact DL-MAP Extension IE (6.3.2.3.43.6.6) decoder */
1297 static unsigned wimax_cdlmap_extension_ie_decoder(proto_tree
*tree
, packet_info
*pinfo _U_
, tvbuff_t
*tvb
, unsigned offset
, unsigned nibble_offset
)
1299 unsigned tvb_value
, dl_map_type
, sub_type
, length
;
1302 /* update the info column */
1303 col_append_sep_str(pinfo
->cinfo
, COL_INFO
, NULL
, "DL-MAP Extension IE");
1305 /* Get the first 16-bit word */
1306 tvb_value
= tvb_get_ntohs(tvb
, offset
);
1307 if(nibble_offset
& 1)
1308 { /* Get the dl-map type */
1309 dl_map_type
= ((tvb_value
& 0x0E00) >> 9);
1310 if(dl_map_type
!= COMPACT_DL_MAP_TYPE_EXTENSION
)
1312 /* Get the sub-type */
1313 sub_type
= ((tvb_value
& 0x01F0) >> 4);
1314 /* Get the IE length */
1315 length
= (tvb_value
& 0x000F);
1316 /* display the DL-MAP type */
1317 proto_tree_add_item(tree
, hf_cdlmap_extension_type_1
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1318 /* display the DL-MAP extension subtype */
1319 proto_tree_add_item(tree
, hf_cdlmap_extension_subtype_1
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1320 /* display the IE length */
1321 proto_tree_add_item(tree
, hf_cdlmap_extension_length_1
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1325 case TIME_DIVERSITY_MBS
:
1326 /* display the time-diversity MBS in HEX */
1327 proto_tree_add_item(tree
, hf_cdlmap_extension_time_diversity_mbs_1
, tvb
, offset
, (length
- 2), ENC_NA
);
1329 case HARQ_MODE_SWITCH
:
1330 /* display the HARQ mode */
1331 proto_tree_add_item(tree
, hf_cdlmap_extension_harq_mode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1332 /* Get the next byte */
1333 tvb_value
= tvb_get_uint8(tvb
, offset
);
1334 /* get the HARQ mode */
1335 harq_mode
= ((tvb_value
& MSB_NIBBLE_MASK
) >> 4);
1338 /* display the unknown sub-type in HEX */
1339 proto_tree_add_item(tree
, hf_cdlmap_extension_unknown_sub_type_1
, tvb
, offset
, (length
- 2), ENC_NA
);
1344 { /* Get the dl-map type */
1345 dl_map_type
= ((tvb_value
& 0xE000) >> 13);
1346 if(dl_map_type
!= COMPACT_DL_MAP_TYPE_EXTENSION
)
1348 /* Get the sub-type */
1349 sub_type
= ((tvb_value
& 0x1F00) >> 8);
1350 /* Get the IE length */
1351 length
= ((tvb_value
& 0x00F0) >> 4);
1352 /* display the DL-MAP type */
1353 proto_tree_add_item(tree
, hf_cdlmap_extension_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1354 /* display the DL-MAP extension subtype */
1355 proto_tree_add_item(tree
, hf_cdlmap_extension_subtype
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1356 /* display the IE length */
1357 proto_tree_add_item(tree
, hf_cdlmap_extension_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1360 case TIME_DIVERSITY_MBS
:
1361 /* display the time-diversity MBS in HEX */
1362 proto_tree_add_item(tree
, hf_cdlmap_extension_time_diversity_mbs
, tvb
, (offset
+ 1), (length
- 1), ENC_NA
);
1364 case HARQ_MODE_SWITCH
:
1365 /* display the HARQ mode */
1366 proto_tree_add_item(tree
, hf_cdlmap_extension_harq_mode_1
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1367 /* get the HARQ mode */
1368 harq_mode
= (tvb_value
& 0x000F);
1371 /* display the unknown sub-type in HEX */
1372 proto_tree_add_item(tree
, hf_cdlmap_extension_unknown_sub_type
, tvb
, (offset
+ 1), (length
- 1), ENC_NA
);
1376 /* return the IE length in nibbles */
1377 return (length
* 2);
1380 /* Extended DIUCs (table 277a) */
1381 #define CHANNEL_MEASUREMENT_IE 0
1382 #define STC_ZONE_IE 1
1384 #define DATA_LOCATION_IN_ANOTHER_BS_IE 3
1385 #define CID_SWITCH_IE 4
1386 #define MIMO_DL_BASIC_IE 5
1387 #define MIMO_DL_ENHANCED_IE 6
1388 #define HARQ_MAP_POINTER_IE 7
1389 #define PHYMOD_DL_IE 8
1390 #define DL_PUSC_BURST_ALLOCATION_IN_OTHER_SEGMENT_IE 11
1391 #define UL_INTERFERENCE_AND_NOISE_LEVEL_IE 15
1393 /* Extended DIUC IE (8.4.5.3.2) */
1394 unsigned wimax_extended_diuc_dependent_ie_decoder(proto_tree
*tree
, packet_info
*pinfo _U_
, tvbuff_t
*tvb
, unsigned offset
, unsigned nibble_offset
)
1396 unsigned ext_diuc
, length
;
1399 /* get the first byte */
1400 byte
= tvb_get_uint8(tvb
, offset
);
1401 if(nibble_offset
& 1)
1402 { /* get the extended DIUC */
1403 ext_diuc
= (byte
& LSB_NIBBLE_MASK
);
1404 /* display extended DIUC */
1405 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_diuc_1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1406 /* move to next byte */
1408 /* get the 2nd byte */
1409 byte
= tvb_get_uint8(tvb
, offset
);
1410 /* get the length */
1411 length
= ((byte
& MSB_NIBBLE_MASK
) >> 4);
1412 /* display extended DIUC length */
1413 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1414 /* 8.4.5.3.2.1 (table 277a) */
1417 case CHANNEL_MEASUREMENT_IE
:
1418 /* 8.4.5.3.? Channel_Measurement_IE */
1419 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_channel_measurement
, tvb
, offset
, (length
+ 1), ENC_NA
);
1422 /* 8.4.5.3.4 STC_Zone_IE */
1423 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_stc_zone
, tvb
, offset
, (length
+ 1), ENC_NA
);
1426 /* 8.4.5.3.3 AAS_DL_IE */
1427 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_aas_dl
, tvb
, offset
, (length
+ 1), ENC_NA
);
1429 case DATA_LOCATION_IN_ANOTHER_BS_IE
:
1430 /* 8.4.5.3.6 Data_location_in_another_BS_IE */
1431 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_data_location
, tvb
, offset
, (length
+ 1), ENC_NA
);
1434 /* 8.4.5.3.7 CID_Switch_IE */
1435 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_cid_switch
, tvb
, offset
, (length
+ 1), ENC_NA
);
1437 case MIMO_DL_BASIC_IE
:
1438 /* 8.4.5.3.8 MIMO_DL_Basic_IE */
1439 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_mimo_dl_basic
, tvb
, offset
, (length
+ 1), ENC_NA
);
1441 case MIMO_DL_ENHANCED_IE
:
1442 /* 8.4.5.3.9 MIMO_DL_Enhanced_IE */
1443 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_mimo_dl_enhanced
, tvb
, offset
, (length
+ 1), ENC_NA
);
1445 case HARQ_MAP_POINTER_IE
:
1446 /* 8.4.5.3.10 HARQ_Map_Pointer_IE */
1447 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_harq_map_pointer
, tvb
, offset
, (length
+ 1), ENC_NA
);
1450 /* 8.4.5.3.11 PHYMOD_DL_IE */
1451 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_phymod_dl
, tvb
, offset
, (length
+ 1), ENC_NA
);
1453 case DL_PUSC_BURST_ALLOCATION_IN_OTHER_SEGMENT_IE
:
1454 /* 8.4.5.3.13 DL PUSC Burst Allocation in Other Segment IE */
1455 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_dl_pusc_burst_allocation
, tvb
, offset
, (length
+ 1), ENC_NA
);
1457 case UL_INTERFERENCE_AND_NOISE_LEVEL_IE
:
1458 /* 8.4.5.3.19 UL_interference_and_noise_level_IE */
1459 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_ul_interference_and_noise_level
, tvb
, offset
, (length
+ 1), ENC_NA
);
1462 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_unknown_diuc
, tvb
, offset
, (length
+ 1), ENC_NA
);
1467 { /* get the extended DIUC */
1468 ext_diuc
= ((byte
& MSB_NIBBLE_MASK
) >> 4);
1469 /* get the length */
1470 length
= (byte
& LSB_NIBBLE_MASK
);
1471 /* display extended DIUC */
1472 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_diuc
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1473 /* display extended DIUC length */
1474 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_length_1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1475 /* move to next byte */
1477 /* 8.4.5.3.2.1 (table 277a) */
1480 case CHANNEL_MEASUREMENT_IE
:
1481 /* 8.4.5.3.? Channel_Measurement_IE */
1482 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_channel_measurement
, tvb
, offset
, length
, ENC_NA
);
1485 /* 8.4.5.3.4 STC_Zone_IE */
1486 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_stc_zone
, tvb
, offset
, length
, ENC_NA
);
1489 /* 8.4.5.3.3 AAS_DL_IE */
1490 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_aas_dl
, tvb
, offset
, length
, ENC_NA
);
1492 case DATA_LOCATION_IN_ANOTHER_BS_IE
:
1493 /* 8.4.5.3.6 Data_location_in_another_BS_IE */
1494 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_data_location
, tvb
, offset
, length
, ENC_NA
);
1497 /* 8.4.5.3.7 CID_Switch_IE */
1498 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_cid_switch
, tvb
, offset
, length
, ENC_NA
);
1500 case MIMO_DL_BASIC_IE
:
1501 /* 8.4.5.3.8 MIMO_DL_Basic_IE */
1502 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_mimo_dl_basic
, tvb
, offset
, length
, ENC_NA
);
1504 case MIMO_DL_ENHANCED_IE
:
1505 /* 8.4.5.3.9 MIMO_DL_Enhanced_IE */
1506 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_mimo_dl_enhanced
, tvb
, offset
, length
, ENC_NA
);
1508 case HARQ_MAP_POINTER_IE
:
1509 /* 8.4.5.3.10 HARQ_Map_Pointer_IE */
1510 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_harq_map_pointer
, tvb
, offset
, length
, ENC_NA
);
1513 /* 8.4.5.3.11 PHYMOD_DL_IE */
1514 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_phymod_dl
, tvb
, offset
, length
, ENC_NA
);
1516 case DL_PUSC_BURST_ALLOCATION_IN_OTHER_SEGMENT_IE
:
1517 /* 8.4.5.3.13 DL PUSC Burst Allocation in Other Segment IE */
1518 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_dl_pusc_burst_allocation
, tvb
, offset
, length
, ENC_NA
);
1520 case UL_INTERFERENCE_AND_NOISE_LEVEL_IE
:
1521 /* 8.4.5.3.19 UL_interference_and_noise_level_IE */
1522 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_ul_interference_and_noise_level
, tvb
, offset
, length
, ENC_NA
);
1525 proto_tree_add_item(tree
, hf_extended_diuc_dependent_ie_unknown_diuc
, tvb
, offset
, length
, ENC_NA
);
1529 return ((length
+ 1) * 2 ); /* length in nibbles */
1533 /* Register Wimax Compact DL-MAP IE Protocol */
1534 void wimax_proto_register_wimax_compact_dlmap_ie(void)
1536 /* Compact DL-MAP IE display */
1537 static hf_register_info hf_compact_dlmap
[] =
1540 &hf_cdlmap_dl_map_type
,
1541 {"DL-MAP Type", "wmx.compact_dlmap.dl_map_type", FT_UINT8
, BASE_DEC
, NULL
, DL_MAP_TYPE_MASK
, NULL
, HFILL
}
1544 &hf_cdlmap_dl_map_type_1
,
1545 {"DL-MAP Type", "wmx.compact_dlmap.dl_map_type", FT_UINT8
, BASE_DEC
, NULL
, DL_MAP_TYPE_MASK_1
, NULL
, HFILL
}
1548 &hf_cdlmap_ul_map_append
,
1549 {"UL-MAP Append", "wmx.compact_dlmap.ul_map_append", FT_UINT8
, BASE_HEX
, NULL
, UL_MAP_APPEND_MASK
, NULL
, HFILL
}
1552 &hf_cdlmap_ul_map_append_1
,
1553 {"UL-MAP Append", "wmx.compact_dlmap.ul_map_append", FT_UINT8
, BASE_HEX
, NULL
, UL_MAP_APPEND_MASK_1
, NULL
, HFILL
}
1556 &hf_cdlmap_reserved
,
1557 {"Reserved", "wmx.compact_dlmap.reserved", FT_UINT8
, BASE_HEX
, NULL
, UL_MAP_APPEND_MASK
, NULL
, HFILL
}
1560 &hf_cdlmap_reserved_1
,
1561 {"Reserved", "wmx.compact_dlmap.reserved", FT_UINT8
, BASE_HEX
, NULL
, UL_MAP_APPEND_MASK_1
, NULL
, HFILL
}
1564 &hf_cdlmap_nep_code
,
1565 {"Nep Code", "wmx.compact_dlmap.nep_code", FT_UINT8
, BASE_HEX
, NULL
, MSB_NIBBLE_MASK
, NULL
, HFILL
}
1568 &hf_cdlmap_nep_code_1
,
1569 {"Nep Code", "wmx.compact_dlmap.nep_code", FT_UINT8
, BASE_HEX
, NULL
, LSB_NIBBLE_MASK
, NULL
, HFILL
}
1572 &hf_cdlmap_nsch_code
,
1573 {"Nsch Code", "wmx.compact_dlmap.nsch_code", FT_UINT8
, BASE_HEX
, NULL
, MSB_NIBBLE_MASK
, NULL
, HFILL
}
1576 &hf_cdlmap_nsch_code_1
,
1577 {"Nsch Code", "wmx.compact_dlmap.nsch_code", FT_UINT8
, BASE_HEX
, NULL
, LSB_NIBBLE_MASK
, NULL
, HFILL
}
1580 &hf_cdlmap_num_bands
,
1581 {"Number Of Bands", "wmx.compact_dlmap.num_bands", FT_UINT8
, BASE_HEX
, NULL
, MSB_NIBBLE_MASK
, NULL
, HFILL
}
1584 &hf_cdlmap_num_bands_1
,
1585 {"Number Of Bands", "wmx.compact_dlmap.num_bands", FT_UINT8
, BASE_HEX
, NULL
, LSB_NIBBLE_MASK
, NULL
, HFILL
}
1588 &hf_cdlmap_band_index
,
1589 {"Band Index", "wmx.compact_dlmap.band_index", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1593 &hf_cdlmap_band_index_1
,
1594 {"Band Index", "wmx.compact_dlmap.band_index", FT_BYTES
, BASE_HEX
, NULL
, 0x0, "", HFILL
}
1598 &hf_cdlmap_nb_bitmap
,
1599 {"Number Of Bits For Band BITMAP", "wmx.compact_dlmap.nb_bitmap", FT_UINT8
, BASE_HEX
, NULL
, MSB_NIBBLE_MASK
, NULL
, HFILL
}
1602 &hf_cdlmap_nb_bitmap_1
,
1603 {"Number Of Bits For Band BITMAP", "wmx.compact_dlmap.nb_bitmap", FT_UINT8
, BASE_HEX
, NULL
, LSB_NIBBLE_MASK
, NULL
, HFILL
}
1606 &hf_cdlmap_shortened_uiuc
,
1607 {"Shortened UIUC", "wmx.compact_dlmap.shortened_uiuc", FT_UINT8
, BASE_HEX
, NULL
, SHORTENED_DIUC_MASK
, NULL
, HFILL
}
1610 &hf_cdlmap_shortened_uiuc_1
,
1611 {"Shortened UIUC", "wmx.compact_dlmap.shortened_uiuc", FT_UINT16
, BASE_HEX
, NULL
, SHORTENED_DIUC_MASK_1
, NULL
, HFILL
}
1614 &hf_cdlmap_shortened_diuc
,
1615 {"Shortened DIUC", "wmx.compact_dlmap.shortened_diuc", FT_UINT8
, BASE_HEX
, NULL
, SHORTENED_DIUC_MASK
, NULL
, HFILL
}
1618 &hf_cdlmap_shortened_diuc_1
,
1619 {"Shortened DIUC", "wmx.compact_dlmap.shortened_diuc", FT_UINT16
, BASE_HEX
, NULL
, SHORTENED_DIUC_MASK_1
, NULL
, HFILL
}
1622 &hf_cdlmap_companded_sc
,
1623 {"Companded SC", "wmx.compact_dlmap.companded_sc", FT_UINT8
, BASE_HEX
, NULL
, COMPANDED_SC_MASK
, NULL
, HFILL
}
1626 &hf_cdlmap_companded_sc_1
,
1627 {"Companded SC", "wmx.compact_dlmap.companded_sc", FT_UINT16
, BASE_HEX
, NULL
, COMPANDED_SC_MASK_1
, NULL
, HFILL
}
1630 &hf_cdlmap_bin_offset
,
1631 {"BIN Offset", "wmx.compact_dlmap.bin_offset", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
1634 &hf_cdlmap_bin_offset_1
,
1635 {"BIN Offset", "wmx.compact_dlmap.bin_offset", FT_UINT16
, BASE_HEX
, NULL
, 0x0FF0, NULL
, HFILL
}
1638 &hf_cdlmap_diuc_num_of_subchannels
,
1639 {"Number Of Subchannels", "wmx.compact_dlmap.diuc_num_of_subchannels", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1642 &hf_cdlmap_diuc_num_of_subchannels_1
,
1643 {"Number Of Subchannels", "wmx.compact_dlmap.diuc_num_of_subchannels", FT_UINT16
, BASE_DEC
, NULL
, 0x0FF0, NULL
, HFILL
}
1646 &hf_cdlmap_diuc_repetition_coding_indication
,
1647 {"Repetition Coding Indication", "wmx.compact_dlmap.diuc_repetition_coding_indication", FT_UINT8
, BASE_DEC
, VALS(rep_msgs
), 0xC0, NULL
, HFILL
}
1650 &hf_cdlmap_diuc_repetition_coding_indication_1
,
1651 {"Repetition Coding Indication", "wmx.compact_dlmap.diuc_repetition_coding_indication", FT_UINT8
, BASE_DEC
, VALS(rep_msgs
), 0x0C, NULL
, HFILL
}
1654 &hf_cdlmap_diuc_reserved
,
1655 {"Reserved", "wmx.compact_dlmap.diuc_reserved", FT_UINT8
, BASE_HEX
, NULL
, 0x30, NULL
, HFILL
}
1658 &hf_cdlmap_diuc_reserved_1
,
1659 {"Reserved", "wmx.compact_dlmap.diuc_reserved", FT_UINT8
, BASE_HEX
, NULL
, 0x03, NULL
, HFILL
}
1662 &hf_cdlmap_bit_map_length
,
1663 {"BIT MAP Length", "wmx.compact_dlmap.bit_map_length", FT_UINT8
, BASE_DEC
, NULL
, MSB_NIBBLE_MASK
, NULL
, HFILL
}
1666 &hf_cdlmap_bit_map_length_1
,
1667 {"BIT MAP Length", "wmx.compact_dlmap.bit_map_length", FT_UINT8
, BASE_DEC
, NULL
, LSB_NIBBLE_MASK
, NULL
, HFILL
}
1671 {"BIT MAP", "wmx.compact_dlmap.bit_map", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1675 {"DIUC", "wmx.compact_dlmap.diuc", FT_UINT8
, BASE_HEX
, NULL
, MSB_NIBBLE_MASK
, NULL
, HFILL
}
1679 {"DIUC", "wmx.compact_dlmap.diuc", FT_UINT8
, BASE_HEX
, NULL
, LSB_NIBBLE_MASK
, NULL
, HFILL
}
1682 &hf_cdlmap_allocation_mode
,
1683 {"Allocation Mode", "wmx.compact_dlmap.allocation_mode", FT_UINT8
, BASE_DEC
, VALS(vals_allocation_modes
), 0xC0, NULL
, HFILL
}
1686 &hf_cdlmap_allocation_mode_1
,
1687 {"Allocation Mode", "wmx.compact_dlmap.allocation_mode", FT_UINT8
, BASE_DEC
, VALS(vals_allocation_modes
), 0x0C, NULL
, HFILL
}
1690 &hf_cdlmap_allocation_mode_rsvd
,
1691 {"Reserved", "wmx.compact_dlmap.allocation_mode_rsvd", FT_UINT8
, BASE_DEC
, NULL
, 0x30, NULL
, HFILL
}
1694 &hf_cdlmap_allocation_mode_rsvd_1
,
1695 {"Reserved", "wmx.compact_dlmap.allocation_mode_rsvd", FT_UINT8
, BASE_DEC
, NULL
, 0x03, NULL
, HFILL
}
1698 &hf_cdlmap_num_subchannels
,
1699 {"Number Of Subchannels", "wmx.compact_dlmap.num_subchannels", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1702 &hf_cdlmap_num_subchannels_1
,
1703 {"Number Of Subchannels", "wmx.compact_dlmap.num_subchannels", FT_UINT16
, BASE_DEC
, NULL
, 0x0FF0, NULL
, HFILL
}
1707 &hf_cdlmap_reserved_type
,
1708 {"DL-MAP Reserved Type", "wmx.compact_dlmap.reserved_type", FT_UINT8
, BASE_DEC
, NULL
, DL_MAP_TYPE_MASK
, NULL
, HFILL
}
1712 &hf_cdlmap_reserved_type_1
,
1713 {"DL-MAP Reserved Type", "wmx.compact_dlmap.reserved_type", FT_UINT8
, BASE_DEC
, NULL
, DL_MAP_TYPE_MASK_1
, NULL
, HFILL
}
1717 /* HARQ MAP Format Configuration IE display */
1718 static hf_register_info hf_format_config
[] =
1721 &hf_format_config_ie_dl_map_type
,
1722 {"DL-MAP Type", "wmx.format_config_ie.dl_map_type", FT_UINT8
, BASE_DEC
, NULL
, DL_MAP_TYPE_MASK
, NULL
, HFILL
}
1725 &hf_format_config_ie_dl_map_type_1
,
1726 {"DL-MAP Type", "wmx.format_config_ie.dl_map_type", FT_UINT8
, BASE_DEC
, NULL
, DL_MAP_TYPE_MASK_1
, NULL
, HFILL
}
1729 &hf_format_config_ie_dl_map_type_32
,
1730 {"DL-MAP Type", "wmx.format_config_ie.dl_map_type", FT_UINT32
, BASE_DEC
, NULL
, FORMAT_CONFIG_IE_DL_MAP_TYPE_MASK
, NULL
, HFILL
}
1733 &hf_format_config_ie_new_format_indication
,
1734 {"New Format Indication", "wmx.format_config_ie.new_format_indication", FT_BOOLEAN
, 8, TFS(&tfs_indication
), UL_MAP_APPEND_MASK
, NULL
, HFILL
}
1737 &hf_format_config_ie_new_format_indication_1
,
1738 {"New Format Indication", "wmx.format_config_ie.new_format_indication", FT_BOOLEAN
, 8, TFS(&tfs_indication
), UL_MAP_APPEND_MASK_1
, NULL
, HFILL
}
1741 &hf_format_config_ie_new_format_indication_32
,
1742 {"New Format Indication", "wmx.format_config_ie.new_format_indication", FT_BOOLEAN
, 32, TFS(&tfs_indication
), FORMAT_CONFIG_IE_NEW_FORMAT_IND_MASK
, NULL
, HFILL
}
1745 &hf_format_config_ie_cid_type
,
1746 {"HARQ MAP Indicator", "wmx.harq_map.format_config_ie.indicator", FT_UINT32
, BASE_HEX
, VALS(vals_cid_types
), CID_TYPE_MASK
, NULL
, HFILL
}
1749 &hf_format_config_ie_cid_type_1
,
1750 {"CID Type", "wmx.harq_map.format_config_ie.cid_type", FT_UINT32
, BASE_HEX
, VALS(vals_cid_types
), CID_TYPE_MASK_1
, NULL
, HFILL
}
1753 &hf_format_config_ie_safety_pattern
,
1754 {"Safety Pattern", "wmx.harq_map.format_config_ie.safety_pattern", FT_UINT32
, BASE_HEX
, NULL
, SAFETY_PATTERN_MASK
, NULL
, HFILL
}
1757 &hf_format_config_ie_safety_pattern_1
,
1758 {"Safety Pattern", "wmx.harq_map.format_config_ie.safety_pattern", FT_UINT32
, BASE_HEX
, NULL
, SAFETY_PATTERN_MASK_1
, NULL
, HFILL
}
1761 &hf_format_config_ie_subchannel_type
,
1762 {"Subchannel Type For Band AMC", "wmx.harq_map.format_config_ie.subchannel_type", FT_UINT32
, BASE_HEX
, VALS(vals_subchannel_types
), BAND_AMC_SUBCHANNEL_TYPE_MASK
, NULL
, HFILL
}
1765 &hf_format_config_ie_subchannel_type_1
,
1766 {"Subchannel Type For Band AMC", "wmx.harq_map.format_config_ie.subchannel_type", FT_UINT32
, BASE_HEX
, VALS(vals_subchannel_types
), BAND_AMC_SUBCHANNEL_TYPE_MASK_1
, NULL
, HFILL
}
1769 &hf_format_config_ie_max_logical_bands
,
1770 {"Max Logical Bands", "wmx.harq_map.format_config_ie.max_logical_bands", FT_UINT32
, BASE_HEX
, VALS(vals_max_logical_bands
), MAX_LOGICAL_BANDS_MASK
, NULL
, HFILL
}
1773 &hf_format_config_ie_max_logical_bands_1
,
1774 {"Max Logical Bands", "wmx.harq_map.format_config_ie.max_logical_bands", FT_UINT32
, BASE_HEX
, VALS(vals_max_logical_bands
), MAX_LOGICAL_BANDS_MASK_1
, NULL
, HFILL
}
1777 &hf_format_config_ie_num_of_broadcast_symbol
,
1778 {"Number Of Symbols for Broadcast", "wmx.harq_map.format_config_ie.num_of_broadcast_symbol", FT_UINT32
, BASE_HEX
, NULL
, NUM_BROADCAST_SYMBOLS_MASK_1
, NULL
, HFILL
}
1781 &hf_format_config_ie_num_of_broadcast_symbol_1
,
1782 {"Number Of Symbols for Broadcast", "wmx.harq_map.num_of_broadcast_symbol", FT_UINT32
, BASE_HEX
, NULL
, NUM_BROADCAST_SYMBOLS_MASK_1
, NULL
, HFILL
}
1785 &hf_format_config_ie_num_of_dl_band_amc_symbol
,
1786 {"Number Of Symbols for Broadcast", "wmx.harq_map.format_config_ie.num_of_dl_band_amc_symbol", FT_UINT32
, BASE_HEX
, NULL
, NUM_DL_AMC_SYMBOLS_MASK
, NULL
, HFILL
}
1789 &hf_format_config_ie_num_of_dl_band_amc_symbol_1
,
1790 {"Number Of Symbols for Broadcast", "wmx.harq_map.num_of_dl_band_amc_symbol", FT_UINT32
, BASE_HEX
, NULL
, NUM_DL_AMC_SYMBOLS_MASK_1
, NULL
, HFILL
}
1793 &hf_format_config_ie_num_of_ul_band_amc_symbol
,
1794 {"Number Of Symbols for Broadcast", "wmx.harq_map.format_config_ie.num_of_ul_band_amc_symbol", FT_UINT32
, BASE_HEX
, NULL
, NUM_UL_AMC_SYMBOLS_MASK
, NULL
, HFILL
}
1797 &hf_format_config_ie_num_of_ul_band_amc_symbol_1
,
1798 {"Number Of Symbols for Broadcast", "wmx.harq_map.num_of_ul_band_amc_symbol", FT_UINT32
, BASE_HEX
, NULL
, NUM_UL_AMC_SYMBOLS_MASK_1
, NULL
, HFILL
}
1802 /* HARQ MAP Reduced CID IE display */
1803 static hf_register_info hf_rcid
[] =
1806 &hf_harq_rcid_ie_normal_cid
,
1807 {"Normal CID", "wmx.harq_map.rcid_ie.normal_cid", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
1810 &hf_harq_rcid_ie_normal_cid_1
,
1811 {"Normal CID", "wmx.harq_map.rcid_ie.normal_cid", FT_UINT24
, BASE_HEX
, NULL
, WIMAX_RCID_IE_NORMAL_CID_MASK_1
, NULL
, HFILL
}
1814 &hf_harq_rcid_ie_prefix
,
1815 {"Prefix", "wmx.harq_map.rcid_ie.prefix", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_RCID_IE_PREFIX_MASK
, NULL
, HFILL
}
1818 &hf_harq_rcid_ie_prefix_1
,
1819 {"Prefix", "wmx.harq_map.rcid_ie.prefix", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_RCID_IE_PREFIX_MASK_1
, NULL
, HFILL
}
1822 &hf_harq_rcid_ie_cid3
,
1823 {"3 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid3", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_RCID_IE_CID3_MASK
, NULL
, HFILL
}
1826 &hf_harq_rcid_ie_cid3_1
,
1827 {"3 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid3", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_RCID_IE_CID3_MASK_1
, NULL
, HFILL
}
1830 &hf_harq_rcid_ie_cid7
,
1831 {"7 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid7", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_RCID_IE_CID7_MASK
, NULL
, HFILL
}
1834 &hf_harq_rcid_ie_cid7_1
,
1835 {"7 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid7", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_RCID_IE_CID7_MASK_1
, NULL
, HFILL
}
1838 &hf_harq_rcid_ie_cid11
,
1839 {"11 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid11", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_RCID_IE_CID11_MASK
, NULL
, HFILL
}
1842 &hf_harq_rcid_ie_cid11_1
,
1843 {"11 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid11", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_RCID_IE_CID11_MASK_1
, NULL
, HFILL
}
1846 &hf_harq_rcid_ie_cid11_2
,
1847 {"11 LSB Of Multicast, AAS or Broadcast CID", "wmx.harq_map.rcid_ie.cid11", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_RCID_IE_CID11_MASK
, NULL
, HFILL
}
1850 &hf_harq_rcid_ie_cid11_3
,
1851 {"11 LSB Of Multicast, AAS or Broadcast CID", "wmx.harq_map.rcid_ie.cid11", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_RCID_IE_CID11_MASK_1
, NULL
, HFILL
}
1855 /* HARQ MAP HARQ Control IE display */
1856 static hf_register_info hf_harq_control
[] =
1859 &hf_harq_control_ie_prefix
,
1860 {"Prefix", "wmx.harq_map.harq_control_ie.prefix", FT_BOOLEAN
, 8, TFS(&tfs_prefix
), WIMAX_HARQ_CONTROL_IE_PREFIX_MASK
, NULL
, HFILL
}
1863 &hf_harq_control_ie_ai_sn
,
1864 {"HARQ ID Sequence Number(AI_SN)", "wmx.harq_map.harq_control_ie.ai_sn", FT_UINT8
, BASE_HEX
, NULL
, WIMAX_HARQ_CONTROL_IE_AI_SN_MASK
, NULL
, HFILL
}
1867 &hf_harq_control_ie_spid
,
1868 {"Subpacket ID (SPID)", "wmx.harq_map.harq_control_ie.spid", FT_UINT8
, BASE_HEX
, NULL
, WIMAX_HARQ_CONTROL_IE_SPID_MASK
, NULL
, HFILL
}
1871 &hf_harq_control_ie_acid
,
1872 {"HARQ CH ID (ACID)", "wmx.harq_map.harq_control_ie.acid", FT_UINT8
, BASE_HEX
, NULL
, WIMAX_HARQ_CONTROL_IE_ACID_MASK
, NULL
, HFILL
}
1875 &hf_harq_control_ie_reserved
,
1876 {"Reserved", "wmx.harq_map.harq_control_ie.reserved", FT_UINT8
, BASE_HEX
, NULL
, WIMAX_HARQ_CONTROL_IE_RESERVED_MASK
, NULL
, HFILL
}
1879 &hf_harq_control_ie_prefix_1
,
1880 {"Prefix", "wmx.harq_map.harq_control_ie.prefix", FT_BOOLEAN
, 16, TFS(&tfs_prefix
), WIMAX_HARQ_CONTROL_IE_PREFIX_MASK_1
, NULL
, HFILL
}
1883 &hf_harq_control_ie_ai_sn_1
,
1884 {"HARQ ID Sequence Number(AI_SN)", "wmx.harq_map.harq_control_ie.ai_sn", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_HARQ_CONTROL_IE_AI_SN_MASK_1
, NULL
, HFILL
}
1887 &hf_harq_control_ie_spid_1
,
1888 {"Subpacket ID (SPID)", "wmx.harq_map.harq_control_ie.spid", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_HARQ_CONTROL_IE_SPID_MASK_1
, NULL
, HFILL
}
1891 &hf_harq_control_ie_acid_1
,
1892 {"HARQ CH ID (ACID)", "wmx.harq_map.harq_control_ie.acid", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_HARQ_CONTROL_IE_ACID_MASK_1
, NULL
, HFILL
}
1895 &hf_harq_control_ie_reserved_1
,
1896 {"Reserved", "wmx.harq_map.harq_control_ie.reserved", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_HARQ_CONTROL_IE_RESERVED_MASK_1
, NULL
, HFILL
}
1900 /* HARQ MAP CQICH Control IE display */
1901 static hf_register_info hf_cqich_control
[] =
1904 &hf_cqich_control_ie_indicator
,
1905 {"CQICH Indicator", "wmx.harq_map.cqich_control_ie.cqich_indicator", FT_BOOLEAN
, 16, TFS(&tfs_cqich_ind
), WIMAX_CQICH_CONTROL_IE_INDICATOR_MASK
, NULL
, HFILL
}
1908 &hf_cqich_control_ie_alloc_id
,
1909 {"Allocation Index", "wmx.harq_map.cqich_control_ie.alloc_id", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_CQICH_CONTROL_IE_ALLOCATION_INDEX_MASK
, NULL
, HFILL
}
1912 &hf_cqich_control_ie_period
,
1913 {"PERIOD", "wmx.harq_map.cqich_control_ie.period", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_CQICH_CONTROL_IE_PERIOD_MASK
, NULL
, HFILL
}
1916 &hf_cqich_control_ie_frame_offset
,
1917 {"Frame Offset", "wmx.harq_map.cqich_control_ie.frame_offset", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_CQICH_CONTROL_IE_FRAME_OFFSET_MASK
, NULL
, HFILL
}
1920 &hf_cqich_control_ie_duration
,
1921 {"Duration", "wmx.harq_map.cqich_control_ie.duration", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_CQICH_CONTROL_IE_DURATION_MASK
, NULL
, HFILL
}
1924 &hf_cqich_control_ie_cqi_rep_threshold
,
1925 {"CQI Reporting Threshold", "wmx.harq_map.cqich_control_ie.cqi_rep_threshold", FT_UINT16
, BASE_HEX
, NULL
, WIMAX_CQICH_CONTROL_IE_CQI_REP_THRESHOLD_MASK
, NULL
, HFILL
}
1928 &hf_cqich_control_ie_indicator_1
,
1929 {"CQICH Indicator", "wmx.harq_map.cqich_control_ie.cqich_indicator", FT_BOOLEAN
, 24, TFS(&tfs_cqich_ind
), WIMAX_CQICH_CONTROL_IE_INDICATOR_MASK_1
, NULL
, HFILL
}
1932 &hf_cqich_control_ie_alloc_id_1
,
1933 {"Allocation Index", "wmx.harq_map.cqich_control_ie.alloc_id", FT_UINT24
, BASE_HEX
, NULL
, WIMAX_CQICH_CONTROL_IE_ALLOCATION_INDEX_MASK_1
, NULL
, HFILL
}
1936 &hf_cqich_control_ie_period_1
,
1937 {"PERIOD", "wmx.harq_map.cqich_control_ie.period", FT_UINT24
, BASE_HEX
, NULL
, WIMAX_CQICH_CONTROL_IE_PERIOD_MASK_1
, NULL
, HFILL
}
1940 &hf_cqich_control_ie_frame_offset_1
,
1941 {"Frame Offset", "wmx.harq_map.cqich_control_ie.frame_offset", FT_UINT24
, BASE_HEX
, NULL
, WIMAX_CQICH_CONTROL_IE_FRAME_OFFSET_MASK_1
, NULL
, HFILL
}
1944 &hf_cqich_control_ie_duration_1
,
1945 {"Duration", "wmx.harq_map.cqich_control_ie.duration", FT_UINT24
, BASE_HEX
, NULL
, WIMAX_CQICH_CONTROL_IE_DURATION_MASK_1
, NULL
, HFILL
}
1948 &hf_cqich_control_ie_cqi_rep_threshold_1
,
1949 {"CQI Reporting Threshold", "wmx.harq_map.cqich_control_ie.cqi_rep_threshold", FT_UINT24
, BASE_HEX
, NULL
, WIMAX_CQICH_CONTROL_IE_CQI_REP_THRESHOLD_MASK_1
, NULL
, HFILL
}
1953 static hf_register_info hf_extension_type
[] =
1956 &hf_cdlmap_extension_type
,
1957 {"DL-MAP Type", "wmx.extension_type.dl_map_type", FT_UINT16
, BASE_DEC
, NULL
, EXTENSION_TYPE_MASK
, NULL
, HFILL
}
1960 &hf_cdlmap_extension_type_1
,
1961 {"DL-MAP Type", "wmx.extension_type.dl_map_type", FT_UINT16
, BASE_DEC
, NULL
, EXTENSION_TYPE_MASK_1
, NULL
, HFILL
}
1964 &hf_cdlmap_extension_subtype
,
1965 {"Extension Subtype", "wmx.extension_type.subtype", FT_UINT16
, BASE_DEC
, NULL
, EXTENSION_SUBTYPE_MASK
, NULL
, HFILL
}
1968 &hf_cdlmap_extension_subtype_1
,
1969 {"Extension Subtype", "wmx.extension_type.subtype", FT_UINT16
, BASE_DEC
, NULL
, EXTENSION_SUBTYPE_MASK_1
, NULL
, HFILL
}
1972 &hf_cdlmap_extension_length
,
1973 {"Extension Length", "wmx.extension_type.length", FT_UINT16
, BASE_DEC
, NULL
, EXTENSION_LENGTH_MASK
, NULL
, HFILL
}
1976 &hf_cdlmap_extension_length_1
,
1977 {"Extension Length", "wmx.extension_type.length", FT_UINT16
, BASE_DEC
, NULL
, EXTENSION_LENGTH_MASK_1
, NULL
, HFILL
}
1980 &hf_cdlmap_extension_time_diversity_mbs
,
1981 {"Time Diversity MBS", "wmx.extension_type.time_diversity_mbs", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1984 &hf_cdlmap_extension_time_diversity_mbs_1
,
1985 {"Time Diversity MBS", "wmx.extension_type.time_diversity_mbs", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1988 &hf_cdlmap_extension_harq_mode_1
,
1989 {"HARQ Mode Switch", "wmx.extension_type.harq_mode", FT_UINT16
, BASE_HEX
, NULL
, 0x000F, NULL
, HFILL
}
1992 &hf_cdlmap_extension_harq_mode
,
1993 {"HARQ Mode Switch", "wmx.extension_type.harq_mode", FT_UINT8
, BASE_HEX
, NULL
, MSB_NIBBLE_MASK
, NULL
, HFILL
}
1996 &hf_cdlmap_extension_unknown_sub_type
,
1997 {"Unknown Extension Subtype", "wmx.extension_type.unknown_sub_type", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2000 &hf_cdlmap_extension_unknown_sub_type_1
,
2001 {"Unknown Extension Subtype", "wmx.extension_type.unknown_sub_type", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2005 /* Extended DIUC dependent IE */
2006 static hf_register_info hf_extended_diuc
[] =
2009 &hf_extended_diuc_dependent_ie_diuc
,
2010 {"Extended DIUC", "wmx.extended_diuc_dependent_ie.diuc", FT_UINT8
, BASE_HEX
, NULL
, MSB_NIBBLE_MASK
, NULL
, HFILL
}
2013 &hf_extended_diuc_dependent_ie_diuc_1
,
2014 {"Extended DIUC", "wmx.extended_diuc_dependent_ie.diuc", FT_UINT8
, BASE_HEX
, NULL
, LSB_NIBBLE_MASK
, NULL
, HFILL
}
2017 &hf_extended_diuc_dependent_ie_length
,
2018 {"Length", "wmx.extended_diuc_dependent_ie.length", FT_UINT8
, BASE_DEC
, NULL
, MSB_NIBBLE_MASK
, NULL
, HFILL
}
2021 &hf_extended_diuc_dependent_ie_length_1
,
2022 {"Length", "wmx.extended_diuc_dependent_ie.length", FT_UINT8
, BASE_DEC
, NULL
, LSB_NIBBLE_MASK
, NULL
, HFILL
}
2024 { /* 8.4.5.3.? Channel_Measurement_IE */
2025 &hf_extended_diuc_dependent_ie_channel_measurement
,
2026 {"Channel_Measurement_IE (not implemented)", "wmx.extended_diuc_dependent_ie.channel_measurement", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2028 { /* 8.4.5.3.4 STC_Zone_IE */
2029 &hf_extended_diuc_dependent_ie_stc_zone
,
2030 {"STC_Zone_IE (not implemented)", "wmx.extended_diuc_dependent_ie.stc_zone", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2032 { /* 8.4.5.3.3 AAS_DL_IE */
2033 &hf_extended_diuc_dependent_ie_aas_dl
,
2034 {"AAS_DL_IE (not implemented)", "wmx.extended_diuc_dependent_ie.aas_dl", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2036 { /* 8.4.5.3.6 Data_location_in_another_BS_IE */
2037 &hf_extended_diuc_dependent_ie_data_location
,
2038 {"Data_location_in_another_BS_IE (not implemented)", "wmx.extended_diuc_dependent_ie.data_location", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2040 { /* 8.4.5.3.7 CID_Switch_IE */
2041 &hf_extended_diuc_dependent_ie_cid_switch
,
2042 {"CID_Switch_IE (not implemented)", "wmx.extended_diuc_dependent_ie.cid_switch", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2045 { /* 8.4.5.3.8 MIMO_DL_Basic_IE */
2046 &hf_extended_diuc_dependent_ie_mimo_dl_basic
,
2047 {"MIMO_DL_Basic_IE (not implemented)", "wmx.extended_diuc_dependent_ie.mimo_dl_basic", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2049 { /* 8.4.5.3.9 MIMO_DL_Enhanced_IE */
2050 &hf_extended_diuc_dependent_ie_mimo_dl_enhanced
,
2051 {"MIMO_DL_Enhanced_IE (not implemented)", "wmx.extended_diuc_dependent_ie.mimo_dl_enhanced", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2053 { /* 8.4.5.3.10 HARQ_Map_Pointer_IE */
2054 &hf_extended_diuc_dependent_ie_harq_map_pointer
,
2055 {"HARQ_Map_Pointer_IE (not implemented)", "wmx.extended_diuc_dependent_ie.harq_map_pointer", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2057 { /* 8.4.5.3.11 PHYMOD_DL_IE */
2058 &hf_extended_diuc_dependent_ie_phymod_dl
,
2059 {"PHYMOD_DL_IE (not implemented)", "wmx.extended_diuc_dependent_ie.phymod_dl", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2061 { /* 8.4.5.3.13 DL PUSC Burst Allocation in Other Segment IE */
2062 &hf_extended_diuc_dependent_ie_dl_pusc_burst_allocation
,
2063 {"DL_PUSC_Burst_Allocation_in_Other_Segment_IE (not implemented)", "wmx.extended_diuc_dependent_ie.dl_pusc_burst_allocation", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2065 { /* 8.4.5.3.19 UL_interference_and_noise_level_IE */
2066 &hf_extended_diuc_dependent_ie_ul_interference_and_noise_level
,
2067 {"UL_interference_and_noise_level_IE (not implemented)", "wmx.extended_diuc_dependent_ie.ul_interference_and_noise_level", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2069 { /* unknown DIUC */
2070 &hf_extended_diuc_dependent_ie_unknown_diuc
,
2071 {"Unknown Extended DIUC", "wmx.extended_diuc_dependent_ie.unknown_diuc", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2075 #if 0 /* Not used ?? */
2076 /* Setup protocol subtree array */
2079 &ett_wimax_compact_dlmap_ie_decoder
,
2080 &ett_wimax_format_configuration_ie_decoder
,
2081 &ett_wimax_rcid_ie_decoder
,
2082 &ett_wimax_harq_control_ie_decoder
,
2083 &ett_wimax_extended_diuc_dependent_ie_decoder
,
2084 &ett_wimax_cqich_control_ie_decoder
,
2085 &ett_wimax_extension_type_ie_decoder
,
2087 proto_register_subtree_array(ett
, array_length(ett
));
2090 proto_wimax_compact_dlmap_ie_decoder
= proto_wimax
;
2092 proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder
, hf_compact_dlmap
, array_length(hf_compact_dlmap
));
2093 proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder
, hf_format_config
, array_length(hf_format_config
));
2094 proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder
, hf_rcid
, array_length(hf_rcid
));
2095 proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder
, hf_harq_control
, array_length(hf_harq_control
));
2096 proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder
, hf_cqich_control
, array_length(hf_cqich_control
));
2097 proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder
, hf_extension_type
, array_length(hf_extension_type
));
2098 proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder
, hf_extended_diuc
, array_length(hf_extended_diuc
));
2102 * Editor modelines - https://www.wireshark.org/tools/modelines.html
2107 * indent-tabs-mode: t
2110 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
2111 * :indentSize=8:tabSize=8:noTabs=false: