summaryrefslogtreecommitdiff
path: root/usr/src/man/man7i/streamio.7i
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/man/man7i/streamio.7i')
-rw-r--r--usr/src/man/man7i/streamio.7i296
1 files changed, 1 insertions, 295 deletions
diff --git a/usr/src/man/man7i/streamio.7i b/usr/src/man/man7i/streamio.7i
index d28b82db7c..2b7e45629b 100644
--- a/usr/src/man/man7i/streamio.7i
+++ b/usr/src/man/man7i/streamio.7i
@@ -4,7 +4,7 @@
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH streamio 7I "8 Apr 2009" "SunOS 5.11" "Ioctl Requests"
+.TH STREAMIO 7I "Apr 8, 2009"
.SH NAME
streamio \- STREAMS ioctl commands
.SH SYNOPSIS
@@ -52,12 +52,10 @@ The following \fBioctl\fR commands, with error values indicated, are applicable
to all STREAMS files:
.sp
.ne 2
-.mk
.na
\fB\fBI_PUSH\fR\fR
.ad
.RS 15n
-.rt
Pushes the module whose name is pointed to by \fIarg\fR onto the top of the
current stream, just below the STREAM head. If the STREAM is a pipe, the module
will be inserted between the stream heads of both ends of the pipe. It then
@@ -65,56 +63,46 @@ calls the open routine of the newly-pushed module. On failure, \fBerrno\fR is
set to one of the following values:
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 11n
-.rt
Invalid module name.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEFAULT\fR\fR
.ad
.RS 11n
-.rt
\fIarg\fR points outside the allocated address space.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBENXIO\fR\fR
.ad
.RS 11n
-.rt
Open routine of new module failed.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBENXIO\fR\fR
.ad
.RS 11n
-.rt
Hangup received on \fIfildes\fR.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBENOTSUP\fR\fR
.ad
.RS 11n
-.rt
Pushing a module is not supported on this stream.
.RE
@@ -122,12 +110,10 @@ Pushing a module is not supported on this stream.
.sp
.ne 2
-.mk
.na
\fB\fBI_POP\fR\fR
.ad
.RS 15n
-.rt
Removes the module just below the STREAM head of the STREAM pointed to by
\fIfildes\fR. To remove a module from a pipe requires that the module was
pushed on the side it is being removed from. \fIarg\fR should be \fB0\fR in an
@@ -135,45 +121,37 @@ pushed on the side it is being removed from. \fIarg\fR should be \fB0\fR in an
values:
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 11n
-.rt
No module present in the stream.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBENXIO\fR\fR
.ad
.RS 11n
-.rt
Hangup received on \fIfildes\fR.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEPERM\fR\fR
.ad
.RS 11n
-.rt
Attempt to pop through an anchor by an unprivileged process.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBENOTSUP\fR\fR
.ad
.RS 11n
-.rt
Removal is not supported.
.RE
@@ -181,24 +159,20 @@ Removal is not supported.
.sp
.ne 2
-.mk
.na
\fB\fBI_ANCHOR\fR\fR
.ad
.RS 15n
-.rt
Positions the stream anchor to be at the stream's module directly below the
stream head. Once this has been done, only a privileged process may pop modules
below the anchor on the stream. \fIarg\fR must be \fB0\fR in an \fBI_ANCHOR\fR
request. On failure, \fBerrno\fR is set to the following value:
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
Request to put an anchor on a pipe.
.RE
@@ -206,12 +180,10 @@ Request to put an anchor on a pipe.
.sp
.ne 2
-.mk
.na
\fB\fBI_LOOK\fR\fR
.ad
.RS 15n
-.rt
Retrieves the name of the module just below the stream head of the stream
pointed to by \fIfildes\fR, and places it in a null terminated character string
pointed at by \fIarg\fR. The buffer pointed to by \fIarg\fR should be at least
@@ -219,23 +191,19 @@ pointed at by \fIarg\fR. The buffer pointed to by \fIarg\fR should be at least
<sys/conf.h>\fR. On failure, \fBerrno\fR is set to one of the following values:
.sp
.ne 2
-.mk
.na
\fB\fBEFAULT\fR\fR
.ad
.RS 10n
-.rt
\fIarg\fR points outside the allocated address space.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
No module present in stream.
.RE
@@ -243,44 +211,36 @@ No module present in stream.
.sp
.ne 2
-.mk
.na
\fB\fBI_FLUSH\fR\fR
.ad
.RS 15n
-.rt
This request flushes all input and/or output queues, depending on the value of
\fIarg\fR. Legal \fIarg\fR values are:
.sp
.ne 2
-.mk
.na
\fBFLUSHR\fR
.ad
.RS 11n
-.rt
Flush read queues.
.RE
.sp
.ne 2
-.mk
.na
\fBFLUSHW\fR
.ad
.RS 11n
-.rt
Flush write queues.
.RE
.sp
.ne 2
-.mk
.na
\fBFLUSHRW\fR
.ad
.RS 11n
-.rt
Flush read and write queues.
.RE
@@ -306,35 +266,29 @@ pipe so that it is at the midpoint of the pipe itself.
On failure, \fBerrno\fR is set to one of the following values:
.sp
.ne 2
-.mk
.na
\fB\fBENOSR\fR\fR
.ad
.RS 10n
-.rt
Unable to allocate buffers for flush message due to insufficient stream memory
resources.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
Invalid \fIarg\fR value.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBENXIO\fR\fR
.ad
.RS 10n
-.rt
Hangup received on \fIfildes\fR.
.RE
@@ -342,12 +296,10 @@ Hangup received on \fIfildes\fR.
.sp
.ne 2
-.mk
.na
\fB\fBI_FLUSHBAND\fR\fR
.ad
.RS 15n
-.rt
Flushes a particular band of messages. \fIarg\fR points to a \fBbandinfo\fR
structure that has the following members:
.sp
@@ -364,12 +316,10 @@ The \fBbi_flag\fR field may be one of \fBFLUSHR\fR, \fBFLUSHW\fR, or
.sp
.ne 2
-.mk
.na
\fB\fBI_SETSIG\fR\fR
.ad
.RS 15n
-.rt
Informs the stream head that the user wishes the kernel to issue the
\fBSIGPOLL\fR signal (see \fBsignal\fR(3C)) when a particular event has
occurred on the stream associated with \fIfildes\fR. \fBI_SETSIG\fR supports an
@@ -378,12 +328,10 @@ bitmask that specifies the events for which the user should be signaled. It is
the bitwise OR of any combination of the following constants:
.sp
.ne 2
-.mk
.na
\fB\fBS_INPUT\fR\fR
.ad
.RS 13n
-.rt
Any message other than an \fBM_PCPROTO\fR has arrived on a stream head read
queue. This event is maintained for compatibility with previous releases. This
event is triggered even if the message is of zero length.
@@ -391,71 +339,59 @@ event is triggered even if the message is of zero length.
.sp
.ne 2
-.mk
.na
\fB\fBS_RDNORM\fR\fR
.ad
.RS 13n
-.rt
An ordinary (non-priority) message has arrived on a stream head read queue.
This event is triggered even if the message is of zero length.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBS_RDBAND\fR\fR
.ad
.RS 13n
-.rt
A priority band message (band > 0) has arrived on a stream head read queue.
This event is triggered even if the message is of zero length.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBS_HIPRI\fR\fR
.ad
.RS 13n
-.rt
A high priority message is present on the stream head read queue. This event is
triggered even if the message is of zero length.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBS_OUTPUT\fR\fR
.ad
.RS 13n
-.rt
The write queue just below the stream head is no longer full. This notifies the
user that there is room on the queue for sending (or writing) data downstream.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBS_WRNORM\fR\fR
.ad
.RS 13n
-.rt
This event is the same as \fBS_OUTPUT\fR.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBS_WRBAND\fR\fR
.ad
.RS 13n
-.rt
A priority band greater than 0 of a queue downstream exists and is writable.
This notifies the user that there is room on the queue for sending (or writing)
priority data downstream.
@@ -463,46 +399,38 @@ priority data downstream.
.sp
.ne 2
-.mk
.na
\fB\fBS_MSG\fR\fR
.ad
.RS 13n
-.rt
A STREAMS signal message that contains the \fBSIGPOLL\fR signal has reached the
front of the stream head read queue.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBS_ERROR\fR\fR
.ad
.RS 13n
-.rt
An \fBM_ERROR\fR message has reached the stream head.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBS_HANGUP\fR\fR
.ad
.RS 13n
-.rt
An \fBM_HANGUP\fR message has reached the stream head.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBS_BANDURG\fR\fR
.ad
.RS 13n
-.rt
When used in conjunction with \fBS_RDBAND\fR, \fBSIGURG\fR is generated instead
of \fBSIGPOLL\fR when a priority message reaches the front of the stream head
read queue.
@@ -521,24 +449,20 @@ will not receive further \fBSIGPOLL\fR signals. On failure, \fBerrno\fR is set
to one of the following values:
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
\fIarg\fR value is invalid or \fIarg\fR is zero and process is not registered
to receive the \fBSIGPOLL\fR signal.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEAGAIN\fR\fR
.ad
.RS 10n
-.rt
Allocation of a data structure to store the signal request failed.
.RE
@@ -546,12 +470,10 @@ Allocation of a data structure to store the signal request failed.
.sp
.ne 2
-.mk
.na
\fB\fBI_GETSIG\fR\fR
.ad
.RS 15n
-.rt
Returns the events for which the calling process is currently registered to be
sent a \fBSIGPOLL\fR signal. The events are returned as a bitmask pointed to
by \fIarg\fR, where the events are those specified in the description of
@@ -559,23 +481,19 @@ by \fIarg\fR, where the events are those specified in the description of
values:
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
Process not registered to receive the \fBSIGPOLL\fR signal.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEFAULT\fR\fR
.ad
.RS 10n
-.rt
\fIarg\fR points outside the allocated address space.
.RE
@@ -583,35 +501,29 @@ Process not registered to receive the \fBSIGPOLL\fR signal.
.sp
.ne 2
-.mk
.na
\fB\fBI_FIND\fR\fR
.ad
.RS 15n
-.rt
Compares the names of all modules currently present in the stream to the name
pointed to by \fIarg\fR, and returns 1 if the named module is present in the
stream. It returns 0 if the named module is not present. On failure,
\fBerrno\fR is set to one of the following values:
.sp
.ne 2
-.mk
.na
\fB\fBEFAULT\fR\fR
.ad
.RS 10n
-.rt
\fIarg\fR points outside the allocated address space.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
\fIarg\fR does not contain a valid module name.
.RE
@@ -619,12 +531,10 @@ stream. It returns 0 if the named module is not present. On failure,
.sp
.ne 2
-.mk
.na
\fB\fBI_PEEK\fR\fR
.ad
.RS 15n
-.rt
Allows a user to retrieve the information in the first message on the stream
head read queue without taking the message off the queue. \fBI_PEEK\fR is
analogous to \fBgetmsg\fR(2) except that it does not remove the message from
@@ -654,46 +564,38 @@ contains the value \fBRS_HIPRI\fR or \fB0\fR. On failure, \fBerrno\fR is set to
the following value:
.sp
.ne 2
-.mk
.na
\fB\fBEFAULT\fR\fR
.ad
.RS 11n
-.rt
\fIarg\fR points, or the buffer area specified in \fBctlbuf\fR or \fBdatabuf\fR
is, outside the allocated address space.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEBADMSG\fR\fR
.ad
.RS 11n
-.rt
Queued message to be read is not valid for \fBI_PEEK\fR.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 11n
-.rt
Illegal value for \fBflags\fR.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBENOSR\fR\fR
.ad
.RS 11n
-.rt
Unable to allocate buffers to perform the I_PEEK due to insufficient STREAMS
memory resources.
.RE
@@ -702,44 +604,36 @@ memory resources.
.sp
.ne 2
-.mk
.na
\fB\fBI_SRDOPT\fR\fR
.ad
.RS 15n
-.rt
Sets the read mode (see \fBread\fR(2)) using the value of the argument
\fIarg\fR. Legal \fIarg\fR values are:
.sp
.ne 2
-.mk
.na
\fBRNORM\fR
.ad
.RS 9n
-.rt
Byte-stream mode, the default.
.RE
.sp
.ne 2
-.mk
.na
\fBRMSGD\fR
.ad
.RS 9n
-.rt
Message-discard mode.
.RE
.sp
.ne 2
-.mk
.na
\fBRMSGN\fR
.ad
.RS 9n
-.rt
Message-nondiscard mode.
.RE
@@ -747,36 +641,30 @@ In addition, the stream head's treatment of control messages may be changed by
setting the following flags in \fIarg\fR:
.sp
.ne 2
-.mk
.na
\fBRPROTNORM\fR
.ad
.RS 13n
-.rt
Reject \fBread()\fR with \fBEBADMSG\fR if a control message is at the front of
the stream head read queue.
.RE
.sp
.ne 2
-.mk
.na
\fBRPROTDAT\fR
.ad
.RS 13n
-.rt
Deliver the control portion of a message as data when a user issues
\fBread()\fR. This is the default behavior.
.RE
.sp
.ne 2
-.mk
.na
\fBRPROTDIS\fR
.ad
.RS 13n
-.rt
Discard the control portion of a message, delivering any data portion, when a
user issues a \fBread\fR(\|).
.RE
@@ -784,12 +672,10 @@ user issues a \fBread\fR(\|).
On failure, \fBerrno\fR is set to the following value:
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
\fIarg\fR is not one of the above legal values, or \fIarg\fR is the bitwise
inclusive \fBOR\fR of \fBRMSGD\fR and \fBRMSGN\fR.
.RE
@@ -798,23 +684,19 @@ inclusive \fBOR\fR of \fBRMSGD\fR and \fBRMSGN\fR.
.sp
.ne 2
-.mk
.na
\fB\fBI_GRDOPT\fR\fR
.ad
.RS 15n
-.rt
Returns the current read mode setting in an \fBint\fR pointed to by the
argument \fIarg\fR. Read modes are described in \fBread\fR(\|). On failure,
\fBerrno\fR is set to the following value:
.sp
.ne 2
-.mk
.na
\fB\fBEFAULT\fR\fR
.ad
.RS 10n
-.rt
\fIarg\fR points outside the allocated address space.
.RE
@@ -822,12 +704,10 @@ argument \fIarg\fR. Read modes are described in \fBread\fR(\|). On failure,
.sp
.ne 2
-.mk
.na
\fB\fBI_NREAD\fR\fR
.ad
.RS 15n
-.rt
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
\fIarg\fR. The return value for the command is the number of messages on the
@@ -837,12 +717,10 @@ zero-length message is next on the queue. On failure, \fBerrno\fR is set to the
following value:
.sp
.ne 2
-.mk
.na
\fB\fBEFAULT\fR\fR
.ad
.RS 10n
-.rt
\fIarg\fR points outside the allocated address space.
.RE
@@ -850,12 +728,10 @@ following value:
.sp
.ne 2
-.mk
.na
\fB\fBI_FDINSERT\fR\fR
.ad
.RS 15n
-.rt
Creates a message from specified buffer(s), adds information about another
stream and sends the message downstream. The message contains a control part
and an optional data part. The data and control parts to be sent are
@@ -902,12 +778,10 @@ partial message is sent.
The \fBioctl()\fR function with the \fBI_FDINSERT\fR command will fail if:
.sp
.ne 2
-.mk
.na
\fB\fBEAGAIN\fR\fR
.ad
.RS 10n
-.rt
A non-priority message is specified, the \fBO_NDELAY\fR or \fBO_NONBLOCK\fR
flag is set, and the stream write queue is full due to internal flow control
conditions.
@@ -915,35 +789,29 @@ conditions.
.sp
.ne 2
-.mk
.na
\fB\fBENOSR\fR\fR
.ad
.RS 10n
-.rt
Buffers can not be allocated for the message that is to be created.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEFAULT\fR\fR
.ad
.RS 10n
-.rt
The \fIarg\fR argument points, or the buffer area specified in \fBctlbuf\fR or
\fBdatabuf\fR is, outside the allocated address space.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
One of the following: The \fBfildes\fR member of the \fBstrfdinsert\fR
structure is not a valid, open stream file descriptor; the size of a
\fBt_uscalar_t\fR plus \fBoffset\fR is greater than the \fBlen\fR member for
@@ -954,24 +822,20 @@ is stored in \fBflags\fR.
.sp
.ne 2
-.mk
.na
\fB\fBENXIO\fR\fR
.ad
.RS 10n
-.rt
Hangup received on the \fBfildes\fR argument of the \fBioctl\fR call or the
\fBfildes\fR member of the \fBstrfdinsert\fR structure.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBERANGE\fR\fR
.ad
.RS 10n
-.rt
The \fBlen\fR field for the buffer specified through \fBdatabuf\fR does not
fall within the range specified by the maximum and minimum packet sizes of the
topmost stream module; or the \fBlen\fR member for the buffer specified through
@@ -988,12 +852,10 @@ in the message.
.sp
.ne 2
-.mk
.na
\fB\fBI_STR\fR\fR
.ad
.RS 15n
-.rt
Constructs an internal \fBSTREAMS\fR ioctl message from the data pointed to by
\fIarg\fR, and sends that message downstream.
.sp
@@ -1043,24 +905,20 @@ structure to an internal \fBioctl\fR command message and send it downstream. On
failure, \fBerrno\fR is set to one of the following values:
.sp
.ne 2
-.mk
.na
\fB\fBENOSR\fR\fR
.ad
.RS 10n
-.rt
Unable to allocate buffers for the \fBioctl\fR message due to insufficient
STREAMS memory resources.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEFAULT\fR\fR
.ad
.RS 10n
-.rt
Either \fIarg\fR points outside the allocated address space, or the buffer area
specified by \fBic_dp\fR and \fBic_len\fR (separately for data sent and data
returned) is outside the allocated address space.
@@ -1068,12 +926,10 @@ returned) is outside the allocated address space.
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
\fBic_len\fR is less than 0 or \fBic_len\fR is larger than the maximum
configured size of the data part of a message or \fBic_timout\fR is less than
-1.
@@ -1081,23 +937,19 @@ configured size of the data part of a message or \fBic_timout\fR is less than
.sp
.ne 2
-.mk
.na
\fB\fBENXIO\fR\fR
.ad
.RS 10n
-.rt
Hangup received on \fIfildes\fR.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBETIME\fR\fR
.ad
.RS 10n
-.rt
A downstream \fBioctl\fR timed out before acknowledgement was received.
.RE
@@ -1110,22 +962,18 @@ in the event the ioctl command sent downstream fails. For these cases,
.sp
.ne 2
-.mk
.na
\fB\fBI_SWROPT\fR\fR
.ad
.RS 15n
-.rt
Sets the write mode using the value of the argument \fIarg\fR. Legal bit
settings for \fIarg\fR are:
.sp
.ne 2
-.mk
.na
\fB\fBSNDZERO\fR\fR
.ad
.RS 11n
-.rt
Send a zero-length message downstream when a write of 0 bytes occurs.
.RE
@@ -1135,12 +983,10 @@ not be set in \fIarg\fR.
On failure, \fBerrno\fR may be set to the following value:
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
\fIarg\fR is not the above legal value.
.RE
@@ -1148,24 +994,20 @@ On failure, \fBerrno\fR may be set to the following value:
.sp
.ne 2
-.mk
.na
\fB\fBI_GWROPT\fR\fR
.ad
.RS 15n
-.rt
Returns the current write mode setting, as described above, in the \fBint\fR
that is pointed to by the argument \fIarg\fR.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBI_SENDFD\fR\fR
.ad
.RS 15n
-.rt
Requests the stream associated with \fIfildes\fR to send a message, containing
a file pointer, to the stream head at the other end of a stream pipe. The file
pointer corresponds to \fIarg\fR, which must be an open file descriptor.
@@ -1178,58 +1020,48 @@ stream head at the other end of the stream pipe to which it is connected. On
failure, \fBerrno\fR is set to one of the following values:
.sp
.ne 2
-.mk
.na
\fB\fBEAGAIN\fR\fR
.ad
.RS 10n
-.rt
The sending stream is unable to allocate a message block to contain the file
pointer.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEAGAIN\fR\fR
.ad
.RS 10n
-.rt
The read queue of the receiving stream head is full and cannot accept the
message sent by \fBI_SENDFD.\fR
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEBADF\fR\fR
.ad
.RS 10n
-.rt
\fIarg\fR is not a valid, open file descriptor.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
\fIfildes\fR is not connected to a stream pipe.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBENXIO\fR\fR
.ad
.RS 10n
-.rt
Hangup received on \fIfildes\fR.
.RE
@@ -1237,12 +1069,10 @@ Hangup received on \fIfildes\fR.
.sp
.ne 2
-.mk
.na
\fB\fBI_RECVFD\fR\fR
.ad
.RS 15n
-.rt
Retrieves the file descriptor associated with the message sent by an
\fBI_SENDFD\fR \fBioctl\fR over a stream pipe. \fIarg\fR is a pointer to a data
buffer large enough to hold an \fBstrrecvfd\fR data structure containing the
@@ -1272,69 +1102,57 @@ pointed to by \fIarg\fR. On failure, \fBerrno\fR is set to one of the following
values:
.sp
.ne 2
-.mk
.na
\fB\fBEAGAIN\fR\fR
.ad
.RS 13n
-.rt
A message is not present at the stream head read queue, and the \fBO_NDELAY\fR
or \fBO_NONBLOCK\fR flag is set.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEBADMSG\fR\fR
.ad
.RS 13n
-.rt
The message at the stream head read queue is not a message containing a passed
file descriptor.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEFAULT\fR\fR
.ad
.RS 13n
-.rt
\fIarg\fR points outside the allocated address space.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEMFILE\fR\fR
.ad
.RS 13n
-.rt
\fBNOFILES\fR file descriptors are currently open.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBENXIO\fR\fR
.ad
.RS 13n
-.rt
Hangup received on \fIfildes\fR.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEOVERFLOW\fR\fR
.ad
.RS 13n
-.rt
\fIuid\fR or \fIgid\fR is too large to be stored in the structure pointed to by
\fIarg\fR.
.RE
@@ -1343,12 +1161,10 @@ Hangup received on \fIfildes\fR.
.sp
.ne 2
-.mk
.na
\fB\fBI_LIST\fR\fR
.ad
.RS 15n
-.rt
Allows the user to list all the module names on the stream, up to and including
the topmost driver name. If \fIarg\fR is \fINULL\fR, the return value is the
number of modules, including the driver, that are on the stream pointed to by
@@ -1383,23 +1199,19 @@ end of the stream is reached, or the number of requested modules
following values:
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
The \fBsl_nmods\fR member is less than 1.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEAGAIN\fR\fR
.ad
.RS 10n
-.rt
Unable to allocate buffers
.RE
@@ -1407,35 +1219,29 @@ Unable to allocate buffers
.sp
.ne 2
-.mk
.na
\fB\fBI_ATMARK\fR\fR
.ad
.RS 15n
-.rt
Allows the user to see if the current message on the stream head read queue is
``marked'' by some module downstream. \fIarg\fR determines how the checking is
done when there may be multiple marked messages on the stream head read queue.
It may take the following values:
.sp
.ne 2
-.mk
.na
\fB\fBANYMARK\fR\fR
.ad
.RS 12n
-.rt
Check if the message is marked.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBLASTMARK\fR\fR
.ad
.RS 12n
-.rt
Check if the message is the last one marked on the queue.
.RE
@@ -1443,12 +1249,10 @@ The return value is \fB1\fR if the mark condition is satisfied and \fB0\fR
otherwise. On failure, \fBerrno\fR is set to the following value:
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
Invalid \fIarg\fR value.
.RE
@@ -1456,12 +1260,10 @@ Invalid \fIarg\fR value.
.sp
.ne 2
-.mk
.na
\fB\fBI_CKBAND\fR\fR
.ad
.RS 15n
-.rt
Check if the message of a given priority band exists on the stream head read
queue. This returns \fB1\fR if a message of a given priority exists, \fB0\fR if
not, or \fB\(mi1\fR on error. \fIarg\fR should be an integer containing the
@@ -1469,12 +1271,10 @@ value of the priority band in question. On failure, \fBerrno\fR is set to the
following value:
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
Invalid \fIarg\fR value.
.RE
@@ -1482,23 +1282,19 @@ Invalid \fIarg\fR value.
.sp
.ne 2
-.mk
.na
\fB\fBI_GETBAND\fR\fR
.ad
.RS 15n
-.rt
Returns the priority band of the first message on the stream head read queue in
the integer referenced by \fIarg\fR. On failure, \fBerrno\fR is set to the
following value:
.sp
.ne 2
-.mk
.na
\fB\fBENODATA\fR\fR
.ad
.RS 11n
-.rt
No message on the stream head read queue.
.RE
@@ -1506,24 +1302,20 @@ No message on the stream head read queue.
.sp
.ne 2
-.mk
.na
\fB\fBI_CANPUT\fR\fR
.ad
.RS 15n
-.rt
Check if a certain band is writable. \fIarg\fR is set to the priority band in
question. The return value is \fB0\fR if the priority band \fIarg\fR is flow
controlled, \fB1\fR if the band is writable, or \fB\(mi1\fR on error. On
failure, \fBerrno\fR is set to the following value:
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
Invalid \fIarg\fR value.
.RE
@@ -1531,12 +1323,10 @@ Invalid \fIarg\fR value.
.sp
.ne 2
-.mk
.na
\fB\fBI_SETCLTIME\fR\fR
.ad
.RS 15n
-.rt
Allows the user to set the time the stream head will delay when a stream is
closing and there are data on the write queues. Before closing each module and
driver, the stream head will delay for the specified amount of time to allow
@@ -1549,12 +1339,10 @@ The default is fifteen seconds. On failure, \fBerrno\fR is set to the following
value:
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
Invalid \fIarg\fR value.
.RE
@@ -1562,23 +1350,19 @@ Invalid \fIarg\fR value.
.sp
.ne 2
-.mk
.na
\fB\fBI_GETCLTIME\fR\fR
.ad
.RS 15n
-.rt
Returns the close time delay in the integer pointed by \fIarg\fR.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBI_SERROPT\fR\fR
.ad
.RS 15n
-.rt
Sets the error mode using the value of the argument \fIarg\fR.
.sp
Normally stream head errors are persistent; once they are set due to an
@@ -1591,46 +1375,38 @@ controlled independently for read and write side errors. Legal \fIarg\fR values
are either none or one of:
.sp
.ne 2
-.mk
.na
\fB\fBRERRNORM\fR\fR
.ad
.RS 18n
-.rt
Persistent read errors, the default.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBRERRNONPERSIST\fR\fR
.ad
.RS 18n
-.rt
Non-persistent read errors.
.RE
\fBOR'ed\fR with either none or one of:
.sp
.ne 2
-.mk
.na
\fB\fBWERRNORM\fR\fR
.ad
.RS 18n
-.rt
Persistent write errors, the default.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBWERRNONPERSIST\fR\fR
.ad
.RS 18n
-.rt
Non-persistent write errors.
.sp
When no value is specified e.g. for the read side error behavior then the
@@ -1640,12 +1416,10 @@ behavior for that side will be left unchanged.
On failure, \fBerrno\fR is set to the following value:
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
\fIarg\fR is not one of the above legal values.
.RE
@@ -1653,23 +1427,19 @@ On failure, \fBerrno\fR is set to the following value:
.sp
.ne 2
-.mk
.na
\fB\fBI_GERROPT\fR\fR
.ad
.RS 15n
-.rt
Returns the current error mode setting in an \fBint\fR pointed to by the
argument \fIarg\fR. Error modes are described above for \fBI_SERROPT\fR. On
failure,\fBerrno\fR is set to the following value:
.sp
.ne 2
-.mk
.na
\fB\fBEFAULT\fR\fR
.ad
.RS 10n
-.rt
\fIarg\fR points outside the allocated address space.
.RE
@@ -1681,12 +1451,10 @@ The following four commands are used for connecting and disconnecting
multiplexed STREAMS configurations.
.sp
.ne 2
-.mk
.na
\fB\fBI_LINK\fR\fR
.ad
.RS 13n
-.rt
Connects two streams, where \fIfildes\fR is the file descriptor of the stream
connected to the multiplexing driver, and \fIarg\fR is the file descriptor of
the stream connected to another driver. The stream designated by \fIarg\fR gets
@@ -1697,90 +1465,74 @@ used to disconnect the multiplexor, see \fBI_UNLINK\fR) on success, and -1 on
failure. On failure, \fBerrno\fR is set to one of the following values:
.sp
.ne 2
-.mk
.na
\fB\fBENXIO\fR\fR
.ad
.RS 10n
-.rt
Hangup received on \fIfildes\fR.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBETIME\fR\fR
.ad
.RS 10n
-.rt
Time out before acknowledgement message was received at stream head.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEAGAIN\fR\fR
.ad
.RS 10n
-.rt
Temporarily unable to allocate storage to perform the \fBI_LINK.\fR
.RE
.sp
.ne 2
-.mk
.na
\fB\fBENOSR\fR\fR
.ad
.RS 10n
-.rt
Unable to allocate storage to perform the \fBI_LINK\fR due to insufficient
\fBSTREAMS\fR memory resources.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEBADF\fR\fR
.ad
.RS 10n
-.rt
\fIarg\fR is not a valid, open file descriptor.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
\fIfildes\fR stream does not support multiplexing.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
\fIarg\fR is not a stream, or is already linked under a multiplexor.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
The specified link operation would cause a ``cycle'' in the resulting
configuration; that is, a driver would be linked into the multiplexing
configuration in more than one place.
@@ -1788,23 +1540,19 @@ configuration in more than one place.
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
\fIfildes\fR is the file descriptor of a pipe or FIFO.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
Either the upper or lower stream has a major number >= the maximum major number
on the system.
.RE
@@ -1818,12 +1566,10 @@ returned in the positive or negative acknowledgement message. For these cases,
.sp
.ne 2
-.mk
.na
\fB\fBI_UNLINK\fR\fR
.ad
.RS 13n
-.rt
Disconnects the two streams specified by \fIfildes\fR and \fIarg\fR.
\fIfildes\fR is the file descriptor of the stream connected to the multiplexing
driver. \fIarg\fR is the multiplexor ID number that was returned by the
@@ -1833,58 +1579,48 @@ multiplexing driver to acknowledge the unlink. On failure, \fBerrno\fR is set
to one of the following values:
.sp
.ne 2
-.mk
.na
\fB\fBENXIO\fR\fR
.ad
.RS 10n
-.rt
Hangup received on \fIfildes\fR.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBETIME\fR\fR
.ad
.RS 10n
-.rt
Time out before acknowledgement message was received at stream head.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBENOSR\fR\fR
.ad
.RS 10n
-.rt
Unable to allocate storage to perform the \fBI_UNLINK\fR due to insufficient
STREAMS memory resources.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
\fIarg\fR is an invalid multiplexor ID number or \fIfildes\fR is not the stream
on which the \fBI_LINK\fR that returned \fIarg\fR was performed.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
\fIfildes\fR is the file descriptor of a pipe or FIFO.
.RE
@@ -1897,12 +1633,10 @@ returned in the positive or negative acknowledgement message. For these cases,
.sp
.ne 2
-.mk
.na
\fB\fBI_PLINK\fR\fR
.ad
.RS 13n
-.rt
Connects two streams, where \fIfildes\fR is the file descriptor of the stream
connected to the multiplexing driver, and \fIarg\fR is the file descriptor of
the stream connected to another driver. The stream designated by \fIarg\fR gets
@@ -1916,78 +1650,64 @@ disconnect the multiplexor, see \fBI_PUNLINK\fR) on success, and -1 on failure.
On failure, \fBerrno\fR is set to one of the following values:
.sp
.ne 2
-.mk
.na
\fB\fBENXIO\fR\fR
.ad
.RS 10n
-.rt
Hangup received on \fIfildes\fR.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBETIME\fR\fR
.ad
.RS 10n
-.rt
Time out before acknowledgement message was received at the stream head.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEAGAIN\fR\fR
.ad
.RS 10n
-.rt
Unable to allocate STREAMS storage to perform the \fBI_PLINK.\fR
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEBADF\fR\fR
.ad
.RS 10n
-.rt
\fIarg\fR is not a valid, open file descriptor.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
\fIfildes\fR does not support multiplexing.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
\fIarg\fR is not a stream or is already linked under a multiplexor.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
The specified link operation would cause a ``cycle'' in the resulting
configuration; that is, if a driver would be linked into the multiplexing
configuration in more than one place.
@@ -1995,12 +1715,10 @@ configuration in more than one place.
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
\fIfildes\fR is the file descriptor of a pipe or FIFO.
.RE
@@ -2013,12 +1731,10 @@ returned in the positive or negative acknowledgement message. For these cases,
.sp
.ne 2
-.mk
.na
\fB\fBI_PUNLINK\fR\fR
.ad
.RS 13n
-.rt
Disconnects the two streams specified by \fIfildes\fR and \fIarg\fR that are
connected with a persistent link. \fIfildes\fR is the file descriptor of the
stream connected to the multiplexing driver. \fIarg\fR is the multiplexor ID
@@ -2029,56 +1745,46 @@ command requires the multiplexing driver to acknowledge the unlink. On failure,
\fBerrno\fR is set to one of the following values:
.sp
.ne 2
-.mk
.na
\fB\fBENXIO\fR\fR
.ad
.RS 10n
-.rt
Hangup received on \fIfildes\fR.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBETIME\fR\fR
.ad
.RS 10n
-.rt
Time out before acknowledgement message was received at the stream head.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEAGAIN\fR\fR
.ad
.RS 10n
-.rt
Unable to allocate buffers for the acknowledgement message.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
Invalid multiplexor ID number.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
\fIfildes\fR is the file descriptor of a pipe or FIFO.
.RE