diff options
author | Michael Mann <mmann78@netscape.net> | 2013-05-28 03:11:44 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-05-28 03:11:44 +0000 |
commit | 553bec65bab1b29317a4a2882af9e36bcf92aafd (patch) | |
tree | ffb845da44f6ecf27b6e645a73ee25fed0ad5ad7 /epan/dissectors/packet-xtp.c | |
parent | 292e50ed1dc51216ad1b157c3e2d3938528be11e (diff) |
Batch of filterable expert infos. This (mostly) completes the non-ASN.1 list of (built-in) dissectors that only had a small handful of add_expert_info_format calls.
svn path=/trunk/; revision=49602
Diffstat (limited to 'epan/dissectors/packet-xtp.c')
-rw-r--r-- | epan/dissectors/packet-xtp.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/epan/dissectors/packet-xtp.c b/epan/dissectors/packet-xtp.c index aa7d9f3883..297be19ae5 100644 --- a/epan/dissectors/packet-xtp.c +++ b/epan/dissectors/packet-xtp.c @@ -317,6 +317,8 @@ static gint ett_xtp_aseg = -1; static gint ett_xtp_data = -1; static gint ett_xtp_diag = -1; +static expert_field ei_xtp_spans_bad = EI_INIT; + /* dissector of each payload */ static int dissect_xtp_aseg(tvbuff_t *tvb, proto_tree *tree, guint32 offset) { @@ -770,12 +772,12 @@ dissect_xtp_ecntl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, spans_len = 16 * ecntl->nspan; if (len != spans_len) { - expert_add_info_format(pinfo, top_ti, PI_MALFORMED, PI_ERROR, "Number of spans (%u) incorrect. Should be %u.", ecntl->nspan, len); + expert_add_info_format_text(pinfo, top_ti, &ei_xtp_spans_bad, "Number of spans (%u) incorrect. Should be %u.", ecntl->nspan, len); THROW(ReportedBoundsError); } if (ecntl->nspan > XTP_MAX_NSPANS) { - expert_add_info_format(pinfo, top_ti, PI_MALFORMED, PI_ERROR, "Too many spans: %u", ecntl->nspan); + expert_add_info_format_text(pinfo, top_ti, &ei_xtp_spans_bad, "Too many spans: %u", ecntl->nspan); THROW(ReportedBoundsError); } @@ -1410,6 +1412,15 @@ proto_register_xtp(void) &ett_xtp_diag, }; + static ei_register_info ei[] = { + { &ei_xtp_spans_bad, { "xtp.spans_bad", PI_MALFORMED, PI_ERROR, "Number of spans incorrect", EXPFILL }}, + }; + + expert_module_t* expert_xtp; + + expert_xtp = expert_register_protocol(proto_xtp); + expert_register_field_array(expert_xtp, ei, array_length(ei)); + proto_xtp = proto_register_protocol("Xpress Transport Protocol", "XTP", "xtp"); proto_register_field_array(proto_xtp, hf, array_length(hf)); |