diff options
author | cmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-07-01 19:40:35 +0000 |
---|---|---|
committer | cmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-07-01 19:40:35 +0000 |
commit | b0dcb87bf124ee872b4318191bcf32e704aa707c (patch) | |
tree | d029673626c784c6f521d46993bcf4e75e9df553 /epan/dissectors/packet-tcp.c | |
parent | 26e4af7908b44a419e587dbe70b262c911ef2ab6 (diff) |
Since the TCP Flags tree encompasses 12 bits including the 3 reserved bits and
the nonce bit, we should display 3 nibbles on the Flags summary line in order
to represent all flag bits. While arguably we need not worry about reserved
bits, the nonce bit is not currently represented, so that bit alone pushes us
into the next nibble.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37856 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-tcp.c')
-rw-r--r-- | epan/dissectors/packet-tcp.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 15a12fe6d4..0d920a3a0b 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -3819,6 +3819,12 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) first_flag = FALSE; } } + if (tcph->th_flags & 0x0E00) { + if (first_flag) { + ep_strbuf_truncate(flags_strbuf, 0); + } + ep_strbuf_append_printf(flags_strbuf, "%sReserved", first_flag ? "" : ", "); + } } col_append_fstr(pinfo->cinfo, COL_INFO, " [%s] Seq=%u", flags_strbuf->str, tcph->th_seq); @@ -3894,7 +3900,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_uint_format(tcp_tree, hf_tcp_hdr_len, tvb, offset + 12, 1, tcph->th_hlen, "Header length: %u bytes", tcph->th_hlen); tf = proto_tree_add_uint_format(tcp_tree, hf_tcp_flags, tvb, offset + 12, 2, - tcph->th_flags, "Flags: 0x%02x (%s)", tcph->th_flags, flags_strbuf->str); + tcph->th_flags, "Flags: 0x%03x (%s)", tcph->th_flags, flags_strbuf->str); field_tree = proto_item_add_subtree(tf, ett_tcp_flags); proto_tree_add_boolean(field_tree, hf_tcp_flags_res, tvb, offset + 12, 1, tcph->th_flags); proto_tree_add_boolean(field_tree, hf_tcp_flags_ns, tvb, offset + 12, 1, tcph->th_flags); |