HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
22 Functions for syntax plug-ins
This chapter contains reference information on routines for syntax plug-ins.
Table 22-1 Syntax plug-in routines
DescriptionFunction
Calls a function, specified in the syntax plug-in, to compare against directory
entries.
slapi_call_syntax_assertion2keys_ava_sv()
Calls a function, specified in the syntax plug-in, to compare against directory
entries.
slapi_call_syntax_assertion2keys_sub_sv()
Manages index values when adding or removing values from an index.slapi_call_syntax_values2keys_sv()
22.1 slapi_call_syntax_assertion2keys_ava_sv()
Description When processing a search, calls the function (defined in the specified syntax plug-in)
responsible for returning an array of values (specified by the search filter) to compare against
the entries in the directory. This function applies to searches that use the filter types
LDAP_FILTER_EQUALITY and LDAP_FILTER_APPROX.
When processing a search that uses an attribute-value assertion (AVA) filter (for example,
ou=Accounting or ou=~Accounting), the back end needs to compare the value specified in
the search filter against the value of the specified attribute in each entry.
The function invokes the syntax plug-in specified by the vpi argument. This is the plug-in
associated with the type of attribute used in the search. You can get this handle by calling the
“slapi_attr_type2plugin()” function.
The syntax plug-in function invoked by this function is responsible for comparing the value
specified by val against the actual values of the attributes in the directory entries. The syntax
plug-in function returns a list of matching entry keys (the ivals argument) to the back end.
Syntax
#include "slapi-plugin.h"
int slapi_call_syntax_assertion2keys_ava_sv( void *vpi,
Slapi_Value *val, Slapi_Value ***ivals, int ftype );
Parameters This function takes the following parameters:
Handle to plug-in for this attribute type
vpi
Pointer to the Slapi_Value arrays containing the value from the search filter; for
example, if the filter is ou=Accounting, the argument val is Accounting.
val
Pointer to the Slapi_Value arrays containing the values returned by the plug-in
function; these values can now be compared against entries in the directory.
ivals
Type of filter; for example, LDAP_FILTER_EQUALITY.ftype
Returns This function returns one of the following values:
0 If successful.
-1 If an error occurs; for example, if the corresponding function for the specified plug-in is not
found.
22.2 slapi_call_syntax_assertion2keys_sub_sv()
Description When processing a search, calls the function (defined in the specified syntax plug-in)
responsible for returning an array of values (specified by the search filter) to compare against
22.1 slapi_call_syntax_assertion2keys_ava_sv() 201