t_snddis - Send a user-initiated disconnect request
struct t_call *call );
XTI Library (libxti.a)
Interfaces documented on this reference page conform to
industry standards as follows:
t_snddis(): XNS4.0, XNS5.0
Refer to the standards(5) reference page for more information
about industry standards and associated tags.
The following table summarizes the relevance of input and
output parameters 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 meaningful 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
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 identify which incoming connection
request to reject.
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 structures,
which are defined in the xti.h include file.
Note that t_snddis() is an abortive disconnect. This means
that if t_snddis() is issued on a connection endpoint, it
may cause data previously sent with t_snd(), or data not
yet received, to be lost, even if an error is returned.
If the t_snddis() function fails, t_errno may be set to
one of the following 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
endpoint referenced by the fd parameter. A system error
occurred during execution of this function. An asynchronous
event that requires attention 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).
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).
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.
Functions: t_connect(3), t_getinfo(3), t_listen(3),
Network Programmer's Guide
[ Back ]