STREAMS Programming Guide


Used to alter some characteristics of the Stream head. It is generated by any downstream module, and is interpreted by the Stream head. The data buffer of the message has the following structure as defined in stream.h.

struct stroptions {
	uint     so_flags;        /* options to set */
	shor     so_readopt;      /* read option */
	ushort   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   so_erropt;       /* error option */
	ssize_t  so_maxblk;       /* maximum message block size */
	ushort   so_copyopt;      /* copy options (see stropts.h) */

where so_flags specifies which options are to be altered, and can be any combination of the following:

The offset must be less than the maximum message buffer size (system dependent). Under certain circumstances, a write offset may not be inserted. A module or driver must test that b_rptr in the msgb(9S)structure is greater than db_base in the datab(9S) structure to determine that an offset has been inserted in the first message block.

Note -

For conformance with the POSIX standard, it is recommended that new applications use the O_NONBLOCK flag whose behavior is the same as that of O_NDELAY unless otherwise noted.


Sent upstream by modules or drivers to post a signal to a process. When the message reaches the front of the Stream head read queue, it evaluates the first data byte of the message as a signal number, defined in <sys/signal.h>. (The signal is not generated until it reaches the front of the Stream head read queue.) The associated signal will be sent to processes under the following conditions: