1.lf 1 stdin 2.TH LDAP_COMPARE 3 "2020/04/28" "OpenLDAP 2.4.50" 3.\" $OpenLDAP$ 4.\" Copyright 1998-2020 The OpenLDAP Foundation All Rights Reserved. 5.\" Copying restrictions apply. See COPYRIGHT/LICENSE. 6.SH NAME 7ldap_compare, ldap_compare_s, ldap_compare_ext, ldap_compare_ext_s \- Perform an LDAP compare operation. 8.SH LIBRARY 9OpenLDAP LDAP (libldap, \-lldap) 10.SH SYNOPSIS 11.nf 12.ft B 13#include <ldap.h> 14.LP 15.ft B 16int ldap_compare_ext( 17.RS 18.ft B 19LDAP *\fIld\fB, 20char *\fIdn\fB, 21char *\fIattr\fB, 22const struct berval *\fIbvalue\fB, 23LDAPControl **\fIserverctrls\fB, 24LDAPControl **\fIclientctrls\fB, 25int *\fImsgidp\fB ); 26.RE 27.LP 28.ft B 29int ldap_compare_ext_s( 30.RS 31.ft B 32LDAP *\fIld\fB, 33char *\fIdn\fB, 34char *\fIattr\fB, 35const struct berval *\fIbvalue\fB, 36LDAPControl **\fIserverctrls\fB, 37LDAPControl **\fIclientctrls\fB ); 38.RE 39.SH DESCRIPTION 40The 41.B ldap_compare_ext_s() 42routine is used to perform an LDAP compare operation synchronously. 43It takes \fIdn\fP, the DN of the entry upon which to perform the 44compare, and \fIattr\fP and \fIvalue\fP, the attribute description and 45value to compare to those found in the entry. It returns a code, which 46will be LDAP_COMPARE_TRUE if the entry contains the attribute value and 47LDAP_COMPARE_FALSE if it does not. Otherwise, an error code is 48returned that indicates the nature of the problem. See 49.BR ldap (3) 50for details. 51.LP 52The 53.B ldap_compare_ext() 54routine is used to perform an LDAP compare operation 55asynchronously. It takes the same parameters as 56.BR ldap_compare_ext_s() , 57but provides the message id of the request it initiated in the 58integer pointed to \fImsgidp\fP. The result of 59the compare can be obtained by a subsequent call to 60.BR ldap_result (3). 61.LP 62Both routines allow server and client controls to be specified to 63extend the compare request. 64.SH DEPRECATED INTERFACES 65The routines 66.BR ldap_compare () 67and 68.BR ldap_compare_s () 69are deprecated in favor of 70.BR ldap_compare_ext () 71and 72.BR ldap_compare_ext_s (), 73respectively. 74.LP 75.lf 1 ./Deprecated 76Deprecated interfaces generally remain in the library. The macro 77LDAP_DEPRECATED can be defined to a non-zero value 78(e.g., -DLDAP_DEPRECATED=1) when compiling program designed to use 79deprecated interfaces. It is recommended that developers writing new 80programs, or updating old programs, avoid use of deprecated interfaces. 81Over time, it is expected that documentation (and, eventually, support) for 82deprecated interfaces to be eliminated. 83.lf 75 stdin 84.SH SEE ALSO 85.BR ldap (3), 86.BR ldap_error (3) 87.SH ACKNOWLEDGEMENTS 88.lf 1 ./../Project 89.\" Shared Project Acknowledgement Text 90.B "OpenLDAP Software" 91is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. 92.B "OpenLDAP Software" 93is derived from the University of Michigan LDAP 3.3 Release. 94.lf 80 stdin 95