diff options
author | Michael Mann <mmann78@netscape.net> | 2013-05-26 03:29:07 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-05-26 03:29:07 +0000 |
commit | 5bc22a25df02c19a2414bcf3c5ea3446cf96c7ef (patch) | |
tree | cd264649621f031a8edcfa7cbd34ba4b0a8d5450 /epan/dissectors/packet-k12.c | |
parent | a9c35aa4b65dc566ffe845e9bc205e81ecc7979c (diff) |
Batch of filterable expert infos.
svn path=/trunk/; revision=49584
Diffstat (limited to 'epan/dissectors/packet-k12.c')
-rw-r--r-- | epan/dissectors/packet-k12.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/epan/dissectors/packet-k12.c b/epan/dissectors/packet-k12.c index 752135399a..5948e5fcd4 100644 --- a/epan/dissectors/packet-k12.c +++ b/epan/dissectors/packet-k12.c @@ -62,6 +62,8 @@ static gint ett_k12 = -1; static gint ett_port = -1; static gint ett_stack_item = -1; +static expert_field ei_k12_unmatched_stk_file = EI_INIT; + static dissector_handle_t k12_handle; static dissector_handle_t data_handle; static dissector_handle_t sscop_handle; @@ -262,7 +264,7 @@ dissect_k12(tvbuff_t* tvb,packet_info* pinfo,proto_tree* tree) item = proto_tree_add_text(stack_tree,tvb,0,0, "Warning: stk file not matched in the 'K12 Protocols' table"); PROTO_ITEM_SET_GENERATED(item); - expert_add_info_format(pinfo, item, PI_UNDECODED, PI_WARN, "unmatched stk file"); + expert_add_info(pinfo, item, &ei_k12_unmatched_stk_file); item = proto_tree_add_text(stack_tree,tvb,0,0, "Info: You can edit the 'K12 Protocols' table from Preferences->Protocols->k12xx"); @@ -432,6 +434,10 @@ proto_register_k12(void) &ett_stack_item }; + static ei_register_info ei[] = { + { &ei_k12_unmatched_stk_file, { "k12.unmatched_stk_file", PI_UNDECODED, PI_WARN, "unmatched stk file", EXPFILL }}, + }; + static uat_field_t uat_k12_flds[] = { UAT_FLD_CSTRING_ISPRINT(k12,match,"Match string", "A string that will be matched (a=A) against an .stk filename or the name of a port.\n" @@ -443,10 +449,13 @@ proto_register_k12(void) }; module_t *k12_module; + expert_module_t* expert_k12; proto_k12 = proto_register_protocol("K12xx", "K12xx", "k12"); proto_register_field_array(proto_k12, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); + expert_k12 = expert_register_protocol(proto_k12); + expert_register_field_array(expert_k12, ei, array_length(ei)); register_dissector("k12", dissect_k12, proto_k12); k12_uat = uat_new("K12 Protocols", |