]> 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-2004 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 ldap_compare, ldap_compare_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_s(ld, dn, attr, value)
16 .ft
17 LDAP *ld;
18 char *dn, *attr, *value;
19 .LP
20 .ft B
21 int ldap_compare(ld, dn, attr, value)
22 .ft
23 LDAP *ld;
24 char *dn, *attr, *value;
25 .SH DESCRIPTION
26 The
27 .B ldap_compare_s()
28 routine is used to perform an LDAP compare operation
29 synchronously.  It takes \fIdn\fP, the DN of the entry upon which to perform
30 the compare, and \fIattr\fP and \fIvalue\fP, the attribute type and value to
31 compare to those found in the entry.  It returns an LDAP error code, which
32 will be LDAP_COMPARE_TRUE if the entry contains the attribute value and
33 LDAP_COMPARE_FALSE if it does not.  Otherwise, some error code is returned.
34 .LP
35 The
36 .B ldap_compare()
37 routine is used to perform an LDAP compare operation
38 asynchronously.  It takes the same parameters as
39 .BR ldap_compare_s() ,
40 but returns the message id of the request it initiated.  The result of
41 the compare can be obtained by a subsequent call to
42 .BR ldap_result (3).
43 .SH ERRORS
44 .B ldap_compare_s()
45 returns an LDAP error code which can be interpreted
46 by calling one of
47 .BR ldap_perror (3)
48 and friends.  ldap_compare() returns
49 -1 if something went wrong initiating the request.  It returns the
50 non-negative message id of the request if things went ok.
51 .SH BUGS
52 There is no way to compare binary values, but there should be.
53 .SH SEE ALSO
54 .BR ldap (3),
55 .BR ldap_error (3)
56 .SH ACKNOWLEDGEMENTS
57 .B OpenLDAP
58 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
59 .B OpenLDAP
60 is derived from University of Michigan LDAP 3.3 Release.