Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

stroptions(9s) [sunos man page]

stroptions(9S)						    Data Structures for Drivers 					    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
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 Set read option. SO_WROFF Set write offset. SO_MINPSZ Set minimum packet size SO_MAXPSZ Set maximum 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 and writes. SO_NDELOFFSTREAMS Semantics for NDELAY reads and 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 this 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 message normal. RMSGD Read message discard. RMSGN Read message, 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 or one of: WERRNORM Persistent write errors; default. WERRNONPERSIST Non-persistent write errors. SEE ALSO
read(2), streamio(7I) STREAMS Programming Guide SunOS 5.10 14 Nov 1996 stroptions(9S)

Check Out this Related Man Page

queue(9S)						    Data Structures for Drivers 						 queue(9S)

NAME
queue - STREAMS queue structure SYNOPSIS
#include <sys/stream.h> INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI) DESCRIPTION
A STREAMS driver or module consists of two queue structures, one for upstream processing (read) and one for downstream processing (write). This structure is the major building block of a stream. It contains pointers to the processing procedures, pointers to the next and previous queues in the stream, flow control parameters, and a pointer defining the position of its messages on the STREAMS scheduler list. The queue structure is defined as type queue_t. STRUCTURE MEMBERS
struct qinit*q_qinfo; /* module or driver entry points */ struct msgb*q_first; /* first message in queue */ struct msgb*q_last; /* last message in queue */ struct queue*q_next; /* next queue in stream */ struct queue*q_link; /* to next queue for scheduling*/ void *q_ptr; /* pointer to private data structure */ size_t q_count; /* approximate size of message queue */ uint_t q_flag; /* status of queue */ ssize_t q_minpsz; /* smallest packet accepted by QUEUE*/ ssize_t q_maxpsz; /*largest packet accepted by QUEUE */ size_t q_hiwat; /* high water mark */ size_t q_lowat; /* low water mark */ Valid flags are as follows: QENAB Queue is already enabled to run. QWANTR Someone wants to read queue. QWANTW Someone wants to write to queue. QFULL Queue is considered full. QREADR This is the reader (first) queue. QUSE This queue is in use (allocation). QNOENB Do not enable queue by way of putq(). SEE ALSO
strqget(9F), strqset(9F), module_info(9S), msgb(9S), qinit(9S), streamtab(9S) Writing Device Drivers STREAMS Programming Guide SunOS 5.10 12 Nov 1996 queue(9S)
Man Page