|
|
#include <sys/tiuser.h>int t_accept (fd, resfd, call) int fd, resfd; struct t_call *call;
#include <xti.h>int t_accept (fd, resfd, call) int fd, resfd; struct t_call *call;
struct netbuf addr; /* caller's address */ struct netbuf opt; /* options */ struct netbuf udata; /* user data returned by caller */ int sequence; /* value returned by t_listen */Refer to netbuf(FP) for information about the netbuf structure. In call,
addr
is the address of the caller, opt
indicates any
protocol-specific parameters associated with the connection,
udata
points to any user data to be returned to the caller,
and sequence is the value returned by t_listen
that uniquely associates the response with a previously received
connect indication.
A transport user may accept a connection on either the same, or on a different, local transport endpoint than the one on which the connect indication arrived. If the same endpoint is specified (that is, resfd=fd), the connection can be accepted unless the following condition is true: the user has received other indications on that endpoint but has not responded to them (with t_accept or t_snddis). For this condition, t_accept fails and sets t_errno to TBADF.
If a different transport endpoint is specified (resfd!=fd),
the endpoint must be bound to a protocol address and must be
in the T_IDLE state (see
t_getstate(NET))
before the
t_accept is issued.
For both types of endpoints, t_accept fails and set t_errno to TLOOK if there are indications (for example, a connect or disconnect) waiting to be received on that endpoint.
The values of parameters specified by opt
and the syntax of
those values are protocol specific.
The udata
argument
enables the called transport user to send user data to the caller
and the amount of user data must not exceed the limits supported
by the transport provider as returned by t_open or
t_getinfo.
If the len
field of udata
is zero, no data is
sent to the caller.
AT&T SVID Issue 3
;
X/Open CAE Specification, Networking Services, Issue 4, 1994.
;
and
Intel386 Binary Compatibility Specification, Edition 2 (iBCSe2)
.