t_snddis(3)t_snddis(3)NAMEt_snddis - Send a user-initiated disconnect request
SYNOPSIS
#include <xti.h>
int t_snddis(
int fd,
struct t_call *call );
LIBRARY
XTI Library (libxti.a)
STANDARDS
Interfaces documented on this reference page conform to industry stan‐
dards as follows:
t_snddis(): XNS4.0, XNS5.0
Refer to the standards(5) reference page for more information about
industry standards and associated tags.
PARAMETERS
The following table summarizes the relevance of input and output param‐
eters before and after t_snddis() is called:
──────────────────────────────────────────────
Parameter Before Call After Call
──────────────────────────────────────────────
fd y n
call->addr.maxlen n n
call->addr.len n n
call->addr.buf n n
call->opt.maxlen n n
call->opt.len n n
call->opt.buf n n
call->udata.maxlen n n
call->udata.len y n
call->udata.buf o(o) n
call->sequence o n
──────────────────────────────────────────────
Notes to Table: This is a meaningful parameter. This is not a meaning‐
ful parameter. This an optional parameter. The content of the object
pointed to by y is optional. Specifies a file descriptor returned by
the t_open() function that identifies the transport endpoint at which
the disconnect is wanted. Points to a type t_call structure used to
specify information associated with the disconnect at the transport
endpoint specified by file descriptor fd. When the call parameter is
set to the null pointer value, no data is sent to the remote transport
provider user. The t_call structure has the following members: This
field is ignored. This field is ignored. Specifies a buffer for user
data that may be optionally sent to the remote transport user. The type
netbuf structure referenced by this member is defined in the xti.h
include file. This structure, which is used to explicitly define buffer
parameters, has the following members: Specifies the maximum byte
length of the data buffer. Specifies the actual byte length of data
written to the buffer. Points to the buffer location. Specifies the
identity of the connection for which this disconnect request is
intended and has meaning only when the transport provider is in the
T_INCON state and is rejecting an incoming rejection request.
The udata parameters pointed to by the call parameter need only
be used when data is sent with a disconnect request.
When data is sent with the disconnect request, the size of the
data written to the buffer pointed to by call->udata.buf must
not exceed the limits specified by info->discon, which is
returned by the t_open() or t_getinfo() functions. Failure to
comply with the specified size constraints may result in return
of a [T_SYSERR] protocol error.
The sequence parameter is meaningful only if the transport user
is rejecting an incoming connection request and needs to iden‐
tify which incoming connection request to reject.
DESCRIPTION
The t_snddis() XTI connection-oriented function is used to initiate an
abortive disconnect at an established transport endpoint. The transport
endpoint is specified by a file descriptor returned by the t_open()
function. The t_snddis() function uses type t_call and netbuf struc‐
tures, which are defined in the xti.h include file.
NOTES
Note that t_snddis() is an abortive disconnect. This means that if
t_snddis() is issued on a connection endpoint, it may cause data previ‐
ously sent with t_snd(), or data not yet received, to be lost, even if
an error is returned.
ERRORS
If the t_snddis() function fails, t_errno may be set to one of the fol‐
lowing values: File descriptor fd does not refer to a valid transport
endpoint. The amount of user data specified was not within the bounds
allowed by the transport provider. Some outbound data queued for this
endpoint may be lost. An invalid sequence number was specified, or a
null value was used for the call parameter when the connect request was
rejected. Some outbound data queued for this endpoint may be lost.
This function is not supported by the underlying transport provider.
This function was issued in the wrong sequence at the transport end‐
point referenced by the fd parameter. A system error occurred during
execution of this function. An asynchronous event that requires atten‐
tion has occurred. This error indicates that a communication problem
has been detected between XTI and the transport provider for which
there is no other suitable XTI(t_errno).
VALID STATES
The t_snddis function can be called in the following transport provider
states: T_DATAXFER, T_OUTCON, T_OUTREL, T_INREL, and T_INCON (when the
number of outstanding connections is greater than zero).
RETURN VALUE
Upon successful completion, a value of 0 (zero) is returned. Otherwise,
a value of -1 is returned and t_errno is set to indicate the error.
SEE ALSO
Functions: t_connect(3), t_getinfo(3), t_listen(3), t_open(3)
Standards: standards(5)
Network Programmer's Guide
t_snddis(3)