Manual Pages for UNIX Darwin command on man ldap_search_ext
MyWebUniversity

Manual Pages for UNIX Darwin command on man ldap_search_ext

LDAPSEARCH(3) LDAPSEARCH(3)

NAME

ldapsearch, ldapsearchs, ldapsearchst - Perform an LDAP search

operation LLIIBBRRAARRYY

OpenLDAP LDAP (libldap, -lldap)

SYNOPSIS

##iinncclluuddee <> //** ffoorr ssttrruucctt ttiimmeevvaall ddeeffiinniittiioonn **//

##iinncclluuddee <>

iinntt llddaappsseeaarrcchh((lldd,, bbaassee,, ssccooppee,, ffiilltteerr,, aattttrrss,, aattttrrssoonnllyy)) LDAP *ld; char *base; int scope; char *filter, *attrs[]; int attrsonly; iinntt llddaappsseeaarrcchhss((lldd,, bbaassee,, ssccooppee,, ffiilltteerr,, aattttrrss,, aattttrrssoonnllyy,, rreess)) LDAP *ld; char *base; int scope; char *filter, *attrs[] int attrsonly; LDAPMessage **res; iinntt llddaappsseeaarrcchhsstt((lldd,, bbaassee,, ssccooppee,, ffiilltteerr,, aattttrrss,, aattttrrssoonnllyy,, ttiimmeeoouutt,, rreess)) LDAP *ld; char *base; int scope; char *filter, *attrs[] int attrsonly; struct timeval *timeout; LDAPMessage **res;

DESCRIPTION

These routines are used to perform LDAP search operations. llddaappsseeaarrcchhss(()) does the search synchronously (i.e., not returning until the operation completes). llddaappsseeaarrcchhsstt(()) does the same, but allows a timeout to be specified. llddaappsseeaarrcchh(()) is the asynchronous version, initiating the search and returning the message id of the operation it initiated. Base is the DN of the entry at which to start the search. Scope is the scope of the search and should be one of LDAPSCOPEBASE, to search the object itself, LDAPSCOPEONELEVEL, to search the object's immediate children, or LDAPSCOPESUBTREE, to search the object and all its descendents. Filter is a string representation of the filter to apply in the search. Simple filters can be specified as (attributetype=attributevalue). More complex filters are specified using a prefix notation according to the following BNF: ::= '(' ')' ::= | | | ::= '&' ::= '|' ::= '!' ::= | ::= ::= '=' | '~=' | '<=' | '>='

The '~=' construct is used to specify approximate matching. The repre-

sentation for and are as described in RFC 2254. In addition, 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=*@terminator.rs.itd.umich.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 for a more complete description of allow-

able filters.

Attrs is a null-terminated array of attribute types to return from

entries that match filter. If NULL is specified, the return of all

user attributes is requested. The type "*" (LDAPALLUSERATTRIBUTES)

may be used to request all user attributes to be returned. The type

"+"(LDAPALLOPERATIONALATTRIBUTES) may be used to request all opera-

tional attributes to be returned. To request no attributes, the type "1.1" (LDAPNOATTRS) should be listed by itself. Attrsonly should be set to 1 if only attribute types are wanted. It should be set to 0 if both attributes types and attribute values are wanted. EERRRROORRSS llddaappsseeaarrcchhss(()) and llddaappsseeaarrcchhsstt(()) will return the LDAP error code resulting from the search operation. See llddaappeerrrroorr(3) for details.

llddaappsseeaarrcchh(()) returns -1 in case of trouble.

NNOOTTEESS

Note that both read and list functionality are subsumed by these rou-

tines, by using a filter like "(objectclass=*)" and a scope of LDAPSCOPEBASE (to emulate read) or LDAPSCOPEONELEVEL (to emulate list).

These routines may dynamically allocate memory. The caller is respon-

sible for freeing such memory using supplied deallocation routines. Return values are contained in .

SEE ALSO

llddaapp(3), llddaapprreessuulltt(3), llddaappggeettffiilltteerr(3), llddaappeerrrroorr(3) AACCKKNNOOWWLLEEDDGGEEMMEENNTTSS OOppeennLLDDAAPP is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). OOppeennLLDDAAPP is derived from University of Michigan LDAP 3.3 Release. OpenLDAP 2.2.19 2004/11/26 LDAPSEARCH(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™