| YPCONNECT(2) | System Calls Manual | YPCONNECT(2) |
ypconnect — create
connected socket to a YP server
#include
<sys/socket.h>
int
ypconnect(int
type);
The
ypconnect()
system call creates a pre-connected SOCK_STREAM or
SOCK_DGRAM socket to a YP server (either the original
ypserv(8) 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 purpose. ypconnect is only intended for use
by internal libc YP functions.
If successful, ypconnect() returns a
non-negative integer, the socket file descriptor. Otherwise, a value of -1
is returned and errno is set to indicate the
error.
ypconnect() will fail if:
EAFNOSUPPORT]EFTYPE]EOWNERDEAD]EMFILE]ENFILE]ENOBUFS]The ypconnect() function first appeared in
OpenBSD 7.2.
| July 21, 2022 | Debian |