HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Parameters This function takes the following parameters:
Slapi_DN structure containing the value to which a new RDN is to be added.sdn
Slapi_RDN structure containing the RDN value that is to be added to the DN value.rdn
Returns This function returns the Slapi_DN structure with the new DN formed by adding the
RDN value in rdn to the DN value in dn.
See also “slapi_sdn_set_rdn()”
39.6 slapi_sdn_compare()
Description This function compares two DNs, sdn1 and sdn2. The comparison is case sensitive.
Syntax
#include "slapi-plugin.h"
int slapi_sdn_compare( const Slapi_DN *sdn1, const Slapi_DN *sdn2 );
Parameters This function takes the following parameters:
DN to compare with the value in sdn2.sdn1
DN to compare with the value in sdn1.sdn2
Returns This function returns one of the following values:
0 if sdn1 is equal to sdn2.
-1 if sdn1 is NULL.
1 if sdn2 is NULL and sdn1 is not NULL.
39.7 slapi_sdn_copy()
Description This function copies the DN in from to the structure pointed by to.
Syntax
#include "slapi-plugin.h"
void slapi_sdn_copy(const Slapi_DN *from, Slapi_DN *to);
Parameters This function takes the following parameters:
The original DN.
from
Destination of the copied DN, containing the copy of the DN in from.to
Memory concerns to must be allocated in advance of calling this function.
See also “slapi_sdn_dup()”
39.8 slapi_sdn_done()
Description This function clears the contents of a Slapi_DN structure. It frees both the DN and
the normalized DN, if any, and sets those pointers to NULL.
Syntax
#include "slapi-plugin.h"
void slapi_sdn_done(Slapi_DN *sdn);
Parameters This function takes the following parameter:
Pointer to the structure to clear.
sdn
312 Functions for managing DNs