stroptions(9S)
NAME
stroptions − options structure for M_SETOPTS message
SYNOPSIS
#include <sys/stream.h>
#include <sys/stropts.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
DESCRIPTION
The M_SETOPTS message contains a stroptions structure and is used to control options in the stream head.
STRUCTURE MEMBERS
| ulong | so_flags; | /∗ options to set ∗/ |
| short | so_readopt; | /∗ read option ∗/ |
| ushort | so_wroff; | /∗ write offset ∗/ |
| long | so_minpsz; | /∗ minimum read packet size ∗/ |
| long | so_maxpsz; | /∗ maximum read packet size ∗/ |
| ulong | so_hiwat; | /∗ read queue high water mark ∗/ |
| ulong | so_lowat; | /∗ read queue low water mark ∗/ |
| unsigned char | so_band; | /∗ band for water marks ∗/ |
| ushort | so_erropt; | /∗ error option ∗/ |
The following are the flags that can be set in the so_flags bit mask in the stroptions structure. Note that multiple flags can be set.
| SO_READOPT | set read option |
| SO_WROFF | set write offset |
| SO_MINPSZ | set min packet size |
| SO_MAXPSZ | set max packet size |
| SO_HIWAT | set high water mark |
| SO_LOWAT | set low water mark |
| SO_MREADON | set read notification ON |
| SO_MREADOFF | set read notification OFF |
| SO_NDELON | old TTY semantics for NDELAY reads/writes |
| SO_NDELOFF | STREAMS semantics for NDELAY reads/writes |
| SO_ISTTY | the stream is acting as a terminal |
| SO_ISNTTY | the stream is not acting as a terminal |
| SO_TOSTOP | stop on background writes to this stream |
| SO_TONSTOP | do not stop on background writes to stream |
| SO_BAND | water marks affect band |
| SO_ERROPT | set error option |
When SO_READOPT is set, the so_readopt field of the stroptions structure can take one of the following values (see read(2)):
| RNORM | read msg norm |
| RMSGD | read msg discard |
| RMSGN | read msg no discard |
When SO_BAND is set, so_band determines to which band so_hiwat and so_lowat apply.
When SO_ERROPT is set, the so_erropt field of the stroptions structure can take a value that is either none or one of:
| RERRNORM | persistent read errors; default |
| RERRNONPERSIST | non-persistent read errors |
OR’ed with either none of one of:
| WERRNORM | persistent write errors; default |
| WERRNONPERSIST | non-persistent write errors |
SEE ALSO
STREAMS Programming Guide
SunOS 5.5.1 — Last change: 25 Jan 1995