TCP Advertised Windows and Shift Counts

When the connection is set up, each end tells the other what shift count to use on its advertised window. In other words, suppose A & B are communicating on a TCP link, and B is the server. Then at connection establishment,

  1. A sends B a SYN along with the shift count to be associated with A's advertised window, say, a.
  2. B responds with a SYN+ACK and a shift count to be associated with B's advertised window, say b.

So, for the life of the connection, whenever B receives an advertised window from A, which happens whenever A acknowledges a segment it's received from B, it shifts the value left a bits. This means the window size is 16+a bit number. The high 16 bits are the value of the advertised window field, and the low a bits are all zero.

Whenever A receives an advertised window value from B, it shifts the value left b bits. Effectively, B's advertised window field is 16+b bits, a 16 bit value with b zeros appended.

From here one can go

, Jeff Martens