Sends a user-initiated disconnect request.
Transport Layer Interface Library (libtli.a)
int t_snddis(fd, call)
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.
|Identifies the local transport end point of the connection.
|Specifies information associated with the abortive release.
struct netbuf addr; struct netbuf opt; struct netbuf udata; int sequence;
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 not be null and must contain a valid value in the sequence field to uniquely identify the rejected connect indication to the transport provider. 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 can be null.
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 by the t_open or t_getinfo subroutine. If the len field of the udata field is 0, no data will be sent to the remote user.
On successful completion, the t_snddis subroutine returns a value of 0. Otherwise, it returns a value of -1 and sets the t_errno variable to indicate the error.
If unsuccessful, the
t_errno variable is set to one of the following:
|The specified file descriptor does not refer to a transport end point.
|The function was issued in the wrong sequence. The transport provider's outgoing queue may be flushed, so data may be lost.
|The amount of user data specified was not within the bounds allowed by the transport provider. The transport provider's outgoing queue will be flushed, so data may be lost.
|An incorrect sequence number was specified, or a null call structure was specified when rejecting a connect request. The transport provider's outgoing queue will be flushed, so data may be lost.
|An asynchronous event has occurred on this transport endpoint and requires immediate attention.
|This subroutine is not supported by the underlying transport provider.
|A system error has occurred during execution of this subroutine.
This subroutine is part of Base Operating System (BOS) Runtime.
The t_connect subroutine, t_getinfo subroutine, t_listen subroutine, t_look subroutine, t_open subroutine.
List of Streams Programming References and STREAMS Overview in AIX 5L Version 5.1 Communications Programming Concepts.