aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fcfzs.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-08-07 08:36:30 -0400
committerAnders Broman <a.broman58@gmail.com>2014-08-08 05:51:52 +0000
commita22b7075f84b8faf83a3ef05e45ea6d922c5001f (patch)
tree519e874bc10d1231b0dd9632dd91dabbb11502ef /epan/dissectors/packet-fcfzs.c
parent532a98dc8c827471e143c81517b7ebb321400f84 (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-fcfzs.c')
-rw-r--r--epan/dissectors/packet-fcfzs.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/epan/dissectors/packet-fcfzs.c b/epan/dissectors/packet-fcfzs.c
index 421270a394..532bd72c2b 100644
--- a/epan/dissectors/packet-fcfzs.c
+++ b/epan/dissectors/packet-fcfzs.c
@@ -29,6 +29,7 @@
#include <epan/to_str.h>
#include <epan/wmem/wmem.h>
#include <epan/conversation.h>
+#include <epan/expert.h>
#include <epan/etypes.h>
#include "packet-fc.h"
#include "packet-fcct.h"
@@ -72,6 +73,8 @@ static gint ett_fcfzs = -1;
static gint ett_fcfzs_gzc_flags = -1;
static gint ett_fcfzs_zone_state = -1;
+static expert_field ei_fcfzs_no_exchange = EI_INIT;
+
typedef struct _fcfzs_conv_key {
guint32 conv_idx;
} fcfzs_conv_key_t;
@@ -667,7 +670,7 @@ dissect_fcfzs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
val_to_str(opcode, fc_fzs_opcode_val,
"0x%x"));
/* No record of what this accept is for. Can't decode */
- proto_tree_add_text(fcfzs_tree, tvb, 0, tvb_length(tvb),
+ proto_tree_add_expert_format(fcfzs_tree, pinfo, &ei_fcfzs_no_exchange, tvb, 0, -1,
"No record of Exchg. Unable to decode MSG_ACC");
return 0;
}
@@ -697,7 +700,7 @@ dissect_fcfzs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
if ((cdata == NULL) && (opcode != FCCT_MSG_RJT)) {
/* No record of what this accept is for. Can't decode */
- proto_tree_add_text(fcfzs_tree, tvb, 0, tvb_length(tvb),
+ proto_tree_add_expert_format(fcfzs_tree, pinfo, &ei_fcfzs_no_exchange, tvb, 0, -1,
"No record of Exchg. Unable to decode MSG_ACC/RJT");
return 0;
}
@@ -916,10 +919,18 @@ proto_register_fcfzs(void)
&ett_fcfzs_zone_state,
};
+ static ei_register_info ei[] = {
+ { &ei_fcfzs_no_exchange, { "fcfzs.no_exchange", PI_UNDECODED, PI_WARN, "No record of Exchg. Unable to decode", EXPFILL }},
+ };
+
+ expert_module_t* expert_fcfzs;
+
proto_fcfzs = proto_register_protocol("Fibre Channel Fabric Zone Server", "FC FZS", "fcfzs");
proto_register_field_array(proto_fcfzs, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_fcfzs = expert_register_protocol(proto_fcfzs);
+ expert_register_field_array(expert_fcfzs, ei, array_length(ei));
register_init_routine(&fcfzs_init_protocol);
}