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

NAME

6       ldap_compare,  ldap_compare_s,  ldap_compare_ext,  ldap_compare_ext_s -
7       Perform an LDAP compare operation.
8

LIBRARY

10       OpenLDAP LDAP (libldap, -lldap)
11

SYNOPSIS

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

DESCRIPTION

33       The ldap_compare_ext_s() routine is used to perform an LDAP compare op‐
34       eration  synchronously.  It takes dn, the DN of the entry upon which to
35       perform the compare, and attr and value, the attribute description  and
36       value to compare to those found in the entry.  It returns a code, which
37       will be LDAP_COMPARE_TRUE if the entry contains the attribute value and
38       LDAP_COMPARE_FALSE  if  it  does  not.  Otherwise, an error code is re‐
39       turned that indicates the nature of the problem.  See ldap(3)  for  de‐
40       tails.
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 ob‐
46       tained by a subsequent call to ldap_result(3).
47
48       Both  routines  allow server and client controls to be specified to ex‐
49       tend the compare request.
50

DEPRECATED INTERFACES

52       The routines ldap_compare() and ldap_compare_s() are deprecated in  fa‐
53       vor 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 ex‐
60       pected that documentation (and, eventually, support) for deprecated in‐
61       terfaces to be eliminated.
62

SEE ALSO

64       ldap(3), ldap_error(3)
65

ACKNOWLEDGEMENTS

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.6.6                    2023/07/31                   LDAP_COMPARE(3)
Impressum