diff options
author | Michael Mann <mmann78@netscape.net> | 2013-09-22 00:50:24 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-09-22 00:50:24 +0000 |
commit | 6ceb84b10bbfbb9743be074016b7de8cbab9bbcb (patch) | |
tree | 4ba4dfcbe710c7dff825412ea566250976aab314 | |
parent | 39d3b8c16a0317d94f05b9e4c9eef541ee0515ee (diff) |
Make dissectors register for their MAC Management Message Type and use dissector_try_uint to do any dissection. Many "outside" (third-party) message types appear to exist.
Have the makefiles do all the work setting up proto_register_<dissector> and proto_reg_handoff_<dissector>, rather than sprinkled throughout the dissectors with extern declarations.
More is coming to make more functions static (because of current makefile fixes) and cleanup MAC Management dissectors to remove unnecessary/duplicative code, but I wanted to get the build issues squared away.
svn path=/trunk/; revision=52167
31 files changed, 603 insertions, 902 deletions
diff --git a/plugins/wimax/Makefile.common b/plugins/wimax/Makefile.common index dae7d681b7..d070ff6561 100644 --- a/plugins/wimax/Makefile.common +++ b/plugins/wimax/Makefile.common @@ -28,49 +28,49 @@ PLUGIN_NAME = wimax # Non-generated sources to be scanned for registration routines NONGENERATED_REGISTER_C_FILES = \ - packet-wmx.c - -# Non-generated sources -NONGENERATED_C_FILES = \ - $(NONGENERATED_REGISTER_C_FILES) \ - wimax_ffb_decoder.c \ - wimax_fch_decoder.c \ - wimax_pdu_decoder.c \ + packet-wmx.c \ wimax_cdma_code_decoder.c \ + wimax_compact_dlmap_ie_decoder.c \ + wimax_compact_ulmap_ie_decoder.c \ + wimax_fch_decoder.c \ + wimax_ffb_decoder.c \ wimax_hack_decoder.c \ + wimax_harq_map_decoder.c \ + wimax_pdu_decoder.c \ wimax_phy_attributes_decoder.c \ mac_hd_generic_decoder.c \ mac_hd_type1_decoder.c \ mac_hd_type2_decoder.c \ mac_mgmt_msg_decoder.c \ + msg_aas_fbck.c \ + msg_aas_beam.c \ + msg_arq.c \ + msg_clk_cmp.c \ msg_dcd.c \ - msg_ucd.c \ msg_dlmap.c \ - msg_ulmap.c \ - msg_rng_req.c \ - msg_rng_rsp.c \ - msg_reg_req.c \ - msg_reg_rsp.c \ msg_dreg.c \ msg_dsa.c \ msg_dsc.c \ msg_dsd.c \ - msg_arq.c \ - msg_sbc.c \ - msg_pkm.c \ - msg_aas_fbck.c \ + msg_dsx_rvd.c \ msg_fpc.c \ + msg_pkm.c \ msg_pmc.c \ msg_prc_lt_ctrl.c \ - msg_aas_beam.c \ - msg_res_cmd.c \ + msg_reg_req.c \ + msg_reg_rsp.c \ msg_rep.c \ - msg_clk_cmp.c \ - msg_dsx_rvd.c \ - wimax_harq_map_decoder.c \ - wimax_compact_dlmap_ie_decoder.c \ - wimax_compact_ulmap_ie_decoder.c \ - wimax_utils.c \ + msg_res_cmd.c \ + msg_rng_req.c \ + msg_rng_rsp.c \ + msg_sbc.c \ + msg_ucd.c \ + msg_ulmap.c \ + wimax_utils.c + +# Non-generated sources +NONGENERATED_C_FILES = \ + $(NONGENERATED_REGISTER_C_FILES) \ crc.c \ crc_data.c \ wimax_tlv.c diff --git a/plugins/wimax/mac_hd_generic_decoder.c b/plugins/wimax/mac_hd_generic_decoder.c index 3abcaa7a00..5e23f10869 100644 --- a/plugins/wimax/mac_hd_generic_decoder.c +++ b/plugins/wimax/mac_hd_generic_decoder.c @@ -59,10 +59,9 @@ extern gint mac_sdu_length; /* declared in packet-wmx.c */ extern address bs_address; /* declared in packet-wmx.c */ extern guint max_logical_bands; /* declared in wimax_compact_dlmap_ie_decoder.c */ extern gboolean is_down_link(packet_info *pinfo);/* declared in packet-wmx.c */ -extern void proto_register_mac_mgmt_msg(void); /* defined in macmgmtmsgdecoder.c */ extern void init_wimax_globals(void); /* defined in msg_ulmap.c */ -extern void dissect_mac_mgmt_msg_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); +static dissector_handle_t mac_mgmt_msg_decoder_handle; /* global variables */ gboolean include_cor2_changes = FALSE; @@ -1159,7 +1158,7 @@ void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto else if ((mac_cid <= (2 * global_cid_max_basic)) || (mac_cid == cid_aas_ranging) || (mac_cid >= cid_normal_multicast)) { /* MAC management message */ - dissect_mac_mgmt_msg_decoder(tvb_new_subset(payload_tvb, payload_offset, new_payload_len, new_payload_len), pinfo, tree); + call_dissector(mac_mgmt_msg_decoder_handle, tvb_new_subset(payload_tvb, payload_offset, new_payload_len, new_payload_len), pinfo, tree); } else /* data transport PDU */ { /* update the info column */ @@ -2252,8 +2251,13 @@ void proto_register_mac_header_generic(void) /* register the generic mac header dissector */ register_dissector("mac_header_generic_handler", dissect_mac_header_generic_decoder, proto_mac_header_generic_decoder); - /* register the mac payload dissector */ - proto_register_mac_mgmt_msg(); + /* Register the payload fragment table init routine */ register_init_routine(wimax_defragment_init); } + +void +proto_reg_handoff_mac_header_generic(void) +{ + mac_mgmt_msg_decoder_handle = find_dissector("wmx_mac_mgmt_msg_decoder"); +} diff --git a/plugins/wimax/mac_mgmt_msg_decoder.c b/plugins/wimax/mac_mgmt_msg_decoder.c index 75d7f63f5f..8585858db8 100644 --- a/plugins/wimax/mac_mgmt_msg_decoder.c +++ b/plugins/wimax/mac_mgmt_msg_decoder.c @@ -34,152 +34,86 @@ #include <epan/packet.h> #include "wimax_mac.h" -extern gint proto_wimax; - -extern void proto_register_wimax_utility_decoders(void); - -extern void proto_register_mac_mgmt_msg_dcd(void); -extern void proto_register_mac_mgmt_msg_ucd(void); -extern void proto_register_mac_mgmt_msg_dlmap(void); -extern void proto_register_mac_mgmt_msg_ulmap(void); -extern void proto_register_mac_mgmt_msg_rng_req(void); -extern void proto_register_mac_mgmt_msg_rng_rsp(void); -extern void proto_register_mac_mgmt_msg_reg_req(void); -extern void proto_register_mac_mgmt_msg_reg_rsp(void); -extern void proto_register_mac_mgmt_msg_dsa(void); -extern void proto_register_mac_mgmt_msg_dsc(void); -extern void proto_register_mac_mgmt_msg_dsd(void); -extern void proto_register_mac_mgmt_msg_arq_feedback(void); -extern void proto_register_mac_mgmt_msg_arq_discard(void); -extern void proto_register_mac_mgmt_msg_arq_reset(void); -extern void proto_register_mac_mgmt_msg_dreg_req(void); -extern void proto_register_mac_mgmt_msg_dreg_cmd(void); -extern void proto_register_mac_mgmt_msg_fpc(void); -extern void proto_register_mac_mgmt_msg_sbc(void); -extern void proto_register_mac_mgmt_msg_pkm(void); -extern void proto_register_mac_mgmt_msg_pmc_req(void); -extern void proto_register_mac_mgmt_msg_pmc_rsp(void); -extern void proto_register_mac_mgmt_msg_prc_lt_ctrl(void); -extern void proto_register_mac_mgmt_msg_aas_fbck(void); -extern void proto_register_mac_mgmt_msg_aas_beam(void); -extern void proto_register_mac_mgmt_msg_res_cmd(void); -extern void proto_register_mac_mgmt_msg_rep(void); -extern void proto_register_mac_mgmt_msg_clk_cmp(void); -extern void proto_register_mac_mgmt_msg_dsx_rvd(void); - -extern void dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_dlmap_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_ulmap_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_rng_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_rng_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_reg_req_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); -extern void dissect_mac_mgmt_msg_pkm_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_pkm_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_dsa_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_dsa_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_dsa_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_dsc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_dsc_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_dsd_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_dsd_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_fpc_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_sbc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_sbc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_dreg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_dreg_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_arq_discard_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_arq_reset_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_pmc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_pmc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_prc_lt_ctrl_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_aas_fbck_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_aas_fbck_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_aas_beam_select_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_res_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_rep_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_rep_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_clk_cmp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -extern void dissect_mac_mgmt_msg_dsx_rvd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); - static gint proto_mac_mgmt_msg_decoder = -1; static gint ett_mac_mgmt_msg_decoder = -1; +static dissector_table_t subdissector_message_table; + /* WIMAX MAC Management message type info */ -static const char *mgt_msg_abbrv[MAC_MGMT_MSG_TYPE_MAX] = -{ - "UCD", /* 0 */ - "DCD", - "DL-MAP", - "UL-MAP", - "RNG-REQ", - "RNG-RSP", - "REG-REQ", - "REG-RSP", - "Reserved8", - "PKM-REQ", - "PKM-RSP", /* 10 */ - "DSA-REQ", - "DSA-RSP", - "DSA-ACK", - "DSC-REQ", - "DSC-RSP", - "DSC-ACK", - "DSD-REQ", - "DSD-RSP", - "Reserved19", - "Reserved20", /* 20 */ - "MCA-REQ", - "MCA-RSP", - "DBPC-REQ", - "DBPC-RSP", - "RES-CMD", - "SBC-REQ", - "SBC-RSP", - "CLK-CMP", - "DREG-CMD", - "DSX-RVD", /* 30 */ - "TFTP-CPLT", - "TFTP-RSP", - "ARQ-FEEDBACK", - "ARQ-DISCARD", - "ARQ-RESET", - "REP-REQ", - "REP-RSP", - "FPC", - "MSH-NCFG", - "MSH-NENT", /* 40 */ - "MSH-DSCH", - "MSH-CSCH", - "MSH-CSCF", - "AAS-FBCK_REQ", - "AAS-FBCK_RSP", - "AAS-BEAM_SELECT", - "AAS-BEAM_REQ", - "AAS-BEAM_RSP", - "DREG-REQ", - "MOB-SLP-REQ", /* 50 */ - "MOB-SLP-RSP", - "MOB-TRF-IND", - "MOB-NBR-ADV", - "MOB-SCN-REQ", - "MOB-SCN-RSP", - "MOB-BSHO-REQ", - "MOB-MSHO-REQ", - "MOB-BSHO-RSP", - "MOB-HO-IND", - "MOB-SCN-REP", /* 60 */ - "MOB-PAG-ADV", - "MBS-MAP", - "PMC-REQ", - "PMC-RSP", - "PRC-LT-CTRL", - "MOB-ASC-REP" +static const value_string mgt_msg_abbrv_vals[] = { + { MAC_MGMT_MSG_UCD, "UCD" }, + { MAC_MGMT_MSG_DCD, "DCD" }, + { MAC_MGMT_MSG_DL_MAP, "DL-MAP" }, + { MAC_MGMT_MSG_UL_MAP, "UL-MAP" }, + { MAC_MGMT_MSG_RNG_REQ, "RNG-REQ" }, + { MAC_MGMT_MSG_RNG_RSP, "RNG-RSP" }, + { MAC_MGMT_MSG_REG_REQ, "REG-REQ" }, + { MAC_MGMT_MSG_REG_RSP, "REG-RSP" }, + { 8, "Reserved8" }, + { MAC_MGMT_MSG_PKM_REQ, "PKM-REQ" }, + { MAC_MGMT_MSG_PKM_RSP, "PKM-RSP" }, + { MAC_MGMT_MSG_DSA_REQ, "DSA-REQ" }, + { MAC_MGMT_MSG_DSA_RSP, "DSA-RSP" }, + { MAC_MGMT_MSG_DSA_ACK, "DSA-ACK" }, + { MAC_MGMT_MSG_DSC_REQ, "DSC-REQ" }, + { MAC_MGMT_MSG_DSC_RSP, "DSC-RSP" }, + { MAC_MGMT_MSG_DSC_ACK, "DSC-ACK" }, + { MAC_MGMT_MSG_DSD_REQ, "DSD-REQ" }, + { MAC_MGMT_MSG_DSD_RSP, "DSD-RSP" }, + { 19, "Reserved19" }, + { 20, "Reserved20" }, + { MAC_MGMT_MSG_MCA_REQ, "MCA-REQ" }, + { MAC_MGMT_MSG_MCA_RSP, "MCA-RSP" }, + { MAC_MGMT_MSG_DBPC_REQ, "DBPC-REQ" }, + { MAC_MGMT_MSG_DBPC_RSP, "DBPC-RSP" }, + { MAC_MGMT_MSG_RES_CMD, "RES-CMD" }, + { MAC_MGMT_MSG_SBC_REQ, "SBC-REQ" }, + { MAC_MGMT_MSG_SBC_RSP, "SBC-RSP" }, + { MAC_MGMT_MSG_CLK_CMP, "CLK-CMP" }, + { MAC_MGMT_MSG_DREG_CMD, "DREG-CMD" }, + { MAC_MGMT_MSG_DSX_RVD, "DSX-RVD" }, + { MAC_MGMT_MSG_TFTP_CPLT, "TFTP-CPLT" }, + { MAC_MGMT_MSG_TFTP_RSP, "TFTP-RSP" }, + { MAC_MGMT_MSG_ARQ_FEEDBACK, "ARQ-FEEDBACK" }, + { MAC_MGMT_MSG_ARQ_DISCARD, "ARQ-DISCARD" }, + { MAC_MGMT_MSG_ARQ_RESET, "ARQ-RESET" }, + { MAC_MGMT_MSG_REP_REQ, "REP-REQ" }, + { MAC_MGMT_MSG_REP_RSP, "REP-RSP" }, + { MAC_MGMT_MSG_FPC, "FPC" }, + { MAC_MGMT_MSG_MSH_NCFG, "MSH-NCFG" }, + { MAC_MGMT_MSG_MSH_NENT, "MSH-NENT" }, + { MAC_MGMT_MSG_MSH_DSCH, "MSH-DSCH" }, + { MAC_MGMT_MSG_MSH_CSCH, "MSH-CSCH" }, + { MAC_MGMT_MSG_MSH_CSCF, "MSH-CSCF" }, + { MAC_MGMT_MSG_AAS_FBCK_REQ, "AAS-FBCK_REQ" }, + { MAC_MGMT_MSG_AAS_FBCK_RSP, "AAS-FBCK_RSP" }, + { MAC_MGMT_MSG_AAS_BEAM_SELECT, "AAS-BEAM_SELECT" }, + { MAC_MGMT_MSG_AAS_BEAM_REQ, "AAS-BEAM_REQ" }, + { MAC_MGMT_MSG_AAS_BEAM_RSP, "AAS-BEAM_RSP" }, + { MAC_MGMT_MSG_DREG_REQ, "DREG-REQ" }, + { MAC_MGMT_MSG_MOB_SLP_REQ, "MOB-SLP-REQ" }, + { MAC_MGMT_MSG_MOB_SLP_RSP, "MOB-SLP-RSP" }, + { MAC_MGMT_MSG_MOB_TRF_IND, "MOB-TRF-IND" }, + { MAC_MGMT_MSG_MOB_NBR_ADV, "MOB-NBR-ADV" }, + { MAC_MGMT_MSG_MOB_SCN_REQ, "MOB-SCN-REQ" }, + { MAC_MGMT_MSG_MOB_SCN_RSP, "MOB-SCN-RSP" }, + { MAC_MGMT_MSG_MOB_BSHO_REQ, "MOB-BSHO-REQ" }, + { MAC_MGMT_MSG_MOB_MSHO_REQ, "MOB-MSHO-REQ" }, + { MAC_MGMT_MSG_MOB_BSHO_RSP, "MOB-BSHO-RSP" }, + { MAC_MGMT_MSG_MOB_HO_IND, "MOB-HO-IND" }, + { MAC_MGMT_MSG_MOB_SCN_REP, "MOB-SCN-REP" }, + { MAC_MGMT_MSG_MOB_PAG_ADV, "MOB-PAG-ADV" }, + { MAC_MGMT_MSG_MBS_MAP, "MBS-MAP" }, + { MAC_MGMT_MSG_PMC_REQ, "PMC-REQ" }, + { MAC_MGMT_MSG_PMC_RSP, "PMC-RSP" }, + { MAC_MGMT_MSG_PRC_LT_CTRL, "PRC-LT-CTRL" }, + { MAC_MGMT_MSG_MOB_ASC_REP, "MOB-ASC-REP" }, + + { 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; @@ -188,10 +122,10 @@ void dissect_mac_mgmt_msg_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree { guint offset = 0; guint tvb_len, message_type; - dissector_handle_t mgt_msg_handle; proto_item *parent_item = NULL; proto_item *message_item = NULL; proto_tree *message_tree = NULL; + const char* mgt_msg_str; { /* we are being asked for details */ /* Get the tvb reported length */ @@ -204,15 +138,14 @@ void dissect_mac_mgmt_msg_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree } /* 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(message_type < MAC_MGMT_MSG_TYPE_MAX) - { - /* Display message type in Info column */ - col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", mgt_msg_abbrv[message_type]); - } - else + if (try_val_to_str_ext(message_type, &mgt_msg_abbrv_vals_ext) == NULL) { - col_append_str(pinfo->cinfo, COL_INFO, "Unknown message type,"); /* 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 */ @@ -221,569 +154,23 @@ void dissect_mac_mgmt_msg_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree 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_abbrv[message_type]); + proto_item_append_text(parent_item, ", %s", mgt_msg_str); + /* Decode and display the MAC payload */ - switch (message_type) + if (!dissector_try_uint(subdissector_message_table, message_type, tvb, pinfo, tree)) { - case MAC_MGMT_MSG_UCD: - /* UCD message handler */ - dissect_mac_mgmt_msg_ucd_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_DCD: - /* DCD message handler */ - dissect_mac_mgmt_msg_dcd_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_DL_MAP: - /* DL-MAP message handler */ - dissect_mac_mgmt_msg_dlmap_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_UL_MAP: - /* UL-MAP message handler */ - dissect_mac_mgmt_msg_ulmap_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_RNG_REQ: - /* Ranging request message handler */ - dissect_mac_mgmt_msg_rng_req_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_RNG_RSP: - /* Ranging response message handler */ - dissect_mac_mgmt_msg_rng_rsp_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_REG_REQ: - /* Registration request message handler */ - dissect_mac_mgmt_msg_reg_req_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_REG_RSP: - /* Registration response message handler */ - dissect_mac_mgmt_msg_reg_rsp_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_PKM_REQ: - /* Privacy Key Management request message handler */ - dissect_mac_mgmt_msg_pkm_req_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_PKM_RSP: - /* Privacy Key Management response message handler */ - dissect_mac_mgmt_msg_pkm_rsp_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_DSA_REQ: - /* Dynamic Service Addition request message handler */ - dissect_mac_mgmt_msg_dsa_req_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_DSA_RSP: - /* Dynamic Service Addition response message handler */ - dissect_mac_mgmt_msg_dsa_rsp_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_DSA_ACK: - /* Dynamic Service Addition acknowledge message handler */ - dissect_mac_mgmt_msg_dsa_ack_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_DSC_REQ: - /* Dynamic Service Change request message handler */ - dissect_mac_mgmt_msg_dsc_req_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_DSC_RSP: - /* Dynamic Service Change response message handler */ - dissect_mac_mgmt_msg_dsc_rsp_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_DSC_ACK: - /* Dynamic Service Change acknowledge message handler */ - dissect_mac_mgmt_msg_dsc_ack_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_DSD_REQ: - /* Dynamic Service Deletion request message handler */ - dissect_mac_mgmt_msg_dsd_req_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_DSD_RSP: - /* Dynamic Service Deletion response message handler */ - dissect_mac_mgmt_msg_dsd_rsp_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_MCA_REQ: - /* find the Multicast Assignment request message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_mca_req_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_MCA_RSP: - /* find the Multicast Assignment response message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_mca_rsp_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_DBPC_REQ: - /* find the DL Burst Profile Change request message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_dbpc_req_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_DBPC_RSP: - /* find the DL Burst Profile Change response message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_dbpc_rsp_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_RES_CMD: - /* Reset Command message handler */ - dissect_mac_mgmt_msg_res_cmd_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_SBC_REQ: - /* SS Basic Capability request message handler */ - dissect_mac_mgmt_msg_sbc_req_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_SBC_RSP: - /* SS Basic Capability response message handler */ - dissect_mac_mgmt_msg_sbc_rsp_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_CLK_CMP: - /* SS Network Clock Comparison message handler */ - dissect_mac_mgmt_msg_clk_cmp_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_DREG_CMD: - /* De/Re-register Command message handler */ - dissect_mac_mgmt_msg_dreg_cmd_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_DSX_RVD: - /* DSx Recieved message handler */ - dissect_mac_mgmt_msg_dsx_rvd_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_TFTP_CPLT: - /* find the Config File TFTP Complete message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_tftp_cplt_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_TFTP_RSP: - /* find the Config File TFTP Complete response message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_tftp_rsp_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_ARQ_FEEDBACK: - /* Standalone ARQ feedback message handler */ - dissect_mac_mgmt_msg_arq_feedback_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_ARQ_DISCARD: - dissect_mac_mgmt_msg_arq_discard_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_ARQ_RESET: - /* ARQ Reset message handler */ - dissect_mac_mgmt_msg_arq_reset_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_REP_REQ: - /* Channel measurement Report request message handler */ - dissect_mac_mgmt_msg_rep_req_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_REP_RSP: - /* Channel measurement Report response message handler */ - dissect_mac_mgmt_msg_rep_rsp_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_FPC: - /* Fast Power Control message handler */ - dissect_mac_mgmt_msg_fpc_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_MSH_NCFG: - /* find the Mesh Network Configuration message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_ncfg_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_MSH_NENT: - /* find the Mesh Network Entry message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_nent_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_MSH_DSCH: - /* find the Mesh Distributed Schedule message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_dsch_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_MSH_CSCH: - /* find the Mesh Centralized Schedule message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_csch_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_MSH_CSCF: - /* find the Mesh Centralized Schedule Configuration message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_cscf_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_AAS_FBCK_REQ: - /* AAS feedback request message handler */ - dissect_mac_mgmt_msg_aas_fbck_req_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_AAS_FBCK_RSP: - /* AAS feedback response message handler */ - dissect_mac_mgmt_msg_aas_fbck_rsp_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_AAS_BEAM_SELECT: - /* AAS Beam Select message handler */ - dissect_mac_mgmt_msg_aas_beam_select_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_AAS_BEAM_REQ: - /* find the AAS Beam request message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_aas_beam_req_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_AAS_BEAM_RSP: - /* find the AAS Beam response message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_aas_beam_rsp_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_DREG_REQ: - /* SS De-registation message handler */ - dissect_mac_mgmt_msg_dreg_req_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_MOB_SLP_REQ: - /* find the Sleep Request message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_slp_req_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_MOB_SLP_RSP: - /* find the Sleep Response message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_slp_rsp_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_MOB_TRF_IND: - /* find the Traffic Indication message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_trf_ind_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_MOB_NBR_ADV: - /* find the Neighbor Advertisement message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_nbr_adv_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_MOB_SCN_REQ: - /* find the Scanning Interval Allocation Reqest message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_scn_req_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_MOB_SCN_RSP: - /* find the Scanning Interval Allocation Response message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_scn_rsp_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_MOB_BSHO_REQ: - /* find the BS HO Request message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_bsho_req_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_MOB_MSHO_REQ: - /* find the MS HO Request message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_msho_req_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_MOB_BSHO_RSP: - /* find the BS HO Response message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_bsho_rsp_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_MOB_HO_IND: - /* find the HO Indication message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_ho_ind_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_MOB_SCN_REP: - /* find the Scanning Result Report message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_scn_rep_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_MOB_PAG_ADV: - /* find the BS Broadcast Paging message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_pag_adv_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_MBS_MAP: - /* find the MBS MAP message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_mbs_map_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - case MAC_MGMT_MSG_PMC_REQ: - /* Power Control Mode Change Reuest message handler */ - dissect_mac_mgmt_msg_pmc_req_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_PMC_RSP: - /* Power Control Mode Change Response message handler */ - dissect_mac_mgmt_msg_pmc_rsp_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_PRC_LT_CTRL: - /* Setup/Tear-down of Long-term MIMO Precoding message handler */ - dissect_mac_mgmt_msg_prc_lt_ctrl_decoder(tvb, pinfo, tree); - break; - case MAC_MGMT_MSG_MOB_ASC_REP: - /* find the Association Result Report message handler */ - mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_asc_rep_handler"); - if(mgt_msg_handle) - call_dissector(mgt_msg_handle, tvb, pinfo, tree); - else - { - /* 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_abbrv[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); - } - break; - default: + /* 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); - break; } } } @@ -818,50 +205,163 @@ void proto_register_mac_mgmt_msg(void) &ett_mac_mgmt_msg_decoder, }; - proto_mac_mgmt_msg_decoder = proto_wimax; -#if 0 proto_mac_mgmt_msg_decoder = proto_register_protocol ( "WiMax MAC Management Message", /* name */ "MGMT MSG", /* short name */ - "wmx.mgmtmsg" /* abbrev */ + "wmx.mgmt" /* abbrev */ ); -#endif proto_register_field_array(proto_mac_mgmt_msg_decoder, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); + subdissector_message_table = register_dissector_table("wmx.mgmtmsg", + "WiMax MAC Management Message", FT_UINT8, BASE_DEC); + /* Register dissector by name */ register_dissector("wmx_mac_mgmt_msg_decoder", dissect_mac_mgmt_msg_decoder, proto_mac_mgmt_msg_decoder); - - proto_register_mac_mgmt_msg_dcd(); - proto_register_mac_mgmt_msg_ucd(); - proto_register_mac_mgmt_msg_dlmap(); - proto_register_mac_mgmt_msg_ulmap(); - proto_register_mac_mgmt_msg_rng_req(); - proto_register_mac_mgmt_msg_rng_rsp(); - proto_register_mac_mgmt_msg_reg_req(); - proto_register_mac_mgmt_msg_reg_rsp(); - proto_register_mac_mgmt_msg_dsa(); - proto_register_mac_mgmt_msg_dsc(); - proto_register_mac_mgmt_msg_dsd(); - proto_register_mac_mgmt_msg_arq_feedback(); - proto_register_mac_mgmt_msg_arq_discard(); - proto_register_mac_mgmt_msg_arq_reset(); - proto_register_mac_mgmt_msg_dreg_req(); - proto_register_mac_mgmt_msg_dreg_cmd(); - proto_register_mac_mgmt_msg_fpc(); - proto_register_mac_mgmt_msg_sbc(); - proto_register_mac_mgmt_msg_pkm(); - proto_register_mac_mgmt_msg_pmc_req(); - proto_register_mac_mgmt_msg_pmc_rsp(); - proto_register_mac_mgmt_msg_prc_lt_ctrl(); - proto_register_mac_mgmt_msg_aas_fbck(); - proto_register_mac_mgmt_msg_aas_beam(); - proto_register_mac_mgmt_msg_res_cmd(); - proto_register_mac_mgmt_msg_rep(); - proto_register_mac_mgmt_msg_clk_cmp(); - proto_register_mac_mgmt_msg_dsx_rvd(); - - proto_register_wimax_utility_decoders(); } + +void proto_reg_handoff_mac_mgmt_msg(void) +{ + dissector_handle_t mgt_msg_handle; + + /* Find the dissectors that appear to be supported through a third-party plugin + Keep here until third-party plugin can register through the new "wmx.mgmtmsg" + subdissector */ + + /* find the Multicast Assignment request message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_mca_req_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MCA_REQ, mgt_msg_handle ); + + /* find the Multicast Assignment response message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_mca_rsp_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MCA_RSP, mgt_msg_handle ); + + /* find the DL Burst Profile Change request message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_dbpc_req_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_DBPC_REQ, mgt_msg_handle ); + + /* find the DL Burst Profile Change response message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_dbpc_rsp_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_DBPC_RSP, mgt_msg_handle ); + + /* find the Config File TFTP Complete message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_tftp_cplt_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_TFTP_CPLT, mgt_msg_handle ); + + /* find the Config File TFTP Complete response message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_tftp_rsp_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_TFTP_RSP, mgt_msg_handle ); + + /* find the Mesh Network Configuration message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_ncfg_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MSH_NCFG, mgt_msg_handle ); + + /* find the Mesh Network Entry message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_nent_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MSH_NENT, mgt_msg_handle ); + + /* find the Mesh Distributed Schedule message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_dsch_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MSH_DSCH, mgt_msg_handle ); + + /* find the Mesh Centralized Schedule message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_csch_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MSH_CSCH, mgt_msg_handle ); + + /* find the Mesh Centralized Schedule Configuration message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_cscf_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MSH_CSCF, mgt_msg_handle ); + + /* find the AAS Beam request message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_aas_beam_req_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_AAS_BEAM_REQ, mgt_msg_handle ); + + /* find the AAS Beam response message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_aas_beam_rsp_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_AAS_BEAM_RSP, mgt_msg_handle ); + + /* find the Sleep Request message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_slp_req_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_SLP_REQ, mgt_msg_handle ); + + /* find the Sleep Response message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_slp_rsp_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_SLP_RSP, mgt_msg_handle ); + + /* find the Traffic Indication message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_trf_ind_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_TRF_IND, mgt_msg_handle ); + + /* find the Neighbor Advertisement message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_nbr_adv_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_NBR_ADV, mgt_msg_handle ); + + /* find the Scanning Interval Allocation Reqest message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_scn_req_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_SCN_REQ, mgt_msg_handle ); + + /* find the Scanning Interval Allocation Response message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_scn_rsp_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_SCN_RSP, mgt_msg_handle ); + + /* find the BS HO Request message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_bsho_req_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_BSHO_REQ, mgt_msg_handle ); + + /* find the MS HO Request message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_msho_req_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_MSHO_REQ, mgt_msg_handle ); + + /* find the BS HO Response message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_bsho_rsp_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_BSHO_RSP, mgt_msg_handle ); + + /* find the HO Indication message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_ho_ind_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_HO_IND, mgt_msg_handle ); + + /* find the Scanning Result Report message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_scn_rep_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_SCN_REP, mgt_msg_handle ); + + /* find the BS Broadcast Paging message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_pag_adv_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_PAG_ADV, mgt_msg_handle ); + + /* find the MBS MAP message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_mbs_map_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MBS_MAP, mgt_msg_handle ); + + /* find the Association Result Report message handler */ + mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_asc_rep_handler"); + if (mgt_msg_handle) + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_ASC_REP, mgt_msg_handle ); +}
\ No newline at end of file diff --git a/plugins/wimax/msg_aas_beam.c b/plugins/wimax/msg_aas_beam.c index ba1dbc71e1..595a9c2c0e 100644 --- a/plugins/wimax/msg_aas_beam.c +++ b/plugins/wimax/msg_aas_beam.c @@ -360,3 +360,12 @@ void proto_register_mac_mgmt_msg_aas_beam(void) register_dissector("mac_mgmt_msg_aas_beam_rsp_handler", dissect_mac_mgmt_msg_aas_beam_rsp_decoder, -1); #endif } + +void +proto_reg_handoff_mac_mgmt_msg_aas_beam(void) +{ + dissector_handle_t aas_handle; + + aas_handle = create_dissector_handle(dissect_mac_mgmt_msg_aas_beam_select_decoder, proto_mac_mgmt_msg_aas_beam_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_AAS_BEAM_SELECT, aas_handle); +} diff --git a/plugins/wimax/msg_aas_fbck.c b/plugins/wimax/msg_aas_fbck.c index 827333b992..7ffbed24cb 100644 --- a/plugins/wimax/msg_aas_fbck.c +++ b/plugins/wimax/msg_aas_fbck.c @@ -356,3 +356,15 @@ void proto_register_mac_mgmt_msg_aas_fbck(void) proto_register_field_array(proto_mac_mgmt_msg_aas_fbck_decoder, hf_aas_fbck, array_length(hf_aas_fbck)); proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_mac_mgmt_msg_aas(void) +{ + dissector_handle_t aas_handle; + + aas_handle = create_dissector_handle(dissect_mac_mgmt_msg_aas_fbck_req_decoder, proto_mac_mgmt_msg_aas_fbck_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_AAS_FBCK_REQ, aas_handle); + + aas_handle = create_dissector_handle(dissect_mac_mgmt_msg_aas_fbck_rsp_decoder, proto_mac_mgmt_msg_aas_fbck_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_AAS_FBCK_RSP, aas_handle); +} diff --git a/plugins/wimax/msg_arq.c b/plugins/wimax/msg_arq.c index aa6e839872..45f58537c6 100644 --- a/plugins/wimax/msg_arq.c +++ b/plugins/wimax/msg_arq.c @@ -40,14 +40,7 @@ extern gint man_ofdma; -/* Forward reference */ -void dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -void dissect_mac_mgmt_msg_arq_discard_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -void dissect_mac_mgmt_msg_arq_reset_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); - -static gint proto_mac_mgmt_msg_arq_feedback_decoder = -1; -static gint proto_mac_mgmt_msg_arq_discard_decoder = -1; -static gint proto_mac_mgmt_msg_arq_reset_decoder = -1; +static gint proto_mac_mgmt_msg_arq_decoder = -1; static gint ett_mac_mgmt_msg_arq_decoder = -1; @@ -305,28 +298,16 @@ void proto_register_mac_mgmt_msg_arq_feedback(void) } }; - proto_mac_mgmt_msg_arq_feedback_decoder = proto_register_protocol ( + proto_mac_mgmt_msg_arq_decoder = proto_register_protocol ( "WiMax ARQ Feedback/Discard/Reset Messages", /* name */ "WiMax ARQ Feedback/Discard/Reset (arq)", /* short name */ "wmx.arq" /* abbrev */ ); - proto_register_field_array(proto_mac_mgmt_msg_arq_feedback_decoder, hf, array_length(hf)); + proto_register_field_array(proto_mac_mgmt_msg_arq_decoder, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } -/* Register Wimax Mac Payload Protocol and Dissector */ -void proto_register_mac_mgmt_msg_arq_discard(void) -{ - proto_mac_mgmt_msg_arq_discard_decoder = proto_mac_mgmt_msg_arq_feedback_decoder; -} - -/* Register Wimax Mac Payload Protocol and Dissector */ -void proto_register_mac_mgmt_msg_arq_reset(void) -{ - proto_mac_mgmt_msg_arq_reset_decoder = proto_mac_mgmt_msg_arq_feedback_decoder; -} - /* Decode ARQ-Feedback messages. */ void dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) { @@ -358,7 +339,7 @@ void dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info *pinfo /* 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_feedback_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, tvb_len, "MAC Management Message, ARQ-Feedback (33)"); /* 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 */ @@ -374,7 +355,7 @@ void dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info *pinfo arq_bsn = (tvb_get_ntohs(tvb, offset + 2) & 0x1FFC) >> 2; arq_num_ack_maps = 1 + (tvb_get_guint8(tvb, offset + 3) & 0x03); - arq_fb_item = proto_tree_add_protocol_format(arq_feedback_tree, proto_mac_mgmt_msg_arq_feedback_decoder, tvb, offset, tvb_len, "ARQ_Feedback_IE"); + arq_fb_item = proto_tree_add_protocol_format(arq_feedback_tree, proto_mac_mgmt_msg_arq_decoder, tvb, offset, tvb_len, "ARQ_Feedback_IE"); proto_item_append_text(arq_fb_item, ", CID: %u, %s ARQ feedback IE, %s, BSN: %u", arq_cid, arq_last ? "Last" : "More", val_to_str(arq_ack_type, vals_arq_ack_type, ""), arq_bsn); if (arq_ack_type != ARQ_CUMULATIVE_ACK_ENTRY) { @@ -445,7 +426,7 @@ void dissect_mac_mgmt_msg_arq_discard_decoder(tvbuff_t *tvb, packet_info *pinfo /* 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_discard_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, tvb_len, "MAC Management Message, ARQ-Discard (34)"); /* 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 */ @@ -477,7 +458,7 @@ void dissect_mac_mgmt_msg_arq_reset_decoder(tvbuff_t *tvb, packet_info *pinfo _U /* 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_reset_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, tvb_len, "MAC Management Message, ARQ-Reset (35)"); /* 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 */ @@ -490,3 +471,18 @@ void dissect_mac_mgmt_msg_arq_reset_decoder(tvbuff_t *tvb, packet_info *pinfo _U } } +void +proto_reg_handoff_mac_mgmt_msg_arq(void) +{ + dissector_handle_t arq_handle; + + arq_handle = create_dissector_handle(dissect_mac_mgmt_msg_arq_feedback_decoder, proto_mac_mgmt_msg_arq_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_ARQ_FEEDBACK, arq_handle); + + arq_handle = create_dissector_handle(dissect_mac_mgmt_msg_arq_discard_decoder, proto_mac_mgmt_msg_arq_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_ARQ_DISCARD, arq_handle); + + arq_handle = create_dissector_handle(dissect_mac_mgmt_msg_arq_reset_decoder, proto_mac_mgmt_msg_arq_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_ARQ_RESET, arq_handle); +} + diff --git a/plugins/wimax/msg_clk_cmp.c b/plugins/wimax/msg_clk_cmp.c index d466f0d47a..bddd2e8b3f 100644 --- a/plugins/wimax/msg_clk_cmp.c +++ b/plugins/wimax/msg_clk_cmp.c @@ -160,3 +160,12 @@ void proto_register_mac_mgmt_msg_clk_cmp(void) proto_register_field_array(proto_mac_mgmt_msg_clk_cmp_decoder, hf_clk_cmp, array_length(hf_clk_cmp)); proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_mac_mgmt_msg_clk_cmp(void) +{ + dissector_handle_t handle; + + handle = create_dissector_handle(dissect_mac_mgmt_msg_clk_cmp_decoder, proto_mac_mgmt_msg_clk_cmp_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_CLK_CMP, handle); +} diff --git a/plugins/wimax/msg_dcd.c b/plugins/wimax/msg_dcd.c index 8a3390b2c3..fe878c224a 100644 --- a/plugins/wimax/msg_dcd.c +++ b/plugins/wimax/msg_dcd.c @@ -39,12 +39,10 @@ #include "wimax_tlv.h" #include "wimax_mac.h" -extern gint proto_wimax; - /* Delete the following variable as soon as possible */ extern gboolean include_cor2_changes; -gint proto_mac_mgmt_msg_dcd_decoder = -1; +static gint proto_mac_mgmt_msg_dcd_decoder = -1; static gint ett_mac_mgmt_msg_dcd_decoder = -1; /* fix fields */ @@ -1320,11 +1318,19 @@ void proto_register_mac_mgmt_msg_dcd(void) }; proto_mac_mgmt_msg_dcd_decoder = proto_register_protocol ( - "WiMax DCD/UCD Messages", /* name */ - "WiMax DCD/UCD (cd)", /* short name */ - "wmx.cd" /* abbrev */ + "WiMax DCD Messages", /* name */ + "WiMax DCD", /* short name */ + "wmx.dcd" /* abbrev */ ); proto_register_field_array(proto_mac_mgmt_msg_dcd_decoder, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void proto_reg_handoff_mac_mgmt_msg_dcd(void) +{ + dissector_handle_t dcd_handle; + + dcd_handle = create_dissector_handle(dissect_mac_mgmt_msg_dcd_decoder, proto_mac_mgmt_msg_dcd_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DCD, dcd_handle); +}
\ No newline at end of file diff --git a/plugins/wimax/msg_dlmap.c b/plugins/wimax/msg_dlmap.c index 169cc2f58f..e2166e89b5 100644 --- a/plugins/wimax/msg_dlmap.c +++ b/plugins/wimax/msg_dlmap.c @@ -32,10 +32,10 @@ #include <glib.h> #include <epan/packet.h> +#include "wimax_mac.h" #include "crc.h" #include "wimax_bits.h" -extern gint proto_wimax; extern gboolean include_cor2_changes; #define MAC_MGMT_MSG_DLMAP 2 @@ -75,7 +75,7 @@ gint sub_dl_ul_map = 0; extern gint man_ofdma; -gint proto_mac_mgmt_msg_dlmap_decoder = -1; +static gint proto_mac_mgmt_msg_dlmap_decoder = -1; static gint ett_dlmap = -1; static gint ett_dlmap_ie = -1; @@ -2877,11 +2877,19 @@ void proto_register_mac_mgmt_msg_dlmap(void) }; proto_mac_mgmt_msg_dlmap_decoder = proto_register_protocol ( - "WiMax DLMAP/ULMAP Messages", /* name */ - "WiMax DLMAP/ULMAP (map)", /* short name */ - "wmx.map" /* abbrev */ + "WiMax DLMAP Messages", /* name */ + "WiMax DLMAP", /* short name */ + "wmx.dlmap" /* abbrev */ ); proto_register_field_array(proto_mac_mgmt_msg_dlmap_decoder, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void proto_reg_handoff_mac_mgmt_msg_dlmap(void) +{ + dissector_handle_t dlmap_handle; + + dlmap_handle = create_dissector_handle(dissect_mac_mgmt_msg_dlmap_decoder, proto_mac_mgmt_msg_dlmap_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DL_MAP, dlmap_handle); +} diff --git a/plugins/wimax/msg_dreg.c b/plugins/wimax/msg_dreg.c index be62a67ac6..6f5f6057ba 100644 --- a/plugins/wimax/msg_dreg.c +++ b/plugins/wimax/msg_dreg.c @@ -44,8 +44,6 @@ extern gboolean include_cor2_changes; /* Forward reference */ static void dissect_dreg_tlv(proto_tree *dreg_tree, gint tlv_type, tvbuff_t *tvb, guint tlv_offset, guint tlv_len); -void dissect_mac_mgmt_msg_dreg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -void dissect_mac_mgmt_msg_dreg_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); static gint proto_mac_mgmt_msg_dreg_req_decoder = -1; static gint proto_mac_mgmt_msg_dreg_cmd_decoder = -1; @@ -366,10 +364,9 @@ void proto_register_mac_mgmt_msg_dreg_req(void) }; proto_mac_mgmt_msg_dreg_req_decoder = proto_register_protocol ( - "WiMax DREG-REQ/CMD Messages", - /* name */ - "WiMax DREG-REQ/CMD (dreg)", /* short name */ - "wmx.dreg" /* abbrev */ + "WiMax DREG-REQ Messages", /* name */ + "WiMax DREG-REQ", /* short name */ + "wmx.dreg_req" /* abbrev */ ); proto_register_field_array(proto_mac_mgmt_msg_dreg_req_decoder, hf, array_length(hf)); @@ -379,7 +376,11 @@ void proto_register_mac_mgmt_msg_dreg_req(void) /* Register Wimax Mac Payload Protocol and Dissector */ void proto_register_mac_mgmt_msg_dreg_cmd(void) { - proto_mac_mgmt_msg_dreg_cmd_decoder = proto_mac_mgmt_msg_dreg_req_decoder; + proto_mac_mgmt_msg_dreg_cmd_decoder = proto_register_protocol ( + "WiMax DREG-CMD Messages", /* name */ + "WiMax DREG-CMD", /* short name */ + "wmx.dreg_cmd" /* abbrev */ + ); } /* Decode DREG-REQ messages. */ @@ -550,3 +551,14 @@ void dissect_mac_mgmt_msg_dreg_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, pr } } +void +proto_reg_handoff_mac_mgmt_msg_dreg(void) +{ + dissector_handle_t dreg_handle; + + dreg_handle = create_dissector_handle(dissect_mac_mgmt_msg_dreg_req_decoder, proto_mac_mgmt_msg_dreg_req_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DREG_REQ, dreg_handle); + + dreg_handle = create_dissector_handle(dissect_mac_mgmt_msg_dreg_cmd_decoder, proto_mac_mgmt_msg_dreg_cmd_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DREG_CMD, dreg_handle); +} diff --git a/plugins/wimax/msg_dsa.c b/plugins/wimax/msg_dsa.c index b02013884a..c9fb277d18 100644 --- a/plugins/wimax/msg_dsa.c +++ b/plugins/wimax/msg_dsa.c @@ -40,8 +40,6 @@ #include "wimax_mac.h" #include "wimax_utils.h" -extern gint proto_wimax; - 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; @@ -227,11 +225,26 @@ void proto_register_mac_mgmt_msg_dsa(void) }; proto_mac_mgmt_msg_dsa_decoder = proto_register_protocol ( - "WiMax DSA/C/D Messages", /* name */ - "WiMax DSA/C/D (ds)", /* short name */ - "wmx.ds" /* abbrev */ + "WiMax DSA Messages", /* name */ + "WiMax DSA", /* short name */ + "wmx.dsa" /* abbrev */ ); proto_register_field_array(proto_mac_mgmt_msg_dsa_decoder, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_mac_mgmt_msg_dsa (void) +{ + dissector_handle_t dsa_handle; + + dsa_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsa_req_decoder, proto_mac_mgmt_msg_dsa_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSA_REQ, dsa_handle); + + dsa_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsa_rsp_decoder, proto_mac_mgmt_msg_dsa_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSA_RSP, dsa_handle); + + dsa_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsa_ack_decoder, proto_mac_mgmt_msg_dsa_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSA_ACK, dsa_handle); +} diff --git a/plugins/wimax/msg_dsc.c b/plugins/wimax/msg_dsc.c index 9224dbb89a..8b5029af4b 100644 --- a/plugins/wimax/msg_dsc.c +++ b/plugins/wimax/msg_dsc.c @@ -40,8 +40,6 @@ #include "wimax_mac.h" #include "wimax_utils.h" -extern gint proto_mac_mgmt_msg_dsa_decoder; - static gint proto_mac_mgmt_msg_dsc_decoder = -1; static gint ett_mac_mgmt_msg_dsc_req_decoder = -1; static gint ett_mac_mgmt_msg_dsc_rsp_decoder = -1; @@ -226,8 +224,27 @@ void proto_register_mac_mgmt_msg_dsc(void) &ett_mac_mgmt_msg_dsc_ack_decoder }; - proto_mac_mgmt_msg_dsc_decoder = proto_mac_mgmt_msg_dsa_decoder; + proto_mac_mgmt_msg_dsc_decoder = proto_register_protocol ( + "WiMax DSC Messages", /* name */ + "WiMax DSC", /* short name */ + "wmx.dsc" /* abbrev */ + ); proto_register_field_array(proto_mac_mgmt_msg_dsc_decoder, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_mac_mgmt_msg_dsc(void) +{ + dissector_handle_t dsc_handle; + + dsc_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsc_req_decoder, proto_mac_mgmt_msg_dsc_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSC_REQ, dsc_handle); + + dsc_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsc_rsp_decoder, proto_mac_mgmt_msg_dsc_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSC_RSP, dsc_handle); + + dsc_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsc_ack_decoder, proto_mac_mgmt_msg_dsc_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSC_ACK, dsc_handle); +} diff --git a/plugins/wimax/msg_dsd.c b/plugins/wimax/msg_dsd.c index d19b43af2e..2ffd704380 100644 --- a/plugins/wimax/msg_dsd.c +++ b/plugins/wimax/msg_dsd.c @@ -40,9 +40,7 @@ #include "wimax_mac.h" #include "wimax_utils.h" -extern gint proto_mac_mgmt_msg_dsa_decoder; - -gint proto_mac_mgmt_msg_dsd_decoder = -1; +static gint proto_mac_mgmt_msg_dsd_decoder = -1; static gint ett_mac_mgmt_msg_dsd_req_decoder = -1; static gint ett_mac_mgmt_msg_dsd_rsp_decoder = -1; /* static gint ett_dsd_ul_sfe_decoder = -1; */ @@ -303,8 +301,25 @@ void proto_register_mac_mgmt_msg_dsd(void) /* &ett_dsd_cmac_tuple, */ }; - proto_mac_mgmt_msg_dsd_decoder = proto_mac_mgmt_msg_dsa_decoder; + proto_mac_mgmt_msg_dsd_decoder = proto_register_protocol ( + "WiMax DSD Messages", /* name */ + "WiMax DSD", /* short name */ + "wmx.dsd" /* abbrev */ + ); proto_register_field_array(proto_mac_mgmt_msg_dsd_decoder, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_mac_mgmt_msg_dsd(void) +{ + dissector_handle_t dsd_handle; + + dsd_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsd_req_decoder, proto_mac_mgmt_msg_dsd_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSD_REQ, dsd_handle); + + dsd_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsd_rsp_decoder, proto_mac_mgmt_msg_dsd_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSD_RSP, dsd_handle); +} + diff --git a/plugins/wimax/msg_dsx_rvd.c b/plugins/wimax/msg_dsx_rvd.c index c0723169e6..e1a14a2d5d 100644 --- a/plugins/wimax/msg_dsx_rvd.c +++ b/plugins/wimax/msg_dsx_rvd.c @@ -105,10 +105,19 @@ void proto_register_mac_mgmt_msg_dsx_rvd(void) proto_mac_mgmt_msg_dsx_rvd_decoder = proto_register_protocol ( "WiMax DSX-RVD Message", /* name */ - "WiMax DSX-RVD (dsx)", /* short name */ - "wmx.dsx" /* abbrev */ + "WiMax DSX-RVD (dsx_rvd)", /* short name */ + "wmx.dsx_rvd" /* abbrev */ ); proto_register_field_array(proto_mac_mgmt_msg_dsx_rvd_decoder, hf_dsx_rvd, array_length(hf_dsx_rvd)); proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_mac_mgmt_msg_dsx_rvd(void) +{ + dissector_handle_t handle; + + handle = create_dissector_handle(dissect_mac_mgmt_msg_dsx_rvd_decoder, proto_mac_mgmt_msg_dsx_rvd_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSX_RVD, handle); +} diff --git a/plugins/wimax/msg_fpc.c b/plugins/wimax/msg_fpc.c index f2b827bcaf..362f3e3999 100644 --- a/plugins/wimax/msg_fpc.c +++ b/plugins/wimax/msg_fpc.c @@ -179,3 +179,12 @@ void proto_register_mac_mgmt_msg_fpc(void) proto_register_field_array(proto_mac_mgmt_msg_fpc_decoder, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_mac_mgmt_msg_fpc(void) +{ + dissector_handle_t fpc_handle; + + fpc_handle = create_dissector_handle(dissect_mac_mgmt_msg_fpc_decoder, proto_mac_mgmt_msg_fpc_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_FPC, fpc_handle); +}
\ No newline at end of file diff --git a/plugins/wimax/msg_pkm.c b/plugins/wimax/msg_pkm.c index ce93071790..93398429ff 100644 --- a/plugins/wimax/msg_pkm.c +++ b/plugins/wimax/msg_pkm.c @@ -88,17 +88,10 @@ static gint hf_pkm_msg_pkm_id = -1; void dissect_mac_mgmt_msg_pkm_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { guint offset = 0; - guint tvb_len, payload_type, length; + guint tvb_len, length; proto_item *pkm_item = NULL; proto_tree *pkm_tree = NULL; - /* Ensure the right payload type */ - payload_type = tvb_get_guint8(tvb, offset); - if(payload_type != MAC_MGMT_MSG_PKM_REQ) - { - return; - } - { /* we are being asked for details */ /* Get the tvb reported length */ tvb_len = tvb_reported_length(tvb); @@ -129,17 +122,10 @@ void dissect_mac_mgmt_msg_pkm_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro void dissect_mac_mgmt_msg_pkm_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { guint offset = 0; - guint tvb_len, payload_type, length; + guint tvb_len, length; proto_item *pkm_item = NULL; proto_tree *pkm_tree = NULL; - /* Ensure the right payload type */ - payload_type = tvb_get_guint8(tvb, offset); - if(payload_type != MAC_MGMT_MSG_PKM_RSP) - { - return; - } - { /* we are being asked for details */ /* Get the tvb reported length */ tvb_len = tvb_reported_length(tvb); @@ -206,3 +192,14 @@ void proto_register_mac_mgmt_msg_pkm(void) proto_register_field_array(proto_mac_mgmt_msg_pkm_decoder, hf_pkm, array_length(hf_pkm)); proto_register_subtree_array(ett_pkm, array_length(ett_pkm)); } + +void proto_reg_handoff_mac_mgmt_msg_pkm(void) +{ + dissector_handle_t mac_mgmt_msg_pkm_req_handle; + dissector_handle_t mac_mgmt_msg_pkm_rsp_handle; + + mac_mgmt_msg_pkm_req_handle = create_dissector_handle(dissect_mac_mgmt_msg_pkm_req_decoder, proto_mac_mgmt_msg_pkm_decoder); + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_PKM_REQ, mac_mgmt_msg_pkm_req_handle ); + mac_mgmt_msg_pkm_rsp_handle = create_dissector_handle(dissect_mac_mgmt_msg_pkm_rsp_decoder, proto_mac_mgmt_msg_pkm_decoder); + dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_PKM_RSP, mac_mgmt_msg_pkm_rsp_handle ); +}
\ No newline at end of file diff --git a/plugins/wimax/msg_pmc.c b/plugins/wimax/msg_pmc.c index 2ac8dae291..2579266694 100644 --- a/plugins/wimax/msg_pmc.c +++ b/plugins/wimax/msg_pmc.c @@ -42,10 +42,6 @@ extern gint man_ofdma; extern gboolean include_cor2_changes; -/* Forward reference */ -void dissect_mac_mgmt_msg_pmc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -void dissect_mac_mgmt_msg_pmc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); - static gint proto_mac_mgmt_msg_pmc_req_decoder = -1; static gint proto_mac_mgmt_msg_pmc_rsp_decoder = -1; @@ -171,9 +167,9 @@ void proto_register_mac_mgmt_msg_pmc_req(void) }; proto_mac_mgmt_msg_pmc_req_decoder = proto_register_protocol ( - "WiMax PMC-REQ/RSP Messages", /* name */ - "WiMax PMC-REQ/RSP (pmc)", /* short name */ - "wmx.pmc" /* abbrev */ + "WiMax PMC-REQ Messages", /* name */ + "WiMax PMC-REQ", /* short name */ + "wmx.pmc_req" /* abbrev */ ); proto_register_field_array(proto_mac_mgmt_msg_pmc_req_decoder, hf, array_length(hf)); @@ -183,7 +179,11 @@ void proto_register_mac_mgmt_msg_pmc_req(void) /* Register Wimax Mac Payload Protocol and Dissector */ void proto_register_mac_mgmt_msg_pmc_rsp(void) { - proto_mac_mgmt_msg_pmc_rsp_decoder = proto_mac_mgmt_msg_pmc_req_decoder; + proto_mac_mgmt_msg_pmc_rsp_decoder = proto_register_protocol ( + "WiMax PMC-RSP Messages", /* name */ + "WiMax PMC-RSP", /* short name */ + "wmx.pmc_rsp" /* abbrev */ + ); } /* Decode PMC-REQ messages. */ @@ -278,3 +278,14 @@ void dissect_mac_mgmt_msg_pmc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, } } +void +proto_reg_handoff_mac_mgmt_msg_pmc(void) +{ + dissector_handle_t pmc_handle; + + pmc_handle = create_dissector_handle(dissect_mac_mgmt_msg_pmc_req_decoder, proto_mac_mgmt_msg_pmc_req_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_PMC_REQ, pmc_handle); + + pmc_handle = create_dissector_handle(dissect_mac_mgmt_msg_pmc_rsp_decoder, proto_mac_mgmt_msg_pmc_rsp_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_PMC_RSP, pmc_handle); +} diff --git a/plugins/wimax/msg_prc_lt_ctrl.c b/plugins/wimax/msg_prc_lt_ctrl.c index e663dbddce..3ff6c51b01 100644 --- a/plugins/wimax/msg_prc_lt_ctrl.c +++ b/plugins/wimax/msg_prc_lt_ctrl.c @@ -149,3 +149,12 @@ void proto_register_mac_mgmt_msg_prc_lt_ctrl(void) proto_register_field_array(proto_mac_mgmt_msg_prc_lt_ctrl_decoder, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_mac_mgmt_msg_prc_lt_ctrl(void) +{ + dissector_handle_t handle; + + handle = create_dissector_handle(dissect_mac_mgmt_msg_prc_lt_ctrl_decoder, proto_mac_mgmt_msg_prc_lt_ctrl_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_PRC_LT_CTRL, handle); +} diff --git a/plugins/wimax/msg_reg_req.c b/plugins/wimax/msg_reg_req.c index 5fd5a81f7b..2475bcd79c 100644 --- a/plugins/wimax/msg_reg_req.c +++ b/plugins/wimax/msg_reg_req.c @@ -39,10 +39,9 @@ #include "wimax_mac.h" #include "wimax_utils.h" -extern gint proto_wimax; extern gboolean include_cor2_changes; -gint proto_mac_mgmt_msg_reg_req_decoder = -1; +static gint proto_mac_mgmt_msg_reg_req_decoder = -1; static gint ett_mac_mgmt_msg_reg_req_decoder = -1; /* REG-REQ fields */ @@ -1409,11 +1408,19 @@ void proto_register_mac_mgmt_msg_reg_req(void) proto_mac_mgmt_msg_reg_req_decoder = proto_register_protocol ( - "WiMax REG-REQ/RSP Messages", /* name */ - "WiMax REG-REQ/RSP (reg)", /* short name */ - "wmx.reg" /* abbrev */ + "WiMax REG-REQ Messages", /* name */ + "WiMax REG-REQ", /* short name */ + "wmx.reg_req" /* abbrev */ ); proto_register_field_array(proto_mac_mgmt_msg_reg_req_decoder, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void proto_reg_handoff_mac_mgmt_msg_reg_req(void) +{ + dissector_handle_t reg_req_handle; + + reg_req_handle = create_dissector_handle(dissect_mac_mgmt_msg_reg_req_decoder, proto_mac_mgmt_msg_reg_req_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_REG_REQ, reg_req_handle); +} diff --git a/plugins/wimax/msg_reg_rsp.c b/plugins/wimax/msg_reg_rsp.c index 9b10742d86..184acf8891 100644 --- a/plugins/wimax/msg_reg_rsp.c +++ b/plugins/wimax/msg_reg_rsp.c @@ -40,7 +40,6 @@ #include "wimax_mac.h" #include "wimax_utils.h" -extern gint proto_mac_mgmt_msg_reg_req_decoder; extern gboolean include_cor2_changes; extern gint man_ofdma; @@ -372,8 +371,20 @@ void proto_register_mac_mgmt_msg_reg_rsp(void) &ett_reg_rsp_message_tree }; - proto_mac_mgmt_msg_reg_rsp_decoder = proto_mac_mgmt_msg_reg_req_decoder; + proto_mac_mgmt_msg_reg_rsp_decoder = proto_register_protocol ( + "WiMax REG-RSP Messages", /* name */ + "WiMax REG-RSP", /* short name */ + "wmx.reg_rsp" /* abbrev */ + ); proto_register_field_array(proto_mac_mgmt_msg_reg_rsp_decoder, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void proto_reg_handoff_mac_mgmt_msg_reg_rsp(void) +{ + dissector_handle_t reg_rsp_handle; + + 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 b7b96bb429..e543b4047d 100644 --- a/plugins/wimax/msg_rep.c +++ b/plugins/wimax/msg_rep.c @@ -1576,3 +1576,15 @@ void proto_register_mac_mgmt_msg_rep(void) proto_register_field_array(proto_mac_mgmt_msg_rep_decoder, hf_rep, array_length(hf_rep)); proto_register_subtree_array(ett_rep, array_length(ett_rep)); } + +void +proto_reg_handoff_mac_mgmt_msg_rep(void) +{ + dissector_handle_t rep_handle; + + rep_handle = create_dissector_handle(dissect_mac_mgmt_msg_rep_req_decoder, proto_mac_mgmt_msg_rep_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_REP_REQ, rep_handle); + + rep_handle = create_dissector_handle(dissect_mac_mgmt_msg_rep_rsp_decoder, proto_mac_mgmt_msg_rep_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_REP_RSP, rep_handle); +} diff --git a/plugins/wimax/msg_res_cmd.c b/plugins/wimax/msg_res_cmd.c index 2632bc9bc0..2573e86332 100644 --- a/plugins/wimax/msg_res_cmd.c +++ b/plugins/wimax/msg_res_cmd.c @@ -161,3 +161,12 @@ void proto_register_mac_mgmt_msg_res_cmd(void) proto_register_field_array(proto_mac_mgmt_msg_res_cmd_decoder, hf_res_cmd, array_length(hf_res_cmd)); proto_register_subtree_array(ett_res_cmd, array_length(ett_res_cmd)); } + +void +proto_reg_handoff_mac_mgmt_msg_res_cmd(void) +{ + dissector_handle_t handle; + + handle = create_dissector_handle(dissect_mac_mgmt_msg_res_cmd_decoder, proto_mac_mgmt_msg_res_cmd_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_RES_CMD, handle); +} diff --git a/plugins/wimax/msg_rng_req.c b/plugins/wimax/msg_rng_req.c index 47563a5c36..b460c752cb 100644 --- a/plugins/wimax/msg_rng_req.c +++ b/plugins/wimax/msg_rng_req.c @@ -37,12 +37,11 @@ #include "wimax_mac.h" #include "wimax_utils.h" -extern gint proto_wimax; extern gboolean include_cor2_changes; extern gint man_ofdma; -gint proto_mac_mgmt_msg_rng_req_decoder = -1; +static gint proto_mac_mgmt_msg_rng_req_decoder = -1; static gint ett_mac_mgmt_msg_rng_req_decoder = -1; /* RNG-REQ fields */ @@ -610,11 +609,20 @@ void proto_register_mac_mgmt_msg_rng_req(void) }; proto_mac_mgmt_msg_rng_req_decoder = proto_register_protocol ( - "WiMax RNG-REQ/RSP Messages", /* name */ - "WiMax RNG-REQ/RSP (rng)", /* short name */ - "wmx.rng" /* abbrev */ + "WiMax RNG-REQ Messages", /* name */ + "WiMax RNG-REQ", /* short name */ + "wmx.rng_req" /* abbrev */ ); proto_register_field_array(proto_mac_mgmt_msg_rng_req_decoder, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void proto_reg_handoff_mac_mgmt_msg_rng_req(void) +{ + dissector_handle_t rng_req_handle; + + rng_req_handle = create_dissector_handle(dissect_mac_mgmt_msg_rng_req_decoder, proto_mac_mgmt_msg_rng_req_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_RNG_REQ, rng_req_handle); +} + diff --git a/plugins/wimax/msg_rng_rsp.c b/plugins/wimax/msg_rng_rsp.c index dcf7af3dab..6aa9892e6f 100644 --- a/plugins/wimax/msg_rng_rsp.c +++ b/plugins/wimax/msg_rng_rsp.c @@ -37,7 +37,6 @@ #include "wimax_mac.h" #include "wimax_utils.h" -extern gint proto_mac_mgmt_msg_rng_req_decoder; extern gboolean include_cor2_changes; /* external reference */ @@ -976,8 +975,21 @@ void proto_register_mac_mgmt_msg_rng_rsp(void) &ett_rng_rsp_message_tree }; - proto_mac_mgmt_msg_rng_rsp_decoder = proto_mac_mgmt_msg_rng_req_decoder; + proto_mac_mgmt_msg_rng_rsp_decoder = proto_register_protocol ( + "WiMax RNG-RSP Messages", /* name */ + "WiMax RNG-RSP", /* short name */ + "wmx.rng_rsp" /* abbrev */ + ); proto_register_field_array(proto_mac_mgmt_msg_rng_rsp_decoder, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void proto_reg_handoff_mac_mgmt_msg_rng_rsp(void) +{ + dissector_handle_t rng_rsp_handle; + + 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); +} + diff --git a/plugins/wimax/msg_sbc.c b/plugins/wimax/msg_sbc.c index e11653eb45..6bd4269d20 100644 --- a/plugins/wimax/msg_sbc.c +++ b/plugins/wimax/msg_sbc.c @@ -3253,3 +3253,16 @@ 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)); } + +void +proto_reg_handoff_mac_mgmt_msg_sbc(void) +{ + dissector_handle_t sbc_handle; + + sbc_handle = create_dissector_handle(dissect_mac_mgmt_msg_sbc_req_decoder, proto_mac_mgmt_msg_sbc_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_SBC_REQ, sbc_handle); + + sbc_handle = create_dissector_handle(dissect_mac_mgmt_msg_sbc_rsp_decoder, proto_mac_mgmt_msg_sbc_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_SBC_RSP, sbc_handle); +} + diff --git a/plugins/wimax/msg_ucd.c b/plugins/wimax/msg_ucd.c index cb3915cb89..15e00e9f27 100644 --- a/plugins/wimax/msg_ucd.c +++ b/plugins/wimax/msg_ucd.c @@ -39,7 +39,7 @@ #include "wimax_tlv.h" #include "wimax_mac.h" -extern gint proto_mac_mgmt_msg_dcd_decoder; +static gint proto_mac_mgmt_msg_ucd_decoder; extern gboolean include_cor2_changes; guint cqich_id_size; /* Set for CQICH_Alloc_IE */ @@ -1206,8 +1206,20 @@ void proto_register_mac_mgmt_msg_ucd(void) &ett_mac_mgmt_msg_ucd_decoder, }; - proto_mac_mgmt_msg_ucd_decoder = proto_mac_mgmt_msg_dcd_decoder; + proto_mac_mgmt_msg_ucd_decoder = proto_register_protocol ( + "WiMax UCD Messages", /* name */ + "WiMax UCD", /* short name */ + "wmx.ucd" /* abbrev */ + ); proto_register_field_array(proto_mac_mgmt_msg_ucd_decoder, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void proto_reg_handoff_mac_mgmt_msg_ucd(void) +{ + dissector_handle_t ucd_handle; + + ucd_handle = create_dissector_handle(dissect_mac_mgmt_msg_ucd_decoder, proto_mac_mgmt_msg_ucd_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_UCD, ucd_handle); +}
\ No newline at end of file diff --git a/plugins/wimax/msg_ulmap.c b/plugins/wimax/msg_ulmap.c index 26e8189fba..248b30d6c3 100644 --- a/plugins/wimax/msg_ulmap.c +++ b/plugins/wimax/msg_ulmap.c @@ -33,6 +33,7 @@ #include <glib.h> #include <epan/packet.h> #include "crc.h" +#include "wimax_mac.h" #include "wimax_bits.h" extern gint proto_mac_mgmt_msg_dlmap_decoder; @@ -2430,8 +2431,20 @@ void proto_register_mac_mgmt_msg_ulmap(void) &ett_315d, }; - proto_mac_mgmt_msg_ulmap_decoder = proto_mac_mgmt_msg_dlmap_decoder; + proto_mac_mgmt_msg_ulmap_decoder = proto_register_protocol ( + "WiMax ULMAP Messages", /* name */ + "WiMax ULMAP", /* short name */ + "wmx.ulmap" /* abbrev */ + ); proto_register_field_array(proto_mac_mgmt_msg_ulmap_decoder, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void proto_reg_handoff_mac_mgmt_msg_ulmap(void) +{ + dissector_handle_t ulmap_handle; + + ulmap_handle = create_dissector_handle(dissect_mac_mgmt_msg_ulmap_decoder, proto_mac_mgmt_msg_ulmap_decoder); + dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_UL_MAP, ulmap_handle); +}
\ No newline at end of file diff --git a/plugins/wimax/packet-wmx.c b/plugins/wimax/packet-wmx.c index 15a3ae6d49..b044a5a3a2 100644 --- a/plugins/wimax/packet-wmx.c +++ b/plugins/wimax/packet-wmx.c @@ -39,17 +39,6 @@ #include "wimax_tlv.h" #include "wimax_bits.h" -/* WiMax dissector function prototypes */ -extern void proto_register_wimax_cdma(void); -extern void proto_register_wimax_fch(void); -extern void proto_register_wimax_pdu(void); -extern void proto_register_wimax_ffb(void); -extern void proto_register_wimax_hack(void); -extern void proto_register_wimax_harq_map(void); -extern void proto_register_wimax_phy_attributes(void); -extern void proto_register_wimax_compact_dlmap_ie(void); -extern void proto_register_wimax_compact_ulmap_ie(void); - /* Global functions */ /* void proto_reg_handoff_wimax(void); */ gboolean is_down_link(packet_info *pinfo); @@ -849,17 +838,6 @@ void proto_register_wimax(void) /* Register the WiMax dissector */ register_dissector("wmx", dissect_wimax, proto_wimax); - /* Register other WiMax dissectors */ - proto_register_wimax_cdma(); - proto_register_wimax_fch(); - proto_register_wimax_pdu(); - proto_register_wimax_ffb(); - proto_register_wimax_hack(); - proto_register_wimax_harq_map(); - proto_register_wimax_phy_attributes(); - proto_register_wimax_compact_dlmap_ie(); - proto_register_wimax_compact_ulmap_ie(); - #if 0 /* XXX: see comment at proto_reg_handoff_wimax() */ wimax_module = prefs_register_protocol(proto_wimax, proto_reg_handoff_wimax); #endif diff --git a/plugins/wimax/wimax_pdu_decoder.c b/plugins/wimax/wimax_pdu_decoder.c index 2d5cfa6d28..1ac76c7b2a 100644 --- a/plugins/wimax/wimax_pdu_decoder.c +++ b/plugins/wimax/wimax_pdu_decoder.c @@ -36,11 +36,6 @@ extern gint proto_wimax; -extern void proto_register_mac_header_generic(void); -extern void proto_register_mac_header_type_1(void); -extern void proto_register_mac_header_type_2(void); - - /* 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); @@ -249,8 +244,4 @@ void proto_register_wimax_pdu(void) register_dissector("wimax_pdu_burst_handler", dissect_wimax_pdu_decoder, -1); proto_register_field_array(proto_wimax_pdu_decoder, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); - - proto_register_mac_header_generic(); - proto_register_mac_header_type_1(); - proto_register_mac_header_type_2(); } diff --git a/plugins/wimax/wimax_utils.c b/plugins/wimax/wimax_utils.c index 14270f91b8..2f489b5175 100644 --- a/plugins/wimax/wimax_utils.c +++ b/plugins/wimax/wimax_utils.c @@ -1680,7 +1680,7 @@ void proto_register_wimax_utility_decoders(void) ); proto_register_subtree_array(ett, array_length(ett)); - proto_register_field_array(proto_mac_mgmt_msg_reg_req_decoder, hf_sfe, array_length(hf_sfe)); + proto_register_field_array(proto_wimax_utility_decoders, hf_sfe, array_length(hf_sfe)); proto_register_field_array(proto_wimax_utility_decoders, hf_csper, array_length(hf_csper)); proto_register_field_array(proto_wimax_utility_decoders, hf_xmac, array_length(hf_xmac)); proto_register_field_array(proto_wimax_utility_decoders, hf_snp, array_length(hf_snp)); diff --git a/plugins/wimax/wimax_utils.h b/plugins/wimax/wimax_utils.h index 69f03e36ad..c1fd17aaca 100644 --- a/plugins/wimax/wimax_utils.h +++ b/plugins/wimax/wimax_utils.h @@ -32,7 +32,6 @@ #include <epan/packet.h> extern guint get_service_type(void); -extern void proto_register_wimax_utility_decoders(void); extern void wimax_service_flow_encodings_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); extern void wimax_convengence_service_parameter_encoding_rules_decoder(guint sfe_type, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); extern void wimax_error_parameter_set_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); |