Manual Page Result
0
Command: t_snddis | Section: 3 | Source: Digital UNIX | File: t_snddis.3.gz
t_snddis(3) Library Functions Manual t_snddis(3)
NAME
t_snddis - Sends user-initiated disconnect request
LIBRARY
XTI Library (libxti.a)
SYNOPSIS
#include <xti.h>
int t_snddis(
int fd,
struct t_call *call) ;
STANDARDS
Interfaces documented on this reference page conform to industry stan-
dards as follows:
t_snddis: XPG4-UNIX
Refer to the standards(5) reference page for more information about in-
dustry standards and associated tags.
PARAMETERS
The following table summarizes the relevance of input and output para-
meters before and after t_snddis() is called:
center, tab(@); lb lb lb l c c. 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:
y This is a meaningful parameter.
n This is not a meaningful parameter.
o This an optional parameter.
(o) The content of the object pointed to by y is optional.
fd Specifies a file descriptor returned by the t_open() function
that identifies the transport endpoint at which the disconnect
is wanted.
call Points to a type t_call structure used to specify information
associated with the disconnect at the transport endpoint speci-
fied 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:
struct netbuf addr
This field is ignored.
struct netbuf opt
This field is ignored.
struct netbuf udata
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 fol-
lowing members:
unsigned int maxlen
Specifies the maximum byte length of the data buffer.
unsigned int len
Specifies the actual byte length of data written to the buffer.
char *buf
Points to the buffer location.
int sequence
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 re-
jection 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 identify
which incoming connection request to reject.
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).
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.
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.
ERRORS
If the t_snddis() function fails, t_errno may be set to one of the fol-
lowing values:
[TBADF] File descriptor fd does not refer to a valid transport end-
point.
[TBADDATA]
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.
[TBADSEQ] An invalid sequence number was specified, or a null value was
used for the call parameter when the connect request was re-
jected. Some outbound data queued for this endpoint may be
lost.
[TNOTSUPPORT]
This function is not supported by the underlying transport
provider.
[TOUTSTATE]
This function was issued in the wrong sequence at the trans-
port endpoint referenced by the fd parameter.
[TSYSERR] A system error occurred during execution of this function.
[TLOOK] An asynchronous event that requires attention has occurred.
[TPROTO] 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).
RELATED INFORMATION
Functions: t_connect(3), t_getinfo(3), t_listen(3), t_open(3) delim off
t_snddis(3)