Standards / Extensions | C or C++ | Dependencies |
---|---|---|
XPG4.2 | both |
#define _XOPEN_SOURCE_EXTENDED 1
#include <xti.h>
int t_snddis(int fd, struct t_call *call);
struct netbuf addr;
struct netbuf opt;
struct netbuf udata;
int sequence;
The values in call have
different semantics, depending on the context of the call to t_snddis()
. When rejecting a connect request, call must be non-NULL
and contain a valid value of sequence to uniquely identify
the rejected connect indication to the transport provider. The sequence field
is only meaningful if the transport connection is in the T_INCON state.
The addr and opt fields of call are ignored.
In all other cases, call should be a NULL pointer, since
its only use would be to specify user data to be passed on the disconnect
request, which is not supported by the TCP transport provider.t_snddis() is an abortive disconnect. Therefore a t_snddis() issued on a connection endpoint may cause data previously sent using t_snd(), or data not yet received, to be lost (even if an error is returned).
Because of implementation restrictions, a t_snddis() called on one descriptor referring to an endpoint will not affect descriptors in other processes referring to the same endpoint. If descriptors in multiple processes refer to the same endpoint, the endpoint will not actually be disconnected by a t_snddis in one process. Multiple processes cooperating on an endpoint are responsible for providing their own explicit synchronization to support coordinated disconnects.
Valid states: T_DATAXFER,T_OUTCON,T_INCON(ocnt > 0)
If successful, t_snddis() returns 0.