Complete Contents
Getting Started
Chapter 1 Understanding Server Plug-Ins
Chapter 2 Writing and Compiling Plug-Ins
Chapter 3 Calling the Front-End API Functions
Chapter 4 Quick Start
Chapter 5 Writing Database Plug-Ins
Chapter 6 Writing Pre/Post-Operation Plug-Ins
Chapter 7 Defining Functions for LDAP Operations
Chapter 8 Defining Functions for Database Operations
Chapter 9 Defining Functions for Authentication
Chapter 10 Writing Entry Store/Fetch Plug-Ins
Chapter 11 Writing Extended Operation Plug-Ins
Chapter 12 Writing Matching Rule Plug-Ins
Chapter 13 Data Type and Structure Reference
Chapter 14 Function Reference
Chapter 15 Parameter Reference
Glossary
Previous Next Contents Bookshelf Function List



 slapi_search_internal()
Performs an LDAP search operation to search the directory from your plug-in.

Syntax

#include "slapi-plugin.h"
Slapi_PBlock *slapi_search_internal( char *base, int scope,
char *filter, LDAPControl **controls, char **attrs,
int attrsonly );

Parameters

The function has the following parameters:
base

Distinguished name (DN) of the entry that serves as the starting point for the search. For example, setting base to "o=Ace Industry, c=US" restricts the search to entries at Ace Industry in the United States.
scope

Scope of the search, which can be one of the following values:
filter

String representation of the filter to apply in the search.
controls

A NULL-terminated array of LDAP controls (see "LDAPControl" on page  193) that you want applied to the search operation.
attrs

A NULL-terminated array of attribute types to return from entries that match filter. If you specify a NULL, all attributes will be returned.
attrsonly

Specifies whether or not attribute values are returned along with the attribute types. This parameter can have the following values:

Returns. A new parameter block (see "Slapi_PBlock" on page  215) with the following parameters set:

When you are done working with the search results, you should free the results in the parameter block by calling the slapi_free_search_results_internal() function.

Description. This function allows you to search the directory from a plug-in function. The arguments for this function are similar to the arguments for the standard ldap_search() function in the Netscape LDAP C SDK.

Unlike the standard LDAP search operation, no data is sent to a client:

Although these tasks are not performed during an internal search operation, you can write your own callback functions that are invoked when these events occur. For details, see "slapi_search_internal_callback()" on page  336.

Example

[To be added]

See Also

 

© Copyright 1998 Netscape Communications Corporation