1LDAP_COMPARE(3)            Library Functions Manual            LDAP_COMPARE(3)
2
3
4

NAME

6       ldap_compare, ldap_compare_s - Perform an LDAP compare operation
7

LIBRARY

9       OpenLDAP LDAP (libldap, -lldap)
10

SYNOPSIS

12       #include <ldap.h>
13
14       int ldap_compare_s(ld, dn, attr, value)
15       LDAP *ld;
16       char *dn, *attr, *value;
17
18       int ldap_compare(ld, dn, attr, value)
19       LDAP *ld;
20       char *dn, *attr, *value;
21

DESCRIPTION

23       The  ldap_compare_s() routine is used to perform an LDAP compare opera‐
24       tion synchronously.  It takes dn, the DN of the  entry  upon  which  to
25       perform  the  compare, and attr and value, the attribute type and value
26       to compare to those found in the entry.  It returns an LDAP error code,
27       which  will  be  LDAP_COMPARE_TRUE  if the entry contains the attribute
28       value and LDAP_COMPARE_FALSE if it does  not.   Otherwise,  some  error
29       code is returned.
30
31       The ldap_compare() routine is used to perform an LDAP compare operation
32       asynchronously.  It takes the same parameters as ldap_compare_s(),  but
33       returns  the message id of the request it initiated.  The result of the
34       compare can be obtained by a subsequent call to ldap_result(3).
35

ERRORS

37       ldap_compare_s() returns an LDAP error code which can be interpreted by
38       calling  one  of ldap_perror(3) and friends.  ldap_compare() returns -1
39       if something went wrong initiating the request.  It  returns  the  non-
40       negative message id of the request if things went ok.
41

BUGS

43       There is no way to compare binary values, but there should be.
44

SEE ALSO

46       ldap(3), ldap_error(3)
47

ACKNOWLEDGEMENTS

49       OpenLDAP   is   developed   and  maintained  by  The  OpenLDAP  Project
50       (http://www.openldap.org/).  OpenLDAP is  derived  from  University  of
51       Michigan LDAP 3.3 Release.
52
53
54
55OpenLDAP 2.3.34                    2007/2/16                   LDAP_COMPARE(3)
Impressum