aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tcp.c
diff options
context:
space:
mode:
authorsfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7>2010-09-10 16:33:46 +0000
committersfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7>2010-09-10 16:33:46 +0000
commita4aad1f7b0f68c57bbe44f63b9a5376fe1d04c41 (patch)
treebd515b2cc7b45ec4728884531fa349cac288b36f /epan/dissectors/packet-tcp.c
parent4862b3baaeeee1a810ae32e418127107c7c862b7 (diff)
Put the ": %u (multiply by %u)" back on the TCP window scaling option, so
users don't have to expand the tree to see the details that were there before rev 34094. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34096 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-tcp.c')
-rw-r--r--epan/dissectors/packet-tcp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index 2f20772c57..369ac52c8c 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -2160,14 +2160,14 @@ static void
dissect_tcpopt_wscale(const ip_tcp_opt *optp _U_, tvbuff_t *tvb,
int offset, guint optlen _U_, packet_info *pinfo, proto_tree *opt_tree)
{
- guint8 shift;
+ guint8 val, shift;
proto_item *wscale_pi, *gen_pi;
proto_tree *wscale_tree;
struct tcp_analysis *tcpd=NULL;
tcpd=get_tcp_conversation_data(NULL,pinfo);
- wscale_pi = proto_tree_add_text(opt_tree, tvb, offset, 3, "Window scale");
+ wscale_pi = proto_tree_add_text(opt_tree, tvb, offset, 3, "Window scale: ");
wscale_tree = proto_item_add_subtree(wscale_pi, ett_tcp_option_wscale);
proto_tree_add_item(wscale_tree, hf_tcp_option_kind, tvb, offset, 1, ENC_NA);
@@ -2178,11 +2178,14 @@ dissect_tcpopt_wscale(const ip_tcp_opt *optp _U_, tvbuff_t *tvb,
proto_tree_add_item(wscale_tree, hf_tcp_option_wscale_shift, tvb, offset, 1,
ENC_NA);
-
shift = tvb_get_guint8(tvb, offset);
+
gen_pi = proto_tree_add_uint(wscale_tree, hf_tcp_option_wscale_multiplier, tvb,
offset, 1, 1 << shift);
PROTO_ITEM_SET_GENERATED(gen_pi);
+ val = tvb_get_guint8(tvb, offset);
+
+ proto_item_append_text(wscale_pi, "%u (multiply by %u)", val, 1 << shift);
tcp_info_append_uint(pinfo, "WS", 1 << shift);