aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-wtp.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-09-06 21:32:39 -0400
committerEvan Huus <eapache@gmail.com>2014-09-07 17:08:29 +0000
commit2b27d91f2671d9fb9d9f8791e75d83c0cb3b73b2 (patch)
treef33941c31fdb5d755d6690d4d5d577a92e22fb50 /epan/dissectors/packet-wtp.c
parentf76b4d934662451f05820408b4841d08a2b2d351 (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-wtp.c')
-rw-r--r--epan/dissectors/packet-wtp.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/epan/dissectors/packet-wtp.c b/epan/dissectors/packet-wtp.c
index b3ef980973..7f0b33f875 100644
--- a/epan/dissectors/packet-wtp.c
+++ b/epan/dissectors/packet-wtp.c
@@ -182,6 +182,7 @@ static int hf_wtp_header_Abort_reason_provider = HF_EMPTY;
static int hf_wtp_header_Abort_reason_user = HF_EMPTY;
static int hf_wtp_header_sequence_number = HF_EMPTY;
static int hf_wtp_header_missing_packets = HF_EMPTY;
+static int hf_wtp_payload = HF_EMPTY;
/* These fields used when reassembling WTP fragments */
static int hf_wtp_fragments = HF_EMPTY;
@@ -738,14 +739,14 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
"%s (WTP payload reassembled in packet %u)",
szInfo, fd_wtp->reassembled_in);
- proto_tree_add_text(wtp_tree, tvb, dataOffset, -1, "Payload");
+ proto_tree_add_item(wtp_tree, hf_wtp_payload, tvb, dataOffset, -1, ENC_NA);
}
} else {
/* Not reassembled yet, or not reassembled at all */
col_append_fstr(pinfo->cinfo, COL_INFO,
"%s (Unreassembled fragment %u)",
szInfo, psn);
- proto_tree_add_text(wtp_tree, tvb, dataOffset, -1, "Payload");
+ proto_tree_add_item(wtp_tree, hf_wtp_payload, tvb, dataOffset, -1, ENC_NA);
}
/* Now reset fragmentation information in pinfo */
pinfo->fragmented = save_fragmented;
@@ -917,6 +918,12 @@ proto_register_wtp(void)
NULL, HFILL
}
},
+ { &hf_wtp_payload,
+ { "Payload", "wtp.payload",
+ FT_BYTES, BASE_NONE, NULL, 0x00,
+ NULL, HFILL
+ }
+ },
#if 0
{ &hf_wtp_header_variable_part,
{ "Header: Variable part", "wtp.header_variable_part",