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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
|
'\" te
.\" This manual page is derived from the DAT/uDAPL 1.2 specification.
.\" Portions Copyright (c) 2007, 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 DAT_EP_CONNECT 3DAT "Jul 16, 2004"
.SH NAME
dat_ep_connect \- establish a connection between the local Endpoint and a
remote Endpoint
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-ldat\fR [ \fIlibrary\fR\&.\|.\|. ]
#include <\fBdat/udat.h\fR>
DAT_RETURN
dat_ep_connect (
IN DAT_EP_HANDLE ep_handle,
IN DAT_IA_ADDRESS_PTR remote_ia_address,
IN DAT_CONN_QUAL remote_conn_qual,
IN DAT_TIMEOUT timeout,
IN DAT_COUNT private_data_size,
IN const DAT_PVOID private_data,
IN DAT_QOS qos,
IN DAT_CONNECT_FLAGS connect_flags
)
.fi
.SH PARAMETERS
.sp
.ne 2
.na
\fB\fIep_handle\fR\fR
.ad
.RS 21n
Handle for an instance of an Endpoint.
.RE
.sp
.ne 2
.na
\fB\fIremote_ia_address\fR\fR
.ad
.RS 21n
The Address of the remote IA to which an Endpoint is requesting a connection.
.RE
.sp
.ne 2
.na
\fB\fIremote_conn_qual\fR\fR
.ad
.RS 21n
Connection Qualifier of the remote IA from which an Endpoint requests a
connection.
.RE
.sp
.ne 2
.na
\fB\fItimeout\fR\fR
.ad
.RS 21n
Duration of time, in microseconds, that a Consumer waits for Connection
establishment. The value of \fBDAT_TIMEOUT_INFINITE\fR represents no timeout,
indefinite wait. Values must be positive.
.RE
.sp
.ne 2
.na
\fB\fIprivate_data_size\fR\fR
.ad
.RS 21n
Size of the \fIprivate_data\fR. Must be nonnegative.
.RE
.sp
.ne 2
.na
\fB\fIprivate_data\fR\fR
.ad
.RS 21n
Pointer to the private data that should be provided to the remote Consumer as
part of the Connection Request. If \fIprivate_data_size\fR is zero, then
\fIprivate_data\fR can be \fINULL\fR.
.RE
.sp
.ne 2
.na
\fB\fIqos\fR\fR
.ad
.RS 21n
Requested quality of service of the connection.
.RE
.sp
.ne 2
.na
\fB\fIconnect_flags\fR\fR
.ad
.RS 21n
Flags for the requested connection. If the least significant bit of
\fBDAT_MULTIPATH_FLAG\fR is 0, the Consumer does not request multipathing. If
the least significant bit of \fBDAT__MULTIPATH_FLAG\fR is 1, the Consumer
requests multipathing. The default value is \fBDAT_CONNECT_DEFAULT_FLAG\fR,
which is 0.
.RE
.SH DESCRIPTION
.sp
.LP
The \fBdat_ep_connect()\fR function requests that a connection be established
between the local Endpoint and a remote Endpoint. This operation is used by the
active/client side Consumer of the Connection establishment model. The remote
Endpoint is identified by Remote IA and Remote Connection Qualifier.
.sp
.LP
As part of the successful completion of this operation, the local Endpoint is
bound to a Port Qualifier of the local IA. The Port Qualifier is passed to the
remote side of the requested connection and is available to the remote Consumer
in the Connection Request of the \fBDAT_CONNECTION_REQUEST_EVENT\fR.
.sp
.LP
The Consumer-provided \fIprivate_data\fR is passed to the remote side and is
provided to the remote Consumer in the Connection Request. Consumers can
encapsulate any local Endpoint attributes that remote Consumers need to know as
part of an upper-level protocol. Providers can also provide a Provider on the
remote side any local Endpoint attributes and Transport-specific information
needed for Connection establishment by the Transport.
.sp
.LP
Upon successful completion of this operation, the local Endpoint is transferred
into \fBDAT_EP_STATE_ACTIVE_CONNECTION_PENDING\fR.
.sp
.LP
Consumers can request a specific value of \fIqos\fR. The Provider specifies
which quality of service it supports in documentation and in the Provider
attributes. If the local Provider or Transport does not support the requested
\fIqos\fR, the operation fails and \fBDAT_MODEL_NOT_SUPPORTED\fR is returned
synchronously. If the remote Provider does not support the requested \fIqos\fR,
the local Endpoint is automatically transitioned into the
\fBDAT_EP_STATE_DISCONNECTED\fR state, the connection is not established, and
the event returned on the \fIconnect_evd_handle\fR is
\fBDAT_CONNECTION_EVENT_NON_PEER_REJECTED\fR. The same
\fBDAT_CONNECTION_EVENT_NON_PEER_REJECTED\fR event is returned if the
connection cannot be established for all reasons of not establishing the
connection, except timeout, remote host not reachable, and remote peer reject.
For example, remote Consumer is not listening on the requested Connection
Qualifier, Backlog of the requested Service Point is full, and Transport
errors. In this case, the local Endpoint is automatically transitioned into
\fBDAT_EP_STATE_DISCONNECTED\fR state.
.sp
.LP
The acceptance of the requested connection by the remote Consumer is reported
to the local Consumer through a \fBDAT_CONNECTION_EVENT_ESTABLISHED\fR event on
the \fIconnect_evd_handle\fR of the local Endpoint and the local Endpoint is
automatically transitioned into a \fBDAT_EP_STATE_CONNECTED\fR state.
.sp
.LP
The rejection of the connection by the remote Consumer is reported to the local
Consumer through a \fBDAT_CONNECTION_EVENT_PEER_REJECTED\fR event on the
\fIconnect_evd_handle\fR of the local Endpoint and the local Endpoint is
automatically transitioned into a \fBDAT_EP_STATE_DISCONNECTED\fR state.
.sp
.LP
When the Provider cannot reach the remote host or the remote host does not
respond within the Consumer requested Timeout, a
\fBDAT_CONNECTION_EVENT_UNREACHABLE\fR event is generated on the
\fIconnect_evd_handle\fR of the Endpoint. The Endpoint transitions into a
\fBDAT_EP_STATE_DISCONNECTED\fR state.
.sp
.LP
If the Provider can locally determine that the \fIremote_ia_address\fR is
invalid, or that the remote_ia_address cannot be converted to a
Transport-specific address, the operation can fail synchronously with a
\fBDAT_INVALID_ADDRESS\fR return.
.sp
.LP
The local Endpoint is automatically transitioned into a
\fBDAT_EP_STATE_CONNECTED\fR state when a Connection Request accepted by the
remote Consumer and the Provider completes the Transport-specific Connection
establishment. The local Consumer is notified of the established connection
through a \fBDAT_CONNECTION_EVENT_ESTABLISHED\fR event on the
\fIconnect_evd_handle\fR of the local Endpoint.
.sp
.LP
When the \fItimeout\fR expired prior to completion of the Connection
establishment, the local Endpoint is automatically transitioned into a
\fBDAT_EP_STATE_DISCONNECTED\fR state and the local Consumer through a
\fBDAT_CONNECTION_EVENT_TIMED_OUT\fR event on the \fIconnect_evd_handle\fR of
the local Endpoint.
.SH RETURN VALUES
.sp
.ne 2
.na
\fB\fBDAT_SUCCESS\fR\fR
.ad
.RS 30n
The operation was successful.
.RE
.sp
.ne 2
.na
\fB\fBDAT_INSUFFICIENT_RESOURCES\fR\fR
.ad
.RS 30n
The operation failed due to resource limitations.
.RE
.sp
.ne 2
.na
\fB\fBDAT_INVALID_PARAMETER\fR\fR
.ad
.RS 30n
Invalid parameter.
.RE
.sp
.ne 2
.na
\fB\fBDAT_INVALID_ADDRESS\fR\fR
.ad
.RS 30n
Invalid address.
.RE
.sp
.ne 2
.na
\fB\fBDAT_INVALID_HANDLE\fR\fR
.ad
.RS 30n
Invalid DAT handle; Invalid Endpoint handle.
.RE
.sp
.ne 2
.na
\fB\fBDAT_INVALID_STATE\fR\fR
.ad
.RS 30n
Parameter in an invalid state. Endpoint was not in
\fBDAT_EP_STATE_UNCONNECTED\fR state.
.RE
.sp
.ne 2
.na
\fB\fBDAT_MODEL_NOT_SUPPORTED\fR\fR
.ad
.RS 30n
The requested Model was not supported by the Provider. For example, the
requested qos was not supported by the local Provider.
.RE
.SH USAGE
.sp
.LP
It is up to the Consumer to negotiate outstanding RDMA Read incoming and
outgoing with a remote peer. The outstanding RDMA Read outgoing attribute
should be smaller than the remote Endpoint outstanding RDMA Read incoming
attribute. If this is not the case, Connection establishment might fail.
.sp
.LP
DAT API does not define a protocol on how remote peers exchange Endpoint
attributes. The exchange of outstanding RDMA Read incoming and outgoing
attributes of EPs is left to the Consumer ULP. The Consumer can use Private
Data for it.
.sp
.LP
If the Consumer does not care about posting RDMA Read operations or remote RDMA
Read operations on the connection, it can set the two outstanding RDMA Read
attribute values to 0.
.sp
.LP
If the Consumer does not set the two outstanding RDMA Read attributes of the
Endpoint, the Provider is free to pick up any value for default. The Provider
is allowed to change these default values during connection setup.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability Standard: uDAPL, 1.1, 1.2
_
MT-Level Unsafe
.TE
.SH SEE ALSO
.sp
.LP
\fBlibdat\fR(3LIB), \fBattributes\fR(5)
|