STREAMS-UX Programmer's Guide (February 2007)

Message Types
Ordinary Messages
Appendix C
243
Where so_flags specifies the options to be altered. The options can be any combination of the following:
SO_ALL Update all options according to the values specified in the remaining fields of the
stroptions structure.
SO_READOPT Set the read mode as specified in the so_readopt field. The read modes are:
RNORM: Byte stream
RMSGD: Message discard
RMSGN: Message non-discard
RPROTDAT: Convert M_PROTO/M_PCPROTO into M_DATA
RPROTNORM: Normal protocol
RPROTDIS: Discard M_PROTO/M_PCPROTO message blocks and retain any linked
M_DATA blocks
SO_WROFF Insert an offset (in bytes) specified in the so_wroff field of the stroptions structure into
the first message block of all M_DATA messages created by the write (2) system call, and into
the first M_DATA message blocks, if any, of all messages created by the putmsg (2) system
call. Write-offsets must not exceed the maximum size of the message data buffer. The
default offset is zero. Further, modules and drivers must verify, that the b_rptr in the
msgb structure is greater than the db_base in the datab structure, to determine that an
offset has been inserted in the first message block.
SO_MINPSZ Set the minimum packet size for the stream head read-queue to the so_minpsz value in the
stroptions structure. This value is advisory for modules immediately below the stream
head. This is intended to limit the size of M_DATA messages that the module should put to
the stream head. There is no intended minimum size for other message types. The default
value in the stream head is zero.
SO_MAXPSZ Set the maximum packet size for the stream head read-queue to the so_maxpsz value in the
stroptions structure. This value is advisory for modules immediately below the stream
head. This is intended to limit the size of M_DATA messages that the module should put to
the stream head. There is no intended maximum size for other message types. The default
value in the stream head is INFPSZ, the maximum that STREAMS allows.
SO_HIWAT Set the high water mark value in the stream head read-queue to the value specified in the
so_hiwat field of the stroptions structure.
SO_LOWAT Set the low water mark value in the stream head read-queue to the value specified in the
so_lowat field of the stroptions structure.
SO_BAND Use in conjunction with the SO_HIWAT and SO_LOWAT flags, to set the high and low water
marks for the priority band (in the stream head read-queue) specified by the so_band field
in the stroptions structure. If the SO_BAND flag is not set, and the SO_HIWAT and SO_LOWAT
flags are on, the normal high and low water marks are affected. The SO_BAND flag has no
effect if SO_HIWAT and SO_LOWAT flags are off.
Only one band’s water marks can be updated with a single M_SETOPTS message.
SO_MREADON Enable the stream head to generate an M_READ message when processing a read () system
call. If both SO_MREADON and SO_MREADOFF are set in so_flags, SO_MREADOFF will have
precedence.
SO_MREADOFF Disable the stream head from generating an M_READ message when processing a read()
system call. This is the default. If both SO_MREADON and SO_MREADOFF are set in so_flags,
SO_MREADOFF flag takes precedence.