summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-tcp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index bf6818f145..a34fa040e2 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -324,6 +324,7 @@ static int hf_tcp_proc_dst_pid = -1;
static int hf_tcp_proc_dst_uname = -1;
static int hf_tcp_proc_dst_cmd = -1;
static int hf_tcp_segment_data = -1;
+static int hf_tcp_payload = -1;
static int hf_tcp_reset_cause = -1;
static int hf_tcp_fin_retransmission = -1;
static int hf_tcp_option_rvbd_probe_reserved = -1;
@@ -5573,8 +5574,14 @@ dissect_tcp_payload(tvbuff_t *tvb, packet_info *pinfo, int offset, guint32 seq,
proto_tree *tree, proto_tree *tcp_tree,
struct tcp_analysis *tcpd, struct tcpinfo *tcpinfo)
{
+ gint nbytes;
gboolean save_fragmented;
+ nbytes = tvb_reported_length_remaining(tvb, offset);
+ proto_tree_add_bytes_format(tcp_tree, hf_tcp_payload, tvb, offset,
+ -1, NULL, "TCP payload (%u byte%s)", nbytes,
+ plurality(nbytes, "", "s"));
+
/* Can we desegment this segment? */
if (pinfo->can_desegment) {
/* Yes. */
@@ -7161,6 +7168,10 @@ proto_register_tcp(void)
{ "TCP segment data", "tcp.segment_data", FT_BYTES, BASE_NONE, NULL, 0x0,
"A data segment used in reassembly of a lower-level protocol", HFILL}},
+ { &hf_tcp_payload,
+ { "TCP payload", "tcp.payload", FT_BYTES, BASE_NONE, NULL, 0x0,
+ "The TCP payload of this packet", HFILL}},
+
{ &hf_tcp_option_scps_binding_data,
{ "Binding Space Data", "tcp.options.scps.binding.data", FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }},