HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Argument to the function (fn).arg
Pointer to error code of fn, which can be accessed by calling function. Possible values
slapi_filter_apply() may set in error_code include
SLAPI_FILTER_UNKNOWN_FILTER_TYPE. A FILTER_APPLY_FN should return
_STOP or _CONTINUE only.
error_code
Returns This function returns an integer. Possible return values for slapi_filter_apply()
include:
SLAPI_FILTER_SCAN_NOMORE indicates success in traversing the entire filter.
SLAPI_FILTER_SCAN_STOP indicates premature abort.
SLAPI_FILTER_SCAN_CONTINUE indicates continue scanning.
SLAPI_FILTER_SCAN_ERROR indicates an occurred during the traverse and the scan is
aborted. In this case, error_code can be checked for more details; currently, the only error
is SLAPI_FILTER_UNKNOWN_FILTER_TYPE.
26.2 slapi_filter_compare()
Description This function allows you to determine if two filters are identical and/or are allowed
to be in a different order.
Syntax
#include "slapi-plugin.h"
int slapi_filter_compare(struct slapi_filter *f1,
struct slapi_filter *f2);
Parameters This function takes the following parameters:
First filter to compare.
f1
Second filter to compare.
f2
Returns This function returns one of the following values:
0 if the two filters are identical.
A value other than 0 if the two filters are not identical.
26.3 slapi_filter_dup()
Creates a duplicate of the specified filter.
Syntax
#include "slapi-plugin.h"
Slapi_Filter *slapi_filter_dup(Slapi_Filter *f);
Parameters This function takes the following parameter:
Filter to duplicate.
f
Returns This function returns a pointer to the duplicated filter if successful; otherwise, it returns
NULL.
26.4 slapi_filter_free()
Frees the specified filter and (optionally) the set of filters that comprise it. For example, the set
of filters in an LDAP_FILTER_AND type filter.
Description This function frees the filter in parameter f.
Syntax
236 Functions for dealing with filters