aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-09-24 18:45:39 +0000
committerMichael Mann <mmann78@netscape.net>2013-09-24 18:45:39 +0000
commit1ac3997acb378af43aa4397df807b320ce56b134 (patch)
treea2ad59ae862f5cca90370d7c580535c1a430fcc4 /plugins
parent019e64f58d78f88846021cd15ae5af2bab853442 (diff)
Wimax dissector improvements:
1. Remove message type field from all MAC Management "sub"dissectors and place it in Mac Management subdissector itself. This may cause backwards-compatibility issues (malformed packets) with third-party subdissectors of the MAC Management dissector, but it didn't make sense to have so many filters for a single enumerated value, especially when the various "protocol" filters covers many of them. 2. Removed some if(tree) checks as column info and calling other dissectors are sometimes executed underneath. Some of this is in preparation for addressing bug 5349. 3. Make all dissector functions (and a few others) static, and use register_dissector() when necessary. 4. Convert generic decoder CRC errors into expert info, rather than have it be a "protocol" filter (it just looks funny that way) In general, these dissectors seem "over-protocolized". I understand the need for all of the dissectors, but I don't know if they all need "protocol" status. svn path=/trunk/; revision=52203
Diffstat (limited to 'plugins')
-rw-r--r--plugins/wimax/mac_hd_generic_decoder.c90
-rw-r--r--plugins/wimax/mac_mgmt_msg_decoder.c120
-rw-r--r--plugins/wimax/msg_aas_beam.c84
-rw-r--r--plugins/wimax/msg_aas_fbck.c60
-rw-r--r--plugins/wimax/msg_arq.c75
-rw-r--r--plugins/wimax/msg_clk_cmp.c30
-rw-r--r--plugins/wimax/msg_dcd.c30
-rw-r--r--plugins/wimax/msg_dlmap.c89
-rw-r--r--plugins/wimax/msg_dreg.c59
-rw-r--r--plugins/wimax/msg_dsa.c110
-rw-r--r--plugins/wimax/msg_dsc.c107
-rw-r--r--plugins/wimax/msg_dsd.c67
-rw-r--r--plugins/wimax/msg_dsx_rvd.c26
-rw-r--r--plugins/wimax/msg_fpc.c39
-rw-r--r--plugins/wimax/msg_pkm.c111
-rw-r--r--plugins/wimax/msg_pmc.c61
-rw-r--r--plugins/wimax/msg_prc_lt_ctrl.c33
-rw-r--r--plugins/wimax/msg_reg_req.c28
-rw-r--r--plugins/wimax/msg_reg_rsp.c43
-rw-r--r--plugins/wimax/msg_rep.c63
-rw-r--r--plugins/wimax/msg_res_cmd.c27
-rw-r--r--plugins/wimax/msg_rng_req.c35
-rw-r--r--plugins/wimax/msg_rng_rsp.c45
-rw-r--r--plugins/wimax/msg_sbc.c61
-rw-r--r--plugins/wimax/msg_ucd.c26
-rw-r--r--plugins/wimax/msg_ulmap.c106
-rw-r--r--plugins/wimax/packet-wmx.c2
-rw-r--r--plugins/wimax/wimax_harq_map_decoder.c7
-rw-r--r--plugins/wimax/wimax_pdu_decoder.c26
29 files changed, 467 insertions, 1193 deletions
diff --git a/plugins/wimax/mac_hd_generic_decoder.c b/plugins/wimax/mac_hd_generic_decoder.c
index 5e23f10869..5cf1914715 100644
--- a/plugins/wimax/mac_hd_generic_decoder.c
+++ b/plugins/wimax/mac_hd_generic_decoder.c
@@ -42,6 +42,7 @@
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
+#include <epan/expert.h>
#include <epan/address.h>
#include <epan/reassemble.h>
#include "crc.h"
@@ -61,7 +62,8 @@ extern guint max_logical_bands; /* declared in wimax_compact_dlmap_ie_decoder.
extern gboolean is_down_link(packet_info *pinfo);/* declared in packet-wmx.c */
extern void init_wimax_globals(void); /* defined in msg_ulmap.c */
-static dissector_handle_t mac_mgmt_msg_decoder_handle;
+static dissector_handle_t mac_mgmt_msg_decoder_handle = NULL;
+static dissector_handle_t mac_ip_handle = NULL;
/* global variables */
gboolean include_cor2_changes = FALSE;
@@ -584,6 +586,9 @@ static gint hf_mac_header_generic_arq_fb_ie_seq1_length_6 = -1;
static gint hf_mac_header_generic_arq_fb_ie_seq2_length_6 = -1;
static gint hf_mac_header_generic_arq_fb_ie_rsv = -1;
+static expert_field ei_mac_crc_malformed = EI_INIT;
+static expert_field ei_mac_crc_missing = EI_INIT;
+
/* Last IE Indicators */
static const value_string last_ie_msgs[] =
{
@@ -694,7 +699,7 @@ static guint decode_packing_subheader(tvbuff_t *payload_tvb, packet_info *pinfo,
}
-void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
guint payload_offset;
@@ -724,15 +729,15 @@ void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto
fragment_head *payload_frag;
gboolean first_arq_fb_payload = TRUE;
- dissector_handle_t mac_payload_handle;
-
proto_mac_header_generic_decoder = proto_wimax;
- if (tree)
- { /* we are being asked for details */
+
#ifdef DEBUG
- /* update the info column */
- col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "GMH");
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "GMH");
#endif
+
+ if (tree)
+ { /* we are being asked for details */
/* Get the frame length */
tvb_len = tvb_reported_length(tvb);
if (tvb_len < WIMAX_MAC_HEADER_SIZE)
@@ -1193,9 +1198,8 @@ void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto
/* check the data type */
if (tvb_get_guint8(payload_tvb, payload_offset) == IP_HEADER_BYTE)
{
- mac_payload_handle = find_dissector("ip");
- if (mac_payload_handle)
- call_dissector(mac_payload_handle, tvb_new_subset(payload_tvb, payload_offset, new_tvb_len, new_tvb_len), pinfo, generic_tree);
+ if (mac_ip_handle)
+ call_dissector(mac_ip_handle, tvb_new_subset(payload_tvb, payload_offset, new_tvb_len, new_tvb_len), pinfo, generic_tree);
else /* display the Generic MAC Header in Hex */
proto_tree_add_item(generic_tree, hf_mac_header_generic_value_bytes, payload_tvb, payload_offset, new_tvb_len, ENC_NA);
}
@@ -1211,37 +1215,38 @@ void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto
length -= frag_len;
offset += frag_len;
} /* end of payload decoding */
+ }
+
check_crc:
- /* Decode and display the CRC if it is present */
- if (mac_ci)
- {
- /* add the CRC info */
- proto_item_append_text(parent_item, ", CRC");
- /* check the length */
- if (MIN(tvb_len, tvb_reported_length(tvb)) >= mac_len)
- { /* get the CRC */
- mac_crc = tvb_get_ntohl(tvb, mac_len - (int)sizeof(mac_crc));
- /* calculate the CRC */
- calculated_crc = wimax_mac_calc_crc32(tvb_get_ptr(tvb, 0, mac_len - (int)sizeof(mac_crc)), mac_len - (int)sizeof(mac_crc));
- /* display the CRC */
- generic_item = proto_tree_add_item(tree, hf_mac_header_generic_crc, tvb, mac_len - (int)sizeof(mac_crc), (int)sizeof(mac_crc), ENC_BIG_ENDIAN);
- if (mac_crc != calculated_crc)
- {
- proto_item_append_text(generic_item, " - incorrect! (should be: 0x%x)", calculated_crc);
- }
- }
- else
- { /* display error message */
- proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, 0, tvb_len, "CRC missing - the frame is too short (%u bytes)", tvb_len);
+ /* Decode and display the CRC if it is present */
+ if (mac_ci)
+ {
+ /* add the CRC info */
+ proto_item_append_text(parent_item, ", CRC");
+ /* check the length */
+ if (MIN(tvb_len, tvb_reported_length(tvb)) >= mac_len)
+ { /* get the CRC */
+ mac_crc = tvb_get_ntohl(tvb, mac_len - (int)sizeof(mac_crc));
+ /* calculate the CRC */
+ calculated_crc = wimax_mac_calc_crc32(tvb_get_ptr(tvb, 0, mac_len - (int)sizeof(mac_crc)), mac_len - (int)sizeof(mac_crc));
+ /* display the CRC */
+ generic_item = proto_tree_add_item(tree, hf_mac_header_generic_crc, tvb, mac_len - (int)sizeof(mac_crc), (int)sizeof(mac_crc), ENC_BIG_ENDIAN);
+ if (mac_crc != calculated_crc)
+ {
+ proto_item_append_text(generic_item, " - incorrect! (should be: 0x%x)", calculated_crc);
}
}
- else /* CRC is not included */
- { /* add the CRC info */
- proto_item_append_text(parent_item, ", No CRC");
- /* display message */
- proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, 0, tvb_len, "CRC is not included in this frame!");
+ else
+ { /* display error message */
+ expert_add_info_format(pinfo, tree, &ei_mac_crc_malformed, "CRC missing - the frame is too short (%u bytes)", tvb_len);
}
}
+ else /* CRC is not included */
+ { /* add the CRC info */
+ proto_item_append_text(parent_item, ", No CRC");
+ /* display message */
+ expert_add_info(pinfo, tree, &ei_mac_crc_missing);
+ }
}
static gint extended_subheader_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@@ -2232,6 +2237,13 @@ void proto_register_mac_header_generic(void)
&ett_mac_data_pdu_decoder,
};
+ static ei_register_info ei[] = {
+ { &ei_mac_crc_malformed, { "wmx.genericCrc.missing", PI_MALFORMED, PI_ERROR, "CRC missing - the frame is too short", EXPFILL }},
+ { &ei_mac_crc_missing, { "wmx.genericCrc.missing", PI_PROTOCOL, PI_NOTE, "CRC is not included in this frame!", EXPFILL }},
+ };
+
+ expert_module_t* expert_mac_header_generic;
+
proto_mac_header_generic_decoder = proto_register_protocol (
"WiMax Generic/Type1/Type2 MAC Header Messages", /* name */
"WiMax Generic/Type1/Type2 MAC Header (hdr)", /* short name */
@@ -2249,6 +2261,9 @@ void proto_register_mac_header_generic(void)
proto_register_field_array(proto_mac_header_generic_decoder, hf_arq, array_length(hf_arq));
proto_register_subtree_array(ett, array_length(ett));
+ expert_mac_header_generic = expert_register_protocol(proto_mac_header_generic_decoder);
+ expert_register_field_array(expert_mac_header_generic, ei, array_length(ei));
+
/* register the generic mac header dissector */
register_dissector("mac_header_generic_handler", dissect_mac_header_generic_decoder, proto_mac_header_generic_decoder);
@@ -2260,4 +2275,5 @@ void
proto_reg_handoff_mac_header_generic(void)
{
mac_mgmt_msg_decoder_handle = find_dissector("wmx_mac_mgmt_msg_decoder");
+ mac_ip_handle = find_dissector("ip");
}
diff --git a/plugins/wimax/mac_mgmt_msg_decoder.c b/plugins/wimax/mac_mgmt_msg_decoder.c
index 8585858db8..65636bc5ae 100644
--- a/plugins/wimax/mac_mgmt_msg_decoder.c
+++ b/plugins/wimax/mac_mgmt_msg_decoder.c
@@ -32,11 +32,17 @@
#include <glib.h>
#include <epan/packet.h>
+#include <epan/expert.h>
#include "wimax_mac.h"
static gint proto_mac_mgmt_msg_decoder = -1;
static gint ett_mac_mgmt_msg_decoder = -1;
+static gint hf_mac_mgmt_msg_type = -1;
+static gint hf_mac_mgmt_msg_values = -1;
+
+static expert_field ei_empty_payload = EI_INIT;
+
static dissector_table_t subdissector_message_table;
/* WIMAX MAC Management message type info */
@@ -112,66 +118,50 @@ static const value_string mgt_msg_abbrv_vals[] = {
{ 0, NULL }
};
-value_string_ext mgt_msg_abbrv_vals_ext = VALUE_STRING_EXT_INIT(mgt_msg_abbrv_vals);
-
-static gint hf_mac_mgmt_msg_values = -1;
-static gint hf_mac_mgmt_msg_unknown_type = -1;
-
+static value_string_ext mgt_msg_abbrv_vals_ext = VALUE_STRING_EXT_INIT(mgt_msg_abbrv_vals);
-void dissect_mac_mgmt_msg_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, message_type;
- proto_item *parent_item = NULL;
- proto_item *message_item = NULL;
- proto_tree *message_tree = NULL;
+ guint message_type;
+ proto_item *message_item;
+ proto_tree *message_tree;
const char* mgt_msg_str;
- { /* we are being asked for details */
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
- if(!tvb_len)
- {
- /* display the error message */
- proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "Error: Mac payload tvb is empty ! (%u bytes)", tvb_len);
- return;
- }
- /* Get the payload type */
- message_type = tvb_get_guint8(tvb, offset);
- mgt_msg_str = val_to_str_ext_const(message_type, &mgt_msg_abbrv_vals_ext, "Unknown");
-
- /* Display message type in Info column */
- col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", mgt_msg_str);
-
- /* add the payload type into the info column */
- if (try_val_to_str_ext(message_type, &mgt_msg_abbrv_vals_ext) == NULL)
- {
- /* display MAC payload types */
- message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "Unknown message type: %u (%u bytes)", message_type, tvb_len);
- /* add MAC payload subtree */
- message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
- /* display the MAC payload in Hex */
- proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, ENC_NA);
- return;
- }
-
- /* get the parent */
- parent_item = proto_tree_get_parent(tree);
- /* add the MAC header info */
- proto_item_append_text(parent_item, ", %s", mgt_msg_str);
-
- /* Decode and display the MAC payload */
- if (!dissector_try_uint(subdissector_message_table, message_type, tvb, pinfo, tree))
- {
- /* display MAC payload types */
- message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_str, tvb_len);
- /* add MAC payload subtree */
- message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
- /* display the MAC payload in Hex */
- proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, ENC_NA);
- /* display the unknown message in hex */
- proto_tree_add_item(tree, hf_mac_mgmt_msg_unknown_type, tvb, offset, (tvb_len - offset), ENC_NA);
- }
+ message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, -1,
+ "MAC Management Message Type (%u bytes)", tvb_reported_length(tvb));
+ message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
+
+ if (tvb_reported_length(tvb) == 0)
+ {
+ expert_add_info(pinfo, message_item, &ei_empty_payload);
+ return;
+ }
+
+ /* Get the payload type */
+ message_type = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(message_tree, hf_mac_mgmt_msg_type, tvb, offset, 1, ENC_NA);
+ mgt_msg_str = val_to_str_ext_const(message_type, &mgt_msg_abbrv_vals_ext, "Unknown");
+
+ /* Display message type in Info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", mgt_msg_str);
+
+ /* add the payload type into the info column */
+ if (try_val_to_str_ext(message_type, &mgt_msg_abbrv_vals_ext) == NULL)
+ {
+ /* display the MAC payload in Hex */
+ proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, -1, ENC_NA);
+ return;
+ }
+
+ /* add the MAC header info to parent*/
+ proto_item_append_text(proto_tree_get_parent(tree), ", %s", mgt_msg_str);
+
+ /* Decode and display the MAC payload */
+ if (!dissector_try_uint(subdissector_message_table, message_type,
+ tvb_new_subset_remaining(tvb, 1), pinfo, tree))
+ {
+ proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, -1, ENC_NA);
}
}
@@ -182,21 +172,21 @@ void proto_register_mac_mgmt_msg(void)
static hf_register_info hf[] =
{
{
- &hf_mac_mgmt_msg_values,
+ &hf_mac_mgmt_msg_type,
{
- "Values", "wmx.values",
- FT_BYTES, BASE_NONE, NULL, 0x0,
+ "MAC Management Message Type", "wmx.macmgtmsgtype",
+ FT_UINT8, BASE_DEC | BASE_EXT_STRING, &mgt_msg_abbrv_vals_ext, 0x0,
NULL, HFILL
}
},
{
- &hf_mac_mgmt_msg_unknown_type,
+ &hf_mac_mgmt_msg_values,
{
- "Unknown MAC Message Type", "wmx.unknown_type",
+ "Values", "wmx.values",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL
}
- }
+ },
};
/* Setup protocol subtree array */
@@ -205,6 +195,12 @@ void proto_register_mac_mgmt_msg(void)
&ett_mac_mgmt_msg_decoder,
};
+ static ei_register_info ei[] = {
+ { &ei_empty_payload, { "wmx.empty_payload", PI_PROTOCOL, PI_ERROR, "Error: Mac payload tvb is empty !", EXPFILL }},
+ };
+
+ expert_module_t* expert_mac_mgmt;
+
proto_mac_mgmt_msg_decoder = proto_register_protocol (
"WiMax MAC Management Message", /* name */
"MGMT MSG", /* short name */
@@ -213,6 +209,8 @@ void proto_register_mac_mgmt_msg(void)
proto_register_field_array(proto_mac_mgmt_msg_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_mac_mgmt = expert_register_protocol(proto_mac_mgmt_msg_decoder);
+ expert_register_field_array(expert_mac_mgmt, ei, array_length(ei));
subdissector_message_table = register_dissector_table("wmx.mgmtmsg",
"WiMax MAC Management Message", FT_UINT8, BASE_DEC);
diff --git a/plugins/wimax/msg_aas_beam.c b/plugins/wimax/msg_aas_beam.c
index 595a9c2c0e..2ed42a823e 100644
--- a/plugins/wimax/msg_aas_beam.c
+++ b/plugins/wimax/msg_aas_beam.c
@@ -50,7 +50,7 @@ extern gint proto_mac_mgmt_msg_aas_fbck_decoder;
static gint proto_mac_mgmt_msg_aas_beam_decoder = -1;
static gint ett_mac_mgmt_msg_aas_beam_select_decoder = -1;
static gint ett_mac_mgmt_msg_aas_beam_req_decoder = -1;
-/* static gint ett_mac_mgmt_msg_aas_beam_rsp_decoder = -1; */
+static gint ett_mac_mgmt_msg_aas_beam_rsp_decoder = -1;
#ifdef OFDM
static const value_string vals_report_types[] =
@@ -71,7 +71,6 @@ static const value_string vals_resolution_parameter[] =
#endif
/* fix fields */
-static gint hf_aas_beam_message_type = -1;
/* static gint hf_aas_beam_unknown_type = -1; */
static gint hf_aas_beam_select_index = -1;
static gint hf_aas_beam_select_reserved = -1;
@@ -88,30 +87,19 @@ static int hf_aas_beam_cinr_value = -1;
#endif
-void dissect_mac_mgmt_msg_aas_beam_select_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static void dissect_mac_mgmt_msg_aas_beam_select_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type;
- proto_item *aas_beam_item = NULL;
- proto_tree *aas_beam_tree = NULL;
+ proto_item *aas_beam_item;
+ proto_tree *aas_beam_tree;
- if(tree)
{ /* we are being asked for details */
- /* get the message type */
- payload_type = tvb_get_guint8(tvb, offset);
- /* ensure the message type is AAS-BEAM-SELECT */
- if(payload_type != MAC_MGMT_MSG_AAS_BEAM_SELECT)
- return;
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
+
/* display MAC message type */
- aas_beam_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_beam_decoder, tvb, offset, tvb_len, "AAS Beam Select (AAS-BEAM-SELECT) (%u bytes)", tvb_len);
+ aas_beam_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_beam_decoder, tvb, offset, -1, "AAS Beam Select (AAS-BEAM-SELECT)");
/* add subtree */
aas_beam_tree = proto_item_add_subtree(aas_beam_item, ett_mac_mgmt_msg_aas_beam_select_decoder);
- /* Display the AAS-BEAM-SELECT message type */
- proto_tree_add_item(aas_beam_tree, hf_aas_beam_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* move to next field */
- offset++;
+
/* Decode and display the AAS-BEAM-SELECT message body */
/* display the AAS Beam Index */
proto_tree_add_item(aas_beam_tree, hf_aas_beam_select_index, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -124,27 +112,16 @@ void dissect_mac_mgmt_msg_aas_beam_select_decoder(tvbuff_t *tvb, packet_info *pi
static void dissect_mac_mgmt_msg_aas_beam_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type;
- proto_item *aas_beam_item = NULL;
- proto_tree *aas_beam_tree = NULL;
+ proto_item *aas_beam_item;
+ proto_tree *aas_beam_tree;
- if(tree)
{ /* we are being asked for details */
- /* get the message type */
- payload_type = tvb_get_guint8(tvb, offset);
- /* ensure the message type is AAS-BEAM-REQ */
- if(payload_type != MAC_MGMT_MSG_AAS_BEAM_REQ)
- return;
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
+
/* display MAC message type */
- aas_beam_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_beam_decoder, tvb, offset, tvb_len, "AAS Beam Request (AAS-BEAM-REQ) (%u bytes)", tvb_len);
+ aas_beam_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_beam_decoder, tvb, offset, -1, "AAS Beam Request (AAS-BEAM-REQ)");
/* add subtree */
aas_beam_tree = proto_item_add_subtree(aas_beam_item, ett_mac_mgmt_msg_aas_beam_req_decoder);
- /* Display the AAS-BEAM-REQ message type */
- proto_tree_add_item(aas_beam_tree, hf_aas_beam_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* move to next field */
- offset++;
+
/* Decode and display the AAS-BEAM-REQ message body */
/* display the Frame Number */
proto_tree_add_item(aas_beam_tree, hf_aas_beam_frame_number, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -168,28 +145,20 @@ static void dissect_mac_mgmt_msg_aas_beam_req_decoder(tvbuff_t *tvb, packet_info
static void dissect_mac_mgmt_msg_aas_beam_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type, report_type;
+ guint tvb_len, report_type;
guint number_of_frequencies, indx;
- proto_item *aas_beam_item = NULL;
- proto_tree *aas_beam_tree = NULL;
+ proto_item *aas_beam_item;
+ proto_tree *aas_beam_tree;
- if(tree)
{ /* we are being asked for details */
- /* get the message type */
- payload_type = tvb_get_guint8(tvb, offset);
- /* ensure the message type is AAS-BEAM-RSP */
- if(payload_type != MAC_MGMT_MSG_AAS_BEAM_RSP)
- return;
+
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC message type */
- aas_beam_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_beam_decoder, tvb, offset, tvb_len, "AAS Beam Response (AAS-BEAM-RSP) (%u bytes)", tvb_len);
+ aas_beam_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_beam_decoder, tvb, offset, -1, "AAS Beam Response (AAS-BEAM-RSP)");
/* add subtree */
- aas_beam_tree = proto_item_add_subtree(aas_beam_item, ett_mac_mgmt_msg_aas_beam_req_decoder);
- /* Display the AAS-BEAM-RSP message type */
- proto_tree_add_item(aas_beam_tree, hf_aas_beam_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* move to next field */
- offset++;
+ aas_beam_tree = proto_item_add_subtree(aas_beam_item, ett_mac_mgmt_msg_aas_beam_rsp_decoder);
+
/* Decode and display the AAS-BEAM-RSP message body */
/* display the Frame Number */
proto_tree_add_item(aas_beam_tree, hf_aas_beam_frame_number, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -245,13 +214,6 @@ void proto_register_mac_mgmt_msg_aas_beam(void)
static hf_register_info hf_aas_beam[] =
{
{
- &hf_aas_beam_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.aas_beam",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
&hf_aas_beam_select_index,
{
"AAS Beam Index", "wmx.aas_beam.aas_beam_index",
@@ -346,10 +308,14 @@ void proto_register_mac_mgmt_msg_aas_beam(void)
{
&ett_mac_mgmt_msg_aas_beam_select_decoder,
&ett_mac_mgmt_msg_aas_beam_req_decoder,
- /* &ett_mac_mgmt_msg_aas_beam_rsp_decoder, */
+ &ett_mac_mgmt_msg_aas_beam_rsp_decoder,
};
- proto_mac_mgmt_msg_aas_beam_decoder = proto_mac_mgmt_msg_aas_fbck_decoder;
+ proto_mac_mgmt_msg_aas_beam_decoder = proto_register_protocol (
+ "WiMax AAS-BEAM Messages", /* name */
+ "WiMax AAS-BEAM", /* short name */
+ "wmx.aas_beam" /* abbrev */
+ );
proto_register_field_array(proto_mac_mgmt_msg_aas_beam_decoder, hf_aas_beam, array_length(hf_aas_beam));
proto_register_subtree_array(ett, array_length(ett));
diff --git a/plugins/wimax/msg_aas_fbck.c b/plugins/wimax/msg_aas_fbck.c
index 7ffbed24cb..203c54bc25 100644
--- a/plugins/wimax/msg_aas_fbck.c
+++ b/plugins/wimax/msg_aas_fbck.c
@@ -45,9 +45,9 @@
#define OFDMA_AAS_FBCK_REQ_FB_RSP_COUNTER_MASK 0x1C
#define OFDMA_AAS_FBCK_REQ_FB_RSP_RESOLUTION_MASK 0x03
-gint proto_mac_mgmt_msg_aas_fbck_decoder = -1;
+static gint proto_mac_mgmt_msg_aas_fbck_decoder = -1;
static gint ett_mac_mgmt_msg_aas_fbck_req_decoder = -1;
-/* static gint ett_mac_mgmt_msg_aas_fbck_rsp_decoder = -1; */
+static gint ett_mac_mgmt_msg_aas_fbck_rsp_decoder = -1;
static const value_string vals_data_types[] =
{
@@ -75,7 +75,6 @@ static const value_string vals_resolutions_1[] =
};
/* fix fields */
-static int hf_aas_fbck_message_type = -1;
/* static int hf_aas_fbck_unknown_type = -1; */
static int hf_aas_fbck_frame_number = -1;
static int hf_aas_fbck_number_of_frames = -1;
@@ -98,27 +97,18 @@ static int hf_aas_fbck_cinr_value = -1;
void dissect_mac_mgmt_msg_aas_fbck_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type, data_type;
- proto_item *aas_fbck_item = NULL;
- proto_tree *aas_fbck_tree = NULL;
+ guint data_type;
+ proto_item *aas_fbck_item;
+ proto_tree *aas_fbck_tree;
- if(tree)
{ /* we are being asked for details */
- /* get the message type */
- payload_type = tvb_get_guint8(tvb, offset);
- /* ensure the message type is AAS-FBCK-REQ */
- if(payload_type != MAC_MGMT_MSG_AAS_FBCK_REQ)
- return;
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
+
/* display MAC message type */
- aas_fbck_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_fbck_decoder, tvb, offset, tvb_len, "AAS Channel Feedback Request (AAS-FBCK-REQ) (%u bytes)", tvb_len);
+ aas_fbck_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_fbck_decoder, tvb, offset, -1, "AAS Channel Feedback Request (AAS-FBCK-REQ)");
/* add subtree */
aas_fbck_tree = proto_item_add_subtree(aas_fbck_item, ett_mac_mgmt_msg_aas_fbck_req_decoder);
/* Display the AAS-FBCK-REQ message type */
- proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* move to next field */
- offset++;
+
/* Decode and display the AAS-FBCK-REQ message body */
/* display the Frame Number */
proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_frame_number, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -147,27 +137,20 @@ void dissect_mac_mgmt_msg_aas_fbck_req_decoder(tvbuff_t *tvb, packet_info *pinfo
void dissect_mac_mgmt_msg_aas_fbck_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type, data_type;
- proto_item *aas_fbck_item = NULL;
- proto_tree *aas_fbck_tree = NULL;
+ guint tvb_len, data_type;
+ proto_item *aas_fbck_item;
+ proto_tree *aas_fbck_tree;
- if(tree)
{ /* we are being asked for details */
- /* get the message type */
- payload_type = tvb_get_guint8(tvb, offset);
- /* ensure the message type is AAS-FBCK-RSP */
- if(payload_type != MAC_MGMT_MSG_AAS_FBCK_RSP)
- return;
+
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC message type */
- aas_fbck_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_fbck_decoder, tvb, offset, tvb_len, "AAS Channel Feedback Response (AAS-FBCK-RSP) (%u bytes)", tvb_len);
+ aas_fbck_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_fbck_decoder, tvb, offset, -1, "AAS Channel Feedback Response (AAS-FBCK-RSP)");
/* add subtree */
- aas_fbck_tree = proto_item_add_subtree(aas_fbck_item, ett_mac_mgmt_msg_aas_fbck_req_decoder);
+ aas_fbck_tree = proto_item_add_subtree(aas_fbck_item, ett_mac_mgmt_msg_aas_fbck_rsp_decoder);
/* Display the AAS-FBCK-RSP message type */
- proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* move to next field */
- offset++;
+
/* get the data type */
data_type = tvb_get_guint8(tvb, offset);
/* Decode and display the AAS-FBCK-RSP message body */
@@ -211,13 +194,6 @@ void proto_register_mac_mgmt_msg_aas_fbck(void)
static hf_register_info hf_aas_fbck[] =
{
{
- &hf_aas_fbck_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.aas_fbck",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
&hf_aas_fbck_cinr_value,
{
"CINR Mean Value", "wmx.aas_fbck.cinr_mean_value",
@@ -344,12 +320,12 @@ void proto_register_mac_mgmt_msg_aas_fbck(void)
static gint *ett[] =
{
&ett_mac_mgmt_msg_aas_fbck_req_decoder,
- /* &ett_mac_mgmt_msg_aas_fbck_rsp_decoder, */
+ &ett_mac_mgmt_msg_aas_fbck_rsp_decoder,
};
proto_mac_mgmt_msg_aas_fbck_decoder = proto_register_protocol (
- "WiMax AAS-FEEDBACK/BEAM Messages", /* name */
- "WiMax AAS-FEEDBACK/BEAM (aas)", /* short name */
+ "WiMax AAS-FEEDBACK Messages", /* name */
+ "WiMax AAS-FEEDBACK (aas)", /* short name */
"wmx.aas" /* abbrev */
);
diff --git a/plugins/wimax/msg_arq.c b/plugins/wimax/msg_arq.c
index 45f58537c6..50937cdf8f 100644
--- a/plugins/wimax/msg_arq.c
+++ b/plugins/wimax/msg_arq.c
@@ -38,8 +38,6 @@
#include "wimax_tlv.h"
#include "wimax_mac.h"
-extern gint man_ofdma;
-
static gint proto_mac_mgmt_msg_arq_decoder = -1;
static gint ett_mac_mgmt_msg_arq_decoder = -1;
@@ -78,8 +76,6 @@ static gint hf_arq_reset_type = -1;
static gint hf_arq_reset_direction = -1;
static gint hf_arq_reset_reserved = -1;
-static gint hf_arq_message_type = -1;
-
/* STRING RESOURCES */
static const true_false_string tfs_present = {
@@ -127,14 +123,6 @@ void proto_register_mac_mgmt_msg_arq_feedback(void)
/* ARQ fields display */
static hf_register_info hf[] =
{
- /* TODO: Make three separate arq message types */
- {
- &hf_arq_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.arq",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
{
&hf_arq_ack_type,
{
@@ -309,7 +297,7 @@ void proto_register_mac_mgmt_msg_arq_feedback(void)
}
/* Decode ARQ-Feedback messages. */
-void dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static void dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
guint offset = 0;
guint arq_feedback_ie_count = 0;
@@ -318,33 +306,22 @@ void dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info *pinfo
guint arq_ack_type;
guint arq_bsn;
guint arq_num_ack_maps;
- guint tvb_len, payload_type;
- proto_item *arq_feedback_item = NULL;
- proto_tree *arq_feedback_tree = NULL;
+ guint tvb_len;
+ proto_item *arq_feedback_item;
+ proto_tree *arq_feedback_tree;
proto_item *arq_fb_item = NULL;
proto_tree *arq_fb_tree = NULL;
proto_item *ti = NULL;
guint i, seq_format;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, offset);
- if(payload_type != MAC_MGMT_MSG_ARQ_FEEDBACK)
- {
- return;
- }
-
- if (tree)
{ /* we are being asked for details */
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type ARQ-Feedback */
- arq_feedback_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_arq_decoder, tvb, offset, tvb_len, "MAC Management Message, ARQ-Feedback (33)");
+ arq_feedback_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_arq_decoder, tvb, offset, -1, "MAC Management Message, ARQ-Feedback");
/* add MAC ARQ Feedback subtree */
arq_feedback_tree = proto_item_add_subtree(arq_feedback_item, ett_mac_mgmt_msg_arq_decoder);
- /* display the Message Type */
- proto_tree_add_item(arq_feedback_tree, hf_arq_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
while(offset < tvb_len && !arq_last)
{
@@ -407,30 +384,17 @@ void dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info *pinfo
}
/* Decode ARQ-Discard messages. */
-void dissect_mac_mgmt_msg_arq_discard_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static void dissect_mac_mgmt_msg_arq_discard_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
- guint tvb_len, payload_type;
- proto_item *arq_discard_item = NULL;
- proto_tree *arq_discard_tree = NULL;
+ proto_item *arq_discard_item;
+ proto_tree *arq_discard_tree;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, 0);
- if(payload_type != MAC_MGMT_MSG_ARQ_DISCARD)
- {
- return;
- }
-
- if (tree)
{ /* we are being asked for details */
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
/* display MAC payload type ARQ-Discard */
- arq_discard_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_arq_decoder, tvb, 0, tvb_len, "MAC Management Message, ARQ-Discard (34)");
+ arq_discard_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_arq_decoder, tvb, 0, -1, "MAC Management Message, ARQ-Discard");
/* add MAC ARQ Discard subtree */
arq_discard_tree = proto_item_add_subtree(arq_discard_item, ett_mac_mgmt_msg_arq_decoder);
- /* display the Message Type */
- proto_tree_add_item(arq_discard_tree, hf_arq_message_type, tvb, 0, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(arq_discard_tree, hf_arq_discard_cid, tvb, 1, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(arq_discard_tree, hf_arq_discard_reserved, tvb, 3, 1, ENC_BIG_ENDIAN);
@@ -439,30 +403,17 @@ void dissect_mac_mgmt_msg_arq_discard_decoder(tvbuff_t *tvb, packet_info *pinfo
}
/* Decode ARQ-Reset messages. */
-void dissect_mac_mgmt_msg_arq_reset_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static void dissect_mac_mgmt_msg_arq_reset_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
- guint tvb_len, payload_type;
- proto_item *arq_reset_item = NULL;
- proto_tree *arq_reset_tree = NULL;
+ proto_item *arq_reset_item;
+ proto_tree *arq_reset_tree;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, 0);
- if(payload_type != MAC_MGMT_MSG_ARQ_RESET)
- {
- return;
- }
-
- if (tree)
{ /* we are being asked for details */
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
/* display MAC payload type ARQ-Reset */
- arq_reset_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_arq_decoder, tvb, 0, tvb_len, "MAC Management Message, ARQ-Reset (35)");
+ arq_reset_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_arq_decoder, tvb, 0, -1, "MAC Management Message, ARQ-Reset");
/* add MAC ARQ Reset subtree */
arq_reset_tree = proto_item_add_subtree(arq_reset_item, ett_mac_mgmt_msg_arq_decoder);
- /* display the Message Type */
- proto_tree_add_item(arq_reset_tree, hf_arq_message_type, tvb, 0, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(arq_reset_tree, hf_arq_reset_cid, tvb, 1, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(arq_reset_tree, hf_arq_reset_type, tvb, 3, 1, ENC_BIG_ENDIAN);
diff --git a/plugins/wimax/msg_clk_cmp.c b/plugins/wimax/msg_clk_cmp.c
index bddd2e8b3f..926103eae6 100644
--- a/plugins/wimax/msg_clk_cmp.c
+++ b/plugins/wimax/msg_clk_cmp.c
@@ -39,7 +39,6 @@ static gint proto_mac_mgmt_msg_clk_cmp_decoder = -1;
static gint ett_mac_mgmt_msg_clk_cmp_decoder = -1;
/* CLK_CMP fields */
-static gint hf_clk_cmp_message_type = -1;
static gint hf_clk_cmp_clock_count = -1;
static gint hf_clk_cmp_clock_id = -1;
static gint hf_clk_cmp_seq_number = -1;
@@ -48,34 +47,22 @@ static gint hf_clk_cmp_comparison_value = -1;
/* Decode CLK_CMP messages. */
-void dissect_mac_mgmt_msg_clk_cmp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static void dissect_mac_mgmt_msg_clk_cmp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
guint offset = 0;
guint i;
guint clock_count;
- guint tvb_len, payload_type;
- proto_item *clk_cmp_item = NULL;
- proto_tree *clk_cmp_tree = NULL;
+ guint tvb_len;
+ proto_item *clk_cmp_item;
+ proto_tree *clk_cmp_tree;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, 0);
- if(payload_type != MAC_MGMT_MSG_CLK_CMP)
- {
- return;
- }
-
- if (tree)
{ /* we are being asked for details */
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type CLK_CMP */
- clk_cmp_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_clk_cmp_decoder, tvb, offset, tvb_len, "Clock Comparison (CLK-CMP) (%u bytes)", tvb_len);
+ clk_cmp_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_clk_cmp_decoder, tvb, offset, -1, "Clock Comparison (CLK-CMP)");
/* add MAC CLK_CMP subtree */
clk_cmp_tree = proto_item_add_subtree(clk_cmp_item, ett_mac_mgmt_msg_clk_cmp_decoder);
- /* display the Message Type */
- proto_tree_add_item(clk_cmp_tree, hf_clk_cmp_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* set the offset for clock count */
- offset ++;
/* get the clock count */
clock_count = tvb_get_guint8(tvb, offset);
/* display the clock count */
@@ -100,13 +87,6 @@ void proto_register_mac_mgmt_msg_clk_cmp(void)
static hf_register_info hf_clk_cmp[] =
{
{
- &hf_clk_cmp_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.clk_cmp",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
&hf_clk_cmp_clock_count,
{
"Clock Count", "wmx.clk_cmp.clock_count",
diff --git a/plugins/wimax/msg_dcd.c b/plugins/wimax/msg_dcd.c
index fe878c224a..6ef694ba78 100644
--- a/plugins/wimax/msg_dcd.c
+++ b/plugins/wimax/msg_dcd.c
@@ -46,7 +46,6 @@ static gint proto_mac_mgmt_msg_dcd_decoder = -1;
static gint ett_mac_mgmt_msg_dcd_decoder = -1;
/* fix fields */
-static gint hf_dcd_message_type = -1;
static gint hf_dcd_downlink_channel_id = -1;
static gint hf_dcd_config_change_count = -1;
static gint hf_dcd_dl_burst_profile_rsv = -1;
@@ -331,38 +330,26 @@ static const value_string tfs_support[] =
/* WiMax MAC Management DCD message (table 15) dissector */
-void dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type, length;
+ guint tvb_len, length;
gint tlv_type, tlv_len, tlv_offset, tlv_value_offset;
guint dl_burst_diuc, dl_num_regions;
- proto_item *dcd_item = NULL;
- proto_tree *dcd_tree = NULL;
+ proto_item *dcd_item;
+ proto_tree *dcd_tree;
proto_tree *tlv_tree = NULL;
proto_tree *sub_tree = NULL;
tlv_info_t tlv_info;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, offset);
- if(payload_type != MAC_MGMT_MSG_DCD)
- {
- return;
- }
-
- if(tree)
{ /* we are being asked for details */
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type DCD */
- dcd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dcd_decoder, tvb, offset, tvb_len, "Downlink Channel Descriptor (DCD) (%u bytes)", tvb_len);
+ dcd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dcd_decoder, tvb, offset, tvb_len, "Downlink Channel Descriptor (DCD)");
/* add MAC DCD subtree */
dcd_tree = proto_item_add_subtree(dcd_item, ett_mac_mgmt_msg_dcd_decoder);
/* Decode and display the Downlink Channel Descriptor (DCD) */
- /* display the Message Type */
- proto_tree_add_item(dcd_tree, hf_dcd_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* set the offset for the Downlink Channel ID */
- offset++;
/* display the Downlink Channel ID */
proto_tree_add_item(dcd_tree, hf_dcd_downlink_channel_id, tvb, offset, 1, ENC_BIG_ENDIAN);
/* set the offset for the Configuration Change Count */
@@ -805,13 +792,6 @@ void proto_register_mac_mgmt_msg_dcd(void)
static hf_register_info hf[] =
{
{
- &hf_dcd_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.dcd",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
&hf_dcd_tlv_t_33_asr,
{
"ASR (Anchor Switch Report) Slot Length (M) and Switching Period (L)", "wmx.dcd.asr",
diff --git a/plugins/wimax/msg_dlmap.c b/plugins/wimax/msg_dlmap.c
index e2166e89b5..d452900ee4 100644
--- a/plugins/wimax/msg_dlmap.c
+++ b/plugins/wimax/msg_dlmap.c
@@ -72,9 +72,6 @@ gint STC_Zone_Matrix = 0;
gint INC_CID = 0;
gint sub_dl_ul_map = 0;
-
-extern gint man_ofdma;
-
static gint proto_mac_mgmt_msg_dlmap_decoder = -1;
static gint ett_dlmap = -1;
@@ -240,8 +237,6 @@ static const value_string frames_per_second[] =
};
/* dl-map fields */
-static gint hf_dlmap_message_type = -1;
-
static gint hf_dlmap_phy_fdur = -1;
static gint hf_dlmap_phy_fdur_ms = -1;
static gint hf_dlmap_phy_fdur_per_sec = -1;
@@ -356,7 +351,7 @@ gint RCID_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint leng
* DL-MAP Extended-2 HARQ sub-burst IEs (8.4.5.3.21)
*******************************************************************/
-gint Dedicated_DL_Control_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint Dedicated_DL_Control_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* 8.4.5.3.20 */
/* offset of IE in nibbles, length is variable */
@@ -396,7 +391,7 @@ gint Dedicated_DL_Control_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint o
return (length + 1);
}
-gint Dedicated_MIMO_DL_Control_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint Dedicated_MIMO_DL_Control_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* offset of IE in bits, length is variable */
gint bit;
@@ -469,7 +464,7 @@ gint Dedicated_MIMO_DL_Control_IE(proto_tree *diuc_tree, const guint8 *bufptr, g
return (bit - offset);
}
-gint DL_HARQ_Chase_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint DL_HARQ_Chase_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* 8.4.5.3.21 DL_HARQ_Chase_sub_burst_IE */
/* offset of IE in nibbles, length is variable */
@@ -525,7 +520,7 @@ gint DL_HARQ_Chase_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gin
return (BIT_TO_NIB(bit) - offset);
}
-gint DL_HARQ_IR_CTC_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint DL_HARQ_IR_CTC_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* offset of IE in nibbles, length is variable */
gint bit;
@@ -590,7 +585,7 @@ gint DL_HARQ_IR_CTC_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gi
return (BIT_TO_NIB(bit) - offset);
}
-gint DL_HARQ_IR_CC_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint DL_HARQ_IR_CC_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* offset of IE in nibbles, length is variable */
gint bit;
@@ -663,7 +658,7 @@ gint DL_HARQ_IR_CC_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gin
return (BIT_TO_NIB(bit) - offset);
}
-gint MIMO_DL_Chase_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint MIMO_DL_Chase_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* offset of IE in nibbles, length is variable */
gint bit;
@@ -732,7 +727,7 @@ gint MIMO_DL_Chase_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr
return (BIT_TO_NIB(bit) - offset);
}
-gint MIMO_DL_IR_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint MIMO_DL_IR_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* offset of IE in nibbles, length is variable */
gint bit;
@@ -795,7 +790,7 @@ gint MIMO_DL_IR_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, g
return (BIT_TO_NIB(bit) - offset);
}
-gint MIMO_DL_IR_HARQ_for_CC_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint MIMO_DL_IR_HARQ_for_CC_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* offset of IE in nibbles, length is variable */
gint bit;
@@ -859,7 +854,7 @@ gint MIMO_DL_IR_HARQ_for_CC_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bu
return (BIT_TO_NIB(bit) - offset);
}
-gint MIMO_DL_STC_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint MIMO_DL_STC_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* offset of IE in nibbles, length is variable */
gint bit;
@@ -925,7 +920,7 @@ gint MIMO_DL_STC_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr,
* DL-MAP Extended-2 IEs
*******************************************************************/
-gint MBS_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint MBS_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 0 */
/* 8.4.5.3.12 MBS_MAP_IE */
@@ -984,7 +979,7 @@ gint MBS_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint l
return BIT_TO_NIB(bit);
}
-gint HO_Anchor_Active_DL_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint HO_Anchor_Active_DL_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 1 */
/* 8.4.5.3.14 [2] HO_Anchor_Active_DL-MAP_IE TODO 1.1 */
@@ -1005,7 +1000,7 @@ gint HO_Anchor_Active_DL_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gin
return nib;
}
-gint HO_Active_Anchor_DL_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint HO_Active_Anchor_DL_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 2 */
/* 8.4.5.3.15 HO_Active_Anchor_DL_MAP_IE TODO 1.1 */
@@ -1026,7 +1021,7 @@ gint HO_Active_Anchor_DL_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gin
return nib;
}
-gint HO_CID_Translation_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint HO_CID_Translation_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 3 */
/* 8.4.5.3.16 HO_CID_Translation_MAP_IE TODO 1.1 */
@@ -1047,7 +1042,7 @@ gint HO_CID_Translation_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint
return nib;
}
-gint MIMO_in_another_BS_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint MIMO_in_another_BS_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 4 */
/* 8.4.5.3.17 [2] MIMO_in_another_BS_IE (not implemented)*/
@@ -1068,7 +1063,7 @@ gint MIMO_in_another_BS_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint off
return nib;
}
-gint Macro_MIMO_DL_Basic_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint Macro_MIMO_DL_Basic_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* dl-map extended-2 ie = 5 */
/* 8.4.5.3.18 [2] Macro-MIMO_DL_Basic_IE (not implemented) */
@@ -1089,7 +1084,7 @@ gint Macro_MIMO_DL_Basic_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint of
return nib;
}
-gint Skip_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint Skip_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 6 */
/* 8.4.5.3.20.2 Skip_IE */
@@ -1113,7 +1108,7 @@ gint Skip_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint leng
return BIT_TO_NIB(bit);
}
-gint HARQ_DL_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint HARQ_DL_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 7 */
/* 8.4.5.3.21 [2] HARQ_DL_MAP_IE */
@@ -1195,7 +1190,7 @@ gint HARQ_DL_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gi
return BIT_TO_NIB(bit);
}
-gint HARQ_ACK_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint HARQ_ACK_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 8 */
/* 8.4.5.3.22 HARQ_ACK IE */
@@ -1218,7 +1213,7 @@ gint HARQ_ACK_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint
return nib;
}
-gint Enhanced_DL_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint Enhanced_DL_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 9 */
/* 8.4.5.3.23 Enhanced DL MAP IE */
@@ -1255,7 +1250,7 @@ gint Enhanced_DL_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset
return BIT_TO_NIB(bit);
}
-gint Closed_loop_MIMO_DL_Enhanced_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint Closed_loop_MIMO_DL_Enhanced_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 0xA */
/* 8.4.5.3.24 Closed-loop MIMO DL Enhanced IE (not implemented) */
@@ -1276,7 +1271,7 @@ gint Closed_loop_MIMO_DL_Enhanced_IE(proto_tree *diuc_tree, const guint8 *bufptr
return nib;
}
-gint AAS_SDMA_DL_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint AAS_SDMA_DL_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 0xE */
/* 8.4.5.3.26 AAS_SDMA_DL_IE */
@@ -1392,7 +1387,7 @@ gint AAS_SDMA_DL_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gi
* DL-MAP Extended IEs
*******************************************************************/
-gint Channel_Measurement_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint Channel_Measurement_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 0 */
/* 8.4.5.3.5 [1] Channel_Measurement_IE */
@@ -1418,7 +1413,7 @@ gint Channel_Measurement_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint of
return nib;
}
-gint STC_Zone_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint STC_Zone_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 1 */
/* 8.4.5.3.4 STC_Zone_IE */
@@ -1455,7 +1450,7 @@ gint STC_Zone_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint
return BIT_TO_NIB(bit);
}
-gint AAS_DL_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint AAS_DL_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 2 */
/* 8.4.5.3.3 AAS_DL_IE */
@@ -1485,7 +1480,7 @@ gint AAS_DL_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint le
return BIT_TO_NIB(bit);
}
-gint Data_location_in_another_BS_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint Data_location_in_another_BS_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 3 */
/* 8.4.5.3.6 Data_location_in_another_BS_IE */
@@ -1520,7 +1515,7 @@ gint Data_location_in_another_BS_IE(proto_tree *diuc_tree, const guint8 *bufptr,
return BIT_TO_NIB(bit);
}
-gint CID_Switch_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint CID_Switch_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 4 */
/* 8.4.5.3.7 [1] CID_Switch_IE */
@@ -1544,7 +1539,7 @@ gint CID_Switch_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gin
return nib;
}
-gint MIMO_DL_Basic_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint MIMO_DL_Basic_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 5 */
/* 8.4.5.3.8 MIMO_DL_Basic_IE (not implemented) */
@@ -1565,7 +1560,7 @@ gint MIMO_DL_Basic_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset,
return nib;
}
-gint MIMO_DL_Enhanced_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint MIMO_DL_Enhanced_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 6 */
/* 8.4.5.3.9 MIMO_DL_Enhanced_IE (not implemented) */
@@ -1586,7 +1581,7 @@ gint MIMO_DL_Enhanced_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offse
return nib;
}
-gint HARQ_Map_Pointer_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint HARQ_Map_Pointer_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 7 */
/* 8.4.5.3.10 [2] HARQ_Map_Pointer_IE */
@@ -1637,7 +1632,7 @@ gint HARQ_Map_Pointer_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offse
return BIT_TO_NIB(bit);
}
-gint PHYMOD_DL_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint PHYMOD_DL_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 8 */
/* 8.4.5.3.11 PHYMOD_DL_IE */
@@ -1668,7 +1663,7 @@ gint PHYMOD_DL_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint
return BIT_TO_NIB(bit);
}
-gint Broadcast_Control_Pointer_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint Broadcast_Control_Pointer_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 0xA */
/* 8.4.5.3.25 Broadcast Control Pointer IE */
@@ -1696,7 +1691,7 @@ gint Broadcast_Control_Pointer_IE(proto_tree *diuc_tree, const guint8 *bufptr, g
return BIT_TO_NIB(bit);
}
-gint DL_PUSC_Burst_Allocation_in_Other_Segment_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint DL_PUSC_Burst_Allocation_in_Other_Segment_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 0xB */
/* 8.4.5.3.13 DL PUSC Burst Allocation in Other Segment IE */
@@ -1732,7 +1727,7 @@ gint DL_PUSC_Burst_Allocation_in_Other_Segment_IE(proto_tree *diuc_tree, const g
return BIT_TO_NIB(bit);
}
-gint PUSC_ASCA_Alloc_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint PUSC_ASCA_Alloc_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 0xC */
/* 8.4.5.3.27 PUSC_ASCA_Alloc_IE */
@@ -1762,7 +1757,7 @@ gint PUSC_ASCA_Alloc_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset
return BIT_TO_NIB(bit);
}
-gint UL_interference_and_noise_level_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint UL_interference_and_noise_level_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 0xF */
/* 8.4.5.3.19 UL_interference_and_noise_level_IE */
@@ -1818,7 +1813,7 @@ gint UL_interference_and_noise_level_IE(proto_tree *diuc_tree, const guint8 *buf
extern gint wimax_decode_ulmapc(proto_tree *base_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb);
-gint dissect_dlmap_ie(proto_tree *ie_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint dissect_dlmap_ie(proto_tree *ie_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* decode a single DL-MAP IE and return the
* length of the IE in nibbles
@@ -2057,7 +2052,7 @@ gint dissect_dlmap_ie(proto_tree *ie_tree, const guint8 *bufptr, gint offset, gi
}
-void dissect_mac_mgmt_msg_dlmap_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *base_tree)
+static void dissect_mac_mgmt_msg_dlmap_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *base_tree)
{
/* 6.3.2.3.2 [2] DL-MAP table 16 */
guint offset = 0;
@@ -2073,12 +2068,9 @@ void dissect_mac_mgmt_msg_dlmap_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, p
INC_CID = 0;
/* add protocol */
- ti = proto_tree_add_protocol_format(base_tree, proto_mac_mgmt_msg_dlmap_decoder, tvb, offset, tvb_len, "DL-MAP (%u bytes)", tvb_len);
+ ti = proto_tree_add_protocol_format(base_tree, proto_mac_mgmt_msg_dlmap_decoder, tvb, offset, -1, "DL-MAP");
dlmap_tree = proto_item_add_subtree(ti, ett_dlmap);
- /* Decode and display the DL-MAP */
- proto_tree_add_item(dlmap_tree, hf_dlmap_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
/* PHY Synchronization Field 8.4.5.1 */
{
ti = proto_tree_add_text(dlmap_tree, tvb, offset, 4, "Phy Synchronization Field");
@@ -2456,13 +2448,6 @@ void proto_register_mac_mgmt_msg_dlmap(void)
static hf_register_info hf[] =
{
{
- &hf_dlmap_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.dlmap",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
&hf_dlmap_bsid,
{
"Base Station ID", "wmx.dlmap.bsid",
diff --git a/plugins/wimax/msg_dreg.c b/plugins/wimax/msg_dreg.c
index 6f5f6057ba..6ff931c436 100644
--- a/plugins/wimax/msg_dreg.c
+++ b/plugins/wimax/msg_dreg.c
@@ -39,7 +39,6 @@
#include "wimax_mac.h"
#include "wimax_utils.h"
-extern gint man_ofdma;
extern gboolean include_cor2_changes;
/* Forward reference */
@@ -57,8 +56,6 @@ static gint *ett[] =
};
/* DREG fields */
-static gint hf_dreg_cmd_message_type = -1;
-static gint hf_dreg_req_message_type = -1;
/* static gint hf_ack_type_reserved = -1; */
static gint hf_dreg_cmd_action = -1;
static gint hf_dreg_cmd_action_cor2 = -1;
@@ -297,13 +294,6 @@ void proto_register_mac_mgmt_msg_dreg_req(void)
}
},
{
- &hf_dreg_cmd_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.dreg_cmd",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
&hf_dreg_cmd_action,
{
"DREG-CMD Action code", "wmx.dreg_cmd.action",
@@ -325,13 +315,6 @@ void proto_register_mac_mgmt_msg_dreg_req(void)
}
},
{
- &hf_dreg_req_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.dreg_req",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
&hf_dreg_req_action,
{
"DREG-REQ Action code", "wmx.dreg_req.action",
@@ -384,38 +367,27 @@ void proto_register_mac_mgmt_msg_dreg_cmd(void)
}
/* Decode DREG-REQ messages. */
-void dissect_mac_mgmt_msg_dreg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_dreg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
guint tlv_offset;
- guint tvb_len, payload_type;
- proto_item *dreg_req_item = NULL;
- proto_tree *dreg_req_tree = NULL;
+ guint tvb_len;
+ proto_item *dreg_req_item;
+ proto_tree *dreg_req_tree;
proto_tree *tlv_tree = NULL;
tlv_info_t tlv_info;
gint tlv_type;
gint tlv_len;
gboolean hmac_found = FALSE;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, 0);
- if(payload_type != MAC_MGMT_MSG_DREG_REQ)
- {
- return;
- }
-
- if (tree)
{ /* we are being asked for details */
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type DREG-REQ */
- dreg_req_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dreg_req_decoder, tvb, 0, tvb_len, "MAC Management Message, DREG-REQ (49)");
+ dreg_req_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dreg_req_decoder, tvb, 0, -1, "MAC Management Message, DREG-REQ");
/* add MAC DREG REQ subtree */
dreg_req_tree = proto_item_add_subtree(dreg_req_item, ett_mac_mgmt_msg_dreg_decoder);
- /* display the Message Type */
- proto_tree_add_item(dreg_req_tree, hf_dreg_req_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
/* display the Action Code */
proto_tree_add_item(dreg_req_tree, hf_dreg_req_action, tvb, offset, 1, ENC_BIG_ENDIAN);
/* show the Reserved bits */
@@ -467,38 +439,27 @@ void dissect_mac_mgmt_msg_dreg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pr
}
/* Decode DREG-CMD messages. */
-void dissect_mac_mgmt_msg_dreg_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_dreg_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
guint tlv_offset;
- guint tvb_len, payload_type;
- proto_item *dreg_cmd_item = NULL;
- proto_tree *dreg_cmd_tree = NULL;
+ guint tvb_len;
+ proto_item *dreg_cmd_item;
+ proto_tree *dreg_cmd_tree;
proto_tree *tlv_tree = NULL;
tlv_info_t tlv_info;
gint tlv_type;
gint tlv_len;
gboolean hmac_found = FALSE;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, 0);
- if(payload_type != MAC_MGMT_MSG_DREG_CMD)
- {
- return;
- }
-
- if (tree)
{ /* we are being asked for details */
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type DREG-CMD */
- dreg_cmd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dreg_cmd_decoder, tvb, 0, tvb_len, "MAC Management Message, DREG-CMD (29)");
+ dreg_cmd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dreg_cmd_decoder, tvb, 0, -1, "MAC Management Message, DREG-CMD");
/* add MAC DREG CMD subtree */
dreg_cmd_tree = proto_item_add_subtree(dreg_cmd_item, ett_mac_mgmt_msg_dreg_decoder);
- /* display the Message Type */
- proto_tree_add_item(dreg_cmd_tree, hf_dreg_cmd_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset ++;
/* display the Action Code */
if (include_cor2_changes)
proto_tree_add_item(dreg_cmd_tree, hf_dreg_cmd_action_cor2, tvb, offset, 1, ENC_BIG_ENDIAN);
diff --git a/plugins/wimax/msg_dsa.c b/plugins/wimax/msg_dsa.c
index c9fb277d18..b00b0f2905 100644
--- a/plugins/wimax/msg_dsa.c
+++ b/plugins/wimax/msg_dsa.c
@@ -40,87 +40,51 @@
#include "wimax_mac.h"
#include "wimax_utils.h"
-gint proto_mac_mgmt_msg_dsa_decoder = -1;
+static gint proto_mac_mgmt_msg_dsa_decoder = -1;
static gint ett_mac_mgmt_msg_dsa_req_decoder = -1;
static gint ett_mac_mgmt_msg_dsa_rsp_decoder = -1;
static gint ett_mac_mgmt_msg_dsa_ack_decoder = -1;
-static const value_string vals_dsa_msgs[] = {
- { MAC_MGMT_MSG_DSA_REQ, "Dynamic Service Addition Request (DSA-REQ)" },
- { MAC_MGMT_MSG_DSA_RSP, "Dynamic Service Addition Response (DSA-RSP)" },
- { MAC_MGMT_MSG_DSA_ACK, "Dynamic Service Addition Acknowledge (DSA-ACK)" },
- { 0, NULL }
-};
-
/* fix fields */
-static gint hf_dsa_req_message_type = -1;
static gint hf_dsa_transaction_id = -1;
-static gint hf_dsa_rsp_message_type = -1;
static gint hf_dsa_confirmation_code = -1;
-static gint hf_dsa_ack_message_type = -1;
-
-void dissect_mac_mgmt_msg_dsa_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_dsa_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type;
- proto_item *dsa_item = NULL;
- proto_tree *dsa_tree = NULL;
+ proto_item *dsa_item;
+ proto_tree *dsa_tree;
- if(tree)
{ /* we are being asked for details */
- /* get the message type */
- payload_type = tvb_get_guint8(tvb, offset);
- /* ensure the message type is DSA REQ */
- if(payload_type != MAC_MGMT_MSG_DSA_REQ)
- return;
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
+
/* display MAC message type */
- dsa_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsa_decoder, tvb, offset, tvb_len,
- "%s (%u bytes)", val_to_str(payload_type, vals_dsa_msgs, "Unknown"), tvb_len);
+ dsa_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsa_decoder, tvb, offset, -1,
+ "Dynamic Service Addition Request (DSA-REQ)");
/* add MAC DSx subtree */
dsa_tree = proto_item_add_subtree(dsa_item, ett_mac_mgmt_msg_dsa_req_decoder);
/* Decode and display the Uplink Channel Descriptor (UCD) */
- /* display the Message Type */
- proto_tree_add_item(dsa_tree, hf_dsa_req_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* move to next field */
- offset++;
/* display the Transaction ID */
proto_tree_add_item(dsa_tree, hf_dsa_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
/* move to next field */
offset += 2;
/* process DSA-REQ message TLV Encode Information */
- wimax_common_tlv_encoding_decoder(tvb_new_subset(tvb, offset, (tvb_len - offset), (tvb_len - offset)), pinfo, dsa_tree);
+ wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsa_tree);
}
}
-void dissect_mac_mgmt_msg_dsa_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_dsa_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type;
- proto_item *dsa_item = NULL;
- proto_tree *dsa_tree = NULL;
+ proto_item *dsa_item;
+ proto_tree *dsa_tree;
- if(tree)
{ /* we are being asked for details */
- /* get the message type */
- payload_type = tvb_get_guint8(tvb, offset);
- /* ensure the message type is DSA RSP */
- if(payload_type != MAC_MGMT_MSG_DSA_RSP)
- return;
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
/* display MAC message type */
- dsa_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsa_decoder, tvb, offset, tvb_len,
- "%s (%u bytes)", val_to_str(payload_type, vals_dsa_msgs, "Unknown"), tvb_len);
+ dsa_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsa_decoder, tvb, offset, -1,
+ "Dynamic Service Addition Response (DSA-RSP)");
/* add MAC DSx subtree */
dsa_tree = proto_item_add_subtree(dsa_item, ett_mac_mgmt_msg_dsa_rsp_decoder);
/* Decode and display the Uplink Channel Descriptor (UCD) */
- /* display the Message Type */
- proto_tree_add_item(dsa_tree, hf_dsa_rsp_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* move to next field */
- offset++;
/* display the Transaction ID */
proto_tree_add_item(dsa_tree, hf_dsa_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
/* move to next field */
@@ -130,36 +94,23 @@ void dissect_mac_mgmt_msg_dsa_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
/* move to next field */
offset++;
/* process DSA RSP message TLV Encode Information */
- wimax_common_tlv_encoding_decoder(tvb_new_subset(tvb, offset, (tvb_len - offset), (tvb_len - offset)), pinfo, dsa_tree);
+ wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsa_tree);
}
}
-void dissect_mac_mgmt_msg_dsa_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_dsa_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type;
- proto_item *dsa_item = NULL;
- proto_tree *dsa_tree = NULL;
+ proto_item *dsa_item;
+ proto_tree *dsa_tree;
- if(tree)
{ /* we are being asked for details */
- /* get the message type */
- payload_type = tvb_get_guint8(tvb, offset);
- /* ensure the message type is DSA ACK */
- if(payload_type != MAC_MGMT_MSG_DSA_ACK)
- return;
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
/* display MAC message type */
- dsa_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsa_decoder, tvb, offset, tvb_len,
- "%s (%u bytes)", val_to_str(payload_type, vals_dsa_msgs, "Unknown"), tvb_len);
+ dsa_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsa_decoder, tvb, offset, -1,
+ "Dynamic Service Addition Acknowledge (DSA-ACK)");
/* add MAC DSx subtree */
dsa_tree = proto_item_add_subtree(dsa_item, ett_mac_mgmt_msg_dsa_ack_decoder);
/* Decode and display the Uplink Channel Descriptor (UCD) */
- /* display the Message Type */
- proto_tree_add_item(dsa_tree, hf_dsa_ack_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* move to next field */
- offset++;
/* display the Transaction ID */
proto_tree_add_item(dsa_tree, hf_dsa_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
/* move to next field */
@@ -169,7 +120,7 @@ void dissect_mac_mgmt_msg_dsa_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
/* move to next field */
offset++;
/* process DSA-REQ message TLV Encode Information */
- wimax_common_tlv_encoding_decoder(tvb_new_subset(tvb, offset, (tvb_len - offset), (tvb_len - offset)), pinfo, dsa_tree);
+ wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsa_tree);
}
}
@@ -180,27 +131,6 @@ void proto_register_mac_mgmt_msg_dsa(void)
static hf_register_info hf[] =
{
{
- &hf_dsa_ack_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.dsa_ack",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
- &hf_dsa_req_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.dsa_req",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
- &hf_dsa_rsp_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.dsa_rsp",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
&hf_dsa_confirmation_code,
{
"Confirmation code", "wmx.dsa.confirmation_code",
diff --git a/plugins/wimax/msg_dsc.c b/plugins/wimax/msg_dsc.c
index 8b5029af4b..7b9d492787 100644
--- a/plugins/wimax/msg_dsc.c
+++ b/plugins/wimax/msg_dsc.c
@@ -45,82 +45,47 @@ static gint ett_mac_mgmt_msg_dsc_req_decoder = -1;
static gint ett_mac_mgmt_msg_dsc_rsp_decoder = -1;
static gint ett_mac_mgmt_msg_dsc_ack_decoder = -1;
-static const value_string vals_dsc_msgs[] = {
- { MAC_MGMT_MSG_DSC_REQ, "Dynamic Service Change Request (DSC-REQ)" },
- { MAC_MGMT_MSG_DSC_RSP, "Dynamic Service Change Response (DSC-RSP)" },
- { MAC_MGMT_MSG_DSC_ACK, "Dynamic Service Change Acknowledge (DSC-ACK)" },
- { 0, NULL }
-};
-
/* fix fields */
-static gint hf_dsc_req_message_type = -1;
static gint hf_dsc_transaction_id = -1;
-static gint hf_dsc_rsp_message_type = -1;
static gint hf_dsc_confirmation_code = -1;
-static gint hf_dsc_ack_message_type = -1;
-void dissect_mac_mgmt_msg_dsc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_dsc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type;
- proto_item *dsc_item = NULL;
- proto_tree *dsc_tree = NULL;
+ proto_item *dsc_item;
+ proto_tree *dsc_tree;
- if(tree)
{ /* we are being asked for details */
- /* get the message type */
- payload_type = tvb_get_guint8(tvb, offset);
- /* ensure the message type is DSC REQ/RSP/ACK */
- if(payload_type != MAC_MGMT_MSG_DSC_REQ)
- return;
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
+
/* display MAC message type */
- dsc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsc_decoder, tvb, offset, tvb_len,
- "%s (%u bytes)", val_to_str(payload_type, vals_dsc_msgs, "Unknown"), tvb_len);
+ dsc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsc_decoder, tvb, offset, -1,
+ "Dynamic Service Change Request (DSC-REQ)");
/* add MAC DSx subtree */
dsc_tree = proto_item_add_subtree(dsc_item, ett_mac_mgmt_msg_dsc_req_decoder);
/* Decode and display the Uplink Channel Descriptor (UCD) */
- /* display the Message Type */
- proto_tree_add_item(dsc_tree, hf_dsc_req_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* move to next field */
- offset++;
/* display the Transaction ID */
proto_tree_add_item(dsc_tree, hf_dsc_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
/* move to next field */
offset += 2;
/* process DSC REQ message TLV Encode Information */
- wimax_common_tlv_encoding_decoder(tvb_new_subset(tvb, offset, (tvb_len - offset), (tvb_len - offset)), pinfo, dsc_tree);
+ wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsc_tree);
}
}
-void dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type;
- proto_item *dsc_item = NULL;
- proto_tree *dsc_tree = NULL;
+ proto_item *dsc_item;
+ proto_tree *dsc_tree;
- if(tree)
{ /* we are being asked for details */
- /* get the message type */
- payload_type = tvb_get_guint8(tvb, offset);
- /* ensure the message type is DSC REQ/RSP/ACK */
- if(payload_type != MAC_MGMT_MSG_DSC_RSP)
- return;
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
/* display MAC message type */
- dsc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsc_decoder, tvb, offset, tvb_len,
- "%s (%u bytes)", val_to_str(payload_type, vals_dsc_msgs, "Unknown"), tvb_len);
+ dsc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsc_decoder, tvb, offset, -1,
+ "Dynamic Service Change Response (DSC-RSP)");
/* add MAC DSx subtree */
dsc_tree = proto_item_add_subtree(dsc_item, ett_mac_mgmt_msg_dsc_rsp_decoder);
/* Decode and display the Uplink Channel Descriptor (UCD) */
- /* display the Message Type */
- proto_tree_add_item(dsc_tree, hf_dsc_rsp_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* move to next field */
- offset++;
/* display the Transaction ID */
proto_tree_add_item(dsc_tree, hf_dsc_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
/* move to next field */
@@ -130,36 +95,23 @@ void dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
/* move to next field */
offset++;
/* process DSC RSP message TLV Encode Information */
- wimax_common_tlv_encoding_decoder(tvb_new_subset(tvb, offset, (tvb_len - offset), (tvb_len - offset)), pinfo, dsc_tree);
+ wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsc_tree);
}
}
void dissect_mac_mgmt_msg_dsc_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type;
- proto_item *dsc_item = NULL;
- proto_tree *dsc_tree = NULL;
+ proto_item *dsc_item;
+ proto_tree *dsc_tree;
- if(tree)
{ /* we are being asked for details */
- /* get the message type */
- payload_type = tvb_get_guint8(tvb, offset);
- /* ensure the message type is DSC REQ/RSP/ACK */
- if((payload_type < MAC_MGMT_MSG_DSC_REQ) || (payload_type > MAC_MGMT_MSG_DSC_ACK))
- return;
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
/* display MAC message type */
- dsc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsc_decoder, tvb, offset, tvb_len,
- "%s (%u bytes)", val_to_str(payload_type, vals_dsc_msgs, "Unknown"), tvb_len);
+ dsc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsc_decoder, tvb, offset, -1,
+ "Dynamic Service Change Acknowledge (DSC-ACK)");
/* add MAC DSx subtree */
dsc_tree = proto_item_add_subtree(dsc_item, ett_mac_mgmt_msg_dsc_ack_decoder);
/* Decode and display the Uplink Channel Descriptor (UCD) */
- /* display the Message Type */
- proto_tree_add_item(dsc_tree, hf_dsc_ack_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* move to next field */
- offset++;
/* display the Transaction ID */
proto_tree_add_item(dsc_tree, hf_dsc_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
/* move to next field */
@@ -169,7 +121,7 @@ void dissect_mac_mgmt_msg_dsc_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
/* move to next field */
offset++;
/* process DSC ACK message TLV Encode Information */
- wimax_common_tlv_encoding_decoder(tvb_new_subset(tvb, offset, (tvb_len - offset), (tvb_len - offset)), pinfo, dsc_tree);
+ wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsc_tree);
}
}
@@ -180,27 +132,6 @@ void proto_register_mac_mgmt_msg_dsc(void)
static hf_register_info hf[] =
{
{
- &hf_dsc_ack_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.dsc_ack",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
- &hf_dsc_req_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.dsc_req",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
- &hf_dsc_rsp_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.dsc_rsp",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
&hf_dsc_confirmation_code,
{
"Confirmation code", "wmx.dsc.confirmation_code",
@@ -232,6 +163,8 @@ void proto_register_mac_mgmt_msg_dsc(void)
proto_register_field_array(proto_mac_mgmt_msg_dsc_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+
+ register_dissector("mac_mgmt_msg_dsc_rsp_handler", dissect_mac_mgmt_msg_dsc_rsp_decoder, -1);
}
void
diff --git a/plugins/wimax/msg_dsd.c b/plugins/wimax/msg_dsd.c
index 2ffd704380..0857763549 100644
--- a/plugins/wimax/msg_dsd.c
+++ b/plugins/wimax/msg_dsd.c
@@ -48,52 +48,33 @@ static gint ett_mac_mgmt_msg_dsd_rsp_decoder = -1;
/* static gint ett_dsd_hmac_tuple = -1; */
/* static gint ett_dsd_cmac_tuple = -1; */
-static const value_string vals_dsd_msgs[] =
-{
- { MAC_MGMT_MSG_DSD_REQ, "Dynamic Service Deletion Request (DSD-REQ)" },
- { MAC_MGMT_MSG_DSD_RSP, "Dynamic Service Deletion Response (DSD-RSP)" },
- { 0, NULL }
-};
-
/* fix fields */
-static gint hf_dsd_req_message_type = -1;
static gint hf_dsd_transaction_id = -1;
static gint hf_dsd_service_flow_id = -1;
-static gint hf_dsd_rsp_message_type = -1;
static gint hf_dsd_confirmation_code = -1;
static gint hf_dsd_invalid_tlv = -1;
static gint hf_dsd_unknown_type = -1;
-void dissect_mac_mgmt_msg_dsd_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_dsd_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type, tlv_len, tlv_value_offset;
+ guint tvb_len, tlv_len, tlv_value_offset;
gint tlv_type;
- proto_item *dsd_item = NULL;
- proto_tree *dsd_tree = NULL;
+ proto_item *dsd_item;
+ proto_tree *dsd_tree;
proto_tree *tlv_tree = NULL;
tlv_info_t tlv_info;
- if(tree)
{ /* we are being asked for details */
- /* get the message type */
- payload_type = tvb_get_guint8(tvb, offset);
- /* ensure the message type is DSD REQ/RSP/ACK */
- if(payload_type != MAC_MGMT_MSG_DSD_REQ)
- return;
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC message type */
- dsd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsd_decoder, tvb, offset, tvb_len,
- "%s (%u bytes)", val_to_str(payload_type, vals_dsd_msgs, "Unknown"), tvb_len);
+ dsd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsd_decoder, tvb, offset, -1,
+ "Dynamic Service Deletion Request (DSD-REQ)");
/* add MAC DSx subtree */
dsd_tree = proto_item_add_subtree(dsd_item, ett_mac_mgmt_msg_dsd_req_decoder);
/* Decode and display the DSD message */
- /* display the Message Type */
- proto_tree_add_item(dsd_tree, hf_dsd_req_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* move to next field */
- offset++;
/* display the Transaction ID */
proto_tree_add_item(dsd_tree, hf_dsd_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
/* move to next field */
@@ -147,35 +128,25 @@ void dissect_mac_mgmt_msg_dsd_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
}
}
-void dissect_mac_mgmt_msg_dsd_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_dsd_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type, tlv_len, tlv_value_offset;
+ guint tvb_len, tlv_len, tlv_value_offset;
gint tlv_type;
- proto_item *dsd_item = NULL;
- proto_tree *dsd_tree = NULL;
+ proto_item *dsd_item;
+ proto_tree *dsd_tree;
proto_tree *tlv_tree = NULL;
tlv_info_t tlv_info;
- if(tree)
{ /* we are being asked for details */
- /* get the message type */
- payload_type = tvb_get_guint8(tvb, offset);
- /* ensure the message type is DSD REQ/RSP/ACK */
- if(payload_type != MAC_MGMT_MSG_DSD_RSP)
- return;
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC message type */
- dsd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsd_decoder, tvb, offset, tvb_len,
- "%s (%u bytes)", val_to_str(payload_type, vals_dsd_msgs, "Unknown"), tvb_len);
+ dsd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsd_decoder, tvb, offset, -1,
+ "Dynamic Service Deletion Response (DSD-RSP)");
/* add MAC DSx subtree */
dsd_tree = proto_item_add_subtree(dsd_item, ett_mac_mgmt_msg_dsd_rsp_decoder);
/* Decode and display the DSD message */
- /* display the Message Type */
- proto_tree_add_item(dsd_tree, hf_dsd_rsp_message_type, tvb, offset, 1, ENC_NA);
- /* move to next field */
- offset++;
/* display the Transaction ID */
proto_tree_add_item(dsd_tree, hf_dsd_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
/* move to next field */
@@ -240,20 +211,6 @@ void proto_register_mac_mgmt_msg_dsd(void)
static hf_register_info hf[] =
{
{
- &hf_dsd_req_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.dsd_req",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
- &hf_dsd_rsp_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.dsd_rsp",
- FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
- }
- },
- {
&hf_dsd_confirmation_code,
{
"Confirmation code", "wmx.dsd.confirmation_code",
diff --git a/plugins/wimax/msg_dsx_rvd.c b/plugins/wimax/msg_dsx_rvd.c
index e1a14a2d5d..01362d358f 100644
--- a/plugins/wimax/msg_dsx_rvd.c
+++ b/plugins/wimax/msg_dsx_rvd.c
@@ -38,36 +38,22 @@ static gint proto_mac_mgmt_msg_dsx_rvd_decoder = -1;
static gint ett_mac_mgmt_msg_dsx_rvd_decoder = -1;
/* fix fields */
-static gint hf_dsx_rvd_message_type = -1;
static gint hf_dsx_rvd_transaction_id = -1;
static gint hf_dsx_rvd_confirmation_code = -1;
/* Decode DSX-RVD messages. */
-void dissect_mac_mgmt_msg_dsx_rvd_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static void dissect_mac_mgmt_msg_dsx_rvd_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type;
- proto_item *dsx_rvd_item = NULL;
- proto_tree *dsx_rvd_tree = NULL;
+ proto_item *dsx_rvd_item;
+ proto_tree *dsx_rvd_tree;
- if(tree)
{ /* we are being asked for details */
- /* get the message type */
- payload_type = tvb_get_guint8(tvb, offset);
- /* ensure the message type is DSX-RVD */
- if(payload_type != MAC_MGMT_MSG_DSX_RVD)
- return;
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
/* display MAC message type */
- dsx_rvd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsx_rvd_decoder, tvb, offset, tvb_len, "DSx Received (DSX-RVD) (%u bytes)", tvb_len);
+ dsx_rvd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsx_rvd_decoder, tvb, offset, -1, "DSx Received (DSX-RVD)");
/* add MAC DSx subtree */
dsx_rvd_tree = proto_item_add_subtree(dsx_rvd_item, ett_mac_mgmt_msg_dsx_rvd_decoder);
- /* display the Message Type */
- proto_tree_add_item(dsx_rvd_tree, hf_dsx_rvd_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* move to next field */
- offset++;
/* display the Transaction ID */
proto_tree_add_item(dsx_rvd_tree, hf_dsx_rvd_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
/* move to next field */
@@ -84,10 +70,6 @@ void proto_register_mac_mgmt_msg_dsx_rvd(void)
static hf_register_info hf_dsx_rvd[] =
{
{
- &hf_dsx_rvd_message_type,
- {"MAC Management Message Type", "wmx.macmgtmsgtype.dsx_rvd", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
- },
- {
&hf_dsx_rvd_confirmation_code,
{ "Confirmation code", "wmx.dsx_rvd.confirmation_code", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
},
diff --git a/plugins/wimax/msg_fpc.c b/plugins/wimax/msg_fpc.c
index 362f3e3999..882b389781 100644
--- a/plugins/wimax/msg_fpc.c
+++ b/plugins/wimax/msg_fpc.c
@@ -36,14 +36,11 @@
#include "wimax_tlv.h"
#include "wimax_mac.h"
-extern gint man_ofdma;
-
static gint proto_mac_mgmt_msg_fpc_decoder = -1;
static gint ett_mac_mgmt_msg_fpc_decoder = -1;
/* FPC fields */
-static gint hf_fpc_message_type = -1;
static gint hf_fpc_number_of_stations = -1;
static gint hf_fpc_basic_cid = -1;
static gint hf_fpc_power_adjust = -1;
@@ -52,42 +49,32 @@ static gint hf_fpc_power_measurement_frame = -1;
/* Decode FPC messages. */
-void dissect_mac_mgmt_msg_fpc_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static void dissect_mac_mgmt_msg_fpc_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
guint offset = 0;
guint i;
guint number_stations;
- guint tvb_len, payload_type;
- proto_item *fpc_item = NULL;
- proto_tree *fpc_tree = NULL;
+ guint tvb_len;
+ proto_item *fpc_item;
+ proto_tree *fpc_tree;
gint8 value;
gfloat power_change;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, 0);
- if(payload_type != MAC_MGMT_MSG_FPC)
- {
- return;
- }
-
- if (tree)
{ /* we are being asked for details */
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type FPC */
- fpc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_fpc_decoder, tvb, 0, tvb_len, "MAC Management Message, FPC (38)");
+ fpc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_fpc_decoder, tvb, 0, -1, "MAC Management Message, FPC");
/* add MAC FPC subtree */
fpc_tree = proto_item_add_subtree(fpc_item, ett_mac_mgmt_msg_fpc_decoder);
- /* display the Message Type */
- proto_tree_add_item(fpc_tree, hf_fpc_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset ++;
+
/* display the Number of stations */
proto_tree_add_item(fpc_tree, hf_fpc_number_of_stations, tvb, offset, 1, ENC_BIG_ENDIAN);
number_stations = tvb_get_guint8(tvb, offset);
offset++;
- for (i = 0; i < number_stations; i++ ) {
+ for (i = 0; ((i < number_stations) && (offset >= tvb_len)); i++ ) {
/* display the Basic CID*/
proto_tree_add_item(fpc_tree, hf_fpc_basic_cid, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
@@ -103,10 +90,6 @@ void dissect_mac_mgmt_msg_fpc_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, pro
/* display the Power measurement frame */
proto_tree_add_item(fpc_tree, hf_fpc_power_measurement_frame, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
-
- if ( offset >= tvb_len ) {
- break;
- }
}
}
}
@@ -118,14 +101,6 @@ void proto_register_mac_mgmt_msg_fpc(void)
static hf_register_info hf[] =
{
{
- &hf_fpc_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.fpc",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL
- }
- },
- {
&hf_fpc_basic_cid,
{
"Basic CID", "wmx.fpc.basic_cid",
diff --git a/plugins/wimax/msg_pkm.c b/plugins/wimax/msg_pkm.c
index 93398429ff..6eff638f46 100644
--- a/plugins/wimax/msg_pkm.c
+++ b/plugins/wimax/msg_pkm.c
@@ -64,92 +64,69 @@ static const value_string vals_pkm_msg_code[] =
{18, "PKMv2 EAP-Transfer"},
{19, "PKMv2 Authenticated EAP-Transfer"},
{20, "PKMv2 SA TEK Challenge"},
- {21, "PKMv2 SA TEK Request"},
+ {21, "PKMv2 SA TEK Request"},
{22, "PKMv2 SA TEK Response"},
{23, "PKMv2 Key-Request"},
- {24, "PKMv2 Key-Reply"},
+ {24, "PKMv2 Key-Reply"},
{25, "PKMv2 Key-Reject"},
{26, "PKMv2 SA-Addition"},
{27, "PKMv2 TEK-Invalid"},
- {28, "PKMv2 Group-Key-Update-Command"},
+ {28, "PKMv2 Group-Key-Update-Command"},
{29, "PKMv2 EAP Complete"},
{30, "PKMv2 Authenticated EAP Start"},
{ 0, NULL}
};
/* fix fields */
-static gint hf_pkm_req_message_type = -1;
-static gint hf_pkm_rsp_message_type = -1;
static gint hf_pkm_msg_code = -1;
static gint hf_pkm_msg_pkm_id = -1;
/* Wimax Mac PKM-REQ Message Dissector */
-void dissect_mac_mgmt_msg_pkm_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_pkm_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, length;
- proto_item *pkm_item = NULL;
- proto_tree *pkm_tree = NULL;
-
- { /* we are being asked for details */
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
- /* display MAC payload type PKM-REQ */
- pkm_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_pkm_decoder, tvb, offset, tvb_len, "Privacy Key Management Request (PKM-REQ) (%u bytes)", tvb_len);
- /* add MAC PKM subtree */
- pkm_tree = proto_item_add_subtree(pkm_item, ett_mac_mgmt_msg_pkm_req_decoder);
- /* Decode and display the Privacy Key Management Request Message (PKM-REQ) (table 24) */
- /* display the Message Type */
- proto_tree_add_item(pkm_tree, hf_pkm_req_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* set the offset for the PKM Code */
- offset++;
- /* display the PKM Code */
- proto_tree_add_item(pkm_tree, hf_pkm_msg_code, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* set the offset for the PKM ID */
- offset++;
- /* display the PKM ID */
- proto_tree_add_item(pkm_tree, hf_pkm_msg_pkm_id, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* set the offset for the TLV Encoded info */
- offset++;
- /* process the PKM TLV Encoded Attributes */
- length = tvb_len - offset;
- wimax_pkm_tlv_encoded_attributes_decoder(tvb_new_subset(tvb, offset, length, length), pinfo, pkm_tree);
- }
+ proto_item *pkm_item;
+ proto_tree *pkm_tree;
+
+ /* display MAC payload type PKM-REQ */
+ pkm_item = pkm_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_pkm_decoder, tvb, offset, -1, "Privacy Key Management Request (PKM-REQ)");
+ /* add MAC PKM subtree */
+ pkm_tree = proto_item_add_subtree(pkm_item, ett_mac_mgmt_msg_pkm_req_decoder);
+ /* Decode and display the Privacy Key Management Request Message (PKM-REQ) (table 24) */
+ /* display the PKM Code */
+ proto_tree_add_item(pkm_tree, hf_pkm_msg_code, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* set the offset for the PKM ID */
+ offset++;
+ /* display the PKM ID */
+ proto_tree_add_item(pkm_tree, hf_pkm_msg_pkm_id, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* set the offset for the TLV Encoded info */
+ offset++;
+ wimax_pkm_tlv_encoded_attributes_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, pkm_tree);
}
/* Wimax Mac PKM-RSP Message Dissector */
-void dissect_mac_mgmt_msg_pkm_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_pkm_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, length;
- proto_item *pkm_item = NULL;
- proto_tree *pkm_tree = NULL;
-
- { /* we are being asked for details */
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
- /* display MAC payload type PKM-RSP */
- pkm_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_pkm_decoder, tvb, offset, tvb_len, "Privacy Key Management Response (PKM-RSP) (%u bytes)", tvb_len);
- /* add MAC PKM subtree */
- pkm_tree = proto_item_add_subtree(pkm_item, ett_mac_mgmt_msg_pkm_rsp_decoder);
- /* Decode and display the Privacy Key Management Response (PKM-RSP) (table 25) */
- /* display the Message Type */
- proto_tree_add_item(pkm_tree, hf_pkm_rsp_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* set the offset for the PKM Code */
- offset++;
- /* display the PKM Code */
- proto_tree_add_item(pkm_tree, hf_pkm_msg_code, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* set the offset for the PKM ID */
- offset++;
- /* display the PKM ID */
- proto_tree_add_item(pkm_tree, hf_pkm_msg_pkm_id, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* set the offset for the TLV Encoded info */
- offset++;
- /* process the PKM TLV Encoded Attributes */
- length = tvb_len - offset;
- wimax_pkm_tlv_encoded_attributes_decoder(tvb_new_subset(tvb, offset, length, length), pinfo, pkm_tree);
- }
+ proto_item *pkm_item;
+ proto_tree *pkm_tree;
+
+ /* display MAC payload type PKM-RSP */
+ pkm_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_pkm_decoder, tvb, offset, -1, "Privacy Key Management Response (PKM-RSP)");
+ /* add MAC PKM subtree */
+ pkm_tree = proto_item_add_subtree(pkm_item, ett_mac_mgmt_msg_pkm_rsp_decoder);
+ /* Decode and display the Privacy Key Management Response (PKM-RSP) (table 25) */
+ /* display the PKM Code */
+ proto_tree_add_item(pkm_tree, hf_pkm_msg_code, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* set the offset for the PKM ID */
+ offset++;
+ /* display the PKM ID */
+ proto_tree_add_item(pkm_tree, hf_pkm_msg_pkm_id, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* set the offset for the TLV Encoded info */
+ offset++;
+ /* process the PKM TLV Encoded Attributes */
+ wimax_pkm_tlv_encoded_attributes_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, pkm_tree);
}
/* Register Wimax Mac PKM-REQ/RSP Messages Dissectors */
@@ -166,14 +143,6 @@ void proto_register_mac_mgmt_msg_pkm(void)
&hf_pkm_msg_pkm_id,
{"PKM Identifier", "wmx.pkm.msg_pkm_identifier",FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
},
- {
- &hf_pkm_req_message_type,
- {"MAC Management Message Type", "wmx.macmgtmsgtype.pkm_req", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
- },
- {
- &hf_pkm_rsp_message_type,
- {"MAC Management Message Type", "wmx.macmgtmsgtype.pkm_rsp", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
- }
};
/* Setup protocol subtree array */
diff --git a/plugins/wimax/msg_pmc.c b/plugins/wimax/msg_pmc.c
index 2579266694..47a4b44288 100644
--- a/plugins/wimax/msg_pmc.c
+++ b/plugins/wimax/msg_pmc.c
@@ -39,7 +39,6 @@
#include "wimax_mac.h"
#include "wimax_utils.h"
-extern gint man_ofdma;
extern gboolean include_cor2_changes;
static gint proto_mac_mgmt_msg_pmc_req_decoder = -1;
@@ -54,8 +53,6 @@ static gint *ett[] =
};
/* PMC fields */
-static gint hf_pmc_req_message_type = -1;
-static gint hf_pmc_rsp_message_type = -1;
static gint hf_pmc_req_pwr_control_mode_change = -1;
static gint hf_pmc_req_pwr_control_mode_change_cor2 = -1;
static gint hf_pmc_req_tx_power_level = -1;
@@ -95,13 +92,6 @@ void proto_register_mac_mgmt_msg_pmc_req(void)
static hf_register_info hf[] =
{
{
- &hf_pmc_req_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.pmc_req",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
&hf_pmc_req_confirmation,
{
"Confirmation", "wmx.pmc_req.confirmation",
@@ -137,13 +127,6 @@ void proto_register_mac_mgmt_msg_pmc_req(void)
}
},
{
- &hf_pmc_rsp_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.pmc_rsp",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
&hf_pmc_rsp_offset_BS_per_MS,
{
"Offset_BS per MS", "wmx.pmc_rsp.offset_BS_per_MS",
@@ -187,32 +170,18 @@ void proto_register_mac_mgmt_msg_pmc_rsp(void)
}
/* Decode PMC-REQ messages. */
-void dissect_mac_mgmt_msg_pmc_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static void dissect_mac_mgmt_msg_pmc_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type;
- proto_item *pmc_req_item = NULL;
- proto_tree *pmc_req_tree = NULL;
+ proto_item *pmc_req_item;
+ proto_tree *pmc_req_tree;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, 0);
- if(payload_type != MAC_MGMT_MSG_PMC_REQ)
- {
- return;
- }
-
- if (tree)
{ /* we are being asked for details */
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
/* display MAC payload type PMC-REQ */
- pmc_req_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_pmc_req_decoder, tvb, 0, tvb_len, "MAC Management Message, PMC-REQ (63)");
+ pmc_req_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_pmc_req_decoder, tvb, 0, -1, "MAC Management Message, PMC-REQ");
/* add MAC PMC REQ subtree */
pmc_req_tree = proto_item_add_subtree(pmc_req_item, ett_mac_mgmt_msg_pmc_decoder);
- /* display the Message Type */
- proto_tree_add_item(pmc_req_tree, hf_pmc_req_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
/* display the Power Control Mode Change */
proto_tree_add_item(pmc_req_tree, hf_pmc_req_pwr_control_mode_change, tvb, offset, 2, ENC_BIG_ENDIAN);
/* show the Transmit Power Level */
@@ -225,35 +194,21 @@ void dissect_mac_mgmt_msg_pmc_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_,
}
/* Decode PMC-RSP messages. */
-void dissect_mac_mgmt_msg_pmc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static void dissect_mac_mgmt_msg_pmc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type;
- proto_item *pmc_rsp_item = NULL;
- proto_tree *pmc_rsp_tree = NULL;
+ proto_item *pmc_rsp_item;
+ proto_tree *pmc_rsp_tree;
guint8 pwr_control_mode;
gint8 value;
gfloat power_change;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, 0);
- if(payload_type != MAC_MGMT_MSG_PMC_RSP)
- {
- return;
- }
-
- if (tree)
{ /* we are being asked for details */
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
/* display MAC payload type PMC-RSP */
- pmc_rsp_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_pmc_rsp_decoder, tvb, 0, tvb_len, "MAC Management Message, PMC-RSP (64)");
+ pmc_rsp_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_pmc_rsp_decoder, tvb, 0, -1, "MAC Management Message, PMC-RSP");
/* add MAC PMC RSP subtree */
pmc_rsp_tree = proto_item_add_subtree(pmc_rsp_item, ett_mac_mgmt_msg_pmc_decoder);
- /* display the Message Type */
- proto_tree_add_item(pmc_rsp_tree, hf_pmc_rsp_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset ++;
/* display the Power Control Mode Change */
if (include_cor2_changes)
diff --git a/plugins/wimax/msg_prc_lt_ctrl.c b/plugins/wimax/msg_prc_lt_ctrl.c
index 3ff6c51b01..5266181d27 100644
--- a/plugins/wimax/msg_prc_lt_ctrl.c
+++ b/plugins/wimax/msg_prc_lt_ctrl.c
@@ -36,14 +36,11 @@
#include "wimax_tlv.h"
#include "wimax_mac.h"
-extern gint man_ofdma;
-
static gint proto_mac_mgmt_msg_prc_lt_ctrl_decoder = -1;
static gint ett_mac_mgmt_msg_prc_lt_ctrl_decoder = -1;
/* PRC-LT-CTRL fields */
-static gint hf_prc_lt_ctrl_message_type = -1;
static gint hf_prc_lt_ctrl_precoding = -1;
static gint hf_prc_lt_ctrl_precoding_delay = -1;
/* static gint hf_prc_lt_ctrl_invalid_tlv = -1; */
@@ -56,35 +53,20 @@ static const value_string vals_turn_on[] = {
/* Decode PRC-LT-CTRL messages. */
-void dissect_mac_mgmt_msg_prc_lt_ctrl_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static void dissect_mac_mgmt_msg_prc_lt_ctrl_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type;
- proto_item *prc_lt_ctrl_item = NULL;
- proto_tree *prc_lt_ctrl_tree = NULL;
+ proto_item *prc_lt_ctrl_item;
+ proto_tree *prc_lt_ctrl_tree;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, 0);
- if(payload_type != MAC_MGMT_MSG_PRC_LT_CTRL)
- {
- return;
- }
-
- if (tree)
{ /* we are being asked for details */
- /* Get the tvb reported length */
- tvb_len = tvb_reported_length(tvb);
/* display MAC payload type PRC-LT-CTRL */
- prc_lt_ctrl_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_prc_lt_ctrl_decoder, tvb, 0, tvb_len, "MAC Management Message, PRC-LT-CTRL (65)");
+ 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");
/* add MAC PRC-LT-CTRL subtree */
prc_lt_ctrl_tree = proto_item_add_subtree(prc_lt_ctrl_item, ett_mac_mgmt_msg_prc_lt_ctrl_decoder);
- /* display the Message Type */
- proto_tree_add_item(prc_lt_ctrl_tree, hf_prc_lt_ctrl_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset ++;
-
/* display whether to Setup or Tear-down the
* long-term MIMO precoding delay */
proto_tree_add_item(prc_lt_ctrl_tree, hf_prc_lt_ctrl_precoding, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -100,13 +82,6 @@ void proto_register_mac_mgmt_msg_prc_lt_ctrl(void)
/* PRC-LT-CTRL fields display */
static hf_register_info hf[] =
{
- {
- &hf_prc_lt_ctrl_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.prc_lt_ctrl",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
#if 0
{
&hf_prc_lt_ctrl_invalid_tlv,
diff --git a/plugins/wimax/msg_reg_req.c b/plugins/wimax/msg_reg_req.c
index 2475bcd79c..b97af28752 100644
--- a/plugins/wimax/msg_reg_req.c
+++ b/plugins/wimax/msg_reg_req.c
@@ -149,8 +149,6 @@ static gint hf_reg_multi_active_power_saving_classes = -1;
static gint hf_reg_total_power_saving_class_instances = -1;
static gint hf_reg_power_saving_class_reserved = -1;
-static gint hf_reg_req_message_type = -1;
-
/* STRING RESOURCES */
static const true_false_string tfs_reg_ip_mgmt_mode = {
@@ -496,7 +494,7 @@ void dissect_extended_tlv(proto_tree *reg_req_tree, gint tlv_type, tvbuff_t *tvb
case CURRENT_TX_POWER:
case MAC_VERSION_ENCODING:
case CMAC_TUPLE: /* Table 348b */
- wimax_common_tlv_encoding_decoder(tvb_new_subset(tvb, offset, (tvb_len - offset), (tvb_len - offset)), pinfo, reg_req_tree);
+ wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, reg_req_tree);
break;
default:
tlv_tree = add_tlv_subtree(&tlv_info, ett_mac_mgmt_msg_reg_req_decoder, reg_req_tree, proto_registry, tvb, tlv_offset, (tvb_len - tlv_offset), FALSE);
@@ -508,11 +506,11 @@ void dissect_extended_tlv(proto_tree *reg_req_tree, gint tlv_type, tvbuff_t *tvb
/* Decode REG-REQ messages. */
-void dissect_mac_mgmt_msg_reg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_reg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
guint tlv_offset;
- guint tvb_len, payload_type;
+ guint tvb_len;
proto_item *reg_req_item = NULL;
proto_tree *reg_req_tree = NULL;
proto_tree *tlv_tree = NULL;
@@ -521,25 +519,14 @@ void dissect_mac_mgmt_msg_reg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
gint tlv_type;
gint tlv_len;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, offset);
- if (payload_type != MAC_MGMT_MSG_REG_REQ)
- {
- return;
- }
-
- if (tree)
{ /* we are being asked for details */
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type REG-REQ */
- reg_req_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_reg_req_decoder, tvb, offset, tvb_len, "MAC Management Message, REG-REQ (6)");
+ reg_req_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_reg_req_decoder, tvb, offset, tvb_len, "MAC Management Message, REG-REQ");
/* add MAC REG-REQ subtree */
reg_req_tree = proto_item_add_subtree(reg_req_item, ett_mac_mgmt_msg_reg_req_decoder);
- /* display the Message Type */
- proto_tree_add_item(reg_req_tree, hf_reg_req_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
while(offset < tvb_len)
{
@@ -1280,13 +1267,6 @@ void proto_register_mac_mgmt_msg_reg_req(void)
}
},
{
- &hf_reg_req_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.reg_req",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
&hf_reg_invalid_tlv,
{
"Invalid TLV", "wmx.reg_req.invalid_tlv",
diff --git a/plugins/wimax/msg_reg_rsp.c b/plugins/wimax/msg_reg_rsp.c
index 184acf8891..5f923f9c9f 100644
--- a/plugins/wimax/msg_reg_rsp.c
+++ b/plugins/wimax/msg_reg_rsp.c
@@ -42,10 +42,9 @@
extern gboolean include_cor2_changes;
-extern gint man_ofdma;
-
extern void dissect_extended_tlv(proto_tree *reg_req_tree, gint tlv_type, tvbuff_t *tvb, guint tlv_offset, guint tlv_len, packet_info *pinfo, guint offset, gint proto_registry);
-extern void dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+
+static dissector_handle_t dsc_rsp_handle = NULL;
static gint proto_mac_mgmt_msg_reg_rsp_decoder = -1;
static gint ett_mac_mgmt_msg_reg_rsp_decoder = -1;
@@ -54,7 +53,6 @@ static gint ett_reg_rsp_message_tree = -1;
/* NCT messages */
/* REG-RSP fields */
-static gint hf_reg_rsp_message_type = -1;
static gint hf_reg_rsp_status = -1;
static gint hf_tlv_type = -1;
/* static gint hf_tlv_value = -1; */
@@ -76,13 +74,13 @@ static const value_string vals_reg_rsp_status [] = {
/* Decode REG-RSP messages. */
-void dissect_mac_mgmt_msg_reg_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_reg_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
guint tlv_offset;
- guint tvb_len, payload_type;
- proto_item *reg_rsp_item = NULL;
- proto_tree *reg_rsp_tree = NULL;
+ guint tvb_len;
+ proto_item *reg_rsp_item;
+ proto_tree *reg_rsp_tree;
proto_item *tlv_item = NULL;
proto_tree *tlv_tree = NULL;
proto_tree *sub_tree = NULL;
@@ -96,26 +94,16 @@ void dissect_mac_mgmt_msg_reg_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
gint sub_tlv_len;
guint sub_tlv_offset;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, offset);
- if (payload_type != MAC_MGMT_MSG_REG_RSP)
- {
- return;
- }
-
- if (tree)
{ /* we are being asked for details */
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type REG-RSP */
- reg_rsp_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_reg_rsp_decoder, tvb, offset, tvb_len, "MAC Management Message, REG-RSP (7)");
+ reg_rsp_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_reg_rsp_decoder, tvb, offset, tvb_len, "MAC Management Message, REG-RSP");
/* add MAC REG-RSP subtree */
reg_rsp_tree = proto_item_add_subtree(reg_rsp_item, ett_mac_mgmt_msg_reg_rsp_decoder);
- /* display the Message Type */
- proto_tree_add_item(reg_rsp_tree, hf_reg_rsp_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(reg_rsp_tree, hf_reg_rsp_status, tvb, offset + 1, 1, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(reg_rsp_tree, hf_reg_rsp_status, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
while (offset < tvb_len)
{
@@ -209,7 +197,7 @@ void dissect_mac_mgmt_msg_reg_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
case REG_RSP_TLV_T_24_3_CID_UPDATE_ENCODINGS_CONNECTION_INFO:
tlv_tree = add_protocol_subtree(&sub_tlv_info, ett_reg_rsp_message_tree, sub_tree, proto_mac_mgmt_msg_reg_rsp_decoder, tvb, sub_tlv_offset, sub_tlv_len, "CID Update Encodings Connection Info (%u byte(s))", tlv_len);
/* Decode the DSC_RSP subTLV's */
- dissect_mac_mgmt_msg_dsc_rsp_decoder(tvb_new_subset(tvb, sub_tlv_offset, sub_tlv_len, sub_tlv_len), pinfo, tlv_tree);
+ call_dissector(dsc_rsp_handle, tvb_new_subset(tvb, sub_tlv_offset, sub_tlv_len, sub_tlv_len), pinfo, tlv_tree);
break;
default:
tlv_tree = add_tlv_subtree(&sub_tlv_info, ett_reg_rsp_message_tree, sub_tree, hf_tlv_type, tvb, sub_tlv_offset, sub_tlv_len, FALSE);
@@ -291,13 +279,6 @@ void proto_register_mac_mgmt_msg_reg_rsp(void)
static hf_register_info hf[] =
{
{
- &hf_reg_rsp_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.reg_rsp",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
&hf_reg_invalid_tlv,
{
"Invalid TLV", "wmx.reg_rsp.invalid_tlv",
@@ -379,12 +360,16 @@ void proto_register_mac_mgmt_msg_reg_rsp(void)
proto_register_field_array(proto_mac_mgmt_msg_reg_rsp_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+
+ register_dissector("mac_mgmt_msg_reg_rsp_handler", dissect_mac_mgmt_msg_reg_rsp_decoder, -1);
}
void proto_reg_handoff_mac_mgmt_msg_reg_rsp(void)
{
dissector_handle_t reg_rsp_handle;
+ dsc_rsp_handle = find_dissector("mac_mgmt_msg_dsc_rsp_handler");
+
reg_rsp_handle = create_dissector_handle(dissect_mac_mgmt_msg_reg_rsp_decoder, proto_mac_mgmt_msg_reg_rsp_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_REG_RSP, reg_rsp_handle);
}
diff --git a/plugins/wimax/msg_rep.c b/plugins/wimax/msg_rep.c
index e543b4047d..40e8b8a03c 100644
--- a/plugins/wimax/msg_rep.c
+++ b/plugins/wimax/msg_rep.c
@@ -89,8 +89,6 @@ static const value_string vals_type_of_measurements[] =
};
/* fix fields */
-static gint hf_rep_req_message_type = -1;
-static gint hf_rep_rsp_message_type = -1;
static gint hf_rep_unknown_type = -1;
static gint hf_rep_invalid_tlv = -1;
@@ -255,37 +253,25 @@ static gint hf_rep_rsp_channel_selectivity_rep_frequency_c = -1;
/* Wimax Mac REP-REQ Message Dissector */
-void dissect_mac_mgmt_msg_rep_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_rep_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type;
+ guint tvb_len;
gint tlv_type, tlv_len, tlv_value_offset, length, tlv_offset;
- proto_item *rep_item = NULL;
- proto_tree *rep_tree = NULL;
+ proto_item *rep_item;
+ proto_tree *rep_tree;
proto_tree *tlv_tree = NULL;
proto_tree *ti_tree = NULL;
tlv_info_t tlv_info;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, offset);
- if(payload_type != MAC_MGMT_MSG_REP_REQ)
- {
- return;
- }
-
- if(tree)
{ /* we are being asked for details */
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type REP-REQ */
- rep_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_rep_decoder, tvb, offset, tvb_len, "Report Request (REP-REQ) (%u bytes)", tvb_len);
+ rep_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_rep_decoder, tvb, offset, -1, "Report Request (REP-REQ)");
/* add MAC REP-REQ subtree */
rep_tree = proto_item_add_subtree(rep_item, ett_mac_mgmt_msg_rep_req_decoder);
- /* Decode and display the Report Request message (REP-REQ) */
- /* display the Message Type */
- proto_tree_add_item(rep_tree, hf_rep_req_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* set the offset for the TLV Encoded info */
- offset++;
+
/* process the REP-REQ TLVs */
while(offset < tvb_len)
{ /* get the TLV information */
@@ -420,40 +406,29 @@ void dissect_mac_mgmt_msg_rep_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
}
/* Wimax Mac REP-RSP Message Dissector */
-void dissect_mac_mgmt_msg_rep_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_rep_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type, length, value;
+ guint tvb_len, length, value;
gint tlv_type, tlv_len, tlv_value_offset, tlv_offset;
gint db_val;
- proto_item *rep_item = NULL;
- proto_tree *rep_tree = NULL;
+ proto_item *rep_item;
+ proto_tree *rep_tree;
proto_tree *tlv_tree = NULL;
proto_item *ti = NULL;
proto_tree *ti_tree = NULL;
tlv_info_t tlv_info;
gfloat current_power;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, offset);
- if(payload_type != MAC_MGMT_MSG_REP_RSP)
- {
- return;
- }
-
- if(tree)
{ /* we are being asked for details */
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type REP-RSP */
- rep_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_rep_decoder, tvb, offset, tvb_len, "Report Response (REP-RSP) (%u bytes)", tvb_len);
+ rep_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_rep_decoder, tvb, offset, -1, "Report Response (REP-RSP)");
/* add MAC REP-RSP subtree */
rep_tree = proto_item_add_subtree(rep_item, ett_mac_mgmt_msg_rep_rsp_decoder);
/* Decode and display the Report Response message (REP-RSP) */
- /* display the Message Type */
- proto_tree_add_item(rep_tree, hf_rep_rsp_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* set the offset for the TLV Encoded info */
- offset++;
+
/* process the REP-RSP TLVs */
while(offset < tvb_len)
{ /* get the TLV information */
@@ -871,13 +846,6 @@ void proto_register_mac_mgmt_msg_rep(void)
FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
}
},
- {
- &hf_rep_req_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.rep_req",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
{ /* type 1.2 */
&hf_rep_req_channel_number,
{
@@ -1214,13 +1182,6 @@ void proto_register_mac_mgmt_msg_rep(void)
FT_UINT24, BASE_HEX, NULL, REP_REQ_TYPE_OF_ZONE_REQUEST_BIT19_23, NULL, HFILL
}
},
- {
- &hf_rep_rsp_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.rep_rsp",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
{ /* 6.3 */
&hf_rep_rsp_channel_selectivity_report,
{
diff --git a/plugins/wimax/msg_res_cmd.c b/plugins/wimax/msg_res_cmd.c
index 2573e86332..7cb8da3a09 100644
--- a/plugins/wimax/msg_res_cmd.c
+++ b/plugins/wimax/msg_res_cmd.c
@@ -44,42 +44,29 @@ static gint proto_mac_mgmt_msg_res_cmd_decoder = -1;
static gint ett_mac_mgmt_msg_res_cmd_decoder = -1;
/* fix fields */
-static gint hf_res_cmd_message_type = -1;
static gint hf_res_cmd_unknown_type = -1;
static gint hf_res_cmd_invalid_tlv = -1;
/* Wimax Mac RES-CMD Message Dissector */
-void dissect_mac_mgmt_msg_res_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_res_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type;
+ guint tvb_len;
gint tlv_type, tlv_len, tlv_value_offset;
- proto_item *res_cmd_item = NULL;
- proto_tree *res_cmd_tree = NULL;
+ proto_item *res_cmd_item;
+ proto_tree *res_cmd_tree;
proto_tree *tlv_tree = NULL;
tlv_info_t tlv_info;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, offset);
- if(payload_type != MAC_MGMT_MSG_RES_CMD)
- {
- return;
- }
-
- if(tree)
{ /* we are being asked for details */
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type RES-CMD */
- res_cmd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_res_cmd_decoder, tvb, offset, tvb_len, "Reset Command (RES-CMD) (%u bytes)", tvb_len);
+ res_cmd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_res_cmd_decoder, tvb, offset, -1, "Reset Command (RES-CMD)");
/* add MAC RES-CMD subtree */
res_cmd_tree = proto_item_add_subtree(res_cmd_item, ett_mac_mgmt_msg_res_cmd_decoder);
/* Decode and display the Reset Command (RES-CMD) */
- /* display the Message Type */
- proto_tree_add_item(res_cmd_tree, hf_res_cmd_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* set the offset for the TLV Encoded info */
- offset++;
/* process the RES-CMD TLVs */
while(offset < tvb_len)
{
@@ -133,10 +120,6 @@ void proto_register_mac_mgmt_msg_res_cmd(void)
static hf_register_info hf_res_cmd[] =
{
{
- &hf_res_cmd_message_type,
- {"MAC Management Message Type", "wmx.macmgtmsgtype.res_cmd", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
- },
- {
&hf_res_cmd_invalid_tlv,
{"Invalid TLV", "wmx.res_cmd.invalid_tlv", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL}
},
diff --git a/plugins/wimax/msg_rng_req.c b/plugins/wimax/msg_rng_req.c
index b460c752cb..6f93bc5fc8 100644
--- a/plugins/wimax/msg_rng_req.c
+++ b/plugins/wimax/msg_rng_req.c
@@ -39,13 +39,10 @@
extern gboolean include_cor2_changes;
-extern gint man_ofdma;
-
static gint proto_mac_mgmt_msg_rng_req_decoder = -1;
static gint ett_mac_mgmt_msg_rng_req_decoder = -1;
/* RNG-REQ fields */
-static gint hf_rng_req_message_type = -1;
static gint hf_rng_req_reserved = -1;
static gint hf_rng_req_dl_burst_profile_diuc = -1;
static gint hf_rng_req_dl_burst_profile_lsb_ccc = -1;
@@ -216,38 +213,29 @@ void dissect_power_saving_class(proto_tree *rng_req_tree, gint tlv_type, tvbuff_
/* Decode RNG-REQ messages. */
-void dissect_mac_mgmt_msg_rng_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_rng_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
guint tlv_offset;
- guint tvb_len, payload_type;
- proto_item *rng_req_item = NULL;
- proto_tree *rng_req_tree = NULL;
+ guint tvb_len;
+ proto_item *rng_req_item;
+ proto_tree *rng_req_tree;
proto_tree *tlv_tree = NULL;
tlv_info_t tlv_info;
gint tlv_type;
gint tlv_len;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, offset);
- if(payload_type != MAC_MGMT_MSG_RNG_REQ)
- {
- return;
- }
-
- if (tree)
{ /* we are being asked for details */
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type RNG-REQ */
- 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 (4)");
+ 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");
/* add MAC RNG-REQ subtree */
rng_req_tree = proto_item_add_subtree(rng_req_item, ett_mac_mgmt_msg_rng_req_decoder);
/* display the Message Type */
- proto_tree_add_item(rng_req_tree, hf_rng_req_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(rng_req_tree, hf_rng_req_reserved, tvb, 1, 1, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(rng_req_tree, hf_rng_req_reserved, tvb, 0, 1, ENC_BIG_ENDIAN);
+ offset += 1;
while(offset < tvb_len)
{
@@ -338,7 +326,7 @@ void dissect_mac_mgmt_msg_rng_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
}
break;
case MAC_VERSION_ENCODING:
- offset += wimax_common_tlv_encoding_decoder(tvb_new_subset(tvb, offset, (tvb_len - offset), (tvb_len - offset)), pinfo, rng_req_tree);
+ offset += wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, rng_req_tree);
continue;
break;
case RNG_REQ_POWER_SAVING_CLASS_PARAMETERS:
@@ -461,13 +449,6 @@ void proto_register_mac_mgmt_msg_rng_req(void)
}
},
{
- &hf_rng_req_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.rng_req",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
&hf_rng_req_aas_broadcast,
{
"AAS broadcast capability", "wmx.rng_req.aas_broadcast",
diff --git a/plugins/wimax/msg_rng_rsp.c b/plugins/wimax/msg_rng_rsp.c
index 6aa9892e6f..f8278b1254 100644
--- a/plugins/wimax/msg_rng_rsp.c
+++ b/plugins/wimax/msg_rng_rsp.c
@@ -41,15 +41,15 @@ extern gboolean include_cor2_changes;
/* external reference */
extern void dissect_power_saving_class(proto_tree *rng_req_tree, gint tlv_type, tvbuff_t *tvb, guint compound_tlv_len, packet_info *pinfo, guint offset);
-extern void dissect_mac_mgmt_msg_sbc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
-extern void dissect_mac_mgmt_msg_reg_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+
+static dissector_handle_t sbc_rsp_handle = NULL;
+static dissector_handle_t reg_rsp_handle = NULL;
static gint proto_mac_mgmt_msg_rng_rsp_decoder = -1;
static gint ett_mac_mgmt_msg_rng_rsp_decoder = -1;
static gint ett_rng_rsp_message_tree = -1;
/* RNG-RSP fields */
-static gint hf_rng_rsp_message_type = -1;
static gint hf_rng_req_reserved = -1;
/* static gint hf_rng_rsp_ul_channel_id = -1; */
static gint hf_rng_rsp_timing_adjust = -1;
@@ -266,7 +266,7 @@ static const value_string vals_rng_rsp_location_update_response[] = {
/* Decode RNG-RSP messages. */
-void dissect_mac_mgmt_msg_rng_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_rng_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_item *ranging_status_item = NULL;
proto_item *dl_freq_override_item = NULL;
@@ -276,10 +276,10 @@ void dissect_mac_mgmt_msg_rng_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
guint offset = 0;
guint tlv_offset;
- guint tvb_len, payload_type;
- proto_item *rng_rsp_item = NULL;
+ guint tvb_len;
+ proto_item *rng_rsp_item;
proto_item *tlv_item = NULL;
- proto_tree *rng_rsp_tree = NULL;
+ proto_tree *rng_rsp_tree;
proto_tree *sub_tree = NULL;
proto_tree *tlv_tree = NULL;
tlv_info_t tlv_info;
@@ -294,26 +294,17 @@ void dissect_mac_mgmt_msg_rng_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
float power_level_adjust;
gint offset_freq_adjust;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, offset);
- if(payload_type != MAC_MGMT_MSG_RNG_RSP)
- {
- return;
- }
-
- if (tree)
{ /* we are being asked for details */
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type RNG-RSP */
- rng_rsp_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_rng_rsp_decoder, tvb, offset, tvb_len, "MAC Management Message, RNG-RSP (5)");
+ rng_rsp_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_rng_rsp_decoder, tvb, offset, tvb_len, "MAC Management Message, RNG-RSP");
/* add MAC RNG-RSP subtree */
rng_rsp_tree = proto_item_add_subtree(rng_rsp_item, ett_mac_mgmt_msg_rng_rsp_decoder);
- /* display the Message Type */
- proto_tree_add_item(rng_rsp_tree, hf_rng_rsp_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(rng_rsp_tree, hf_rng_req_reserved, tvb, 1, 1, ENC_BIG_ENDIAN);
- offset += 2;
+
+ proto_tree_add_item(rng_rsp_tree, hf_rng_req_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
while(offset < tvb_len)
{
@@ -435,11 +426,11 @@ void dissect_mac_mgmt_msg_rng_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
break;
case RNG_RSP_SBC_RSP_ENCODINGS:
sub_tree = add_protocol_subtree(&tlv_info, ett_rng_rsp_message_tree, rng_rsp_tree, proto_mac_mgmt_msg_rng_rsp_decoder, tvb, tlv_offset, tlv_len, "SBC-RSP Encodings (%u byte(s))", tlv_len);
- dissect_mac_mgmt_msg_sbc_rsp_decoder(tvb_new_subset(tvb, tlv_offset, tlv_len, tlv_len), pinfo, sub_tree);
+ call_dissector(sbc_rsp_handle, tvb_new_subset(tvb, tlv_offset, tlv_len, tlv_len), pinfo, sub_tree);
break;
case RNG_RSP_REG_RSP_ENCODINGS:
sub_tree = add_protocol_subtree(&tlv_info, ett_rng_rsp_message_tree, rng_rsp_tree, proto_mac_mgmt_msg_rng_rsp_decoder, tvb, tlv_offset, tlv_len, "REG-RSP Encodings (%u byte(s))", tlv_len);
- dissect_mac_mgmt_msg_reg_rsp_decoder(tvb_new_subset(tvb, tlv_offset, tlv_len, tlv_len), pinfo, sub_tree);
+ call_dissector(reg_rsp_handle, tvb_new_subset(tvb, tlv_offset, tlv_len, tlv_len), pinfo, sub_tree);
break;
/* Implemented message encoding 33 (Table 367 in IEEE 802.16e-2007) */
case RNG_RSP_DL_OP_BURST_PROFILE_OFDMA:
@@ -569,13 +560,6 @@ void proto_register_mac_mgmt_msg_rng_rsp(void)
static hf_register_info hf[] =
{
{
- &hf_rng_rsp_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.rng_rsp",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
&hf_rng_rsp_broadcast,
{
"AAS broadcast permission", "wmx.rng_rsp.aas_broadcast",
@@ -991,5 +975,8 @@ void proto_reg_handoff_mac_mgmt_msg_rng_rsp(void)
rng_rsp_handle = create_dissector_handle(dissect_mac_mgmt_msg_rng_rsp_decoder, proto_mac_mgmt_msg_rng_rsp_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_RNG_RSP, rng_rsp_handle);
+
+ sbc_rsp_handle = find_dissector("mac_mgmt_msg_sbc_rsp_handler");
+ reg_rsp_handle = find_dissector("mac_mgmt_msg_reg_rsp_handler");
}
diff --git a/plugins/wimax/msg_sbc.c b/plugins/wimax/msg_sbc.c
index 6bd4269d20..a64eeca795 100644
--- a/plugins/wimax/msg_sbc.c
+++ b/plugins/wimax/msg_sbc.c
@@ -50,8 +50,6 @@ static gint ett_sbc_req_tlv_subtree = -1;
static gint ett_sbc_rsp_tlv_subtree = -1;
/* fix fields */
-static gint hf_sbc_req_message_type = -1;
-static gint hf_sbc_rsp_message_type = -1;
static gint hf_sbc_unknown_type = -1;
static gint hf_sbc_bw_alloc_support = -1;
@@ -534,14 +532,14 @@ static const value_string vals_sbc_sdma_str[ ] =
/* Wimax Mac SBC-REQ Message Dissector */
-void dissect_mac_mgmt_msg_sbc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_sbc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type, value;
+ guint tvb_len, value;
gint tlv_type, tlv_len, tlv_value_offset;
/*guint num_dl_harq_chans;*/
- proto_item *sbc_item = NULL;
- proto_tree *sbc_tree = NULL;
+ proto_item *sbc_item;
+ proto_tree *sbc_tree;
proto_item *tlv_item = NULL;
proto_tree *tlv_tree = NULL;
proto_item *ti = NULL;
@@ -552,26 +550,14 @@ void dissect_mac_mgmt_msg_sbc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
gfloat power_qam64;
gfloat current_power;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, offset);
- if (payload_type != MAC_MGMT_MSG_SBC_REQ)
- {
- return;
- }
-
- if (tree)
{ /* we are being asked for details */
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type SBC-REQ */
- sbc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_sbc_decoder, tvb, offset, tvb_len, "SS Basic Capability Request (SBC-REQ) (%u bytes)", tvb_len);
+ sbc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_sbc_decoder, tvb, offset, -1, "SS Basic Capability Request (SBC-REQ)");
/* add MAC SBC subtree */
sbc_tree = proto_item_add_subtree(sbc_item, ett_mac_mgmt_msg_sbc_decoder);
/* Decode and display the SS Basic Capability Request (SBC-REQ) */
- /* display the Message Type */
- proto_tree_add_item(sbc_tree, hf_sbc_req_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* set the offset for the TLV Encoded info */
- offset++;
/* process the SBC TLVs */
while(offset < tvb_len)
{
@@ -1088,15 +1074,15 @@ void dissect_mac_mgmt_msg_sbc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
}
/* Wimax Mac SBC-RSP Message Dissector */
-void dissect_mac_mgmt_msg_sbc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_sbc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type, value;
+ guint tvb_len, value;
gint tlv_type, tlv_len, tlv_value_offset;
/* guint ssttg, ssrtg;*/
/*guint num_dl_harq_chans, num_ul_harq_chans;*/
- proto_item *sbc_item = NULL;
- proto_tree *sbc_tree = NULL;
+ proto_item *sbc_item;
+ proto_tree *sbc_tree;
proto_item *tlv_item = NULL;
proto_tree *tlv_tree = NULL;
proto_item *ti = NULL;
@@ -1107,26 +1093,14 @@ void dissect_mac_mgmt_msg_sbc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
gfloat power_qam64;
gfloat current_power;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, offset);
- if (payload_type != MAC_MGMT_MSG_SBC_RSP)
- {
- return;
- }
-
- if (tree)
{ /* we are being asked for details */
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type SBC-RSP */
- sbc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_sbc_decoder, tvb, offset, tvb_len, "SS Basic Capability Response (SBC-RSP) (%u bytes)", tvb_len);
+ sbc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_sbc_decoder, tvb, offset, -1, "SS Basic Capability Response (SBC-RSP)");
/* add MAC SBC subtree */
sbc_tree = proto_item_add_subtree(sbc_item, ett_mac_mgmt_msg_sbc_decoder);
/* Decode and display the SS Basic Capability Response (SBC-RSP) */
- /* display the Message Type */
- proto_tree_add_item(sbc_tree, hf_sbc_rsp_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* set the offset for the TLV Encoded info */
- offset++;
/* process the SBC TLVs */
while(offset < tvb_len)
{
@@ -3215,19 +3189,6 @@ void proto_register_mac_mgmt_msg_sbc(void)
}
},
{
- &hf_sbc_req_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.sbc_req",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- { &hf_sbc_rsp_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.sbc_rsp",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
- {
&hf_sbc_unknown_type,
{
"Unknown SBC type", "wmx.sbc.unknown_tlv_type",
@@ -3252,6 +3213,8 @@ void proto_register_mac_mgmt_msg_sbc(void)
proto_register_field_array(proto_mac_mgmt_msg_sbc_decoder, hf_sbc, array_length(hf_sbc));
proto_register_subtree_array(ett_sbc, array_length(ett_sbc));
+
+ register_dissector("mac_mgmt_msg_sbc_rsp_handler", dissect_mac_mgmt_msg_sbc_rsp_decoder, -1);
}
void
diff --git a/plugins/wimax/msg_ucd.c b/plugins/wimax/msg_ucd.c
index b847ebda77..7fe1b7c71f 100644
--- a/plugins/wimax/msg_ucd.c
+++ b/plugins/wimax/msg_ucd.c
@@ -47,7 +47,6 @@ static gint proto_mac_mgmt_msg_ucd_decoder = -1;
static gint ett_mac_mgmt_msg_ucd_decoder = -1;
/* fix fields */
-static gint hf_ucd_message_type = -1;
static gint hf_ucd_res_timeout = -1;
static gint hf_ucd_bw_req_size = -1;
static gint hf_ucd_ranging_req_size = -1;
@@ -203,21 +202,13 @@ static const value_string vals_yes_no_str[] =
/* UCD dissector */
-void dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint tvb_len, payload_type, length;
+ guint tvb_len, length;
gint tlv_type, tlv_len, tlv_offset, tlv_value_offset;
tlv_info_t tlv_info;
- /* Ensure the right payload type */
- payload_type = tvb_get_guint8(tvb, offset);
- if(payload_type != MAC_MGMT_MSG_UCD)
- {
- return;
- }
-
- if(tree)
{ /* we are being asked for details */
proto_item *ucd_item;
proto_tree *ucd_tree;
@@ -230,14 +221,10 @@ void dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type UCD */
- ucd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_ucd_decoder, tvb, offset, tvb_len, "Uplink Channel Descriptor (UCD) (%u bytes)", tvb_len);
+ ucd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_ucd_decoder, tvb, offset, -1, "Uplink Channel Descriptor (UCD)");
/* add MAC UCD subtree */
ucd_tree = proto_item_add_subtree(ucd_item, ett_mac_mgmt_msg_ucd_decoder);
/* Decode and display the Uplink Channel Descriptor (UCD) */
- /* display the Message Type */
- proto_tree_add_item(ucd_tree, hf_ucd_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* move to next field */
- offset++;
/* get the Configuration Change Count */
ucd_config_change_count = tvb_get_guint8(tvb, offset);
/* display the Configuration Change Count */
@@ -750,13 +737,6 @@ void proto_register_mac_mgmt_msg_ucd(void)
static hf_register_info hf[] =
{
{
- &hf_ucd_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.ucd",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- }
- },
- {
&hf_ucd_tlv_t_188_allow_aas_beam_select_message,
{
"Allow AAS Beam Select Message", "wmx.ucd.allow_aas_beam_select_message",
diff --git a/plugins/wimax/msg_ulmap.c b/plugins/wimax/msg_ulmap.c
index 248b30d6c3..098bb9700c 100644
--- a/plugins/wimax/msg_ulmap.c
+++ b/plugins/wimax/msg_ulmap.c
@@ -36,7 +36,6 @@
#include "wimax_mac.h"
#include "wimax_bits.h"
-extern gint proto_mac_mgmt_msg_dlmap_decoder;
extern gboolean include_cor2_changes;
#define MAC_MGMT_MSG_ULMAP 3
@@ -55,8 +54,6 @@ extern gboolean include_cor2_changes;
nib += nibs; \
} while(0)
-extern gint man_ofdma;
-
/* from msg_ucd.c */
extern guint cqich_id_size; /* Set for CQICH_Alloc_IE */
@@ -200,7 +197,6 @@ static const value_string boost_msgs[] =
};
/* ul-map fields */
-static gint hf_ulmap_message_type = -1;
static gint hf_ulmap_reserved = -1;
static gint hf_ulmap_ucd_count = -1;
static gint hf_ulmap_alloc_start_time = -1;
@@ -266,7 +262,7 @@ void init_wimax_globals(void)
* these functions take offset/length in bits
*******************************************************************/
-gint Dedicated_UL_Control_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint Dedicated_UL_Control_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* 8.4.5.4.24.1 Dedicated_UL_Control_IE -- table 302r */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
@@ -290,7 +286,7 @@ gint Dedicated_UL_Control_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint o
return (bit - offset); /* length in bits */
}
-gint Dedicated_MIMO_UL_Control_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint Dedicated_MIMO_UL_Control_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* 8.4.5.4.24.2 Dedicated_MIMO_UL_Control_IE -- table 302s */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
@@ -312,7 +308,7 @@ gint Dedicated_MIMO_UL_Control_IE(proto_tree *uiuc_tree, const guint8 *bufptr, g
/* begin Sub-Burst IEs */
-gint UL_HARQ_Chase_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint UL_HARQ_Chase_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* 8.4.5.4.24 UL_HARQ_Chase_sub_burst_IE -- table 302k */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
@@ -361,7 +357,7 @@ gint UL_HARQ_Chase_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gin
return (bit - offset); /* length in bits */
}
-gint UL_HARQ_IR_CTC_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint UL_HARQ_IR_CTC_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* 8.4.5.4.24 UL_HARQ_IR_CTC_sub_burst_IE -- table 302l */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
@@ -410,7 +406,7 @@ gint UL_HARQ_IR_CTC_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gi
return (bit - offset); /* length in bits */
}
-gint UL_HARQ_IR_CC_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint UL_HARQ_IR_CC_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* 8.4.5.4.24 UL_HARQ_IR_CC_sub_burst_IE -- table 302m */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
@@ -460,7 +456,7 @@ gint UL_HARQ_IR_CC_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gin
return (bit - offset); /* length in bits */
}
-gint MIMO_UL_Chase_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint MIMO_UL_Chase_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* 8.4.5.4.24 MIMO_UL_Chase_HARQ_Sub_Burst_IE -- table 302n */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
@@ -520,7 +516,7 @@ gint MIMO_UL_Chase_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr
return (bit - offset); /* length in bits */
}
-gint MIMO_UL_IR_HARQ__Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint MIMO_UL_IR_HARQ__Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* 8.4.5.4.24 MIMO_UL_IR_HARQ__Sub_Burst_IE -- table 302o */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
@@ -580,7 +576,7 @@ gint MIMO_UL_IR_HARQ__Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr,
return (bit - offset); /* length in bits */
}
-gint MIMO_UL_IR_HARQ_for_CC_Sub_Burst_UIE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint MIMO_UL_IR_HARQ_for_CC_Sub_Burst_UIE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* 8.4.5.4.24 MIMO_UL_IR_HARQ_for_CC_Sub_Burst_UIE -- table 302p */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
@@ -641,7 +637,7 @@ gint MIMO_UL_IR_HARQ_for_CC_Sub_Burst_UIE(proto_tree *uiuc_tree, const guint8 *b
return (bit - offset); /* length in bits */
}
-gint MIMO_UL_STC_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint MIMO_UL_STC_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* 8.4.5.4.24 MIMO_UL_STC_HARQ_Sub_Burst_IE -- table 302q */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
@@ -699,7 +695,7 @@ gint MIMO_UL_STC_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufptr,
* table 290a
*******************************************************************/
-gint Power_Control_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint Power_Control_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 0 */
/* 8.4.5.4.5 Power_Control_IE */
@@ -722,7 +718,7 @@ gint Power_Control_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset,
return nib;
}
-gint Mini_Subchannel_allocation_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint Mini_Subchannel_allocation_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 1 */
/* 8.4.5.4.8 [2] Mini-Subchannel_allocation_IE */
@@ -763,7 +759,7 @@ gint Mini_Subchannel_allocation_IE(proto_tree *uiuc_tree, const guint8 *bufptr,
return BIT_TO_NIB(bit);
}
-gint AAS_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint AAS_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 2 */
/* 8.4.5.4.6 [2] AAS_UL_IE*/
@@ -791,7 +787,7 @@ gint AAS_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint le
return BIT_TO_NIB(bit);
}
-gint CQICH_Alloc_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint CQICH_Alloc_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 3 */
/* 8.4.5.4.12 [2] CQICH_Alloc_IE */
@@ -863,7 +859,7 @@ gint CQICH_Alloc_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gi
return BIT_TO_NIB(bit); /* Return position in nibbles. */
}
-gint UL_Zone_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint UL_Zone_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 4 */
/* 8.4.5.4.7 [2] UL_Zone_IE */
@@ -891,7 +887,7 @@ gint UL_Zone_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint l
return BIT_TO_NIB(bit);
}
-gint PHYMOD_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint PHYMOD_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 5 */
/* 8.4.5.4.14 [2] PHYMOD_UL_IE */
@@ -921,7 +917,7 @@ gint PHYMOD_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint
return BIT_TO_NIB(bit);
}
-gint MIMO_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint MIMO_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 6 */
/* 8.4.5.4.11 MIMO_UL_Basic_IE (not implemented) */
@@ -942,7 +938,7 @@ gint MIMO_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint l
return nib;
}
-gint ULMAP_Fast_Tracking_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint ULMAP_Fast_Tracking_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 7 */
/* 8.4.5.4.22 [2] ULMAP_Fast_Tracking_IE */
@@ -972,7 +968,7 @@ gint ULMAP_Fast_Tracking_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint of
return BIT_TO_NIB(bit);
}
-gint UL_PUSC_Burst_Allocation_in_other_segment_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint UL_PUSC_Burst_Allocation_in_other_segment_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 8 */
/* 8.4.5.4.17 [2] UL_PUSC_Burst_Allocation_in_other_segment_IE */
@@ -1001,7 +997,7 @@ gint UL_PUSC_Burst_Allocation_in_other_segment_IE(proto_tree *uiuc_tree, const g
return BIT_TO_NIB(bit);
}
-gint Fast_Ranging_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint Fast_Ranging_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 9 */
/* 8.4.5.4.21 [2] Fast_Ranging_IE */
@@ -1036,7 +1032,7 @@ gint Fast_Ranging_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, g
return BIT_TO_NIB(bit);
}
-gint UL_Allocation_Start_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint UL_Allocation_Start_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 0xA */
/* 8.4.5.4.15 [2] UL_Allocation_Start_IE */
@@ -1066,7 +1062,7 @@ gint UL_Allocation_Start_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint of
* table 290c
*******************************************************************/
-gint CQICH_Enhanced_Allocation_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint CQICH_Enhanced_Allocation_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 0 */
/* 8.4.5.4.16 [2] CQICH_Enhanced_Allocation_IE */
@@ -1119,7 +1115,7 @@ gint CQICH_Enhanced_Allocation_IE(proto_tree *uiuc_tree, const guint8 *bufptr, g
return BIT_TO_NIB(bit);
}
-gint HO_Anchor_Active_UL_MAP_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint HO_Anchor_Active_UL_MAP_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 1 */
/* 8.4.5.4.18 [2] HO_Anchor_Active_UL_MAP_IE (not implemented) */
@@ -1140,7 +1136,7 @@ gint HO_Anchor_Active_UL_MAP_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gin
return nib;
}
-gint HO_Active_Anchor_UL_MAP_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint HO_Active_Anchor_UL_MAP_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 2 */
/* 8.4.5.4.19 [2] HO_Active_Anchor_UL_MAP_IE (not implemented) */
@@ -1161,7 +1157,7 @@ gint HO_Active_Anchor_UL_MAP_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gin
return nib;
}
-gint Anchor_BS_switch_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint Anchor_BS_switch_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 3 */
/* 8.4.5.4.23 [2] Anchor_BS_switch_IE */
@@ -1221,7 +1217,7 @@ gint Anchor_BS_switch_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offse
return BIT_TO_NIB(bit);
}
-gint UL_sounding_command_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint UL_sounding_command_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 4 */
/* 8.4.5.4.26 [2] UL_sounding_command_IE */
@@ -1328,7 +1324,7 @@ gint UL_sounding_command_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint of
return BIT_TO_NIB(bit);
}
-gint MIMO_UL_Enhanced_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint MIMO_UL_Enhanced_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 6 */
/* 8.4.5.4.20 [2] MIMO_UL_Enhanced_IE (not implemented) */
@@ -1349,7 +1345,7 @@ gint MIMO_UL_Enhanced_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offse
return nib;
}
-gint HARQ_ULMAP_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint HARQ_ULMAP_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 7 */
/* 8.4.5.4.24 HARQ_ULMAP_IE */
@@ -1412,7 +1408,7 @@ gint HARQ_ULMAP_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gin
return BIT_TO_NIB(bit);
}
-gint HARQ_ACKCH_Region_Allocation_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint HARQ_ACKCH_Region_Allocation_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 8 */
/* 8.4.5.4.25 [2] HARQ_ACKCH_Region_Allocation_IE */
@@ -1437,7 +1433,7 @@ gint HARQ_ACKCH_Region_Allocation_IE(proto_tree *uiuc_tree, const guint8 *bufptr
return BIT_TO_NIB(bit);
}
-gint AAS_SDMA_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint AAS_SDMA_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 0xE */
/* 8.4.5.4.27 [2] AAS_SDMA_UL_IE */
@@ -1521,7 +1517,7 @@ gint AAS_SDMA_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gi
return BIT_TO_NIB(bit);
}
-gint Feedback_Polling_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+static gint Feedback_Polling_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 0xF */
/* 8.4.5.4.28 [2] Feedback_Polling_IE */
@@ -1573,33 +1569,6 @@ gint Feedback_Polling_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offse
* UL-MAP Miscellany
*******************************************************************/
-
-void lshift_bits(guint8 *buffer, gint bytes, gint bits)
-{
- /* left shift a buffer by specified number of bits */
- /* used for ULMAP ExtIE CQICH alloc IE */
- gint i;
- gint xbits;
-
- while (bits >= 8) {
- for (i=1; i<bytes; i++)
- buffer[i-1] = buffer[i];
- bits -= 8;
- bytes--;
- }
- if (bits > 0)
- {
- xbits = 8 - bits;
- for (i = 0; i < (bytes-1); i++) {
- buffer[i] <<= bits;
- buffer[i] |= (buffer[i+1] >> xbits);
- }
- buffer[bytes-1] <<= bits;
- }
-}
-
-
-
gint dissect_ulmap_ie( proto_tree *ie_tree, const guint8 *bufptr, gint offset, gint length _U_, tvbuff_t *tvb)
{
/* decode a single UL-MAP IE and return the
@@ -1895,7 +1864,7 @@ gint dissect_ulmap_ie( proto_tree *ie_tree, const guint8 *bufptr, gint offset, g
return (nibble - offset);
}
-void dissect_mac_mgmt_msg_ulmap_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static void dissect_mac_mgmt_msg_ulmap_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
/* 6.3.2.3.4 [2] UL-MAP table 18 */
guint offset = 0;
@@ -1912,13 +1881,9 @@ void dissect_mac_mgmt_msg_ulmap_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, p
bufptr = tvb_get_ptr(tvb, offset, tvb_len);
/* display MAC UL-MAP */
- ti = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_ulmap_decoder, tvb, offset, tvb_len, "UL-MAP (%u bytes)", tvb_len);
+ ti = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_ulmap_decoder, tvb, offset, -1, "UL-MAP");
ulmap_tree = proto_item_add_subtree(ti, ett_ulmap);
- /* Decode and display the UL-MAP */
- proto_tree_add_item(ulmap_tree, hf_ulmap_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
proto_tree_add_item(ulmap_tree, hf_ulmap_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
proto_tree_add_item(ulmap_tree, hf_ulmap_ucd_count, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -2069,13 +2034,6 @@ void proto_register_mac_mgmt_msg_ulmap(void)
/* UL-MAP fields display */
static hf_register_info hf[] =
{
- {
- &hf_ulmap_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.ulmap",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
- }
- },
#if 0
{
&hf_ulmap_fch_expected,
diff --git a/plugins/wimax/packet-wmx.c b/plugins/wimax/packet-wmx.c
index b044a5a3a2..4e881f05f1 100644
--- a/plugins/wimax/packet-wmx.c
+++ b/plugins/wimax/packet-wmx.c
@@ -51,8 +51,6 @@ gint mac_sdu_length = 49; /* default SDU size is 49 bytes (11.13.16) */
extern guint global_cid_max_basic;
extern gboolean include_cor2_changes;
-gint man_ofdma = 1;
-
address bs_address = {AT_NONE, -1, 0, NULL};
/* The following variables are local to the function, but serve as
diff --git a/plugins/wimax/wimax_harq_map_decoder.c b/plugins/wimax/wimax_harq_map_decoder.c
index b601b76bef..b31bb86c48 100644
--- a/plugins/wimax/wimax_harq_map_decoder.c
+++ b/plugins/wimax/wimax_harq_map_decoder.c
@@ -40,9 +40,6 @@ extern guint wimax_compact_ulmap_ie_decoder(proto_tree *tree, packet_info *pinfo
extern gint proto_wimax;
-/* forward reference */
-void dissector_wimax_harq_map_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
-
static gint proto_wimax_harq_map_decoder = -1;
static gint ett_wimax_harq_map_decoder = -1;
@@ -68,7 +65,7 @@ static gint hf_harq_map_msg_crc = -1;
/* HARQ MAP message decoder */
-void dissector_wimax_harq_map_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissector_wimax_harq_map_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint i, offset = 0;
guint tvb_len, length, dl_ie_count;
@@ -215,4 +212,6 @@ void proto_register_wimax_harq_map(void)
proto_register_subtree_array(ett, array_length(ett));
proto_register_field_array(proto_wimax_harq_map_decoder, hf_harq_map, array_length(hf_harq_map));
+
+ register_dissector("wimax_harq_map_handler", dissector_wimax_harq_map_decoder, -1);
}
diff --git a/plugins/wimax/wimax_pdu_decoder.c b/plugins/wimax/wimax_pdu_decoder.c
index 1ac76c7b2a..81612a9762 100644
--- a/plugins/wimax/wimax_pdu_decoder.c
+++ b/plugins/wimax/wimax_pdu_decoder.c
@@ -36,11 +36,12 @@
extern gint proto_wimax;
+static dissector_handle_t mac_generic_decoder_handle = NULL;
+static dissector_handle_t mac_header_type1_handle = NULL;
+static dissector_handle_t mac_header_type2_handle = NULL;
+static dissector_handle_t wimax_harq_map_handle = NULL;
+
/* MAC Header dissector prototypes */
-extern void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
-extern void dissect_mac_header_type_1_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
-extern void dissect_mac_header_type_2_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
-extern void dissector_wimax_harq_map_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
extern gboolean is_down_link(packet_info *pinfo);
extern gint wimax_decode_dlmap_reduced_aas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tree);
extern gint wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdu_tree);
@@ -117,7 +118,7 @@ static void dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t
{
length = 3; /* At least 3 bytes. This prevents endless loop */
}
- dissector_wimax_harq_map_decoder(tvb_new_subset(tvb,offset,length,length), pinfo, tree);
+ call_dissector(wimax_harq_map_handle, tvb_new_subset(tvb,offset,length,length), pinfo, tree);
offset += length;
continue;
}
@@ -201,17 +202,17 @@ static void dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t
if(mac_ec)
{ /* MAC Signaling Header Type II Header */
proto_item_append_text(pdu_item, " - Mac Type II Header: ");
- dissect_mac_header_type_2_decoder(tvb_new_subset(tvb,offset,length,length), pinfo, pdu_tree);
+ call_dissector(mac_header_type2_handle, tvb_new_subset_length(tvb,offset,length), pinfo, pdu_tree);
}
else
{ /* MAC Signaling Header Type I Header */
proto_item_append_text(pdu_item, " - Mac Type I Header: ");
- dissect_mac_header_type_1_decoder(tvb_new_subset(tvb,offset,length,length), pinfo, pdu_tree);
+ call_dissector(mac_header_type1_handle, tvb_new_subset_length(tvb,offset,length), pinfo, pdu_tree);
}
}
else /* Generic MAC Header with payload */
{
- dissect_mac_header_generic_decoder(tvb_new_subset(tvb,offset,length,length), pinfo, pdu_tree);
+ call_dissector(mac_generic_decoder_handle, tvb_new_subset_length(tvb,offset,length), pinfo, pdu_tree);
}
offset += length;
}
@@ -245,3 +246,12 @@ void proto_register_wimax_pdu(void)
proto_register_field_array(proto_wimax_pdu_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_wimax_pdu(void)
+{
+ mac_generic_decoder_handle = find_dissector("mac_header_generic_handler");
+ mac_header_type1_handle = find_dissector("mac_header_type_1_handler");
+ mac_header_type2_handle = find_dissector("mac_header_type_2_handler");
+ wimax_harq_map_handle = find_dissector("wimax_harq_map_handler");
+}