STREAMS-UX Programmer's Guide (February 2007)

STREAMS Utilities Supported by HP-UX
Appendix B
207
NAME
rmvb ()Removes a message block from a message.
SYNOPSIS
#include <sys/stream.h>
mblk_t *rmvb (mblk_t *mp, mblk_t *bp);
PARAMETERS
mp
Pointer to message from which message block is to be removed.
bp
Pointer to message block targeted for removal.
DESCRIPTION
rmvb() removes the message block pointed to by
bp
from the message pointed to by
mp
, and returns a pointer
to the altered message. The message block is just removed from the message. It is the responsibility of the
module or driver to actually free the message block and other related structures, as appropriate.
RETURN VALUES
If the block removed was the last (or only) block on the message, rmvb() returns a NULL, otherwise it returns
a pointer to the altered message. If
bp
is not a valid block pointer for this message, rmvb() returns a -1.
CONSTRAINTS
rmvb() can be called from thread or interrupt context. Spinlocks can be held across calls to this function.