'\" te .\" Copyright (c) 2006, Sun Microsystems, Inc., All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH MSGPULLUP 9F "Jan 16, 2006" .SH NAME msgpullup \- concatenate bytes in a message .SH SYNOPSIS .LP .nf #include \fBmblk_t *\fR\fBmsgpullup\fR(\fBmblk_t *\fR\fImp\fR, \fBssize_t\fR \fIlen\fR); .fi .SH INTERFACE LEVEL .sp .LP Architecture independent level 1 (DDI/DKI). .SH PARAMETERS .sp .ne 2 .na \fB\fImp\fR\fR .ad .RS 7n Pointer to the message whose blocks are to be concatenated. .RE .sp .ne 2 .na \fB\fIlen\fR\fR .ad .RS 7n Number of bytes to concatenate. .RE .SH DESCRIPTION .sp .LP The \fBmsgpullup()\fR function concatenates and aligns the first \fIlen\fR data bytes of the message pointed to by \fImp\fR, copying the data into a new message. Any remaining bytes in the remaining message blocks will be copied and linked onto the new message. The original message is unaltered. If \fIlen\fR equals \fB\(mi1\fR, all data are concatenated. If \fIlen\fR bytes of the same message type cannot be found, \fBmsgpullup()\fR fails and returns \fINULL\fR. .SH RETURN VALUES .sp .LP The \fBmsgpullup\fR function returns the following values: .sp .ne 2 .na \fB\fBNon-null\fR\fR .ad .RS 12n Successful completion. A pointer to the new message is returned. .RE .sp .ne 2 .na \fB\fINULL\fR\fR .ad .RS 12n An error occurred. .RE .SH CONTEXT .sp .LP The \fBmsgpullup()\fR function can be called from user, interrupt, or kernel context. .SH SEE ALSO .sp .LP \fBsrv\fR(9E), \fBallocb\fR(9F), \fBpullupmsg\fR(9F), \fBmsgb\fR(9S) .sp .LP \fIWriting Device Drivers\fR .sp .LP \fISTREAMS Programming Guide\fR .SH NOTES .sp .LP The \fBmsgpullup()\fR function is a \fBDKI\fR-compliant replacement for the older \fBpullupmsg\fR(9F) routine. Users are strongly encouraged to use \fBmsgpullup()\fR instead of \fBpullupmsg\fR(9F).