1502 Remove conversion cruft from manpages
[unleashed.git] / usr / src / man / man9f / mcopyout.9f
blob31d4210ef8bdb31422e943ecef79bd22a3f22451
1 '\" te
2 .\" Copyright (c) 2004, 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 MCOPYOUT 9F "Jun 9, 2004"
7 .SH NAME
8 mcopyout \- Convert an M_IOCTL or M_IOCDATA message to an M_COPYOUT
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/stream.h>
13 #include <sys/strsun.h>
17 \fBvoid\fR \fBmcopyout\fR(\fBmblk_t *\fR\fImp\fR, \fBvoid *\fR\fIprivate\fR, \fBsize_t\fR \fIsize\fR, \fBvoid *\fR\fIuseraddr\fR,
18       \fBmblk_t *\fR\fIdp\fR);
19 .fi
21 .SH INTERFACE LEVEL
22 .sp
23 .LP
24 Solaris DDI specific (Solaris DDI).
25 .SH PARAMETERS
26 .sp
27 .ne 2
28 .na
29 \fB\fImp\fR\fR
30 .ad
31 .RS 12n
32 M_IOCTL or M_IOCDATA message.
33 .RE
35 .sp
36 .ne 2
37 .na
38 \fB\fIprivate\fR\fR
39 .ad
40 .RS 12n
41 Value to set the cq_private field of the \fBcopyreq\fR(9S) to.
42 .RE
44 .sp
45 .ne 2
46 .na
47 \fB\fIsize\fR\fR
48 .ad
49 .RS 12n
50 Value to set the cq_size field of the \fBcopyreq\fR(9S) to.
51 .RE
53 .sp
54 .ne 2
55 .na
56 \fB\fIuseraddr\fR\fR
57 .ad
58 .RS 12n
59 Optionally, the value to set the cq_addr field of the \fBcopyreq\fR(9S) to.
60 .RE
62 .sp
63 .ne 2
64 .na
65 \fB\fIdp\fR\fR
66 .ad
67 .RS 12n
68 Optionally, the payload to copy out.
69 .RE
71 .SH DESCRIPTION
72 .sp
73 .LP
74 The \fBmcopyout()\fR function converts an M_IOCTL or M_IOCDATA message into an
75 M_COPYOUT message using the supplied arguments.
76 .sp
77 .LP
78 To convert the message, \fBmcopyout()\fR changes the message type to M_COPYOUT,
79 and its payload from a \fBiocblk\fR(9S) to a \fBcopyreq\fR(9S). Since the
80 \fBiocblk\fR(9S) and \fBcopyreq\fR(9S) are designed to overlay one another, the
81 only fields which must be updated are \fBcq_private\fR, \fBcq_size\fR, and
82 \fBcq_addr\fR, which are set to the supplied values. If \fIuseraddr\fR is
83 passed as NULL, the M_IOCTL must be transparent and \fBcq_addr\fR is assigned
84 the pointer-sized quantity found at \fBmp->b_cont->b_rptr\fR.
85 .sp
86 .LP
87 If \fIdp\fR is not NULL, any trailing message blocks associated with \fImp\fR
88 are freed, \fBmp->b_cont\fR is reset to \fIdp\fR and \fBdp->b_wptr\fR is set to
89 \fBdp->b_rptr + size\fR. Otherwise, any trailing message blocks are unaffected.
90 .SH RETURN VALUES
91 .sp
92 .LP
93 None.
94 .SH CONTEXT
95 .sp
96 .LP
97 This function can be called from user, kernel or interrupt context.
98 .SH SEE ALSO
99 .sp
101 \fBmcopyin\fR(9F), \fBcopyreq\fR(9S), \fBiocblk\fR(9S)
104 \fISTREAMS Programming Guide\fR