HP-UX Reference (11i v1 00/12) - 2 System Calls (vol 5)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man2/!!!intro.2
________________________________________________________________
___ ___
c
connect(2) connect(2)
[ENETUNREACH] The network is not reachable from this host.
For AF_CCITT only: X.25 Level 2 is down. The X.25 link is not working:
wires might be broken, connections are loose on the interface hoods at the
modem, the modem failed, or noise interfered with the line for an
extremely long period of time.
[ENOBUFS] No buffer space is available. The connect() has failed.
[ENOMEM] No memory is available. The connect() has failed.
[ENODEV] The x25ifname field refers to a nonexistent interface.
[ENOSPC] All availablevirtual circuits are in use.
[ENOTSOCK] s is a valid file descriptor, but it is not a socket.
[EOPNOTSUPP] The socket referenced by s does not support connect(). With X.25 an
attempt was made to issue a connect() call on a listen() socket.
[ETIMEDOUT] Connection establishment timed out without establishing a connection.
One reason could be that the connection requests queue at the remote
socket may be full (see listen(2)).
OBSOLESCENCE
Currently, the
socklen_t and size_t types are the same size. This is compatible with both the UNIX
95 and UNIX 98 profiles. However, in a future release, socklen_t might be a different size, but that
should not adversely affect application behavior in this case. Applications may use
socklen_t now. But
applications that need to be portable to the UNIX 95 profile should follow the X/Open specification (see
xopen_networking(7)).
FUTURE DIRECTION
Currently, the default behavior is the HP-UX BSD Sockets; however, it might be changed to X/Open
Sockets in a future release. At that time, any HP-UX BSD Sockets behavior that is incompatible with
X/Open Sockets might be obsoleted. Applications that conform to the X/Open specification now will avoid
migration problems (see xopen_networking(7)).
MULTITHREAD USAGE
The
connect() system call is thread-safe. It has a cancellation point; and it is async-cancel safe, async-
signal safe, and fork-safe.
AUTHOR
connect() was developed by HP and the University of California, Berkeley.
SEE ALSO
accept(2), getsockname(2), select(2), socket(2), af_ccitt(7F), af_vme_link(7F), socket(7), socketx25(7),
xopen_networking(7).
Section 240 3 HP-UX Release 11i: December 2000
___
___