STROPTIONS(9S) | Data Structures for Drivers | STROPTIONS(9S) |
stroptions - options structure for M_SETOPTS message
#include <sys/stream.h> #include <sys/stropts.h> #include <sys/ddi.h> #include <sys/sunddi.h>
Architecture independent level 1 (DDI/DKI)
The M_SETOPTS message contains a stroptions structure and is used to control options in the stream head.
uint_t so_flags; /* options to set */ short so_readopt; /* read option */ ushort_t so_wroff; /* write offset */ ssize_t so_minpsz; /* minimum read packet size */ ssize_t so_maxpsz; /* maximum read packet size */ size_t so_hiwat; /* read queue high water mark */ size_t so_lowat; /* read queue low water mark */ unsigned char so_band; /* band for water marks */ ushort_t 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
SO_WROFF
SO_MINPSZ
SO_MAXPSZ
SO_HIWAT
SO_LOWAT
SO_MREADON
SO_MREADOFF
SO_NDELON
SO_NDELOFFSTREAMS
SO_ISTTY
SO_ISNTTY
SO_TOSTOP
SO_TONSTOP
SO_BAND
SO_ERROPT
When SO_READOPT is set, the so_readopt field of the stroptions structure can take one of the following values. See read(2).
RNORM
RMSGD
RMSGN
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
RERRNONPERSIST
OR'ed with either none or one of:
WERRNORM
WERRNONPERSIST
STREAMS Programming Guide
November 14, 1996 | OmniOS |