1
0
Files
irix-657m-src/eoe/man/manD/stroptions.d4
2022-09-29 17:59:04 +03:00

179 lines
5.4 KiB
Plaintext

'\"! tbl | mmdoc
'\"macro stdmacro
.if n .pH ddi.rm/d4/gen/stroptions @(#)stroptions 43.11 of 12/4/92
.\" Copyright 1992, 1991 UNIX System Laboratories, Inc.
.\" Copyright 1990, 1989 AT&T
.TH stroptions D4
.IX "\f4stroptions\fP(D4)"
.SH NAME
\f4stroptions\fP \- stream head option structure
.SH SYNOPSIS
.nf
.na
.ft 4
#include <sys/stream.h>
#include <sys/stropts.h>
#include <sys/ddi.h>
.ft 1
.ad
.fi
.SH DESCRIPTION
The \f4stroptions\fP structure, used in an \f4M_SETOPTS\fP
.\" or \f4M_PCSETOPTS\fP
message,
contains options for the stream head.
.SH USAGE
The \f4M_SETOPTS\fP message is sent upstream by drivers and modules when
they want to change stream head options for their stream.
.SS Structure Definitions
The \f4stroptions\fP structure contains the following members:
.P
.TS
lf4 2 lf4 2 lf4.
ulong_t so_flags; /* options to set */
short so_readopt; /* read option */
ushort_t so_wroff; /* write offset */
long so_minpsz; /* minimum read packet size */
long so_maxpsz; /* maximum read packet size */
ulong_t so_hiwat; /* read queue high water mark */
ulong_t so_lowat; /* read queue low water mark */
uchar_t so_band; /* band for water marks */
.TE
The \f4so_flags\fP field determines which options are to be set, and which of
the other fields in the structure are used.
This field is a bitmask and is comprised
of the bit-wise OR of the following flags:
.RS
.TP 16n
\f4SO_READOPT\fP
Set the read option to that specified by the \f4so_readopt\fP field.
.TP
\f4SO_WROFF\fP
Set the write offset to that specified by the \f4so_wroff\fP field.
.TP
\f4SO_MINPSZ\fP
Set the minimum packet size on the stream head read queue to that specified
by the \f4so_minpsz\fP field.
.TP
\f4SO_MAXPSZ\fP
Set the maximum packet size on the stream head read queue to that specified
by the \f4so_maxpsz\fP field.
.TP
\f4SO_HIWAT\fP
Set the high water mark on the stream head read queue to that specified
by the \f4so_hiwat\fP field.
.TP
\f4SO_LOWAT\fP
Set the low water mark on the stream head read queue to that specified
by the \f4so_lowat\fP field.
.TP
\f4SO_ALL\fP
Set all of the above options
(\f4SO_READOPT | SO_WROFF | SO_MINPSZ | SO_MAXPSZ | SO_HIWAT | SO_LOWAT\fP).
.TP
\f4SO_MREADON\fP
Turn on generation of \f4M_READ\fP messages by the stream head.
.TP
\f4SO_MREADOFF\fP
Turn off generation of \f4M_READ\fP messages by the stream head.
.TP
\f4SO_NDELON\fP
Use old TTY semantics for no-delay reads and writes.
.TP
\f4SO_NDELOFF\fP
Use STREAMS semantics for no-delay reads and writes.
.TP
\f4SO_ISTTY\fP
The stream is acting as a terminal.
.TP
\f4SO_ISNTTY\fP
The stream is no longer acting as a terminal.
.TP
\f4SO_TOSTOP\fP
Stop processes on background writes to this stream.
.TP
\f4SO_TONSTOP\fP
Don't stop processes on background writes to this stream.
.TP
\f4SO_BAND\fP
The water marks changes affect the priority band specified by the \f4so_band\fP field.
.RE
.P
The \f4so_readopt\fP field specifies options for the stream head that alter the
way it handles \f4read\fP(2) calls.
This field is a bitmask whose flags are grouped
in sets.
Within a set, the flags are mutually exclusive.
The first set of flags determines how data messages are treated when they are read:
.RS
.TP 16n
\f4RNORM\fP
Normal (byte stream) mode.
\f4read\fP returns the lesser of the number of bytes
asked for and the number of bytes available.
Messages with partially read data are
placed back on the head of the stream head read queue.
This is the default behavior.
.TP
\f4RMSGD\fP
Message discard mode.
\f4read\fP returns the lesser of the number of bytes asked
for and the number of bytes in the first message on the stream head read queue.
Messages
with partially read data are freed.
.TP
\f4RMSGN\fP
Message non-discard mode.
\f4read\fP returns the lesser of the number of bytes asked
for and the number of bytes in the first message on the stream head read queue.
Messages
with partially read data are placed back on the head of the stream head read queue.
.RE
.P
The second set of flags determines how protocol messages (\f4M_PROTO\fP and \f4M_PCPROTO\fP)
are treated during a \f4read\fP:
.RS
.TP 16n
\f4RPROTNORM\fP
Normal mode.
\f4read\fP fails with the error code \f4EBADMSG\fP if there is a protocol
message at the front of the stream head read queue.
This is the default behavior.
.TP
\f4RPROTDIS\fP
Protocol discard mode.
\f4read\fP discards the \f4M_PROTO\fP or \f4M_PCPROTO\fP portions
of the message and return any \f4M_DATA\fP portions that may be present.
\f4M_PASSFP\fP
messages are also freed in this mode.
.TP
\f4RPROTDAT\fP
Protocol data mode.
\f4read\fP treats the \f4M_PROTO\fP or \f4M_PCPROTO\fP portions
of the message as if they were normal data (that is, they are delivered to the user.)
.RE
.P
The \f4so_wroff\fP field specifies a byte offset to be included in the first message block
of every \f4M_DATA\fP
message created by a \f4write\fP(2) and the first \f4M_DATA\fP message block created by
each call to \f4putmsg\fP(2).
.P
The \f4so_minpsz\fP field specifies the minimum packet size for the stream head read queue.
.P
The \f4so_maxpsz\fP field specifies the maximum packet size for the stream head read queue.
.P
The \f4so_hiwat\fP field specifies the high water mark for the stream head read queue.
.P
The \f4so_lowat\fP field specifies the low water mark for the stream head read queue.
.P
The \f4so_band\fP field specifies the priority band to which the high and/or low water
mark changes should be applied.
.SH REFERENCES
.na
\f4datab\fP(D4),
\f4messages\fP(D5),
\f4msgb\fP(D4),
\f4read\fP(2),
\f4streamio\fP(7)
.ad