copyb - STREAMS: Copies a message block
#include <sys/stream.h>
MBLKP copyb(
MBLKP message_block );
Specifies a pointer to the message block from which copyb
copies the data. The typedef MBLKP is an alternate name
for typedef struct msgb *.
The copyb interface allocates a new message block and
copies into it the data from the block pointed to by the
message block (the message_block argument). The new message
block is at least as large as the message block being
copied. The copyb interface uses the b_rptr and b_wptr
members of the msgb structure pointer to determine how
many bytes to copy.
Upon successful completion, the copyb interface returns a
pointer to the newly allocated message block that contains
the copied data. This newly allocated message block is of
type struct msgb *. The msgb data structure is defined in
the /usr/sys/include/sys/stream.h file.
Otherwise, copyb returns a NULL pointer.
Kernel Interfaces: allocb(9r)
Programmer's Guide: STREAMS
copyb(9r)
[ Back ] |