'\" te .\" Copyright 1989 AT&T .TH dupmsg 9F "11 Apr 1991" "SunOS 5.11" "Kernel Functions for Drivers" .SH NAME dupmsg \- duplicate a message .SH SYNOPSIS .LP .nf #include \fBmblk_t *\fR\fBdupmsg\fR(\fBmblk_t *\fR\fImp\fR); .fi .SH INTERFACE LEVEL .sp .LP Architecture independent level 1 (DDI/DKI). .SH PARAMETERS .sp .ne 2 .mk .na \fB\fImp\fR \fR .ad .RS 7n .rt Pointer to the message. .RE .SH DESCRIPTION .sp .LP \fBdupmsg()\fR forms a new message by copying the message block descriptors pointed to by \fImp\fR and linking them. \fBdupb\fR(9F) is called for each message block. The data blocks themselves are not duplicated. .SH RETURN VALUES .sp .LP If successful, \fBdupmsg()\fR returns a pointer to the new message block. Otherwise, it returns a \fINULL\fR pointer. A return value of \fINULL\fR indicates either memory depletion or the data block reference count, \fBdb_ref\fR (see \fBdatab\fR(9S)), has reached a limit (\fB255\fR). See \fBdupb\fR(9F). .SH CONTEXT .sp .LP \fBdupmsg()\fR can be called from user, kernel, or interrupt context. .SH EXAMPLES .LP \fBExample 1 \fRUsing \fBdupmsg()\fR .sp .LP See \fBcopyb\fR(9F) for an example using \fBdupmsg()\fR. .SH SEE ALSO .sp .LP \fBcopyb\fR(9F), \fBcopymsg\fR(9F), \fBdupb\fR(9F), \fBdatab\fR(9S) .sp .LP \fIWriting Device Drivers for Oracle Solaris 11.2\fR .sp .LP \fISTREAMS Programming Guide\fR