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>
10 * Wireshark - Network traffic analyzer
11 * By Gerald Combs <gerald@wireshark.org>
12 * Copyright 1999 Gerald Combs
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
36 #include <epan/packet.h>
38 #include "wimax_tlv.h"
40 extern gint proto_wimax;
43 #define MSB_NIBBLE_MASK 0xF0
44 #define LSB_NIBBLE_MASK 0x0F
46 #define CID_TYPE_NORMAL 0
47 #define CID_TYPE_RCID11 1
48 #define CID_TYPE_RCID7 2
49 #define CID_TYPE_RCID3 3
51 /* Global Variables */
53 guint band_amc_subchannel_type = 0;
54 guint max_logical_bands = 12;
55 guint num_of_broadcast_symbols = 0;
56 guint num_of_dl_band_amc_symbols = 0;
57 guint num_of_ul_band_amc_symbols = 0;
58 /* from switch HARQ mode extension IE */
61 /* forward reference */
62 static guint wimax_compact_dlmap_format_configuration_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
63 static guint wimax_compact_dlmap_rcid_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
64 static guint wimax_compact_dlmap_harq_control_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
65 static guint wimax_compact_dlmap_cqich_control_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
66 static guint wimax_cdlmap_extension_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
67 guint wimax_extended_diuc_dependent_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
69 static gint proto_wimax_compact_dlmap_ie_decoder = -1;
71 #if 0 /* not used ?? */
72 static gint ett_wimax_compact_dlmap_ie_decoder = -1;
73 static gint ett_wimax_format_configuration_ie_decoder = -1;
74 static gint ett_wimax_rcid_ie_decoder = -1;
75 static gint ett_wimax_harq_control_ie_decoder = -1;
76 static gint ett_wimax_extended_diuc_dependent_ie_decoder = -1;
77 static gint ett_wimax_cqich_control_ie_decoder = -1;
78 static gint ett_wimax_extension_type_ie_decoder = -1;
81 /* New Format Indications */
82 static const true_false_string tfs_indication =
89 static const true_false_string tfs_prefix =
92 "Temporary Disable HARQ"
96 static const true_false_string tfs_cqich_ind =
98 "With CQICH Control IE",
103 static const value_string vals_cid_types[] =
106 { 1, "RCID11 (default)" },
112 /* Subchannel Types */
113 static const value_string vals_subchannel_types[] =
115 { 0, "Default Type" },
116 { 1, "1 bin x 6 symbols Type" },
117 { 2, "2 bin x 3 symbols Type" },
118 { 3, "3 bin x 2 symbols Type" },
122 /* Max Logical Bands */
123 static const value_string vals_max_logical_bands[] =
127 { 2, "12 Bands (default)" },
132 /* Repetition Coding Indications */
133 static const value_string rep_msgs[] =
135 { 0, "No Repetition Coding" },
136 { 1, "Repetition Coding of 2 Used" },
137 { 2, "Repetition Coding of 4 Used" },
138 { 3, "Repetition Coding of 6 Used" },
142 /* Repetition Coding Indications */
143 static const value_string vals_allocation_modes[] =
145 { 0, "Same Number Of Subchannels For The Selected Bands" },
146 { 1, "Different Same Number Of Subchannels For The Selected Bands" },
147 { 2, "Total Number Of Subchannels For The Selected Bands Determined by Nsch Code and Nep Code" },
153 #define DL_MAP_TYPE_MASK 0xE0
154 #define UL_MAP_APPEND_MASK 0x10
155 #define SHORTENED_DIUC_MASK 0xE0
156 #define COMPANDED_SC_MASK 0x1F
157 #define DL_MAP_TYPE_MASK_1 0x0E
158 #define UL_MAP_APPEND_MASK_1 0x01
159 #define SHORTENED_DIUC_MASK_1 0x0E00
160 #define COMPANDED_SC_MASK_1 0x01F0
162 /* display indexies */
163 static gint hf_cdlmap_dl_map_type = -1;
164 static gint hf_cdlmap_ul_map_append = -1;
165 static gint hf_cdlmap_reserved = -1;
166 static gint hf_cdlmap_nep_code = -1;
167 static gint hf_cdlmap_nsch_code = -1;
168 static gint hf_cdlmap_num_bands = -1;
169 static gint hf_cdlmap_band_index = -1;
170 static gint hf_cdlmap_nb_bitmap = -1;
171 static gint hf_cdlmap_dl_map_type_1 = -1;
172 static gint hf_cdlmap_ul_map_append_1 = -1;
173 static gint hf_cdlmap_reserved_1 = -1;
174 static gint hf_cdlmap_nep_code_1 = -1;
175 static gint hf_cdlmap_nsch_code_1 = -1;
176 static gint hf_cdlmap_num_bands_1 = -1;
177 /*static gint hf_cdlmap_band_index_1 = -1;*/
178 static gint hf_cdlmap_nb_bitmap_1 = -1;
180 static gint hf_cdlmap_shortened_diuc = -1;
181 static gint hf_cdlmap_companded_sc = -1;
182 static gint hf_cdlmap_shortened_uiuc = -1;
183 static gint hf_cdlmap_shortened_diuc_1 = -1;
184 static gint hf_cdlmap_companded_sc_1 = -1;
185 static gint hf_cdlmap_shortened_uiuc_1 = -1;
187 static gint hf_cdlmap_bin_offset = -1;
188 static gint hf_cdlmap_bin_offset_1 = -1;
190 static gint hf_cdlmap_diuc_num_of_subchannels = -1;
191 static gint hf_cdlmap_diuc_num_of_subchannels_1 = -1;
192 static gint hf_cdlmap_diuc_repetition_coding_indication = -1;
193 static gint hf_cdlmap_diuc_repetition_coding_indication_1 = -1;
194 static gint hf_cdlmap_diuc_reserved = -1;
195 static gint hf_cdlmap_diuc_reserved_1 = -1;
197 static gint hf_cdlmap_bit_map_length = -1;
198 static gint hf_cdlmap_bit_map_length_1 = -1;
199 static gint hf_cdlmap_bit_map = -1;
201 static gint hf_cdlmap_diuc = -1;
202 static gint hf_cdlmap_diuc_1 = -1;
204 static gint hf_cdlmap_allocation_mode = -1;
205 static gint hf_cdlmap_allocation_mode_rsvd = -1;
206 static gint hf_cdlmap_num_subchannels = -1;
207 static gint hf_cdlmap_allocation_mode_1 = -1;
208 static gint hf_cdlmap_allocation_mode_rsvd_1 = -1;
209 static gint hf_cdlmap_num_subchannels_1 = -1;
211 static gint hf_cdlmap_reserved_type = -1;
212 static gint hf_cdlmap_reserved_type_1 = -1;
214 /* display indexies */
215 static gint hf_format_config_ie_dl_map_type = -1;
216 static gint hf_format_config_ie_dl_map_type_1 = -1;
217 static gint hf_format_config_ie_dl_map_type_32 = -1;
218 static gint hf_format_config_ie_new_format_indication = -1;
219 static gint hf_format_config_ie_new_format_indication_1 = -1;
220 static gint hf_format_config_ie_new_format_indication_32 = -1;
221 static gint hf_format_config_ie_cid_type = -1;
222 static gint hf_format_config_ie_cid_type_1 = -1;
223 static gint hf_format_config_ie_safety_pattern = -1;
224 static gint hf_format_config_ie_safety_pattern_1 = -1;
225 static gint hf_format_config_ie_subchannel_type = -1;
226 static gint hf_format_config_ie_subchannel_type_1 = -1;
227 static gint hf_format_config_ie_max_logical_bands = -1;
228 static gint hf_format_config_ie_max_logical_bands_1 = -1;
229 static gint hf_format_config_ie_num_of_broadcast_symbol = -1;
230 static gint hf_format_config_ie_num_of_broadcast_symbol_1 = -1;
231 static gint hf_format_config_ie_num_of_dl_band_amc_symbol = -1;
232 static gint hf_format_config_ie_num_of_dl_band_amc_symbol_1 = -1;
233 static gint hf_format_config_ie_num_of_ul_band_amc_symbol = -1;
234 static gint hf_format_config_ie_num_of_ul_band_amc_symbol_1 = -1;
236 /* Format Configuration IE Masks */
237 #define FORMAT_CONFIG_IE_DL_MAP_TYPE_MASK 0xE0000000
238 #define FORMAT_CONFIG_IE_NEW_FORMAT_IND_MASK 0x10000000
239 #define CID_TYPE_MASK_1 0x0C000000
240 #define SAFETY_PATTERN_MASK_1 0x03E00000
241 #define BAND_AMC_SUBCHANNEL_TYPE_MASK_1 0x00180000
242 #define MAX_LOGICAL_BANDS_MASK_1 0x00060000
243 #define NUM_BROADCAST_SYMBOLS_MASK_1 0x0001F000
244 #define NUM_DL_AMC_SYMBOLS_MASK_1 0x00000FC0
245 #define NUM_UL_AMC_SYMBOLS_MASK_1 0x0000003F
246 #define CID_TYPE_MASK 0xC0000000
247 #define SAFETY_PATTERN_MASK 0x3E000000
248 #define BAND_AMC_SUBCHANNEL_TYPE_MASK 0x01800000
249 #define MAX_LOGICAL_BANDS_MASK 0x00600000
250 #define NUM_BROADCAST_SYMBOLS_MASK 0x001F0000
251 #define NUM_DL_AMC_SYMBOLS_MASK 0x0000FC00
252 #define NUM_UL_AMC_SYMBOLS_MASK 0x000003F0
254 /* display indexies */
255 static gint hf_harq_rcid_ie_prefix = -1;
256 static gint hf_harq_rcid_ie_prefix_1 = -1;
257 static gint hf_harq_rcid_ie_normal_cid = -1;
258 static gint hf_harq_rcid_ie_normal_cid_1 = -1;
259 static gint hf_harq_rcid_ie_cid3 = -1;
260 static gint hf_harq_rcid_ie_cid3_1 = -1;
261 static gint hf_harq_rcid_ie_cid7 = -1;
262 static gint hf_harq_rcid_ie_cid7_1 = -1;
263 static gint hf_harq_rcid_ie_cid11 = -1;
264 static gint hf_harq_rcid_ie_cid11_1 = -1;
265 static gint hf_harq_rcid_ie_cid11_2 = -1;
266 static gint hf_harq_rcid_ie_cid11_3 = -1;
269 #define WIMAX_RCID_IE_NORMAL_CID_MASK_1 0x0FFFF0
270 #define WIMAX_RCID_IE_PREFIX_MASK 0x8000
271 #define WIMAX_RCID_IE_PREFIX_MASK_1 0x0800
272 #define WIMAX_RCID_IE_CID3_MASK 0x7000
273 #define WIMAX_RCID_IE_CID3_MASK_1 0x0700
274 #define WIMAX_RCID_IE_CID7_MASK 0x7F00
275 #define WIMAX_RCID_IE_CID7_MASK_1 0x07F0
276 #define WIMAX_RCID_IE_CID11_MASK 0x7FF0
277 #define WIMAX_RCID_IE_CID11_MASK_1 0x07FF
279 /* HARQ MAP HARQ Control IE display indexies */
280 static gint hf_harq_control_ie_prefix = -1;
281 static gint hf_harq_control_ie_ai_sn = -1;
282 static gint hf_harq_control_ie_spid = -1;
283 static gint hf_harq_control_ie_acid = -1;
284 static gint hf_harq_control_ie_reserved = -1;
285 static gint hf_harq_control_ie_prefix_1 = -1;
286 static gint hf_harq_control_ie_ai_sn_1 = -1;
287 static gint hf_harq_control_ie_spid_1 = -1;
288 static gint hf_harq_control_ie_acid_1 = -1;
289 static gint hf_harq_control_ie_reserved_1 = -1;
292 #define WIMAX_HARQ_CONTROL_IE_PREFIX_MASK 0x80
293 #define WIMAX_HARQ_CONTROL_IE_AI_SN_MASK 0x40
294 #define WIMAX_HARQ_CONTROL_IE_SPID_MASK 0x30
295 #define WIMAX_HARQ_CONTROL_IE_ACID_MASK 0x0F
296 #define WIMAX_HARQ_CONTROL_IE_RESERVED_MASK 0x70
297 #define WIMAX_HARQ_CONTROL_IE_PREFIX_MASK_1 0x0800
298 #define WIMAX_HARQ_CONTROL_IE_AI_SN_MASK_1 0x0400
299 #define WIMAX_HARQ_CONTROL_IE_SPID_MASK_1 0x0300
300 #define WIMAX_HARQ_CONTROL_IE_ACID_MASK_1 0x00F0
301 #define WIMAX_HARQ_CONTROL_IE_RESERVED_MASK_1 0x0700
303 /* HARQ MAP CQICH Control IE display indexies */
304 static gint hf_cqich_control_ie_indicator = -1;
305 static gint hf_cqich_control_ie_alloc_id = -1;
306 static gint hf_cqich_control_ie_period = -1;
307 static gint hf_cqich_control_ie_frame_offset = -1;
308 static gint hf_cqich_control_ie_duration = -1;
309 static gint hf_cqich_control_ie_cqi_rep_threshold = -1;
310 static gint hf_cqich_control_ie_indicator_1 = -1;
311 static gint hf_cqich_control_ie_alloc_id_1 = -1;
312 static gint hf_cqich_control_ie_period_1 = -1;
313 static gint hf_cqich_control_ie_frame_offset_1 = -1;
314 static gint hf_cqich_control_ie_duration_1 = -1;
315 static gint hf_cqich_control_ie_cqi_rep_threshold_1 = -1;
318 #define WIMAX_CQICH_CONTROL_IE_INDICATOR_MASK 0x8000
319 #define WIMAX_CQICH_CONTROL_IE_ALLOCATION_INDEX_MASK 0x7E00
320 #define WIMAX_CQICH_CONTROL_IE_PERIOD_MASK 0x0180
321 #define WIMAX_CQICH_CONTROL_IE_FRAME_OFFSET_MASK 0x0070
322 #define WIMAX_CQICH_CONTROL_IE_DURATION_MASK 0x000F
323 #define WIMAX_CQICH_CONTROL_IE_CQI_REP_THRESHOLD_MASK 0x7000
324 #define WIMAX_CQICH_CONTROL_IE_INDICATOR_MASK_1 0x080000
325 #define WIMAX_CQICH_CONTROL_IE_ALLOCATION_INDEX_MASK_1 0x07E000
326 #define WIMAX_CQICH_CONTROL_IE_PERIOD_MASK_1 0x001800
327 #define WIMAX_CQICH_CONTROL_IE_FRAME_OFFSET_MASK_1 0x000700
328 #define WIMAX_CQICH_CONTROL_IE_DURATION_MASK_1 0x0000F0
329 #define WIMAX_CQICH_CONTROL_IE_CQI_REP_THRESHOLD_MASK_1 0x070000
332 #define EXTENSION_TYPE_MASK 0xE000
333 #define EXTENSION_TYPE_MASK_1 0x0E00
334 #define EXTENSION_SUBTYPE_MASK 0x1F00
335 #define EXTENSION_SUBTYPE_MASK_1 0x01F0
336 #define EXTENSION_LENGTH_MASK 0x00F0
337 #define EXTENSION_LENGTH_MASK_1 0x000F
339 static gint hf_cdlmap_extension_type = -1;
340 static gint hf_cdlmap_extension_subtype = -1;
341 static gint hf_cdlmap_extension_length = -1;
342 static gint hf_cdlmap_extension_type_1 = -1;
343 static gint hf_cdlmap_extension_subtype_1 = -1;
344 static gint hf_cdlmap_extension_length_1 = -1;
346 static gint hf_cdlmap_extension_time_diversity_mbs = -1;
347 static gint hf_cdlmap_extension_harq_mode = -1;
348 static gint hf_cdlmap_extension_unknown_sub_type = -1;
349 static gint hf_cdlmap_extension_time_diversity_mbs_1 = -1;
350 static gint hf_cdlmap_extension_harq_mode_1 = -1;
351 static gint hf_cdlmap_extension_unknown_sub_type_1 = -1;
353 /* Extended DIUC dependent IE display indexies */
354 static gint hf_extended_diuc_dependent_ie_diuc = -1;
355 static gint hf_extended_diuc_dependent_ie_diuc_1 = -1;
356 static gint hf_extended_diuc_dependent_ie_length = -1;
357 static gint hf_extended_diuc_dependent_ie_length_1 = -1;
358 static gint hf_extended_diuc_dependent_ie_channel_measurement = -1;
359 static gint hf_extended_diuc_dependent_ie_stc_zone = -1;
360 static gint hf_extended_diuc_dependent_ie_aas_dl = -1;
361 static gint hf_extended_diuc_dependent_ie_data_location = -1;
362 static gint hf_extended_diuc_dependent_ie_cid_switch = -1;
363 static gint hf_extended_diuc_dependent_ie_mimo_dl_basic = -1;
364 static gint hf_extended_diuc_dependent_ie_mimo_dl_enhanced = -1;
365 static gint hf_extended_diuc_dependent_ie_harq_map_pointer = -1;
366 static gint hf_extended_diuc_dependent_ie_phymod_dl = -1;
367 static gint hf_extended_diuc_dependent_ie_dl_pusc_burst_allocation = -1;
368 static gint hf_extended_diuc_dependent_ie_ul_interference_and_noise_level = -1;
369 static gint hf_extended_diuc_dependent_ie_unknown_diuc = -1;
372 /* Compact DL-MAP IE Types (table 89) */
373 #define COMPACT_DL_MAP_TYPE_NORMAL_SUBCHANNEL 0
374 #define COMPACT_DL_MAP_TYPE_BAND_AMC 1
375 #define COMPACT_DL_MAP_TYPE_SAFETY 2
376 #define COMPACT_DL_MAP_TYPE_UIUC 3
377 #define COMPACT_DL_MAP_TYPE_FORMAT_CONF_IE 4
378 #define COMPACT_DL_MAP_TYPE_HARQ_ACK_BITMAP_IE 5
379 #define COMPACT_DL_MAP_TYPE_RESERVED 6
380 #define COMPACT_DL_MAP_TYPE_EXTENSION 7
382 /* Compact DL-MAP IE decoder */
383 guint wimax_compact_dlmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset)
385 guint diuc, byte, length = 0;
386 guint dl_map_type, ul_map_append;
387 guint dl_map_offset, nibble_length, bit_map_length;
388 guint nband, band_count, i, allocation_mode;
391 /* update the info column */
392 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Compact DL-MAP IEs");
394 /* set the local offset */
395 dl_map_offset = offset;
396 /* Get the first byte */
397 byte = tvb_get_guint8(tvb, dl_map_offset);
398 if(nibble_offset & 1)
400 dl_map_type = ((byte & DL_MAP_TYPE_MASK_1) >> 1);
401 ul_map_append = (byte & UL_MAP_APPEND_MASK_1);
405 dl_map_type = ((byte & DL_MAP_TYPE_MASK) >> 5);
406 ul_map_append = (byte & UL_MAP_APPEND_MASK);
410 case COMPACT_DL_MAP_TYPE_NORMAL_SUBCHANNEL:/* 6.3.2.3.43.6.1 */
411 if(nibble_offset & 1)
412 { /* display the DL-MAP type */
413 proto_tree_add_item(tree, hf_cdlmap_dl_map_type_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
414 /* display the UL-MAP append */
415 proto_tree_add_item(tree, hf_cdlmap_ul_map_append_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
416 /* move to next byte */
421 { /* display the DL-MAP type */
422 proto_tree_add_item(tree, hf_cdlmap_dl_map_type, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
423 /* display the UL-MAP append */
424 proto_tree_add_item(tree, hf_cdlmap_ul_map_append, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
429 nibble_length = wimax_compact_dlmap_rcid_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
430 length += nibble_length;
431 dl_map_offset += (nibble_length >> 1);
432 nibble_offset = (nibble_length & 1);
433 /* check harq mode */
435 { /* display the Nep and Nsch Code */
436 if(nibble_offset & 1)
438 proto_tree_add_item(tree, hf_cdlmap_nep_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
439 /* move to next byte */
441 proto_tree_add_item(tree, hf_cdlmap_nsch_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
445 proto_tree_add_item(tree, hf_cdlmap_nep_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
446 proto_tree_add_item(tree, hf_cdlmap_nsch_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
447 /* move to next byte */
452 else if(harq_mode == 1)
453 { /* display the Shortened DIUC and Companded SC */
454 if(nibble_offset & 1)
456 proto_tree_add_item(tree, hf_cdlmap_shortened_diuc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
457 proto_tree_add_item(tree, hf_cdlmap_companded_sc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
461 proto_tree_add_item(tree, hf_cdlmap_shortened_diuc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
462 proto_tree_add_item(tree, hf_cdlmap_companded_sc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
464 /* move to next byte */
468 /* decode HARQ Control IE */
469 nibble_length = wimax_compact_dlmap_harq_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
470 length += nibble_length;
471 dl_map_offset += ((nibble_offset + nibble_length) >> 1);
472 nibble_offset = ((nibble_offset + nibble_length) & 1);
473 /* decode CQICH Control IE */
474 nibble_length = wimax_compact_dlmap_cqich_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
475 length += nibble_length;
476 dl_map_offset += ((nibble_offset + nibble_length) >> 1);
477 nibble_offset = ((nibble_offset + nibble_length) & 1);
479 { /* check harq mode */
481 { /* display the Shortened UIUC and Companded SC */
482 if(nibble_offset & 1)
484 proto_tree_add_item(tree, hf_cdlmap_shortened_uiuc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
485 proto_tree_add_item(tree, hf_cdlmap_companded_sc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
489 proto_tree_add_item(tree, hf_cdlmap_shortened_uiuc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
490 proto_tree_add_item(tree, hf_cdlmap_companded_sc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
492 /* move to next byte */
497 { /* display the Nep and Nsch Code */
498 if(nibble_offset & 1)
500 proto_tree_add_item(tree, hf_cdlmap_nep_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
501 /* move to next byte */
503 proto_tree_add_item(tree, hf_cdlmap_nsch_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
507 proto_tree_add_item(tree, hf_cdlmap_nep_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
508 proto_tree_add_item(tree, hf_cdlmap_nsch_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
509 /* move to next byte */
514 /* decode HARQ Control IE */
515 nibble_length = wimax_compact_dlmap_harq_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
516 length += nibble_length;
519 case COMPACT_DL_MAP_TYPE_BAND_AMC:/* 6.3.2.3.43.6.2 */
520 if(nibble_offset & 1)
521 { /* display the DL-MAP type */
522 proto_tree_add_item(tree, hf_cdlmap_dl_map_type_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
523 /* display the reserved */
524 proto_tree_add_item(tree, hf_cdlmap_reserved_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
525 /* move to next byte */
530 { /* display the DL-MAP type */
531 proto_tree_add_item(tree, hf_cdlmap_dl_map_type, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
532 /* display the reserved */
533 proto_tree_add_item(tree, hf_cdlmap_reserved, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
538 nibble_length = wimax_compact_dlmap_rcid_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
539 length += nibble_length;
540 dl_map_offset += (nibble_length >> 1);
541 nibble_offset = (nibble_length & 1);
542 /* check harq mode */
544 { /* display the Nep and Nsch Code */
545 if(nibble_offset & 1)
547 proto_tree_add_item(tree, hf_cdlmap_nep_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
548 /* move to next byte */
550 proto_tree_add_item(tree, hf_cdlmap_nsch_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
554 proto_tree_add_item(tree, hf_cdlmap_nep_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
555 proto_tree_add_item(tree, hf_cdlmap_nsch_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
556 /* move to next byte */
561 else if(harq_mode == 1)
562 { /* display the Shortened DIUC and Companded SC */
563 if(nibble_offset & 1)
565 proto_tree_add_item(tree, hf_cdlmap_shortened_diuc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
566 proto_tree_add_item(tree, hf_cdlmap_companded_sc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
570 proto_tree_add_item(tree, hf_cdlmap_shortened_diuc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
571 proto_tree_add_item(tree, hf_cdlmap_companded_sc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
573 /* move to next byte */
578 if(max_logical_bands)
579 { /* get and display the Nband */
580 nband = tvb_get_guint8(tvb, dl_map_offset);
581 if(nibble_offset & 1)
583 nband = (nband & LSB_NIBBLE_MASK);
584 /* display the Nband */
585 proto_tree_add_item(tree, hf_cdlmap_num_bands_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
586 /* move to next byte */
589 if(max_logical_bands == 3)
591 proto_tree_add_item(tree, hf_cdlmap_band_index, tvb, dl_map_offset, nband, ENC_NA);
592 length += (nband * 2);
594 dl_map_offset += nband;
598 nibble_offset = (nband & 1);
599 proto_tree_add_item(tree, hf_cdlmap_band_index, tvb, dl_map_offset, ((nband >> 1) + nibble_offset), ENC_NA);
602 dl_map_offset += (nband >> 1);
607 nband = ((nband & MSB_NIBBLE_MASK) >> 4);
608 /* display the Nband */
609 proto_tree_add_item(tree, hf_cdlmap_num_bands, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
611 if(max_logical_bands == 3)
613 proto_tree_add_item(tree, hf_cdlmap_band_index, tvb, dl_map_offset, (nband + nibble_offset), ENC_NA);
614 length += (nband * 2);
616 dl_map_offset += nband;
620 proto_tree_add_item(tree, hf_cdlmap_band_index, tvb, dl_map_offset, ((nband >> 1) + nibble_offset), ENC_NA);
623 dl_map_offset += ((nband + nibble_offset) >> 1);
635 /* display the Nb-BITMAP */
636 if(nibble_offset & 1)
638 proto_tree_add_item(tree, hf_cdlmap_nb_bitmap_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
639 /* move to next byte */
645 proto_tree_add_item(tree, hf_cdlmap_nb_bitmap, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
650 /* Get the Allocation Mode */
651 byte = tvb_get_guint8(tvb, dl_map_offset);
652 if(nibble_offset & 1)
654 allocation_mode = ((byte & 0x0C) >> 2);
655 proto_tree_add_item(tree, hf_cdlmap_allocation_mode_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
656 proto_tree_add_item(tree, hf_cdlmap_allocation_mode_rsvd_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
662 allocation_mode = ((byte & 0xC0) >> 6);
663 proto_tree_add_item(tree, hf_cdlmap_allocation_mode, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
664 proto_tree_add_item(tree, hf_cdlmap_allocation_mode_rsvd, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
667 /* Decode Allocation Mode - need to be done */
670 if(nibble_offset & 1)
672 proto_tree_add_item(tree, hf_cdlmap_num_subchannels_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
676 proto_tree_add_item(tree, hf_cdlmap_num_subchannels, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
680 else if(allocation_mode == 1)
682 for(i=0; i<band_count; i++)
684 if(nibble_offset & 1)
686 proto_tree_add_item(tree, hf_cdlmap_num_subchannels_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
690 proto_tree_add_item(tree, hf_cdlmap_num_subchannels, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
695 /* decode HARQ Control IE */
696 nibble_length = wimax_compact_dlmap_harq_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
697 length += nibble_length;
698 dl_map_offset += ((nibble_offset + nibble_length) >> 1);
699 nibble_offset = ((nibble_offset + nibble_length) & 1);
700 /* decode CQICH Control IE */
701 nibble_length = wimax_compact_dlmap_cqich_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
702 length += nibble_length;
704 case COMPACT_DL_MAP_TYPE_SAFETY:/* 6.3.2.3.43.6.3 */
705 if(nibble_offset & 1)
706 { /* display the DL-MAP type */
707 proto_tree_add_item(tree, hf_cdlmap_dl_map_type_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
708 /* display the UL-MAP append */
709 proto_tree_add_item(tree, hf_cdlmap_ul_map_append_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
710 /* move to next byte */
715 { /* display the DL-MAP type */
716 proto_tree_add_item(tree, hf_cdlmap_dl_map_type, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
717 /* display the UL-MAP append */
718 proto_tree_add_item(tree, hf_cdlmap_ul_map_append, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
723 nibble_length = wimax_compact_dlmap_rcid_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
724 length += nibble_length;
725 dl_map_offset += (nibble_length >> 1);
726 nibble_offset = (nibble_length & 1);
727 /* check harq mode */
729 { /* display the Nep and Nsch Code */
730 if(nibble_offset & 1)
732 proto_tree_add_item(tree, hf_cdlmap_nep_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
733 /* move to next byte */
735 proto_tree_add_item(tree, hf_cdlmap_nsch_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
739 proto_tree_add_item(tree, hf_cdlmap_nep_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
740 proto_tree_add_item(tree, hf_cdlmap_nsch_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
741 /* move to next byte */
746 else if(harq_mode == 1)
747 { /* display the Shortened DIUC and Companded SC */
748 if(nibble_offset & 1)
750 proto_tree_add_item(tree, hf_cdlmap_shortened_diuc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
751 proto_tree_add_item(tree, hf_cdlmap_companded_sc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
755 proto_tree_add_item(tree, hf_cdlmap_shortened_diuc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
756 proto_tree_add_item(tree, hf_cdlmap_companded_sc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
758 /* move to next byte */
762 /* display BIN offset */
763 if(nibble_offset & 1)
765 proto_tree_add_item(tree, hf_cdlmap_bin_offset_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
766 /* move to next byte */
771 proto_tree_add_item(tree, hf_cdlmap_bin_offset, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
772 /* move to next byte */
776 /* decode HARQ Control IE */
777 nibble_length = wimax_compact_dlmap_harq_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
778 length += nibble_length;
779 dl_map_offset += ((nibble_offset + nibble_length) >> 1);
780 nibble_offset = ((nibble_offset + nibble_length) & 1);
781 /* decode CQICH Control IE */
782 nibble_length = wimax_compact_dlmap_cqich_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
783 length += nibble_length;
784 dl_map_offset += ((nibble_offset + nibble_length) >> 1);
785 nibble_offset = ((nibble_offset + nibble_length) & 1);
787 { /* check harq mode */
789 { /* display the Shortened DIUC and Companded SC */
790 if(nibble_offset & 1)
792 proto_tree_add_item(tree, hf_cdlmap_shortened_diuc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
793 proto_tree_add_item(tree, hf_cdlmap_companded_sc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
797 proto_tree_add_item(tree, hf_cdlmap_shortened_diuc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
798 proto_tree_add_item(tree, hf_cdlmap_companded_sc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
800 /* move to next byte */
805 { /* display the Nep and Nsch Code */
806 if(nibble_offset & 1)
808 proto_tree_add_item(tree, hf_cdlmap_nep_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
809 /* move to next byte */
811 proto_tree_add_item(tree, hf_cdlmap_nsch_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
815 proto_tree_add_item(tree, hf_cdlmap_nep_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
816 proto_tree_add_item(tree, hf_cdlmap_nsch_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
817 /* move to next byte */
822 /* display BIN offset */
823 if(nibble_offset & 1)
825 proto_tree_add_item(tree, hf_cdlmap_bin_offset_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
826 /* move to next byte */
831 proto_tree_add_item(tree, hf_cdlmap_bin_offset, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
832 /* move to next byte */
836 /* decode HARQ Control IE */
837 nibble_length = wimax_compact_dlmap_harq_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
838 length += nibble_length;
841 case COMPACT_DL_MAP_TYPE_UIUC:/* 6.3.2.3.43.6.4 */
842 if(nibble_offset & 1)
843 { /* display the DL-MAP type */
844 proto_tree_add_item(tree, hf_cdlmap_dl_map_type_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
845 /* display the reserved */
846 proto_tree_add_item(tree, hf_cdlmap_reserved_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
847 /* move to next byte */
849 /* get the new byte */
850 byte = tvb_get_guint8(tvb, dl_map_offset);
852 diuc = ((byte & MSB_NIBBLE_MASK) >> 4);
853 /* display the DIUC */
854 proto_tree_add_item(tree, hf_cdlmap_diuc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
858 /* display the DL-MAP type */
859 proto_tree_add_item(tree, hf_cdlmap_dl_map_type, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
860 /* display the reserved */
861 proto_tree_add_item(tree, hf_cdlmap_reserved, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
863 diuc = (tvb_get_guint8(tvb, dl_map_offset) & LSB_NIBBLE_MASK);
864 /* display the DIUC */
865 proto_tree_add_item(tree, hf_cdlmap_diuc_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
866 /* move to next byte */
871 { /* Extended DIUC dependent IE */
872 nibble_length = wimax_extended_diuc_dependent_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
873 length += nibble_length;
874 dl_map_offset += (nibble_length >> 1);
875 nibble_offset = (nibble_length & 1);
878 { /* decode RCID IE */
879 nibble_length = wimax_compact_dlmap_rcid_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
880 length += nibble_length;
881 dl_map_offset += (nibble_length >> 1);
882 nibble_offset = (nibble_length & 1);
883 /* display Number of subchannels */
884 if(nibble_offset & 1)
885 proto_tree_add_item(tree, hf_cdlmap_diuc_num_of_subchannels_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
887 proto_tree_add_item(tree, hf_cdlmap_diuc_num_of_subchannels, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
889 /* display the repetition coding indication and reserved bits */
890 if(nibble_offset & 1)
892 proto_tree_add_item(tree, hf_cdlmap_diuc_repetition_coding_indication_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
893 proto_tree_add_item(tree, hf_cdlmap_diuc_reserved_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
897 proto_tree_add_item(tree, hf_cdlmap_diuc_repetition_coding_indication, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
898 proto_tree_add_item(tree, hf_cdlmap_diuc_reserved, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
902 /* decode HARQ Control IE */
903 nibble_length = wimax_compact_dlmap_harq_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
904 length += nibble_length;
905 dl_map_offset += ((nibble_offset + nibble_length) >> 1);
906 nibble_offset = ((nibble_offset + nibble_length) & 1);
907 /* decode CQICH Control IE */
908 nibble_length = wimax_compact_dlmap_cqich_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
909 length += nibble_length;
911 case COMPACT_DL_MAP_TYPE_FORMAT_CONF_IE:/* 6.3.2.3.43.2 */
912 /* decode the format configuration IE */
913 nibble_length = wimax_compact_dlmap_format_configuration_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
914 length = nibble_length;
916 case COMPACT_DL_MAP_TYPE_HARQ_ACK_BITMAP_IE:/* 6.3.2.3.43.6.5 */
917 if(nibble_offset & 1)
918 { /* display the DL-MAP type */
919 proto_tree_add_item(tree, hf_cdlmap_dl_map_type_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
920 /* display the reserved */
921 proto_tree_add_item(tree, hf_cdlmap_reserved_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
923 /* move to next byte */
925 /* get the bit map length */
926 byte = tvb_get_guint8(tvb, dl_map_offset);
927 bit_map_length = ((byte & MSB_NIBBLE_MASK) >> 4);
928 /* display BITMAP Length */
929 proto_tree_add_item(tree, hf_cdlmap_bit_map_length, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
931 proto_tree_add_item(tree, hf_cdlmap_bit_map, tvb, dl_map_offset, bit_map_length + 1, ENC_NA);
932 length += (1 + bit_map_length * 2);
936 /* display the DL-MAP type */
937 proto_tree_add_item(tree, hf_cdlmap_dl_map_type, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
938 /* display the reserved */
939 proto_tree_add_item(tree, hf_cdlmap_reserved, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
940 /* display BITMAP Length */
941 proto_tree_add_item(tree, hf_cdlmap_bit_map_length_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
943 /* get the bit map length */
944 bit_map_length = (byte & LSB_NIBBLE_MASK);
945 /* move to next byte */
948 proto_tree_add_item(tree, hf_cdlmap_bit_map, tvb, dl_map_offset, bit_map_length, ENC_NA);
949 length += (bit_map_length * 2);
952 case COMPACT_DL_MAP_TYPE_EXTENSION:/* 6.3.2.3.43.6.6 */
953 /* decode the Compact DL-MAP externsion IE */
954 nibble_length = wimax_cdlmap_extension_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);/*, cqich_indicator);*/
955 length = nibble_length;
957 default:/* Reserved Type */
958 /* display the reserved type */
959 proto_tree_add_item(tree, hf_cdlmap_reserved_type_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
963 /* Update the nibble_offset and length */
967 /* Format Configuration IE shifts */
968 #define CID_TYPE_SHIFT 30
969 #define SAFETY_PATTERN_SHIFT 25
970 #define BAND_AMC_SUBCHANNEL_TYPE_SHIFT 23
971 #define MAX_LOGICAL_BANDS_SHIFT 21
972 #define NUM_BROADCAST_SYMBOLS_SHIFT 16
973 #define NUM_DL_AMC_SYMBOLS_SHIFT 10
974 #define NUM_UL_AMC_SYMBOLS_SHIFT 4
975 #define CID_TYPE_SHIFT_1 (CID_TYPE_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
976 #define SAFETY_PATTERN_SHIFT_1 (SAFETY_PATTERN_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
977 #define BAND_AMC_SUBCHANNEL_TYPE_SHIFT_1 (BAND_AMC_SUBCHANNEL_TYPE_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
978 #define MAX_LOGICAL_BANDS_SHIFT_1 (MAX_LOGICAL_BANDS_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
979 #define NUM_BROADCAST_SYMBOLS_SHIFT_1 (NUM_BROADCAST_SYMBOLS_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
980 #define NUM_DL_AMC_SYMBOLS_SHIFT_1 (NUM_DL_AMC_SYMBOLS_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
981 /*#define NUM_UL_AMC_SYMBOLS_SHIFT_1 0*/
983 /* Compact DL-MAP Format Configuration IE (6.3.2.3.43.2) decoder */
984 static guint wimax_compact_dlmap_format_configuration_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
987 guint dl_map_type, new_format_ind;
992 /* update the info column */
993 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Format Configuration IE");
995 /* set the local offset */
996 dl_map_offset = offset;
997 /* Get the first byte */
998 tvb_value = tvb_get_guint8(tvb, dl_map_offset);
999 if(nibble_offset & 1)
1000 { /* get the DL-MAP type */
1001 dl_map_type = ((tvb_value & DL_MAP_TYPE_MASK_1) >> 1);
1002 /* ensure the dl-map type is Format Configuration IE */
1003 if(dl_map_type != COMPACT_DL_MAP_TYPE_FORMAT_CONF_IE)
1005 new_format_ind = (tvb_value & 0x01);
1006 /* display the DL-MAP type */
1007 proto_tree_add_item(tree, hf_format_config_ie_dl_map_type_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
1008 /* display the New format Indication */
1009 proto_tree_add_item(tree, hf_format_config_ie_new_format_indication_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
1010 /* update the length in nibble */
1012 /* move to next byte */
1015 { /* display the CID Type */
1016 proto_tree_add_item(tree, hf_format_config_ie_cid_type, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
1017 /* display the Safety Pattern */
1018 proto_tree_add_item(tree, hf_format_config_ie_safety_pattern, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
1019 /* display the Subchannel pattern */
1020 proto_tree_add_item(tree, hf_format_config_ie_subchannel_type, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
1021 /* display the max logical bands */
1022 proto_tree_add_item(tree, hf_format_config_ie_max_logical_bands, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
1023 /* display the number of broadcast symbols */
1024 proto_tree_add_item(tree, hf_format_config_ie_num_of_broadcast_symbol, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
1025 /* display the number of dl band AMC symbols */
1026 proto_tree_add_item(tree, hf_format_config_ie_num_of_dl_band_amc_symbol, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
1027 /* display the number of ul band AMC symbols */
1028 proto_tree_add_item(tree, hf_format_config_ie_num_of_ul_band_amc_symbol, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
1029 /* update the length in nibble */
1031 /* Get the next 32-bit word */
1032 tvb_value = tvb_get_ntohl(tvb, dl_map_offset);
1033 /* get the CID type */
1034 cid_type = ((tvb_value & CID_TYPE_MASK) >> CID_TYPE_SHIFT);
1035 /* get the subchannel type for band AMC */
1036 band_amc_subchannel_type = ((tvb_value & BAND_AMC_SUBCHANNEL_TYPE_MASK) >> BAND_AMC_SUBCHANNEL_TYPE_SHIFT);
1037 /* get the max logical bands */
1038 max_logical_bands = ((tvb_value & MAX_LOGICAL_BANDS_MASK) >> MAX_LOGICAL_BANDS_SHIFT);
1039 /* get the number of symbols for broadcast */
1040 num_of_broadcast_symbols = ((tvb_value & NUM_BROADCAST_SYMBOLS_MASK) >> NUM_BROADCAST_SYMBOLS_SHIFT);
1041 /* get the number of symbols for DL band AMC */
1042 num_of_dl_band_amc_symbols = ((tvb_value & NUM_DL_AMC_SYMBOLS_MASK) >> NUM_DL_AMC_SYMBOLS_SHIFT);
1043 /* get the number of symbols for UL band AMC */
1044 num_of_ul_band_amc_symbols = ((tvb_value & NUM_UL_AMC_SYMBOLS_MASK) >> NUM_UL_AMC_SYMBOLS_SHIFT);
1049 dl_map_type = ((tvb_value & DL_MAP_TYPE_MASK) >> 5);
1050 /* ensure the dl-map type is Format Configuration IE */
1051 if(dl_map_type != COMPACT_DL_MAP_TYPE_FORMAT_CONF_IE)
1053 new_format_ind = (tvb_value & 0x10);
1055 { /* display the DL-MAP type */
1056 proto_tree_add_item(tree, hf_format_config_ie_dl_map_type_32, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
1057 /* display the New format Indication */
1058 proto_tree_add_item(tree, hf_format_config_ie_new_format_indication_32, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
1059 /* display the CID Type */
1060 proto_tree_add_item(tree, hf_format_config_ie_cid_type_1, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
1061 /* display the Safety Pattern */
1062 proto_tree_add_item(tree, hf_format_config_ie_safety_pattern_1, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
1063 /* display the Subchannel pattern */
1064 proto_tree_add_item(tree, hf_format_config_ie_subchannel_type_1, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
1065 /* display the max logical bands */
1066 proto_tree_add_item(tree, hf_format_config_ie_max_logical_bands_1, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
1067 /* display the number of broadcast symbols */
1068 proto_tree_add_item(tree, hf_format_config_ie_num_of_broadcast_symbol_1, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
1069 /* display the number of dl band AMC symbols */
1070 proto_tree_add_item(tree, hf_format_config_ie_num_of_dl_band_amc_symbol_1, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
1071 /* display the number of ul band AMC symbols */
1072 proto_tree_add_item(tree, hf_format_config_ie_num_of_ul_band_amc_symbol_1, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
1073 /* update the length in nibble */
1075 /* Get the next 32-bit word */
1076 tvb_value = tvb_get_ntohl(tvb, dl_map_offset);
1077 /* get the CID type */
1078 cid_type = ((tvb_value & CID_TYPE_MASK_1) >> CID_TYPE_SHIFT_1);
1079 /* get the subchannel type for band AMC */
1080 band_amc_subchannel_type = ((tvb_value & BAND_AMC_SUBCHANNEL_TYPE_MASK_1) >> BAND_AMC_SUBCHANNEL_TYPE_SHIFT_1);
1081 /* get the max logical bands */
1082 max_logical_bands = ((tvb_value & MAX_LOGICAL_BANDS_MASK_1) >> MAX_LOGICAL_BANDS_SHIFT_1);
1083 /* get the number of symbols for broadcast */
1084 num_of_broadcast_symbols = ((tvb_value & NUM_BROADCAST_SYMBOLS_MASK_1) >> NUM_BROADCAST_SYMBOLS_SHIFT_1);
1085 /* get the number of symbols for DL band AMC */
1086 num_of_dl_band_amc_symbols = ((tvb_value & NUM_DL_AMC_SYMBOLS_MASK_1) >> NUM_DL_AMC_SYMBOLS_SHIFT_1);
1087 /* get the number of symbols for UL band AMC */
1088 num_of_ul_band_amc_symbols = (tvb_value & NUM_UL_AMC_SYMBOLS_MASK_1);
1091 { /* display the DL-MAP type */
1092 proto_tree_add_item(tree, hf_format_config_ie_dl_map_type, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
1093 /* display the New format Indication */
1094 proto_tree_add_item(tree, hf_format_config_ie_new_format_indication, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
1095 /* update the length in nibble */
1099 /* return the IE length in nibbles */
1103 /* Compact DL-MAP Reduced CID IE (6.3.2.3.43.3) decoder */
1104 static guint wimax_compact_dlmap_rcid_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
1110 /* update the info column */
1111 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "RCID IE");
1113 if(nibble_offset & 1)
1115 if(cid_type == CID_TYPE_NORMAL)
1116 { /* display the normal CID */
1117 proto_tree_add_item(tree, hf_harq_rcid_ie_normal_cid_1, tvb, offset, 3, ENC_BIG_ENDIAN);
1121 { /* Get the prefix bit */
1122 prefix = (tvb_get_guint8(tvb, offset) & 0x08);
1123 /* display the prefix */
1124 proto_tree_add_item(tree, hf_harq_rcid_ie_prefix_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1126 { /* display the CID11 */
1127 proto_tree_add_item(tree, hf_harq_rcid_ie_cid11_3, tvb, offset, 2, ENC_BIG_ENDIAN);
1132 if(cid_type == CID_TYPE_RCID11)
1133 { /* display the CID11 */
1134 proto_tree_add_item(tree, hf_harq_rcid_ie_cid11_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1137 else if(cid_type == CID_TYPE_RCID7)
1138 { /* display the normal CID7 */
1139 proto_tree_add_item(tree, hf_harq_rcid_ie_cid7_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1142 else if(cid_type == CID_TYPE_RCID3)
1143 { /* display the CID3 */
1144 proto_tree_add_item(tree, hf_harq_rcid_ie_cid3_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1152 if(cid_type == CID_TYPE_NORMAL)
1153 { /* display the normal CID */
1154 proto_tree_add_item(tree, hf_harq_rcid_ie_normal_cid, tvb, offset, 2, ENC_BIG_ENDIAN);
1158 { /* Get the prefix bit */
1159 prefix = (tvb_get_guint8(tvb, offset) & 0x08);
1160 /* display the prefix */
1161 proto_tree_add_item(tree, hf_harq_rcid_ie_prefix, tvb, offset, 2, ENC_BIG_ENDIAN);
1162 if(prefix || (cid_type == CID_TYPE_RCID11))
1163 { /* display the CID11 */
1164 proto_tree_add_item(tree, hf_harq_rcid_ie_cid11_2, tvb, offset, 2, ENC_BIG_ENDIAN);
1169 if(cid_type == CID_TYPE_RCID11)
1170 { /* display the CID11 */
1171 proto_tree_add_item(tree, hf_harq_rcid_ie_cid11, tvb, offset, 2, ENC_BIG_ENDIAN);
1174 else if(cid_type == CID_TYPE_RCID7)
1175 { /* display the CID7 */
1176 proto_tree_add_item(tree, hf_harq_rcid_ie_cid7, tvb, offset, 2, ENC_BIG_ENDIAN);
1179 else if(cid_type == CID_TYPE_RCID3)
1180 { /* display the CID3 */
1181 proto_tree_add_item(tree, hf_harq_rcid_ie_cid3, tvb, offset, 2, ENC_BIG_ENDIAN);
1187 /* return the IE length in nibbles */
1191 /* Compact DL-MAP HARQ Control IE (6.3.2.3.43.4) decoder */
1192 static guint wimax_compact_dlmap_harq_control_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
1194 guint byte, prefix, length = 0;
1197 /* update the info column */
1198 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "HARQ Control IE");
1200 /* Get the first byte */
1201 byte = tvb_get_guint8(tvb, offset);
1202 if(nibble_offset & 1)
1203 { /* Get the prefix bit */
1204 prefix = (byte & 0x08);
1205 /* display the prefix */
1206 proto_tree_add_item(tree, hf_harq_control_ie_prefix_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1208 { /* display the ai_sn */
1209 proto_tree_add_item(tree, hf_harq_control_ie_ai_sn_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1210 /* display the spid */
1211 proto_tree_add_item(tree, hf_harq_control_ie_spid_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1212 /* display the acid */
1213 proto_tree_add_item(tree, hf_harq_control_ie_acid_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1217 { /* display the reserved bits */
1218 proto_tree_add_item(tree, hf_harq_control_ie_reserved_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1223 { /* Get the prefix bit */
1224 prefix = (byte & 0x80);
1225 /* display the prefix */
1226 proto_tree_add_item(tree, hf_harq_control_ie_prefix, tvb, offset, 1, ENC_BIG_ENDIAN);
1228 { /* display the ai_sn */
1229 proto_tree_add_item(tree, hf_harq_control_ie_ai_sn, tvb, offset, 1, ENC_BIG_ENDIAN);
1230 /* display the spid */
1231 proto_tree_add_item(tree, hf_harq_control_ie_spid, tvb, offset, 1, ENC_BIG_ENDIAN);
1232 /* display the acid */
1233 proto_tree_add_item(tree, hf_harq_control_ie_acid, tvb, offset, 1, ENC_BIG_ENDIAN);
1237 { /* display the reserved bits */
1238 proto_tree_add_item(tree, hf_harq_control_ie_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
1242 /* return the IE length in nibbles */
1246 /* Compact DL-MAP CQICH Control IE (6.3.2.3.43.5) decoder */
1247 static guint wimax_compact_dlmap_cqich_control_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
1249 guint byte, cqich_indicator, length = 0;
1252 /* update the info column */
1253 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "CQICH Control IE");
1255 /* Get the first byte */
1256 byte = tvb_get_guint8(tvb, offset);
1257 if(nibble_offset & 1)
1258 { /* Get the CQICH indicator */
1259 cqich_indicator = (byte & 0x08);
1261 { /* display the CQICH indicator */
1262 proto_tree_add_item(tree, hf_cqich_control_ie_indicator_1, tvb, offset, 3, ENC_BIG_ENDIAN);
1263 /* display the allocation index */
1264 proto_tree_add_item(tree, hf_cqich_control_ie_alloc_id_1, tvb, offset, 3, ENC_BIG_ENDIAN);
1265 /* display the period */
1266 proto_tree_add_item(tree, hf_cqich_control_ie_period_1, tvb, offset, 3, ENC_BIG_ENDIAN);
1267 /* display the frame offset */
1268 proto_tree_add_item(tree, hf_cqich_control_ie_frame_offset_1, tvb, offset, 3, ENC_BIG_ENDIAN);
1269 /* display the duration */
1270 proto_tree_add_item(tree, hf_cqich_control_ie_duration_1, tvb, offset, 3, ENC_BIG_ENDIAN);
1274 { /* display the CQICH indicator */
1275 proto_tree_add_item(tree, hf_cqich_control_ie_indicator_1, tvb, offset, 1, ENC_BIG_ENDIAN);
1276 /* display the CQI reporting threshold */
1277 proto_tree_add_item(tree, hf_cqich_control_ie_cqi_rep_threshold_1, tvb, offset, 1, ENC_BIG_ENDIAN);
1282 { /* Get the CQICH indicator */
1283 cqich_indicator = (byte & 0x80);
1285 { /* display the CQICH indicator */
1286 proto_tree_add_item(tree, hf_cqich_control_ie_indicator, tvb, offset, 2, ENC_BIG_ENDIAN);
1287 /* display the allocation index */
1288 proto_tree_add_item(tree, hf_cqich_control_ie_alloc_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1289 /* display the period */
1290 proto_tree_add_item(tree, hf_cqich_control_ie_period, tvb, offset, 2, ENC_BIG_ENDIAN);
1291 /* display the frame offset */
1292 proto_tree_add_item(tree, hf_cqich_control_ie_frame_offset, tvb, offset, 2, ENC_BIG_ENDIAN);
1293 /* display the duration */
1294 proto_tree_add_item(tree, hf_cqich_control_ie_duration, tvb, offset, 2, ENC_BIG_ENDIAN);
1298 { /* display the CQICH indicator */
1299 proto_tree_add_item(tree, hf_cqich_control_ie_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
1300 /* display the CQI reporting threshold */
1301 proto_tree_add_item(tree, hf_cqich_control_ie_cqi_rep_threshold, tvb, offset, 1, ENC_BIG_ENDIAN);
1305 /* return the IE length in nibbles */
1309 /* DL-MAP Extension IE sub-types */
1310 #define TIME_DIVERSITY_MBS 0
1311 #define HARQ_MODE_SWITCH 1
1313 /* Compact DL-MAP Extension IE (6.3.2.3.43.6.6) decoder */
1314 static guint wimax_cdlmap_extension_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
1316 guint tvb_value, dl_map_type, sub_type, length;
1319 /* update the info column */
1320 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "DL-MAP Extension IE");
1322 /* Get the first 16-bit word */
1323 tvb_value = tvb_get_ntohs(tvb, offset);
1324 if(nibble_offset & 1)
1325 { /* Get the dl-map type */
1326 dl_map_type = ((tvb_value & 0x0E00) >> 9);
1327 if(dl_map_type != COMPACT_DL_MAP_TYPE_EXTENSION)
1329 /* Get the sub-type */
1330 sub_type = ((tvb_value & 0x01F0) >> 4);
1331 /* Get the IE length */
1332 length = (tvb_value & 0x000F);
1333 /* display the DL-MAP type */
1334 proto_tree_add_item(tree, hf_cdlmap_extension_type_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1335 /* display the DL-MAP extension subtype */
1336 proto_tree_add_item(tree, hf_cdlmap_extension_subtype_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1337 /* display the IE length */
1338 proto_tree_add_item(tree, hf_cdlmap_extension_length_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1342 case TIME_DIVERSITY_MBS:
1343 /* display the time-diversity MBS in HEX */
1344 proto_tree_add_item(tree, hf_cdlmap_extension_time_diversity_mbs_1, tvb, offset, (length - 2), ENC_NA);
1346 case HARQ_MODE_SWITCH:
1347 /* display the HARQ mode */
1348 proto_tree_add_item(tree, hf_cdlmap_extension_harq_mode, tvb, offset, 1, ENC_BIG_ENDIAN);
1349 /* Get the next byte */
1350 tvb_value = tvb_get_guint8(tvb, offset);
1351 /* get the HARQ mode */
1352 harq_mode = ((tvb_value & MSB_NIBBLE_MASK) >> 4);
1355 /* display the unknown sub-type in HEX */
1356 proto_tree_add_item(tree, hf_cdlmap_extension_unknown_sub_type_1, tvb, offset, (length - 2), ENC_NA);
1361 { /* Get the dl-map type */
1362 dl_map_type = ((tvb_value & 0xE000) >> 13);
1363 if(dl_map_type != COMPACT_DL_MAP_TYPE_EXTENSION)
1365 /* Get the sub-type */
1366 sub_type = ((tvb_value & 0x1F00) >> 8);
1367 /* Get the IE length */
1368 length = ((tvb_value & 0x00F0) >> 4);
1369 /* display the DL-MAP type */
1370 proto_tree_add_item(tree, hf_cdlmap_extension_type, tvb, offset, 2, ENC_BIG_ENDIAN);
1371 /* display the DL-MAP extension subtype */
1372 proto_tree_add_item(tree, hf_cdlmap_extension_subtype, tvb, offset, 2, ENC_BIG_ENDIAN);
1373 /* display the IE length */
1374 proto_tree_add_item(tree, hf_cdlmap_extension_length, tvb, offset, 2, ENC_BIG_ENDIAN);
1377 case TIME_DIVERSITY_MBS:
1378 /* display the time-diversity MBS in HEX */
1379 proto_tree_add_item(tree, hf_cdlmap_extension_time_diversity_mbs, tvb, (offset + 1), (length - 1), ENC_NA);
1381 case HARQ_MODE_SWITCH:
1382 /* display the HARQ mode */
1383 proto_tree_add_item(tree, hf_cdlmap_extension_harq_mode_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1384 /* get the HARQ mode */
1385 harq_mode = (tvb_value & 0x000F);
1388 /* display the unknown sub-type in HEX */
1389 proto_tree_add_item(tree, hf_cdlmap_extension_unknown_sub_type, tvb, (offset + 1), (length - 1), ENC_NA);
1393 /* return the IE length in nibbles */
1394 return (length * 2);
1397 /* Extended DIUCs (table 277a) */
1398 #define CHANNEL_MEASUREMENT_IE 0
1399 #define STC_ZONE_IE 1
1401 #define DATA_LOCATION_IN_ANOTHER_BS_IE 3
1402 #define CID_SWITCH_IE 4
1403 #define MIMO_DL_BASIC_IE 5
1404 #define MIMO_DL_ENHANCED_IE 6
1405 #define HARQ_MAP_POINTER_IE 7
1406 #define PHYMOD_DL_IE 8
1407 #define DL_PUSC_BURST_ALLOCATION_IN_OTHER_SEGMENT_IE 11
1408 #define UL_INTERFERENCE_AND_NOISE_LEVEL_IE 15
1410 /* Extended DIUC IE (8.4.5.3.2) */
1411 guint wimax_extended_diuc_dependent_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
1413 guint ext_diuc, length;
1416 /* get the first byte */
1417 byte = tvb_get_guint8(tvb, offset);
1418 if(nibble_offset & 1)
1419 { /* get the extended DIUC */
1420 ext_diuc = (byte & LSB_NIBBLE_MASK);
1421 /* display extended DIUC */
1422 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_diuc_1, tvb, offset, 1, ENC_BIG_ENDIAN);
1423 /* move to next byte */
1425 /* get the 2nd byte */
1426 byte = tvb_get_guint8(tvb, offset);
1427 /* get the length */
1428 length = ((byte & MSB_NIBBLE_MASK) >> 4);
1429 /* display extended DIUC length */
1430 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
1431 /* 8.4.5.3.2.1 (table 277a) */
1434 case CHANNEL_MEASUREMENT_IE:
1435 /* 8.4.5.3.? Channel_Measurement_IE */
1436 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_channel_measurement, tvb, offset, (length + 1), ENC_NA);
1439 /* 8.4.5.3.4 STC_Zone_IE */
1440 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_stc_zone, tvb, offset, (length + 1), ENC_NA);
1443 /* 8.4.5.3.3 AAS_DL_IE */
1444 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_aas_dl, tvb, offset, (length + 1), ENC_NA);
1446 case DATA_LOCATION_IN_ANOTHER_BS_IE:
1447 /* 8.4.5.3.6 Data_location_in_another_BS_IE */
1448 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_data_location, tvb, offset, (length + 1), ENC_NA);
1451 /* 8.4.5.3.7 CID_Switch_IE */
1452 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_cid_switch, tvb, offset, (length + 1), ENC_NA);
1454 case MIMO_DL_BASIC_IE:
1455 /* 8.4.5.3.8 MIMO_DL_Basic_IE */
1456 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_mimo_dl_basic, tvb, offset, (length + 1), ENC_NA);
1458 case MIMO_DL_ENHANCED_IE:
1459 /* 8.4.5.3.9 MIMO_DL_Enhanced_IE */
1460 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_mimo_dl_enhanced, tvb, offset, (length + 1), ENC_NA);
1462 case HARQ_MAP_POINTER_IE:
1463 /* 8.4.5.3.10 HARQ_Map_Pointer_IE */
1464 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_harq_map_pointer, tvb, offset, (length + 1), ENC_NA);
1467 /* 8.4.5.3.11 PHYMOD_DL_IE */
1468 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_phymod_dl, tvb, offset, (length + 1), ENC_NA);
1470 case DL_PUSC_BURST_ALLOCATION_IN_OTHER_SEGMENT_IE:
1471 /* 8.4.5.3.13 DL PUSC Burst Allocation in Other Segment IE */
1472 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_dl_pusc_burst_allocation, tvb, offset, (length + 1), ENC_NA);
1474 case UL_INTERFERENCE_AND_NOISE_LEVEL_IE:
1475 /* 8.4.5.3.19 UL_interference_and_noise_level_IE */
1476 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_ul_interference_and_noise_level, tvb, offset, (length + 1), ENC_NA);
1479 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_unknown_diuc, tvb, offset, (length + 1), ENC_NA);
1484 { /* get the extended DIUC */
1485 ext_diuc = ((byte & MSB_NIBBLE_MASK) >> 4);
1486 /* get the length */
1487 length = (byte & LSB_NIBBLE_MASK);
1488 /* display extended DIUC */
1489 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_diuc, tvb, offset, 1, ENC_BIG_ENDIAN);
1490 /* display extended DIUC length */
1491 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_length_1, tvb, offset, 1, ENC_BIG_ENDIAN);
1492 /* move to next byte */
1494 /* 8.4.5.3.2.1 (table 277a) */
1497 case CHANNEL_MEASUREMENT_IE:
1498 /* 8.4.5.3.? Channel_Measurement_IE */
1499 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_channel_measurement, tvb, offset, length, ENC_NA);
1502 /* 8.4.5.3.4 STC_Zone_IE */
1503 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_stc_zone, tvb, offset, length, ENC_NA);
1506 /* 8.4.5.3.3 AAS_DL_IE */
1507 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_aas_dl, tvb, offset, length, ENC_NA);
1509 case DATA_LOCATION_IN_ANOTHER_BS_IE:
1510 /* 8.4.5.3.6 Data_location_in_another_BS_IE */
1511 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_data_location, tvb, offset, length, ENC_NA);
1514 /* 8.4.5.3.7 CID_Switch_IE */
1515 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_cid_switch, tvb, offset, length, ENC_NA);
1517 case MIMO_DL_BASIC_IE:
1518 /* 8.4.5.3.8 MIMO_DL_Basic_IE */
1519 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_mimo_dl_basic, tvb, offset, length, ENC_NA);
1521 case MIMO_DL_ENHANCED_IE:
1522 /* 8.4.5.3.9 MIMO_DL_Enhanced_IE */
1523 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_mimo_dl_enhanced, tvb, offset, length, ENC_NA);
1525 case HARQ_MAP_POINTER_IE:
1526 /* 8.4.5.3.10 HARQ_Map_Pointer_IE */
1527 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_harq_map_pointer, tvb, offset, length, ENC_NA);
1530 /* 8.4.5.3.11 PHYMOD_DL_IE */
1531 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_phymod_dl, tvb, offset, length, ENC_NA);
1533 case DL_PUSC_BURST_ALLOCATION_IN_OTHER_SEGMENT_IE:
1534 /* 8.4.5.3.13 DL PUSC Burst Allocation in Other Segment IE */
1535 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_dl_pusc_burst_allocation, tvb, offset, length, ENC_NA);
1537 case UL_INTERFERENCE_AND_NOISE_LEVEL_IE:
1538 /* 8.4.5.3.19 UL_interference_and_noise_level_IE */
1539 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_ul_interference_and_noise_level, tvb, offset, length, ENC_NA);
1542 proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_unknown_diuc, tvb, offset, length, ENC_NA);
1546 return ((length + 1) * 2 ); /* length in nibbles */
1550 /* Register Wimax Compact DL-MAP IE Protocol */
1551 void proto_register_wimax_compact_dlmap_ie(void)
1553 /* Compact DL-MAP IE display */
1554 static hf_register_info hf_compact_dlmap[] =
1557 &hf_cdlmap_dl_map_type,
1558 {"DL-MAP Type", "wmx.compact_dlmap.dl_map_type", FT_UINT8, BASE_DEC, NULL, DL_MAP_TYPE_MASK, NULL, HFILL}
1561 &hf_cdlmap_dl_map_type_1,
1562 {"DL-MAP Type", "wmx.compact_dlmap.dl_map_type", FT_UINT8, BASE_DEC, NULL, DL_MAP_TYPE_MASK_1, NULL, HFILL}
1565 &hf_cdlmap_ul_map_append,
1566 {"UL-MAP Append", "wmx.compact_dlmap.ul_map_append", FT_UINT8, BASE_HEX, NULL, UL_MAP_APPEND_MASK, NULL, HFILL}
1569 &hf_cdlmap_ul_map_append_1,
1570 {"UL-MAP Append", "wmx.compact_dlmap.ul_map_append", FT_UINT8, BASE_HEX, NULL, UL_MAP_APPEND_MASK_1, NULL, HFILL}
1573 &hf_cdlmap_reserved,
1574 {"Reserved", "wmx.compact_dlmap.reserved", FT_UINT8, BASE_HEX, NULL, UL_MAP_APPEND_MASK, NULL, HFILL}
1577 &hf_cdlmap_reserved_1,
1578 {"Reserved", "wmx.compact_dlmap.reserved", FT_UINT8, BASE_HEX, NULL, UL_MAP_APPEND_MASK_1, NULL, HFILL}
1581 &hf_cdlmap_nep_code,
1582 {"Nep Code", "wmx.compact_dlmap.nep_code", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
1585 &hf_cdlmap_nep_code_1,
1586 {"Nep Code", "wmx.compact_dlmap.nep_code", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
1589 &hf_cdlmap_nsch_code,
1590 {"Nsch Code", "wmx.compact_dlmap.nsch_code", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
1593 &hf_cdlmap_nsch_code_1,
1594 {"Nsch Code", "wmx.compact_dlmap.nsch_code", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
1597 &hf_cdlmap_num_bands,
1598 {"Number Of Bands", "wmx.compact_dlmap.num_bands", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
1601 &hf_cdlmap_num_bands_1,
1602 {"Number Of Bands", "wmx.compact_dlmap.num_bands", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
1605 &hf_cdlmap_band_index,
1606 {"Band Index", "wmx.compact_dlmap.band_index", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
1610 &hf_cdlmap_band_index_1,
1611 {"Band Index", "wmx.compact_dlmap.band_index", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL}
1615 &hf_cdlmap_nb_bitmap,
1616 {"Number Of Bits For Band BITMAP", "wmx.compact_dlmap.nb_bitmap", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
1619 &hf_cdlmap_nb_bitmap_1,
1620 {"Number Of Bits For Band BITMAP", "wmx.compact_dlmap.nb_bitmap", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
1623 &hf_cdlmap_shortened_uiuc,
1624 {"Shortened UIUC", "wmx.compact_dlmap.shortened_uiuc", FT_UINT8, BASE_HEX, NULL, SHORTENED_DIUC_MASK, NULL, HFILL}
1627 &hf_cdlmap_shortened_uiuc_1,
1628 {"Shortened UIUC", "wmx.compact_dlmap.shortened_uiuc", FT_UINT16, BASE_HEX, NULL, SHORTENED_DIUC_MASK_1, NULL, HFILL}
1631 &hf_cdlmap_shortened_diuc,
1632 {"Shortened DIUC", "wmx.compact_dlmap.shortened_diuc", FT_UINT8, BASE_HEX, NULL, SHORTENED_DIUC_MASK, NULL, HFILL}
1635 &hf_cdlmap_shortened_diuc_1,
1636 {"Shortened DIUC", "wmx.compact_dlmap.shortened_diuc", FT_UINT16, BASE_HEX, NULL, SHORTENED_DIUC_MASK_1, NULL, HFILL}
1639 &hf_cdlmap_companded_sc,
1640 {"Companded SC", "wmx.compact_dlmap.companded_sc", FT_UINT8, BASE_HEX, NULL, COMPANDED_SC_MASK, NULL, HFILL}
1643 &hf_cdlmap_companded_sc_1,
1644 {"Companded SC", "wmx.compact_dlmap.companded_sc", FT_UINT16, BASE_HEX, NULL, COMPANDED_SC_MASK_1, NULL, HFILL}
1647 &hf_cdlmap_bin_offset,
1648 {"BIN Offset", "wmx.compact_dlmap.bin_offset", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
1651 &hf_cdlmap_bin_offset_1,
1652 {"BIN Offset", "wmx.compact_dlmap.bin_offset", FT_UINT16, BASE_HEX, NULL, 0x0FF0, NULL, HFILL}
1655 &hf_cdlmap_diuc_num_of_subchannels,
1656 {"Number Of Subchannels", "wmx.compact_dlmap.diuc_num_of_subchannels", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
1659 &hf_cdlmap_diuc_num_of_subchannels_1,
1660 {"Number Of Subchannels", "wmx.compact_dlmap.diuc_num_of_subchannels", FT_UINT16, BASE_DEC, NULL, 0x0FF0, NULL, HFILL}
1663 &hf_cdlmap_diuc_repetition_coding_indication,
1664 {"Repetition Coding Indication", "wmx.compact_dlmap.diuc_repetition_coding_indication", FT_UINT8, BASE_DEC, VALS(rep_msgs), 0xC0, NULL, HFILL}
1667 &hf_cdlmap_diuc_repetition_coding_indication_1,
1668 {"Repetition Coding Indication", "wmx.compact_dlmap.diuc_repetition_coding_indication", FT_UINT8, BASE_DEC, VALS(rep_msgs), 0x0C, NULL, HFILL}
1671 &hf_cdlmap_diuc_reserved,
1672 {"Reserved", "wmx.compact_dlmap.diuc_reserved", FT_UINT8, BASE_HEX, NULL, 0x30, NULL, HFILL}
1675 &hf_cdlmap_diuc_reserved_1,
1676 {"Reserved", "wmx.compact_dlmap.diuc_reserved", FT_UINT8, BASE_HEX, NULL, 0x03, NULL, HFILL}
1679 &hf_cdlmap_bit_map_length,
1680 {"BIT MAP Length", "wmx.compact_dlmap.bit_map_length", FT_UINT8, BASE_DEC, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
1683 &hf_cdlmap_bit_map_length_1,
1684 {"BIT MAP Length", "wmx.compact_dlmap.bit_map_length", FT_UINT8, BASE_DEC, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
1688 {"BIT MAP", "wmx.compact_dlmap.bit_map", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
1692 {"DIUC", "wmx.compact_dlmap.diuc", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
1696 {"DIUC", "wmx.compact_dlmap.diuc", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
1699 &hf_cdlmap_allocation_mode,
1700 {"Allocation Mode", "wmx.compact_dlmap.allocation_mode", FT_UINT8, BASE_DEC, VALS(vals_allocation_modes), 0xC0, NULL, HFILL}
1703 &hf_cdlmap_allocation_mode_1,
1704 {"Allocation Mode", "wmx.compact_dlmap.allocation_mode", FT_UINT8, BASE_DEC, VALS(vals_allocation_modes), 0x0C, NULL, HFILL}
1707 &hf_cdlmap_allocation_mode_rsvd,
1708 {"Reserved", "wmx.compact_dlmap.allocation_mode_rsvd", FT_UINT8, BASE_DEC, NULL, 0x30, NULL, HFILL}
1711 &hf_cdlmap_allocation_mode_rsvd_1,
1712 {"Reserved", "wmx.compact_dlmap.allocation_mode_rsvd", FT_UINT8, BASE_DEC, NULL, 0x03, NULL, HFILL}
1715 &hf_cdlmap_num_subchannels,
1716 {"Number Of Subchannels", "wmx.compact_dlmap.num_subchannels", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
1719 &hf_cdlmap_num_subchannels_1,
1720 {"Number Of Subchannels", "wmx.compact_dlmap.num_subchannels", FT_UINT16, BASE_DEC, NULL, 0x0FF0, NULL, HFILL}
1723 &hf_cdlmap_reserved_type,
1724 {"DL-MAP Reserved Type", "wmx.compact_dlmap.reserved_type", FT_UINT8, BASE_DEC, NULL, DL_MAP_TYPE_MASK, NULL, HFILL}
1727 &hf_cdlmap_reserved_type_1,
1728 {"DL-MAP Reserved Type", "wmx.compact_dlmap.reserved_type", FT_UINT8, BASE_DEC, NULL, DL_MAP_TYPE_MASK_1, NULL, HFILL}
1732 /* HARQ MAP Format Configuration IE display */
1733 static hf_register_info hf_format_config[] =
1736 &hf_format_config_ie_dl_map_type,
1737 {"DL-MAP Type", "wmx.format_config_ie.dl_map_type", FT_UINT8, BASE_DEC, NULL, DL_MAP_TYPE_MASK, NULL, HFILL}
1740 &hf_format_config_ie_dl_map_type_1,
1741 {"DL-MAP Type", "wmx.format_config_ie.dl_map_type", FT_UINT8, BASE_DEC, NULL, DL_MAP_TYPE_MASK_1, NULL, HFILL}
1744 &hf_format_config_ie_dl_map_type_32,
1745 {"DL-MAP Type", "wmx.format_config_ie.dl_map_type", FT_UINT32, BASE_DEC, NULL, FORMAT_CONFIG_IE_DL_MAP_TYPE_MASK, NULL, HFILL}
1748 &hf_format_config_ie_new_format_indication,
1749 {"New Format Indication", "wmx.format_config_ie.new_format_indication", FT_BOOLEAN, 8, TFS(&tfs_indication), UL_MAP_APPEND_MASK, NULL, HFILL}
1752 &hf_format_config_ie_new_format_indication_1,
1753 {"New Format Indication", "wmx.format_config_ie.new_format_indication", FT_BOOLEAN, 8, TFS(&tfs_indication), UL_MAP_APPEND_MASK_1, NULL, HFILL}
1756 &hf_format_config_ie_new_format_indication_32,
1757 {"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}
1760 &hf_format_config_ie_cid_type,
1761 {"HARQ MAP Indicator", "wmx.harq_map.format_config_ie.indicator", FT_UINT32, BASE_HEX, VALS(vals_cid_types), CID_TYPE_MASK, NULL, HFILL}
1764 &hf_format_config_ie_cid_type_1,
1765 {"CID Type", "wmx.harq_map.format_config_ie.cid_type", FT_UINT32, BASE_HEX, VALS(vals_cid_types), CID_TYPE_MASK_1, NULL, HFILL}
1768 &hf_format_config_ie_safety_pattern,
1769 {"Safety Pattern", "wmx.harq_map.format_config_ie.safety_pattern", FT_UINT32, BASE_HEX, NULL, SAFETY_PATTERN_MASK, NULL, HFILL}
1772 &hf_format_config_ie_safety_pattern_1,
1773 {"Safety Pattern", "wmx.harq_map.format_config_ie.safety_pattern", FT_UINT32, BASE_HEX, NULL, SAFETY_PATTERN_MASK_1, NULL, HFILL}
1776 &hf_format_config_ie_subchannel_type,
1777 {"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}
1780 &hf_format_config_ie_subchannel_type_1,
1781 {"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}
1784 &hf_format_config_ie_max_logical_bands,
1785 {"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}
1788 &hf_format_config_ie_max_logical_bands_1,
1789 {"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}
1792 &hf_format_config_ie_num_of_broadcast_symbol,
1793 {"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}
1796 &hf_format_config_ie_num_of_broadcast_symbol_1,
1797 {"Number Of Symbols for Broadcast", "wmx.harq_map.num_of_broadcast_symbol", FT_UINT32, BASE_HEX, NULL, NUM_BROADCAST_SYMBOLS_MASK_1, NULL, HFILL}
1800 &hf_format_config_ie_num_of_dl_band_amc_symbol,
1801 {"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}
1804 &hf_format_config_ie_num_of_dl_band_amc_symbol_1,
1805 {"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}
1808 &hf_format_config_ie_num_of_ul_band_amc_symbol,
1809 {"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}
1812 &hf_format_config_ie_num_of_ul_band_amc_symbol_1,
1813 {"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}
1817 /* HARQ MAP Reduced CID IE display */
1818 static hf_register_info hf_rcid[] =
1821 &hf_harq_rcid_ie_normal_cid,
1822 {"Normal CID", "wmx.harq_map.rcid_ie.normal_cid", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
1825 &hf_harq_rcid_ie_normal_cid_1,
1826 {"Normal CID", "wmx.harq_map.rcid_ie.normal_cid", FT_UINT24, BASE_HEX, NULL, WIMAX_RCID_IE_NORMAL_CID_MASK_1, NULL, HFILL}
1829 &hf_harq_rcid_ie_prefix,
1830 {"Prefix", "wmx.harq_map.rcid_ie.prefix", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_PREFIX_MASK, NULL, HFILL}
1833 &hf_harq_rcid_ie_prefix_1,
1834 {"Prefix", "wmx.harq_map.rcid_ie.prefix", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_PREFIX_MASK_1, NULL, HFILL}
1837 &hf_harq_rcid_ie_cid3,
1838 {"3 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid3", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID3_MASK, NULL, HFILL}
1841 &hf_harq_rcid_ie_cid3_1,
1842 {"3 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid3", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID3_MASK_1, NULL, HFILL}
1845 &hf_harq_rcid_ie_cid7,
1846 {"7 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid7", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID7_MASK, NULL, HFILL}
1849 &hf_harq_rcid_ie_cid7_1,
1850 {"7 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid7", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID7_MASK_1, NULL, HFILL}
1853 &hf_harq_rcid_ie_cid11,
1854 {"11 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid11", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID11_MASK, NULL, HFILL}
1857 &hf_harq_rcid_ie_cid11_1,
1858 {"11 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid11", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID11_MASK_1, NULL, HFILL}
1861 &hf_harq_rcid_ie_cid11_2,
1862 {"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}
1865 &hf_harq_rcid_ie_cid11_3,
1866 {"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}
1870 /* HARQ MAP HARQ Control IE display */
1871 static hf_register_info hf_harq_control[] =
1874 &hf_harq_control_ie_prefix,
1875 {"Prefix", "wmx.harq_map.harq_control_ie.prefix", FT_BOOLEAN, 8, TFS(&tfs_prefix), WIMAX_HARQ_CONTROL_IE_PREFIX_MASK, NULL, HFILL}
1878 &hf_harq_control_ie_ai_sn,
1879 {"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}
1882 &hf_harq_control_ie_spid,
1883 {"Subpacket ID (SPID)", "wmx.harq_map.harq_control_ie.spid", FT_UINT8, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_SPID_MASK, NULL, HFILL}
1886 &hf_harq_control_ie_acid,
1887 {"HARQ CH ID (ACID)", "wmx.harq_map.harq_control_ie.acid", FT_UINT8, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_ACID_MASK, NULL, HFILL}
1890 &hf_harq_control_ie_reserved,
1891 {"Reserved", "wmx.harq_map.harq_control_ie.reserved", FT_UINT8, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_RESERVED_MASK, NULL, HFILL}
1894 &hf_harq_control_ie_prefix_1,
1895 {"Prefix", "wmx.harq_map.harq_control_ie.prefix", FT_BOOLEAN, 16, TFS(&tfs_prefix), WIMAX_HARQ_CONTROL_IE_PREFIX_MASK_1, NULL, HFILL}
1898 &hf_harq_control_ie_ai_sn_1,
1899 {"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}
1902 &hf_harq_control_ie_spid_1,
1903 {"Subpacket ID (SPID)", "wmx.harq_map.harq_control_ie.spid", FT_UINT16, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_SPID_MASK_1, NULL, HFILL}
1906 &hf_harq_control_ie_acid_1,
1907 {"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}
1910 &hf_harq_control_ie_reserved_1,
1911 {"Reserved", "wmx.harq_map.harq_control_ie.reserved", FT_UINT16, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_RESERVED_MASK_1, NULL, HFILL}
1915 /* HARQ MAP CQICH Control IE display */
1916 static hf_register_info hf_cqich_control[] =
1919 &hf_cqich_control_ie_indicator,
1920 {"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}
1923 &hf_cqich_control_ie_alloc_id,
1924 {"Allocation Index", "wmx.harq_map.cqich_control_ie.alloc_id", FT_UINT16, BASE_HEX, NULL, WIMAX_CQICH_CONTROL_IE_ALLOCATION_INDEX_MASK, NULL, HFILL}
1927 &hf_cqich_control_ie_period,
1928 {"PERIOD", "wmx.harq_map.cqich_control_ie.period", FT_UINT16, BASE_HEX, NULL, WIMAX_CQICH_CONTROL_IE_PERIOD_MASK, NULL, HFILL}
1931 &hf_cqich_control_ie_frame_offset,
1932 {"Frame Offset", "wmx.harq_map.cqich_control_ie.frame_offset", FT_UINT16, BASE_HEX, NULL, WIMAX_CQICH_CONTROL_IE_FRAME_OFFSET_MASK, NULL, HFILL}
1935 &hf_cqich_control_ie_duration,
1936 {"Duration", "wmx.harq_map.cqich_control_ie.duration", FT_UINT16, BASE_HEX, NULL, WIMAX_CQICH_CONTROL_IE_DURATION_MASK, NULL, HFILL}
1939 &hf_cqich_control_ie_cqi_rep_threshold,
1940 {"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}
1943 &hf_cqich_control_ie_indicator_1,
1944 {"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}
1947 &hf_cqich_control_ie_alloc_id_1,
1948 {"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}
1951 &hf_cqich_control_ie_period_1,
1952 {"PERIOD", "wmx.harq_map.cqich_control_ie.period", FT_UINT24, BASE_HEX, NULL, WIMAX_CQICH_CONTROL_IE_PERIOD_MASK_1, NULL, HFILL}
1955 &hf_cqich_control_ie_frame_offset_1,
1956 {"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}
1959 &hf_cqich_control_ie_duration_1,
1960 {"Duration", "wmx.harq_map.cqich_control_ie.duration", FT_UINT24, BASE_HEX, NULL, WIMAX_CQICH_CONTROL_IE_DURATION_MASK_1, NULL, HFILL}
1963 &hf_cqich_control_ie_cqi_rep_threshold_1,
1964 {"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}
1968 static hf_register_info hf_extension_type[] =
1971 &hf_cdlmap_extension_type,
1972 {"DL-MAP Type", "wmx.extension_type.dl_map_type", FT_UINT16, BASE_DEC, NULL, EXTENSION_TYPE_MASK, NULL, HFILL}
1975 &hf_cdlmap_extension_type_1,
1976 {"DL-MAP Type", "wmx.extension_type.dl_map_type", FT_UINT16, BASE_DEC, NULL, EXTENSION_TYPE_MASK_1, NULL, HFILL}
1979 &hf_cdlmap_extension_subtype,
1980 {"Extension Subtype", "wmx.extension_type.subtype", FT_UINT16, BASE_DEC, NULL, EXTENSION_SUBTYPE_MASK, NULL, HFILL}
1983 &hf_cdlmap_extension_subtype_1,
1984 {"Extension Subtype", "wmx.extension_type.subtype", FT_UINT16, BASE_DEC, NULL, EXTENSION_SUBTYPE_MASK_1, NULL, HFILL}
1987 &hf_cdlmap_extension_length,
1988 {"Extension Length", "wmx.extension_type.length", FT_UINT16, BASE_DEC, NULL, EXTENSION_LENGTH_MASK, NULL, HFILL}
1991 &hf_cdlmap_extension_length_1,
1992 {"Extension Length", "wmx.extension_type.length", FT_UINT16, BASE_DEC, NULL, EXTENSION_LENGTH_MASK_1, NULL, HFILL}
1995 &hf_cdlmap_extension_time_diversity_mbs,
1996 {"Time Diversity MBS", "wmx.extension_type.time_diversity_mbs", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
1999 &hf_cdlmap_extension_time_diversity_mbs_1,
2000 {"Time Diversity MBS", "wmx.extension_type.time_diversity_mbs", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
2003 &hf_cdlmap_extension_harq_mode_1,
2004 {"HARQ Mode Switch", "wmx.extension_type.harq_mode", FT_UINT16, BASE_HEX, NULL, 0x000F, NULL, HFILL}
2007 &hf_cdlmap_extension_harq_mode,
2008 {"HARQ Mode Switch", "wmx.extension_type.harq_mode", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
2011 &hf_cdlmap_extension_unknown_sub_type,
2012 {"Unknown Extension Subtype", "wmx.extension_type.unknown_sub_type", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
2015 &hf_cdlmap_extension_unknown_sub_type_1,
2016 {"Unknown Extension Subtype", "wmx.extension_type.unknown_sub_type", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
2020 /* Extended DIUC dependent IE */
2021 static hf_register_info hf_extended_diuc[] =
2024 &hf_extended_diuc_dependent_ie_diuc,
2025 {"Extended DIUC", "wmx.extended_diuc_dependent_ie.diuc", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL }
2028 &hf_extended_diuc_dependent_ie_diuc_1,
2029 {"Extended DIUC", "wmx.extended_diuc_dependent_ie.diuc", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL }
2032 &hf_extended_diuc_dependent_ie_length,
2033 {"Length", "wmx.extended_diuc_dependent_ie.length", FT_UINT8, BASE_DEC, NULL, MSB_NIBBLE_MASK, NULL, HFILL }
2036 &hf_extended_diuc_dependent_ie_length_1,
2037 {"Length", "wmx.extended_diuc_dependent_ie.length", FT_UINT8, BASE_DEC, NULL, LSB_NIBBLE_MASK, NULL, HFILL }
2039 { /* 8.4.5.3.? Channel_Measurement_IE */
2040 &hf_extended_diuc_dependent_ie_channel_measurement,
2041 {"Channel_Measurement_IE (not implemented)", "wmx.extended_diuc_dependent_ie.channel_measurement", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2043 { /* 8.4.5.3.4 STC_Zone_IE */
2044 &hf_extended_diuc_dependent_ie_stc_zone,
2045 {"STC_Zone_IE (not implemented)", "wmx.extended_diuc_dependent_ie.stc_zone", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2047 { /* 8.4.5.3.3 AAS_DL_IE */
2048 &hf_extended_diuc_dependent_ie_aas_dl,
2049 {"AAS_DL_IE (not implemented)", "wmx.extended_diuc_dependent_ie.aas_dl", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2051 { /* 8.4.5.3.6 Data_location_in_another_BS_IE */
2052 &hf_extended_diuc_dependent_ie_data_location,
2053 {"Data_location_in_another_BS_IE (not implemented)", "wmx.extended_diuc_dependent_ie.data_location", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2055 { /* 8.4.5.3.7 CID_Switch_IE */
2056 &hf_extended_diuc_dependent_ie_cid_switch,
2057 {"CID_Switch_IE (not implemented)", "wmx.extended_diuc_dependent_ie.cid_switch", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2060 { /* 8.4.5.3.8 MIMO_DL_Basic_IE */
2061 &hf_extended_diuc_dependent_ie_mimo_dl_basic,
2062 {"MIMO_DL_Basic_IE (not implemented)", "wmx.extended_diuc_dependent_ie.mimo_dl_basic", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2064 { /* 8.4.5.3.9 MIMO_DL_Enhanced_IE */
2065 &hf_extended_diuc_dependent_ie_mimo_dl_enhanced,
2066 {"MIMO_DL_Enhanced_IE (not implemented)", "wmx.extended_diuc_dependent_ie.mimo_dl_enhanced", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2068 { /* 8.4.5.3.10 HARQ_Map_Pointer_IE */
2069 &hf_extended_diuc_dependent_ie_harq_map_pointer,
2070 {"HARQ_Map_Pointer_IE (not implemented)", "wmx.extended_diuc_dependent_ie.harq_map_pointer", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2072 { /* 8.4.5.3.11 PHYMOD_DL_IE */
2073 &hf_extended_diuc_dependent_ie_phymod_dl,
2074 {"PHYMOD_DL_IE (not implemented)", "wmx.extended_diuc_dependent_ie.phymod_dl", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2076 { /* 8.4.5.3.13 DL PUSC Burst Allocation in Other Segment IE */
2077 &hf_extended_diuc_dependent_ie_dl_pusc_burst_allocation,
2078 {"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 }
2080 { /* 8.4.5.3.19 UL_interference_and_noise_level_IE */
2081 &hf_extended_diuc_dependent_ie_ul_interference_and_noise_level,
2082 {"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 }
2084 { /* unknown DIUC */
2085 &hf_extended_diuc_dependent_ie_unknown_diuc,
2086 {"Unknown Extended DIUC", "wmx.extended_diuc_dependent_ie.unknown_diuc", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2090 #if 0 /* Not used ?? */
2091 /* Setup protocol subtree array */
2092 static gint *ett[] =
2094 &ett_wimax_compact_dlmap_ie_decoder,
2095 &ett_wimax_format_configuration_ie_decoder,
2096 &ett_wimax_rcid_ie_decoder,
2097 &ett_wimax_harq_control_ie_decoder,
2098 &ett_wimax_extended_diuc_dependent_ie_decoder,
2099 &ett_wimax_cqich_control_ie_decoder,
2100 &ett_wimax_extension_type_ie_decoder,
2102 proto_register_subtree_array(ett, array_length(ett));
2105 proto_wimax_compact_dlmap_ie_decoder = proto_wimax;
2107 proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder, hf_compact_dlmap, array_length(hf_compact_dlmap));
2108 proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder, hf_format_config, array_length(hf_format_config));
2109 proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder, hf_rcid, array_length(hf_rcid));
2110 proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder, hf_harq_control, array_length(hf_harq_control));
2111 proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder, hf_cqich_control, array_length(hf_cqich_control));
2112 proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder, hf_extension_type, array_length(hf_extension_type));
2113 proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder, hf_extended_diuc, array_length(hf_extended_diuc));