]> git.sur5r.net Git - openldap/blob - doc/man/man3/ldap_compare.3
Happy New Year
[openldap] / doc / man / man3 / ldap_compare.3
1 .TH LDAP_COMPARE 3 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2018 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 ldap_compare, ldap_compare_s, ldap_compare_ext, ldap_compare_ext_s \- Perform an LDAP compare operation.
7 .SH LIBRARY
8 OpenLDAP LDAP (libldap, \-lldap)
9 .SH SYNOPSIS
10 .nf
11 .ft B
12 #include <ldap.h>
13 .LP
14 .ft B
15 int ldap_compare_ext(
16 .RS
17 .ft B
18 LDAP *\fIld\fB,
19 char *\fIdn\fB,
20 char *\fIattr\fB,
21 const struct berval *\fIbvalue\fB,
22 LDAPControl **\fIserverctrls\fB,
23 LDAPControl **\fIclientctrls\fB,
24 int *\fImsgidp\fB );
25 .RE
26 .LP
27 .ft B
28 int ldap_compare_ext_s(
29 .RS
30 .ft B
31 LDAP *\fIld\fB,
32 char *\fIdn\fB,
33 char *\fIattr\fB,
34 const struct berval *\fIbvalue\fB,
35 LDAPControl **\fIserverctrls\fB,
36 LDAPControl **\fIclientctrls\fB );
37 .RE
38 .SH DESCRIPTION
39 The
40 .B ldap_compare_ext_s()
41 routine is used to perform an LDAP compare operation synchronously.
42 It takes \fIdn\fP, the DN of the entry upon which to perform the
43 compare, and \fIattr\fP and \fIvalue\fP, the attribute description and
44 value to compare to those found in the entry.  It returns a code, which
45 will be LDAP_COMPARE_TRUE if the entry contains the attribute value and
46 LDAP_COMPARE_FALSE if it does not.  Otherwise, an error code is
47 returned that indicates the nature of the problem.  See
48 .BR ldap (3)
49 for details.
50 .LP
51 The
52 .B ldap_compare_ext()
53 routine is used to perform an LDAP compare operation
54 asynchronously.  It takes the same parameters as
55 .BR ldap_compare_ext_s() ,
56 but provides the message id of the request it initiated in the
57 integer pointed to \fImsgidp\fP.  The result of
58 the compare can be obtained by a subsequent call to
59 .BR ldap_result (3).
60 .LP
61 Both routines allow server and client controls to be specified to
62 extend the compare request.
63 .SH DEPRECATED INTERFACES
64 The routines
65 .BR ldap_compare ()
66 and
67 .BR ldap_compare_s ()
68 are deprecated in favor of
69 .BR ldap_compare_ext ()
70 and
71 .BR ldap_compare_ext_s (),
72 respectively.
73 .LP
74 .so Deprecated
75 .SH SEE ALSO
76 .BR ldap (3),
77 .BR ldap_error (3)
78 .SH ACKNOWLEDGEMENTS
79 .so ../Project