aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Fisher <steve@stephen-fisher.com>2010-09-10 16:33:46 +0000
committerStephen Fisher <steve@stephen-fisher.com>2010-09-10 16:33:46 +0000
commit0e0641f079b1ce428a4d0d70e83620e2b9b1177a (patch)
treebd515b2cc7b45ec4728884531fa349cac288b36f
parentf2e2be709a08afd8a1d6149805bca5c800fb4ff7 (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. svn path=/trunk/; revision=34096
-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);