summaryrefslogtreecommitdiff
path: root/plugins/m2m
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-05-29 23:41:33 +0000
committerMichael Mann <mmann78@netscape.net>2013-05-29 23:41:33 +0000
commitdffc4fefc6c5778545d0afd3187123cb4c172802 (patch)
tree882778ab489920a412770d3fe29588580ca42058 /plugins/m2m
parent34230e736db13e61c1e1f1cfb00cff2a9e3658d5 (diff)
downloadwireshark-dffc4fefc6c5778545d0afd3187123cb4c172802.tar.gz
Batch (some of) the plugins to filterable expert infos. The Profinet plugin started to get a bit complex in determining filter names (especially the DCOM stuff), so I'll leave that to someone more familiar with the protocol.
svn path=/trunk/; revision=49624
Diffstat (limited to 'plugins/m2m')
-rw-r--r--plugins/m2m/packet-m2m.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/m2m/packet-m2m.c b/plugins/m2m/packet-m2m.c
index 8c4de49627..f1811895f5 100644
--- a/plugins/m2m/packet-m2m.c
+++ b/plugins/m2m/packet-m2m.c
@@ -154,6 +154,8 @@ static gint hf_m2m_value_preamble_uint16 = -1;
static gint hf_m2m_value_harq_ack_burst_bytes = -1;
static gint hf_m2m_phy_attributes = -1;
+static expert_field ei_m2m_unexpected_length = EI_INIT;
+
/* Register M2M defrag table init routine. */
static void
m2m_defragment_init(void)
@@ -394,7 +396,7 @@ static void dissect_m2m(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (offset - tlv_offset == expected_len) {
proto_tree_add_tlv(&m2m_tlv_info, tvb, offset - tlv_offset, pinfo, tlv_tree, hf, encoding);
} else {
- expert_add_info_format(pinfo, NULL, PI_MALFORMED, PI_ERROR, "Expected length %d, got %d.", expected_len, offset - tlv_offset);
+ expert_add_info_format_text(pinfo, NULL, &ei_m2m_unexpected_length, "Expected length %d, got %d.", expected_len, offset - tlv_offset);
}
}
offset += tlv_len;
@@ -773,7 +775,13 @@ void proto_register_m2m(void)
&ett_m2m_ffb,
};
- proto_m2m = proto_register_protocol (
+ static ei_register_info ei[] = {
+ { &ei_m2m_unexpected_length, { "m2m.unexpected_length", PI_MALFORMED, PI_ERROR, "Unexpected length", EXPFILL }},
+ };
+
+ expert_module_t* expert_m2m;
+
+ proto_m2m = proto_register_protocol (
"WiMax Mac to Mac Packet", /* name */
"M2M (m2m)", /* short name */
"m2m" /* abbrev */
@@ -782,6 +790,8 @@ void proto_register_m2m(void)
proto_register_field_array(proto_m2m, hf, array_length(hf));
proto_register_field_array(proto_m2m, hf_tlv, array_length(hf_tlv));
proto_register_subtree_array(ett, array_length(ett));
+ expert_m2m = expert_register_protocol(proto_m2m);
+ expert_register_field_array(expert_m2m, ei, array_length(ei));
/* Register the PDU fragment table init routine */
register_init_routine(m2m_defragment_init);