July 5th, 2006


getting unacked packet count, current seq number, etc....

Dear Lazyweb,

I'm interesting in obtaining, in userspace, the number of unacked sequence numbers (and ideally the last/last acked sequence numbers themselves) for a given (TCP) socket.

With Linux I can do this, partially at least (only the unacked count), using getsockopt TCP_INFO and getting back a struct tcp_info from /usr/include/linux/net.h.

Couple questions:

1) is there another way on Linux that might give me more info, short of libpcap'ing my own connection? Ideally I'd like the sequence numbers themselves, not just the unacked count.

2) is there a library to do this portable on different operating systems?

3) if not 2, how do I do this on $YOUR_OS so I can write a library.


Collapse )