window scaling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux