HP-UX Reference (11i v2 04/09) - 3 Library Functions N-Z (vol 7)
t
t_accept(3) t_accept(3)
Valid States
fd: T_INCON
resfd (fd != resfd): T_IDLE
Caveats
There may be transport provider-specific restrictions on address binding.
Some transport providers do not differentiate between a connect indication and the connection itself. If
the connection has already been established after a successful return of
t_listen(), t_accept()
will assign the existing connection to the transport endpoint specified by resfd.
RETURN VALUE
Upon successful completion, a value of 0 is returned. Otherwise, a value of −1 is returned, and
t_errno
is set to indicate the error.
ERRORS
On failure,
t_errno is set to one of the following:
[TBADF] The file descriptor, fd or resfd, does not refer to a transport endpoint, or the user is
illegally accepting a connection of the same transport endpoint on which the connect
indication arrived.
[TOUTSTATE] The function was issued in the wrong sequence on the transport endpoint refer-
enced by fd, or the transport endpoint referred to by resfd is not in the appropriate
state.
[TACCES] The user does not have permission to accept a connection on the responding tran-
sport endpoint or use the specified options.
[TBADOPT] The specified options were in an incorrect format or contained illegal information.
[TBADDATA] The amount of user data specified was not within the bounds allowed by the tran-
sport provider.
[TBADADDR] The specified protocol address was in an incorrect format or contained illegal infor-
mation.
[TBADSEQ] An invalid sequence number was specified.
[TLOOK] An asynchronous event has occurred on the transport endpoint referenced by fd and
requires immediate attention.
[TNOTSUPPORT] This function is not supported by the underlying transport provider.
[TSYSERR] A system error has occurred during execution of this function.
[TINDOUT] The function was called with fd==resfd but there are outstanding connection indica-
tions on the endpoint. Those other connection indications must be handled either
by rejecting them via
t_snddis() or accepting them on a different endpoint via
t_accept().
[TPROVMISTMATCH]
(XTI only) The file descriptors fd and resfd do not refer to the same transport pro-
vider.
[TRESQLEN] The endpoint referenced by resfd (where resfd != fd) was bound to a protocol
address with a qlen that is greater than zero.
[TPROTO] (XTI only) 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).
[TRESADDR] This transport provider requires both fd and resfd to be bound to the same address.
This error results if they are not.
FILES
/usr/include/xti.h XTI data structures
/usr/include/xti_iso.h XTI data structures
Section 3−−1044 Hewlett-Packard Company − 2 − HP-UX 11i Version 2: September 2004