OpenBSD manual page server

Manual Page Search Parameters

YPCONNECT(2) System Calls Manual YPCONNECT(2)

ypconnectcreate connected socket to a YP server

#include <sys/socket.h>

ypconnect(int type);

The () 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:

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)

The ypconnect() function first appeared in OpenBSD 7.2.

July 21, 2022 OpenBSD-current