STREAMS Programming Guide

M_SETOPTS

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 {
	ulong			so_flags;						/*options to set*/
	short			so_readopt;						/*read option*/
	ushort			so_wroff;						/*write offset*/
	long			so_minpsz;						/*min read packet size*/
	long			so_maxpsz;						/*max read packet size*/
	ulong			so_hiwat;						/*rd que hi-water mark*/
	ulong			so_lowat;						/*rd que low-water mark*/
>>>>>>>>>>>>>>	unsigned char so_band;	 /* upd water marks*/
};

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.


M_SIG

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 process(es) under the following conditions: