diff options
author | Michael Mann <mmann78@netscape.net> | 2014-08-07 08:36:30 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-08-08 05:51:52 +0000 |
commit | a22b7075f84b8faf83a3ef05e45ea6d922c5001f (patch) | |
tree | 519e874bc10d1231b0dd9632dd91dabbb11502ef /epan/dissectors/packet-fcsp.c | |
parent | 532a98dc8c827471e143c81517b7ebb321400f84 (diff) |
Eliminate proto_tree_add_text from some dissectors.
Change-Id: I6f1710a093fc548c718defa9b40ab68877ede977
Reviewed-on: https://code.wireshark.org/review/3470
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-fcsp.c')
-rw-r--r-- | epan/dissectors/packet-fcsp.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/epan/dissectors/packet-fcsp.c b/epan/dissectors/packet-fcsp.c index ff1a836562..205ab0bf66 100644 --- a/epan/dissectors/packet-fcsp.c +++ b/epan/dissectors/packet-fcsp.c @@ -29,6 +29,7 @@ #include <epan/packet.h> #include <epan/to_str.h> #include <epan/conversation.h> +#include <epan/expert.h> #include <epan/etypes.h> #include "packet-fc.h" @@ -95,6 +96,8 @@ static int hf_auth_dhchap_rsp_value = -1; /* Initialize the subtree pointers */ static gint ett_fcsp = -1; +static expert_field ei_auth_fcap_undecoded = EI_INIT; + static const value_string fcauth_msgcode_vals[] = { {FC_AUTH_MSG_AUTH_REJECT, "AUTH_Reject"}, {FC_AUTH_MSG_AUTH_NEGOTIATE, "AUTH_Negotiate"}, @@ -426,8 +429,7 @@ static void dissect_fcsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case FC_AUTH_FCPAP_INIT: case FC_AUTH_FCPAP_ACCEPT: case FC_AUTH_FCPAP_COMPLETE: - proto_tree_add_text(fcsp_tree, tvb, offset+12, tvb_length(tvb), - "FCAP Decoding Not Supported"); + proto_tree_add_expert(fcsp_tree, pinfo, &ei_auth_fcap_undecoded, tvb, offset+12, -1); break; default: break; @@ -601,13 +603,20 @@ proto_register_fcsp(void) &ett_fcsp, }; + static ei_register_info ei[] = { + { &ei_auth_fcap_undecoded, { "fcsp.fcap_undecoded", PI_UNDECODED, PI_WARN, "FCAP Decoding Not Supported", EXPFILL }}, + }; + + expert_module_t* expert_fcsp; + /* Register the protocol name and description */ - proto_fcsp = proto_register_protocol("Fibre Channel Security Protocol", - "FC-SP", "fcsp"); + proto_fcsp = proto_register_protocol("Fibre Channel Security Protocol", "FC-SP", "fcsp"); register_dissector("fcsp", dissect_fcsp, proto_fcsp); proto_register_field_array(proto_fcsp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); + expert_fcsp = expert_register_protocol(proto_fcsp); + expert_register_field_array(expert_fcsp, ei, array_length(ei)); } |