From 2b27d91f2671d9fb9d9f8791e75d83c0cb3b73b2 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Sat, 6 Sep 2014 21:32:39 -0400 Subject: Eliminate proto_tree_add_text from some of the dissectors. Other minor cleanups while in the area. Change-Id: Id8dab02df6f111c3462238c3de1bf201e037ca48 Reviewed-on: https://code.wireshark.org/review/4022 Reviewed-by: Michael Mann Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Evan Huus --- epan/dissectors/packet-xyplex.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-xyplex.c') diff --git a/epan/dissectors/packet-xyplex.c b/epan/dissectors/packet-xyplex.c index 9931e77af3..de401f8612 100644 --- a/epan/dissectors/packet-xyplex.c +++ b/epan/dissectors/packet-xyplex.c @@ -40,6 +40,7 @@ static int hf_xyplex_server_port = -1; static int hf_xyplex_return_port = -1; static int hf_xyplex_reserved = -1; static int hf_xyplex_reply = -1; +static int hf_xyplex_data = -1; static gint ett_xyplex = -1; @@ -147,8 +148,7 @@ dissect_xyplex(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ col_add_fstr(pinfo->cinfo, COL_INFO, "%d > %d Data", pinfo->srcport, pinfo->destport); - proto_tree_add_text(xyplex_tree, tvb, offset, -1, - "Data (%d bytes)", tvb_reported_length_remaining(tvb, offset)); + proto_tree_add_item(xyplex_tree, hf_xyplex_data, tvb, offset, -1, ENC_NA); return tvb_reported_length_remaining(tvb, offset); } @@ -188,6 +188,11 @@ proto_register_xyplex(void) FT_UINT16, BASE_DEC, VALS(xyplex_reg_vals), 0x0, NULL, HFILL }}, + { &hf_xyplex_data, + { "Data", "xyplex.data", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + }; static gint *ett[] = { &ett_xyplex, -- cgit v1.2.3