TIOCOUTQ ioctl for non-blocking socket

Steven Elkins sgelkins at gmail.com
Fri Sep 2 06:50:10 PDT 2005


Hello everyone,

I have to port some non-blocking socket output code from Linux to
FreeBSD and I'm wondering how far I need to go to overcome a problem. 
On Linux this code puts the amount of data waiting in the socket's
transmit queue into 'remaining'.

   int remaining = 0;
   int rc = ioctl(fileDescriptor, TIOCOUTQ, &remaining);

Testing rc on FreeBSD and printing errno, I see...

   ioctl: 45 Operation not supported

Is there another way to ask the question on FreeBSD?  Or should I be
changing the non-blocking socket output design?

Thanks,
Steve


More information about the freebsd-questions mailing list