slapi_dn2ldapdn()

This routine converts a DN string to an internal SLAPI_LDAPDN structure.

Syntax
#include <slapi-plugin.h>
int slapi_dn2ldapdn(
char *dn,
SLAPI_LDAPDN **ldapdn);
Input Parameters
dn
Specifies the DN to be parsed. The DN must be normalized and must be in UTF-8 format.
ldapdn
Specifies the address of an internal SLAPI_LDAPDN structure. This returned structure must be used as an input parameter to other DN-related SLAPI calls.
Usage
This routine converts a DN string to a SLAPI_LDAPDN structure. This structure is an LDAP internal DN structure and must be used as an input parameter for other DN-related SLAPI calls, such as slapi_dn_get_rdn() and slapi_dn_get_rdn_count(). After you use the SLAPI_LDAPDN structure, the caller must free the SLAPI_LDAPDN structure by calling slapi_dn_free_ldapdn().
Errors
This routine returns an LDAP error code if it encounters an error while you parse the DN.
See also
slapi_dn_free_ldapdn(), slapi_dn_get_rdn(), and slapi_dn_get_rdn_count().