ldap_compare_ext_s()--Perform an LDAP Compare Operation with Controls (Synchronous)
Syntax
#include <ldap.h> struct berval { unsigned long bv_len; char *bv_val; }; int ldap_compare_ext_s( LDAP *ld, const char *dn, const char *attr, const berval *bvalue, LDAPControl **serverctrls, LDAPControl **clientctrls)
Library Name/Service Program: QSYS/QGLDCLNT
Default Public Authority: *USE
Threadsafe: Yes
The ldap_compare_ext_s() function is used to perform a synchronous LDAP compare operation with controls.
Authorities and Locks
No IBM® i authority is required. All authority checking is done by the LDAP server.
Parameters
- ld
- (Input) The LDAP pointer returned by a previous call to
ldap_init(),
ldap_ssl_init(), or
ldap_open().
- dn
- (Input) The distinguished name (DN) of the entry upon which to perform the
compare.
- attr
- (Input) The attribute type to use in the comparison.
- bvalue
- (Input) The attribute value to compare against the value in the entry. This
is a pointer to a struct berval, making it possible to compare binary
values.
- serverctrls
- (Input) A list of LDAP server controls. This parameter may be set to null.
See Controls for LDAP APIs for more information about
server controls.
- clientctrls
- (Input) A list of LDAP client controls. This parameter may be set to null. See Controls for LDAP APIs for more information about client controls.
Return Value
- LDAP_COMPARE_TRUE
- if the entry contains the attribute value.
- LDAP_COMPARE_FALSE
- if the entry does not contain the attribute value.
- another LDAP error code
- if the request was not successful.
Error Conditions
The ldap_compare_ext_s() API will return an LDAP error code if not successful. See LDAP Client API Error Conditions for possible LDAP error code values.
Error Messages
The following message may be sent from this function.
Message ID | Error Message Text |
---|---|
CPF3CF2 E | Error(s) occurred during running of ldap_compare_ext_s API. |
Related Information
- ldap_compare() -- Asynchronous compare to a directory entry.
- ldap_compare_s() -- Synchronous compare to a directory entry.
- ldap_compare_ext() -- Asynchronous compare to a directory entry with controls.
The ldap_compare_ext_s() API supports LDAP V3 server controls and client controls.
API introduced: V4R5
[ Back to top | LDAP APIs | APIs by category ]