diff options
Diffstat (limited to 'plugins/wimax/msg_pkm.c')
-rw-r--r-- | plugins/wimax/msg_pkm.c | 29 |
1 files changed, 13 insertions, 16 deletions
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 |