HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Returns This function returns one of the following values:
1 if rdn contains an RDN that matches the type, value, and length.
0 if no RDN matches the desired type/value.
See also
“slapi_rdn_get_index()”
“slapi_rdn_contains_attr()”
37.4 slapi_rdn_contains_attr()
Description This function checks whether a Slapi_RDN structure contains any RDN matching
a given type and, if true, gets the corresponding attribute value.This function looks for an RDN
inside the Slapi_RDN structure rdn that matches the type given in the parameters. This function
makes a call to “slapi_rdn_get_index_attr()” and verifies that the returned value is anything but
-1. If successful, it also returns the corresponding attribute value.
Syntax
#include "slapi-plugin.h"
int slapi_rdn_contains_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
with the desired type exists within rdn.
value
Returns This function returns one of the following values:
1 if rdn contains a RDN that matches the given type.
0 if there is no match.
See also
“slapi_rdn_get_index_attr()”
“slapi_rdn_contains()”
37.5 slapi_rdn_done()
Description This function clears the contents of a Slapi_RDN structure. It frees both the RDN
value and the array of split RDNs. Those pointers are then set to NULL.
Syntax
#include "slapi-plugin.h"
void slapi_rdn_done(Slapi_RDN *rdn);
Parameters This function takes the following parameter:
Pointer to the structure to be cleared.
rdn
See also
“slapi_rdn_free()”
“slapi_rdn_init()”
37.4 slapi_rdn_contains_attr() 297