Breaks a distinguished name into its components.
#include <ldap.h>
char **ldap_explode_dn (
const char *dn,
int notypes);
(IN) Points to the distinguished name to explode.
(IN) Specifies whether the name should include type information:
If zero, type information is included, for example "cn=Kim".
If non-zero, type information is stripped, for example "cn=Kim" becomes "Kim".
The ldap_explode_dn function takes a dn returned by ldap_get_dn and returns a NULL-terminated character array of the components in the name. The components are returned in the order they appear in the dn and are with or without types as indicated by the notypes parameter.
For example, if the dn is "cn=kim,ou=sales,o=myorg", the function returns the following array: {"cn=kim", "ou=sales", "o=myorg", NULL}.
When the array is no longer in use, free the memory by calling the ldap_value_free function.