HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Table 39-1 DN routines (continued)
DescriptionFunction
Sets a normalized DN in a Slapi_DN structure.
“slapi_sdn_set_ndn_byref()”
Sets a normalized DN in a Slapi_DN structure.
“slapi_sdn_set_ndn_byval()”
Sets a new parent in an entry.“slapi_sdn_set_parent()”
Sets a new RDN for an entry.“slapi_sdn_set_rdn()”
39.1 slapi_dn_isroot()
Determines whether the specified DN is the root DN for this local database. Before calling this
function, you should call “slapi_dn_normalize_case()” to normalize the DN and convert all
characters to lowercase.
Syntax
#include "slapi-plugin.h"
int slapi_dn_isroot( const char *dn );
Parameters This function takes the following parameters:
Parameter block.
pb
DN that you want to check.
dn
Returns This function returns one of the following values:
1 if the specified DN is the root DN of the local database.
0 if the specified DN is not the root DN of the local database.
See also slapi_be_issuffix()
39.2 slapi_dn_normalize_case()
Converts a distinguished name (DN) to canonical format and converts all characters to lowercase.
Calling this function has the same effect as calling the slapi_sdn_get_ndn() function.
Syntax
#include "slapi-plugin.h"
char *slapi_dn_normalize_case( char *dn );
Parameters This function takes the following parameter:
DN that you want to normalize and convert to lowercase.
dn
Returns This function returns the normalized DN with all lowercase characters. A variable
passed in as the dn argument is also converted in place.
39.3 slapi_dn_normalize_to_end()
Normalizes part of a DN value, specifically the part going from what is pointed to by dn to that
pointed to by end. This routine does not NULL terminate the normalized bit pointed to by dn at
the return of the function.
310 Functions for managing DNs