Re: RFC: per-socket statistics on received/dropped packets

From: Pekka Pietikäinen (
Date: Sun Jun 09 2002 - 09:47:40 EST

On Sat, Jun 08, 2002 at 05:05:11PM -0400, Mark Mielke wrote:
> Datagram sockets are more straight forward to implement this for, but
> that does not mean that TCP/IP does not have similar potential.
> I am not certain what the exact requirement is for in Chris' cases,
> but I do know that in his field, he is writing something far more
> complicated and resource intensive than a telnet server.
Have you guys checked out if the TCP_INFO getsockopt() would
work for your needs? (obviously, it'll only work for TCP connections
). It gives you quite a bit of detail about what's happening
in your TCP connection (retransmissions, window sizes etc.).

  printf("unacked: %d sacked: %d lost: %d retrans: %d fackets: %d\n",
  printf("pmtu: %d rcv_ssthresh: %d rtt: %d rttvar: %d snd_ssthresh:
%d\nsnd_cwnd: %d advmss:
%d reordering: %d\n",info.tcpi_pmtu,info.tcpi_rcv_ssthresh,

M.Sc. (Eng.) Pekka Pietikainen, Nixu Oy

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:14 EST