ldap_compare_ext() instead.
#include <ldap.h>
int ldap_compare( LDAP *ld, const char *dn, const char *attr,
const char *value );
ld |
Connection handle, which is a pointer to an |
dn | Distinguished name (DN) of the entry used in the comparison. |
attr | |
value | Value that you want to compare against the attribute values. |
ldap_compare() operation. To check the result of this operation, call ldap_result() and ldap_result2error(). For a list of possible return codes for the LDAP compare operation, see the result code documentation for the ldap_compare_ext_s() function.
ldap_compare() function compares a value with the value of an attribute in an entry.
A newer version of this function, ldap_compare_ext(), is available in this release of the LDAP API. ldap_compare() (the older version of the function) is included only for backward-compatibility. If you are writing a new LDAP client, use ldap_compare_ext() instead of ldap_compare().
If you want more information on ldap_compare(), refer to the LDAP C SDK 1.0 Programmer's Guide.
#include <stdio.h>
#include <ldap.h>
...
LDAP *ld;
char *dn = "uid=bjensen, ou=People, o=Airius.com";
int msgid;
...
msg_id = ldap_compare( ld, dn, "mail", "bjensen@airius.com" );
...
ldap_compare_ext().
Last Updated: 10/01/98 17:06:23