Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

t_snddis() - refuse or abort a connection

&pagelevel(4)&pagelevel

#include <xti.h>

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

Description

The user can execute the following actions with the t_snddis() function:

  • refuse a connection request

  • initiate an abortive release of an established connection

The fd parameter specifies the local transport endpoint of the connection to be shut down or requested.

The call parameter points to an object of type struct t_call.

The t_call structure is declared in <xti.h> as follows:

struct t_call {
   struct netbuf addr;
   struct netbuf opt;
   struct netbuf udata;
   int sequence;
};

The call parameter is used differently, depending on whether t_snddis() is to be used to refuse a connection request or set a connection up.

  • If a connection request is to be refused, the null pointer must not be passed for call with the t_snddis() call. The user must specify a value in call->sequence that identifies the refused connection request to the transport provider. The contents of call->addr, call->opt and call->udata are ignored by t_snddis().

  • The null pointer can be passed for call if a connection is to be shut down.

Return value

0:

If successful.

-1:

If an error occurs. t_ errno is set to indicate the error.

Errors

TBADF

The specified file descriptor does not reference a transport endpoint.

TBADSEQ

An invalid sequential number was specified or the null pointer was specified for call when refusing connection request. The outgoing queue of the transport provider is deleted, which can cause loss of data.

TLOOK

An asynchronous event occurred on the transport endpoint passed in fd and this must be processed immediately.

TNOTSUPPORT

This function is not supported by the underlying transport provider.

TOUTSTATE

The function was called in the wrong position within a sequence of XTI function calls for transport endpoint fd. The outgoing queue of the transport provider may be deleted, which can cause loss of data.

TSYSERR

A system error occurred during execution of this function.

See also

t_connect(), t_getinfo(), t_listen(), t_open()