1dat_ep_connect(3DAT)Direct Access Transport Library Functiondsat_ep_connect(3DAT)
2
3
4

NAME

6       dat_ep_connect  - establish a connection between the local Endpoint and
7       a remote Endpoint
8

SYNOPSIS

10       cc [ flag... ] file... -ldat [ library... ]
11       #include <dat/udat.h>
12
13       DAT_RETURN
14           dat_ep_connect (
15           IN    DAT_EP_HANDLE         ep_handle,
16           IN    DAT_IA_ADDRESS_PTR    remote_ia_address,
17           IN    DAT_CONN_QUAL         remote_conn_qual,
18           IN    DAT_TIMEOUT           timeout,
19           IN    DAT_COUNT             private_data_size,
20           IN const  DAT_PVOID         private_data,
21           IN    DAT_QOS               qos,
22           IN    DAT_CONNECT_FLAGS     connect_flags
23           )
24
25

PARAMETERS

27       ep_handle            Handle for an instance of an Endpoint.
28
29
30       remote_ia_address    The Address of the remote IA to which an  Endpoint
31                            is requesting a connection.
32
33
34       remote_conn_qual     Connection  Qualifier  of the remote IA from which
35                            an Endpoint requests a connection.
36
37
38       timeout              Duration of time, in microseconds, that a Consumer
39                            waits  for  Connection establishment. The value of
40                            DAT_TIMEOUT_INFINITE represents no timeout, indef‐
41                            inite wait. Values must be positive.
42
43
44       private_data_size    Size of the private_data. Must be nonnegative.
45
46
47       private_data         Pointer  to  the  private data that should be pro‐
48                            vided to the remote Consumer as part of  the  Con‐
49                            nection  Request.  If  private_data_size  is zero,
50                            then private_data can be NULL.
51
52
53       qos                  Requested quality of service of the connection.
54
55
56       connect_flags        Flags for the requested connection. If  the  least
57                            significant  bit  of  DAT_MULTIPATH_FLAG is 0, the
58                            Consumer does not  request  multipathing.  If  the
59                            least significant bit of DAT__MULTIPATH_FLAG is 1,
60                            the Consumer requests  multipathing.  The  default
61                            value is DAT_CONNECT_DEFAULT_FLAG, which is 0.
62
63

DESCRIPTION

65       The dat_ep_connect() function requests that a connection be established
66       between the local Endpoint and a remote  Endpoint.  This  operation  is
67       used by the active/client side Consumer of the Connection establishment
68       model. The remote Endpoint is identified by Remote IA and  Remote  Con‐
69       nection Qualifier.
70
71
72       As  part of the successful completion of this operation, the local End‐
73       point is bound to a Port Qualifier of the local IA. The Port  Qualifier
74       is  passed to the remote side of the requested connection and is avail‐
75       able to the remote Consumer in the Connection Request of  the  DAT_CON‐
76       NECTION_REQUEST_EVENT.
77
78
79       The  Consumer-provided private_data is passed to the remote side and is
80       provided to the remote Consumer in the  Connection  Request.  Consumers
81       can  encapsulate  any  local  Endpoint attributes that remote Consumers
82       need to know as part of an upper-level  protocol.  Providers  can  also
83       provide a Provider on the remote side any local Endpoint attributes and
84       Transport-specific information needed for Connection  establishment  by
85       the Transport.
86
87
88       Upon  successful  completion  of  this operation, the local Endpoint is
89       transferred into DAT_EP_STATE_ACTIVE_CONNECTION_PENDING.
90
91
92       Consumers can request a specific value of qos. The  Provider  specifies
93       which  quality  of  service  it  supports  in  documentation and in the
94       Provider attributes. If the local Provider or Transport does  not  sup‐
95       port the requested qos, the operation fails and DAT_MODEL_NOT_SUPPORTED
96       is returned synchronously. If the remote Provider does not support  the
97       requested  qos,  the  local Endpoint is automatically transitioned into
98       the DAT_EP_STATE_DISCONNECTED state, the connection is not established,
99       and  the  event  returned  on  the  connect_evd_handle  is  DAT_CONNEC‐
100       TION_EVENT_NON_PEER_REJECTED.        The        same        DAT_CONNEC‐
101       TION_EVENT_NON_PEER_REJECTED event is returned if the connection cannot
102       be established for all reasons  of  not  establishing  the  connection,
103       except  timeout, remote host not reachable, and remote peer reject. For
104       example, remote Consumer is not listening on the  requested  Connection
105       Qualifier,  Backlog  of the requested Service Point is full, and Trans‐
106       port errors. In this case, the local Endpoint is automatically  transi‐
107       tioned into DAT_EP_STATE_DISCONNECTED state.
108
109
110       The  acceptance  of  the requested connection by the remote Consumer is
111       reported to the local Consumer  through  a  DAT_CONNECTION_EVENT_ESTAB‐
112       LISHED  event  on  the connect_evd_handle of the local Endpoint and the
113       local Endpoint is automatically transitioned into  a  DAT_EP_STATE_CON‐
114       NECTED state.
115
116
117       The  rejection  of the connection by the remote Consumer is reported to
118       the local Consumer through a  DAT_CONNECTION_EVENT_PEER_REJECTED  event
119       on  the connect_evd_handle of the local Endpoint and the local Endpoint
120       is automatically transitioned into a DAT_EP_STATE_DISCONNECTED state.
121
122
123       When the Provider cannot reach the remote host or the remote host  does
124       not  respond  within  the  Consumer  requested  Timeout,  a DAT_CONNEC‐
125       TION_EVENT_UNREACHABLE event is generated on the connect_evd_handle  of
126       the Endpoint. The Endpoint transitions into a DAT_EP_STATE_DISCONNECTED
127       state.
128
129
130       If the Provider can locally determine  that  the  remote_ia_address  is
131       invalid,  or that the remote_ia_address cannot be converted to a Trans‐
132       port-specific address, the operation  can  fail  synchronously  with  a
133       DAT_INVALID_ADDRESS return.
134
135
136       The    local    Endpoint   is   automatically   transitioned   into   a
137       DAT_EP_STATE_CONNECTED state when a Connection Request accepted by  the
138       remote  Consumer and the Provider completes the Transport-specific Con‐
139       nection establishment. The local Consumer is  notified  of  the  estab‐
140       lished  connection  through a DAT_CONNECTION_EVENT_ESTABLISHED event on
141       the connect_evd_handle of the local Endpoint.
142
143
144       When the timeout expired prior to completion of the  Connection  estab‐
145       lishment,  the  local  Endpoint  is  automatically  transitioned into a
146       DAT_EP_STATE_DISCONNECTED  state  and  the  local  Consumer  through  a
147       DAT_CONNECTION_EVENT_TIMED_OUT  event  on the connect_evd_handle of the
148       local Endpoint.
149

RETURN VALUES

151       DAT_SUCCESS                   The operation was successful.
152
153
154       DAT_INSUFFICIENT_RESOURCES    The operation failed due to resource lim‐
155                                     itations.
156
157
158       DAT_INVALID_PARAMETER         Invalid parameter.
159
160
161       DAT_INVALID_ADDRESS           Invalid address.
162
163
164       DAT_INVALID_HANDLE            Invalid DAT handle; Invalid Endpoint han‐
165                                     dle.
166
167
168       DAT_INVALID_STATE             Parameter in an invalid  state.  Endpoint
169                                     was   not   in   DAT_EP_STATE_UNCONNECTED
170                                     state.
171
172
173       DAT_MODEL_NOT_SUPPORTED       The requested Model was not supported  by
174                                     the  Provider. For example, the requested
175                                     qos  was  not  supported  by  the   local
176                                     Provider.
177
178

USAGE

180       It  is  up  to the Consumer to negotiate outstanding RDMA Read incoming
181       and outgoing with a remote peer. The  outstanding  RDMA  Read  outgoing
182       attribute  should  be smaller than the remote Endpoint outstanding RDMA
183       Read incoming attribute. If this is not the case, Connection establish‐
184       ment might fail.
185
186
187       DAT  API  does  not define a protocol on how remote peers exchange End‐
188       point attributes. The exchange of outstanding RDMA  Read  incoming  and
189       outgoing  attributes  of  EPs is left to the Consumer ULP. The Consumer
190       can use Private Data for it.
191
192
193       If the Consumer does not care about posting  RDMA  Read  operations  or
194       remote  RDMA Read operations on the connection, it can set the two out‐
195       standing RDMA Read attribute values to 0.
196
197
198       If the Consumer does not set the two outstanding RDMA  Read  attributes
199       of the Endpoint, the Provider is free to pick up any value for default.
200       The Provider is allowed to change these default values  during  connec‐
201       tion setup.
202

ATTRIBUTES

204       See attributes(5) for descriptions of the following attributes:
205
206
207
208
209       ┌─────────────────────────────┬─────────────────────────────┐
210       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
211       ├─────────────────────────────┼─────────────────────────────┤
212       │Interface Stability          │Standard: uDAPL, 1.1, 1.2    │
213       ├─────────────────────────────┼─────────────────────────────┤
214       │MT-Level                     │Unsafe                       │
215       └─────────────────────────────┴─────────────────────────────┘
216

SEE ALSO

218       libdat(3LIB), attributes(5)
219
220
221
222SunOS 5.11                        16 Jul 2004             dat_ep_connect(3DAT)
Impressum