Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_stacks/rack.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 9,564 Lines • ▼ Show 20 Lines | #endif | ||||
/* | /* | ||||
* According to RFC1323 the window field in a SYN (i.e., a <SYN> or | * According to RFC1323 the window field in a SYN (i.e., a <SYN> or | ||||
* <SYN,ACK>) segment itself is never scaled. The <SYN,ACK> case is | * <SYN,ACK>) segment itself is never scaled. The <SYN,ACK> case is | ||||
* handled in syncache. | * handled in syncache. | ||||
*/ | */ | ||||
if (flags & TH_SYN) | if (flags & TH_SYN) | ||||
th->th_win = htons((u_short) | th->th_win = htons((u_short) | ||||
(min(sbspace(&so->so_rcv), TCP_MAXWIN))); | (min(sbspace(&so->so_rcv), TCP_MAXWIN))); | ||||
else | else { | ||||
recwin = roundup2(recwin, 1 << tp->rcv_scale); | |||||
th->th_win = htons((u_short)(recwin >> tp->rcv_scale)); | th->th_win = htons((u_short)(recwin >> tp->rcv_scale)); | ||||
} | |||||
/* | /* | ||||
* Adjust the RXWIN0SENT flag - indicate that we have advertised a 0 | * Adjust the RXWIN0SENT flag - indicate that we have advertised a 0 | ||||
* window. This may cause the remote transmitter to stall. This | * window. This may cause the remote transmitter to stall. This | ||||
* flag tells soreceive() to disable delayed acknowledgements when | * flag tells soreceive() to disable delayed acknowledgements when | ||||
* draining the buffer. This can occur if the receiver is | * draining the buffer. This can occur if the receiver is | ||||
* attempting to read more data than can be buffered prior to | * attempting to read more data than can be buffered prior to | ||||
* transmitting on the connection. | * transmitting on the connection. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 995 Lines • Show Last 20 Lines |