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