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 /plugins/wimax/msg_reg_req.c | |
parent | 39d3b8c16a0317d94f05b9e4c9eef541ee0515ee (diff) | |
download | wireshark-6ceb84b10bbfbb9743be074016b7de8cbab9bbcb.tar.gz |
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
Diffstat (limited to 'plugins/wimax/msg_reg_req.c')
-rw-r--r-- | plugins/wimax/msg_reg_req.c | 17 |
1 files changed, 12 insertions, 5 deletions
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); +} |