HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Parameters This function takes the following parameters:
The Slapi_RDN structure containing the RDN value(s).rdn
Type (cn, o, ou, etc.) of the RDN that is searched.type
Value of the RDN searched.
value
Gives the length of value that should be taken into account for the string comparisons
when searching for the RDN.
length
Returns This function returns one of the following values:
The index of the RDN that follows the RDN matching the contents of the parameters type
and value.
-1 if no RDN stored in rdn matches the given type/value pair.
See also
“slapi_rdn_get_index_attr()”
“slapi_rdn_contains()”
37.9 slapi_rdn_get_index_attr()
Description This function searches for an RDN inside of the Slapi_RDN structure rdn that
matches the type given in the parameters. If successful, the position of the matching RDN, as
well as the corresponding attribute value, is returned.
Syntax
#include "slapi-plugin.h"
int slapi_rdn_get_index_attr(Slapi_RDN *rdn, const char *type, char **value);
Parameters This function takes the following parameters:
The Slapi_RDN structure containing the RDN value(s).rdn
Type (cn, o, ou, etc.) of the RDN searched.type
Repository that will hold the value of the first RDN whose type matches the content
of the parameter type. If this parameter is NULL at the return of the function, no RDN
exists within rdn.
value
Returns This function returns one of the following values:
The real position of the first RDN within RDN that matches the content of type.
-1 if there is no RDN that matches the content type.
See also “slapi_rdn_get_index()”
37.10 slapi_rdn_get_next()
Description This function gets the type/value pair corresponding to the RDN stored in the next
(index+1) position inside a Slapi_RDN structure. The index of an element within an array of
values is always one unit below its real position in the array.
Syntax
#include "slapi-plugin.h"
int slapi_rdn_get_next(Slapi_RDN *rdn, int index, char **type, char **value);
Parameters This function takes the following parameters:
The Slapi_RDN structure containing the RDN value(s).rdn
Indicates the position of the RDN the precedes the currently desired RDN.
index
37.9 slapi_rdn_get_index_attr() 299