aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/wimax/wimax_pdu_decoder.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2009-08-04 19:01:34 +0000
committerBill Meier <wmeier@newsguy.com>2009-08-04 19:01:34 +0000
commit8589c2f11bb81dddd09d8bd2adcfb5e8a5b33dff (patch)
treeb8c8ee79da5947a5d0667ec76143c0440f2a95bb /plugins/wimax/wimax_pdu_decoder.c
parentcb7dac7100ba7e3f9208dbee243b1a0160254f02 (diff)
Minor changes:
- Move proto_register...() to the end of the file as per convention; - Move ett[] to be local to proto_register...(); - "if (...==-1)" not req'd in proto_register...(); - #include <moduleinfo.h> not req'd; - Remove unneeded forward declarations. svn path=/trunk/; revision=29296
Diffstat (limited to 'plugins/wimax/wimax_pdu_decoder.c')
-rw-r--r--plugins/wimax/wimax_pdu_decoder.c72
1 files changed, 33 insertions, 39 deletions
diff --git a/plugins/wimax/wimax_pdu_decoder.c b/plugins/wimax/wimax_pdu_decoder.c
index 1f98d0b028..f04e0fc9af 100644
--- a/plugins/wimax/wimax_pdu_decoder.c
+++ b/plugins/wimax/wimax_pdu_decoder.c
@@ -69,50 +69,11 @@ extern gint wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *p
/* Global Variables. */
gboolean first_gmh;
-/* forward reference */
-static void dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
-
static gint proto_wimax_pdu_decoder = -1;
static gint ett_wimax_pdu_decoder = -1;
static int hf_wimax_value_bytes = -1;
-/* Setup protocol subtree array */
-static gint *ett[] =
-{
- &ett_wimax_pdu_decoder,
-};
-
-/* Register Wimax PDU Burst Protocol */
-void proto_register_wimax_pdu(void)
-{
- /* PDU display */
- static hf_register_info hf[] =
- {
- {
- &hf_wimax_value_bytes,
- {
- "Values", "wmx.pdu.value",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL, HFILL
- }
- },
- };
-
- if (proto_wimax_pdu_decoder == -1)
- {
- proto_wimax_pdu_decoder = proto_wimax;
-
- 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();
- }
-}
-
static void dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset;
@@ -268,3 +229,36 @@ static void dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t
offset += length;
}
}
+
+/* Register Wimax PDU Burst Protocol */
+void proto_register_wimax_pdu(void)
+{
+ /* PDU display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_wimax_value_bytes,
+ {
+ "Values", "wmx.pdu.value",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_wimax_pdu_decoder,
+ };
+
+ proto_wimax_pdu_decoder = proto_wimax;
+
+ 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();
+}