HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
32 Functions for handling matching rules
This chapter contains reference information on matching rule routines.
Table 32-1 Matching rule routines
DescriptionFunction
Compares two berval structures to determine if they are equal.
slapi_berval_cmp()
Frees the specified matching rule structure (and, optionally, its members)
from memory.
slapi_matchingrule_free()
Gets information about a matching rule.slapi_matchingrule_get()
Determines if a matching rule is a valid ordering matching rule for the given
syntax.
slapi_matchingrule_is_ordering()
Allocates memory for a new Slapi_MatchingRuleEntry structure.
slapi_matchingrule_new()
Registers the specified matching rule with the server.slapi_matchingrule_register()
Sets information about the matching rule.slapi_matchingrule_set()
Placeholder for future function. Currently, this function does nothing.slapi_matchingrule_unregister()
Calls the indexer function associated with an extensible match filter.slapi_mr_filter_index()
Calls the indexer factory function for the plug-in responsible for a specified
matching rule.
slapi_mr_indexer_create()
32.1 slapi_berval_cmp()
Compares two berval structures to determine if they are equal.
Syntax
#include "slapi-plugin.h"
int slapi_berval_cmp
(const struct berval *L, const struct berval *R);
Parameters This function takes the following parameters:
Pointer to the first berval structure that you want to compare.l
Pointer to the second structure that you want to compare.
R
Returns This function returns one of the following values:
A negative value if L is less than R.
0 if L is equal to R.
A positive value if L is greater than R.
32.2 slapi_matchingrule_free()
This function frees a Slapi_MatchingRuleEntry structure (and, optionally, its members)
from memory. Call this function when you are done working with the structure.
Syntax
#include "slapi-plugin.h"
void slapi_matchingrule_free(Slapi_MatchingRuleEntry **mrEntry,
int freeMembers);
32.1 slapi_berval_cmp() 259