2 * WiMax MAC Management PRC-LT-CTRL Message decoders
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
19 #include <epan/packet.h>
20 #include "wimax_mac.h"
23 void proto_register_mac_mgmt_msg_prc_lt_ctrl(void);
24 void proto_reg_handoff_mac_mgmt_msg_prc_lt_ctrl(void);
26 static dissector_handle_t prc_handle
;
28 static int proto_mac_mgmt_msg_prc_lt_ctrl_decoder
;
30 static int ett_mac_mgmt_msg_prc_lt_ctrl_decoder
;
32 /* PRC-LT-CTRL fields */
33 static int hf_prc_lt_ctrl_precoding
;
34 static int hf_prc_lt_ctrl_precoding_delay
;
35 /* static int hf_prc_lt_ctrl_invalid_tlv; */
37 static const value_string vals_turn_on
[] = {
44 /* Decode PRC-LT-CTRL messages. */
45 static int dissect_mac_mgmt_msg_prc_lt_ctrl_decoder(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
48 proto_item
*prc_lt_ctrl_item
;
49 proto_tree
*prc_lt_ctrl_tree
;
51 { /* we are being asked for details */
53 /* display MAC payload type PRC-LT-CTRL */
54 prc_lt_ctrl_item
= proto_tree_add_protocol_format(tree
, proto_mac_mgmt_msg_prc_lt_ctrl_decoder
, tvb
, 0, -1, "MAC Management Message, PRC-LT-CTRL");
56 /* add MAC PRC-LT-CTRL subtree */
57 prc_lt_ctrl_tree
= proto_item_add_subtree(prc_lt_ctrl_item
, ett_mac_mgmt_msg_prc_lt_ctrl_decoder
);
59 /* display whether to Setup or Tear-down the
60 * long-term MIMO precoding delay */
61 proto_tree_add_item(prc_lt_ctrl_tree
, hf_prc_lt_ctrl_precoding
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
63 /* display the Precoding Delay */
64 proto_tree_add_item(prc_lt_ctrl_tree
, hf_prc_lt_ctrl_precoding_delay
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
66 return tvb_captured_length(tvb
);
69 /* Register Wimax Mac Payload Protocol and Dissector */
70 void proto_register_mac_mgmt_msg_prc_lt_ctrl(void)
72 /* PRC-LT-CTRL fields display */
73 static hf_register_info hf
[] =
77 &hf_prc_lt_ctrl_invalid_tlv
,
79 "Invalid TLV", "wmx.prc_lt_ctrl.invalid_tlv",
80 FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
85 &hf_prc_lt_ctrl_precoding
,
87 "Setup/Tear-down long-term precoding with feedback",
88 "wmx.prc_lt_ctrl.precoding",
89 FT_UINT8
, BASE_DEC
, VALS(vals_turn_on
), 0x80, NULL
, HFILL
93 &hf_prc_lt_ctrl_precoding_delay
,
95 "BS precoding application delay",
96 "wmx.prc_lt_ctrl.precoding_delay",
97 FT_UINT8
, BASE_DEC
, NULL
, 0x60, NULL
, HFILL
102 /* Setup protocol subtree array */
105 &ett_mac_mgmt_msg_prc_lt_ctrl_decoder
,
108 proto_mac_mgmt_msg_prc_lt_ctrl_decoder
= proto_register_protocol (
109 "WiMax PRC-LT-CTRL Message", /* name */
110 "WiMax PRC-LT-CTRL (prc)", /* short name */
111 "wmx.prc_lt_ctrl" /* abbrev */
114 proto_register_field_array(proto_mac_mgmt_msg_prc_lt_ctrl_decoder
, hf
, array_length(hf
));
115 proto_register_subtree_array(ett
, array_length(ett
));
116 prc_handle
= register_dissector("mac_mgmt_msg_prc_lt_ctrl_handler", dissect_mac_mgmt_msg_prc_lt_ctrl_decoder
, proto_mac_mgmt_msg_prc_lt_ctrl_decoder
);
120 proto_reg_handoff_mac_mgmt_msg_prc_lt_ctrl(void)
122 dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_PRC_LT_CTRL
, prc_handle
);
126 * Editor modelines - https://www.wireshark.org/tools/modelines.html
131 * indent-tabs-mode: t
134 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
135 * :indentSize=8:tabSize=8:noTabs=false: