Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / plugins / epan / wimax / msg_rng_req.c
blobef68fd306abdf6b2fdb94db9c6221fa52b9abce6
1 /* msg_rng_req.c
2 * WiMax MAC Management RNG-REQ Message decoder
4 * Copyright (c) 2007 by Intel Corporation.
6 * Author: John R. Underwood <junderx@yahoo.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_tlv.h"
23 #include "wimax_mac.h"
24 #include "wimax_utils.h"
25 #include "wimax_prefs.h"
27 void proto_register_mac_mgmt_msg_rng_req(void);
28 void proto_reg_handoff_mac_mgmt_msg_rng_req(void);
30 static dissector_handle_t rng_req_handle;
32 static int proto_mac_mgmt_msg_rng_req_decoder;
33 static int ett_mac_mgmt_msg_rng_req_decoder;
35 /* RNG-REQ fields */
36 static int hf_rng_req_reserved;
37 static int hf_rng_req_dl_burst_profile_diuc;
38 static int hf_rng_req_dl_burst_profile_lsb_ccc;
39 static int hf_rng_req_ss_mac_address;
40 static int hf_rng_req_ranging_anomalies_max_power;
41 static int hf_rng_req_ranging_anomalies_min_power;
42 static int hf_rng_req_ranging_anomalies_timing_adj;
43 static int hf_rng_req_aas_broadcast;
44 static int hf_rng_req_serving_bs_id;
45 static int hf_rng_req_ranging_purpose_ho_indication;
46 static int hf_rng_req_ranging_purpose_location_update_request;
47 static int hf_rng_req_ranging_purpose_reserved;
48 static int hf_rng_req_ho_id;
49 static int hf_rng_req_power_down_indicator;
50 static int hf_rng_req_repetition_coding_level;
51 static int hf_rng_req_requested_downlink_repetition_coding_level_reserved;
52 static int hf_rng_req_cmac_key_count;
53 static int hf_rng_definition_of_power_saving_class_present;
54 static int hf_rng_activation_of_power_saving_class;
55 static int hf_rng_trf_ind_required;
56 static int hf_rng_power_saving_class_reserved;
57 static int hf_rng_power_saving_class_id;
58 static int hf_rng_power_saving_class_type;
59 static int hf_rng_power_saving_first_sleep_window_frame;
60 static int hf_rng_power_saving_initial_sleep_window;
61 static int hf_rng_power_saving_listening_window;
62 static int hf_rng_power_saving_final_sleep_window_base;
63 static int hf_rng_power_saving_final_sleep_window_exp;
64 static int hf_rng_power_saving_slpid;
65 static int hf_rng_power_saving_included_cid;
66 static int hf_rng_power_saving_mgmt_connection_direction;
67 static int hf_tlv_type;
68 static int hf_rng_invalid_tlv;
69 static int hf_rng_power_saving_class_flags;
70 static int hf_rng_req_dl_burst_profile;
71 static int hf_rng_req_ranging_anomalies;
72 static int hf_rng_req_ranging_purpose_indication;
73 static int hf_rng_req_requested_rep_coding_level;
75 /* STRING RESOURCES */
77 static const true_false_string tfs_rng_req_aas_broadcast = {
78 "SS cannot receive broadcast messages",
79 "SS can receive broadcast messages"
82 static const value_string vals_rng_req_ranging_purpose_location_update_request[] = {
83 {1, "MS action of Idle Mode Location Update Process"},
84 {0, NULL}
87 static const value_string vals_rng_req_repetition_coding_level[] = {
88 {0, "No repetition"},
89 {1, "Repetition coding of 2"},
90 {2, "Repetition coding of 4"},
91 {3, "Repetition coding of 6"},
92 {0, NULL}
95 static const true_false_string tfs_rng_activate = {
96 "Activate",
97 "Deactivate"
100 static const true_false_string tfs_rng_max_power = {
101 "SS is already at maximum power",
102 "SS is not at maximum power"
105 static const true_false_string tfs_rng_min_power = {
106 "SS is already at minimum power",
107 "SS is not at minimum power"
110 static const true_false_string tfs_rng_timing_adj = {
111 "Sum of commanded timing adjustments is too large",
112 "Sum of commanded timing adjustments is within bounds"
115 /* Decode RNG Power Saving Class parameters (Sub TLV's). */
116 void dissect_power_saving_class(proto_tree *rng_req_tree, int tlv_type, tvbuff_t *tvb, unsigned compound_tlv_len, packet_info *pinfo, unsigned offset)
118 proto_item *tlv_item;
119 proto_tree *tlv_tree;
120 proto_tree *power_saving_class_tree = NULL;
121 unsigned tlv_len;
122 unsigned tlv_offset;
123 tlv_info_t tlv_info;
125 /* Add a subtree for the power saving class parameters */
126 tlv_item = proto_tree_add_protocol_format(rng_req_tree, proto_mac_mgmt_msg_rng_req_decoder, tvb, offset, compound_tlv_len, "Power saving class parameters (%u bytes)", compound_tlv_len);
127 power_saving_class_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rng_req_decoder);
129 /* Update the compound_tlv_len to include the offset */
130 compound_tlv_len += offset;
132 while(offset < compound_tlv_len)
134 /* Get the TLV data. */
135 init_tlv_info(&tlv_info, tvb, offset);
136 /* get the TLV type */
137 tlv_type = get_tlv_type(&tlv_info);
138 /* get the TLV length */
139 tlv_len = get_tlv_length(&tlv_info);
140 if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
141 { /* invalid tlv info */
142 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "RNG-REQ TLV error");
143 proto_tree_add_item(power_saving_class_tree, hf_rng_invalid_tlv, tvb, offset, (compound_tlv_len - offset), ENC_NA);
144 break;
146 /* get the offset to the TLV data */
147 tlv_offset = offset + get_tlv_value_offset(&tlv_info);
149 switch (tlv_type) {
150 case RNG_POWER_SAVING_CLASS_FLAGS:
151 /* display Power Saving Class Flags */
152 /* add subtree */
153 tlv_item = add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_class_flags, tvb, offset, ENC_BIG_ENDIAN);
154 tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rng_req_decoder);
155 proto_tree_add_item(tlv_tree, hf_rng_definition_of_power_saving_class_present, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
156 proto_tree_add_item(tlv_tree, hf_rng_activation_of_power_saving_class, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
157 proto_tree_add_item(tlv_tree, hf_rng_trf_ind_required, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
158 proto_tree_add_item(tlv_tree, hf_rng_power_saving_class_reserved, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
159 break;
160 case RNG_POWER_SAVING_CLASS_ID:
161 add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_class_id, tvb, offset, ENC_BIG_ENDIAN);
162 break;
163 case RNG_POWER_SAVING_CLASS_TYPE:
164 add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_class_type, tvb, offset, ENC_BIG_ENDIAN);
165 break;
166 case RNG_START_FRAME_NUMBER:
167 add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_first_sleep_window_frame, tvb, offset, ENC_BIG_ENDIAN);
168 break;
169 case RNG_INITIAL_SLEEP_WINDOW:
170 add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_initial_sleep_window, tvb, offset, ENC_BIG_ENDIAN);
171 break;
172 case RNG_LISTENING_WINDOW:
173 add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_listening_window, tvb, offset, ENC_BIG_ENDIAN);
174 break;
175 case RNG_FINAL_SLEEP_WINDOW_BASE:
176 add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_final_sleep_window_base, tvb, offset, ENC_BIG_ENDIAN);
177 break;
178 case RNG_FINAL_SLEEP_WINDOW_EXPONENT:
179 add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_final_sleep_window_exp, tvb, offset, ENC_BIG_ENDIAN);
180 break;
181 case RNG_SLPID:
182 add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_slpid, tvb, offset, ENC_BIG_ENDIAN);
183 break;
184 case RNG_CID:
185 add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_included_cid, tvb, offset, ENC_BIG_ENDIAN);
186 break;
187 case RNG_DIRECTION:
188 add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_mgmt_connection_direction, tvb, offset, ENC_BIG_ENDIAN);
189 break;
190 default:
191 add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_tlv_type, tvb, offset, ENC_NA);
192 break;
194 /* update the offset */
195 offset = tlv_len + tlv_offset;
196 } /* end of TLV process while loop */
200 /* Decode RNG-REQ messages. */
201 static int dissect_mac_mgmt_msg_rng_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
203 unsigned offset = 0;
204 unsigned tlv_offset;
205 unsigned tvb_len;
206 proto_item *rng_req_item, *tlv_item;
207 proto_tree *rng_req_tree, *tlv_tree;
208 tlv_info_t tlv_info;
209 int tlv_type;
210 int tlv_len;
212 { /* we are being asked for details */
214 /* Get the tvb reported length */
215 tvb_len = tvb_reported_length(tvb);
216 /* display MAC payload type RNG-REQ */
217 rng_req_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_rng_req_decoder, tvb, offset, tvb_len, "MAC Management Message, RNG-REQ");
218 /* add MAC RNG-REQ subtree */
219 rng_req_tree = proto_item_add_subtree(rng_req_item, ett_mac_mgmt_msg_rng_req_decoder);
220 /* display the Message Type */
221 proto_tree_add_item(rng_req_tree, hf_rng_req_reserved, tvb, 0, 1, ENC_BIG_ENDIAN);
222 offset += 1;
224 while(offset < tvb_len)
226 /* Get the TLV data. */
227 init_tlv_info(&tlv_info, tvb, offset);
228 /* get the TLV type */
229 tlv_type = get_tlv_type(&tlv_info);
230 /* get the TLV length */
231 tlv_len = get_tlv_length(&tlv_info);
232 if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
233 { /* invalid tlv info */
234 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "RNG-REQ TLV error");
235 proto_tree_add_item(rng_req_tree, hf_rng_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
236 break;
238 /* get the offset to the TLV data */
239 tlv_offset = offset + get_tlv_value_offset(&tlv_info);
241 switch (tlv_type) {
242 case RNG_REQ_DL_BURST_PROFILE:
243 /* add TLV subtree */
244 tlv_item = add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_dl_burst_profile, tvb, offset, ENC_BIG_ENDIAN);
245 tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rng_req_decoder);
246 proto_tree_add_item(tlv_tree, hf_rng_req_dl_burst_profile_diuc, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
247 proto_tree_add_item(tlv_tree, hf_rng_req_dl_burst_profile_lsb_ccc, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
248 break;
249 case RNG_REQ_SS_MAC_ADDRESS:
250 add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_ss_mac_address, tvb, offset, ENC_NA);
251 break;
252 case RNG_REQ_RANGING_ANOMALIES:
253 tlv_item = add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_ranging_anomalies, tvb, offset, ENC_BIG_ENDIAN);
254 tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rng_req_decoder);
255 proto_tree_add_item(tlv_tree, hf_rng_req_ranging_anomalies_max_power, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
256 proto_tree_add_item(tlv_tree, hf_rng_req_ranging_anomalies_min_power, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
257 proto_tree_add_item(tlv_tree, hf_rng_req_ranging_anomalies_timing_adj, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
258 break;
259 case RNG_REQ_AAS_BROADCAST:
260 add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_aas_broadcast, tvb, offset, ENC_BIG_ENDIAN);
261 break;
262 case RNG_REQ_SERVING_BS_ID:
263 add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_serving_bs_id, tvb, offset, ENC_NA);
264 break;
265 case RNG_REQ_RANGING_PURPOSE_INDICATION:
266 /* display the Ranging Purpose Flags */
267 tlv_item = add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_ranging_purpose_indication, tvb, offset, ENC_BIG_ENDIAN);
268 tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rng_req_decoder);
269 proto_tree_add_item(tlv_tree, hf_rng_req_ranging_purpose_ho_indication, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
270 proto_tree_add_item(tlv_tree, hf_rng_req_ranging_purpose_location_update_request, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
271 proto_tree_add_item(tlv_tree, hf_rng_req_ranging_purpose_reserved, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
272 break;
273 case RNG_REQ_HO_ID:
274 add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_ho_id, tvb, offset, ENC_BIG_ENDIAN);
275 break;
276 case RNG_REQ_POWER_DOWN_INDICATOR:
277 add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_power_down_indicator, tvb, offset, ENC_BIG_ENDIAN);
278 break;
279 case RNG_REQ_REQUESTED_DNLK_REP_CODING_LEVEL:
280 tlv_item = add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_requested_rep_coding_level, tvb, offset, ENC_BIG_ENDIAN);
281 tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rng_req_decoder);
282 proto_tree_add_item(tlv_tree, hf_rng_req_repetition_coding_level, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
283 proto_tree_add_item(tlv_tree, hf_rng_req_requested_downlink_repetition_coding_level_reserved, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
284 break;
285 case RNG_REQ_CMAC_KEY_COUNT:
286 if (include_cor2_changes) {
287 add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_cmac_key_count, tvb, offset, ENC_BIG_ENDIAN);
288 } else {
289 /* Unknown TLV type */
290 add_tlv_subtree(&tlv_info, rng_req_tree, hf_tlv_type, tvb, offset, ENC_NA);
292 break;
293 case SHORT_HMAC_TUPLE:
294 case SHORT_HMAC_TUPLE_COR2:
295 if ((!include_cor2_changes && (tlv_type == SHORT_HMAC_TUPLE)) ||
296 (include_cor2_changes && (tlv_type == SHORT_HMAC_TUPLE_COR2))) {
297 /* decode and display the Short HMAC Tuple */
298 tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_rng_req_decoder, rng_req_tree, proto_mac_mgmt_msg_rng_req_decoder, tvb, offset, tlv_len, "Short HMAC Tuple");
299 wimax_short_hmac_tuple_decoder(tlv_tree, tvb, tlv_offset, tvb_len - offset);
300 } else {
301 /* Unknown TLV Type */
302 add_tlv_subtree(&tlv_info, rng_req_tree, hf_tlv_type, tvb, offset, ENC_NA);
304 break;
305 case MAC_VERSION_ENCODING:
306 offset += wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, rng_req_tree);
307 continue;
308 break;
309 case RNG_REQ_POWER_SAVING_CLASS_PARAMETERS:
310 tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_rng_req_decoder, rng_req_tree, proto_mac_mgmt_msg_rng_req_decoder, tvb, offset, tlv_len, "Power Saving Class Parameters");
311 dissect_power_saving_class(tlv_tree, tlv_type, tvb, tlv_len, pinfo, tlv_offset);
312 break;
313 default:
314 add_tlv_subtree(&tlv_info, rng_req_tree, hf_tlv_type, tvb, offset, ENC_NA);
315 break;
317 /* update the offset */
318 offset = tlv_len + tlv_offset;
319 } /* end of TLV process while loop */
321 return tvb_captured_length(tvb);
324 /* Register Wimax Mac Payload Protocol and Dissector */
325 void proto_register_mac_mgmt_msg_rng_req(void)
327 /* RNG-REQ fields display */
328 static hf_register_info hf[] =
331 &hf_rng_activation_of_power_saving_class,
333 "Activation of Power Saving Class (Types 1 and 2 only)", "wmx.rng.power_save.activate",
334 FT_BOOLEAN, 8, TFS(&tfs_rng_activate), 0x02, NULL, HFILL
338 &hf_rng_power_saving_class_id,
340 "Power Saving Class ID", "wmx.rng.power_save.class_id",
341 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
345 &hf_rng_power_saving_class_type,
347 "Power Saving Class Type", "wmx.rng.power_save.class_type",
348 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
352 &hf_rng_definition_of_power_saving_class_present,
354 "Definition of Power Saving Class present", "wmx.rng.power_save.definition_present",
355 FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL
359 &hf_rng_power_saving_final_sleep_window_base,
361 "Final-sleep window base (measured in frames)", "wmx.rng.power_save.final_sleep_window_base",
362 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
366 &hf_rng_power_saving_final_sleep_window_exp,
368 "Final-sleep window exponent (measured in frames)", "wmx.rng.power_save.final_sleep_window_exp",
369 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
373 &hf_rng_power_saving_first_sleep_window_frame,
375 "Start frame number for first sleep window", "wmx.rng.power_save.first_sleep_window_frame",
376 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
380 &hf_rng_power_saving_included_cid,
382 "CID of connection to be included into the Power Saving Class.", "wmx.rng.power_save.included_cid",
383 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
387 &hf_rng_power_saving_initial_sleep_window,
389 "Initial-sleep window", "wmx.rng.power_save.initial_sleep_window",
390 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
394 &hf_rng_power_saving_listening_window,
396 "Listening window duration (measured in frames)", "wmx.rng.power_save.listening_window",
397 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
401 &hf_rng_power_saving_mgmt_connection_direction,
403 "Direction for management connection added to Power Saving Class", "wmx.rng.power_save.mgmt_connection_direction",
404 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
408 &hf_rng_power_saving_class_reserved,
410 "Reserved", "wmx.rng.power_save.reserved",
411 FT_UINT8, BASE_DEC, NULL, 0xF8, NULL, HFILL
415 &hf_rng_power_saving_slpid,
417 "SLPID assigned by the BS whenever an MS is instructed to enter sleep mode", "wmx.rng.power_save.slpid",
418 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
422 &hf_rng_trf_ind_required,
424 "BS shall transmit at least one TRF-IND message during each listening window of the Power Saving Class", "wmx.rng.power_save.trf_ind_required",
425 FT_BOOLEAN, 8, TFS(&tfs_rng_activate), 0x04, NULL, HFILL
429 &hf_rng_req_aas_broadcast,
431 "AAS broadcast capability", "wmx.rng_req.aas_broadcast",
432 FT_BOOLEAN, BASE_NONE, TFS(&tfs_rng_req_aas_broadcast), 0x0, NULL, HFILL
436 &hf_rng_req_ranging_anomalies_max_power,
438 "Meaning", "wmx.rng_req.anomalies.max_power",
439 FT_BOOLEAN, 8, TFS(&tfs_rng_max_power), 0x04, NULL, HFILL
443 &hf_rng_req_ranging_anomalies_min_power,
445 "Meaning", "wmx.rng_req.anomalies.min_power",
446 FT_BOOLEAN, 8, TFS(&tfs_rng_min_power), 0x02, NULL, HFILL
450 &hf_rng_req_ranging_anomalies_timing_adj,
452 "Meaning", "wmx.rng_req.anomalies.timing_adj",
453 FT_BOOLEAN, 8, TFS(&tfs_rng_timing_adj), 0x01, NULL, HFILL
457 &hf_rng_req_cmac_key_count,
459 "CMAC Key Count", "wmx.rng_req.cmac_key_count",
460 FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL
464 &hf_rng_req_dl_burst_profile_lsb_ccc,
466 "LSB of CCC of DCD associated with DIUC", "wmx.rng_req.dl_burst_profile.ccc",
467 FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL
471 &hf_rng_req_dl_burst_profile_diuc,
473 "DIUC", "wmx.rng_req.dl_burst_profile.diuc",
474 FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL
478 &hf_tlv_type,
480 "Unknown TLV Type", "wmx.rng_req.unknown_tlv_type",
481 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
485 &hf_rng_invalid_tlv,
487 "Invalid TLV", "wmx.rng_req.invalid_tlv",
488 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
492 &hf_rng_req_ho_id,
494 "ID from the target BS for use in initial ranging during MS handover to it", "wmx.rng_req.ho_id",
495 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
499 &hf_rng_req_power_down_indicator,
501 "Power down Indicator", "wmx.rng_req.power_down_indicator",
502 FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
506 &hf_rng_req_ranging_purpose_ho_indication,
508 "MS HO indication", "wmx.rng_req.ranging_purpose.ho_indication",
509 FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL
513 &hf_rng_req_ranging_purpose_reserved,
515 "Reserved", "wmx.rng_req.ranging_purpose.reserved",
516 FT_UINT8, BASE_DEC, NULL, 0xFC, NULL, HFILL
520 &hf_rng_req_ranging_purpose_location_update_request,
522 "Location Update Request", "wmx.rng_req.ranging_purpose.loc_update_req",
523 FT_UINT8, BASE_DEC, VALS(vals_rng_req_ranging_purpose_location_update_request), 0x02, NULL, HFILL
527 &hf_rng_req_repetition_coding_level,
529 "Repetition coding level", "wmx.rng_req.repetition_coding_level",
530 FT_UINT8, BASE_DEC, VALS(vals_rng_req_repetition_coding_level), 0x03, NULL, HFILL
534 &hf_rng_req_requested_downlink_repetition_coding_level_reserved,
536 "Reserved", "wmx.rng_req.reserved",
537 FT_UINT8, BASE_DEC, NULL, 0xFC, NULL, HFILL
541 &hf_rng_req_reserved,
543 "Reserved", "wmx.rng_req.reserved",
544 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
548 &hf_rng_req_serving_bs_id,
550 "Former serving BS ID", "wmx.rng_req.serving_bs_id",
551 FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL
555 &hf_rng_req_ss_mac_address,
557 "SS MAC Address", "wmx.rng_req.ss_mac_address",
558 FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL
562 &hf_rng_power_saving_class_flags,
564 "Power Saving Class", "wmx.rng.power_save.flags",
565 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
569 &hf_rng_req_dl_burst_profile,
571 "Requested Downlink Burst Profile", "wmx.rng_req.dl_burst_profile",
572 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
576 &hf_rng_req_ranging_anomalies,
578 "Ranging Anomalies", "wmx.rng_req.anomalies",
579 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
583 &hf_rng_req_ranging_purpose_indication,
585 "Ranging Purpose Flags", "wmx.rng_req.ranging_purpose.indication",
586 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
590 &hf_rng_req_requested_rep_coding_level,
592 "Requested downlink repetition coding level", "wmx.rng_req.requested_rep_coding_level",
593 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
598 /* Setup protocol subtree array */
599 static int *ett[] =
601 &ett_mac_mgmt_msg_rng_req_decoder,
604 proto_mac_mgmt_msg_rng_req_decoder = proto_register_protocol (
605 "WiMax RNG-REQ Messages", /* name */
606 "WiMax RNG-REQ", /* short name */
607 "wmx.rng_req" /* abbrev */
610 proto_register_field_array(proto_mac_mgmt_msg_rng_req_decoder, hf, array_length(hf));
611 proto_register_subtree_array(ett, array_length(ett));
612 rng_req_handle = register_dissector("mac_mgmt_msg_rng_req_handler", dissect_mac_mgmt_msg_rng_req_decoder, proto_mac_mgmt_msg_rng_req_decoder);
615 void proto_reg_handoff_mac_mgmt_msg_rng_req(void)
617 dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_RNG_REQ, rng_req_handle);
622 * Editor modelines - https://www.wireshark.org/tools/modelines.html
624 * Local variables:
625 * c-basic-offset: 8
626 * tab-width: 8
627 * indent-tabs-mode: t
628 * End:
630 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
631 * :indentSize=8:tabSize=8:noTabs=false: