回答:
ハンチ:
$ grep -A 2 initcwnd `find /usr/src/linux/include -type f -iname '*h'`
アウト:
/usr/src/linux/include/net/tcp.h:
/* TCP initial congestion window as per draft-hkchu-tcpm-initcwnd-01 */
#define TCP_INIT_CWND 10
まあ、私はこれが答えであるべきだと100%確信しているとは言えません、しばしば来るので、ssいくつかの情報を明らかにするための良い選択です、例えば:
ss -nli|fgrep cwnd
westwood rto:1000 mss:536 cwnd:10
westwood rto:1000 mss:536 cwnd:10
westwood rto:1000 mss:536 cwnd:10
-n煩わしいDNS解決を取り除くのが一般的です。-lリスニングソケットのみに固執し、-i(キー)は「内部TCP情報を表示する」です。ご覧のとおり、輻輳アルゴリズムとデフォルトのcwndの両方が表示されています。
私が正しく理解していればsnd_cwnd、TCPソケットが初期化されたときに設定されたパラメーターの初期値を探しています。
Linuxカーネルから始まったようです。2.6.39マクロTCP_INIT_CWNDはlinux / include / net / tcp.hに導入されておりsnd_cwnd、TCPソケットを初期化するときにの値を入力します。
私はこのコードがのカーネルのどこにあるかを知っていますが、IPv4残念ながらそれより古いカーネルの値を設定するためにマクロを使用していないようです2.6.39
/* net/ipv4/tcp_ipv4.c from 2.6.37 kernel */
static int tcp_v4_init_sock(struct sock *sk)
{
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
....
....
....
/* So many TCP implementations out there (incorrectly) count the
* initial SYN frame in their delayed-ACK and congestion control
* algorithms that we must have the following bandaid to talk
* efficiently to them. -DaveM
*/
tp->snd_cwnd = 2;
....
....
....
}
同様のinitコードが関数内にIPv6も存在しtcp_v6_init_sock()ますnet/ipv6/tcp_ipv6.c