HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Table 14-5 ldapmod field listing
DescriptionField
The operation to be performed on the attribute and the type of data specified as the
attribute values. This field can have one of the following values:
#define LDAP_MOD_ADD 0x00
LDAP_MOD_ADD specifies to add the attribute values to the entry.
#define LDAP_MOD_DELETE 0x01
LDAP_MOD_DELETE specifies to remove the attribute values from the entry.
#define LDAP_MOD_REPLACE 0x02
LDAP_MOD_REPLACE specifies to replace the existing value of the attribute with the
values in mod_values or mod_bvalues.
#define LDAP_MOD_BVALUES 0x80
In addition, if you are specifying binary values (as opposed to strings), you should OR
(|) LDAP_MOD_BVALUES with the operation type. For example:
mod->mod_op = LDAP_MOD_ADD | LDAP_MOD_BVALUES
mod_op
Pointer to the attribute type that you want to add, delete, or replace.
mod_type
A NULL-terminated array of string values for the attribute.
mod_values_u
Pointer to a NULL terminated array of string values for the attribute.
modv_strvals
Pointer to a NULL-terminated array of berval structures for the attribute.mod_bvalues
Values that you want to add, delete, or replace.
mod_vals
See also Slapi_Mod and “Slapi_Mods”.
14.5 mrFilterMatchFn
mrFilterMatchFn specifies the prototype for a filter_matching function that is called by the
server when processing an extensible match filter.
An extensible match filter specifies either the OID of a matching rule or an attribute type (or
both) that indicates how matching entries are found. For example, a sound-alike matching
rule might find all entries that sound like a given value.
To handle an extensible match filter for a matching rule, you can write a matching rule plug-in.
You need to define the filter matching function, which is the function that has prototype specified
by mrFilterMatchFn. The server calls this function for each potential matching candidate entry.
The server passes pointers to a filter structure that you create in your filter factory function, the
candidate entry, and the entry's attributes.
In your filter matching function, you can retrieve information about the filter, such as the attribute
type and value specified in the filter, from the filter structure. You can then use this information
to compare the value in the filter against the attribute values in the candidate entry.
Syntax
#include "slapi-plugin.h"
typedef int (*mrFilterMatchFn) (void* filter, Slapi_Entry* entry,
Slapi_Attr* attrs);
Parameters This function takes the following parameters:
120 Data type and structure reference