1LDAP_COMPARE(3) Library Functions Manual LDAP_COMPARE(3)
2
3
4
6 ldap_compare, ldap_compare_s, ldap_compare_ext, ldap_compare_ext_s -
7 Perform an LDAP compare operation.
8
10 OpenLDAP LDAP (libldap, -lldap)
11
13 #include <ldap.h>
14
15 int ldap_compare_ext(
16 LDAP *ld,
17 char *dn,
18 char *attr,
19 const struct berval *bvalue,
20 LDAPControl **serverctrls,
21 LDAPControl **clientctrls,
22 int *msgidp );
23
24 int ldap_compare_ext_s(
25 LDAP *ld,
26 char *dn,
27 char *attr,
28 const struct berval *bvalue,
29 LDAPControl **serverctrls,
30 LDAPControl **clientctrls );
31
33 The ldap_compare_ext_s() routine is used to perform an LDAP compare
34 operation synchronously. It takes dn, the DN of the entry upon which
35 to perform the compare, and attr and value, the attribute description
36 and value to compare to those found in the entry. It returns a code,
37 which will be LDAP_COMPARE_TRUE if the entry contains the attribute
38 value and LDAP_COMPARE_FALSE if it does not. Otherwise, an error code
39 is returned that indicates the nature of the problem. See ldap(3) for
40 details.
41
42 The ldap_compare_ext() routine is used to perform an LDAP compare oper‐
43 ation asynchronously. It takes the same parameters as ldap_com‐
44 pare_ext_s(), but provides the message id of the request it initiated
45 in the integer pointed to msgidp. The result of the compare can be
46 obtained by a subsequent call to ldap_result(3).
47
48 Both routines allow server and client controls to be specified to
49 extend the compare request.
50
52 The routines ldap_compare() and ldap_compare_s() are deprecated in
53 favor of ldap_compare_ext() and ldap_compare_ext_s(), respectively.
54
55 Deprecated interfaces generally remain in the library. The macro
56 LDAP_DEPRECATED can be defined to a non-zero value (e.g., -DLDAP_DEPRE‐
57 CATED=1) when compiling program designed to use deprecated interfaces.
58 It is recommended that developers writing new programs, or updating old
59 programs, avoid use of deprecated interfaces. Over time, it is
60 expected that documentation (and, eventually, support) for deprecated
61 interfaces to be eliminated.
62
64 ldap(3), ldap_error(3)
65
67 OpenLDAP Software is developed and maintained by The OpenLDAP Project
68 <http://www.openldap.org/>. OpenLDAP Software is derived from the Uni‐
69 versity of Michigan LDAP 3.3 Release.
70
71
72
73OpenLDAP 2.4.46 2018/03/22 LDAP_COMPARE(3)