Direct Access Transport Library Functions datepconnect(3DAT)
NAME
datepconnect - establish a connection between the local
Endpoint and a remote Endpoint
SYNOPSIS
cc [ flag... ] file... -ldat [ library... ]
#include
DATRETURN
datepconnect (
IN DATEPHANDLE ephandle,
IN DATIADRESPTR remoteiaaddress,
IN DATCONQUAL remoteconnqual,
IN DATIMEOUT timeout,
IN DATCOUNT privatedatasize,
IN const DATPVOID privatedata,
IN DATQOS qos,
IN DATCONECTFLAGS connectflags
)
PARAMETERS
ephandle Handle for an instance of an Endpoint.
remoteiaaddress The Address of the remote IA to which
an Endpoint is requesting a connection.
remoteconnqual Connection Qualifier of the remote IA
from which an Endpoint requests a con-
nection.
timeout Duration of time, in microseconds, that
a Consumer waits for Connection estab-
lishment. The value of
DATIMEOUTINFINITE represents no
timeout, indefinite wait. Values must
be positive.
privatedatasize Size of the privatedata. Must be non-
negative.
privatedata Pointer to the private data that should
be provided to the remote Consumer as
part of the Connection Request. If
privatedatasize is zero, then
privatedata can be NUL.
SunOS 5.11 Last change: 16 Jul 2004 1
Direct Access Transport Library Functions datepconnect(3DAT)
qos Requested quality of service of the
connection.
connectflags Flags for the requested connection. If
the least significant bit of
DATMULTIPATHFLAG is 0, the Consumer
does not request multipathing. If the
least significant bit of
DATMULTIPATHFLAG is 1, the Consumer
requests multipathing. The default
value is DATCONECTDEFAULTFLAG,
which is 0.
DESCRIPTION
The datepconnect() function requests that a connection be
established between the local Endpoint and a remote End-
point. This operation is used by the active/client side Con-
sumer of the Connection establishment model. The remote End-
point is identified by Remote IA and Remote Connection Qual-
ifier.
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
DATCONECTIONREQUESTEVENT.
The Consumer-provided privatedata is passed to the remote
side and is provided to the remote Consumer in the Connec-
tion 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 estab-
lishment by the Transport.
Upon successful completion of this operation, the local End-
point is transferred into
DATEPSTATEACTIVECONECTIONPENDING.
Consumers can request a specific value of qos. The Provider
specifies which quality of service it supports in documenta-
tion and in the Provider attributes. If the local Provider
or Transport does not support the requested qos, the opera-
tion fails and DATMODELNOTSUPORTED is returned
SunOS 5.11 Last change: 16 Jul 2004 2
Direct Access Transport Library Functions datepconnect(3DAT)
synchronously. If the remote Provider does not support the
requested qos, the local Endpoint is automatically transi-
tioned into the DATEPSTATEDISCONECTED state, the connec-
tion is not established, and the event returned on the
connectevdhandle is
DATCONECTIONEVENTNONPEREJECTED. The same
DATCONECTIONEVENTNONPEREJECTED 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 Con-
sumer is not listening on the requested Connection Qualif-
ier, Backlog of the requested Service Point is full, and
Transport errors. In this case, the local Endpoint is
automatically transitioned into DATEPSTATEDISCONECTED
state.
The acceptance of the requested connection by the remote
Consumer is reported to the local Consumer through a
DATCONECTIONEVENTESTABLISHED event on the
connectevdhandle of the local Endpoint and the local End-
point is automatically transitioned into a
DATEPSTATECONECTED state.
The rejection of the connection by the remote Consumer is
reported to the local Consumer through a
DATCONECTIONEVENTPEREJECTED event on the
connectevdhandle of the local Endpoint and the local End-
point is automatically transitioned into a
DATEPSTATEDISCONECTED state.
When the Provider cannot reach the remote host or the remote
host does not respond within the Consumer requested Timeout,
a DATCONECTIONEVENTUNREACHABLE event is generated on the
connectevdhandle of the Endpoint. The Endpoint transitions
into a DATEPSTATEDISCONECTED state.
If the Provider can locally determine that the
remoteiaaddress is invalid, or that the remoteiaaddress
cannot be converted to a Transport-specific address, the
operation can fail synchronously with a DATINVALIDADRES
return.
The local Endpoint is automatically transitioned into a
DATEPSTATECONECTED 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
SunOS 5.11 Last change: 16 Jul 2004 3
Direct Access Transport Library Functions datepconnect(3DAT)
DATCONECTIONEVENTESTABLISHED event on the
connectevdhandle of the local Endpoint.
When the timeout expired prior to completion of the Connec-
tion establishment, the local Endpoint is automatically
transitioned into a DATEPSTATEDISCONECTED state and the
local Consumer through a DATCONECTIONEVENTIMEDOUT
event on the connectevdhandle of the local Endpoint.
RETURN VALUES
DATSUCES The operation was successful.
DATINSUFICIENTRESOURCES The operation failed due to
resource limitations.
DATINVALIDPARAMETER Invalid parameter.
DATINVALIDADRES Invalid address.
DATINVALIDHANDLE Invalid DAT handle; Invalid
Endpoint handle.
DATINVALIDSTATE Parameter in an invalid state.
Endpoint was not in
DATEPSTATEUNCONECTED
state.
DATMODELNOTSUPORTED The requested Model was not
supported by the Provider. For
example, the requested qos was
not supported by the local
Provider.
USAGE
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.
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
SunOS 5.11 Last change: 16 Jul 2004 4
Direct Access Transport Library Functions datepconnect(3DAT)
the Consumer ULP. The Consumer can use Private Data for it.
If the Consumer does not care about posting RDMA Read opera-
tions or remote RDMA Read operations on the connection, it
can set the two outstanding RDMA Read attribute values to 0.
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.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Standard: uDAPL, 1.1, 1.2
MT-Level Unsafe
SEE ALSO
libdat(3LIB), attributes(5)
SunOS 5.11 Last change: 16 Jul 2004 5
|