Gets the index of the RDN that follows the RDN with a given type and value.
#include "slapi-plugin.h" int slapi_rdn_get_index(Slapi_RDN *rdn, const char *type, const char *value, size_t length);
This function takes the following parameters:
The Slapi_RDN structure containing the RDN value(s).
Type (cn, o, ou, etc.) of the RDN that is searched.
Value of the RDN searched.
Gives the length of value that should be taken into account for the string comparisons when searching for the RDN. A matching RDN value must not exceed the length specified.
This function returns the index of the RDN that follows the RDN matching the contents of the parameters type and value. If no RDN stored in rdn matches the given type/value pair, -1 is returned.
This 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.