]> git.sur5r.net Git - openldap/blob - doc/man/man3/ldap_compare.3
Update misleading statement about ldap_init(). It use is actually
[openldap] / doc / man / man3 / ldap_compare.3
1 .TH LDAP_COMPARE 3 "22 September 1998" "OpenLDAP LDVERSION"
2 .SH NAME
3 ldap_compare, ldap_compare_s \- Perform an LDAP compare operation
4 .SH SYNOPSIS
5 .nf
6 .ft B
7 #include <lber.h>
8 #include <ldap.h>
9 .LP
10 .ft B
11 int ldap_compare_s(ld, dn, attr, value)
12 .ft
13 LDAP *ld;
14 char *dn, *attr, *value;
15 .LP
16 .ft B
17 int ldap_compare(ld, dn, attr, value)
18 .ft
19 LDAP *ld;
20 char *dn, *attr, *value;
21 .SH DESCRIPTION
22 The
23 .B ldap_compare_s()
24 routine is used to perform an LDAP compare operation
25 synchronously.  It takes \fIdn\fP, the DN of the entry upon which to perform
26 the compare, and \fIattr\fP and \fIvalue\fP, the attribute type and value to
27 compare to those found in the entry.  It returns an LDAP error code, which
28 will be LDAP_COMPARE_TRUE if the entry contains the attribute value and
29 LDAP_COMPARE_FALSE if it does not.  Otherwise, some error code is returned.
30 .LP
31 The
32 .B ldap_compare()
33 routine is used to perform an LDAP compare operation
34 asynchronously.  It takes the same parameters as
35 .BR ldap_compare_s() ,
36 but returns the message id of the request it initiated.  The result of
37 the compare can be obtained by a subsequent call to
38 .BR ldap_result (3).
39 .SH ERRORS
40 .B ldap_compare_s()
41 returns an LDAP error code which can be interpreted
42 by calling one of
43 .BR ldap_perror (3)
44 and friends.  ldap_compare() returns
45 -1 if something went wrong initiating the request.  It returns the
46 non-negative message id of the request if things went ok.
47 .SH BUGS
48 There is no way to compare binary values, but there should be.
49 .SH SEE ALSO
50 .BR ldap(3),
51 .BR ldap_error(3)
52 .SH ACKNOWLEDGEMENTS
53 .B      OpenLDAP
54 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
55 .B      OpenLDAP
56 is derived from University of Michigan LDAP 3.3 Release.