aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cnip.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-05-25 17:06:40 +0000
committerMichael Mann <mmann78@netscape.net>2013-05-25 17:06:40 +0000
commit7e8e5b347e43359fcb36e32f9ce998c49b8d9fae (patch)
tree625973d8be777bdfa2d992ee473a77004180a742 /epan/dissectors/packet-cnip.c
parent66c859e765a8e881cedc8f93af706683775e8b7e (diff)
Batch of filterable expert_infos.
svn path=/trunk/; revision=49581
Diffstat (limited to 'epan/dissectors/packet-cnip.c')
-rw-r--r--epan/dissectors/packet-cnip.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/epan/dissectors/packet-cnip.c b/epan/dissectors/packet-cnip.c
index 6d5011e9eb..0dc4f65f9e 100644
--- a/epan/dissectors/packet-cnip.c
+++ b/epan/dissectors/packet-cnip.c
@@ -70,7 +70,9 @@ static gint hf_cnip_tstamp = -1;
static gint proto_cnip = -1;
static gint ett_cnip = -1;
-static gint ett_pf = -1;
+static gint ett_pf = -1;
+
+static expert_field ei_cnip_type_unknown = EI_INIT;
static dissector_table_t cnip_dissector_table;
static dissector_handle_t data_handle;
@@ -143,8 +145,7 @@ static void dissect_cnip (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item_set_len(ti, offset);
if (type != DATA_PACKET) {
- expert_add_info_format(pinfo, cnip_tree,
- PI_UNDECODED, PI_WARN,
+ expert_add_info_format_text(pinfo, cnip_tree, &ei_cnip_type_unknown,
"This dissector doesn't yet decode packets of type %s (0x%x)",
val_to_str_const(type, type_tuple, "Unknown"), type);
}
@@ -234,11 +235,19 @@ void proto_register_cnip(void)
&ett_pf
};
+ static ei_register_info ei[] = {
+ { &ei_cnip_type_unknown, { "cnip.type.unknown", PI_UNDECODED, PI_WARN, "This dissector doesn't yet decode packets of type", EXPFILL }},
+ };
+
+ expert_module_t* expert_cnip;
+
proto_cnip = proto_register_protocol("Component Network over IP",
"CN/IP", "cnip");
proto_register_field_array(proto_cnip, hf, array_length (hf));
proto_register_subtree_array(ett, array_length (ett));
+ expert_cnip = expert_register_protocol(proto_cnip);
+ expert_register_field_array(expert_cnip, ei, array_length(ei));
/* Register table for subdissectors */
cnip_dissector_table = register_dissector_table("cnip.protocol",