aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/mms
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/mms
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/mms')
-rw-r--r--asn1/mms/mms.cnf6
-rw-r--r--asn1/mms/packet-mms-template.c13
2 files changed, 14 insertions, 5 deletions
diff --git a/asn1/mms/mms.cnf b/asn1/mms/mms.cnf
index 852dbb343b..610dac564b 100644
--- a/asn1/mms/mms.cnf
+++ b/asn1/mms/mms.cnf
@@ -92,8 +92,7 @@ UtcTime TYPE = FT_STRING DISPLAY = BASE_NONE
cause = proto_tree_add_text(tree, tvb, offset, len,
"BER Error: malformed TimeOfDay encoding, "
"length must be 4 or 6 bytes");
- proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
- expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "BER Error: malformed TimeOfDay encoding");
+ expert_add_info(actx->pinfo, cause, &ei_mms_mal_timeofday_encoding);
if(hf_index >= 0)
{
proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
@@ -118,8 +117,7 @@ UtcTime TYPE = FT_STRING DISPLAY = BASE_NONE
cause = proto_tree_add_text(tree, tvb, offset, len,
"BER Error: malformed IEC61850 UTCTime encoding, "
"length must be 8 bytes");
- proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
- expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "BER Error: malformed IEC61850 UTCTime encoding");
+ expert_add_info(actx->pinfo, cause, &ei_mms_mal_utctime_encoding);
if(hf_index >= 0)
{
proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
diff --git a/asn1/mms/packet-mms-template.c b/asn1/mms/packet-mms-template.c
index f4deec0ee0..64753b2718 100644
--- a/asn1/mms/packet-mms-template.c
+++ b/asn1/mms/packet-mms-template.c
@@ -49,6 +49,9 @@ static int proto_mms = -1;
static gint ett_mms = -1;
#include "packet-mms-ett.c"
+static expert_field ei_mms_mal_timeofday_encoding = EI_INIT;
+static expert_field ei_mms_mal_utctime_encoding = EI_INIT;
+
#include "packet-mms-fn.c"
/*
@@ -97,13 +100,21 @@ void proto_register_mms(void) {
#include "packet-mms-ettarr.c"
};
+ static ei_register_info ei[] = {
+ { &ei_mms_mal_timeofday_encoding, { "mms.malformed.timeofday_encoding", PI_MALFORMED, PI_WARN, "BER Error: malformed TimeOfDay encoding", EXPFILL }},
+ { &ei_mms_mal_utctime_encoding, { "mms.malformed.utctime", PI_MALFORMED, PI_WARN, "BER Error: malformed IEC61850 UTCTime encoding", EXPFILL }},
+ };
+
+ expert_module_t* expert_mms;
+
/* Register protocol */
proto_mms = proto_register_protocol(PNAME, PSNAME, PFNAME);
register_dissector("mms", dissect_mms, proto_mms);
/* Register fields and subtrees */
proto_register_field_array(proto_mms, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
-
+ expert_mms = expert_register_protocol(proto_mms);
+ expert_register_field_array(expert_mms, ei, array_length(ei));
}