diff options
author | Michael Mann <mmann78@netscape.net> | 2013-05-27 17:30:43 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-05-27 17:30:43 +0000 |
commit | ea177a2575dc4900c7ef2aa78bfe9b2a1173f7fb (patch) | |
tree | 626615fdfd431d78baefe2e59fb28f6b774959aa /epan/dissectors/packet-lmp.c | |
parent | c6af00a977cf7c7a3c914c79009eaa87bd19c56f (diff) |
Batch of filterable expert infos
svn path=/trunk/; revision=49596
Diffstat (limited to 'epan/dissectors/packet-lmp.c')
-rw-r--r-- | epan/dissectors/packet-lmp.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/epan/dissectors/packet-lmp.c b/epan/dissectors/packet-lmp.c index ada6877991..2ce07bc32a 100644 --- a/epan/dissectors/packet-lmp.c +++ b/epan/dissectors/packet-lmp.c @@ -503,6 +503,9 @@ enum hf_lmp_filter_keys { static int hf_lmp_filter[LMPF_MAX]; +static expert_field ei_lmp_checksum_incorrect = EI_INIT; + + static int lmp_valid_class(int lmp_class) { @@ -751,7 +754,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) proto_item_append_text( ti, " [correct]"); } else { - expert_add_info_format(pinfo, ti, PI_PROTOCOL, PI_WARN, "[incorrect, should be 0x%04x]", + expert_add_info_format_text(pinfo, ti, &ei_lmp_checksum_incorrect, "[incorrect, should be 0x%04x]", in_cksum_shouldbe(cksum, computed_cksum)); } } @@ -2706,11 +2709,20 @@ proto_register_lmp(void) NULL, HFILL }}, }; + static ei_register_info ei[] = { + { &ei_lmp_checksum_incorrect, { "lmp.checksum.incorrect", PI_PROTOCOL, PI_WARN, "Incorrect checksum", EXPFILL }}, + }; + + expert_module_t* expert_lmp; + for (i=0; i<NUM_LMP_SUBTREES; i++) { lmp_subtree[i] = -1; ett[i] = &lmp_subtree[i]; } + expert_lmp = expert_register_protocol(proto_lmp); + expert_register_field_array(expert_lmp, ei, array_length(ei)); + proto_lmp = proto_register_protocol("Link Management Protocol (LMP)", "LMP", "lmp"); proto_register_field_array(proto_lmp, lmpf_info, array_length(lmpf_info)); |