STREAMS-UX Programmer's Guide (February 2007)

STREAMS IOCTL Commands
Overview
Appendix A
143
On failure, errno is set to the following value:
[EINVAL] The arg has an illegal value.
I_GETSIG
This command returns the events for which the calling process has registered to receive a SIGPOLL signal.
Events are returned as in arg bitmask as defined for the I_SETSIG command.
On failure, errno is set to one of the following values:
[EINVAL] User process is not registered to receive the SIGPOLL signal.
[EFAULT] The arg points outside the allocated address space.
I_GRDOPT
This command returns the current read mode setting in an int pointed to by the argument arg. Read modes
are described in read (2).
On failure, errno is set to the following value:
[EFAULT] The arg is pointing outside the allocated address space.
I_GWROPT
This command returns the current write mode setting, as described in I_SWROPT, in the int that is pointed to
by the argument arg.
I_LINK
This command connects two streams:
fildes File descriptor of the stream connected to the multiplexing driver.
arg File descriptor of the stream connected to another driver.
The stream designated by arg gets connected below the multiplexing driver. I_LINK requires the multiplexing
driver to send an acknowledgement message to the stream head regarding the linking operation. This call
returns a multiplexor ID number (an identifier used to disconnect the multiplexor, see I_UNLINK) on success,
and -1 on failure.
On failure, errno is set to one of the following values:
[EAGAIN] Temporarily unable to allocate storage to perform the linking operation.
[EBADF] The arg parameter, not a valid open file descriptor.
[ENXIO] A hangup was received on fildes.
[EINVAL] The stream referred to by fildes does not support multiplexing.
[EINVAL] The file referred to by arg is not a stream, or the stream is already linked under a
multiplexor.
[EINVAL] The link operation would cause a “cycle” in the resulting multiplexing configuration. In
other words, the driver referred to by the arg parameter is linked into this configuration at
multiple places
[ENOSR] Not enough STREAMS memory resources to allocate storage for this command.