JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Directory Server Enterprise Edition Developer's Guide 11 g Release 1 (
search filter icon
search icon

Document Information


Part I Directory Server Plug-In API Guide

1.  Before You Start Writing Plug-Ins

2.  Changes to the Plug-In API Since Directory Server 5.2

3.  Getting Started With Directory Server Plug-Ins

4.  Working With Entries Using Plug-Ins

5.  Extending Client Request Handling Using Plug-Ins

6.  Handling Authentication Using Plug-Ins

7.  Performing Internal Operations With Plug-Ins

8.  Writing Entry Store and Entry Fetch Plug-Ins

9.  Writing Extended Operation Plug-Ins

10.  Writing Matching Rule Plug-Ins

How Matching Rule Plug-Ins Work

What a Matching Rule Is

Requesting a Matching Rule

What a Matching Rule Plug-In Does

Example Matching Rule Plug-In

Configuring Matching Rule Plug-Ins

Registering Matching Rule Plug-Ins

Handling Extensible Match Filters

How Directory Server Handles Extensible Match Searches

Filter Matching Function

Subtype Matches

Thread Safety and Filter Matching Functions

Filter Index Function

Input Parameters for Filter Index Functions

Output Parameters for Filter Index Functions

Thread Safety and Filter Index Functions

Filter Factory Function

Input Parameters for Filter Factory Functions

Output Parameters for Filter Factory Functions

Thread Safety and Filter Factory Functions

Filter Object Destructor Function

Indexing Entries According to a Matching Rule

How Directory Server Handles the Index

Indexer Function

Input Parameters for Indexers

Output Parameter for Indexers

Thread Safety and Indexers

Indexer Factory Function

Input Parameters for Indexer Factory Functions

Output Parameters for Indexer Factory Functions

Thread Safety and Indexer Factory Functions

Indexer Object Destructor Function

Enabling Sorting According to a Matching Rule

How Directory Server Performs Sorting According to a Matching Rule

Handling an Unknown Matching Rule

Internal List of Correspondences

OIDs Not in the Internal List

11.  Writing Password Storage Scheme Plug-Ins

12.  Writing Password Quality Check Plug-Ins

13.  Writing Computed Attribute Plug-Ins

Part II Directory Server Plug-In API Reference

14.  Data Type and Structure Reference

15.  Function Reference, Part I

16.  Function Reference, Part II

17.  Parameter Block Reference

A.  NameFinder Application

Prerequisite Software

Deploying NameFinder

Configuring NameFinder to Access Your Directory

Customizing NameFinder


Handling an Unknown Matching Rule

This section explains how Directory Server finds a plug-in for a matching rule OID not recognized by that Directory Server.

Internal List of Correspondences

Directory Server identifies matching rules by OID. The server keeps an internal list of which matching rule plug-ins handle which OIDs.

Directory Server uses the internal list to determine which plug-in to call when the server receives an extensible match filter search request that includes a matching rule OID. Directory Server initially builds the list as matching rule plug-ins register OIDs that the plug-ins handle using slapi_matchingrule_register() in the plug-in initialization function.

OIDs Not in the Internal List

When the server encounters a matching rule OID that is not in the list, Directory Server queries each matching rule plug-in through registered factory functions. For every matching rule plug-in, Directory Server passes a parameter block that contains the OID to the matching rule factory function. The server then checks whether the factory function has in return provided a pointer in the parameter block. This pointer identifies the appropriate indexing or matching function for the OID.

If the factory function sets a pointer to the appropriate function, Directory Server assumes that the plug-in supports the matching rule.

The following shows how Directory Server checks whether a plug-in handles a specific filter match operation. The process for indexing closely resembles the process for matching.

Figure 10-7 Finding a Matching Rule Plug-In for an Unknown OID

image:Flow diagram shows Directory Server trying each plug-in to locate one that handles the unknown OID.

The following summarizes the process shown in Figure 10-7.

  1. Directory Server finds no match in the internal list of plug-ins to handle the OID. The server therefore creates a parameter block, and sets appropriate parameters for the factory, including SLAPI_PLUGIN_MR_OID.

  2. Directory Server calls the factory function. The factory function either sets a pointer in the parameter block to the appropriate function to handle the matching rule, or the function leaves the pointer NULL.

  3. Directory Server checks the parameter block after the factory function returns. If the factory function has set a function pointer in the parameter block, Directory Server updates its internal list. The function thus indicates that the plug-in supports the matching rule operation that is associated with the OID. Otherwise, the pointer remains NULL, and Directory Server tries the process again on the next matching rule plug-in that is registered.

    If after calling all matching rule plug-ins, Directory Server has found no plug-in to handle the matching rule OID, the server returns LDAP_UNAVAILABLE_CRITICAL_EXTENSION to the client.

  4. Directory Server frees the memory that was allocated for the operation.

    Be aware that Directory Server calls plug-in factory functions for the purpose of extending the internal list of correspondences.