HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Memory concerns The memory is allocated by the function itself.
See also
“slapi_sdn_new_dn_byval()”
“slapi_sdn_new_ndn_byref()”
39.26 slapi_sdn_new_ndn_byref()
Description This function creates a new Slapi_DN structure and initializes its normalized DN
with the value of ndn. The normalized DN of the new structure will point to the same string
pointed to by ndn; the normalized DN value is passed into the parameter by reference. However,
the FLAG_NDN flag is not set, and no counter is incremented.
Syntax
#include "slapi-plugin.h"
Slapi_DN *slapi_sdn_new_ndn_byref(const char *ndn);
Parameters This function takes the following parameter:
The normalized DN value to be set in the new Slapi_DN structure.ndn
Returns This function returns a pointer to the new Slapi_DN structure with a normalized DN
valueset to the content of ndn.
Memory concerns The memory is allocated by the function itself.
See also “slapi_sdn_new_ndn_byval()”
39.27 slapi_sdn_new_ndn_byval()
Description This function creates a new Slapi_DN structure and initializes its normalized DN
with the value of ndn. The normalized DN of the new structure will point to a copy of the string
pointed to by ndn; the normalized DN value is passed into the parameter by value. The FLAG_DND
flag is set, and the internal counter is incremented.
Syntax
#include "slapi-plugin.h"
Slapi_DN *slapi_sdn_new_ndn_byval(const char *ndn);
Parameters This function takes the following parameter:
The normalized DN value to be set in the new Slapi_DN structure.ndn
Returns This function returns a pointer to the new Slapi_DN structure with a normalized DN
valueset to the content of ndn.
Memory concerns The memory is allocated by the function itself.
See also “slapi_sdn_new_ndn_byref()”
39.28 slapi_sdn_scope_test()
Description This function carries out a simple test to check whether the DN passed in the dn
parameter is actually in the scope of the base DN according to the values passed into the scope
and base parameters.
Syntax
#include "slapi-plugin.h"
int slapi_sdn_scope_test( const Slapi_DN *dn,
const Slapi_DN *base, int scope );
39.26 slapi_sdn_new_ndn_byref() 319