Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^5: Scaled TCP window with Net::RawIP

by Illuminatus (Curate)
on Mar 03, 2011 at 00:37 UTC ( [id://891137]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Scaled TCP window with Net::RawIP
in thread Scaled TCP window with Net::RawIP

All packets in the session after the S-S/A assume the negotiated scale for their direction. OK, so 262144/8 = 32768. That's the correct window value, assuming you are still signaling a complete window. This is also assuming you are sending the ack from the same direction as the S/A. If you are sending it from the other direction, you use the wscale advertised by the SYN (if it was different). I am still confused on how you plan to 'insert' this ack into the session. The receiving stack is going to generate acks for all data received. How are you going to decide the sequence number to acknowledge?

fnord

  • Comment on Re^5: Scaled TCP window with Net::RawIP

Replies are listed 'Best First'.
Re^6: Scaled TCP window with Net::RawIP
by Martynas (Initiate) on Mar 03, 2011 at 07:20 UTC

    I am trying to generate last A packet in S-S/A-A sequence. I get sequence numbers from S/A packet, also can get wscale value. And send back as an answer A packet with scaled window, just have no idea how to scale window using NET::RawIP.

    But I guess I am looking more for an advice how to use/set required packet options with RawIP especially ones related with window scaling instead of analysis of the packet flow.

    Thanks for any ideas about how to generate such packet.

    Martynas

      Ok, case can be closed. :) It is really not set in any further packets and taken from last S/A packet. I amnaged to get what I want, so question is not valid. For the ones who want set Window scale - option 3 shall be used in any packet with S flag. Below example is scaling factor 4, right window size still shall be set with set command.

      $packet->optset(tcp=> { type => [(3)], data => [("\x04",)],});

      I appreciate all provided comments about the case and thanks to the ones who answered

      Martynas

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://891137]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2024-04-24 12:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found