⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ldap_search.3

📁 开放源码的ldap系统
💻 3
字号:
.TH LDAP_SEARCH 3 "25 July 1999" "OpenLDAP LDVERSION".\" $OpenLDAP: pkg/ldap/doc/man/man3/ldap_search.3,v 1.4.2.2 2000/09/03 16:17:30 kurt Exp $.\" Copyright 1998-2000 The OpenLDAP Foundation All Rights Reserved..\" Copying restrictions apply.  See COPYRIGHT/LICENSE..SH NAMEldap_search, ldap_search_s, ldap_search_st \- Perform an LDAP search operation.SH SYNOPSIS.nf.ft B#include <sys/time.h> /* for struct timeval definition */#include <ldap.h>.LP.ft Bint ldap_search(ld, base, scope, filter, attrs, attrsonly).ftLDAP *ld;char *base;int scope;char *filter, *attrs[];int attrsonly;.LP.ft Bint ldap_search_s(ld, base, scope, filter, attrs, attrsonly, res).ftLDAP *ld;char *base;int scope;char *filter, *attrs[]int attrsonly;LDAPMessage **res;.LP.ft Bint ldap_search_st(ld, base, scope, filter, attrs, attrsonly, timeout, res).ftLDAP *ld;char *base;int scope;char *filter, *attrs[]int attrsonly;struct timeval *timeout;LDAPMessage **res;.SH DESCRIPTIONThese routines are used to perform LDAP search operations..B ldap_search_s()does the search synchronously (i.e., notreturning until the operation completes)..B ldap_search_st()doesthe same, but allows a \fItimeout\fP to be specified..B ldap_search()is the asynchronous version, initiating the search and returningthe message id of the operation it initiated.\fIBase\fP is the DN of the entry at which to start the search.\fIScope\fP is the scope of the search and should be one of LDAP_SCOPE_BASE,to search the object itself,LDAP_SCOPE_ONELEVEL, to search the object's immediate children,or LDAP_SCOPE_SUBTREE, to search the object and all its descendents..LP\fIFilter\fP is a stringrepresentation of the filter to apply in the search.  Simple filterscan be specified as \fIattributetype=attributevalue\fP.  More complexfilters are specified using a prefix notation according to the followingBNF:.LP.nf        <filter> ::= '(' <filtercomp> ')'        <filtercomp> ::= <and> | <or> | <not> | <simple>        <and> ::= '&' <filterlist>        <or> ::= '|' <filterlist>        <not> ::= '!' <filter>        <filterlist> ::= <filter> | <filter> <filterlist>        <simple> ::= <attributetype> <filtertype> <attributevalue>        <filtertype> ::= '=' | '~=' | '<=' | '>='.fi.LPThe '~=' construct is used to specify approximate matching.  Therepresentation for <attributetype> and <attributevalue> are asdescribed in RFC 2254.  In addition, <attributevalue> can be a single *to achieve an attribute existence test, or can contain text and *'sinterspersed to achieve substring matching..LPFor example, the filter "mail=*" will find any entries that have a mailattribute.  The filter "mail=*@terminator.rs.itd.umich.edu" will findany 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 for a more complete description of allowablefilters.  See.BR ldap_getfilter (3)for routines to help in constructing search filters automatically..LP\fIAttrs\fP is a null-terminated array of attribute types to returnfrom entries that match \fIfilter\fP.If NULL is specified, all attributes will be returned.The type "*" (LDAP_ALL_USER_ATTRIBUTES) may be used to requestall user attributes to be returned.The type "+"(LDAP_ALL_OPERATIONAL_ATTRIBUTES) may be used to requestall operational attributes to be returned.To request no attributes, the type "1.1" (LDAP_NO_ATTRS)should be listed by itself..LP\fIAttrsonly\fP should be set to 1 ifonly attribute types are wanted.  It should be set to 0 if bothattributes types and attribute values are wanted..SH ERRORS.B ldap_search_s()and.B ldap_search_st()will return the LDAP error code resulting from the search operation.See.BR ldap_error (3)for details..B ldap_search()returns -1 in case of trouble..SH NOTESNote that both readand list functionality are subsumed by these routines,by using a filter like "objectclass=*" and a scope of LDAP_SCOPE_BASE (toemulate read) or LDAP_SCOPE_ONELEVEL (to emulate list)..LPThese routines may dynamically allocate memory.  The caller isresponsible for freeing such memory using supplied deallocationroutines.  Return values are containedin <ldap.h>..SH SEE ALSO.BR ldap (3),.BR ldap_result (3),.BR ldap_getfilter (3),.BR ldap_error (3).SH ACKNOWLEDGEMENTS.B	OpenLDAPis developed and maintained by The OpenLDAP Project (http://www.openldap.org/)..B	OpenLDAPis derived from University of Michigan LDAP 3.3 Release.  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -