Content-type: text/html
Man page of t_rcvdis
t_rcvdis
Section: C Library Functions (3)
Index
Return to Main Contents
NAME
t_rcvdis - Retrieves disconnect information
LIBRARY
XTI Library (libxti.a)
SYNOPSIS
#include <xti.h>
int t_rcvdis(
int fd,
struct t_discon *discon) ;
STANDARDS
Interfaces documented on this reference page conform to industry
standards as follows:
t_rcvdis: XPG4-UNIX
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 parameters before and after
t_rcvdis()
is called:
Parameter | Before Call | After Call
|
|
fd | y | n
|
discon->udata.maxlen | y | n
|
discon->udata.len | n | y
|
discon->udata.buf | o | (o)
|
discon->reason | n | y
|
discon->sequence | n | o
|
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 where a disconnect occurred.
- discon
-
Points to a type
t_discon
structure used to
specify user-data parameters that can be returned by the transport
user. The
t_discon
structure has the following members:
- struct netbuf udata
-
Specifies a buffer for transport
user data sent to the caller with the disconnect when the
t_rcvdis()
function is
processed. The type
netbuf
structure referenced by
this member is defined in the
xti.h
include file and has the
following 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 reason
-
Specifies the reason the disconnect occurred.
- int sequence
-
Specifies the sequence number identifying an outstanding
connection indication that has been disconnected.
The field sequence is only meaningful when the t_rcvdis()
function is issued by a passive transport user who has issued one or more
t_listen() functions and is processing the resulting
connect indications.
-
-
On return, the discon->udata
buffer
contains information associated with the disconnect. Before the
t_rcvdis()
function is called,
udata.maxlen
must be set
to specify
the maximum byte length of the user-data buffer.
-
-
The discon->reason
parameter specifies the reason for
the disconnect using a protocol-dependent reason code. When protocol
independence is a concern, this information should not be examined.
-
-
When this function is called after issuing one or more
t_listen()
functions, and there is more than one outstanding
transport endpoint connection
(refer to the
t_listen()
function), the
discon->sequence
parameter is used to specify the
outstanding connection indication with which the disconnect is associated.
-
-
When a transport user is not concerned with incoming remote transport
user data, with a reason for a disconnect, or with the sequence number of
the transport endpoint where the disconnect took place, the
discon
parameter
may be specified as a null pointer. When
discon
is specified as a null pointer, no data is returned to the
caller.
-
-
When a transport user knows there is more than one active
connection indication (refer to the
t_look()
function), and this
function is called with the
discon
parameter set to the null pointer
value, there is no way to identify the connection where the
disconnect occurred.
VALID STATES
The
t_rcvdis()
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 0 (zero)).
DESCRIPTION
The
t_rcvdis()
XTI connection-oriented function is used to
identify the cause of
a disconnect at a transport endpoint specified by a file descriptor
returned by the
t_open()
function, and to retrieve any user data
sent with the disconnect.
RETURN VALUES
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_rcvdis()
function fails,
t_errno
is set to one
of the following values:
- [TBADF]
-
File descriptor
fd
does not refer to a valid transport endpoint.
- [TNODIS]
-
No disconnect indication currently exists on the transport
endpoint specified by the
fd
parameter.
- [TBUFOVFLW]
-
The number of bytes allocated for incoming data is not sufficient to
store the data. When
fd
specifies a passive transport endpoint
(the number of outstanding connection indications is greater than 1),
the transport endpoint remains in state T_INCON; otherwise, the
transport endpoint state becomes T_IDLE.
- [TSYSERR]
-
A system error occurred during execution of this function.
- [TOUTSTATE]
-
The
t_rcvdis()
function was issued in the wrong sequence on the
transport endpoint referenced by the
fd
parameter.
- [TNOTSUPPORT]
-
This function is not supported by the underlying transport provider.
- [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_alloc(3),
t_connect(3),
t_listen(3),
t_open(3),
t_snddis(3)
delim off
Index
- NAME
-
- LIBRARY
-
- SYNOPSIS
-
- STANDARDS
-
- PARAMETERS
-
- VALID STATES
-
- DESCRIPTION
-
- RETURN VALUES
-
- ERRORS
-
- RELATED INFORMATION
-
This document was created by
man2html,
using the manual pages.
Time: 02:41:34 GMT, October 02, 2010