.TH copyb() "" "" "DDI/DKI Kernel Routine"
.PC "Duplicate a message block"
.B "#include <sys/stream.h>"
\fBmblk_t *copyb(\fIbufptr\^\fB)\fR
\fBmblk_t *\fIbufptr\^\fB;\fR
.PP
.B copyb()
allocates a message block and copies into it the contents of the block to which
.I bufptr
points.
.B copyb()
ensures that the newly allocated block is at least as large as that to which
.I bufptr
points.
.PP
If all goes well,
.B copyb()
returns a pointer to the newly allocated message block;
otherwise, it returns NULL.
.SH "See Also"
.B
allocb(),
copymsg(),
DDI/DKI kernel routines,
msgb
.R
.SH Notes
.B copyb()
has base or interrupt level.
It does not sleep.
.PP
A function can hold
driver-defined basic locks, read/write locks, and sleep locks
across a call to this function.
