STREAMS-UX Programmer's Guide (February 2007)
Message Types
Ordinary Messages
Appendix C
242
No data can be sent to the user with an M_IOCNAK message. The stream head will free any M_DATA blocks
linked to the M_IOCNAK message block.
If the stream head does not receive an M_IOCACK or M_IOCNAK message in response to an M_IOCTL (same
ioc_id) message, it will block for all IOCTL calls except for I_STR IOCTL. For I_STR IOCTL if an M_IOCACK
or M_IOCNAK message is not received as a response to an M_IOCTL (same ioc_id) message, it will fail when the
timeout specified in ic_timout expires (and block when the timeout is infinite).
M_PASSFP
This message is used by STREAMS to pass a file pointer from the stream head at one end of a
STREAMS-based pipe to the stream head at the other end of the same pipe.
This message is generated as a result of an I_SENDFD IOCTL issued by a process to the sending stream head.
STREAMS places the M_PASSFP message directly on the read-queue of the other stream head. The user
process retrieves the file pointer contained in M_PASSFP messages through the I_RECVFD ioctl() command.
This message type is restricted to the stream head and should be only processed by the stream head read
queue. This message can be ignored by module and driver developers.
M_PROTO
This message contains control information and associated data. The message format is one or more M_PROTO
message blocks followed by one or more M_DATA message blocks. The semantics of the M_DATA and M_PROTO
message blocks are determined by the STREAMS module that receives the message. M_PROTO messages can
travel bi-directionally on a stream and can be passed between a process and the stream head. The contents of
the first message block are generally referred as the control part, and the contents of any following M_DATA
message blocks are referred as the data part.
Note that on the write-side, the user can generate M_PROTO messages containing only one M_PROTO message.
Also, it is recommended that on the read-side, the format of M_PROTO and M_PCPROTO messages should
generally contain only one M_PROTO or M_PCPROTO message block. The getmsg (2) will compact the multiple
M_PROTO/M_PCPROTO message blocks into one single control part when delivering the message to the user
process.
M_RSE
Reserved for internal use. Modules that do not recognize this message must pass it on. Drivers that do not
recognize this message must free it.
M_SETOPTS
This message is used to alter the characteristics of the stream head. It is generated by any downstream
module and is interpreted by the stream head. The data buffer in the first message block consists of a
stroptions structure. This structure is defined in <sys/stropts.h> and shown here:
ulong so_flags; /* options to set */
short so_readopt; /* read option */
ushort so_wroff; /* write offset */
long so_minpsz; /* minimum read packet size */
long so_maxpsz; /* maximum read packet size */
ulong so_hiwat; /* read queue high-water mark */
ulong so_lowat; /* read queue low-water mark */
unsigned char so_band; /* update water marks for this band */