This three-byte option may be sent in a SYN segment by a TCP (1) to indicate that it is prepared to do both send and receive window scaling, and (2) to communicate a scale factor to be applied to its receive window. The scale factor is encoded logarithmically, as a power of 2 (presumably to be implemented by binary shifts).
Note: the window in the SYN segment itself is never scaled.
TCP Window Scale Option: Kind: 3 +---------+---------+---------+ | Kind=3 |Length=3 |shift.cnt| +---------+---------+---------+
Here shift.cnt is the number of bits by which the receiver right- shifts the true receive-window value, to scale it into a 16-bit value to be sent in TCP header (this scaling is explained below). The value shift.cnt may be zero (offering to scale, while applying a scale factor of 1 to the receive window). This option is an offer, not a promise; both sides must send Window Scale options in their SYN segments to enable window scaling in either direction.