CLDAP_OPEN(3)

NAME
cldap_open - Prepare for Connectionless LDAP Communication

SYNOPSIS
#include <lber.h>
#include <ldap.h>

LDAP *cldap_open(host, port)
char *host;
int port;

DESCRIPTION

The cldap_open() routine is called to prepare for connectionless LDAP communication (over udp(4p)). It allocates an LDAP structure which is passed to future search requests.

cldap_open() takes host, the nane of the host on which the LDAP server is running, and port, the port number to which to connect. If the default IANA-assigned port of 389 is desired, LDAP_PORT should be specified for port. host can contain a space-separated list of hosts or addresses to try. cldap_open() returns a pointer to an LDAP structure, which should be passed to subsequent calls to cldap_search_s(3), cldap_setretryinfo(3), and cldap_close(3). Certain fields in the LDAP structure can be set to indicate size limit, time limit, and how aliases are handled during operations. See ldap_open(3) and <ldap.h> for more details.

ERRORS
If an error occurs, cldap_open() will return NULL and errno will be set appropriately.

SEE ALSO
ldap(3) cldap_search_s(3), cldap_setretryinfo(3), cldap_close(3), udp(4p)