aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-erldp.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-08-03 21:10:24 -0400
committerAnders Broman <a.broman58@gmail.com>2014-08-05 07:36:26 +0000
commit9d5f9141af289d3d8b253907eaaae101da1bd9fd (patch)
tree4d2816511482c04e3e8af66bd6251f5f7ce2dc2f /epan/dissectors/packet-erldp.c
parentedbb9edf3928e79b41f9b84d2399205810febef2 (diff)
Eliminate proto_tree_add_text from some dissectors.
Other minor cleanup while in the area. Change-Id: Id8d957d3d68a2e3dd5089f490bd59d773e1be967 Reviewed-on: https://code.wireshark.org/review/3427 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-erldp.c')
-rw-r--r--epan/dissectors/packet-erldp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/dissectors/packet-erldp.c b/epan/dissectors/packet-erldp.c
index 9f23e53a76..a6be1fcdc7 100644
--- a/epan/dissectors/packet-erldp.c
+++ b/epan/dissectors/packet-erldp.c
@@ -124,6 +124,7 @@ static const value_string erldp_ctlmsg_vals[] = {
int proto_erldp = -1;
static int hf_erldp_length_2 = -1;
static int hf_erldp_length_4 = -1;
+static int hf_etf_version_magic = -1;
static int hf_erldp_tag = -1;
static int hf_erldp_type = -1;
static int hf_erldp_version = -1;
@@ -358,7 +359,7 @@ static gint dissect_etf_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
etf_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_etf, &ti, (label) ? label : "External Term Format");
- proto_tree_add_text(etf_tree, tvb, offset, 1, "VERSION_MAGIC: %d", mag);
+ proto_tree_add_item(etf_tree, hf_etf_version_magic, tvb, offset, 1, ENC_NA);
offset++;
tag = tvb_get_guint8(tvb, offset);
@@ -554,6 +555,9 @@ void proto_register_erldp(void) {
{ &hf_erldp_length_2, { "Length", "erldp.len",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Message Length", HFILL}},
+ { &hf_etf_version_magic, { "VERSION_MAGIC", "erldp.version_magic",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
{ &hf_erldp_tag, { "Tag", "erldp.tag",
FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL}},