Communications Technical Reference, Volume 2 getmsg System Call Purpose Gets the next message off a stream. The message must contain either a data part, a control part, or both.
Parameters fd Specifies a file descriptor referencing an open stream.
Holds the control part of the message. Holds the data part of the message. In the strbuf structure, the maxlen field indicates the maximum number of bytes this buffer can hold, the len field contains the number of bytes of data or control information received, and the buf field points to a buffer in which the data or control information is to be placed. Thus, it is left on the stream-head read queue. The len field is set to -1.