in reply to Re: Scaled TCP window with Net::RawIP
in thread Scaled TCP window with Net::RawIP
That is what I am trying to set - window to some value like for example 65535 and scaling factor via TCP option 3. However must be somthing still missing as scaling is usualy negotiated only in packets that have S flag. I do not catch how window size shgall be adjusted for specific scaling factor for ACK packet - like giving window size and telling that this is scaling factor to be used.
When I play with TCP option 3 I tried various values as scaling factor, looks like there must be more fancy setup or something is not working as my window size remains as set in window with no scaling (according Wireshark).
$packet = new Net::RawIP({tcp => {}}); $packet->set({ip=> {saddr=>$srcip, daddr=>$dstip, frag_off=>0, tos=>0 +, id=>int rand 50000}, tcp=> {source=>$sport, dest=>$dport, syn=>0, ack=>1, win +dow=> 65535, ack_seq=>++$his_seq, seq=>++$my_seq,}}); $packet->optset(tcp=> { type => [(3)], data => [(2)],});
Updating with tcpdump output - win is 65535, wscale is 0, eol is set (?).
13:53:56.892099 IP (tos 0x0, ttl 64, id 46408, offset 0, flags none, proto: TCP (6), length: 44) xx.yy.zz.yy.64570 > zz.yy.xx.ww.9876: ., cksum 0xce9f (correct), ack 1 win 65535 <wscale 0,eol>
Martynas
|
|---|