create connected socket to a YP
system call creates a pre-connected SOCK_STREAM or
SOCK_DGRAM socket to a YP server (either the original
or ypldap(8)) for use by internal library routines. It verifies that the
domainname is set, that ypbind(8) has found a server and created an advisory locked
binding file, and then creates the connected socket based upon the binding
file. This type of socket is restricted in various ways and is not general
ypconnect is only intended for use by
internal libc YP functions.
ypconnect() returns a
non-negative integer, the socket file descriptor. Otherwise, a value of -1
is returned and errno is set to indicate the
ypconnect() will fail if:
- The YP subsystem is not active.
- The YP binding file is strange.
- The YP binding file is not locked. YP subsystem is not active.
- The per-process descriptor table is full.
- The system file table is full.
- Insufficient resources were available in the system to perform the operation.
connect(2), socket(2), ypbind(8)
ypconnect() function first appeared in