Manual Page Result
0
Command: t_rcvconnect | Section: 3 | Source: Digital UNIX | File: t_rcvconnect.3.gz
t_rcvconnect(3) Library Functions Manual t_rcvconnect(3)
NAME
t_rcvconnect - Receives the confirmation from a connect request
LIBRARY
XTI Library (libxti.a)
SYNOPSIS
#include <xti.h>
int t_rcvconnect(
int fd,
struct t_call *call) ;
STANDARDS
Interfaces documented on this reference page conform to industry stan-
dards as follows:
t_rcvconnect: 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_rcvconnect() is called:
center,tab (@); lb lb lb l c c. Parameter@Before Call@After Call _
fd@y@n call->addr.maxlen@y@n call->addr.len@n@y call->addr.buf@o@(o)
call->opt.maxlen@y@n call->opt.len@n@y call->opt.buf@o@(o)
call->udata.maxlen@y@n call->udata.len@n@y call->udata.buf@o@(o)
call->sequence@n@n Notes to Table
y This is a meaningful parameter.
n This is not a meaningful parameter.
(o) The content of the object pointed to by o is optional.
(y) The content of the object pointed to by y is meaningful.
fd Specifies a file descriptor returned by the t_open() function
that identifies the local transport endpoint where the connec-
tion is to be established.
call Points to a type t_call structure, used to reserve space for a
buffer that stores information associated with the connection at
the transport endpoint referenced by the fd parameter. When the
call parameter is set to the null pointer value, no data is re-
turned to the caller. The t_call structure has the following
members:
struct netbuf addr
References a buffer for protocol address information returned from
the transport endpoint specified by the fd parameter. 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.
struct netbuf opt
Specifies a buffer for protocol-specific parameters associated
with the connection.
struct netbuf udata
Specifies a buffer for transport user data sent from the destina-
tion transport user.
int sequence
This parameter is not meaningful for the t_rcvconnect() function.
The addr parameters pointed to by the call parameter specify pro-
tocol address information associated with the responding transport
endpoint. Before this function is called, the addr.maxlen parame-
ter must be set to specify the maximum byte length of the proto-
col-address buffer pointed to by the addr.buf parameter, which is
used to hold the protocol address of the responding transport end-
point.
On return, the addr.len parameter specifies the actual transport
endpoint protocol-address byte length and the buffer pointed to by
addr.buf contains the transport endpoint protocol address.
The opt parameters pointed to by the call parameter specify op-
tional information associated with the responding transport end-
point. Before this function is called, the opt.maxlen parameter
must be set to specify the maximum byte length of the options-data
buffer pointed to by the opt.buf parameter, which is used to hold
optional information from the responding transport endpoint when
it is provided.
On return, the opt.len parameter specifies the actual transport
endpoint optional-data byte length and the data buffer pointed to
by opt.buf contains transport endpoint optional data.
The udata parameters pointed to by the call parameter specify user
information associated with the responding transport endpoint.
Before this function is called, the udata.maxlen parameter must be
set to specify the maximum byte length of the user-data buffer
pointed to by the udata.buf parameter, which is used to hold re-
mote transport user information from the responding transport end-
point when it is provided.
On return, the udata.len parameter specifies the actual transport
endpoint user-data byte length and the data buffer pointed to by
udata.buf contains transport endpoint user data.
VALID STATES
The t_rcvconnect() function can only be called in the T_OUTCON trans-
port provider state.
DESCRIPTION
The t_rcvconnect() XTI function enables a calling transport user to de-
termine the status of a previously sent connect request at a transport
endpoint specified by a file descriptor returned by the t_open() func-
tion. The t_rcvconnect() function is used in conjunction with the
t_connect() function to establish a connection in asynchronous mode.
By default, this function executes in synchronous mode, waiting for the
connection to be established before returning control to the caller.
However, when the transport endpoint specified by the fd file descrip-
tor has been opened with the O_NONBLOCK flag set in the t_open() or
t_fcntl() functions, the t_connect() function executes in asynchronous
mode. In asynchronous mode, when no connection confirmation is avail-
able, control is immediately returned to the caller. In this case,
t_rcvconnect() must be called again to complete the connection estab-
lishment and retrieve the information in the call parameter.
The t_rcvconnect() function uses type t_call and netbuf structures,
which are defined in the xti.h include file.
RETURN VALUE
Upon successful completion, a value of 0 (zero) is returned. Other-
wise, a value of -1 is returned and t_errno is set to indicate the er-
ror.
ERRORS
If the t_rcvconnect() function fails, t_errno may be set to one of the
following values:
[TBADF] The specified file descriptor does not refer to a transport
endpoint.
[TBUFOVFLW]
The number of bytes allocated for incoming data is not suffi-
cient for storage of that data. The connect information nor-
mally returned to the call parameter is discarded. The
transport provider state is changed to T_DATAXFER.
[TNODATA] Asynchronous mode is indicated because O_NONBLOCK was set,
but no connect confirmation is currently available from the
transport provider.
[TLOOK] An asynchronous event has occurred on this transport connec-
tion and requires immediate attention (refer to the t_look()
function).
[TOUTSTATE]
The function was issued in the wrong sequence on the trans-
port endpoint referenced by the fd parameter.
[TSYSERR] A system error occurred during execution of this function.
[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_accept(3), t_alloc(3), t_bind(3), t_connect(3), t_lis-
ten(3), t_open(3), t_optmgmt(3) delim off
t_rcvconnect(3)