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@ugrad.unimelb.edu.au
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux