aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tcp.c
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2010-03-23 20:05:04 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2010-03-23 20:05:04 +0000
commit3f6e8b02846aa7ba42bf69f970c6dbe867823d8a (patch)
treee1497642ad53c62bbf3b05c7ec0068569058b8c7 /epan/dissectors/packet-tcp.c
parentcfb6f1531a26d7b50a76597d841226b71ca42cfa (diff)
From Martin Visser:
Please change the dissector so that TCP packets that have the "SACK permitted" option set, set the "tcp.options.sack_perm" field to 1. svn path=/trunk/; revision=32273
Diffstat (limited to 'epan/dissectors/packet-tcp.c')
-rw-r--r--epan/dissectors/packet-tcp.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index 04d2709bc3..6b1ce602fe 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -2098,6 +2098,17 @@ tcp_info_append_str(packet_info *pinfo, const char *abbrev, const char *val)
col_append_fstr(pinfo->cinfo, COL_INFO, " %s[%s]", abbrev, val);
}
+
+static void
+dissect_tcpopt_sack_perm(const ip_tcp_opt *optp _U_, tvbuff_t *tvb,
+ int offset, guint optlen, packet_info *pinfo, proto_tree *opt_tree)
+{
+ proto_item *hidden_item;
+ hidden_item = proto_tree_add_boolean(opt_tree, hf_tcp_option_sack_perm, tvb, offset,
+ optlen, TRUE);
+ tcp_info_append_uint(pinfo, "SACK_PERM", TRUE);
+}
+
static void
dissect_tcpopt_maxseg(const ip_tcp_opt *optp, tvbuff_t *tvb,
int offset, guint optlen, packet_info *pinfo, proto_tree *opt_tree)
@@ -2604,7 +2615,7 @@ static const ip_tcp_opt tcpopts[] = {
NULL,
FIXED_LENGTH,
TCPOLEN_SACK_PERM,
- NULL,
+ dissect_tcpopt_sack_perm,
},
{
TCPOPT_SACK,
@@ -3853,20 +3864,20 @@ proto_register_tcp(void)
HFILL}},
{ &hf_tcp_option_sack_perm,
- { "TCP Sack Perm Option", "tcp.options.sack_perm",
+ { "TCP SACK Permitted Option", "tcp.options.sack_perm",
FT_BOOLEAN,
BASE_NONE, NULL, 0x0, NULL, HFILL}},
{ &hf_tcp_option_sack,
- { "TCP Sack Option", "tcp.options.sack", FT_BOOLEAN,
+ { "TCP SACK Option", "tcp.options.sack", FT_BOOLEAN,
BASE_NONE, NULL, 0x0, NULL, HFILL}},
{ &hf_tcp_option_sack_sle,
- {"TCP Sack Left Edge", "tcp.options.sack_le", FT_UINT32,
+ {"TCP SACK Left Edge", "tcp.options.sack_le", FT_UINT32,
BASE_DEC, NULL, 0x0, NULL, HFILL}},
{ &hf_tcp_option_sack_sre,
- {"TCP Sack Right Edge", "tcp.options.sack_re", FT_UINT32,
+ {"TCP SACK Right Edge", "tcp.options.sack_re", FT_UINT32,
BASE_DEC, NULL, 0x0, NULL, HFILL}},
{ &hf_tcp_option_echo,