.TH msgpullup() "" "" "DDI/DKI Kernel Routine"
.PC "Copy message data into a new message"
.B "#include <sys/stream.h>"
\fBmblk_t *msgpullup(\fImessage\^\fB, \fIbytes\^\fB)\fR
\fBmblk_t *\fImessage\^\fB; int \fIbytes\^\fB;\fR
.PP
.B msgpullup()
copies into a new message the first
.I bytes
of data from
.IR message .
If
.I bytes
equals \-1, it copies all data from
.IR message .
.B msgpullup()
does not affect
.I message
in any way.
.PP
If
.I message
does not contain
.I bytes
of the same message type,
.B msgpullup()
fails and returns NULL.
Otherwise, it returns the address of the new message.
.SH "See Also"
.B
allocb(),
DDI/DKI kernel routines,
msgb
.R
.SH Notes
.B msgpullup()
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.
