Gets the position and the attribute value of the first RDN in a Slapi_RDN structure that matches a given type.
#include "slapi-plugin.h" int slapi_rdn_get_index_attr(Slapi_RDN *rdn, const char *type, char **value);
This function takes the following parameters:
The Slapi_RDN structure containing the RDN value(s).
Type (cn, o, ou, etc.) of the RDN searched.
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.
This function returns -1 if there is no RDN that matches the content type, or the real position of the first RDN within RDN that matches the content of type.
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.