The Lightweight Directory Access Protocol (LDAP) provides access to X.500 directory services. These services can be a stand-alone part of a distributed directory service. Both synchronous and asynchronous APIs are provided. Also included are various routines to parse the results returned from these routines.
The basic interaction is as follows. Firstly, a session handle is created. The underlying session is established upon first use, which is commonly an LDAP bind operation. Next, other operations are performed by calling one of the synchronous or asynchronous search routines. Results returned from these routines are interpreted by calling the LDAP parsing routines. The LDAP association and underlying connection is then terminated. There are also APIs to interpret errors returned by LDAP server.
The LDAP API is summarized in the following table:
Function |
Description |
---|---|
ldap_add() |
Perform an LDAP adding operation |
ldap_init() |
Initialize the LDAP library |
ldap_open() |
Open a connection to an LDAP server |
ldap_get_values() |
Retrieve attribute values from an LDAP entry |
ldap_search_s() |
Perform synchronous LDAP search |
ldap_search_st() |
Perform synchronous LDAP search, with timeout |
ldap_abandon() |
Abandon an LDAP operation |
ldap_abandon_ext() |
Abandon an LDAP operation |
ldap_delete_ext() |
Perform an LDAP delete operation |
ldap_delete_ext_s() |
Perform an LDAP delete operation synchronously |
ldap_control_free() |
Dispose of a single control or an array of controls allocated by other LDAP APIs |
ldap_controls_free() |
Dispose of a single control or an array of controls allocated by other LDAP APIs |
ldap_extended_operation_s() |
|
ldap_msgtype() |
Returns the type of an LDAP message |
ldap_msgid() |
Returns the ID of an LDAP message |
ldap_count_values() |
Count number of values in an array |
ldap_explode_dn() |
Takes a domain name (DN) as returned by ldap_get_dn() and breaks it into its component parts |
ldap_dn2ufn() |
Turn a DN as returned by ldap_get_dn() into a more user- friendly form |
ldap_explode_dns() |
Take a DNS-style DN and break it up into its component parts |
ldap_dns_to_dn() |
Converts a DNS domain name into an X.500 distinguished name |
ldap_value_free() |
Free an array of values |
ldap_is_dns_dn() |
Returns non-zero if the DN string is an experimental DNS-style DN |
ldap_explode_rdn() |
Breaks an RDN into its component parts |
ldap_bind() |
Perform an LDAP bind operation |
ldap_bind_s() |
Perform an LDAP bind operation synchronously |
ldap_simple_bind() |
Initiate asynchronous bind operation and return message ID of the request sent |
ldap_simple_bind_s() |
Initiate synchronous bind operation and return message ID of the request sent |
ldap_sasl_cram_md5_bind_s() |
General and extensible authentication over LDAP through the use of the Simple Authentication Security Layer (SASL) |
ldap_init() |
Allocates an LDAP structure but does not open an initial connection |
ldap_modify_ext_s() |
Perform an LDAP modify operation |
ldap_modrdn_s() |
Perform an LDAP modify RDN operation synchronously |
ldap_search() |
Perform LDAP search operations |
For details, see the ldap(3LDAP) man page.