.TH dupb() "" "" "DDI/DKI Kernel Routine"
.PC "Duplicate a message block"
.B "#include <sys/stream.h>"
\fBmblk_t *dupb\fIbufferptr\^\fB)\fR
\fBmblk_t *\fIbufferptr\^\fB;\fR
.PP
.B dupb()
creates a new 
.B msgb
structure for the message block to which
.I bufferptr
points.
Unlike the related function
.BR copyb() ,
.B dupb()
does not copy data block (or blocks) to which the message block points;
rather, it just creates a new structure to point to the data block.
.PP
If all goes well,
.B dupb()
returns a pointer to the newly created message block;
otherwise, it returns NULL.
.SH "See Also"
.B
copyb(),
datab,
DDI/DKI kernel routines,
dupmsg(),
msgb
.R
.SH Notes
.B dupb()
has base or interrupt level.
It does not sleep.
.PP
A driver can hold a driver-defined basic lock, read/write lock, or sleep lock
across a call to this function.
