diff options
author | Michael Mann <mmann78@netscape.net> | 2014-09-06 21:32:39 -0400 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-09-07 17:08:29 +0000 |
commit | 2b27d91f2671d9fb9d9f8791e75d83c0cb3b73b2 (patch) | |
tree | f33941c31fdb5d755d6690d4d5d577a92e22fb50 /epan/dissectors/packet-xyplex.c | |
parent | f76b4d934662451f05820408b4841d08a2b2d351 (diff) |
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 <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-xyplex.c')
-rw-r--r-- | epan/dissectors/packet-xyplex.c | 9 |
1 files changed, 7 insertions, 2 deletions
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, |