lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 26 Feb 2007 18:33:50 +0100
From:	Michael Faber <>
Subject: tcp_info struct


i want to use the tcp_info struct to keep track of some tcp related
information. This works fine so far, however i'm wondering how to
interpret some of the values delivered. I would expect values like cwnd
and sst to be given out in packets regarding the source code. Can anyone
give me some hints in interpreting the tcp_info values as this option is
very poor documented and only documentation on how to fill the tcp_info
struct can be found.

Below are some values i got out of the tcp_info structure with the tcp
connection in state 8 and the code snippet which uses the tcp_struct.
Especially the SND_MSS (i would expect this to be 1460) and the ssthresh
value are strange.

RTOs = 0, 0WProbes = 0, Backoffs = 0
RTO = 204 msec, RTT = 7 msec, RTT_var = 3 msec
lost packets = 0, sacked packets = 0, retransmitted packets = 1
SND_MSS = 16384, RCV_MSS = 536, ssthresh = 65535, cwnd = 13

struct tcp_info info;

int optlen=sizeof(struct tcp_info);

if(getsockopt(socket_fd, IPPROTO_TCP, TCP_INFO, &info, &optlen) < 0){
       // Error Handling
printf("RTOs = %u, 0WProbes = %u, Backoffs = %u\n\
            RTO = %u msec, RTT = %u msec, RTT_var = %u msec\n\
            lost packets = %u, sacked packets = %u, retransmitted
packets = %u\n\
            SND_MSS = %u, RCV_MSS = %u, ssthresh = %u, cwnd = %u \n\n",
            info.tcpi_retransmits, info.tcpi_probes, info.tcpi_backoff,
            (info.tcpi_rto/1000), (info.tcpi_rtt/1000),
             info.tcpi_lost, info.tcpi_sacked, info.tcpi_total_retrans,
            info.tcpi_snd_mss, info.tcpi_rcv_mss,
info.tcpi_snd_ssthresh, info.tcpi_snd_cwnd);


To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists