#include <ldap.h>
char **ldap_explode_dn(
char *dn,
int notypes)
|
The ldap_explode_dn() function uses the distinguished name returned by ldap_get_dn() and breaks it up into its component parts. Each part is known as a Relative Distinguished Name (RDN).
ldap_explode_dn() returns a NULL-terminated array, each component of which contains an RDN from the DN. The notypes parameter is used to request that only the RDN values be returned, not their types.
For example, the distinguished name cn=Bob,c=US would return as either "cn=Bob","c=US",NULL or "Bob","US", NULL depending on whether notypes was 0 or 1, respectively. The result can be freed by calling ldap_value_free().
No OS/400 authority is required. All authority checking is done by the LDAP server.
If ldap_explode_dn() is not successful, ld_errno will be set to indicate the error. See LDAP Client API Error Conditions for possible LDAP error code values. Use ldap_get_errno() function to retrieve the error information.
The following message may be set from this function.
CPF3CF2 E Error(s) occurred during running of ldap_explode_dn API.
ldap_get_dn() -- Extract the DN from an entry.
ldap_explode_rdn() -- Break a Relative Distinguished Name into Its Components.
|
Top
| LDAP APIs List APIs by category |
| [Information Center Home Page | Feedback ] | [Legal | AS/400 Glossary] |