Send user-initiated disconnect request.
X/Open Transport Interface Library (libxti.a)
#include <xti.h>
int t_snddis (
int fd,
const struct t_call *call)
The t_snddis subroutine is used to initiate an abortive release on an already established connection, or to reject a connect request.
The t_snddis subroutine is an abortive disconnect. Therefore a t_snddis call issued on a connection endpoint may cause data previously sent via the t_snd subroutine, or data not yet received, to be lost (even if an error is returned).
Item | Description |
---|---|
fd | Identifies the local transport endpoint of the connection. |
call | Specifies information associated with the abortive release.
The call parameter points to a t_call structure which
contains the following members:
The values in the call parameter have different semantics, depending on the context of the call to the t_snddis subroutine. When rejecting a connect request, the call parameter 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 the call parameter are ignored. In all other cases, the call parameter need only be used when data is being sent with the disconnect request. The addr, opt and sequence fields of the t_call structure are ignored. If the user does not wish to send data to the remote user, the value of the call parameter may be a null pointer. The udata field specifies the user data to be sent to the remote user. The amount of user data must not exceed the limits supported by the transport provider, as returned in the the t_open or t_getinfo subroutines info parameter discon field. If the len field of udata is zero, no data will be sent to the remote user. |
T_DATAXFER, T_OUTCON, T_OUTREL, T_INREL, T_INCON(ocnt > 0).
Item | Description |
---|---|
0 | Successful completion. |
-1 | t_errno is set to indicate an error. |
On failure, t_errno is set to one of the following:
Value | Description |
---|---|
TBADDATA | The amount of user data specified was not within the bounds allowed by the transport provider. |
TBADF | The specified file descriptor does not refer to a transport endpoint. |
TBADSEQ | An invalid sequence number was specified, or a null call pointer was specified, when rejecting a connect request. |
TLOOK | An asynchronous event, which requires attention has occurred. |
TNOTSUPPORT | This subroutine is not supported by the underlying transport provider. |
TOUTSTATE | The subroutine was issued in the wrong sequence on the transport endpoint referenced by the fd parameter. |
TPROTO | This error indicates that a communication problem has been detected between the X/Open Transport Interface and the transport provider for which there is no other suitable X/Open Transport Interface (t_errno). |
TSYSERR | A system error has occurred during execution of this subroutine. |