views:

208

answers:

1

Linux has ioctl SIOCOUTQ described in man-page tcp(7) that returns amount of unsent data in socket buffers. If I understand kernel code right, all the non-ACKed data is counted as "unsent". The ioctl is available at least since 2.4.x.

Is there anything alike for {Free,Net,Open,*}BSD, Solaris, Windows?

A: 

Since TCP/IP is implemented as a stream device, it might be possible to take a kernel dive and get the queue->q_count (number of bytes on the queue).

Twelvestring
Of course it's possible to patch kernel and get required information. I was wondering about some existing API.
darkk