STREAMS-UX Programmer's Guide (February 2007)
STREAMS Mechanism and System Calls
Reading From a Stream
Chapter 2
29
Return Values
For getmsg (2) and getpmsg (2), the flagsp and bandp arguments serve as input and output parameters. On
successful completion of the getmsg (2) call, flagsp is set to either RS_HIPRI or 0, depending on whether the
last retrieved message was of high priority. For getpmsg (2), flagsp is set to MSG_HIPRI, MSG_BAND, or
MSG_ANY depending on the priority of the latest message retrieved. The corresponding bandp argument is set
to 0 for high priority and normal non-band messages, and to the corresponding band priority value for band
messages.
A return value of 0 indicates that an entire message was completely and successfully retrieved. If a message
is partially retrieved, MORECTL, MOREDATA, or a bitwise-OR of the two constants is returned. This indicates
that more control or data information is to be retrieved for the current message.
A return value of -1 indicates failure. The errno value is appropriately set, as with all standard UNIX File
System I/O.
See the relevant HP-UX manpages for more details on these system calls.