Table of Contents | Previous | Next | Index

Netscape Directory SDK 3.0 for C Programmer’s Guide
     Chapter 18 Functions

ldap_search_st()

Searches the directory synchronously within a specified time limit.

Note that this is an older function that is included in the LDAP API for backward-compatibility. If you are writing a new LDAP client, use ldap_search_ext_s() instead.

Syntax

#include <ldap.h>
int ldap_search_st( LDAP *ld, const char *base, int scope,
   const char* filter, char **attrs, int attrsonly,
   struct timeval *timeout, LDAPMessage **res );

Parameters

This function has the following parameters:

ld

Connection handle, which is a pointer to an LDAP structure containing information about the connection to the LDAP server.

base

Distinguished name (DN) of the entry that serves as the starting point for the search. For example, setting base to "o=Airius.com" restricts the search to entries at Airius.com.

scope

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

filter

String representation of the filter to apply in the search. You can specify simple filters with the following syntax:

For details on the syntax for filters, see "Specifying a Search Filter" on page 113.

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:

timeout

Maximum time to wait for the results of the search.

res

Results of the search (when the call is completed).

Returns

For a list of possible result codes for an LDAP search operation, see the result code documentation for the ldap_search_ext_s() function.

Description

The ldap_search_st() function searches the directory for matching entries. The ldap_search_st() function works like the ldap_search_s() function and lets you set a timeout period for the search.

A newer version of this function, ldap_search_ext_s(), is available in this release of the LDAP API. ldap_search_st() (the older version of the function) is included only for backward-compatibility. If you are writing a new LDAP client, use ldap_search_ext_s() instead of ldap_search_st().

If you want more information on ldap_search_st(), refer to the LDAP C SDK 1.0 Programmer's Guide.

See Also

ldap_search_ext_s().


Table of Contents | Previous | Next | Index

Last Updated: 10/01/98 17:06:23