copyb(9r)copyb(9r)NAMEcopyb - STREAMS: Copies a message block
SYNOPSIS
#include <sys/stream.h>
MBLKP copyb(
MBLKP message_block );
ARGUMENTS
Specifies a pointer to the message block from which copyb copies the
data. The typedef MBLKP is an alternate name for typedef struct msgb *.
DESCRIPTION
The copyb interface allocates a new message block and copies into it
the data from the block pointed to by the message block (the mes‐
sage_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.
RETURN VALUES
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.
SEE ALSO
Kernel Interfaces: allocb(9r)
Programmer's Guide: STREAMS
copyb(9r)