aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-iapp.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-iapp.c')
-rw-r--r--epan/dissectors/packet-iapp.c57
1 files changed, 29 insertions, 28 deletions
diff --git a/epan/dissectors/packet-iapp.c b/epan/dissectors/packet-iapp.c
index 3554fefa70..feda52fd8a 100644
--- a/epan/dissectors/packet-iapp.c
+++ b/epan/dissectors/packet-iapp.c
@@ -17,33 +17,35 @@
void proto_register_iapp(void);
void proto_reg_handoff_iapp(void);
+static dissector_handle_t iapp_handle;
+
/* Initialize the protocol and registered fields */
-static int proto_iapp = -1;
-static int hf_iapp_version = -1;
-static int hf_iapp_type = -1;
-static int hf_iapp_cap_forwarding = -1;
-static int hf_iapp_cap_wep = -1;
-static int hf_iapp_auth_status = -1;
-static int hf_iapp_auth_string = -1;
-static int hf_iapp_auth_uint = -1;
-static int hf_iapp_auth_ipaddr = -1;
-static int hf_iapp_auth_trailer = -1;
-static int hf_iapp_pdu_ssid = -1;
-static int hf_iapp_pdu_bytes = -1;
-static int hf_iapp_pdu_uint = -1;
-static int hf_iapp_pdu_phytype = -1;
-static int hf_iapp_pdu_regdomain = -1;
-static int hf_iapp_pdu_oui_ident = -1;
+static int proto_iapp;
+static int hf_iapp_version;
+static int hf_iapp_type;
+static int hf_iapp_cap_forwarding;
+static int hf_iapp_cap_wep;
+static int hf_iapp_auth_status;
+static int hf_iapp_auth_string;
+static int hf_iapp_auth_uint;
+static int hf_iapp_auth_ipaddr;
+static int hf_iapp_auth_trailer;
+static int hf_iapp_pdu_ssid;
+static int hf_iapp_pdu_bytes;
+static int hf_iapp_pdu_uint;
+static int hf_iapp_pdu_phytype;
+static int hf_iapp_pdu_regdomain;
+static int hf_iapp_pdu_oui_ident;
/* Initialize the subtree pointers */
-static gint ett_iapp = -1;
-static gint ett_iapp_pdu = -1;
-static gint ett_iapp_subpdu = -1;
-static gint ett_iapp_cap = -1;
-static gint ett_iapp_auth = -1;
-static gint ett_iapp_authinfo = -1;
+static gint ett_iapp;
+static gint ett_iapp_pdu;
+static gint ett_iapp_subpdu;
+static gint ett_iapp_cap;
+static gint ett_iapp_auth;
+static gint ett_iapp_authinfo;
-static expert_field ei_iapp_no_pdus = EI_INIT;
+static expert_field ei_iapp_no_pdus;
#define UDP_PORT_IAPP 2313
@@ -188,7 +190,7 @@ add_authval_str(proto_tree *tree, int type, int len, tvbuff_t *tvb, int offset)
break;
case IAPP_AUTH_USERNAME:
case IAPP_AUTH_PROVNAME:
- proto_tree_add_item(tree, hf_iapp_auth_string, tvb, offset, 1, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_iapp_auth_string, tvb, offset, 1, ENC_ASCII);
break;
case IAPP_AUTH_RXPKTS:
case IAPP_AUTH_TXPKTS:
@@ -251,7 +253,7 @@ append_pduval_str(proto_tree *tree, int type, int len, tvbuff_t *tvb, int offset
switch (type)
{
case IAPP_PDU_SSID:
- proto_tree_add_item(tree, hf_iapp_pdu_ssid, tvb, offset, len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_iapp_pdu_ssid, tvb, offset, len, ENC_ASCII);
break;
case IAPP_PDU_BSSID:
case IAPP_PDU_OLDBSSID:
@@ -454,6 +456,8 @@ proto_register_iapp(void)
proto_register_subtree_array(ett, array_length(ett));
expert_iapp = expert_register_protocol(proto_iapp);
expert_register_field_array(expert_iapp, ei, array_length(ei));
+
+ iapp_handle = register_dissector("iapp", dissect_iapp, proto_iapp);
}
@@ -464,9 +468,6 @@ proto_register_iapp(void)
void
proto_reg_handoff_iapp(void)
{
- dissector_handle_t iapp_handle;
-
- iapp_handle = create_dissector_handle(dissect_iapp, proto_iapp);
dissector_add_uint_with_preference("udp.port", UDP_PORT_IAPP, iapp_handle);
}
/*