Checks whether a Slapi_RDN structure contains any RDN matching a given type, and if true, gets the corresponding attribute value.
#include "slapi-plugin.h" int slapi_rdn_contains_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 with the desired type exists within rdn.
This function returns 1 if rdn contains a RDN that matches the given type, or 0 if there is no match.
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.