diff options
author | Michael Mann <mmann78@netscape.net> | 2013-06-03 03:42:36 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-06-03 03:42:36 +0000 |
commit | 7fe5422c4b4cd58dd7ffeebd984e7668cf61ab5d (patch) | |
tree | d1e444e2c6fa430fb2b7d048aafbbbefe8701641 /asn1/inap | |
parent | a28cbb7c8a83362e74b7e3db07c49d551d519983 (diff) |
Convert ASN.1 dissectors to use filterable expert info.
NOTE: Kerberos ASN.1 template was updated, but not generated to source.
svn path=/trunk/; revision=49707
Diffstat (limited to 'asn1/inap')
-rw-r--r-- | asn1/inap/inap.cnf | 9 | ||||
-rw-r--r-- | asn1/inap/packet-inap-template.c | 14 |
2 files changed, 17 insertions, 6 deletions
diff --git a/asn1/inap/inap.cnf b/asn1/inap/inap.cnf index eacfba450f..5756f59fa4 100644 --- a/asn1/inap/inap.cnf +++ b/asn1/inap/inap.cnf @@ -86,8 +86,7 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ #.TABLE2_FTR default: cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob"); - proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN); - expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode); + expert_add_info_format_text(actx->pinfo, cause, &ei_inap_unknown_invokeData, "Unknown invokeData %d",opcode); /* todo call the asn.1 dissector */ break; } @@ -106,8 +105,7 @@ static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset, #.TABLE2_FTR default: cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob"); - proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN); - expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnResultData %d",opcode); + expert_add_info_format_text(actx->pinfo, cause, &ei_inap_unknown_returnResultData, "Unknown returnResultData %d",opcode); } return offset; } @@ -124,8 +122,7 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,a #.TABLE2_FTR default: cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnErrorData blob"); - proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN); - expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnErrorData %d",errorCode); + expert_add_info_format_text(actx->pinfo, cause, &ei_inap_unknown_returnErrorData, "Unknown returnErrorData %d",errorCode); } return offset; } diff --git a/asn1/inap/packet-inap-template.c b/asn1/inap/packet-inap-template.c index 921ebfbe0a..59943d4cac 100644 --- a/asn1/inap/packet-inap-template.c +++ b/asn1/inap/packet-inap-template.c @@ -78,6 +78,10 @@ static gint ett_inapisup_parameter = -1; static gint ett_inap_HighLayerCompatibility = -1; #include "packet-inap-ett.c" +static expert_field ei_inap_unknown_invokeData = EI_INIT; +static expert_field ei_inap_unknown_returnResultData = EI_INIT; +static expert_field ei_inap_unknown_returnErrorData = EI_INIT; + #include "packet-inap-table.c" const value_string inap_general_problem_strings[] = { @@ -210,12 +214,22 @@ void proto_register_inap(void) { #include "packet-inap-ettarr.c" }; + static ei_register_info ei[] = { + { &ei_inap_unknown_invokeData, { "inap.unknown.invokeData", PI_MALFORMED, PI_WARN, "Unknown invokeData", EXPFILL }}, + { &ei_inap_unknown_returnResultData, { "inap.unknown.returnResultData", PI_MALFORMED, PI_WARN, "Unknown returnResultData", EXPFILL }}, + { &ei_inap_unknown_returnErrorData, { "inap.unknown.returnErrorData", PI_MALFORMED, PI_WARN, "Unknown returnResultData", EXPFILL }}, + }; + + expert_module_t* expert_inap; + /* Register protocol */ proto_inap = proto_register_protocol(PNAME, PSNAME, PFNAME); register_dissector("inap", dissect_inap, proto_inap); /* Register fields and subtrees */ proto_register_field_array(proto_inap, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); + expert_inap = expert_register_protocol(proto_inap); + expert_register_field_array(expert_inap, ei, array_length(ei)); /* Set default SSNs */ range_convert_str(&global_ssn_range, "106,241", MAX_SSN); |