aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/cdt
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/cdt
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/cdt')
-rw-r--r--asn1/cdt/cdt.cnf6
-rw-r--r--asn1/cdt/packet-cdt-template.c13
2 files changed, 14 insertions, 5 deletions
diff --git a/asn1/cdt/cdt.cnf b/asn1/cdt/cdt.cnf
index cf3d3fc626..bb4523afdc 100644
--- a/asn1/cdt/cdt.cnf
+++ b/asn1/cdt/cdt.cnf
@@ -74,8 +74,7 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt"
if (compr_tvb == NULL) {
tf = proto_tree_add_text (top_tree, tvb, save_offset, -1,
"[Error: Unable to get compressed content]");
- expert_add_info_format (actx->pinfo, tf, PI_UNDECODED, PI_ERROR,
- "Unable to get compressed content");
+ expert_add_info(actx->pinfo, tf, &ei_cdt_unable_compress_content);
col_append_str (actx->pinfo->cinfo, COL_INFO,
"[Error: Unable to get compressed content]");
return offset;
@@ -86,8 +85,7 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt"
if (next_tvb == NULL) {
tf = proto_tree_add_text (top_tree, tvb, save_offset, -1,
"[Error: Unable to uncompress content]");
- expert_add_info_format (actx->pinfo, tf, PI_UNDECODED, PI_ERROR,
- "Unable to uncompress content");
+ expert_add_info(actx->pinfo, tf, &ei_cdt_unable_uncompress_content);
col_append_str (actx->pinfo->cinfo, COL_INFO,
"[Error: Unable to uncompress content]");
return offset;
diff --git a/asn1/cdt/packet-cdt-template.c b/asn1/cdt/packet-cdt-template.c
index a5c6edd5b5..f9e4e7c386 100644
--- a/asn1/cdt/packet-cdt-template.c
+++ b/asn1/cdt/packet-cdt-template.c
@@ -63,6 +63,9 @@ static dissector_handle_t data_handle = NULL;
/* Initialize the subtree pointers */
#include "packet-cdt-ett.c"
+static expert_field ei_cdt_unable_compress_content = EI_INIT;
+static expert_field ei_cdt_unable_uncompress_content = EI_INIT;
+
#include "packet-cdt-fn.c"
@@ -101,13 +104,21 @@ void proto_register_cdt (void) {
#include "packet-cdt-ettarr.c"
};
+ static ei_register_info ei[] = {
+ { &ei_cdt_unable_compress_content, { "cdt.unable_compress_content", PI_UNDECODED, PI_ERROR, "Unable to get compressed content", EXPFILL }},
+ { &ei_cdt_unable_uncompress_content, { "cdt.unable_uncompress_content", PI_UNDECODED, PI_ERROR, "Unable to get uncompressed content", EXPFILL }},
+ };
+
+ expert_module_t* expert_cdt;
+
/* Register protocol */
proto_cdt = proto_register_protocol (PNAME, PSNAME, PFNAME);
/* Register fields and subtrees */
proto_register_field_array (proto_cdt, hf, array_length(hf));
proto_register_subtree_array (ett, array_length(ett));
-
+ expert_cdt = expert_register_protocol(proto_cdt);
+ expert_register_field_array(expert_cdt, ei, array_length(ei));
}