aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-roofnet.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-05-27 23:21:11 +0000
committerMichael Mann <mmann78@netscape.net>2013-05-27 23:21:11 +0000
commitb0090fd046d98c1410cb1f8d4012fea905621fc8 (patch)
tree10822d3a44ec601f38bf0d5547050d839395ddcb /epan/dissectors/packet-roofnet.c
parent0ee4d0a00abd69e6479a55c12425c92cdf916d71 (diff)
Batch of filterable expert infos
svn path=/trunk/; revision=49600
Diffstat (limited to 'epan/dissectors/packet-roofnet.c')
-rw-r--r--epan/dissectors/packet-roofnet.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/epan/dissectors/packet-roofnet.c b/epan/dissectors/packet-roofnet.c
index 37f3c472e4..942d31d4b6 100644
--- a/epan/dissectors/packet-roofnet.c
+++ b/epan/dissectors/packet-roofnet.c
@@ -104,6 +104,8 @@ static int hf_roofnet_link_dst = -1;
static gint ett_roofnet = -1;
static gint ett_roofnet_link = -1;
+static expert_field ei_rooftop_too_many_links = EI_INIT;
+
/*
* dissect the header of roofnet
*/
@@ -224,9 +226,7 @@ static void dissect_roofnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
roofnet_nlinks= tvb_get_guint8(tvb, ROOFNET_OFFSET_NLINKS);
/* Check that we do not have a malformed roofnet packet */
if ((roofnet_nlinks*6*4)+ROOFNET_HEADER_LENGTH > ROOFNET_MAX_LENGTH) {
- if (tree) {
- expert_add_info_format(pinfo, it, PI_MALFORMED, PI_ERROR, "Too many links (%u)\n", roofnet_nlinks);
- }
+ expert_add_info_format_text(pinfo, it, &ei_rooftop_too_many_links, "Too many links (%u)\n", roofnet_nlinks);
return;
}
@@ -338,6 +338,12 @@ void proto_register_roofnet(void)
&ett_roofnet_link
};
+ static ei_register_info ei[] = {
+ { &ei_rooftop_too_many_links, { "rooftop.too_many_links", PI_MALFORMED, PI_ERROR, "Too many links", EXPFILL }},
+ };
+
+ expert_module_t* expert_roofnet;
+
proto_roofnet = proto_register_protocol(
"Roofnet Protocol", /* Name */
"Roofnet", /* Short Name */
@@ -346,6 +352,8 @@ void proto_register_roofnet(void)
proto_register_field_array(proto_roofnet, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_roofnet = expert_register_protocol(proto_roofnet);
+ expert_register_field_array(expert_roofnet, ei, array_length(ei));
}