HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
37.6 slapi_rdn_free()
Description This function frees both the contents of the Slapi_RDN structure and the structure
itself pointed to by the content of rdn.
Syntax
#include "slapi-plugin.h"
void slapi_rdn_free(Slapi_RDN **rdn);
Parameters This function takes the following parameter:
Pointer to the pointer of the Slapi_RDN structure to be freed.rdn
See also
“slapi_rdn_new()”
“slapi_rdn_done()”
37.7 slapi_rdn_get_first()
Description This function gets the type/value pair corresponding to the first RDN stored in a
Slapi_RDN structure. For example, if the RDN is cn=Joey, the function will place cn in the
type return parameter and Joey in value.
Syntax
#include "slapi-plugin.h"
int slapi_rdn_get_first(Slapi_RDN *rdn, char **type, char **value);
Parameters This function takes the following parameters:
The Slapi_RDN structure containing the RDN value(s).rdn
Repository that will hold the type of the first RDN. If this parameter is NULL at the
return of the function, it means rdn is empty.
type
Repository that will hold the type of the first RDN. If this parameter is NULL at the
return of the function, it means rdn is empty.
value
Returns This function returns one of the following values:
-1 if rdn is empty.
1 if the operation is successful.
See also
“slapi_rdn_get_next()”
“slapi_rdn_get_rdn()”
37.8 slapi_rdn_get_index()
Description This function gets the index of the RDN that follows the RDN with a given type
and value. The function searches for an RDN inside the Slapi_RDN structure rdn that matches
both type and value as given in the parameters. If it succeeds, the position of the matching RDN
is returned.
Syntax
#include "slapi-plugin.h"
int slapi_rdn_get_index(Slapi_RDN *rdn, const char *type,
const char *value,size_t length);
298 Functions for managing RDNs