t_snddis -- send user-initiated disconnect request


TLI syntax

cc . . . -lnsl

#include <sys/tiuser.h>

int t_snddis (fd, call) int fd; struct t_call *call;

XTI syntax

cc . . . -lxti

#include <xti.h>

int t_snddis (fd, call) int fd; struct t_call *call;


The t_snddis function is used to initiate an abortive release on an already established connection or to reject a connect request. fd identifies the local transport endpoint of the connection, and call specifies information associated with the abortive release. call points to a t_call structure which contains the following members:
   struct netbuf addr;
   struct netbuf opt;
   struct netbuf udata;
   int sequence;
netbuf is described in netbuf(FP). 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 addr and opt fields of call are ignored. In all other cases, call 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 call may be NULL.

udata 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 t_open or t_getinfo. If the len field of udata is zero, data is not sent to the remote user.

Return values

The t_snddis function returns 0 on success and -1 on failure, and t_errno is set to indicate the error.


On failure, t_errno may be set to one of the following:

The specified file descriptor does not refer to a transport endpoint.

The amount of user data specified was not within the bounds allowed by the transport provider. The transport provider's outgoing queue is flushed, so data may be lost.

An invalid sequence number was specified, or a NULL call structure was specified when rejecting a connect request. The transport provider's outgoing queue is flushed, so data may be lost.

An asynchronous event has occurred on this transport endpoint and requires immediate attention.

The T_CLTS service type is not supported by the underlying transport provider.

The function was issued in the wrong sequence. The transport provider's outgoing queue may be flushed, so data may be lost.

A system error has occurred during execution of this function.

See also

Intro(NET), netbuf(FP), t_connect(NET), t_getinfo(NET), t_listen(NET), t_open(NET)

Standards conformance

t_snddis is conformant with:

AT&T SVID Issue 3 ;
X/Open CAE Specification, Networking Services, Issue 4, 1994. ;
and Intel386 Binary Compatibility Specification, Edition 2 (iBCSe2) .

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003