Direct Access Transport Library Functions
datepdisconnect(3DAT)
NAME
datepdisconnect - terminate a connection or a connection
establishment
SYNOPSIS
cc [ flag... ] file... -ldat [ library... ]
#include
DATRETURN
datepdisconnect (
IN DATEPHANDLE ephandle,
IN DATCLOSEFLAGS disconnectflags
)
PARAMETERS
ephandle Handle for an instance of Endpoint.
disconnectflags Flags for disconnect. Flag values are as
follows:
DATCLOSEABRUPTFLAG Abrupt close.
This is the
default
value.
DATCLOSEGRACEFULFLAG Graceful
close.
DESCRIPTION
The datepdisconnect() function requests a termination of a
connection or connection establishment. This operation is
used by the active/client or a passive/server side Consumer
of the connection model.
The disconnectflags parameter allows Consumers to specify
whether they want graceful or abrupt disconnect. Upon
disconnect, all outstanding and in-progress DTOs and RMR
Binds must be completed.
For abrupt disconnect, all outstanding DTOs and RMR Binds
are completed unsuccessfully, and in-progress DTOs and RMR
Binds can be completed successfully or unsuccessfully. If an
in-progress DTO is completed unsuccessfully, all follow on
in-progress DTOs in the same direction also must be
SunOS 5.11 Last change: 16 Jul 2004 1
Direct Access Transport Library Functions
datepdisconnect(3DAT)
completed unsuccessfully. This order is presented to the
Consumer through a DTO completion Event Stream of the
recvevdhandle and and requestevdhandle of the Endpoint.
For graceful disconnect, all outstanding and in-progress
request DTOs and RMR Binds must try to be completed success-
fully first, before disconnect proceeds. During that time,
the local Endpoint is in a DATEPDISCONECTPENDING state.
The Consumer can call abrupt datepdisconnect() when the
local Endpoint is in the DATEPDISCONECTPENDING state.
This causes the Endpoint to transition into
DATEPSTATEDISCONECTED without waiting for outstanding
and in-progress request DTOs and RMR Binds to successfully
complete. The graceful datepdisconnect() call when the
local Endpoint is in the DATEPDISCONECTPENDING state has
no effect.
If the Endpoint is not in DATEPSTATECONECTED, the seman-
tic of the operation is the same for graceful or abrupt
disconnectflags value.
No new Send, RDMA Read, and RDMA Write DTOs, or RMR Binds
can be posted to the Endpoint when the local Endpoint is in
the DATEPDISCONECTPENDING state.
The successful completion of the disconnect is reported to
the Consumer through a DATCONECTIONEVENTDISCONECTED
event on connectevdhandle of the Endpoint. The Endpoint is
automatically transitioned into a DATEPSTATEDISCONECTED
state upon successful asynchronous completion. If the same
EVD is used for connectevdhandle and any recvevdhandle
and requestevdhandle, all successful Completion events of
in-progress DTOs precede the Disconnect Completion event.
Disconnecting an unconnected Disconnected Endpoint is no-op.
Disconnecting an Endpoint in DATEPSTATEUNCONECTED,
DATEPSTATERESERVED,
DATEPSTATEPASIVECONECTIONPENDING, and
DATEPSTATETENTATIVECONECTIONPENDING is disallowed.
Both abrupt and graceful disconnect of the Endpoint during
connection establishment,
DATEPSTATEACTIVECONECTIONPENDING and
SunOS 5.11 Last change: 16 Jul 2004 2
Direct Access Transport Library Functions
datepdisconnect(3DAT)
DATEPSTATECOMPLETIONPENDING, "aborts" the connection
establishment and transitions the local Endpoint into
DATEPSTATEDISCONECTED. That causes preposted Recv DTOs
to be flushed to recvevdhandle.
RETURN VALUES
DATSUCES The operation was successful.
DATINVALIDHANDLE The ephandle parameter is
invalid.
DATINSUFICIENTRESOURCES The operation failed due to
resource limitations.
DATINVALIDPARAMETER The disconnectflags parameter
is invalid.
DATINVALIDSTATE A parameter is in an invalid
state. Endpoint is not in the
valid state for disconnect.
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 3
Direct Access Transport Library Functions
datepdisconnect(3DAT)
SunOS 5.11 Last change: 16 Jul 2004 4
|