t_rcvconnect(3) CLIX t_rcvconnect(3)
NAME
t_rcvconnect - Receives confirmation from a connect request
LIBRARY
The Transport Layer Interface (TLI) Library (libnsl_s.a)
SYNOPSIS
#include <tiuser.h>
int t_rcvconnect(
int fd ,
struct t_call *call );
PARAMETERS
fd Identifies the local transport endpoint where communication will be
established.
call Points to a t_call structure.
DESCRIPTION
The t_rcvconnect() function enables a calling transport user to determine
the status of a previously sent connect request. It is used in
conjunction with t_connect() to establish a connection in the asynchronous
mode. The connection is officially established upon successful completion
of this function.
The fd parameter identifies the local transport endpoint where
communication will be established. The call parameter contains
information associated with the newly established connection. This
parameter (call) points to a t_call structure that contains the following
members:
struct netbuf addr;
struct netbuf opt;
struct netbuf udata;
int sequence;
The netbuf structure is described in intro(3). In the call variable, addr
returns the protocol address associated with the responding transport
endpoint. The opt member presents any protocol-specific information
associated with the connection; whereas, the udata member points to
optional user data that may be returned by the destination transport user
during the establishment of the connection. The sequence member does not
apply to this function.
The maxlen variable field for each argument must be set before issuing
2/94 - Intergraph Corporation 1
t_rcvconnect(3) CLIX t_rcvconnect(3)
this function in order to indicate the maximum size of the buffer for
each. (For more information, refer to the description of the netbuf
parameters located in the intro(3) manpage.)
The call argument may be NULL, in which case no information is given to
the user on return from t_rcvconnect(). By default, the t_rcvconnect()
function executes in the synchronous mode and waits for the connection to
be established before returning. On return, the addr, opt, and udata
members will reflect the values associated with the connection.
If O_NDELAY is set (with t_open or fcntl), t_rcvconnect() will execute in
the asynchronous mode, and instead of waiting for the connection to be
established, it will merely poll for existing connect confirmations. If
none are available, t_rcvconnect() fails and returns immediately without
waiting for the connection to be established. (See TNODATA below.) The
t_rcvconnect() function must be re-issued at a later time to complete the
connection establishment phase and retrieve the information returned in
the call variable.
RETURN VALUES
The t_rcvconnect() function returns 0 on success and -1 on failure.
ERRORS
In this function, t_errno is set to indicate any errors. On failure,
t_errno may be set to one of the following:
[TBADF]
This specified file descriptor does not refer to a transport
endpoint.
[TBUFOVFLW]
This file descriptor is used when the number of bytes allocated for
an incoming argument is not sufficient to store the value of that
argument. The amount of connect information to be returned in call
will be discarded. The provider's state, as seen by the user, will
be changed to DATAXFER.
[TNODATA]
This descriptor is used if O_NDELAY was set, but a connection
confirmation has not yet arrived.
[TLOOK]
This descriptor indicates that an asynchronous event has occurred
on the transport connection and requires immediate attention.
[TNOTSUPPORT]
This function is not supported by the underlying transport
provider.
2 Intergraph Corporation - 2/94
t_rcvconnect(3) CLIX t_rcvconnect(3)
[TSYSERR]
This descriptor indicates that a system error has occurred during
the execution of this function.
RELATED INFORMATION
Functions: t_accept(3), t_bind(3), t_connect(3), t_listen(3), t_open(3),
intro(3)
AT&T UNIX System V Network Programmer's Guide
2/94 - Intergraph Corporation 3