MAN page from Mandrake Other ldap-devel-3.3-3.i386.rpm
LDAP
Section: C Library Functions (3)
Updated: 13 November 1995
Index NAME
ldap - Lightweight Directory Access Protocol package
SYNOPSIS
#include <lber.h>#include <ldap.h>
DESCRIPTION
The Lightweight Directory Access Protocol provides TCP/IP access tothe X.500 Directory or to a stand-alone LDAP server.The University of Michigan LDAP package includes a stand-alone server inslapd(8),an LDAP to X.500 gateway inldapd(8),various LDAP clients, and an LDAP client library used to provideprogrammatic access to the LDAP protocol. This man page gives anoverview of the LDAP library routines.
Both synchronous and asynchronous APIs are provided. Also included arevarious routines to parse the results returned from these routines.These routines are found in the libldap.a library.
The basic interaction is as follows. A connection is made to an LDAPserver by callingldap_open(3).An LDAP bind operation is performed by callingone ofldap_bind(3)and friends. Next, other operations are performedby calling one of the synchronous or asynchronous routines (e.g.,ldap_search_s(3)orldap_search(3)followed byldap_result(3)).Results returned from these routines are interpreted by calling theLDAP parsing routines. The LDAP association is terminated by callingldap_unbind(3).Errors can be interpreted by callingldap_perror(3).Theldap_set_rebind_proc(3)routine can be used to set a routine to be called back when an LDAP bindoperation needs to occur when handling a client referral.
SEARCH FILTERS
Search filters to be passed to the ldap search routines can beconstructed by hand, or by calling the
ldap_getfilter(3)routines, which use the
ldapgetfilter.conf(5)file to turn a string (presumably that a user has typed) into a seriesof search filters.
DISPLAYING RESULTS
Results obtained from the ldap search routines can be output by hand,by calling
ldap_first_entry(3)and
ldap_next_entry(3)to step throughthe entries returned,
ldap_first_attribute(3)and
ldap_next_attribute(3)to step through an entry's attributes, and
ldap_get_values(3)to retrieve a given attribute's value, and then calling
printf(3)or whatever to display the values.
Alternatively, the entry can be output automatically by callingtheldap_entry2text(3),ldap_entry2text_search(3),ldap_entry2html(3),orldap_entry2html_search(3)routines. These routines look up the objectclass of the entry they are passed in theldaptemplates.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.
UNIFORM RESOURCE LOCATORS (URLS)
The
ldap_url(3)routines can be used test a URL to see if it is an LDAP URL, to parse LDAPURLs into their component pieces, and to initiate searches directly usingan LDAP URL.
USER FRIENDLY NAMING
The
ldap_ufn(3)routines implement a user friendly namingscheme via LDAP. This scheme allows you to look up entriesusing fuzzy, untyped names like "mark smith, umich, us".
CACHING
The
ldap_cache(3)routines implement a local client caching scheme,providing a substantial performance increase for repeated queries.
UTILITY ROUTINES
Also provided are various utility routines. The
ldap_sort(3)routines are used to sort the entries and values returned viathe ldap search routines. The
ldap_friendly(3)routines areused to map from short two letter country codes (or other strings)to longer "friendlier" names. The
ldap_charset(3)routines can be used to translate to and from the T.61 characterset used for many character strings in the LDAP protocol.
CONNECTIONLESS ACCESS
The
cldap_search_s(3)routine allows you to access the directoryvia Connectionless LDAP (CLDAP), which is similar to LDAP butoperates over UDP, obviating the need to set up and tear downa connection by calling
ldap_open(3),
ldap_bind(3),and
ldap_unbind(3).
cldap_open(3)should be called before using
cldap_search_s(3).All the same getfilter, parsing, and display that can be usedwith regular LDAP routines can be used with the CLDAP routines.
BER LIBRARY
Also included in the distribution is a set of lightweight BasicEncoding Rules routines. These routines are used by the LDAP libraryroutines to encode and decode LDAP protocol elements using the(slightly simplified) Basic Encoding Rules defined by LDAP. They arenot normally used directly by an LDAP application program. Theroutines provide a printf and scanf-like interface, as well aslower-level access. These routines are found in the liblber.alibrary.
INDEX
- ldap_open(3)
- open a connection to an LDAP server
- ldap_init(3)
- initialize the LDAP library without opening a connection to a server
- ldap_result(3)
- wait for the result from an asynchronous operation
- ldap_abandon(3)
- abandon (abort) an asynchronous operation
- ldap_add(3)
- asynchronously add an entry
- ldap_add_s(3)
- synchronously add an entry
- ldap_bind(3)
- asynchronously bind to the directory
- ldap_bind_s(3)
- synchronously bind to the directory
- ldap_simple_bind(3)
- asynchronously bind to the directory using simple authentication
- ldap_simple_bind_s(3)
- synchronously bind to the directory using simple authentication
- ldap_kerberos_bind_s(3)
- synchronously bind to the directory using kerberos authentication
- ldap_kerberos_bind1(3)
- asynchronously bind to the LDAP server using kerberos authentication
- ldap_kerberos_bind1_s(3)
- synchronously bind to the LDAP server using kerberos authentication
- ldap_kerberos_bind2(3)
- asynchronously bind to the DSA using kerberos authentication
- ldap_kerberos_bind2_s(3)
- synchronously bind to the DSA using kerberos authentication
- ldap_unbind(3)
- synchronously unbind from the LDAP server and close the connection
- ldap_unbind_s(3)
- equivalent toldap_unbind(3)
- ldap_memfree (3)
- dispose of memory allocated by LDAP routines (this is only used on theMicrosoft Windows platforms; usefree(3)on all other platforms).
- ldap_enable_cache(3)
- enable LDAP client caching
- ldap_disable_cache(3)
- disable LDAP client caching
- ldap_destroy_cache(3)
- disable LDAP client caching and destroy cache contents
- ldap_flush_cache(3)
- flush LDAP client cache
- ldap_uncache_entry(3)
- uncache requests pertaining to an entry
- ldap_uncache_request(3)
- uncache a request
- ldap_set_cache_options(3)
- set cache options
- ldap_compare(3)
- asynchronous compare to a directory entry
- ldap_compare_s(3)
- synchronous compare to a directory entry
- ldap_delete(3)
- asynchronously delete an entry
- ldap_delete_s(3)
- synchronously delete an entry
- ldap_init_templates(3)
- initialize display template routines from a file
- ldap_init_templates_buf(3)
- initialize display template routines from a buffer
- ldap_free_templates(3)
- free display template routine memory
- ldap_first_disptmpl(3)
- get first display template
- ldap_next_disptmpl(3)
- get next display template
- ldap_oc2template(3)
- return template appropriate for objectclass
- ldap_name2template(3)
- return named template
- ldap_tmplattrs(3)
- return attributes needed by template
- ldap_first_tmplrow(3)
- return first row of displayable items in a template
- ldap_next_tmplrow(3)
- return next row of displayable items in a template
- ldap_first_tmplcol(3)
- return first column of displayable items in a template
- ldap_next_tmplcol(3)
- return next column of displayable items in a template
- ldap_entry2text(3)
- display an entry as text using a display template
- ldap_entry2text_search(3)
- search for and display an entry as text using a display template
- ldap_vals2text(3)
- display values as text
- ldap_entry2html(3)
- display an entry as HTML (HyperText Markup Language) using a display template
- ldap_entry2html_search(3)
- search for and display an entry as HTML using a display template
- ldap_vals2html(3)
- display values as HTML
- ldap_perror(3)
- print an LDAP error indication to standard error
- ld_errno(3)
- LDAP error indication
- ldap_result2error(3)
- extract LDAP error indication from LDAP result
- ldap_errlist(3)
- list of ldap errors and their meanings
- ldap_err2string(3)
- convert LDAP error indication to a string
- ldap_first_attribute(3)
- return first attribute name in an entry
- ldap_next_attribute(3)
- return next attribute name in an entry
- ldap_first_entry(3)
- return first entry in a chain of search results
- ldap_next_entry(3)
- return next entry in a chain of search results
- ldap_count_entries(3)
- return number of entries in a search result
- ldap_friendly_name(3)
- map from unfriendly to friendly names
- ldap_free_friendlymap(3)
- free resources used by ldap_friendly(3)
- ldap_get_dn(3)
- extract the DN from an entry
- ldap_explode_dn(3)
- convert a DN into its component parts
- ldap_explode_dns(3)
- convert a DNS-style DN into its component parts (experimental)
- ldap_is_dns_dn(3)
- check to see if a DN is a DNS-style DN (experimental)
- ldap_dn2ufn(3)
- convert a DN into user friendly form
- ldap_get_values(3)
- return an attribute's values
- ldap_get_values_len(3)
- return an attribute values with lengths
- ldap_value_free(3)
- free memory allocated by ldap_get_values(3)
- ldap_value_free_len(3)
- free memory allocated by ldap_get_values_len(3)
- ldap_count_values(3)
- return number of values
- ldap_count_values_len(3)
- return number of values
- ldap_init_getfilter(3)
- initialize getfilter routines from a file
- ldap_init_getfilter_buf(3)
- initialize getfilter routines from a buffer
- ldap_getfilter_free(3)
- free resources allocated by ldap_init_getfilter(3)
- ldap_getfirstfilter(3)
- return first search filter
- ldap_getnextfilter(3)
- return next search filter
- ldap_build_filter(3)
- construct an LDAP search filter from a pattern
- ldap_setfilteraffixes(3)
- set prefix and suffix for search filters
- ldap_modify(3)
- asynchronously modify an entry
- ldap_modify_s(3)
- synchronously modify an entry
- ldap_mods_free(3)
- free array of pointers to mod structures used by ldap_modify(3)
- ldap_modrdn2(3)
- asynchronously modify the RDN of an entry
- ldap_modrdn2_s(3)
- synchronously modify the RDN of an entry
- ldap_modrdn(3)
- depreciated - use ldap_modrdn2(3)
- ldap_modrdn_s(3)
- depreciated - use ldap_modrdn2_s(3)
- ldap_msgfree(3)
- free results allocated by ldap_result(3)
- ldap_search(3)
- asynchronously search the directory
- ldap_search_s(3)
- synchronously search the directory
- ldap_search_st(3)
- synchronously search the directory with timeout
- ldap_ufn_search_s(3)
- user friendly search the directory
- ldap_ufn_search_c(3)
- user friendly search the directory with cancel
- ldap_ufn_search_ct(3)
- user friendly search the directory with cancel and timeout
- ldap_ufn_setfilter(3)
- set filter file used by ldap_ufn(3) routines
- ldap_ufn_setprefix(3)
- set prefix used by ldap_ufn(3) routines
- ldap_ufn_timeout(3)
- set timeout used by ldap_ufn(3) routines
- ldap_is_ldap_url(3)
- check a URL string to see if it is an LDAP URL
- ldap_url_parse(3)
- break up an LDAP URL string into its components
- ldap_url_search(3)
- asynchronously search using an LDAP URL
- ldap_url_search_s(3)
- synchronously search using an LDAP URL
- ldap_url_search_st(3)
- synchronously search using an LDAP URL and a timeout
- ldap_init_searchprefs(3)
- initialize searchprefs routines from a file
- ldap_init_searchprefs_buf(3)
- initialize searchprefs routines from a buffer
- ldap_free_searchprefs(3)
- free memory allocated by searchprefs routines
- ldap_first_searchobj(3)
- return first searchpref object
- ldap_next_searchobj(3)
- return next searchpref object
- ldap_sort_entries(3)
- sort a list of search results
- ldap_sort_values(3)
- sort a list of attribute values
- ldap_sort_strcasecmp(3)
- case insensitive string comparison
- ldap_set_string_translators(3)
- set character set translation routines used by LDAP library
- ldap_t61_to_8859(3)
- translate from ISO-8859 characters to the T.61 characters
- ldap_8859_to_t61(3)
- translate from T.61 characters to the ISO-8859 characters
- ldap_translate_from_t61(3)
- translate from the T.61 character set to another character set
- ldap_translate_to_t61(3)
- translate to the T.61 character set from another character set
- ldap_enable_translation(3)
- enable or disable character translation for an LDAP entry result
- cldap_open(3)
- open a connectionless LDAP (CLDAP) session
- cldap_search_s(3)
- perform a search using connectionless LDAP
- cldap_setretryinfo(3)
- set retry and timeout information using connectionless LDAP
- cldap_close(3)
- terminate a connectionless LDAP session
SEE ALSO
ldapd(8),
slapd(8)
AUTHORS
Tim Howes, Mark Smith, Gordon Good, Lance Sloan, and Steve Rothwell fromthe University of Michigan, along with help from lots of others.
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- SEARCH FILTERS
- DISPLAYING RESULTS
- UNIFORM RESOURCE LOCATORS (URLS)
- USER FRIENDLY NAMING
- CACHING
- UTILITY ROUTINES
- CONNECTIONLESS ACCESS
- BER LIBRARY
- INDEX
- SEE ALSO
- AUTHORS
This document was created byman2html,using the manual pages.