summaryrefslogtreecommitdiff
path: root/usr/src/man/man9f/dlbindack.9f
blob: 256dc9c6aa113844e8578b3137dd8699c9f30a1b (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
'\" 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 DLBINDACK 9F "April 9, 2016"
.SH NAME
dlbindack, dlphysaddrack, dlokack, dlerrorack, dluderrorind \- DLPI device
driver helper functions
.SH SYNOPSIS
.nf
#include <sys/dlpi.h>



\fBvoid\fR \fBdlokack\fR(\fBqueue_t *\fR\fIwq\fR, \fBmblk_t *\fR\fImp\fR, \fBt_uscalar_t\fR \fIcorrect_primitive\fR);
.fi

.LP
.nf
\fBvoid\fR \fBdlerrorack\fR(\fBqueue_t *\fR\fIwq\fR, \fBmblk_t *\fR\fImp\fR, \fBt_uscalar_t\fR \fIerror_primitive\fR,
     \fBt_uscalar_t\fR \fIerror\fR, \fBt_uscalar_t\fR \fIunix_errno\fR);
.fi

.LP
.nf
\fBvoid\fR \fBdlbindack\fR(\fBqueue_t *\fR\fIwq\fR, \fBmblk_t *\fR\fImp\fR, \fBt_scalar_t\fR \fIsap\fR, \fBconst void *\fR\fIaddrp\fR,
     \fBt_uscalar_t\fR \fIaddrlen\fR, \fBt_uscalar_t\fR \fImaxconind\fR, \fB t_uscalar_t\fR \fIxidtest\fR);
.fi

.LP
.nf
\fBvoid\fR \fBdlphysaddrack\fR(\fBqueue_t *\fR\fIwq\fR, \fBmblk_t *\fR\fImp\fR, \fBconst void *\fR\fIaddrp\fR,
     \fBt_uscalar_t\fR \fIaddrlen\fR);
.fi

.LP
.nf
\fBvoid\fR \fBdluderrorind\fR(\fBqueue_t *\fR\fIwq\fR, \fBmblk_t *\fR\fImp\fR, \fBconst void *\fR\fIaddrp\fR,
     \fBt_uscalar_t\fR \fIaddrlen\fR, \fBt_uscalar_t\fR \fIerror\fR, \fBt_uscalar_t\fR \fIunix_errno\fR);
.fi

.SH INTERFACE LEVEL
illumos DDI specific (illumos DDI).
.SH PARAMETERS
.ne 2
.na
\fB\fIwq\fR\fR
.ad
.RS 21n
Streams write queue.
.RE

.sp
.ne 2
.na
\fB\fImp\fR\fR
.ad
.RS 21n
Pointer to the bind request message.
.RE

.sp
.ne 2
.na
\fB\fIsap\fR\fR
.ad
.RS 21n
Service access point being requested.
.RE

.sp
.ne 2
.na
\fB\fIaddrp\fR\fR
.ad
.RS 21n
Pointer to the dlpi layer source address.
.RE

.sp
.ne 2
.na
\fB\fIaddrlen\fR\fR
.ad
.RS 21n
Size of the \fBdlpi\fR layer address pointed to by \fIaddr\fR.
.RE

.sp
.ne 2
.na
\fB\fImaxconind\fR\fR
.ad
.RS 21n
Maximum number of \fBDL_CONNECT_IND\fR messages allowed to be outstanding per
stream.
.RE

.sp
.ne 2
.na
\fB\fIxidtest\fR\fR
.ad
.RS 21n
The \fBXID\fR and \fBTEST\fR responses supported.
.RE

.sp
.ne 2
.na
\fB\fIcorrect_primitive\fR\fR
.ad
.RS 21n
Identifies the \fBDL\fR primitive completing successfully.
.RE

.sp
.ne 2
.na
\fB\fIerror_primitive\fR\fR
.ad
.RS 21n
Identifies the \fBDL\fR primitive in error.
.RE

.sp
.ne 2
.na
\fB\fIerror\fR\fR
.ad
.RS 21n
\fBDLPI\fR error associated with the failure in the \fBDLPI\fR request.
.RE

.sp
.ne 2
.na
\fB\fIunix_errno\fR\fR
.ad
.RS 21n
Corresponding \fBUNIX\fR system error that can be associated with the failure
in the \fBDLPI\fR request.
.RE

.SH DESCRIPTION
All functions described in this manpage take a pointer to the message passed to
the \fBDLPI\fR provider (\fBmblk_t\fR) and attempt to reuse it in formulating
the \fBM_PROTO\fR reply. If the message block is too small to be reused, it is
freed and a new one is allocated.
.sp
.LP
All functions reply upstream using \fBqreply\fR(9F). The write-side queue
pointer must be provided.
.sp
.LP
The \fBdlokack()\fR function provides the successful acknowledgement
\fBDL_OK_ACK\fR message reply to the \fBDLPI\fR provider and is used to
complete many of the \fBDLPI\fR requests in the \fBDLPI\fR consumer.
.sp
.LP
The \fBdlerrorack()\fR function provides the unsuccessful acknowledgement
\fBDL_ERROR_ACK\fR message reply to the \fBDLPI\fR() provider and is used for
error completions were required for \fBDLPI\fR requests in the \fBDLPI\fR
consumer.
.sp
.LP
The \fBdlbindack()\fR function provides the \fBDL_BIND_ACK\fR message reply to
the \fBDLPI\fR provider and is used to complete the \fBDL_BIND_REQ\fR
processing in the \fBDLPI\fR consumer.
.sp
.LP
The \fBdlphysaddrack()\fR function provides the \fB\fR()\fBDL_PHYS_ADDR_ACK\fR
message reply used to complete the \fBDL_PHYS_ADDR_ACK\fR processing.
.sp
.LP
The \fBdluderrorind()\fR function provides the \fBDL_UDERROR_IND\fR message
reply used to complete an unsuccessful \fBDL_UNITDATA_REQ\fR.
.SH RETURN VALUES
None.
.SH NOTES
These functions are not required if you are are writing a \fBDLPI\fR device
driver using \fBgld\fR(7D).
.SH CONTEXT
All \fBDLPI\fR helper functions can be called from user, interrupt, or kernel
context.
.SH SEE ALSO
\fBgld\fR(7D), \fBdlpi\fR(7P), \fBqreply\fR(9F)
.sp
.LP
\fIWriting Device Drivers\fR
.sp
.LP
\fISTREAMS Programming Guide\fR