If I understood you correctly, you're looking for the initial value of the snd_cwnd
parameter set when a TCP socket is initialized.
It looks like starting with linux kernel 2.6.39
, a macro TCP_INIT_CWND
has been introduced in linux/include/net/tcp.h which populates the value of snd_cwnd
when initializing a TCP socket.
I know where this code is in the kernel for IPv4
, and unfortunately it does not seem to use any macro to populate the value for kernels older than 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;
....
....
....
}
A similar init code exists for IPv6
as well inside tcp_v6_init_sock()
function in net/ipv6/tcp_ipv6.c