Is there a way in Linux to obtain the current dynamic window size of a TCP connection through API?

The current TCP window is the minimum of the Sender Congestion Window (snd_cwnd) and the Receiver Advertised Window (rcv_wnd). The Linux getsockopt (TCP_INFO) call returns a "struct tcp_info", which does include the snd_cwnd, but it doesn't contain the rcv_wnd info.

Any help is greatly appreciated!