Converts a typeless, distinguished eDirectory name into LDAP format.
#include <ldapx.h>
int ldap_nds_to_ldap (
LDAP *ld,
unsigned short *ndsName,
char **ldapName);
(IN) Points to the handle for the LDAP session.
(IN) Points to the eDirectory distinguished name in typeless, dotted format that includes the tree name (for example: ksmith.provo.novell.novell_inc). The string must be a Unicode string. If the object is in a DNS rooted tree, com.dns must be included as the tree name (for example: ksmith.provo.novell.com.dns).
(OUT) Points to the entry's distinguished name in LDAP format, for example, "cn=ksmith, ou=provo, o=novell"
|
0x00 |
LDAP_SUCCESS |
|
0x01 |
LDAP_OPERATIONS_ERROR: A string is returned with this error code that indicates the source of the error. |
|
0x53 |
LDAP_ENCODING_ERROR |
|
0x5A |
LDAP_NO_MEMORY |
|
0x5C |
LDAP_NOT_SUPPORTED |
|
Non-zero |
Non-zero values indicate errors. See |
This function is provided for legacy eDirectory applications and utilities that expect the entry names to be entered in eDirectory typeless, dotted format.
It is provided for convenience, but should be used sparingly or the application's performance will be affected. This is not a local function. The function makes a call to the LDAP server to find the types.
The function allocates memory for the ldapName parameter, and the caller is responsible for freeing it with the ldapx_memfree function.
The requestName is set to the OID (2.16.840.1.113719.1.27.100.1) and the requestValue is a BER encoding of the following:
RequestBer
dn LDAPDN
The responseName is set to the OID (2.16.840.1.113719.1.27.100.2) and the responsetValue is a BER encoding of the following:.
ResponseBer
ldapName OCTET STRING