Counts the number of data bytes in data blocks in the first message on the stream-head read queue, and places this value in a specified location.
The I_NREAD operation counts the number of data bytes in data blocks in the first message on the stream-head read queue, and places this value in the location pointed to by the arg parameter.
The return value for the operation is the number of messages on the stream-head read queue. For example, if a value of 0 is returned in the arg parameter, but the ioctl operation return value is greater than 0, this indicates that a zero-length message is next on the queue.
If unsuccessful, the errno global variable is set to the following value:
EFAULT | The arg parameter points outside the allocated address space. |
This operation is part of STREAMS Kernel Extensions.
The streamio operations.