Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / msgpullup.9f
blobfc8b4ddcde1c86fcac7f5a8ee45e41d0e0a2ffe6
1 '\" te
2 .\"  Copyright (c) 2006, Sun Microsystems, Inc., All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH MSGPULLUP 9F "Jan 16, 2006"
7 .SH NAME
8 msgpullup \- concatenate bytes in a message
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/stream.h>
16 \fBmblk_t *\fR\fBmsgpullup\fR(\fBmblk_t *\fR\fImp\fR, \fBssize_t\fR \fIlen\fR);
17 .fi
19 .SH INTERFACE LEVEL
20 .sp
21 .LP
22 Architecture independent level 1 (DDI/DKI).
23 .SH PARAMETERS
24 .sp
25 .ne 2
26 .na
27 \fB\fImp\fR\fR
28 .ad
29 .RS 7n
30 Pointer to the message whose blocks are to be concatenated.
31 .RE
33 .sp
34 .ne 2
35 .na
36 \fB\fIlen\fR\fR
37 .ad
38 .RS 7n
39 Number of bytes to concatenate.
40 .RE
42 .SH DESCRIPTION
43 .sp
44 .LP
45 The \fBmsgpullup()\fR function concatenates and aligns the first \fIlen\fR data
46 bytes of the message pointed to by \fImp\fR, copying the data into a new
47 message. Any remaining bytes in the remaining message blocks will be copied and
48 linked onto the new message. The original message is unaltered. If \fIlen\fR
49 equals \fB\(mi1\fR, all data are concatenated. If \fIlen\fR bytes of the same
50 message type cannot be found, \fBmsgpullup()\fR fails and returns \fINULL\fR.
51 .SH RETURN VALUES
52 .sp
53 .LP
54 The \fBmsgpullup\fR function returns the following values:
55 .sp
56 .ne 2
57 .na
58 \fB\fBNon-null\fR\fR
59 .ad
60 .RS 12n
61 Successful completion. A pointer to the new message is returned.
62 .RE
64 .sp
65 .ne 2
66 .na
67 \fB\fINULL\fR\fR
68 .ad
69 .RS 12n
70 An error occurred.
71 .RE
73 .SH CONTEXT
74 .sp
75 .LP
76 The \fBmsgpullup()\fR function can be called from user, interrupt, or kernel
77 context.
78 .SH SEE ALSO
79 .sp
80 .LP
81 \fBsrv\fR(9E), \fBallocb\fR(9F), \fBpullupmsg\fR(9F), \fBmsgb\fR(9S)
82 .sp
83 .LP
84 \fIWriting Device Drivers\fR
85 .sp
86 .LP
87 \fISTREAMS Programming Guide\fR
88 .SH NOTES
89 .sp
90 .LP
91 The \fBmsgpullup()\fR function is a \fBDKI\fR-compliant replacement for the
92 older \fBpullupmsg\fR(9F) routine. Users are strongly encouraged to use
93 \fBmsgpullup()\fR instead of \fBpullupmsg\fR(9F).