Sends a user-initiated disconnect request.
Transport Layer Interface Library (libtli.a)
#include <tiuser.h>
int t_snddis(fd, call) int fd; 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.
fd | Identifies the local transport end point of the connection. |
call | Specifies information associated with the abortive release.
The call parameter points to a t_call structure containing the following fields: 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:
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 Version 4.3 Communications Programming Concepts.