Checks whether an entry, given its DN, is in the scope of a certain base DN.
#include "slapi-plugin.h" int slapi_sdn_scope_test( const Slapi_DN *dn, const Slapi_DN *base, int scope );
This function takes the following parameters:
The DN of the entry subject of scope test.
The base DN to which dn is going to be tested against.
The scope tested. This parameter can take one of the following levels
LDAP_SCOPE_BASE - where the entry DN should be the same as the base DN
LDAP_SCOPE_ONELEVEL - where the base DN should be the parent of the entry DN
LDAP_SCOPE_SUBTREE - where the base DN should at least be the suffix of the entry DN
This function returns non-zero if dn matches the scoping criteria given by base and scope.
This function carries out a simple test to check whether the DN passed in the dn parameter is actually in scope of the base DN according to the values passed into the scope and base parameters.