aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/p1
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-06-03 03:42:36 +0000
committerMichael Mann <mmann78@netscape.net>2013-06-03 03:42:36 +0000
commit7fe5422c4b4cd58dd7ffeebd984e7668cf61ab5d (patch)
treed1e444e2c6fa430fb2b7d048aafbbbefe8701641 /asn1/p1
parenta28cbb7c8a83362e74b7e3db07c49d551d519983 (diff)
Convert ASN.1 dissectors to use filterable expert info.
NOTE: Kerberos ASN.1 template was updated, but not generated to source. svn path=/trunk/; revision=49707
Diffstat (limited to 'asn1/p1')
-rw-r--r--asn1/p1/p1.cnf8
-rw-r--r--asn1/p1/packet-p1-template.c15
2 files changed, 19 insertions, 4 deletions
diff --git a/asn1/p1/p1.cnf b/asn1/p1/p1.cnf
index a16c540d2b..1c9a6160f7 100644
--- a/asn1/p1/p1.cnf
+++ b/asn1/p1/p1.cnf
@@ -546,7 +546,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
"Dissector for standard-extension %%d not implemented. Contact Wireshark developers if you want this supported", extension_id);
next_tree = proto_item_add_subtree(item, ett_p1_unknown_standard_extension);
offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
- expert_add_info_format(actx->pinfo, item, PI_UNDECODED, PI_WARN, "Unknown standard-extension");
+ expert_add_info(actx->pinfo, item, &ei_p1_unknown_standard_extension);
}
} else if (object_identifier_id) {
offset = call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
@@ -585,7 +585,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
"Dissector for extension-attribute-type %%d not implemented. Contact Wireshark developers if you want this supported", extension_id);
next_tree = proto_item_add_subtree(item, ett_p1_unknown_extension_attribute_type);
offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
- expert_add_info_format(actx->pinfo, item, PI_UNDECODED, PI_WARN, "Unknown extension-attribute-type");
+ expert_add_info(actx->pinfo, item, &ei_p1_unknown_extension_attribute_type);
}
@@ -665,7 +665,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
proto_tree *next_tree = NULL;
item = proto_tree_add_text(top_tree ? top_tree : tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "P1 Unknown Content (unknown built-in content-type)");
- expert_add_info_format(actx->pinfo, item, PI_UNDECODED, PI_WARN, "Unknown built-in content-type");
+ expert_add_info(actx->pinfo, item, &ei_p1_unknown_built_in_content_type);
if (item) {
next_tree=proto_item_add_subtree(item, ett_p1_content_unknown);
}
@@ -1247,7 +1247,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
"Dissector for tokendata-type %%d not implemented. Contact Wireshark developers if you want this supported", extension_id);
next_tree = proto_item_add_subtree(item, ett_p1_unknown_tokendata_type);
offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
- expert_add_info_format(actx->pinfo, item, PI_UNDECODED, PI_WARN, "Unknown tokendata-type");
+ expert_add_info(actx->pinfo, item, &ei_p1_unknown_tokendata_type);
}
#.FN_BODY PerDomainBilateralInformation/bilateral-information
diff --git a/asn1/p1/packet-p1-template.c b/asn1/p1/packet-p1-template.c
index 7400b1478f..bee6d586ca 100644
--- a/asn1/p1/packet-p1-template.c
+++ b/asn1/p1/packet-p1-template.c
@@ -90,6 +90,11 @@ static gint ett_p1_unknown_extension_attribute_type = -1;
static gint ett_p1_unknown_tokendata_type = -1;
#include "packet-p1-ett.c"
+static expert_field ei_p1_unknown_extension_attribute_type = EI_INIT;
+static expert_field ei_p1_unknown_standard_extension = EI_INIT;
+static expert_field ei_p1_unknown_built_in_content_type = EI_INIT;
+static expert_field ei_p1_unknown_tokendata_type = EI_INIT;
+
/* Dissector tables */
static dissector_table_t p1_extension_dissector_table;
static dissector_table_t p1_extension_attribute_dissector_table;
@@ -268,6 +273,14 @@ void proto_register_p1(void) {
#include "packet-p1-ettarr.c"
};
+ static ei_register_info ei[] = {
+ { &ei_p1_unknown_extension_attribute_type, { "p1.unknown.extension_attribute_type", PI_UNDECODED, PI_WARN, "Unknown extension-attribute-type", EXPFILL }},
+ { &ei_p1_unknown_standard_extension, { "p1.unknown.standard_extension", PI_UNDECODED, PI_WARN, "Unknown standard-extension", EXPFILL }},
+ { &ei_p1_unknown_built_in_content_type, { "p1.unknown.built_in_content_type", PI_UNDECODED, PI_WARN, "Unknown built-in content-type", EXPFILL }},
+ { &ei_p1_unknown_tokendata_type, { "p1.unknown.tokendata_type", PI_UNDECODED, PI_WARN, "Unknown tokendata-type", EXPFILL }},
+ };
+
+ expert_module_t* expert_p1;
module_t *p1_module;
/* Register protocol */
@@ -279,6 +292,8 @@ void proto_register_p1(void) {
/* Register fields and subtrees */
proto_register_field_array(proto_p1, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_p1 = expert_register_protocol(proto_p1);
+ expert_register_field_array(expert_p1, ei, array_length(ei));
p1_extension_dissector_table = register_dissector_table("p1.extension", "P1-EXTENSION", FT_UINT32, BASE_DEC);
p1_extension_attribute_dissector_table = register_dissector_table("p1.extension-attribute", "P1-EXTENSION-ATTRIBUTE", FT_UINT32, BASE_DEC);