I am interested in getting congestion window size of a connection. The connection is created by another program. I am hoping that we can get this congestion window size using some file in proc, or, there is a call to get this info from kernel...
So I need more leads on any of those approaches ...
If you are on Linux, you can use
getsockopt()on the socket using theIPPROTO_TCPsocket level andTCP_INFOsocket option.The
struct tcp_infostructure has the membertcpi_snd_cwnd. A fairly extensive write up can be found here.FreeBSD also has a similar feature.
Windows provides congestion window information with the
GetPerTcpConnectionEStats()call usingTcpConnectionEstatsSndCongas the stats type.