#include <ldap.h>
int ldap_search_ext(
LDAP *ld,
char *base,
int scope,
char *filter,
char *attrs[],
int attrsonly,
LDAPControl **serverctrls,
LDAPControl **clientctrls,
struct timeval *timeout,
int sizelimit,
int *msgidp)
|
The ldap_search_ext() routine initiates an asynchronous search operation.
No OS/400 authority is required. All authority checking is done by the LDAP server.
<filter> ::= '(' <filtercomp> ')'
<filtercomp> ::= <and> | <or> | <not> | <simple>
<and> ::= '&' <filterlist>
<or> ::= '|' <filterlist>
<not> ::= '!' <filter>
<filterlist> ::= <filter> | <filter> <filterlist>
<simple> ::= <attributetype> <filtertype> <attributevalue>
<filtertype> ::= '=' | '~=' | '<=' | '>='
The '~=' construct is used to specify approximate matching. The representation for <attributetype> and <attributevalue> are as described in "RFC 1778, The String Representation of Standard Attribute Syntaxes". In addition, <attributevalue> can be a single * to achieve an attribute existence test, or can contain text and *'s interspersed to achieve substring matching.
For example, the filter "mail=*" will find any entries that have a mail attribute. The filter "mail=*@student.of.life.edu" will find any entries that have a mail attribute ending in the specified string. To put parentheses in a filter, escape them with a backslash '\\' character. See "RFC 2254, A String Representation of LDAP Search Filters" for a more complete description of allowable filters.
If ldap_search_ext() is not successful, an error code will be returned. See LDAP Client API Error Conditions for possible LDAP error codes.
The following message may be set from this function.
CPF3CF2 E Error(s) occurred during running of ldap_search_ext API.
ldap_search_s() -- Synchronously search the directory.
ldap_search() -- Asynchronously search the directory.
ldap_search_ext_s() -- Synchronously search the directory with controls.
ldap_search_st() -- Synchronously search the directory with timeout.
The ldap_search_ext() API supports LDAP V3 server controls, client controls, and allow varying size and time limits to be easily specified for each search operation.
|
Top
| LDAP APIs List APIs by category |
| [Information Center Home Page | Feedback ] | [Legal | AS/400 Glossary] |