37.8. slapi_rdn_get_index()
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.
#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:
|
rdn
| The Slapi_RDN structure containing the RDN value(s). |
|
type
| Type (cn, o, ou, etc.) of the RDN that is searched. |
|
value
| Value of the RDN searched. |
|
length
| Gives the length of value that should be taken into account for the string comparisons when searching for the RDN. |
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.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.