diff options
author | Michael Mann <mmann78@netscape.net> | 2013-05-27 23:21:11 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-05-27 23:21:11 +0000 |
commit | b0090fd046d98c1410cb1f8d4012fea905621fc8 (patch) | |
tree | 10822d3a44ec601f38bf0d5547050d839395ddcb /epan/dissectors/packet-sasp.c | |
parent | 0ee4d0a00abd69e6479a55c12425c92cdf916d71 (diff) | |
download | wireshark-b0090fd046d98c1410cb1f8d4012fea905621fc8.tar.gz |
Batch of filterable expert infos
svn path=/trunk/; revision=49600
Diffstat (limited to 'epan/dissectors/packet-sasp.c')
-rw-r--r-- | epan/dissectors/packet-sasp.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/epan/dissectors/packet-sasp.c b/epan/dissectors/packet-sasp.c index 37016259af..85f4735d07 100644 --- a/epan/dissectors/packet-sasp.c +++ b/epan/dissectors/packet-sasp.c @@ -208,6 +208,8 @@ static gint ett_sasp_weight_entry_data_comp = -1; static gint ett_wt_entry_data_flag = -1; static gint ett_sasp_wt_rep = -1; +static expert_field ei_msg_type_invalid = EI_INIT; + /* desegmentation of SASP over TCP */ static gboolean sasp_desegment = TRUE; @@ -384,7 +386,7 @@ dissect_sasp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) hti = proto_tree_add_uint_format(sasp_tree, hf_sasp_type, tvb, offset, 2, hdr_type, "Type: %s", (hdr_type == SASP_HDR_TYPE) ? "SASP" : "[Invalid]"); if (hdr_type != SASP_HDR_TYPE) { - expert_add_info_format(pinfo, hti, PI_MALFORMED, PI_ERROR, + expert_add_info_format_text(pinfo, hti, &ei_msg_type_invalid, "Invalid SASP Header Type [0x%04x]", hdr_type); /* XXX: The folowing should actually happen automatically ? */ col_set_str(pinfo->cinfo, COL_INFO, "[Malformed: Invalid SASP Header Type]"); @@ -502,7 +504,7 @@ dissect_sasp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Unknown SASP Message Type */ col_add_fstr(pinfo->cinfo, COL_INFO, "[Malformed: Unknown Message Type [0x%04x]", msg_type); - expert_add_info_format(pinfo, mti, PI_MALFORMED, PI_WARN, + expert_add_info_format_text(pinfo, mti, &ei_msg_type_invalid, "Unknown SASP Message Type: 0x%4x", msg_type); return; } @@ -1705,12 +1707,19 @@ void proto_register_sasp(void) &ett_sasp_wt_rep, }; + static ei_register_info ei[] = { + { &ei_msg_type_invalid, { "sasp.msg.type.invalid", PI_PROTOCOL, PI_WARN, "Invalid Type", EXPFILL }}, + }; + module_t *sasp_module; + expert_module_t* expert_sasp; proto_sasp = proto_register_protocol("Server/Application State Protocol", "SASP", "sasp"); proto_register_field_array(proto_sasp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); + expert_sasp = expert_register_protocol(proto_sasp); + expert_register_field_array(expert_sasp, ei, array_length(ei)); sasp_module = prefs_register_protocol(proto_sasp, NULL); prefs_register_bool_preference(sasp_module, "desegment_sasp_messages", |