netdev
[Top] [All Lists]

window scaling

To: linux-net@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
Subject: window scaling
From: a.ranu@xxxxxxxxxxxxxxxxxxxx
Date: Wed, 08 Oct 2003 17:03:27 +1000
Sender: netdev-bounce@xxxxxxxxxxx
hi...

i am writing a module that modifies the advertised window in every outgoing 
packet with the help of ip connection tracking, if it is larger than the 
window i calculated (say x - not scaled, just in bytes)

would the following code be correct?

x_scaled = x >> (*pskb)->sk->tp_pinfo.af_tcp.rcv_wscale;
window_already_in_pkt = ntohs((*pskb)->h.th->window);

if (window_already_in_pkt > x_scaled)
        tcph->window = x_scaled;

a reply would be really appreciated

Asmeet.






-- 
a.ranu@xxxxxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>
  • window scaling, a . ranu <=