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