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


In reply to Re^2: Scaled TCP window with Net::RawIP by Martynas
in thread Scaled TCP window with Net::RawIP by Martynas

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.