aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-igap.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-igap.c')
-rw-r--r--epan/dissectors/packet-igap.c55
1 files changed, 28 insertions, 27 deletions
diff --git a/epan/dissectors/packet-igap.c b/epan/dissectors/packet-igap.c
index 0b6b9cd1ec..15bd0cc000 100644
--- a/epan/dissectors/packet-igap.c
+++ b/epan/dissectors/packet-igap.c
@@ -37,30 +37,32 @@
void proto_register_igap(void);
void proto_reg_handoff_igap(void);
-static int proto_igap = -1;
-static int hf_type = -1;
-static int hf_max_resp = -1;
-static int hf_checksum = -1;
-static int hf_checksum_status = -1;
-static int hf_maddr = -1;
-static int hf_version = -1;
-static int hf_subtype = -1;
-static int hf_challengeid = -1;
-static int hf_asize = -1;
-static int hf_msize = -1;
-static int hf_account = -1;
+static dissector_handle_t igap_handle;
+
+static int proto_igap;
+static int hf_type;
+static int hf_max_resp;
+static int hf_checksum;
+static int hf_checksum_status;
+static int hf_maddr;
+static int hf_version;
+static int hf_subtype;
+static int hf_challengeid;
+static int hf_asize;
+static int hf_msize;
+static int hf_account;
/* Generated from convert_proto_tree_add_text.pl */
-static int hf_igap_challenge = -1;
-static int hf_igap_user_password = -1;
-static int hf_igap_authentication_result = -1;
-static int hf_igap_result_of_md5_calculation = -1;
-static int hf_igap_accounting_status = -1;
-static int hf_igap_unknown_message = -1;
+static int hf_igap_challenge;
+static int hf_igap_user_password;
+static int hf_igap_authentication_result;
+static int hf_igap_result_of_md5_calculation;
+static int hf_igap_accounting_status;
+static int hf_igap_unknown_message;
-static int ett_igap = -1;
+static int ett_igap;
-static expert_field ei_checksum = EI_INIT;
+static expert_field ei_checksum;
static const value_string igap_types[] = {
{IGMP_IGAP_JOIN, "Membership Report (Join)"},
@@ -178,7 +180,7 @@ dissect_igap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
asize = ACCOUNT_SIZE;
}
/* XXX - encoding? */
- proto_tree_add_item(tree, hf_account, tvb, offset, asize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_account, tvb, offset, asize, ENC_ASCII);
}
offset += ACCOUNT_SIZE;
@@ -193,7 +195,7 @@ dissect_igap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
case IGAP_SUBTYPE_PASSWORD_LEAVE:
/* Challenge field is user's password */
/* XXX - encoding? */
- proto_tree_add_item(tree, hf_igap_user_password, tvb, offset, msize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_igap_user_password, tvb, offset, msize, ENC_ASCII);
break;
case IGAP_SUBTYPE_CHALLENGE_RESPONSE_JOIN:
case IGAP_SUBTYPE_CHALLENGE_RESPONSE_LEAVE:
@@ -333,16 +335,15 @@ proto_register_igap(void)
proto_igap = proto_register_protocol("Internet Group membership Authentication Protocol", "IGAP", "igap");
proto_register_field_array(proto_igap, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- expert_igap = expert_register_protocol(proto_igap);
- expert_register_field_array(expert_igap, ei, array_length(ei));
+ expert_igap = expert_register_protocol(proto_igap);
+ expert_register_field_array(expert_igap, ei, array_length(ei));
+
+ igap_handle = register_dissector("igap", dissect_igap, proto_igap);
}
void
proto_reg_handoff_igap(void)
{
- dissector_handle_t igap_handle;
-
- igap_handle = create_dissector_handle(dissect_igap, proto_igap);
dissector_add_uint("igmp.type", IGMP_IGAP_JOIN, igap_handle);
dissector_add_uint("igmp.type", IGMP_IGAP_QUERY, igap_handle);
dissector_add_uint("igmp.type", IGMP_IGAP_LEAVE, igap_handle);