up | Inhaltsverzeichniss | Kommentar

Manual page for T_SNDDIS(3N)

t_snddis - send user-initiated disconnect request

SYNOPSIS

#include <tiuser.h>

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

DESCRIPTION

t_snddis() 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 is defined in <nettlie/tiuser.h> as:

struct t_call {
	struct netbuf addr;			/* address		*/
	struct netbuf opt;			/* options		*/
	struct netbuf udata;		/* user data		*/
	int sequence;				/* sequence number	*/
};

The maxlen, len, and buf members of the netbuf structure are described in t_accept.3n 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.3n or t_getinfo.3n If the len field of udata is zero, no data will be sent to the remote user.

RETURN VALUES

t_snddis() returns:

0
on success.
-1
on failure and sets t_errno to indicate the error.

ERRORS

TBADDATA
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.
TBADF
The specified file descriptor does not refer to a transport endpoint.
TBADSEQ
An invalid sequence number was specified. The transport provider's outgoing queue will be flushed, so data may be lost.

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.

TLOOK
An asynchronous event has occurred on this transport endpoint and requires immediate attention.
TNOTSUPPORT
This function is not supported by the underlying transport provider.
TOUTSTATE
The function was issued in the wrong sequence. The transport provider's outgoing queue may be flushed, so data may be lost.
TSYSERR
The function failed due to a system error and set errno to indicate the error.

SEE ALSO

intro.3 t_connect.3n t_getinfo.3n t_listen.3n t_open.3n

[a manual with the abbreviation NETP]


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97