version 1.17, 2001/08/24 18:17:24
|
version 1.26, 2002/06/21 05:32:54
|
Line 1
|
Line 1
|
.TH LDAP 3 "1 August 2001" "OpenLDAP LDVERSION" |
.TH LDAP 3 "RELEASEDATE" "OpenLDAP LDVERSION" |
.\" $OpenLDAP: pkg/ldap/doc/man/man3/ldap.3,v 1.16 2001/06/11 18:32:58 kurt Exp $ |
.\" $OpenLDAP: pkg/ldap/doc/man/man3/ldap.3,v 1.25 2002/06/13 01:59:24 kurt Exp $ |
.\" Copyright 1998-2000 The OpenLDAP Foundation All Rights Reserved. |
.\" Copyright 1998-2002 The OpenLDAP Foundation All Rights Reserved. |
.\" Copying restrictions apply. See COPYRIGHT/LICENSE. |
.\" Copying restrictions apply. See COPYRIGHT/LICENSE. |
.SH NAME |
.SH NAME |
ldap - OpenLDAP Lightweight Directory Access Protocol API |
ldap - OpenLDAP Lightweight Directory Access Protocol API |
|
.SH LIBRARY |
|
OpenlDAP LDAP (libldap, -lldap) |
.SH SYNOPSIS |
.SH SYNOPSIS |
.nf |
.nf |
.ft B |
.ft B |
Line 12 ldap - OpenLDAP Lightweight Directory Ac
|
Line 14 ldap - OpenLDAP Lightweight Directory Ac
|
.fi |
.fi |
.SH DESCRIPTION |
.SH DESCRIPTION |
.LP |
.LP |
The Lightweight Directory Access Protocol provides access to |
The Lightweight Directory Access Protocol provides access to X.500 |
X.500 directory services. The services may be stand\-alone |
directory services. The services may be stand\-alone or part of |
or part of a distributed directory service. This API supports |
a distributed directory service. This API supports LDAP over TCP |
LDAP over TCP (RFC2251), LDAP over SSL, and LDAP over IPC (UNIX domain |
(RFC2251), LDAP over SSL, and LDAP over IPC (UNIX domain sockets). |
sockets). This API supports SASL (RFC2829) and Start TLS (RFC2830). |
This API supports SASL (RFC2829) and Start TLS (RFC2830). This |
|
API is based upon IETF C LDAP API draft specification, a work in |
|
progress. |
.LP |
.LP |
The OpenLDAP Software package includes a stand-alone server in |
The OpenLDAP Software package includes a stand\-alone server in |
.BR slapd (8), |
.BR slapd (8), |
various LDAP clients, and an LDAP client library used to provide |
various LDAP clients, and an LDAP client library used to provide |
programmatic access to the LDAP protocol. This man page gives an |
programmatic access to the LDAP protocol. This man page gives an |
Line 28 Both synchronous and asynchronous APIs a
|
Line 32 Both synchronous and asynchronous APIs a
|
various routines to parse the results returned from these routines. |
various routines to parse the results returned from these routines. |
These routines are found in the \-lldap library. |
These routines are found in the \-lldap library. |
.LP |
.LP |
The basic interaction is as follows. A session handle associated |
The basic interaction is as follows. A session handle is |
with created using |
created using |
.BR ldap_init (3). |
.BR ldap_init (3) |
|
or |
|
.BR ldap_initialize (3). |
|
(The |
|
.BR ldap_initialize (3) |
|
routine is preferred, but is not part of the draft specification.) |
The underlying session is established upon first use which is |
The underlying session is established upon first use which is |
commonly an LDAP bind operation. The LDAP bind operation is |
commonly an LDAP bind operation. The LDAP bind operation is |
performed by calling one of |
performed by calling |
.BR ldap_sasl_bind (3) |
.BR ldap_sasl_bind (3) |
and friends. Next, other operations are performed |
or one of its friends. Next, other operations are performed |
by calling one of the synchronous or asynchronous routines (e.g., |
by calling one of the synchronous or asynchronous routines (e.g., |
.BR ldap_search_ext_s (3) |
.BR ldap_search_ext_s (3) |
or |
or |
Line 50 The LDAP association and underlying conn
|
Line 59 The LDAP association and underlying conn
|
Errors can be interpreted by calling |
Errors can be interpreted by calling |
.BR ldap_err2string (3). |
.BR ldap_err2string (3). |
.SH SEARCH FILTERS |
.SH SEARCH FILTERS |
Search filters to be passed to the ldap search routines can be |
Search filters to be passed to the ldap search routines are to be |
constructed by hand, or by calling the |
constructed by hand and should conform to RFC 2254. |
.BR ldap_getfilter (3) |
|
routines, which use the |
|
.BR ldapgetfilter.conf (5) |
|
file to turn a string (presumably that a user has typed) into a series |
|
of search filters. |
|
.SH DISPLAYING RESULTS |
.SH DISPLAYING RESULTS |
Results obtained from the ldap search routines can be output by hand, |
Results obtained from the ldap search routines can be output by hand, |
by calling |
by calling |
Line 70 and
|
Line 74 and
|
.BR ldap_next_attribute (3) |
.BR ldap_next_attribute (3) |
to step through an entry's attributes, and |
to step through an entry's attributes, and |
.BR ldap_get_values (3) |
.BR ldap_get_values (3) |
to retrieve a given attribute's value. Attribute values |
to retrieve a given attribute's values. Attribute values |
may or may not be displayable. |
may or may not be displayable. |
.LP |
.SH CONTROLS |
Alternatively, the entry can be output automatically by calling |
This library supports both LDAP Version 2 and Version 3, with the Version 2 |
the |
protocol selected by default. |
.BR ldap_entry2text (3), |
LDAP Version 3 operations can be extended through the use of controls. Controls |
.BR ldap_entry2text_search (3), |
can be sent to a server or returned to the client with any LDAP message. |
.BR ldap_entry2html (3), |
Extended versions of the standard routines are available for use with |
or |
controls. These routines are generally named by adding |
.BR ldap_entry2html_search (3) |
.BR _ext |
routines. These routines look up the object |
to the regular routine's name. |
class of the entry they are passed in the |
|
.BR ldaptemplates.conf (5) |
|
file to decide which attributes to display and how to display them. |
|
Output is handled via a routine passed in as a parameter. |
|
.SH UNIFORM RESOURCE LOCATORS (URLS) |
.SH UNIFORM RESOURCE LOCATORS (URLS) |
The |
The |
.BR ldap_url (3) |
.BR ldap_url (3) |
routines can be used test a URL to see if it is an LDAP URL, to parse LDAP |
routines can be used to test a URL to see if it is an LDAP URL, to parse LDAP |
URLs into their component pieces, and to initiate searches directly using |
URLs into their component pieces, and to initiate searches directly using |
an LDAP URL. |
an LDAP URL. |
.SH CACHING |
.SH CACHING |
Line 101 Caching is experiemental.
|
Line 101 Caching is experiemental.
|
Also provided are various utility routines. The |
Also provided are various utility routines. The |
.BR ldap_sort (3) |
.BR ldap_sort (3) |
routines are used to sort the entries and values returned via |
routines are used to sort the entries and values returned via |
the ldap search routines. The |
the ldap search routines. |
.BR ldap_friendly (3) |
|
routines are |
|
used to map from short two letter country codes (or other strings) |
|
to longer "friendlier" names. |
|
.SH BER LIBRARY |
.SH BER LIBRARY |
Also included in the distribution is a set of lightweight Basic |
Also included in the distribution is a set of lightweight Basic |
Encoding Rules routines. These routines are used by the LDAP library |
Encoding Rules routines. These routines are used by the LDAP library |
Line 113 routines to encode and decode LDAP proto
|
Line 109 routines to encode and decode LDAP proto
|
(slightly simplified) Basic Encoding Rules defined by LDAP. They are |
(slightly simplified) Basic Encoding Rules defined by LDAP. They are |
not normally used directly by an LDAP application program except |
not normally used directly by an LDAP application program except |
in the handling of controls and extended operations. The |
in the handling of controls and extended operations. The |
routines provide a printf and scanf-like interface, as well as |
routines provide a printf and scanf\-like interface, as well as |
lower-level access. These routines are found in the -llber |
lower\-level access. These routines are discussed in |
library. |
.BR lber\-decode (3), |
|
.BR lber\-encode (3), |
|
.BR lber\-memory (3), |
|
and |
|
.BR lber\-types (3). |
.SH INDEX |
.SH INDEX |
.TP 20 |
.TP 20 |
.SM ldap_open(3) |
.SM ldap_open(3) |
open a connection to an LDAP server |
open a connection to an LDAP server (deprecated, use |
|
.BR ldap_init (3)) |
.TP |
.TP |
.SM ldap_init(3) |
.SM ldap_init(3) |
initialize the LDAP library without opening a connection to a server |
initialize the LDAP library without opening a connection to a server |
.TP |
.TP |
|
.SM ldap_initialize(3) |
|
initialize the LDAP library without opening a connection to a server |
|
.TP |
.SM ldap_result(3) |
.SM ldap_result(3) |
wait for the result from an asynchronous operation |
wait for the result from an asynchronous operation |
.TP |
.TP |
Line 180 uncache a request
|
Line 184 uncache a request
|
set cache options |
set cache options |
.TP |
.TP |
.SM ldap_compare(3) |
.SM ldap_compare(3) |
asynchronous compare to a directory entry |
asynchronously compare to a directory entry |
.TP |
.TP |
.SM ldap_compare_s(3) |
.SM ldap_compare_s(3) |
synchronous compare to a directory entry |
synchronously compare to a directory entry |
.TP |
.TP |
.SM ldap_delete(3) |
.SM ldap_delete(3) |
asynchronously delete an entry |
asynchronously delete an entry |
Line 191 asynchronously delete an entry
|
Line 195 asynchronously delete an entry
|
.SM ldap_delete_s(3) |
.SM ldap_delete_s(3) |
synchronously delete an entry |
synchronously delete an entry |
.TP |
.TP |
.SM ldap_init_templates(3) |
|
initialize display template routines from a file |
|
.TP |
|
.SM ldap_init_templates_buf(3) |
|
initialize display template routines from a buffer |
|
.TP |
|
.SM ldap_free_templates(3) |
|
free display template routine memory |
|
.TP |
|
.SM ldap_first_disptmpl(3) |
|
get first display template |
|
.TP |
|
.SM ldap_next_disptmpl(3) |
|
get next display template |
|
.TP |
|
.SM ldap_oc2template(3) |
|
return template appropriate for objectclass |
|
.TP |
|
.SM ldap_name2template(3) |
|
return named template |
|
.TP |
|
.SM ldap_tmplattrs(3) |
|
return attributes needed by template |
|
.TP |
|
.SM ldap_first_tmplrow(3) |
|
return first row of displayable items in a template |
|
.TP |
|
.SM ldap_next_tmplrow(3) |
|
return next row of displayable items in a template |
|
.TP |
|
.SM ldap_first_tmplcol(3) |
|
return first column of displayable items in a template |
|
.TP |
|
.SM ldap_next_tmplcol(3) |
|
return next column of displayable items in a template |
|
.TP |
|
.SM ldap_entry2text(3) |
|
display an entry as text using a display template |
|
.TP |
|
.SM ldap_entry2text_search(3) |
|
search for and display an entry as text using a display template |
|
.TP |
|
.SM ldap_vals2text(3) |
|
display values as text |
|
.TP |
|
.SM ldap_entry2html(3) |
|
display an entry as HTML (HyperText Markup Language) using a display template |
|
.TP |
|
.SM ldap_entry2html_search(3) |
|
search for and display an entry as HTML using a display template |
|
.TP |
|
.SM ldap_vals2html(3) |
|
display values as HTML |
|
.TP |
|
.SM ldap_perror(3) |
.SM ldap_perror(3) |
print an LDAP error indication to standard error |
print an LDAP error indication to standard error |
.TP |
.TP |
Line 255 LDAP error indication
|
Line 205 LDAP error indication
|
extract LDAP error indication from LDAP result |
extract LDAP error indication from LDAP result |
.TP |
.TP |
.SM ldap_errlist(3) |
.SM ldap_errlist(3) |
list of ldap errors and their meanings |
list of LDAP errors and their meanings |
.TP |
.TP |
.SM ldap_err2string(3) |
.SM ldap_err2string(3) |
convert LDAP error indication to a string |
convert LDAP error indication to a string |
Line 275 return next entry in a chain of search r
|
Line 225 return next entry in a chain of search r
|
.SM ldap_count_entries(3) |
.SM ldap_count_entries(3) |
return number of entries in a search result |
return number of entries in a search result |
.TP |
.TP |
.SM ldap_friendly_name(3) |
|
map from unfriendly to friendly names |
|
.TP |
|
.SM ldap_free_friendlymap(3) |
|
free resources used by ldap_friendly(3) |
|
.TP |
|
.SM ldap_get_dn(3) |
.SM ldap_get_dn(3) |
extract the DN from an entry |
extract the DN from an entry |
.TP |
.TP |
Line 288 extract the DN from an entry
|
Line 232 extract the DN from an entry
|
convert a DN into its component parts |
convert a DN into its component parts |
.TP |
.TP |
.SM ldap_explode_rdn(3) |
.SM ldap_explode_rdn(3) |
convert a RDN into its component parts |
convert an RDN into its component parts |
.TP |
.TP |
.SM ldap_get_values(3) |
.SM ldap_get_values(3) |
return an attribute's values |
return an attribute's values |
.TP |
.TP |
.SM ldap_get_values_len(3) |
.SM ldap_get_values_len(3) |
return an attribute values with lengths |
return an attribute's values with lengths |
.TP |
.TP |
.SM ldap_value_free(3) |
.SM ldap_value_free(3) |
free memory allocated by ldap_get_values(3) |
free memory allocated by ldap_get_values(3) |
Line 308 return number of values
|
Line 252 return number of values
|
.SM ldap_count_values_len(3) |
.SM ldap_count_values_len(3) |
return number of values |
return number of values |
.TP |
.TP |
.SM ldap_init_getfilter(3) |
|
initialize getfilter routines from a file |
|
.TP |
|
.SM ldap_init_getfilter_buf(3) |
|
initialize getfilter routines from a buffer |
|
.TP |
|
.SM ldap_getfilter_free(3) |
|
free resources allocated by ldap_init_getfilter(3) |
|
.TP |
|
.SM ldap_getfirstfilter(3) |
|
return first search filter |
|
.TP |
|
.SM ldap_getnextfilter(3) |
|
return next search filter |
|
.TP |
|
.SM ldap_build_filter(3) |
|
construct an LDAP search filter from a pattern |
|
.TP |
|
.SM ldap_setfilteraffixes(3) |
|
set prefix and suffix for search filters |
|
.TP |
|
.SM ldap_modify(3) |
.SM ldap_modify(3) |
asynchronously modify an entry |
asynchronously modify an entry |
.TP |
.TP |
Line 345 asynchronously modify the RDN of an entr
|
Line 268 asynchronously modify the RDN of an entr
|
synchronously modify the RDN of an entry |
synchronously modify the RDN of an entry |
.TP |
.TP |
.SM ldap_modrdn(3) |
.SM ldap_modrdn(3) |
depreciated - use ldap_modrdn2(3) |
deprecated - use ldap_modrdn2(3) |
.TP |
.TP |
.SM ldap_modrdn_s(3) |
.SM ldap_modrdn_s(3) |
depreciated - use ldap_modrdn2_s(3) |
depreciated - use ldap_modrdn2_s(3) |
Line 374 check a URL string to see if it is an LD
|
Line 297 check a URL string to see if it is an LD
|
.SM ldap_url_parse(3) |
.SM ldap_url_parse(3) |
break up an LDAP URL string into its components |
break up an LDAP URL string into its components |
.TP |
.TP |
.SM ldap_init_searchprefs(3) |
|
initialize searchprefs routines from a file |
|
.TP |
|
.SM ldap_init_searchprefs_buf(3) |
|
initialize searchprefs routines from a buffer |
|
.TP |
|
.SM ldap_free_searchprefs(3) |
|
free memory allocated by searchprefs routines |
|
.TP |
|
.SM ldap_first_searchobj(3) |
|
return first searchpref object |
|
.TP |
|
.SM ldap_next_searchobj(3) |
|
return next searchpref object |
|
.TP |
|
.SM ldap_sort_entries(3) |
.SM ldap_sort_entries(3) |
sort a list of search results |
sort a list of search results |
.TP |
.TP |
Line 398 sort a list of attribute values
|
Line 306 sort a list of attribute values
|
.SM ldap_sort_strcasecmp(3) |
.SM ldap_sort_strcasecmp(3) |
case insensitive string comparison |
case insensitive string comparison |
.SH SEE ALSO |
.SH SEE ALSO |
.BR slapd (8) |
.BR slapd (8), |
|
.BR draft-ietf-ldapext-ldap-c-api-xx.txt \ <http://www.ietf.org> |
.SH ACKNOWLEDGEMENTS |
.SH ACKNOWLEDGEMENTS |
.B OpenLDAP |
.B OpenLDAP |
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). |
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). |
.B OpenLDAP |
.B OpenLDAP |
is derived from University of Michigan LDAP 3.3 Release. |
is derived from University of Michigan LDAP 3.3 Release. |
|
.LP |
|
These API manual pages are based upon descriptions provided in the |
|
IETF C LDAP API Internet Draft, a work in progress, edited by |
|
Mark Smith. |