Current File : //usr/man/man3ldap/cldap_open.3ldap
'\" te
.\" Copyright (c) 1990, Regents of the University of Michigan.  All Rights Reserved.
.\" Portions Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
.TH cldap_open 3LDAP "23 Aug 2011" "SunOS 5.11" "LDAP Library Functions"
.SH NAME
cldap_open \- LDAP connectionless communication preparation
.SH SYNOPSIS
.LP
.nf
cc[ \fIflag\fR... ] \fIfile\fR... -lldap[ \fIlibrary\fR... ]
#include <lber.h>
#include <ldap.h>

\fBLDAP *\fR\fBcldap_open\fR(\fBchar\fR \fI*host\fR, \fBint\fR \fIport\fR);
.fi

.SH PARAMETERS
.sp
.ne 2
.mk
.na
\fB\fIhost\fR\fR
.ad
.RS 8n
.rt  
The name of the host on which the LDAP server is running.
.RE

.sp
.ne 2
.mk
.na
\fB\fIport\fR\fR
.ad
.RS 8n
.rt  
The port number to connect.
.RE

.SH DESCRIPTION
.sp
.LP
The \fBcldap_open()\fR function is called to prepare for connectionless LDAP communication (over \fBudp\fR(7P)). It allocates an LDAP structure which is passed to future search requests.
.sp
.LP
If the default IANA-assigned port of 389 is desired,  \fBLDAP_PORT\fR should be specified for \fIport\fR.  \fIhost\fR can contain a space-separated list of hosts or addresses to try. \fBcldap_open()\fR returns a pointer to an LDAP structure, which should be passed to subsequent calls to \fBcldap_search_s\fR(3LDAP), \fBcldap_setretryinfo\fR(3LDAP), and \fBcldap_close\fR(3LDAP). Certain fields in the LDAP structure can be set to indicate size limit, time limit, and how aliases are handled during operations.  See \fBldap_open\fR(3LDAP) and  \fB<ldap.h>\fR for more details.
.SH ERRORS
.sp
.LP
If an error occurs, \fBcldap_open()\fR will return  \fINULL\fR and  \fBerrno\fR will be set appropriately.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for a description of the following attributes:
.sp

.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i) 
lw(2.75i) |lw(2.75i) 
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
Availabilitysystem/library
_
Interface StabilityCommitted
.TE

.SH SEE ALSO
.sp
.LP
\fBldap\fR(3LDAP) \fBcldap_search_s\fR(3LDAP), \fBcldap_setretryinfo\fR(3LDAP), \fBcldap_close\fR(3LDAP), \fBattributes\fR(5), \fBudp\fR(7P)