Writing A Filter Matching Function - Netscape DIRECTORY SERVER 6.01 - PLUG-IN Manual

Table of Contents

Advertisement

Input and Output Parameters Available to a Filter Index Function (Continued)
Table 11-5
Parameter Name
SLAPI_PLUGIN_MR_OID
SLAPI_PLUGIN_MR_TYPE
SLAPI_PLUGIN_MR_VALUES
SLAPI_PLUGIN_MR_INDEX_FN

Writing a Filter Matching Function

The filter matching function has the following prototype:
#include "slapi-plugin.h"
typedef int (*mrFilterMatchFn) (void* filter,
This function passes the following arguments:
filter
entry
the filter.
attrs
attributes. (The extensible match filter might specify that the attributes in the
DN of an entry should also be included in the search.)
This function will never be called for the same filter object concurrently. (If you
plan to manipulate global variables, keep in mind that the server can call this
function concurrently for different filter objects.)
The filter matching function should do the following:
From the filter object, get the attribute type, the values, and the query operator.
1.
Data Type
char *
char *
struct berval **
void *
(function pointer)
Slapi_Entry* entry, Slapi_Attr* attrs);
is a pointer to the filter object.
is a pointer to the
is the first
Slapi_Attr
Description
(Output parameter) Official
matching rule OID (if any)
specified in the extensible match
filter.
(Output parameter) Attribute type
(if any) specified in the extensible
match filter.
(Output parameter) Pointer to an
array of berval structures
containing the values specified in
the extensible match filter.
(Output parameter) Name of the
function called by the server to
generate a list of keys used for
indexing a set of values.
entry that should be compared against
Slapi_Entry
attribute in the entry or in the set of DN
Chapter 11
Handling Extensible Match Filters
Writing Matching Rule Plug-Ins
141

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 6.01

Table of Contents