
streamio(7I) Ioctl Requests SunOS 5.5
I_PEEK returns 1 if a message was retrieved, and returns 0 if no message
was found on the stream head read queue. It does not wait for a mes-
sage to arrive. On return, ctlbuf specifies information in the control
buffer, databuf specifies information in the data buffer, and flags con-
tains the valueRS_HIPRI or 0. On failure, errno is set to the following
value:
EFAULT arg points, or the buffer area specified in ctlbuf or data-
buf is, outside the allocated address space.
EBADMSG Queued message to be read is not valid for I_PEEK.
EINVAL Illegal value for flags.
I_SRDOPT Sets the read mode (see read(2)) using the value of the argument arg.
Legal arg values are:
RNORM Byte-stream mode, the default.
RMSGD Message-discard mode.
RMSGN Message-nondiscard mode.
In addition, the stream head’s treatment of control messages may be
changed by setting the following flags in arg:
RPROTNORM Reject read() with EBADMSG if a control message is at
the front of the stream head read queue.
RPROTDAT Deliver the control portion of a message as data when a
user issues read(). This is the default behavior.
RPROTDIS Discard the control portion of a message, delivering
any data portion, when a user issues a read().
On failure, errno is set to the following value:
EINVAL arg is not one of the above legal values.
I_GRDOPT Returns the current read mode setting in an int pointed to by the argu-
ment arg. Read modes are described in read(). On failure, errno is set
to the following value:
EFAULT arg points outside the allocated address space.
I_NREAD 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 arg. The return value for the command is the number of
messages on the stream head read queue. For example, if zero is
returned in arg, but the ioctl return value is greater thanzero, this indi-
cates that a zero-length message is next on the queue. On failure, errno
is set to the following value:
EFAULT arg points outside the allocated address space.
7I-330 modified 24 Jan 1995
Comentários a estes Manuais