STREAMS Programming Guide

Message Direction

Various system calls let the user create messages and send them downstream and prioritize the messages.

Table 4-3 Send and Recieve Mesages

putmsg(2)

Creates a message from the caller supplied control and data buffers and sends the message downstream 

putpmsg(2)

Does the same as putmsg(2) and lets the caller specify a priority band for the message

getmsg(2)

Retrieves M_DATA, M_PROTO, or M_PCPROTO or high priority messages from the Stream head, and places the contents into two user buffers

getpmsg(2)

Does the same as getmsg(2) and lets the caller specify a priority band for the message

The Stream head guarantees that the control part of a message generated by putmsg(2) is at least 64 bytes long. This promotes reusability of the buffer. When the buffer is a reasonable size, modules and drivers may reuse the buffer for other headers.

stropts.h contains the specification of strbuf, which describes the control and data buffers.