summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/wimax/msg_arq.c33
-rw-r--r--plugins/wimax/msg_dreg.c24
-rw-r--r--plugins/wimax/msg_pmc.c22
3 files changed, 27 insertions, 52 deletions
diff --git a/plugins/wimax/msg_arq.c b/plugins/wimax/msg_arq.c
index a3783e6cd6..d83f9c8766 100644
--- a/plugins/wimax/msg_arq.c
+++ b/plugins/wimax/msg_arq.c
@@ -307,39 +307,26 @@ void proto_register_mac_mgmt_msg_arq_feedback(void)
}
};
- if (proto_mac_mgmt_msg_arq_feedback_decoder == -1)
- {
- proto_mac_mgmt_msg_arq_feedback_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_subtree_array(ett, array_length(ett));
- }
+ proto_mac_mgmt_msg_arq_feedback_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_subtree_array(ett, array_length(ett));
}
/* Register Wimax Mac Payload Protocol and Dissector */
void proto_register_mac_mgmt_msg_arq_discard(void)
{
- if (proto_mac_mgmt_msg_arq_discard_decoder == -1)
- {
- proto_mac_mgmt_msg_arq_discard_decoder = proto_mac_mgmt_msg_arq_feedback_decoder;
-
- proto_register_subtree_array(ett, array_length(ett));
- }
+ 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)
{
- if (proto_mac_mgmt_msg_arq_reset_decoder == -1)
- {
- proto_mac_mgmt_msg_arq_reset_decoder = proto_mac_mgmt_msg_arq_feedback_decoder;
-
- proto_register_subtree_array(ett, array_length(ett));
- }
+ proto_mac_mgmt_msg_arq_reset_decoder = proto_mac_mgmt_msg_arq_feedback_decoder;
}
/* Decode ARQ-Feedback messages. */
diff --git a/plugins/wimax/msg_dreg.c b/plugins/wimax/msg_dreg.c
index 178b2b0c57..0b7ade90b3 100644
--- a/plugins/wimax/msg_dreg.c
+++ b/plugins/wimax/msg_dreg.c
@@ -371,26 +371,20 @@ void proto_register_mac_mgmt_msg_dreg_req(void)
}
};
- if (proto_mac_mgmt_msg_dreg_req_decoder == -1) {
- 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 */
- );
-
- proto_register_field_array(proto_mac_mgmt_msg_dreg_req_decoder, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
- }
+ 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 */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_dreg_req_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_dreg_cmd(void)
{
- if (proto_mac_mgmt_msg_dreg_cmd_decoder == -1) {
- proto_mac_mgmt_msg_dreg_cmd_decoder = proto_mac_mgmt_msg_dreg_req_decoder;
-
- proto_register_subtree_array(ett, array_length(ett));
- }
+ proto_mac_mgmt_msg_dreg_cmd_decoder = proto_mac_mgmt_msg_dreg_req_decoder;
}
/* Decode DREG-REQ messages. */
diff --git a/plugins/wimax/msg_pmc.c b/plugins/wimax/msg_pmc.c
index 64a6435f1f..f55ae7b15b 100644
--- a/plugins/wimax/msg_pmc.c
+++ b/plugins/wimax/msg_pmc.c
@@ -172,26 +172,20 @@ void proto_register_mac_mgmt_msg_pmc_req(void)
}
};
- if (proto_mac_mgmt_msg_pmc_req_decoder == -1) {
- 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 */
- );
+ 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 */
+ );
- proto_register_field_array(proto_mac_mgmt_msg_pmc_req_decoder, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
- }
+ proto_register_field_array(proto_mac_mgmt_msg_pmc_req_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_pmc_rsp(void)
{
- if (proto_mac_mgmt_msg_pmc_rsp_decoder == -1) {
- proto_mac_mgmt_msg_pmc_rsp_decoder = proto_mac_mgmt_msg_pmc_req_decoder;
-
- proto_register_subtree_array(ett, array_length(ett));
- }
+ proto_mac_mgmt_msg_pmc_rsp_decoder = proto_mac_mgmt_msg_pmc_req_decoder;
}
/* Decode PMC-REQ messages. */