2 * WiMax MAC Management DCD Message decoder
4 * Copyright (c) 2007 by Intel Corporation.
6 * Author: Lu Pan <lu.pan@intel.com>
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1999 Gerald Combs
12 * SPDX-License-Identifier: GPL-2.0-or-later
23 #include <epan/packet.h>
24 #include "wimax_tlv.h"
25 #include "wimax_mac.h"
26 #include "wimax_utils.h"
28 /* Delete the following variable as soon as possible */
29 extern gboolean include_cor2_changes;
31 void proto_register_mac_mgmt_msg_dcd(void);
32 void proto_reg_handoff_mac_mgmt_msg_dcd(void);
34 static gint proto_mac_mgmt_msg_dcd_decoder = -1;
35 static gint ett_mac_mgmt_msg_dcd_decoder = -1;
38 static gint hf_dcd_downlink_channel_id = -1;
39 static gint hf_dcd_config_change_count = -1;
40 static gint hf_dcd_dl_burst_profile_rsv = -1;
41 static gint hf_dcd_dl_burst_profile_diuc = -1;
43 static gint hf_dcd_bs_eirp = -1;
44 static gint hf_dcd_frame_duration = -1;
45 static gint hf_dcd_phy_type = -1;
46 static gint hf_dcd_power_adjustment = -1;
47 static gint hf_dcd_channel_nr = -1;
48 static gint hf_dcd_ttg = -1;
49 static gint hf_dcd_rtg = -1;
51 static gint hf_dcd_rss = -1;
53 static gint hf_dcd_channel_switch_frame_nr = -1;
54 static gint hf_dcd_frequency = -1;
55 static gint hf_dcd_bs_id = -1;
56 static gint hf_dcd_frame_duration_code = -1;
57 static gint hf_dcd_frame_nr = -1;
59 static gint hf_dcd_size_cqich_id = -1;
61 static gint hf_dcd_h_arq_ack_delay = -1;
62 static gint hf_dcd_mac_version = -1;
63 static gint hf_dcd_restart_count = -1;
65 /* static gint hf_dl_burst_reserved = -1; */
66 /* static gint hf_dl_burst_diuc = -1; */
67 static gint hf_dcd_burst_freq = -1;
68 static gint hf_dcd_burst_fec = -1;
69 static gint hf_dcd_burst_diuc_exit_threshold = -1;
70 static gint hf_dcd_burst_diuc_entry_threshold = -1;
71 static gint hf_dcd_burst_tcs = -1;
72 static gint hf_dcd_tlv_t_19_permutation_type_for_broadcast_regions_in_harq_zone = -1;
73 static gint hf_dcd_tlv_t_20_maximum_retransmission = -1;
74 static gint hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter = -1;
75 static gint hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_physical_cinr_measurements = -1;
76 static gint hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_rssi_measurements = -1;
77 static gint hf_dcd_tlv_t_22_dl_amc_allocated_physical_bands_bitmap = -1;
79 static gint hf_dcd_tlv_t_34_dl_region_definition = -1;
80 static gint hf_dcd_tlv_t_34_dl_region_definition_num_region = -1;
81 static gint hf_dcd_tlv_t_34_dl_region_definition_reserved = -1;
82 static gint hf_dcd_tlv_t_34_dl_region_definition_symbol_offset = -1;
83 static gint hf_dcd_eirxp = -1;
84 static gint hf_dcd_tlv_t_34_dl_region_definition_subchannel_offset = -1;
85 static gint hf_dcd_tlv_t_34_dl_region_definition_num_symbols = -1;
86 static gint hf_dcd_tlv_t_34_dl_region_definition_num_subchannels = -1;
87 static gint hf_dcd_tlv_t_50_ho_type_support = -1;
88 static gint hf_dcd_tlv_t_50_ho_type_support_ho = -1;
89 static gint hf_dcd_tlv_t_50_ho_type_support_mdho = -1;
90 static gint hf_dcd_tlv_t_50_ho_type_support_fbss_ho = -1;
91 static gint hf_dcd_tlv_t_50_ho_type_support_reserved = -1;
92 static gint hf_dcd_tlv_t_31_h_add_threshold = -1;
93 static gint hf_dcd_tlv_t_45_paging_interval_length = -1;
94 static gint hf_dcd_tlv_t_45_paging_interval_reserved = -1;
95 static gint hf_dcd_tlv_t_32_h_delete_threshold = -1;
96 static gint hf_dcd_tlv_t_33_asr = -1;
97 static gint hf_dcd_tlv_t_33_asr_m = -1;
98 static gint hf_dcd_tlv_t_33_asr_l = -1;
99 static gint hf_dcd_tlv_t_35_paging_group_id = -1;
100 static gint hf_dcd_tlv_t_36_tusc1_permutation_active_subchannels_bitmap = -1;
101 static gint hf_dcd_tlv_t_37_tusc2_permutation_active_subchannels_bitmap = -1;
102 static gint hf_dcd_tlv_t_51_hysteresis_margin = -1;
103 static gint hf_dcd_tlv_t_52_time_to_trigger_duration = -1;
104 static gint hf_dcd_tlv_t_60_noise_interference = -1;
105 static gint hf_dcd_tlv_t_153_downlink_burst_profile_for_mutiple_fec_types = -1;
107 static gint hf_dcd_tlv_t_541_type_function_action = -1;
108 static gint hf_dcd_tlv_t_541_type = -1;
109 static gint hf_dcd_tlv_t_541_function = -1;
110 static gint hf_dcd_tlv_t_541_action = -1;
111 static gint hf_dcd_tlv_t_542_trigger_value = -1;
112 static gint hf_dcd_tlv_t_543_trigger_averaging_duration = -1;
114 static gint hf_dcd_unknown_type = -1;
115 static gint hf_dcd_invalid_tlv = -1;
117 /* DCD DIUC messages (table 143) */
118 static const value_string diuc_msgs[] =
120 { 0, "Downlink Burst Profile 1"},
121 { 1, "Downlink Burst Profile 2"},
122 { 2, "Downlink Burst Profile 3"},
123 { 3, "Downlink Burst Profile 4"},
124 { 4, "Downlink Burst Profile 5"},
125 { 5, "Downlink Burst Profile 6"},
126 { 6, "Downlink Burst Profile 7"},
127 { 7, "Downlink Burst Profile 8"},
128 { 8, "Downlink Burst Profile 9"},
129 { 9, "Downlink Burst Profile 10"},
130 {10, "Downlink Burst Profile 11"},
131 {11, "Downlink Burst Profile 12"},
132 {12, "Downlink Burst Profile 13"},
135 {15, "End of DL-MAP"},
139 static const value_string vals_dcd_type[] =
148 static const value_string vals_dcd_function[] =
151 {1, "Metric of neighbor BS is greater than absolute value"},
152 {2, "Metric of neighbor BS is less than absolute value"},
153 {3, "Metric of neighbor BS is greater than serving BS metric by relative value"},
154 {4, "Metric of neighbor BS is less than serving BS metric by relative value"},
155 {5, "Metric of serving BS greater than absolute value"},
156 {6, "Metric of serving BS less than absolute value"},
161 static const value_string vals_dcd_action[] =
164 {1, "Respond on trigger with MOB_SCN-REP after the end of each scanning interval"},
165 {2, "Respond on trigger with MOB_MSH-REQ"},
166 {3, "On trigger, MS starts neighbor BS scanning process by sending MOB_SCN-REQ"},
171 static const value_string vals_dcd_power_adjustmnt[] =
173 {0, "Preserve Peak Power"},
174 {1, "Preserve Mean Power"},
179 static const true_false_string tfs_dcd_power_adjustment =
181 "Preserve Mean Power",
182 "Preserve Peak Power"
187 static const value_string vals_reg_rsp_status[] =
190 {1, "Message authentication failure"},
195 static const value_string vals_dcd_burst_tcs[] =
203 static const true_false_string tfs_dcd_burst_tcs =
210 static const value_string vals_dcd_frame_duration[] =
222 #ifdef WIMAX_16D_2004
223 static const value_string vals_dcd_size_of_cqich_id[] =
237 static const value_string vals_dcd_mac_version[] =
239 { 1, "Conformance with IEEE Std 802.16-2001"},
240 { 2, "Conformance with IEEE Std 802.16c-2002 and its predecessors"},
241 { 3, "Conformance with IEEE Std 802.16a-2003 and its predecessors"},
242 { 4, "Conformance with IEEE Std 802.16-2004"},
243 { 5, "Conformance with IEEE Std 802.16-2004 and IEEE Std 802.16e-2005"},
244 { 6, "Conformance with IEEE Std 802.16-2004, IEEE Std 802.16e-2005 and IEEE Std 802.16f-2005"},
245 { 7, "Conformance with IEEE Std 802.16-2004, IEEE Std 802.16e-2005, IEEE Std 802.16f-2005 and IEEE Std 802.16g-2007"},
246 { 8, "Conformance with IEEE Std 802.16-2009"},
247 { 9, "Conformance with IEEE Std 802.16-2009 and IEEE Std 802.16j-2009"},
253 static const value_string vals_dcd_burst_fec_ofdma[] =
255 { 0, "QPSK (CC) 1/2"},
256 { 1, "QPSK (CC) 3/4"},
257 { 2, "16-QAM (CC) 1/2"},
258 { 3, "16-QAM (CC) 3/4"},
259 { 4, "64-QAM (CC) 1/2"},
260 { 5, "64-QAM (CC) 2/3"},
261 { 6, "64-QAM (CC) 3/4"},
262 { 7, "QPSK (BTC) 1/2"},
263 { 8, "QPSK (BTC) 3/4 or 2/3"},
264 { 9, "16-QAM (BTC) 3/5"},
265 {10, "16-QAM (BTC) 4/5"},
266 {11, "64-QAM (BTC) 2/3 or 5/8"},
267 {12, "64-QAM (BTC) 5/6 or 4/5"},
268 {13, "QPSK (CTC) 1/2"},
270 {15, "QPSK (CTC) 3/4"},
271 {16, "16-QAM (CTC) 1/2"},
272 {17, "16-QAM (CTC) 3/4"},
273 {18, "64-QAM (CTC) 1/2"},
274 {19, "64-QAM (CTC) 2/3"},
275 {20, "64-QAM (CTC) 3/4"},
276 {21, "64-QAM (CTC) 5/6"},
277 {22, "QPSK (ZT CC) 1/2"},
278 {23, "QPSK (ZT CC) 3/4"},
279 {24, "16-QAM (ZT CC) 1/2"},
280 {25, "16-QAM (ZT CC) 3/4"},
281 {26, "64-QAM (ZT CC) 1/2"},
282 {27, "64-QAM (ZT CC) 2/3"},
283 {28, "64-QAM (ZT CC) 3/4"},
284 {29, "QPSK (LDPC) 1/2"},
285 {30, "QPSK (LDPC) 2/3 A code"},
286 {31, "16-QAM (LDPC) 3/4 A code"},
287 {32, "16-QAM (LDPC) 1/2"},
288 {33, "16-QAM (LDPC) 2/3 A code"},
289 {34, "16-QAM (LDPC) 3/4 A code"},
290 {35, "64-QAM (LDPC) 1/2"},
291 {36, "64-QAM (LDPC) 2/3 A code"},
292 {37, "64-QAM (LDPC) 3/4 A code"},
293 {38, "QPSK (LDPC) 2/3 B code"},
294 {39, "QPSK (LDPC) 3/4 B code"},
295 {40, "16-QAM (LDPC) 2/3 B code"},
296 {41, "16-QAM (LDPC) 3/4 B code"},
297 {42, "64-QAM (LDPC) 2/3 B code"},
298 {43, "64-QAM (LDPC) 3/4 B code"},
299 {44, "QPSK (CC with optional interleaver) 1/2"},
300 {45, "QPSK (CC with optional interleaver) 3/4"},
301 {46, "16-QAM (CC with optional interleaver) 1/2"},
302 {47, "16-QAM (CC optional interleaver) 3/4"},
303 {48, "64-QAM (CC with optional interleaver) 2/3"},
304 {49, "64-QAM (CC with optional interleaver) 3/4"},
305 {50, "QPSK (LDPC) 5/6"},
306 {51, "16-QAM (LDPC) 5/6"},
307 {52, "64-QAM (LDPC) 5/6"},
311 static const value_string vals_dcd_permutation_type[] =
315 {2, "optional FUSC"},
320 static const value_string tfs_support[] =
322 {0, "not supported"},
328 /* WiMax MAC Management DCD message (table 15) dissector */
329 static int dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
332 guint tvb_len, length;
333 gint tlv_type, tlv_len, tlv_offset, tlv_value_offset;
334 guint dl_burst_diuc, dl_num_regions;
335 proto_item *dcd_item, *tlv_item, *sub_item;
336 proto_tree *dcd_tree, *tlv_tree, *sub_tree;
340 { /* we are being asked for details */
341 /* Get the tvb reported length */
342 tvb_len = tvb_reported_length(tvb);
343 /* display MAC payload type DCD */
344 dcd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dcd_decoder, tvb, offset, tvb_len, "Downlink Channel Descriptor (DCD)");
345 /* add MAC DCD subtree */
346 dcd_tree = proto_item_add_subtree(dcd_item, ett_mac_mgmt_msg_dcd_decoder);
347 /* Decode and display the Downlink Channel Descriptor (DCD) */
348 /* display the Downlink Channel ID */
349 proto_tree_add_item(dcd_tree, hf_dcd_downlink_channel_id, tvb, offset, 1, ENC_BIG_ENDIAN);
350 /* set the offset for the Configuration Change Count */
352 /* display the Configuration Change Count */
353 proto_tree_add_item(dcd_tree, hf_dcd_config_change_count, tvb, offset, 1, ENC_BIG_ENDIAN);
354 /* set the offset for the TLV Encoded info */
356 /* process the DCD TLV Encoded information (table 358) */
357 while(offset < tvb_len)
359 /* get the TLV information */
360 init_tlv_info(&tlv_info, tvb, offset);
361 /* get the TLV type */
362 tlv_type = get_tlv_type(&tlv_info);
363 /* get the TLV length */
364 tlv_len = get_tlv_length(&tlv_info);
365 if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
366 { /* invalid tlv info */
367 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "DCD TLV error");
368 proto_tree_add_item(dcd_tree, hf_dcd_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
371 /* get the TLV value offset */
372 tlv_value_offset = get_tlv_value_offset(&tlv_info);
373 #ifdef DEBUG /* for debug only */
374 proto_tree_add_protocol_format(dcd_tree, proto_mac_mgmt_msg_dcd_decoder, tvb, offset, (tlv_len + tlv_value_offset), "DCD Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, tlv_len, offset, tvb_len);
376 /* update the offset */
377 offset += tlv_value_offset;
378 /* process DCD TLVs */
381 case DCD_DOWNLINK_BURST_PROFILE:
382 { /* Downlink Burst Profile TLV (table 363)*/
384 dl_burst_diuc = (tvb_get_guint8(tvb, offset) & 0x0F);
385 /* display TLV info */
386 /* add TLV subtree */
387 proto_str = wmem_strdup_printf(wmem_packet_scope(), "Downlink_Burst_Profile (DIUC=%u)", dl_burst_diuc);
388 tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dcd_decoder, dcd_tree, proto_mac_mgmt_msg_dcd_decoder, tvb, offset-tlv_value_offset, tlv_len, proto_str);
390 proto_tree_add_item(tlv_tree, hf_dcd_dl_burst_profile_rsv, tvb, offset, 1, ENC_BIG_ENDIAN);
391 proto_tree_add_item(tlv_tree, hf_dcd_dl_burst_profile_diuc, tvb, offset, 1, ENC_BIG_ENDIAN);
392 /* process subTLVs */
393 for (tlv_offset = 1; tlv_offset < tlv_len; )
394 { /* get the TLV information */
395 init_tlv_info(&tlv_info, tvb, (offset+tlv_offset));
396 /* get the TLV type */
397 tlv_type = get_tlv_type(&tlv_info);
398 /* get the TLV length */
399 length = get_tlv_length(&tlv_info);
400 if(tlv_type == -1 || length > MAX_TLV_LEN || length < 1)
401 { /* invalid tlv info */
402 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "DL Burst Profile TLV error");
403 proto_tree_add_item(tlv_tree, hf_dcd_invalid_tlv, tvb, offset, (tlv_len - offset - tlv_offset), ENC_NA);
409 case DCD_BURST_FREQUENCY:
411 add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_burst_freq, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
414 case DCD_BURST_FEC_CODE_TYPE:
416 add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_burst_fec, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
419 case DCD_BURST_DIUC_EXIT_THRESHOLD:
421 add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_burst_diuc_exit_threshold, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
424 case DCD_BURST_DIUC_ENTRY_THRESHOLD:
426 add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_burst_diuc_entry_threshold, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
429 case DCD_BURST_TCS_ENABLE:
431 add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_burst_tcs, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
438 tlv_offset += (length+get_tlv_value_offset(&tlv_info));
444 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_bs_eirp, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
447 case DCD_FRAME_DURATION:
449 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_frame_duration, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
454 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_phy_type, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
457 case DCD_POWER_ADJUSTMENT:
459 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_power_adjustment, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
464 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_channel_nr, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
469 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_ttg, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
474 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_rtg, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
477 #ifdef WIMAX_16D_2004
480 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_rss, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
486 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_eirxp, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
490 case DCD_CHANNEL_SWITCH_FRAME_NR:
492 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_channel_switch_frame_nr, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
497 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_frequency, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
502 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_bs_id, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
505 case DCD_FRAME_DURATION_CODE:
507 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_frame_duration_code, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
512 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_frame_nr, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
515 #ifdef WIMAX_16D_2004
516 case DCD_SIZE_CQICH_ID:
518 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_size_cqich_id, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
522 case DCD_H_ARQ_ACK_DELAY:
524 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_h_arq_ack_delay, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
527 case DCD_MAC_VERSION:
529 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_mac_version, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
532 case DCD_TLV_T_19_PERMUTATION_TYPE_FOR_BROADCAST_REGION_IN_HARQ_ZONE:
534 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_19_permutation_type_for_broadcast_regions_in_harq_zone, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
537 case DCD_TLV_T_20_MAXIMUM_RETRANSMISSION:
539 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_20_maximum_retransmission, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
542 case DCD_TLV_T_21_DEFAULT_RSSI_AND_CINR_AVERAGING_PARAMETER:
544 tlv_item = add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
545 tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_dcd_decoder);
546 proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_physical_cinr_measurements, tvb, offset, 1, ENC_BIG_ENDIAN);
547 proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_rssi_measurements, tvb, offset, 1, ENC_BIG_ENDIAN);
550 case DCD_TLV_T_22_DL_AMC_ALLOCATED_PHYSICAL_BANDS_BITMAP:
552 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_22_dl_amc_allocated_physical_bands_bitmap, tvb, offset-tlv_value_offset, ENC_NA);
555 case DCD_TLV_T_34_DL_REGION_DEFINITION:
557 tlv_item = add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_34_dl_region_definition, tvb, offset-tlv_value_offset, ENC_NA);
558 tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_dcd_decoder);
559 dl_num_regions = tvb_get_guint8(tvb, offset);
560 proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_num_region, tvb, offset, 1, ENC_BIG_ENDIAN);
561 proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
563 for(length = 0; length < dl_num_regions; length++)
565 proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_symbol_offset, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
566 proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_subchannel_offset, tvb, (tlv_offset+1), 1, ENC_BIG_ENDIAN);
567 proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_num_symbols, tvb, (tlv_offset+2), 1, ENC_BIG_ENDIAN);
568 proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_num_subchannels, tvb, (tlv_offset+3), 1, ENC_BIG_ENDIAN);
573 case DCD_TLV_T_50_HO_TYPE_SUPPORT:
575 tlv_item = add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_50_ho_type_support, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
576 tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_dcd_decoder);
577 proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_50_ho_type_support_ho, tvb, offset, 1, ENC_BIG_ENDIAN);
578 proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_50_ho_type_support_mdho, tvb, offset, 1, ENC_BIG_ENDIAN);
579 proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_50_ho_type_support_fbss_ho, tvb, offset, 1, ENC_BIG_ENDIAN);
580 proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_50_ho_type_support_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
583 case DCD_TLV_T_31_H_ADD_THRESHOLD:
585 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_31_h_add_threshold, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
588 case DCD_TLV_T_32_H_DELETE_THRESHOLD:
590 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_32_h_delete_threshold, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
593 case DCD_TLV_T_33_ASR:
595 tlv_item = add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_33_asr, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
596 tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_dcd_decoder);
597 proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_33_asr_m, tvb, offset, 1, ENC_BIG_ENDIAN);
598 proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_33_asr_l, tvb, offset, 1, ENC_BIG_ENDIAN);
601 case DCD_TLV_T_35_PAGING_GROUP_ID:
603 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_35_paging_group_id, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
606 case DCD_TLV_T_36_TUSC1_PERMUTATION_ACTIVE_SUBCHANNELS_BITMAP:
608 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_36_tusc1_permutation_active_subchannels_bitmap, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
611 case DCD_TLV_T_37_TUSC2_PERMUTATION_ACTIVE_SUBCHANNELS_BITMAP:
613 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_37_tusc2_permutation_active_subchannels_bitmap, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
616 case DCD_TLV_T_51_HYSTERSIS_MARGIN:
618 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_51_hysteresis_margin, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
621 case DCD_TLV_T_52_TIME_TO_TRIGGER_DURATION:
623 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_52_time_to_trigger_duration, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
626 case DCD_TLV_T_54_TRIGGER:
627 { /* Trigger TLV (table 358a & 358b) */
628 /* add TLV subtree */
629 tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dcd_decoder, dcd_tree, proto_mac_mgmt_msg_dcd_decoder, tvb, offset-tlv_value_offset, tlv_len, "DCD Trigger");
630 for (tlv_offset = 0; tlv_offset < tlv_len; )
632 /* get the TLV information */
633 init_tlv_info(&tlv_info, tvb, (offset + tlv_offset));
634 /* get the TLV type */
635 tlv_type = get_tlv_type(&tlv_info);
636 /* get the TLV length */
637 length = get_tlv_length(&tlv_info);
638 if(tlv_type == -1 || length > MAX_TLV_LEN || length < 1)
639 { /* invalid tlv info */
640 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Trigger TLV error");
641 proto_tree_add_item(tlv_tree, hf_dcd_invalid_tlv, tvb, offset, (tlv_len - offset - tlv_offset), ENC_NA);
644 /* update the offset */
645 tlv_offset += get_tlv_value_offset(&tlv_info);
649 case DCD_TLV_T_541_TYPE_FUNCTION_ACTION:
651 sub_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_tlv_t_541_type_function_action, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
652 sub_tree = proto_item_add_subtree(sub_item, ett_mac_mgmt_msg_dcd_decoder);
653 proto_tree_add_item(sub_tree, hf_dcd_tlv_t_541_type, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
654 proto_tree_add_item(sub_tree, hf_dcd_tlv_t_541_function, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
655 proto_tree_add_item(sub_tree, hf_dcd_tlv_t_541_action, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
658 case DCD_TLV_T542_TRIGGER_VALUE:
659 add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_tlv_t_542_trigger_value, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
661 case DCD_TLV_T_543_TRIGGER_AVERAGING_DURATION:
662 add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_tlv_t_543_trigger_averaging_duration, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
665 tlv_offset += length;
669 case DCD_TLV_T_60_NOISE_AND_INTERFERENCE:
671 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_60_noise_interference, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
674 case DCD_TLV_T_153_DOWNLINK_BURST_PROFILE_FOR_MULTIPLE_FEC_TYPES:
676 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_153_downlink_burst_profile_for_mutiple_fec_types, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
679 case DCD_RESTART_COUNT:
681 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_restart_count, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
684 case DCD_TLV_T_45_PAGING_INTERVAL_LENGTH:
686 if (include_cor2_changes) {
687 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_45_paging_interval_reserved, tvb, offset-tlv_value_offset, ENC_NA);
689 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_45_paging_interval_length, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
695 add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_unknown_type, tvb, offset-tlv_value_offset, ENC_NA);
700 } /* end of TLV process while loop */
702 return tvb_captured_length(tvb);
705 /* Register Wimax Mac Payload Protocol and Dissector */
706 void proto_register_mac_mgmt_msg_dcd(void)
709 static hf_register_info hf[] =
712 &hf_dcd_tlv_t_33_asr,
714 "ASR (Anchor Switch Report) Slot Length (M) and Switching Period (L)", "wmx.dcd.asr",
715 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
719 &hf_dcd_tlv_t_33_asr_l,
721 "ASR Switching Period (L)", "wmx.dcd.asr.l",
722 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_frames, 0x0f, NULL, HFILL
726 &hf_dcd_tlv_t_33_asr_m,
728 "ASR Slot Length (M)", "wmx.dcd.asr.m",
729 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_frames, 0xf0, NULL, HFILL
735 "BS EIRP", "wmx.dcd.bs_eirp",
736 FT_INT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_dbm, 0x00, NULL, HFILL
742 "Base Station ID", "wmx.dcd.bs_id",
743 FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL
747 &hf_dcd_restart_count,
749 "BS Restart Count", "wmx.dcd.bs_restart_count",
750 FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
757 "DIUC", "wmx.dcd.burst.diuc",
758 FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL
763 &hf_dcd_burst_diuc_entry_threshold,
765 "DIUC Minimum Entry Threshold (in 0.25 dB units)", "wmx.dcd.burst.diuc_entry_threshold",
766 FT_FLOAT, BASE_NONE, NULL, 0x00, NULL, HFILL
770 &hf_dcd_burst_diuc_exit_threshold,
772 "DIUC Mandatory Exit Threshold (in 0.25 dB units)", "wmx.dcd.burst.diuc_exit_threshold",
773 FT_FLOAT, BASE_NONE, NULL, 0x00, NULL, HFILL
779 "FEC Code Type", "wmx.dcd.burst.fec",
780 FT_UINT8, BASE_DEC, VALS(vals_dcd_burst_fec_ofdma), 0x00, NULL, HFILL
786 "Frequency", "wmx.dcd.burst.freq",
787 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_khz, 0x00, NULL, HFILL
792 &hf_dl_burst_reserved,
794 "Reserved", "wmx.dcd.burst.reserved",
795 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL
802 "TCS", "wmx.dcd.burst.tcs",
803 FT_UINT8, BASE_DEC, VALS(vals_dcd_burst_tcs), 0x00, NULL, HFILL
809 "Channel Nr", "wmx.dcd.channel_nr",
810 FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
814 &hf_dcd_config_change_count,
816 "Configuration Change Count", "wmx.dcd.config_change_count",
817 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
821 &hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_physical_cinr_measurements,
823 "Default Averaging Parameter for Physical CINR Measurements (in multiples of 1/16)", "wmx.dcd.default_physical_cinr_meas_averaging_parameter",
824 FT_UINT8, BASE_HEX, NULL, 0xf0, NULL, HFILL
828 &hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter,
830 "Default RSSI and CINR Averaging Parameter", "wmx.dcd.default_rssi_and_cinr_averaging_parameter",
831 FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
835 &hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_rssi_measurements,
837 "Default Averaging Parameter for RSSI Measurements (in multiples of 1/16)", "wmx.dcd.default_rssi_meas_averaging_parameter",
838 FT_UINT8, BASE_HEX, NULL, 0x0f, NULL, HFILL
842 &hf_dcd_tlv_t_22_dl_amc_allocated_physical_bands_bitmap,
844 "DL AMC Allocated Physical Bands Bitmap", "wmx.dcd.dl_amc_allocated_phy_bands_bitmap",
845 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
849 &hf_dcd_dl_burst_profile_diuc,
851 "DIUC", "wmx.dcd.dl_burst_profile_diuc",
852 FT_UINT8, BASE_DEC, VALS(diuc_msgs), 0x0F, NULL, HFILL
856 &hf_dcd_dl_burst_profile_rsv,
858 "Reserved", "wmx.dcd.dl_burst_profile_rsv",
859 FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL
863 &hf_dcd_downlink_channel_id,
865 "Reserved", "wmx.dcd.dl_channel_id",
866 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
870 &hf_dcd_tlv_t_153_downlink_burst_profile_for_mutiple_fec_types,
872 "Downlink Burst Profile for Multiple FEC Types","wimax.dcd.dl_burst_profile_multiple_fec_types",
873 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
877 &hf_dcd_tlv_t_34_dl_region_definition,
879 "DL Region Definition", "wmx.dcd.dl_region_definition",
880 FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL
884 &hf_dcd_tlv_t_34_dl_region_definition_num_region,
886 "Number of Regions", "wmx.dcd.dl_region_definition.num_region",
887 FT_UINT8, BASE_DEC, NULL, 0xFC, NULL, HFILL
891 &hf_dcd_tlv_t_34_dl_region_definition_num_subchannels,
893 "Number of Subchannels", "wmx.dcd.dl_region_definition.num_subchannels",
894 FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
898 &hf_dcd_tlv_t_34_dl_region_definition_num_symbols,
900 "Number of OFDMA Symbols", "wmx.dcd.dl_region_definition.num_symbols",
901 FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
905 &hf_dcd_tlv_t_34_dl_region_definition_reserved,
907 "Reserved", "wmx.dcd.dl_region_definition.reserved",
908 FT_UINT8, BASE_DEC, NULL, 0x03, NULL, HFILL
912 &hf_dcd_tlv_t_34_dl_region_definition_subchannel_offset,
914 "Subchannel Offset", "wmx.dcd.dl_region_definition.subchannel_offset",
915 FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
919 &hf_dcd_tlv_t_34_dl_region_definition_symbol_offset,
921 "OFDMA Symbol Offset", "wmx.dcd.dl_region_definition.symbol_offset",
922 FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
925 #ifndef WIMAX_16D_2004
929 "EIRXP (IR, max)", "wmx.dcd.eirxp",
930 FT_INT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_dbm, 0x00, NULL, HFILL
935 &hf_dcd_frame_duration,
937 "Frame Duration", "wmx.dcd.frame_duration",
938 FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL
942 &hf_dcd_frame_duration_code,
944 "Frame Duration Code", "wmx.dcd.frame_duration_code",
945 FT_UINT8, BASE_HEX, VALS(vals_dcd_frame_duration), 0x00, NULL, HFILL
951 "Frame Number", "wmx.dcd.frame_nr",
952 FT_UINT24, BASE_DEC, NULL, 0x00, NULL, HFILL
958 "Downlink Center Frequency", "wmx.dcd.frequency",
959 FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_khz, 0x00, NULL, HFILL
963 &hf_dcd_tlv_t_31_h_add_threshold,
965 "H_add Threshold", "wmx.dcd.h_add_threshold",
966 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_db, 0x0, NULL, HFILL
969 #ifdef WIMAX_16D_2004
971 &hf_dcd_h_arq_ack_delay,
973 "H-ARQ ACK Delay for DL Burst", "wmx.dcd.h_arq_ack_delay_dl_burst",
974 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_offset, 0x00, "", HFILL
979 &hf_dcd_h_arq_ack_delay,
981 "H-ARQ ACK Delay for UL Burst", "wmx.dcd.h_arq_ack_delay_ul_burst",
982 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_offset, 0x00, NULL, HFILL
987 &hf_dcd_tlv_t_32_h_delete_threshold,
989 "H_delete Threshold", "wmx.dcd.h_delete_threshold",
990 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_db, 0x0, NULL, HFILL
994 &hf_dcd_tlv_t_50_ho_type_support,
996 "HO Type Support", "wmx.dcd.ho_type_support",
997 FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
1001 &hf_dcd_tlv_t_50_ho_type_support_fbss_ho,
1003 "FBSS HO", "wmx.dcd.ho_type_support.fbss_ho",
1004 FT_UINT8, BASE_HEX, VALS(tfs_support), 0x20, NULL, HFILL
1008 &hf_dcd_tlv_t_50_ho_type_support_ho,
1010 "HO", "wmx.dcd.ho_type_support.ho",
1011 FT_UINT8, BASE_HEX, VALS(tfs_support), 0x80, NULL, HFILL
1015 &hf_dcd_tlv_t_50_ho_type_support_mdho,
1017 "MDHO", "wmx.dcd.ho_type_support.mdho",
1018 FT_UINT8, BASE_HEX, VALS(tfs_support), 0x40, NULL, HFILL
1022 &hf_dcd_tlv_t_50_ho_type_support_reserved,
1024 "Reserved", "wmx.dcd.ho_type_support.reserved",
1025 FT_UINT8, BASE_HEX, NULL, 0x1f, NULL, HFILL
1029 &hf_dcd_tlv_t_51_hysteresis_margin,
1031 "Hysteresis Margin", "wmx.dcd.hysteresis_margin",
1032 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_db, 0x0, NULL, HFILL
1036 &hf_dcd_invalid_tlv,
1038 "Invalid TLV", "wmx.dcd.invalid_tlv",
1039 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
1043 &hf_dcd_mac_version,
1045 "MAC Version", "wmx.dcd.mac_version",
1046 FT_UINT8, BASE_DEC, VALS(vals_dcd_mac_version), 0x00, NULL, HFILL
1050 &hf_dcd_tlv_t_20_maximum_retransmission,
1052 "Maximum Retransmission", "wmx.dcd.maximum_retransmission",
1053 FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
1057 &hf_dcd_tlv_t_60_noise_interference,
1059 "Noise and Interference", "wmx.dcd.noise_interference",
1060 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
1064 &hf_dcd_tlv_t_35_paging_group_id,
1066 "Paging Group ID", "wmx.dcd.paging_group_id",
1067 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL
1071 &hf_dcd_tlv_t_36_tusc1_permutation_active_subchannels_bitmap,
1073 "TUSC1 permutation active subchannels bitmap", "wmx.dcd.tusc1",
1074 FT_UINT16, BASE_HEX, NULL, 0xFF80, NULL, HFILL
1078 &hf_dcd_tlv_t_37_tusc2_permutation_active_subchannels_bitmap,
1080 "TUSC2 permutation active subchannels bitmap", "wmx.dcd.tusc2",
1081 FT_UINT16, BASE_HEX, NULL, 0xFFF8, NULL, HFILL
1085 &hf_dcd_tlv_t_45_paging_interval_length,
1087 "Paging Interval Length", "wmx.dcd.paging_interval_length",
1088 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
1092 &hf_dcd_tlv_t_45_paging_interval_reserved,
1094 "Reserved", "wmx.dcd.paging_interval_reserved",
1095 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
1099 &hf_dcd_tlv_t_19_permutation_type_for_broadcast_regions_in_harq_zone,
1101 "Permutation Type for Broadcast Region in HARQ Zone", "wmx.dcd.permutation_type_broadcast_region_in_harq_zone",
1102 FT_UINT8, BASE_DEC, VALS(vals_dcd_permutation_type), 0x00, NULL, HFILL
1108 "PHY Type", "wmx.dcd.phy_type",
1109 FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
1113 &hf_dcd_power_adjustment,
1115 "Power Adjustment Rule", "wmx.dcd.power_adjustment",
1116 FT_UINT8, BASE_HEX, VALS(vals_dcd_power_adjustmnt), 0x00, NULL, HFILL
1119 #ifdef WIMAX_16D_2004
1123 "RSS (IR, max)", "wmx.dcd.rss",
1124 FT_INT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_dbm, 0x00, "", HFILL
1131 "RTG", "wmx.dcd.rtg",
1132 FT_UINT8, BASE_HEX|BASE_UNIT_STRING, &wimax_units_ps, 0x00, NULL, HFILL
1135 #ifdef WIMAX_16D_2004
1137 &hf_dcd_size_cqich_id,
1139 "Size of CQICH-ID Field", "wmx.dcd.size_cqich_id",
1140 FT_UINT8, BASE_DEC, VALS(vals_dcd_size_of_cqich_id), 0x00, "", HFILL
1145 &hf_dcd_channel_switch_frame_nr,
1147 "Channel Switch Frame Number", "wmx.dcd.switch_frame",
1148 FT_UINT24, BASE_DEC, NULL, 0x00, NULL, HFILL
1152 &hf_dcd_tlv_t_52_time_to_trigger_duration,
1154 "Time to Trigger Duration", "wmx.dcd.time_trigger_duration",
1155 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_ms, 0x0, NULL, HFILL
1159 &hf_dcd_tlv_t_543_trigger_averaging_duration,
1161 "Trigger Averaging Duration", "wmx.dcd.trigger_averaging_duration",
1162 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
1166 &hf_dcd_tlv_t_542_trigger_value,
1168 "Trigger Value", "wmx.dcd.trigger_value",
1169 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
1175 "TTG", "wmx.dcd.ttg",
1176 FT_UINT16, BASE_HEX|BASE_UNIT_STRING, &wimax_units_ps, 0x00, NULL, HFILL
1180 &hf_dcd_tlv_t_541_type_function_action,
1182 "Type/Function/Action", "wmx.dcd.type_function_action",
1183 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
1187 &hf_dcd_tlv_t_541_action,
1189 "Action", "wmx.dcd.type_function_action.action",
1190 FT_UINT8, BASE_HEX, VALS(vals_dcd_action), 0x7, NULL, HFILL
1194 &hf_dcd_tlv_t_541_function,
1196 "Function", "wmx.dcd.type_function_action.function",
1197 FT_UINT8, BASE_HEX, VALS(vals_dcd_function), 0x38, NULL, HFILL
1201 &hf_dcd_tlv_t_541_type,
1203 "Type", "wmx.dcd.type_function_action.type",
1204 FT_UINT8, BASE_HEX, VALS(vals_dcd_type), 0xC0, NULL, HFILL
1208 &hf_dcd_unknown_type,
1210 "Unknown DCD Type", "wmx.dcd.unknown_tlv_value",
1211 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
1216 /* Setup protocol subtree array */
1217 static gint *ett[] =
1219 &ett_mac_mgmt_msg_dcd_decoder,
1222 proto_mac_mgmt_msg_dcd_decoder = proto_register_protocol (
1223 "WiMax DCD Messages", /* name */
1224 "WiMax DCD", /* short name */
1225 "wmx.dcd" /* abbrev */
1228 proto_register_field_array(proto_mac_mgmt_msg_dcd_decoder, hf, array_length(hf));
1229 proto_register_subtree_array(ett, array_length(ett));
1232 void proto_reg_handoff_mac_mgmt_msg_dcd(void)
1234 dissector_handle_t dcd_handle;
1236 dcd_handle = create_dissector_handle(dissect_mac_mgmt_msg_dcd_decoder, proto_mac_mgmt_msg_dcd_decoder);
1237 dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DCD, dcd_handle);
1241 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1246 * indent-tabs-mode: t
1249 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
1250 * :indentSize=8:tabSize=8:noTabs=false: