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_LDAPDNstructure. This returned structure must be used as an input parameter to other DN-relatedSLAPIcalls.
- Usage
- This routine converts a DN string to a
SLAPI_LDAPDNstructure. This structure is an LDAP internal DN structure and must be used as an input parameter for other DN-relatedSLAPIcalls, such asslapi_dn_get_rdn()andslapi_dn_get_rdn_count(). After you use theSLAPI_LDAPDNstructure, the caller must free theSLAPI_LDAPDNstructure by callingslapi_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().