summaryrefslogtreecommitdiff
path: root/usr/src/man/man9f/mioc2ack.9f
blob: 3a8be0b368146513ae6379eb50500fa65a3c52dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
'\" te
.\" Copyright (c) 2004, 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 MIOC2ACK 9F "Jun 9, 2004"
.SH NAME
mioc2ack \- Convert an M_IOCTL message to an M_IOCACK message
.SH SYNOPSIS
.nf
#include <sys/stream.h>
#include <sys/strsun.h>



\fBvoid\fR \fBmioc2ack\fR(\fBmblk_t *\fR\fImp\fR, \fBmblk_t *\fR\fIdp\fR, \fBsize_t\fR \fIcount\fR, \fBint\fR \fIrval\fR);
.fi

.SH INTERFACE LEVEL
illumos DDI specific (illumos DDI).
.SH PARAMETERS
.ne 2
.na
\fB\fImp\fR\fR
.ad
.RS 9n
M_IOCTL message.
.RE

.sp
.ne 2
.na
\fB\fIdp\fR\fR
.ad
.RS 9n
Payload to associate with M_IOCACK message.
.RE

.sp
.ne 2
.na
\fB\fIcount\fR\fR
.ad
.RS 9n
Value to set the ioc_count of the \fBiocblk\fR(9S) to.
.RE

.sp
.ne 2
.na
\fB\fIrval\fR\fR
.ad
.RS 9n
Value to set the ioc_rval of the  \fBiocblk\fR(9S) to.
.RE

.SH DESCRIPTION
The \fBmioc2ack()\fR function converts an M_IOCTL message into an M_IOCACK
message using the supplied arguments.
.sp
.LP
To convert the message, \fBmioc2ack()\fR changes the message type to M_IOCACK,
sets the \fBioc_count\fR and \fBioc_rval\fR members of the \fBiocblk\fR(9S)
associated with \fImp\fR to the passed-in values, and clears the
\fBioc_error\fR field. Further, it frees any message blocks chained off of
\fBmp->b_cont\fR and resets \fBmp->b_cont\fR to \fIdp\fR. Finally, if \fIdp\fR
is not NULL, \fBmioc2ack()\fR resets \fBdp->b_wptr\fR to be \fBdp->b_rptr +
count\fR (that is, it sets \fIdp\fR to be exactly \fIcount\fR bytes in length).
.SH RETURN VALUES
None.
.SH CONTEXT
This function can be called from user, kernel or interrupt context.
.SH SEE ALSO
\fBmiocack\fR(9F), \fBmiocnak\fR(9F), \fBiocblk\fR(9S)
.sp
.LP
\fISTREAMS Programming Guide\fR