Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / plugins / epan / wimax / wimax_compact_ulmap_ie_decoder.c
blob899f60782022548c18ad50fb5bb2698b93658e9d
1 /* wimax_compact_ulmap_ie_decoder.c
2 * WiMax Compact UL-MAP IE 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
15 /* Include files */
17 #include "config.h"
19 #include <epan/packet.h>
20 #include <epan/tfs.h>
21 #include <wsutil/array.h>
22 #include "wimax_compact_ulmap_ie_decoder.h"
24 /* MASKs */
25 #define MSB_NIBBLE_MASK 0xF0
26 #define LSB_NIBBLE_MASK 0x0F
28 #define CID_TYPE_NORMAL 0
29 #define CID_TYPE_RCID11 1
30 #define CID_TYPE_RCID7 2
31 #define CID_TYPE_RCID3 3
33 /* Global Variables */
34 extern unsigned cid_type;
35 extern unsigned band_amc_subchannel_type;
36 extern unsigned max_logical_bands;
37 extern unsigned num_of_broadcast_symbols;
38 extern unsigned num_of_dl_band_amc_symbols;
39 extern unsigned num_of_ul_band_amc_symbols;
40 extern unsigned harq_mode;
41 extern int proto_wimax;
43 /* forward reference */
44 unsigned wimax_cdma_allocation_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
45 unsigned wimax_extended_uiuc_dependent_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
46 static unsigned wimax_compact_ulmap_rcid_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
47 static unsigned wimax_compact_ulmap_harq_control_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
48 static unsigned wimax_culmap_extension_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
50 static int proto_wimax_compact_ulmap_ie_decoder;
52 #if 0 /* not used ?? */
53 static int ett_wimax_compact_ulmap_ie_decoder;
54 static int ett_wimax_rcid_ie_decoder;
55 static int ett_wimax_harq_control_ie_decoder;
56 static int ett_wimax_extended_uiuc_dependent_ie_decoder;
57 static int ett_wimax_extension_type_ie_decoder;
58 #endif
60 /* Prefixes */
61 static const true_false_string tfs_prefix =
63 "Enable HARQ",
64 "Temporary Disable HARQ"
67 /* Region Changes */
68 static const true_false_string tfs_region_change =
70 "Region Changed",
71 "No Region Change"
74 /* Region Changes */
75 static const true_false_string tfs_yes_no_ie =
77 "Yes",
78 "No"
81 /* Repetition Coding Indications */
82 static const value_string vals_repetitions[] =
84 { 0, "No Repetition Coding" },
85 { 1, "Repetition Coding of 2 Used" },
86 { 2, "Repetition Coding of 4 Used" },
87 { 3, "Repetition Coding of 6 Used" },
88 { 0, NULL }
91 /* Allocation Modes */
92 static const value_string vals_allocation_modes[] =
94 { 0, "Same Number Of Subchannels For The Selected Bands" },
95 { 1, "Different Same Number Of Subchannels For The Selected Bands" },
96 { 2, "Total Number Of Subchannels For The Selected Bands Determined by Nsch Code and Nep Code" },
97 { 3, "Reserved" },
98 { 0, NULL }
101 /* CTypes */
102 static const value_string vals_ctypes[] =
104 { 0, "2 Mini-subchannels (defines M=2)" },
105 { 1, "2 Mini-subchannels (defines M=2)" },
106 { 2, "3 Mini-subchannels (defines M=3)" },
107 { 3, "6 Mini-subchannels (defines M=6)" },
108 { 0, NULL }
111 /* Masks */
112 #define UL_MAP_TYPE_MASK 0xE0
113 #define UL_MAP_RESERVED_MASK 0x10
114 #define SHORTENED_UIUC_MASK 0xE0
115 #define COMPANDED_SC_MASK 0x1F
116 #define UL_MAP_TYPE_MASK_1 0x0E
117 #define UL_MAP_RESERVED_MASK_1 0x01
118 #define SHORTENED_UIUC_MASK_1 0x0E00
119 #define COMPANDED_SC_MASK_1 0x01F0
120 #define MIDDLE_BYTE_MASK 0x0FF0
122 #define ALLOCATION_MODE_MASK 0xC0
123 #define ALLOCATION_MODE_MASK_1 0x0C
125 /* display indexies */
126 static int hf_culmap_ul_map_type;
127 static int hf_culmap_reserved;
128 static int hf_culmap_nep_code;
129 static int hf_culmap_nsch_code;
130 static int hf_culmap_num_bands;
131 static int hf_culmap_band_index;
132 static int hf_culmap_nb_bitmap;
133 static int hf_culmap_ul_map_type_1;
134 static int hf_culmap_reserved_1;
135 static int hf_culmap_nep_code_1;
136 static int hf_culmap_nsch_code_1;
137 static int hf_culmap_num_bands_1;
138 /*static int hf_culmap_band_index_1;*/
139 static int hf_culmap_nb_bitmap_1;
141 static int hf_culmap_shortened_uiuc;
142 static int hf_culmap_companded_sc;
143 static int hf_culmap_shortened_uiuc_1;
144 static int hf_culmap_companded_sc_1;
146 static int hf_culmap_bin_offset;
147 static int hf_culmap_bin_offset_1;
149 static int hf_culmap_uiuc_ofdma_symbol_offset;
150 static int hf_culmap_uiuc_ofdma_symbol_offset_1;
151 static int hf_culmap_uiuc_subchannel_offset_7;
152 static int hf_culmap_uiuc_num_of_ofdma_symbols_7;
153 static int hf_culmap_uiuc_num_of_subchannels_7;
154 static int hf_culmap_uiuc_ranging_method;
155 static int hf_culmap_uiuc_reserved;
156 static int hf_culmap_uiuc_subchannel_offset_7_1;
157 static int hf_culmap_uiuc_num_of_ofdma_symbols_7_1;
158 static int hf_culmap_uiuc_num_of_subchannels_7_1;
159 static int hf_culmap_uiuc_ranging_method_1;
160 static int hf_culmap_uiuc_reserved_1;
161 static int hf_culmap_uiuc_repetition_coding_indication;
162 static int hf_culmap_uiuc_repetition_coding_indication_1;
163 /* static int hf_culmap_uiuc_reserved1; */
164 /* static int hf_culmap_uiuc_reserved11_1; */
165 static int hf_culmap_uiuc_subchannel_offset;
166 static int hf_culmap_uiuc_subchannel_offset_1;
167 static int hf_culmap_uiuc_num_of_ofdma_symbols;
168 static int hf_culmap_uiuc_num_of_ofdma_symbols_1;
169 static int hf_culmap_uiuc_num_of_subchannels;
170 static int hf_culmap_uiuc_num_of_subchannels_1;
172 static int hf_culmap_harq_region_change_indication;
173 static int hf_culmap_harq_region_change_indication_1;
174 static int hf_culmap_cqi_region_change_indication;
175 static int hf_culmap_cqi_region_change_indication_1;
177 static int hf_culmap_uiuc;
178 static int hf_culmap_uiuc_1;
180 static int hf_culmap_allocation_mode;
181 static int hf_culmap_allocation_mode_rsvd;
182 static int hf_culmap_num_subchannels;
183 static int hf_culmap_allocation_mode_1;
184 static int hf_culmap_allocation_mode_rsvd_1;
185 static int hf_culmap_num_subchannels_1;
187 /* static int hf_culmap_reserved_type; */
188 static int hf_culmap_reserved_type_1;
190 /* display indexies */
191 static int hf_rcid_ie_prefix;
192 static int hf_rcid_ie_prefix_1;
193 static int hf_rcid_ie_normal_cid;
194 static int hf_rcid_ie_normal_cid_1;
195 static int hf_rcid_ie_cid3;
196 static int hf_rcid_ie_cid3_1;
197 static int hf_rcid_ie_cid7;
198 static int hf_rcid_ie_cid7_1;
199 static int hf_rcid_ie_cid11;
200 static int hf_rcid_ie_cid11_1;
201 static int hf_rcid_ie_cid11_2;
202 static int hf_rcid_ie_cid11_3;
204 /* Masks */
205 #define WIMAX_RCID_IE_NORMAL_CID_MASK_1 0x0FFFF0
206 #define WIMAX_RCID_IE_PREFIX_MASK 0x8000
207 #define WIMAX_RCID_IE_PREFIX_MASK_1 0x0800
208 #define WIMAX_RCID_IE_CID3_MASK 0x7000
209 #define WIMAX_RCID_IE_CID3_MASK_1 0x0700
210 #define WIMAX_RCID_IE_CID7_MASK 0x7F00
211 #define WIMAX_RCID_IE_CID7_MASK_1 0x07F0
212 #define WIMAX_RCID_IE_CID11_MASK 0x7FF0
213 #define WIMAX_RCID_IE_CID11_MASK_1 0x07FF
215 /* HARQ MAP HARQ Control IE display indexies */
216 static int hf_harq_control_ie_prefix;
217 static int hf_harq_control_ie_ai_sn;
218 static int hf_harq_control_ie_spid;
219 static int hf_harq_control_ie_acid;
220 static int hf_harq_control_ie_reserved;
221 static int hf_harq_control_ie_prefix_1;
222 static int hf_harq_control_ie_ai_sn_1;
223 static int hf_harq_control_ie_spid_1;
224 static int hf_harq_control_ie_acid_1;
225 static int hf_harq_control_ie_reserved_1;
227 /* Masks */
228 #define WIMAX_HARQ_CONTROL_IE_PREFIX_MASK 0x80
229 #define WIMAX_HARQ_CONTROL_IE_AI_SN_MASK 0x40
230 #define WIMAX_HARQ_CONTROL_IE_SPID_MASK 0x30
231 #define WIMAX_HARQ_CONTROL_IE_ACID_MASK 0x0F
232 #define WIMAX_HARQ_CONTROL_IE_RESERVED_MASK 0x70
233 #define WIMAX_HARQ_CONTROL_IE_PREFIX_MASK_1 0x0800
234 #define WIMAX_HARQ_CONTROL_IE_AI_SN_MASK_1 0x0400
235 #define WIMAX_HARQ_CONTROL_IE_SPID_MASK_1 0x0300
236 #define WIMAX_HARQ_CONTROL_IE_ACID_MASK_1 0x00F0
237 #define WIMAX_HARQ_CONTROL_IE_RESERVED_MASK_1 0x0700
239 /* Extension Type */
240 #define EXTENSION_TYPE_MASK 0xE000
241 #define EXTENSION_TYPE_MASK_1 0x0E00
242 #define EXTENSION_SUBTYPE_MASK 0x1F00
243 #define EXTENSION_SUBTYPE_MASK_1 0x01F0
244 #define EXTENSION_LENGTH_MASK 0x00F0
245 #define EXTENSION_LENGTH_MASK_1 0x000F
247 static int hf_culmap_extension_type;
248 static int hf_culmap_extension_subtype;
249 static int hf_culmap_extension_length;
250 static int hf_culmap_extension_type_1;
251 static int hf_culmap_extension_subtype_1;
252 static int hf_culmap_extension_length_1;
254 /* static int hf_culmap_extension_time_diversity_mbs; */
255 static int hf_culmap_extension_harq_mode;
256 static int hf_culmap_extension_unknown_sub_type;
257 /* static int hf_culmap_extension_time_diversity_mbs_1; */
258 static int hf_culmap_extension_harq_mode_1;
259 static int hf_culmap_extension_unknown_sub_type_1;
261 /* UL-MAP CDMA Allocation IE */
262 #define CDMA_ALLOCATION_DURATION_MASK 0xFC00
263 #define CDMA_ALLOCATION_UIUC_MASK 0x03C0
264 #define CDMA_ALLOCATION_REPETITION_CODE_MASK 0x0030
265 #define CDMA_ALLOCATION_FRAME_NUMBER_INDEX_MASK 0x000F
267 #define CDMA_ALLOCATION_RANGING_SUBCHANNEL_MASK 0xFE
268 #define CDMA_ALLOCATION_BW_REQUEST_MANDATORY_MASK 0x01
270 #define CDMA_ALLOCATION_DURATION_MASK_1 0x0FC0
271 #define CDMA_ALLOCATION_UIUC_MASK_1 0x003C
272 #define CDMA_ALLOCATION_REPETITION_CODE_MASK_1 0x0003
273 #define CDMA_ALLOCATION_FRAME_NUMBER_INDEX_MASK_1 0xF0000000
274 #define CDMA_ALLOCATION_RANGING_CODE_MASK_1 0x0FF00000
275 #define CDMA_ALLOCATION_RANGING_SYMBOL_MASK_1 0x000FF000
276 #define CDMA_ALLOCATION_RANGING_SUBCHANNEL_MASK_1 0x00000FE0
277 #define CDMA_ALLOCATION_BW_REQUEST_MANDATORY_MASK_1 0x00000010
279 static int hf_cdma_allocation_duration;
280 static int hf_cdma_allocation_uiuc;
281 static int hf_cdma_allocation_repetition;
282 static int hf_cdma_allocation_frame_number_index;
283 static int hf_cdma_allocation_ranging_code;
284 static int hf_cdma_allocation_ranging_symbol;
285 static int hf_cdma_allocation_ranging_subchannel;
286 static int hf_cdma_allocation_bw_req;
287 static int hf_cdma_allocation_duration_1;
288 static int hf_cdma_allocation_uiuc_1;
289 static int hf_cdma_allocation_repetition_1;
290 static int hf_cdma_allocation_frame_number_index_1;
291 static int hf_cdma_allocation_ranging_code_1;
292 static int hf_cdma_allocation_ranging_symbol_1;
293 static int hf_cdma_allocation_ranging_subchannel_1;
294 static int hf_cdma_allocation_bw_req_1;
296 /* UL-MAP Extended UIUCs (table 290a) */
297 #define MINI_SUBCHANNEL_CTYPE_MASK 0xC0
298 #define MINI_SUBCHANNEL_CTYPE_MASK_16 0x0C00
299 #define MINI_SUBCHANNEL_DURATION_MASK 0x3F
300 #define MINI_SUBCHANNEL_DURATION_MASK_16 0x03F0
301 #define MINI_SUBCHANNEL_CID_MASK 0xFFFF00
302 #define MINI_SUBCHANNEL_UIUC_MASK 0x0000F0
303 #define MINI_SUBCHANNEL_REPETITION_MASK 0x00000C
304 #define MINI_SUBCHANNEL_CID_MASK_1 0x0FFFF000
305 #define MINI_SUBCHANNEL_UIUC_MASK_1 0x00000F00
306 #define MINI_SUBCHANNEL_REPETITION_MASK_1 0x000000C0
307 #define MINI_SUBCHANNEL_CID_MASK_2 0x03FFFF00
308 #define MINI_SUBCHANNEL_UIUC_MASK_2 0x000000F0
309 #define MINI_SUBCHANNEL_REPETITION_MASK_2 0x0000000C
310 #define MINI_SUBCHANNEL_CID_MASK_3 0x3FFFF000
311 #define MINI_SUBCHANNEL_UIUC_MASK_3 0x00000F00
312 #define MINI_SUBCHANNEL_REPETITION_MASK_3 0x000000C0
313 #define MINI_SUBCHANNEL_PADDING_MASK 0xF0
314 #define MINI_SUBCHANNEL_PADDING_MASK_1 0x0000000F
316 static int hf_extended_uiuc_ie_uiuc;
317 static int hf_extended_uiuc_ie_length;
318 static int hf_extended_uiuc_ie_uiuc_1;
319 static int hf_extended_uiuc_ie_length_1;
320 static int hf_extended_uiuc_ie_power_control;
321 static int hf_extended_uiuc_ie_power_measurement_frame;
322 static int hf_extended_uiuc_ie_power_control_24;
323 static int hf_extended_uiuc_ie_power_measurement_frame_24;
324 static int hf_extended_uiuc_ie_mini_subchannel_alloc_ctype;
325 static int hf_extended_uiuc_ie_mini_subchannel_alloc_duration;
326 static int hf_extended_uiuc_ie_mini_subchannel_alloc_ctype_16;
327 static int hf_extended_uiuc_ie_mini_subchannel_alloc_duration_16;
328 static int hf_extended_uiuc_ie_mini_subchannel_alloc_cid;
329 static int hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc;
330 static int hf_extended_uiuc_ie_mini_subchannel_alloc_repetition;
331 static int hf_extended_uiuc_ie_mini_subchannel_alloc_padding;
332 static int hf_extended_uiuc_ie_mini_subchannel_alloc_cid_1;
333 static int hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_1;
334 static int hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_1;
335 static int hf_extended_uiuc_ie_mini_subchannel_alloc_cid_2;
336 static int hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_2;
337 static int hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_2;
338 static int hf_extended_uiuc_ie_mini_subchannel_alloc_cid_3;
339 static int hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_3;
340 static int hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_3;
341 static int hf_extended_uiuc_ie_mini_subchannel_alloc_padding_1;
342 static int hf_extended_uiuc_ie_aas_ul;
343 static int hf_extended_uiuc_ie_cqich_alloc;
344 static int hf_extended_uiuc_ie_ul_zone;
345 static int hf_extended_uiuc_ie_phymod_ul;
346 static int hf_extended_uiuc_ie_mimo_ul_basic;
347 static int hf_extended_uiuc_ie_fast_tracking;
348 static int hf_extended_uiuc_ie_ul_pusc_burst_allocation;
349 static int hf_extended_uiuc_ie_fast_ranging;
350 static int hf_extended_uiuc_ie_ul_allocation_start;
351 static int hf_extended_uiuc_ie_unknown_uiuc;
354 /* Compact UL-MAP IE Types (table 90) */
355 #define COMPACT_UL_MAP_TYPE_NORMAL_SUBCHANNEL 0
356 #define COMPACT_UL_MAP_TYPE_BAND_AMC 1
357 #define COMPACT_UL_MAP_TYPE_SAFETY 2
358 #define COMPACT_UL_MAP_TYPE_UIUC 3
359 #define COMPACT_UL_MAP_TYPE_HARQ_REGION_IE 4
360 #define COMPACT_UL_MAP_TYPE_CQICH_REGION_IE 5
361 #define COMPACT_UL_MAP_TYPE_RESERVED 6
362 #define COMPACT_UL_MAP_TYPE_EXTENSION 7
364 /* Compact UL-MAP IE decoder */
365 unsigned wimax_compact_ulmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
367 unsigned uiuc, byte, length = 0;
368 unsigned ul_map_type;
369 unsigned harq_region_change_indication;
370 unsigned cqi_region_change_indication;
371 unsigned ul_map_offset, nibble_length;
372 unsigned nband, band_count, i, allocation_mode;
374 #ifdef DEBUG
375 /* update the info column */
376 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Compact UL-MAP IEs");
377 #endif
378 /* set the local offset */
379 ul_map_offset = offset;
380 /* Get the first byte */
381 byte = tvb_get_uint8(tvb, ul_map_offset);
382 /* get the ul-map type */
383 if(nibble_offset & 1)
385 ul_map_type = ((byte & UL_MAP_TYPE_MASK_1) >> 1);
387 else
389 ul_map_type = ((byte & UL_MAP_TYPE_MASK) >> 5);
391 /* process the Compact UL-MAP IE (table 90) */
392 switch (ul_map_type)
394 case COMPACT_UL_MAP_TYPE_NORMAL_SUBCHANNEL:/* 6.3.2.3.43.7.1 */
395 /* display the UL-MAP type and reserved bit */
396 if(nibble_offset & 1)
398 proto_tree_add_item(tree, hf_culmap_ul_map_type_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
399 /* display the reserved */
400 proto_tree_add_item(tree, hf_culmap_reserved_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
401 /* move to next byte */
402 ul_map_offset++;
403 nibble_offset = 0;
405 else
407 proto_tree_add_item(tree, hf_culmap_ul_map_type, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
408 /* display the reserved */
409 proto_tree_add_item(tree, hf_culmap_reserved, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
410 nibble_offset = 1;
412 length = 1;
413 /* decode RCID IE */
414 nibble_length = wimax_compact_ulmap_rcid_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
415 length += nibble_length;
416 ul_map_offset += (nibble_length >> 1);
417 nibble_offset = (nibble_length & 1);
418 /* check harq mode */
419 if(!harq_mode)
420 { /* display the Nep and Nsch Code */
421 if(nibble_offset & 1)
423 proto_tree_add_item(tree, hf_culmap_nep_code_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
424 /* move to next byte */
425 ul_map_offset++;
426 proto_tree_add_item(tree, hf_culmap_nsch_code, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
428 else
430 proto_tree_add_item(tree, hf_culmap_nep_code, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
431 proto_tree_add_item(tree, hf_culmap_nsch_code_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
432 /* move to next byte */
433 ul_map_offset++;
435 length += 2;
437 else if(harq_mode == 1)
438 { /* display the Shortened UIUC and Companded SC */
439 if(nibble_offset & 1)
441 proto_tree_add_item(tree, hf_culmap_shortened_uiuc_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
442 proto_tree_add_item(tree, hf_culmap_companded_sc_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
444 else
446 proto_tree_add_item(tree, hf_culmap_shortened_uiuc, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
447 proto_tree_add_item(tree, hf_culmap_companded_sc, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
449 /* move to next byte */
450 ul_map_offset++;
451 length += 2;
453 /* decode HARQ Control IE */
454 nibble_length = wimax_compact_ulmap_harq_control_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
455 length += nibble_length;
456 break;
457 case COMPACT_UL_MAP_TYPE_BAND_AMC:/* 6.3.2.3.43.7.2 */
458 /* display the UL-MAP type and reserved bit */
459 if(nibble_offset & 1)
461 proto_tree_add_item(tree, hf_culmap_ul_map_type_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
462 /* display the reserved */
463 proto_tree_add_item(tree, hf_culmap_reserved_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
464 /* move to next byte */
465 ul_map_offset++;
466 nibble_offset = 0;
468 else
470 proto_tree_add_item(tree, hf_culmap_ul_map_type, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
471 /* display the reserved */
472 proto_tree_add_item(tree, hf_culmap_reserved, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
473 nibble_offset = 1;
475 length = 1;
476 /* decode RCID IE */
477 nibble_length = wimax_compact_ulmap_rcid_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
478 length += nibble_length;
479 ul_map_offset += (nibble_length >> 1);
480 nibble_offset = (nibble_length & 1);
481 /* check harq mode */
482 if(!harq_mode)
483 { /* display the Nep and Nsch Code */
484 if(nibble_offset & 1)
486 proto_tree_add_item(tree, hf_culmap_nep_code_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
487 /* move to next byte */
488 ul_map_offset++;
489 proto_tree_add_item(tree, hf_culmap_nsch_code, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
491 else
493 proto_tree_add_item(tree, hf_culmap_nep_code, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
494 proto_tree_add_item(tree, hf_culmap_nsch_code_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
495 /* move to next byte */
496 ul_map_offset++;
498 length += 2;
500 else if(harq_mode == 1)
501 { /* display the Shortened UIUC and Companded SC */
502 if(nibble_offset & 1)
504 proto_tree_add_item(tree, hf_culmap_shortened_uiuc_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
505 proto_tree_add_item(tree, hf_culmap_companded_sc_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
507 else
509 proto_tree_add_item(tree, hf_culmap_shortened_uiuc, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
510 proto_tree_add_item(tree, hf_culmap_companded_sc, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
512 /* move to next byte */
513 ul_map_offset++;
514 length += 2;
516 /* get the Nband */
517 if(max_logical_bands)
518 { /* get and display the Nband */
519 nband = tvb_get_uint8(tvb, ul_map_offset);
520 length++;
521 if(nibble_offset & 1)
523 nband = (nband & LSB_NIBBLE_MASK);
524 /* display the Nband */
525 proto_tree_add_item(tree, hf_culmap_num_bands_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
526 /* move to next byte */
527 ul_map_offset++;
528 nibble_offset = 0;
529 if(max_logical_bands == 3)
531 proto_tree_add_item(tree, hf_culmap_band_index, tvb, ul_map_offset, nband, ENC_NA);
532 length += (nband * 2);
533 /* update offset */
534 ul_map_offset += nband;
536 else
538 nibble_offset = (nband & 1);
539 proto_tree_add_item(tree, hf_culmap_band_index, tvb, ul_map_offset, ((nband >> 1) + nibble_offset), ENC_NA);
540 length += nband;
541 /* update offset */
542 ul_map_offset += (nband >> 1);
545 else
547 nband = ((nband & MSB_NIBBLE_MASK) >> 4);
548 /* display the Nband */
549 proto_tree_add_item(tree, hf_culmap_num_bands, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
550 nibble_offset = 1;
551 if(max_logical_bands == 3)
553 proto_tree_add_item(tree, hf_culmap_band_index, tvb, ul_map_offset, (nband + nibble_offset), ENC_NA);
554 length += (nband * 2);
555 /* update offset */
556 ul_map_offset += nband;
558 else
560 proto_tree_add_item(tree, hf_culmap_band_index, tvb, ul_map_offset, ((nband >> 1) + nibble_offset), ENC_NA);
561 length += nband;
562 /* update offset */
563 ul_map_offset += ((nband + nibble_offset) >> 1);
564 if(nband & 1)
565 nibble_offset = 0;
568 band_count = nband;
570 else
572 band_count = 1;
573 /* display the Nb-BITMAP */
574 if(nibble_offset & 1)
576 proto_tree_add_item(tree, hf_culmap_nb_bitmap_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
577 /* move to next byte */
578 ul_map_offset++;
579 nibble_offset = 0;
581 else
583 proto_tree_add_item(tree, hf_culmap_nb_bitmap, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
584 nibble_offset = 1;
586 length++;
588 /* Get the Allocation Mode */
589 byte = tvb_get_uint8(tvb, ul_map_offset);
590 if(nibble_offset & 1)
592 allocation_mode = ((byte & ALLOCATION_MODE_MASK_1) >> 2);
593 proto_tree_add_item(tree, hf_culmap_allocation_mode_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
594 proto_tree_add_item(tree, hf_culmap_allocation_mode_rsvd_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
595 nibble_offset = 0;
596 ul_map_offset++;
598 else
600 allocation_mode = ((byte & ALLOCATION_MODE_MASK) >> 6);
601 proto_tree_add_item(tree, hf_culmap_allocation_mode, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
602 proto_tree_add_item(tree, hf_culmap_allocation_mode_rsvd, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
603 nibble_offset = 1;
605 length++;
606 /* Decode Allocation Mode - need to be done */
607 if(!allocation_mode)
609 if(nibble_offset & 1)
611 proto_tree_add_item(tree, hf_culmap_num_subchannels_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
613 else
615 proto_tree_add_item(tree, hf_culmap_num_subchannels, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
617 ul_map_offset++;
618 length += 2;
620 else if(allocation_mode == 1)
622 for(i=0; i<band_count; i++)
624 if(nibble_offset & 1)
626 proto_tree_add_item(tree, hf_culmap_num_subchannels_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
628 else
630 proto_tree_add_item(tree, hf_culmap_num_subchannels, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
632 ul_map_offset++;
634 length += (band_count * 2);
636 /* decode HARQ Control IE */
637 nibble_length = wimax_compact_ulmap_harq_control_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
638 length += nibble_length;
639 break;
640 case COMPACT_UL_MAP_TYPE_SAFETY:/* 6.3.2.3.43.7.3 */
641 /* display the UL-MAP type and reserved bit */
642 if(nibble_offset & 1)
644 proto_tree_add_item(tree, hf_culmap_ul_map_type_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
645 /* display the reserved */
646 proto_tree_add_item(tree, hf_culmap_reserved_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
647 /* move to next byte */
648 ul_map_offset++;
649 nibble_offset = 0;
651 else
653 proto_tree_add_item(tree, hf_culmap_ul_map_type, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
654 /* display the reserved */
655 proto_tree_add_item(tree, hf_culmap_reserved, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
656 nibble_offset = 1;
658 length = 1;
659 /* decode RCID IE */
660 nibble_length = wimax_compact_ulmap_rcid_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
661 length += nibble_length;
662 ul_map_offset += (nibble_length >> 1);
663 nibble_offset = (nibble_length & 1);
664 /* check harq mode */
665 if(!harq_mode)
666 { /* display the Nep and Nsch Code */
667 if(nibble_offset & 1)
669 proto_tree_add_item(tree, hf_culmap_nep_code_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
670 /* move to next byte */
671 ul_map_offset++;
672 proto_tree_add_item(tree, hf_culmap_nsch_code, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
674 else
676 proto_tree_add_item(tree, hf_culmap_nep_code, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
677 proto_tree_add_item(tree, hf_culmap_nsch_code_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
678 /* move to next byte */
679 ul_map_offset++;
681 length += 2;
683 else if(harq_mode == 1)
684 { /* display the Shortened UIUC and Companded SC */
685 if(nibble_offset & 1)
687 proto_tree_add_item(tree, hf_culmap_shortened_uiuc_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
688 proto_tree_add_item(tree, hf_culmap_companded_sc_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
690 else
692 proto_tree_add_item(tree, hf_culmap_shortened_uiuc, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
693 proto_tree_add_item(tree, hf_culmap_companded_sc, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
695 /* move to next byte */
696 ul_map_offset++;
697 length += 2;
699 /* display BIN offset */
700 if(nibble_offset & 1)
702 proto_tree_add_item(tree, hf_culmap_bin_offset_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
703 /* move to next byte */
704 ul_map_offset++;
706 else
708 proto_tree_add_item(tree, hf_culmap_bin_offset, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
709 /* move to next byte */
710 ul_map_offset++;
712 length += 2;
713 /* decode HARQ Control IE */
714 nibble_length = wimax_compact_ulmap_harq_control_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
715 length += nibble_length;
716 break;
717 case COMPACT_UL_MAP_TYPE_UIUC:/* 6.3.2.3.43.7.4 */
718 /* display the UL-MAP type and reserved bit */
719 if(nibble_offset & 1)
721 proto_tree_add_item(tree, hf_culmap_ul_map_type_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
722 /* display the reserved */
723 proto_tree_add_item(tree, hf_culmap_reserved_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
724 /* move to next byte */
725 ul_map_offset++;
726 /* get the new byte */
727 byte = tvb_get_uint8(tvb, ul_map_offset);
728 /* get the UIUC */
729 uiuc = ((byte & MSB_NIBBLE_MASK) >> 4);
730 /* display the UIUC */
731 proto_tree_add_item(tree, hf_culmap_uiuc, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
733 else
735 /* display the UL-MAP type */
736 proto_tree_add_item(tree, hf_culmap_ul_map_type, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
737 /* display the reserved */
738 proto_tree_add_item(tree, hf_culmap_reserved, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
739 /* get the UIUC */
740 uiuc = (byte & LSB_NIBBLE_MASK);
741 /* display the UIUC */
742 proto_tree_add_item(tree, hf_culmap_uiuc_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
744 length = 2;
745 /* decode RCID IE */
746 nibble_length = wimax_compact_ulmap_rcid_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
747 length += nibble_length;
748 ul_map_offset += (nibble_length >> 1);
749 nibble_offset = (nibble_length & 1);
750 if(uiuc == 15)
751 { /* Extended UIUC dependent IE */
752 nibble_length = wimax_extended_uiuc_dependent_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
753 length += nibble_length;
754 ul_map_offset += (nibble_length >> 1);
755 nibble_offset = (nibble_length & 1);
757 else if(uiuc == 14)
758 { /* CDMA Allocation IE */
759 nibble_length = wimax_cdma_allocation_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
760 length += nibble_length;
761 ul_map_offset += (nibble_length >> 1);
762 nibble_offset = (nibble_length & 1);
764 else if(uiuc == 12)
766 if(nibble_offset & 1)
768 /* display the OFDMA symbol offset */
769 proto_tree_add_item(tree, hf_culmap_uiuc_ofdma_symbol_offset_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
770 ul_map_offset++;
771 /* display the subchannel offset */
772 proto_tree_add_item(tree, hf_culmap_uiuc_subchannel_offset_7_1, tvb, ul_map_offset, 4, ENC_BIG_ENDIAN);
773 /* display the number of OFDMA symbols */
774 proto_tree_add_item(tree, hf_culmap_uiuc_num_of_ofdma_symbols_7_1, tvb, ul_map_offset, 4, ENC_BIG_ENDIAN);
775 /* display the number of subchannels */
776 proto_tree_add_item(tree, hf_culmap_uiuc_num_of_subchannels_7_1, tvb, ul_map_offset, 4, ENC_BIG_ENDIAN);
777 /* display the ranging method */
778 proto_tree_add_item(tree, hf_culmap_uiuc_ranging_method_1, tvb, ul_map_offset, 4, ENC_BIG_ENDIAN);
779 /* display the reserved */
780 proto_tree_add_item(tree, hf_culmap_uiuc_reserved_1, tvb, ul_map_offset, 4, ENC_BIG_ENDIAN);
781 ul_map_offset += 3;
783 else
784 { /* display the OFDMA symbol offset */
785 proto_tree_add_item(tree, hf_culmap_uiuc_ofdma_symbol_offset, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
786 ul_map_offset++;
787 /* display the subchannel offset */
788 proto_tree_add_item(tree, hf_culmap_uiuc_subchannel_offset_7, tvb, ul_map_offset, 3, ENC_BIG_ENDIAN);
789 /* display the number of OFDMA symbols */
790 proto_tree_add_item(tree, hf_culmap_uiuc_num_of_ofdma_symbols_7, tvb, ul_map_offset, 3, ENC_BIG_ENDIAN);
791 /* display the number of subchannels */
792 proto_tree_add_item(tree, hf_culmap_uiuc_num_of_subchannels_7, tvb, ul_map_offset, 3, ENC_BIG_ENDIAN);
793 /* display the ranging method */
794 proto_tree_add_item(tree, hf_culmap_uiuc_ranging_method, tvb, ul_map_offset, 3, ENC_BIG_ENDIAN);
795 /* display the reserved */
796 proto_tree_add_item(tree, hf_culmap_uiuc_reserved, tvb, ul_map_offset, 3, ENC_BIG_ENDIAN);
797 ul_map_offset += 3;
799 length += 8;
801 else
802 { /* display Number of subchannels */
803 if(nibble_offset & 1)
804 proto_tree_add_item(tree, hf_culmap_uiuc_num_of_subchannels_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
805 else
806 proto_tree_add_item(tree, hf_culmap_uiuc_num_of_subchannels, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
807 length += 2;
808 /* display the repetition coding indication and reserved bits */
809 if(nibble_offset & 1)
811 proto_tree_add_item(tree, hf_culmap_uiuc_repetition_coding_indication_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
812 proto_tree_add_item(tree, hf_culmap_uiuc_reserved_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
813 nibble_offset = 0;
815 else
817 proto_tree_add_item(tree, hf_culmap_uiuc_repetition_coding_indication, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
818 proto_tree_add_item(tree, hf_culmap_uiuc_reserved, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
819 nibble_offset = 1;
821 length += 1;
823 /* decode HARQ Control IE */
824 nibble_length = wimax_compact_ulmap_harq_control_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
825 length += nibble_length;
826 break;
827 case COMPACT_UL_MAP_TYPE_HARQ_REGION_IE:/* 6.3.2.3.43.7.5 */
828 if(nibble_offset & 1)
829 { /* display the UL-MAP type */
830 proto_tree_add_item(tree, hf_culmap_ul_map_type_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
831 /* display the HARQ Region Change Indication */
832 proto_tree_add_item(tree, hf_culmap_harq_region_change_indication_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
833 /* get the HARQ Region Change Indication */
834 harq_region_change_indication = (byte & 0x01);
835 /* move to next byte */
836 ul_map_offset++;
837 nibble_offset = 0;
839 else
840 { /* display the UL-MAP type */
841 proto_tree_add_item(tree, hf_culmap_ul_map_type, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
842 /* display the HARQ Region Change Indication */
843 proto_tree_add_item(tree, hf_culmap_harq_region_change_indication, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
844 /* get the HARQ Region Change Indication */
845 harq_region_change_indication = (byte & 0x10);
846 nibble_offset = 1;
848 length = 1;
849 if(harq_region_change_indication == 1)
851 if(nibble_offset & 1)
853 /* display the OFDMA symbol offset */
854 proto_tree_add_item(tree, hf_culmap_uiuc_ofdma_symbol_offset_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
855 ul_map_offset++;
856 /* display the subchannel offset */
857 proto_tree_add_item(tree, hf_culmap_uiuc_subchannel_offset_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
858 ul_map_offset++;
859 /* display the number of OFDMA symbols */
860 proto_tree_add_item(tree, hf_culmap_uiuc_num_of_ofdma_symbols_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
861 ul_map_offset++;
862 /* display the number of subchannels */
863 proto_tree_add_item(tree, hf_culmap_uiuc_num_of_subchannels_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
864 ul_map_offset++;
866 else
867 { /* display the OFDMA symbol offset */
868 proto_tree_add_item(tree, hf_culmap_uiuc_ofdma_symbol_offset, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
869 ul_map_offset++;
870 /* display the subchannel offset */
871 proto_tree_add_item(tree, hf_culmap_uiuc_subchannel_offset, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
872 ul_map_offset++;
873 /* display the number of OFDMA symbols */
874 proto_tree_add_item(tree, hf_culmap_uiuc_num_of_ofdma_symbols, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
875 ul_map_offset++;
876 /* display the number of subchannels */
877 proto_tree_add_item(tree, hf_culmap_uiuc_num_of_subchannels, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
878 ul_map_offset++;
880 length += 8;
882 break;
883 case COMPACT_UL_MAP_TYPE_CQICH_REGION_IE:/* 6.3.2.3.43.7.6 */
884 if(nibble_offset & 1)
885 { /* display the UL-MAP type */
886 proto_tree_add_item(tree, hf_culmap_ul_map_type_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
887 /* display the CQI Region Change Indication */
888 proto_tree_add_item(tree, hf_culmap_cqi_region_change_indication_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
889 /* get the CQI Region Change Indication */
890 cqi_region_change_indication = (byte & 0x01);
891 /* move to next byte */
892 ul_map_offset++;
893 nibble_offset = 0;
895 else
896 { /* display the UL-MAP type */
897 proto_tree_add_item(tree, hf_culmap_ul_map_type, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
898 /* display the CQI Region Change Indication */
899 proto_tree_add_item(tree, hf_culmap_cqi_region_change_indication, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
900 /* get the CQI Region Change Indication */
901 cqi_region_change_indication = (byte & 0x10);
902 nibble_offset = 1;
904 length = 1;
905 if(cqi_region_change_indication == 1)
907 if(nibble_offset & 1)
909 /* display the OFDMA symbol offset */
910 proto_tree_add_item(tree, hf_culmap_uiuc_ofdma_symbol_offset_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
911 ul_map_offset++;
912 /* display the subchannel offset */
913 proto_tree_add_item(tree, hf_culmap_uiuc_subchannel_offset_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
914 ul_map_offset++;
915 /* display the number of OFDMA symbols */
916 proto_tree_add_item(tree, hf_culmap_uiuc_num_of_ofdma_symbols_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
917 ul_map_offset++;
918 /* display the number of subchannels */
919 proto_tree_add_item(tree, hf_culmap_uiuc_num_of_subchannels_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
920 ul_map_offset++;
922 else
923 { /* display the OFDMA symbol offset */
924 proto_tree_add_item(tree, hf_culmap_uiuc_ofdma_symbol_offset, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
925 ul_map_offset++;
926 /* display the subchannel offset */
927 proto_tree_add_item(tree, hf_culmap_uiuc_subchannel_offset, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
928 ul_map_offset++;
929 /* display the number of OFDMA symbols */
930 proto_tree_add_item(tree, hf_culmap_uiuc_num_of_ofdma_symbols, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
931 ul_map_offset++;
932 /* display the number of subchannels */
933 proto_tree_add_item(tree, hf_culmap_uiuc_num_of_subchannels, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
934 ul_map_offset++;
936 length += 8;
938 break;
939 case COMPACT_UL_MAP_TYPE_EXTENSION:/* 6.3.2.3.43.7.7 */
940 /* decode the Compact UL-MAP extension IE */
941 nibble_length = wimax_culmap_extension_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);/*, cqich_indicator);*/
942 length = nibble_length;
943 break;
944 default:/* Reserved Type */
945 /* display the reserved type */
946 proto_tree_add_item(tree, hf_culmap_reserved_type_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
947 length = 1;
948 break;
950 /* Update the nibble_offset and length */
951 return length;
954 /* Compact UL-MAP Reduced CID IE (6.3.2.3.43.3) decoder */
955 static unsigned wimax_compact_ulmap_rcid_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
957 unsigned length = 0;
958 unsigned prefix;
960 #ifdef DEBUG
961 /* update the info column */
962 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "RCID IE");
963 #endif
964 if(nibble_offset & 1)
966 if(cid_type == CID_TYPE_NORMAL)
967 { /* display the normal CID */
968 proto_tree_add_item(tree, hf_rcid_ie_normal_cid_1, tvb, offset, 3, ENC_BIG_ENDIAN);
969 length = 4;
971 else
972 { /* Get the prefix bit */
973 prefix = (tvb_get_uint8(tvb, offset) & 0x08);
974 /* display the prefix */
975 proto_tree_add_item(tree, hf_rcid_ie_prefix_1, tvb, offset, 2, ENC_BIG_ENDIAN);
976 if(prefix)
977 { /* display the CID11 */
978 proto_tree_add_item(tree, hf_rcid_ie_cid11_3, tvb, offset, 2, ENC_BIG_ENDIAN);
979 length = 3;
981 else
983 if(cid_type == CID_TYPE_RCID11)
984 { /* display the CID11 */
985 proto_tree_add_item(tree, hf_rcid_ie_cid11_1, tvb, offset, 2, ENC_BIG_ENDIAN);
986 length = 3;
988 else if(cid_type == CID_TYPE_RCID7)
989 { /* display the normal CID7 */
990 proto_tree_add_item(tree, hf_rcid_ie_cid7_1, tvb, offset, 2, ENC_BIG_ENDIAN);
991 length = 2;
993 else if(cid_type == CID_TYPE_RCID3)
994 { /* display the CID3 */
995 proto_tree_add_item(tree, hf_rcid_ie_cid3_1, tvb, offset, 2, ENC_BIG_ENDIAN);
996 length = 1;
1001 else
1003 if(cid_type == CID_TYPE_NORMAL)
1004 { /* display the normal CID */
1005 proto_tree_add_item(tree, hf_rcid_ie_normal_cid, tvb, offset, 2, ENC_BIG_ENDIAN);
1006 length = 4;
1008 else
1009 { /* Get the prefix bit */
1010 prefix = (tvb_get_uint8(tvb, offset) & 0x08);
1011 /* display the prefix */
1012 proto_tree_add_item(tree, hf_rcid_ie_prefix, tvb, offset, 2, ENC_BIG_ENDIAN);
1013 if(prefix || (cid_type == CID_TYPE_RCID11))
1014 { /* display the CID11 */
1015 proto_tree_add_item(tree, hf_rcid_ie_cid11_2, tvb, offset, 2, ENC_BIG_ENDIAN);
1016 length = 3;
1018 else
1020 if(cid_type == CID_TYPE_RCID11)
1021 { /* display the CID11 */
1022 proto_tree_add_item(tree, hf_rcid_ie_cid11, tvb, offset, 2, ENC_BIG_ENDIAN);
1023 length = 3;
1025 else if(cid_type == CID_TYPE_RCID7)
1026 { /* display the CID7 */
1027 proto_tree_add_item(tree, hf_rcid_ie_cid7, tvb, offset, 2, ENC_BIG_ENDIAN);
1028 length = 2;
1030 else if(cid_type == CID_TYPE_RCID3)
1031 { /* display the CID3 */
1032 proto_tree_add_item(tree, hf_rcid_ie_cid3, tvb, offset, 2, ENC_BIG_ENDIAN);
1033 length = 1;
1038 /* return the IE length in nibbles */
1039 return length;
1042 /* Compact UL-MAP HARQ Control IE (6.3.2.3.43.4) decoder */
1043 static unsigned wimax_compact_ulmap_harq_control_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
1045 unsigned byte, prefix, length = 0;
1047 #ifdef DEBUG
1048 /* update the info column */
1049 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "HARQ Control IE");
1050 #endif
1051 /* Get the first byte */
1052 byte = tvb_get_uint8(tvb, offset);
1053 if(nibble_offset & 1)
1054 { /* Get the prefix bit */
1055 prefix = (byte & 0x08);
1056 /* display the prefix */
1057 proto_tree_add_item(tree, hf_harq_control_ie_prefix_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1058 if(prefix)
1059 { /* display the ai_sn */
1060 proto_tree_add_item(tree, hf_harq_control_ie_ai_sn_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1061 /* display the spid */
1062 proto_tree_add_item(tree, hf_harq_control_ie_spid_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1063 /* display the acid */
1064 proto_tree_add_item(tree, hf_harq_control_ie_acid_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1065 length = 2;
1067 else
1068 { /* display the reserved bits */
1069 proto_tree_add_item(tree, hf_harq_control_ie_reserved_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1070 length = 1;
1073 else
1074 { /* Get the prefix bit */
1075 prefix = (byte & 0x80);
1076 /* display the prefix */
1077 proto_tree_add_item(tree, hf_harq_control_ie_prefix, tvb, offset, 1, ENC_BIG_ENDIAN);
1078 if(prefix)
1079 { /* display the ai_sn */
1080 proto_tree_add_item(tree, hf_harq_control_ie_ai_sn, tvb, offset, 1, ENC_BIG_ENDIAN);
1081 /* display the spid */
1082 proto_tree_add_item(tree, hf_harq_control_ie_spid, tvb, offset, 1, ENC_BIG_ENDIAN);
1083 /* display the acid */
1084 proto_tree_add_item(tree, hf_harq_control_ie_acid, tvb, offset, 1, ENC_BIG_ENDIAN);
1085 length = 2;
1087 else
1088 { /* display the reserved bits */
1089 proto_tree_add_item(tree, hf_harq_control_ie_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
1090 length = 1;
1093 /* return the IE length in nibbles */
1094 return length;
1097 /* UL-MAP Extension IE sub-types */
1098 #define HARQ_MODE_SWITCH 0
1099 #define EXTENSION_TYPE_SHIFT 13
1100 #define EXTENSION_TYPE_SHIFT_1 9
1101 #define EXTENSION_SUBTYPE_SHIFT 8
1102 #define EXTENSION_SUBTYPE_SHIFT_1 4
1103 #define EXTENSION_LENGTH_SHIFT 4
1105 /* Compact UL-MAP Extension IE (6.3.2.3.43.7.7) decoder */
1106 static unsigned wimax_culmap_extension_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
1108 unsigned tvb_value, ul_map_type, sub_type, length;
1110 #ifdef DEBUG
1111 /* update the info column */
1112 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "UL-MAP Extension IE");
1113 #endif
1114 /* Get the first 16-bit word */
1115 tvb_value = tvb_get_ntohs(tvb, offset);
1116 if(nibble_offset & 1)
1117 { /* Get the ul-map type */
1118 ul_map_type = ((tvb_value & EXTENSION_TYPE_MASK_1) >> EXTENSION_TYPE_SHIFT_1);
1119 if(ul_map_type != COMPACT_UL_MAP_TYPE_EXTENSION)
1120 return 0;
1121 /* Get the sub-type */
1122 sub_type = ((tvb_value & EXTENSION_SUBTYPE_MASK_1) >> EXTENSION_SUBTYPE_SHIFT_1);
1123 /* Get the IE length */
1124 length = (tvb_value & EXTENSION_LENGTH_MASK_1);
1125 /* display the UL-MAP type */
1126 proto_tree_add_item(tree, hf_culmap_extension_type_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1127 /* display the UL-MAP extension subtype */
1128 proto_tree_add_item(tree, hf_culmap_extension_subtype_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1129 /* display the IE length */
1130 proto_tree_add_item(tree, hf_culmap_extension_length_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1131 offset += 2;
1132 switch (sub_type)
1134 case HARQ_MODE_SWITCH:
1135 /* display the HARQ mode */
1136 proto_tree_add_item(tree, hf_culmap_extension_harq_mode, tvb, offset, 1, ENC_BIG_ENDIAN);
1137 /* Get the next byte */
1138 tvb_value = tvb_get_uint8(tvb, offset);
1139 /* get the HARQ mode */
1140 harq_mode = ((tvb_value & MSB_NIBBLE_MASK) >> 4);
1141 break;
1142 default:
1143 /* display the unknown sub-type in HEX */
1144 proto_tree_add_item(tree, hf_culmap_extension_unknown_sub_type_1, tvb, offset, (length - 2), ENC_NA);
1145 break;
1148 else
1149 { /* Get the UL-MAp type */
1150 ul_map_type = ((tvb_value & EXTENSION_TYPE_MASK) >> EXTENSION_TYPE_SHIFT);
1151 if(ul_map_type != COMPACT_UL_MAP_TYPE_EXTENSION)
1152 return 0;
1153 /* Get the sub-type */
1154 sub_type = ((tvb_value & EXTENSION_SUBTYPE_MASK) >> EXTENSION_SUBTYPE_SHIFT);
1155 /* Get the IE length */
1156 length = ((tvb_value & EXTENSION_LENGTH_MASK) >> EXTENSION_LENGTH_SHIFT);
1157 /* display the UL-MAP type */
1158 proto_tree_add_item(tree, hf_culmap_extension_type, tvb, offset, 2, ENC_BIG_ENDIAN);
1159 /* display the UL-MAP extension subtype */
1160 proto_tree_add_item(tree, hf_culmap_extension_subtype, tvb, offset, 2, ENC_BIG_ENDIAN);
1161 /* display the IE length */
1162 proto_tree_add_item(tree, hf_culmap_extension_length, tvb, offset, 2, ENC_BIG_ENDIAN);
1163 switch (sub_type)
1165 case HARQ_MODE_SWITCH:
1166 /* display the HARQ mode */
1167 proto_tree_add_item(tree, hf_culmap_extension_harq_mode_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1168 /* get the HARQ mode */
1169 harq_mode = (tvb_value & LSB_NIBBLE_MASK);
1170 break;
1171 default:
1172 /* display the unknown sub-type in HEX */
1173 proto_tree_add_item(tree, hf_culmap_extension_unknown_sub_type, tvb, (offset + 1), (length - 1), ENC_NA);
1174 break;
1177 /* return the IE length in nibbles */
1178 return (length * 2);
1181 /* 8.4.5.4.3 (table 290) */
1182 unsigned wimax_cdma_allocation_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
1184 #ifdef DEBUG
1185 /* update the info column */
1186 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "CDMA Allocation IE");
1187 #endif
1188 if(nibble_offset & 1)
1189 { /* display the Duration */
1190 proto_tree_add_item(tree, hf_cdma_allocation_duration_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1191 /* display the UIUC */
1192 proto_tree_add_item(tree, hf_cdma_allocation_uiuc_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1193 /* display the Repetition Coding Indication */
1194 proto_tree_add_item(tree, hf_cdma_allocation_repetition_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1195 /* display the frame number index */
1196 proto_tree_add_item(tree, hf_cdma_allocation_frame_number_index_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1197 /* display the Ranging Code */
1198 proto_tree_add_item(tree, hf_cdma_allocation_ranging_code_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1199 /* display the Ranging Symbol */
1200 proto_tree_add_item(tree, hf_cdma_allocation_ranging_symbol_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1201 /* display the Ranging Subchannel */
1202 proto_tree_add_item(tree, hf_cdma_allocation_ranging_subchannel_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1203 /* display the BW Request Mandatory */
1204 proto_tree_add_item(tree, hf_cdma_allocation_bw_req_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1206 else
1207 { /* display the Duration */
1208 proto_tree_add_item(tree, hf_cdma_allocation_duration, tvb, offset, 2, ENC_BIG_ENDIAN);
1209 /* display the UIUC */
1210 proto_tree_add_item(tree, hf_cdma_allocation_uiuc, tvb, offset, 2, ENC_BIG_ENDIAN);
1211 /* display the Repetition Coding Indication */
1212 proto_tree_add_item(tree, hf_cdma_allocation_repetition, tvb, offset, 2, ENC_BIG_ENDIAN);
1213 /* display the frame number index */
1214 proto_tree_add_item(tree, hf_cdma_allocation_frame_number_index, tvb, offset, 2, ENC_BIG_ENDIAN);
1215 /* display the Ranging Code */
1216 proto_tree_add_item(tree, hf_cdma_allocation_ranging_code, tvb, offset, 1, ENC_BIG_ENDIAN);
1217 /* display the Ranging Symbol */
1218 proto_tree_add_item(tree, hf_cdma_allocation_ranging_symbol, tvb, offset, 1, ENC_BIG_ENDIAN);
1219 /* display the Ranging Subchannel */
1220 proto_tree_add_item(tree, hf_cdma_allocation_ranging_subchannel, tvb, offset, 1, ENC_BIG_ENDIAN);
1221 /* display the BW Request Mandatory */
1222 proto_tree_add_item(tree, hf_cdma_allocation_bw_req, tvb, offset, 1, ENC_BIG_ENDIAN);
1224 /* return the IE length in nibbles */
1225 return 8;
1228 /* Extended UIUCs (table 290a) */
1229 #define POWER_CONTROL_IE 0
1230 #define MINI_SUBCHANNEL_ALLOCATION_IE 1
1231 #define AAS_UL_IE 2
1232 #define CQICH_ALLOC_IE 3
1233 #define UL_ZONE_IE 4
1234 #define PHYMOD_UL_IE 5
1235 #define MIMO_UL_BASIC_IE 6
1236 #define UL_MAP_FAST_TRACKING_IE 7
1237 #define UL_PUSC_BURST_ALLOCATION_IN_OTHER_SEGMENT_IE 8
1238 #define FAST_RANGING_IE 9
1239 #define UL_ALLOCATION_START_IE 10
1241 /* 8.4.5.4.4.1 (table 290b) */
1242 unsigned wimax_extended_uiuc_dependent_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
1244 unsigned ext_uiuc, length, m, i;
1245 uint8_t byte;
1247 #ifdef DEBUG
1248 /* update the info column */
1249 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Extended UIUC IE");
1250 #endif
1252 /* get the first byte */
1253 byte = tvb_get_uint8(tvb, offset);
1254 if(nibble_offset & 1)
1255 { /* get the extended UIUC */
1256 ext_uiuc = (byte & LSB_NIBBLE_MASK);
1257 /* display extended UIUC */
1258 proto_tree_add_item(tree, hf_extended_uiuc_ie_uiuc_1, tvb, offset, 1, ENC_BIG_ENDIAN);
1259 /* move to next byte */
1260 offset++;
1261 /* get the 2nd byte */
1262 byte = tvb_get_uint8(tvb, offset);
1263 /* get the length */
1264 length = ((byte & MSB_NIBBLE_MASK) >> 4);
1265 /* display extended UIUC length */
1266 proto_tree_add_item(tree, hf_extended_uiuc_ie_length_1, tvb, offset, 1, ENC_BIG_ENDIAN);
1268 else
1269 { /* get the extended UIUC */
1270 ext_uiuc = ((byte & MSB_NIBBLE_MASK) >> 4);
1271 /* get the length */
1272 length = (byte & LSB_NIBBLE_MASK);
1273 /* display extended UIUC */
1274 proto_tree_add_item(tree, hf_extended_uiuc_ie_uiuc, tvb, offset, 1, ENC_BIG_ENDIAN);
1275 /* display extended UIUC length */
1276 proto_tree_add_item(tree, hf_extended_uiuc_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
1277 /* move to next byte */
1278 offset++;
1280 /* 8.4.5.4.4.1 (table 290b) */
1281 switch (ext_uiuc)
1283 case POWER_CONTROL_IE:
1284 /* 8.4.5.4.5 Power Control IE */
1285 if(nibble_offset & 1)
1286 { /* display power control value */
1287 proto_tree_add_item(tree, hf_extended_uiuc_ie_power_control_24, tvb, offset, 3, ENC_BIG_ENDIAN);
1288 /* display power measurement frame value */
1289 proto_tree_add_item(tree, hf_extended_uiuc_ie_power_measurement_frame_24, tvb, offset, 3, ENC_BIG_ENDIAN);
1291 else
1292 { /* display power control value */
1293 proto_tree_add_item(tree, hf_extended_uiuc_ie_power_control, tvb, offset, 1, ENC_BIG_ENDIAN);
1294 /* display power measurement frame value */
1295 proto_tree_add_item(tree, hf_extended_uiuc_ie_power_measurement_frame, tvb, (offset + 1), 1, ENC_BIG_ENDIAN);
1297 break;
1298 case MINI_SUBCHANNEL_ALLOCATION_IE:
1299 /* 8.4.5.4.8 Mini Subchannel Allocation IE */
1300 /* set the M value */
1301 switch (length)
1303 case 15:
1304 m = 6;
1305 break;
1306 case 9:
1307 m = 3;
1308 break;
1309 case 7:
1310 default:
1311 m = 2;
1312 break;
1314 if(nibble_offset & 1)
1316 /* display MINI Subchannel Allocation CType value */
1317 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_ctype_16, tvb, offset, 2, ENC_BIG_ENDIAN);
1318 /* display MINI Subchannel Allocation Duration value */
1319 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_duration_16, tvb, offset, 2, ENC_BIG_ENDIAN);
1321 else
1322 { /* display MINI Subchannel Allocation CType value */
1323 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_ctype, tvb, offset, 1, ENC_BIG_ENDIAN);
1324 /* display MINI Subchannel Allocation Duration value */
1325 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_duration, tvb, offset, 1, ENC_BIG_ENDIAN);
1327 offset++;
1328 /* decode and display CIDs, UIUCs, and Repetitions */
1329 for(i=0; i<m; i+=2)
1331 if(nibble_offset & 1)
1333 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_cid_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1334 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1335 offset += 2;
1336 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1337 if(i < (m-2))
1339 offset += 3;
1340 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_cid_3, tvb, offset, 4, ENC_BIG_ENDIAN);
1341 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_3, tvb, offset, 4, ENC_BIG_ENDIAN);
1342 offset += 2;
1343 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_3, tvb, offset, 4, ENC_BIG_ENDIAN);
1344 offset += 3;
1346 else if(m == 3)
1348 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_padding_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1351 else
1353 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_cid, tvb, offset, 3, ENC_BIG_ENDIAN);
1354 offset += 2;
1355 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc, tvb, offset, 3, ENC_BIG_ENDIAN);
1356 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_repetition, tvb, offset, 3, ENC_BIG_ENDIAN);
1357 offset += 3;
1358 if(i < (m-2))
1360 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_cid_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1361 offset += 2;
1362 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1363 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1364 offset += 4;
1366 else if(m == 3)
1368 proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_padding, tvb, offset, 1, ENC_BIG_ENDIAN);
1372 break;
1373 case AAS_UL_IE:
1374 /* 8.4.5.4.6 AAS UL IE */
1375 if(nibble_offset & 1)
1377 proto_tree_add_item(tree, hf_extended_uiuc_ie_aas_ul, tvb, offset, (length + 1), ENC_NA);
1379 else
1381 proto_tree_add_item(tree, hf_extended_uiuc_ie_aas_ul, tvb, offset, length, ENC_NA);
1383 break;
1384 case CQICH_ALLOC_IE:
1385 /* 8.4.5.4.12 CQICH_ALLOC_IE */
1386 if(nibble_offset & 1)
1388 proto_tree_add_item(tree, hf_extended_uiuc_ie_cqich_alloc, tvb, offset, (length + 1), ENC_NA);
1390 else
1392 proto_tree_add_item(tree, hf_extended_uiuc_ie_cqich_alloc, tvb, offset, length, ENC_NA);
1394 break;
1395 case UL_ZONE_IE:
1396 /* 8.4.5.4.7 UL Zone Switch IE */
1397 if(nibble_offset & 1)
1399 proto_tree_add_item(tree, hf_extended_uiuc_ie_ul_zone, tvb, offset, (length + 1), ENC_NA);
1401 else
1403 proto_tree_add_item(tree, hf_extended_uiuc_ie_ul_zone, tvb, offset, length, ENC_NA);
1405 break;
1406 case PHYMOD_UL_IE:
1407 /* 8.4.5.4.14 PHYMOD_UL_IE */
1408 if(nibble_offset & 1)
1410 proto_tree_add_item(tree, hf_extended_uiuc_ie_phymod_ul, tvb, offset, (length + 1), ENC_NA);
1412 else
1414 proto_tree_add_item(tree, hf_extended_uiuc_ie_phymod_ul, tvb, offset, length, ENC_NA);
1416 break;
1417 case MIMO_UL_BASIC_IE:
1418 /* 8.4.5.4.11 MIMO_UL_BASIC_IE */
1419 if(nibble_offset & 1)
1421 proto_tree_add_item(tree, hf_extended_uiuc_ie_mimo_ul_basic, tvb, offset, (length + 1), ENC_NA);
1423 else
1425 proto_tree_add_item(tree, hf_extended_uiuc_ie_mimo_ul_basic, tvb, offset, length, ENC_NA);
1427 break;
1428 case UL_MAP_FAST_TRACKING_IE:
1429 /* 8.4.5.4.22 UL_MAP_FAST_TRACKING_IE */
1430 if(nibble_offset & 1)
1432 proto_tree_add_item(tree, hf_extended_uiuc_ie_fast_tracking, tvb, offset, (length + 1), ENC_NA);
1434 else
1436 proto_tree_add_item(tree, hf_extended_uiuc_ie_fast_tracking, tvb, offset, length, ENC_NA);
1438 break;
1439 case UL_PUSC_BURST_ALLOCATION_IN_OTHER_SEGMENT_IE:
1440 /* 8.4.5.4.17 UL PUSC Burst Allocation in Other Segment IE */
1441 if(nibble_offset & 1)
1443 proto_tree_add_item(tree, hf_extended_uiuc_ie_ul_pusc_burst_allocation, tvb, offset, (length + 1), ENC_NA);
1445 else
1447 proto_tree_add_item(tree, hf_extended_uiuc_ie_ul_pusc_burst_allocation, tvb, offset, length, ENC_NA);
1449 break;
1450 case FAST_RANGING_IE:
1451 /* 8.4.5.4.21 FAST_RANGING_IE */
1452 if(nibble_offset & 1)
1454 proto_tree_add_item(tree, hf_extended_uiuc_ie_fast_ranging, tvb, offset, (length + 1), ENC_NA);
1456 else
1458 proto_tree_add_item(tree, hf_extended_uiuc_ie_fast_ranging, tvb, offset, length, ENC_NA);
1460 break;
1461 case UL_ALLOCATION_START_IE:
1462 /* 8.4.5.4.15`UL_ALLOCATION_START_IE */
1463 if(nibble_offset & 1)
1465 proto_tree_add_item(tree, hf_extended_uiuc_ie_ul_allocation_start, tvb, offset, (length + 1), ENC_NA);
1467 else
1469 proto_tree_add_item(tree, hf_extended_uiuc_ie_ul_allocation_start, tvb, offset, length, ENC_NA);
1471 break;
1472 default:
1473 if(nibble_offset & 1)
1475 proto_tree_add_item(tree, hf_extended_uiuc_ie_unknown_uiuc, tvb, offset, (length + 1), ENC_NA);
1477 else
1479 proto_tree_add_item(tree, hf_extended_uiuc_ie_unknown_uiuc, tvb, offset, length, ENC_NA);
1481 break;
1483 return ((length + 1) * 2 ); /* length in nibbles */
1486 /* Register Wimax Compact UL-MAP IE Protocol */
1487 void wimax_proto_register_wimax_compact_ulmap_ie(void)
1489 /* Compact UL-MAP IE display */
1490 static hf_register_info hf_compact_ulmap[] =
1493 &hf_culmap_ul_map_type,
1494 {"UL-MAP Type", "wmx.compact_ulmap.ul_map_type", FT_UINT8, BASE_DEC, NULL, UL_MAP_TYPE_MASK, NULL, HFILL}
1497 &hf_culmap_ul_map_type_1,
1498 {"UL-MAP Type", "wmx.compact_ulmap.ul_map_type", FT_UINT8, BASE_DEC, NULL, UL_MAP_TYPE_MASK_1, NULL, HFILL}
1501 &hf_culmap_reserved,
1502 {"Reserved", "wmx.compact_ulmap.reserved", FT_UINT8, BASE_HEX, NULL, UL_MAP_RESERVED_MASK, NULL, HFILL}
1505 &hf_culmap_reserved_1,
1506 {"Reserved", "wmx.compact_ulmap.reserved", FT_UINT8, BASE_HEX, NULL, UL_MAP_RESERVED_MASK_1, NULL, HFILL}
1509 &hf_culmap_nep_code,
1510 {"Nep Code", "wmx.compact_ulmap.nep_code", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
1513 &hf_culmap_nep_code_1,
1514 {"Nep Code", "wmx.compact_ulmap.nep_code", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
1517 &hf_culmap_nsch_code,
1518 {"Nsch Code", "wmx.compact_ulmap.nsch_code", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
1521 &hf_culmap_nsch_code_1,
1522 {"Nsch Code", "wmx.compact_ulmap.nsch_code", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
1525 &hf_culmap_shortened_uiuc,
1526 {"Shortened UIUC", "wmx.compact_ulmap.shortened_uiuc", FT_UINT8, BASE_HEX, NULL, SHORTENED_UIUC_MASK, NULL, HFILL}
1529 &hf_culmap_companded_sc,
1530 {"Companded SC", "wmx.compact_ulmap.companded_sc", FT_UINT8, BASE_HEX, NULL, COMPANDED_SC_MASK, NULL, HFILL}
1533 &hf_culmap_shortened_uiuc_1,
1534 {"Shortened UIUC", "wmx.compact_ulmap.shortened_uiuc", FT_UINT16, BASE_HEX, NULL, SHORTENED_UIUC_MASK_1, NULL, HFILL}
1537 &hf_culmap_companded_sc_1,
1538 {"Companded SC", "wmx.compact_ulmap.companded_sc", FT_UINT16, BASE_HEX, NULL, COMPANDED_SC_MASK_1, NULL, HFILL}
1541 &hf_culmap_num_bands,
1542 {"Number Of Bands", "wmx.compact_ulmap.num_bands", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
1545 &hf_culmap_num_bands_1,
1546 {"Number Of Bands", "wmx.compact_ulmap.num_bands", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
1549 &hf_culmap_band_index,
1550 {"Band Index", "wmx.compact_ulmap.band_index", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
1553 &hf_culmap_nb_bitmap,
1554 {"Number Of Bits For Band BITMAP", "wmx.compact_ulmap.nb_bitmap", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
1557 &hf_culmap_nb_bitmap_1,
1558 {"Number Of Bits For Band BITMAP", "wmx.compact_ulmap.nb_bitmap", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
1561 &hf_culmap_allocation_mode,
1562 {"Allocation Mode", "wmx.compact_ulmap.allocation_mode", FT_UINT8, BASE_DEC, VALS(vals_allocation_modes), ALLOCATION_MODE_MASK, NULL, HFILL}
1565 &hf_culmap_allocation_mode_1,
1566 {"Allocation Mode", "wmx.compact_ulmap.allocation_mode", FT_UINT8, BASE_DEC, VALS(vals_allocation_modes), ALLOCATION_MODE_MASK_1, NULL, HFILL}
1569 &hf_culmap_allocation_mode_rsvd,
1570 {"Reserved", "wmx.compact_ulmap.allocation_mode_rsvd", FT_UINT8, BASE_DEC, NULL, 0x30, NULL, HFILL}
1573 &hf_culmap_allocation_mode_rsvd_1,
1574 {"Reserved", "wmx.compact_ulmap.allocation_mode_rsvd", FT_UINT8, BASE_DEC, NULL, 0x03, NULL, HFILL}
1577 &hf_culmap_num_subchannels,
1578 {"Number Of Subchannels", "wmx.compact_ulmap.num_subchannels", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
1581 &hf_culmap_num_subchannels_1,
1582 {"Number Of Subchannels", "wmx.compact_ulmap.num_subchannels", FT_UINT16, BASE_DEC, NULL, MIDDLE_BYTE_MASK, NULL, HFILL}
1585 &hf_culmap_bin_offset,
1586 {"BIN Offset", "wmx.compact_ulmap.bin_offset", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
1589 &hf_culmap_bin_offset_1,
1590 {"BIN Offset", "wmx.compact_ulmap.bin_offset", FT_UINT16, BASE_HEX, NULL, MIDDLE_BYTE_MASK, NULL, HFILL}
1593 &hf_culmap_uiuc,
1594 {"UIUC", "wmx.compact_ulmap.uiuc", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
1597 &hf_culmap_uiuc_1,
1598 {"UIUC", "wmx.compact_ulmap.uiuc", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
1601 &hf_culmap_uiuc_ofdma_symbol_offset,
1602 {"OFDMA Symbol Offset", "wmx.compact_ulmap.uiuc_ofdma_symbol_offset", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
1605 &hf_culmap_uiuc_ofdma_symbol_offset_1,
1606 {"OFDMA Symbol Offset", "wmx.compact_ulmap.uiuc_ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, MIDDLE_BYTE_MASK, NULL, HFILL}
1609 &hf_culmap_uiuc_subchannel_offset_7,
1610 {"Subchannel Offset", "wmx.compact_ulmap.uiuc_subchannel_offset", FT_UINT24, BASE_DEC, NULL, 0xFE0000, NULL, HFILL}
1613 &hf_culmap_uiuc_num_of_ofdma_symbols_7,
1614 {"Number Of OFDMA Symbols", "wmx.compact_ulmap.uiuc_num_of_ofdma_symbols", FT_UINT24, BASE_DEC, NULL, 0x01FC00, NULL, HFILL}
1617 &hf_culmap_uiuc_num_of_subchannels_7,
1618 {"Number Of Subchannels", "wmx.compact_ulmap.uiuc_num_of_subchannels", FT_UINT24, BASE_DEC, NULL, 0x0003F8, NULL, HFILL}
1621 &hf_culmap_uiuc_ranging_method,
1622 {"Ranging Method", "wmx.compact_ulmap.uiuc_ranging_method", FT_UINT24, BASE_DEC, NULL, 0x000006, NULL, HFILL}
1625 &hf_culmap_uiuc_reserved,
1626 {"Reserved", "wmx.compact_ulmap.uiuc_reserved", FT_UINT24, BASE_HEX, NULL, 0x000001, NULL, HFILL}
1629 &hf_culmap_uiuc_subchannel_offset_7_1,
1630 {"Subchannel Offset", "wmx.compact_ulmap.uiuc_subchannel_offset", FT_UINT32, BASE_DEC, NULL, 0x00FE0000, NULL, HFILL}
1633 &hf_culmap_uiuc_num_of_ofdma_symbols_7_1,
1634 {"Number Of OFDMA Symbols", "wmx.compact_ulmap.uiuc_num_of_ofdma_symbols", FT_UINT32, BASE_DEC, NULL, 0x0001FC00, NULL, HFILL}
1637 &hf_culmap_uiuc_num_of_subchannels_7_1,
1638 {"Number Of Subchannels", "wmx.compact_ulmap.uiuc_num_of_subchannels", FT_UINT32, BASE_DEC, NULL, 0x000003F80, NULL, HFILL}
1641 &hf_culmap_uiuc_ranging_method_1,
1642 {"Ranging Method", "wmx.compact_ulmap.uiuc_ranging_method", FT_UINT32, BASE_DEC, NULL, 0x00000006, NULL, HFILL}
1645 &hf_culmap_uiuc_reserved_1,
1646 {"Reserved", "wmx.compact_ulmap.uiuc_reserved", FT_UINT32, BASE_HEX, NULL, 0x00000001, NULL, HFILL}
1649 &hf_culmap_uiuc_repetition_coding_indication,
1650 {"Repetition Coding Indication", "wmx.compact_ulmap.uiuc_repetition_coding_indication", FT_UINT8, BASE_DEC, VALS(vals_repetitions), ALLOCATION_MODE_MASK, NULL, HFILL}
1653 &hf_culmap_uiuc_repetition_coding_indication_1,
1654 {"Repetition Coding Indication", "wmx.compact_ulmap.uiuc_repetition_coding_indication", FT_UINT8, BASE_DEC, VALS(vals_repetitions), ALLOCATION_MODE_MASK_1, NULL, HFILL}
1656 #if 0
1658 &hf_culmap_uiuc_reserved1,
1659 {"Reserved", "wmx.compact_ulmap.uiuc_reserved1", FT_UINT8, BASE_HEX, NULL, 0x30, NULL, HFILL}
1661 #endif
1662 #if 0
1664 &hf_culmap_uiuc_reserved11_1,
1665 {"Reserved", "wmx.compact_ulmap.uiuc_reserved1", FT_UINT8, BASE_HEX, NULL, 0x03, NULL, HFILL}
1667 #endif
1670 &hf_culmap_uiuc_subchannel_offset,
1671 {"Subchannel Offset", "wmx.compact_ulmap.uiuc_subchannel_offset", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
1674 &hf_culmap_uiuc_subchannel_offset_1,
1675 {"Subchannel Offset", "wmx.compact_ulmap.uiuc_subchannel_offset", FT_UINT16, BASE_DEC, NULL, MIDDLE_BYTE_MASK, NULL, HFILL}
1678 &hf_culmap_uiuc_num_of_ofdma_symbols,
1679 {"Number Of OFDMA Symbols", "wmx.compact_ulmap.uiuc_num_of_ofdma_symbols", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
1682 &hf_culmap_uiuc_num_of_ofdma_symbols_1,
1683 {"Number Of OFDMA Symbols", "wmx.compact_ulmap.uiuc_num_of_ofdma_symbols", FT_UINT16, BASE_DEC, NULL, MIDDLE_BYTE_MASK, NULL, HFILL}
1686 &hf_culmap_uiuc_num_of_subchannels,
1687 {"Number Of Subchannels", "wmx.compact_ulmap.uiuc_num_of_subchannels", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
1690 &hf_culmap_uiuc_num_of_subchannels_1,
1691 {"Number Of Subchannels", "wmx.compact_ulmap.uiuc_num_of_subchannels", FT_UINT16, BASE_DEC, NULL, MIDDLE_BYTE_MASK, NULL, HFILL}
1694 &hf_culmap_harq_region_change_indication,
1695 {"HARQ Region Change Indication", "wmx.compact_ulmap.harq_region_change_indication", FT_BOOLEAN, 8, TFS(&tfs_region_change), 0x10, NULL, HFILL}
1698 &hf_culmap_harq_region_change_indication_1,
1699 {"HARQ Region Change Indication", "wmx.compact_ulmap.harq_region_change_indication", FT_BOOLEAN, 8, TFS(&tfs_region_change), 0x01, NULL, HFILL}
1702 &hf_culmap_cqi_region_change_indication,
1703 {"CQI Region Change Indication", "wmx.compact_ulmap.cqi_region_change_indication", FT_BOOLEAN, 8, TFS(&tfs_region_change), 0x10, NULL, HFILL}
1706 &hf_culmap_cqi_region_change_indication_1,
1707 {"CQI Region Change Indication", "wmx.compact_ulmap.cqi_region_change_indication", FT_BOOLEAN, 8, TFS(&tfs_region_change), 0x01, NULL, HFILL}
1709 #if 0
1711 &hf_culmap_reserved_type,
1712 {"UL-MAP Reserved Type", "wmx.compact_ulmap.reserved_type", FT_UINT8, BASE_DEC, NULL, UL_MAP_TYPE_MASK, NULL, HFILL}
1714 #endif
1716 &hf_culmap_reserved_type_1,
1717 {"UL-MAP Reserved Type", "wmx.compact_ulmap.reserved_type", FT_UINT8, BASE_DEC, NULL, UL_MAP_TYPE_MASK_1, NULL, HFILL}
1721 /* HARQ MAP Reduced CID IE display */
1722 static hf_register_info hf_rcid[] =
1725 &hf_rcid_ie_normal_cid,
1726 {"Normal CID", "wmx.harq_map.rcid_ie.normal_cid", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
1729 &hf_rcid_ie_normal_cid_1,
1730 {"Normal CID", "wmx.harq_map.rcid_ie.normal_cid", FT_UINT24, BASE_HEX, NULL, WIMAX_RCID_IE_NORMAL_CID_MASK_1, NULL, HFILL}
1733 &hf_rcid_ie_prefix,
1734 {"Prefix", "wmx.harq_map.rcid_ie.prefix", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_PREFIX_MASK, NULL, HFILL}
1737 &hf_rcid_ie_prefix_1,
1738 {"Prefix", "wmx.harq_map.rcid_ie.prefix", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_PREFIX_MASK_1, NULL, HFILL}
1741 &hf_rcid_ie_cid3,
1742 {"3 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid3", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID3_MASK, NULL, HFILL}
1745 &hf_rcid_ie_cid3_1,
1746 {"3 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid3", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID3_MASK_1, NULL, HFILL}
1749 &hf_rcid_ie_cid7,
1750 {"7 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid7", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID7_MASK, NULL, HFILL}
1753 &hf_rcid_ie_cid7_1,
1754 {"7 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid7", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID7_MASK_1, NULL, HFILL}
1757 &hf_rcid_ie_cid11,
1758 {"11 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid11", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID11_MASK, NULL, HFILL}
1761 &hf_rcid_ie_cid11_1,
1762 {"11 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid11", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID11_MASK_1, NULL, HFILL}
1765 &hf_rcid_ie_cid11_2,
1766 {"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}
1769 &hf_rcid_ie_cid11_3,
1770 {"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}
1774 /* HARQ MAP HARQ Control IE display */
1775 static hf_register_info hf_harq_control[] =
1778 &hf_harq_control_ie_prefix,
1779 {"Prefix", "wmx.harq_map.harq_control_ie.prefix", FT_BOOLEAN, 8, TFS(&tfs_prefix), WIMAX_HARQ_CONTROL_IE_PREFIX_MASK, NULL, HFILL}
1782 &hf_harq_control_ie_ai_sn,
1783 {"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}
1786 &hf_harq_control_ie_spid,
1787 {"Subpacket ID (SPID)", "wmx.harq_map.harq_control_ie.spid", FT_UINT8, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_SPID_MASK, NULL, HFILL}
1790 &hf_harq_control_ie_acid,
1791 {"HARQ CH ID (ACID)", "wmx.harq_map.harq_control_ie.acid", FT_UINT8, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_ACID_MASK, NULL, HFILL}
1794 &hf_harq_control_ie_reserved,
1795 {"Reserved", "wmx.harq_map.harq_control_ie.reserved", FT_UINT8, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_RESERVED_MASK, NULL, HFILL}
1798 &hf_harq_control_ie_prefix_1,
1799 {"Prefix", "wmx.harq_map.harq_control_ie.prefix", FT_BOOLEAN, 16, TFS(&tfs_prefix), WIMAX_HARQ_CONTROL_IE_PREFIX_MASK_1, NULL, HFILL}
1802 &hf_harq_control_ie_ai_sn_1,
1803 {"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}
1806 &hf_harq_control_ie_spid_1,
1807 {"Subpacket ID (SPID)", "wmx.harq_map.harq_control_ie.spid", FT_UINT16, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_SPID_MASK_1, NULL, HFILL}
1810 &hf_harq_control_ie_acid_1,
1811 {"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}
1814 &hf_harq_control_ie_reserved_1,
1815 {"Reserved", "wmx.harq_map.harq_control_ie.reserved", FT_UINT16, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_RESERVED_MASK_1, NULL, HFILL}
1819 static hf_register_info hf_extension_type[] =
1822 &hf_culmap_extension_type,
1823 {"UL-MAP Type", "wmx.extension_type.ul_map_type", FT_UINT16, BASE_DEC, NULL, EXTENSION_TYPE_MASK, NULL, HFILL}
1826 &hf_culmap_extension_type_1,
1827 {"UL-MAP Type", "wmx.extension_type.ul_map_type", FT_UINT16, BASE_DEC, NULL, EXTENSION_TYPE_MASK_1, NULL, HFILL}
1830 &hf_culmap_extension_subtype,
1831 {"Extension Subtype", "wmx.extension_type.subtype", FT_UINT16, BASE_DEC, NULL, EXTENSION_SUBTYPE_MASK, NULL, HFILL}
1834 &hf_culmap_extension_subtype_1,
1835 {"Extension Subtype", "wmx.extension_type.subtype", FT_UINT16, BASE_DEC, NULL, EXTENSION_SUBTYPE_MASK_1, NULL, HFILL}
1838 &hf_culmap_extension_length,
1839 {"Extension Length", "wmx.extension_type.length", FT_UINT16, BASE_DEC, NULL, EXTENSION_LENGTH_MASK, NULL, HFILL}
1842 &hf_culmap_extension_length_1,
1843 {"Extension Length", "wmx.extension_type.length", FT_UINT16, BASE_DEC, NULL, EXTENSION_LENGTH_MASK_1, NULL, HFILL}
1845 #if 0
1847 &hf_culmap_extension_time_diversity_mbs,
1848 {"Time Diversity MBS", "wmx.extension_type.time_diversity_mbs", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
1850 #endif
1851 #if 0
1853 &hf_culmap_extension_time_diversity_mbs_1,
1854 {"Time Diversity MBS", "wmx.extension_type.time_diversity_mbs", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
1856 #endif
1858 &hf_culmap_extension_harq_mode_1,
1859 {"HARQ Mode Switch", "wmx.extension_type.harq_mode", FT_UINT16, BASE_HEX, NULL, 0x000F, NULL, HFILL}
1862 &hf_culmap_extension_harq_mode,
1863 {"HARQ Mode Switch", "wmx.extension_type.harq_mode", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
1866 &hf_culmap_extension_unknown_sub_type,
1867 {"Unknown Extension Subtype", "wmx.extension_type.unknown_sub_type", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
1870 &hf_culmap_extension_unknown_sub_type_1,
1871 {"Unknown Extension Subtype", "wmx.extension_type.unknown_sub_type", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
1875 static hf_register_info hf_cdma_allocation[] =
1877 { /* display the Duration */
1878 &hf_cdma_allocation_duration,
1879 {"Duration", "wmx.cdma_allocation.duration", FT_UINT16, BASE_DEC, NULL, CDMA_ALLOCATION_DURATION_MASK, NULL, HFILL}
1881 { /* display the UIUC */
1882 &hf_cdma_allocation_uiuc,
1883 {"UIUC For Transmission", "wmx.cdma_allocation.uiuc", FT_UINT16, BASE_DEC, NULL, CDMA_ALLOCATION_UIUC_MASK, NULL, HFILL}
1885 { /* display the Repetition Coding Indication */
1886 &hf_cdma_allocation_repetition,
1887 {"Repetition Coding Indication", "wmx.cdma_allocation.allocation_repetition", FT_UINT16, BASE_DEC, VALS(vals_repetitions), CDMA_ALLOCATION_REPETITION_CODE_MASK, NULL, HFILL}
1889 { /* display the Frame Number Index */
1890 &hf_cdma_allocation_frame_number_index,
1891 {"Frame Number Index (LSBs of relevant frame number)", "wmx.cdma_allocation.frame_number_index", FT_UINT16, BASE_DEC, NULL, CDMA_ALLOCATION_FRAME_NUMBER_INDEX_MASK, NULL, HFILL}
1893 { /* display the Ranging Code */
1894 &hf_cdma_allocation_ranging_code,
1895 {"Ranging Code", "wmx.cdma_allocation.ranging_code", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
1897 { /* display the Ranging Symbol */
1898 &hf_cdma_allocation_ranging_symbol,
1899 {"Ranging Symbol", "wmx.cdma_allocation.ranging_symbol", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
1901 { /* display the Ranging Subchannel */
1902 &hf_cdma_allocation_ranging_subchannel,
1903 {"Ranging Subchannel", "wmx.cdma_allocation.ranging_subchannel", FT_UINT8, BASE_DEC, NULL, CDMA_ALLOCATION_RANGING_SUBCHANNEL_MASK, NULL, HFILL}
1905 { /* display the BW Request Mandatory */
1906 &hf_cdma_allocation_bw_req,
1907 {"BW Request Mandatory", "wmx.cdma_allocation.bw_req", FT_BOOLEAN, 8, TFS(&tfs_yes_no_ie), CDMA_ALLOCATION_BW_REQUEST_MANDATORY_MASK, NULL, HFILL}
1909 { /* display the Duration */
1910 &hf_cdma_allocation_duration_1,
1911 {"Duration", "wmx.cdma_allocation.duration", FT_UINT16, BASE_DEC, NULL, CDMA_ALLOCATION_DURATION_MASK_1, NULL, HFILL}
1913 { /* display the UIUC */
1914 &hf_cdma_allocation_uiuc_1,
1915 {"UIUC For Transmission", "wmx.cdma_allocation.uiuc", FT_UINT16, BASE_DEC, NULL, CDMA_ALLOCATION_UIUC_MASK_1, NULL, HFILL}
1917 { /* display the Repetition Coding Indication */
1918 &hf_cdma_allocation_repetition_1,
1919 {"Repetition Coding Indication", "wmx.cdma_allocation.allocation_repetition", FT_UINT16, BASE_DEC, VALS(vals_repetitions), CDMA_ALLOCATION_REPETITION_CODE_MASK_1, NULL, HFILL}
1921 { /* display the Frame Number Index */
1922 &hf_cdma_allocation_frame_number_index_1,
1923 {"Frame Number Index (LSBs of relevant frame number)", "wmx.cdma_allocation.frame_number_index", FT_UINT32, BASE_DEC, NULL, CDMA_ALLOCATION_FRAME_NUMBER_INDEX_MASK_1, NULL, HFILL}
1925 { /* display the Ranging Code */
1926 &hf_cdma_allocation_ranging_code_1,
1927 {"Ranging Code", "wmx.cdma_allocation.ranging_code", FT_UINT32, BASE_DEC, NULL, CDMA_ALLOCATION_RANGING_CODE_MASK_1, NULL, HFILL}
1929 { /* display the Ranging Symbol */
1930 &hf_cdma_allocation_ranging_symbol_1,
1931 {"Ranging Symbol", "wmx.cdma_allocation.ranging_symbol", FT_UINT32, BASE_DEC, NULL, CDMA_ALLOCATION_RANGING_SYMBOL_MASK_1, NULL, HFILL}
1933 { /* display the Ranging Subchannel */
1934 &hf_cdma_allocation_ranging_subchannel_1,
1935 {"Ranging Subchannel", "wmx.cdma_allocation.ranging_subchannel", FT_UINT32, BASE_DEC, NULL, CDMA_ALLOCATION_RANGING_SUBCHANNEL_MASK_1, NULL, HFILL}
1937 { /* display the BW Request Mandatory */
1938 &hf_cdma_allocation_bw_req_1,
1939 {"BW Request Mandatory", "wmx.cdma_allocation.bw_req", FT_BOOLEAN, 32, TFS(&tfs_yes_no_ie), CDMA_ALLOCATION_BW_REQUEST_MANDATORY_MASK_1, NULL, HFILL}
1943 static hf_register_info hf_extended_uiuc[] =
1945 { /* 8.4.5.4.4 Extended UIUC */
1946 &hf_extended_uiuc_ie_uiuc,
1947 {"Extended UIUC", "wmx.extended_uiuc_ie.uiuc", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL }
1949 { /* 8.4.5.4.4 Extended UIUC */
1950 &hf_extended_uiuc_ie_uiuc_1,
1951 {"Extended UIUC", "wmx.extended_uiuc_ie.uiuc", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL }
1953 { /* 8.4.5.4.4 IE Length */
1954 &hf_extended_uiuc_ie_length,
1955 {"Length", "wmx.extended_uiuc_ie.length", FT_UINT8, BASE_DEC, NULL, MSB_NIBBLE_MASK, NULL, HFILL }
1957 { /* 8.4.5.4.4 IE Length */
1958 &hf_extended_uiuc_ie_length_1,
1959 {"Length", "wmx.extended_uiuc_ie.length", FT_UINT24, BASE_DEC, NULL, LSB_NIBBLE_MASK, NULL, HFILL }
1961 { /* 8.4.5.4.5 Power Control IE */
1962 &hf_extended_uiuc_ie_power_control,
1963 {"Power Control", "wmx.extended_uiuc_ie.power_control", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }
1965 { /* 8.4.5.4.5 Power Control IE */
1966 &hf_extended_uiuc_ie_power_control_24,
1967 {"Power Control", "wmx.extended_uiuc_ie.power_control", FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL }
1970 &hf_extended_uiuc_ie_power_measurement_frame,
1971 {"Power Measurement Frame", "wmx.extended_uiuc_ie.power_measurement_frame", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }
1974 &hf_extended_uiuc_ie_power_measurement_frame_24,
1975 {"Power Measurement Frame", "wmx.extended_uiuc_ie.power_measurement_frame", FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL }
1977 { /* 8.4.5.4.8 Mini Subchannel Allocation IE */
1978 &hf_extended_uiuc_ie_mini_subchannel_alloc_ctype,
1979 {"C Type", "wmx.extended_uiuc_ie.mini_subchannel_alloc.ctype", FT_UINT8, BASE_HEX, VALS(vals_ctypes), MINI_SUBCHANNEL_CTYPE_MASK, NULL, HFILL }
1982 &hf_extended_uiuc_ie_mini_subchannel_alloc_ctype_16,
1983 {"C Type", "wmx.extended_uiuc_ie.mini_subchannel_alloc.ctype", FT_UINT16, BASE_HEX, VALS(vals_ctypes), MINI_SUBCHANNEL_CTYPE_MASK_16, NULL, HFILL }
1986 &hf_extended_uiuc_ie_mini_subchannel_alloc_duration,
1987 {"Duration", "wmx.extended_uiuc_ie.mini_subchannel_alloc.duration", FT_UINT8, BASE_DEC, NULL, MINI_SUBCHANNEL_DURATION_MASK, NULL, HFILL }
1990 &hf_extended_uiuc_ie_mini_subchannel_alloc_duration_16,
1991 {"Duration", "wmx.extended_uiuc_ie.mini_subchannel_alloc.duration", FT_UINT16, BASE_DEC, NULL, MINI_SUBCHANNEL_DURATION_MASK_16, NULL, HFILL }
1994 &hf_extended_uiuc_ie_mini_subchannel_alloc_cid,
1995 {"CID", "wmx.extended_uiuc_ie.mini_subchannel_alloc.cid", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_CID_MASK, NULL, HFILL }
1998 &hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc,
1999 {"UIUC", "wmx.extended_uiuc_ie.mini_subchannel_alloc.uiuc", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_UIUC_MASK, NULL, HFILL }
2002 &hf_extended_uiuc_ie_mini_subchannel_alloc_repetition,
2003 {"Repetition", "wmx.extended_uiuc_ie.mini_subchannel_alloc.repetition", FT_UINT24, BASE_HEX, VALS(vals_repetitions), MINI_SUBCHANNEL_REPETITION_MASK, NULL, HFILL }
2006 &hf_extended_uiuc_ie_mini_subchannel_alloc_cid_1,
2007 {"CID", "wmx.extended_uiuc_ie.mini_subchannel_alloc.cid", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_CID_MASK_1, NULL, HFILL }
2010 &hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_1,
2011 {"UIUC", "wmx.extended_uiuc_ie.mini_subchannel_alloc.uiuc", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_UIUC_MASK_1, NULL, HFILL }
2014 &hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_1,
2015 {"Repetition", "wmx.extended_uiuc_ie.mini_subchannel_alloc.repetition", FT_UINT24, BASE_HEX, VALS(vals_repetitions), MINI_SUBCHANNEL_REPETITION_MASK_1, NULL, HFILL }
2018 &hf_extended_uiuc_ie_mini_subchannel_alloc_cid_2,
2019 {"CID", "wmx.extended_uiuc_ie.mini_subchannel_alloc.cid", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_CID_MASK_2, NULL, HFILL }
2022 &hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_2,
2023 {"UIUC", "wmx.extended_uiuc_ie.mini_subchannel_alloc.uiuc", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_UIUC_MASK_2, NULL, HFILL }
2026 &hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_2,
2027 {"Repetition", "wmx.extended_uiuc_ie.mini_subchannel_alloc.repetition", FT_UINT24, BASE_HEX, VALS(vals_repetitions), MINI_SUBCHANNEL_REPETITION_MASK_2, NULL, HFILL }
2030 &hf_extended_uiuc_ie_mini_subchannel_alloc_cid_3,
2031 {"CID", "wmx.extended_uiuc_ie.mini_subchannel_alloc.cid", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_CID_MASK_3, NULL, HFILL }
2034 &hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_3,
2035 {"UIUC", "wmx.extended_uiuc_ie.mini_subchannel_alloc.uiuc", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_UIUC_MASK_2, NULL, HFILL }
2038 &hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_3,
2039 {"Repetition", "wmx.extended_uiuc_ie.mini_subchannel_alloc.repetition", FT_UINT24, BASE_HEX, VALS(vals_repetitions), MINI_SUBCHANNEL_REPETITION_MASK_3, NULL, HFILL }
2042 &hf_extended_uiuc_ie_mini_subchannel_alloc_padding,
2043 {"Padding", "wmx.extended_uiuc_ie.mini_subchannel_alloc.padding", FT_UINT8, BASE_HEX, NULL, MINI_SUBCHANNEL_PADDING_MASK, NULL, HFILL }
2046 &hf_extended_uiuc_ie_mini_subchannel_alloc_padding_1,
2047 {"Padding", "wmx.extended_uiuc_ie.mini_subchannel_alloc.padding", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_PADDING_MASK_1, NULL, HFILL }
2049 { /* 8.4.5.4.6 AAS_UL_IE */
2050 &hf_extended_uiuc_ie_aas_ul,
2051 {"AAS_UL_IE (not implemented)", "wmx.extended_uiuc_ie.aas_ul", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2053 { /* 8.4.5.4.12 CQICH Allocation IE */
2054 &hf_extended_uiuc_ie_cqich_alloc,
2055 {"CQICH Allocation IE (not implemented)", "wmx.extended_uiuc_ie.cqich_alloc", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2057 { /* 8.4.5.4.7 UL Zone IE */
2058 &hf_extended_uiuc_ie_ul_zone,
2059 {"UL Zone IE (not implemented)", "wmx.extended_uiuc_ie.ul_zone", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2062 { /* 8.4.5.4.14 MIMO_UL_Basic_IE */
2063 &hf_extended_uiuc_ie_mimo_ul_basic,
2064 {"MIMO UL Basic IE (not implemented)", "wmx.extended_uiuc_ie.mimo_ul_basic", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2066 { /* 8.4.5.4.22 UL-MAP Fast Tracking IE */
2067 &hf_extended_uiuc_ie_fast_tracking,
2068 {"UL-MAP Fast Tracking IE (not implemented)", "wmx.extended_uiuc_ie.fast_tracking", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2070 { /* 8.4.5.4.21 Fast Ranging IE */
2071 &hf_extended_uiuc_ie_fast_ranging,
2072 {"Fast Ranging IE (not implemented)", "wmx.extended_uiuc_ie.fast_ranging", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2074 { /* 8.4.5.4.14 UL-MAP Physical Modifier IE */
2075 &hf_extended_uiuc_ie_phymod_ul,
2076 {"UL-MAP Physical Modifier IE (not implemented)", "wmx.extended_uiuc_ie.phymod_ul", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2078 { /* 8.4.5.4.17 UL PUSC Burst Allocation in Other Segment IE */
2079 &hf_extended_uiuc_ie_ul_pusc_burst_allocation,
2080 {"UL_PUSC_Burst_Allocation_in_Other_Segment_IE (not implemented)", "wmx.extended_uiuc_ie.ul_pusc_burst_allocation", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2082 { /* 8.4.5.4.15 UL Allocation Start IE */
2083 &hf_extended_uiuc_ie_ul_allocation_start,
2084 {"UL Allocation Start IE (not implemented)", "wmx.extended_uiuc_ie.ul_allocation_start", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2086 { /* unknown UIUC */
2087 &hf_extended_uiuc_ie_unknown_uiuc,
2088 {"Unknown Extended UIUC", "wmx.extended_uiuc.unknown_uiuc", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2092 #if 0 /* not used ?? */
2093 /* Setup protocol subtree array */
2094 static int *ett[] =
2096 &ett_wimax_compact_ulmap_ie_decoder,
2097 &ett_wimax_rcid_ie_decoder,
2098 &ett_wimax_harq_control_ie_decoder,
2099 &ett_wimax_extended_uiuc_dependent_ie_decoder,
2100 &ett_wimax_extension_type_ie_decoder,
2102 proto_register_subtree_array(ett, array_length(ett));
2103 #endif
2105 proto_wimax_compact_ulmap_ie_decoder = proto_wimax;
2107 proto_register_field_array(proto_wimax_compact_ulmap_ie_decoder, hf_compact_ulmap, array_length(hf_compact_ulmap));
2108 proto_register_field_array(proto_wimax_compact_ulmap_ie_decoder, hf_rcid, array_length(hf_rcid));
2109 proto_register_field_array(proto_wimax_compact_ulmap_ie_decoder, hf_harq_control, array_length(hf_harq_control));
2110 proto_register_field_array(proto_wimax_compact_ulmap_ie_decoder, hf_extension_type, array_length(hf_extension_type));
2111 proto_register_field_array(proto_wimax_compact_ulmap_ie_decoder, hf_cdma_allocation, array_length(hf_cdma_allocation));
2112 proto_register_field_array(proto_wimax_compact_ulmap_ie_decoder, hf_extended_uiuc, array_length(hf_extended_uiuc));
2116 * Editor modelines - https://www.wireshark.org/tools/modelines.html
2118 * Local variables:
2119 * c-basic-offset: 8
2120 * tab-width: 8
2121 * indent-tabs-mode: t
2122 * End:
2124 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
2125 * :indentSize=8:tabSize=8:noTabs=false: