Table of Contents | Previous | Next | Index

Netscape Directory SDK 3.0 for C Programmer’s Guide
     Chapter 18 Functions

ldap_compare_ext_s()

Synchronously determines if an attribute of an entry contains a specified value.

Syntax

#include <ldap.h>
int ldap_compare_ext_s( LDAP *ld, const char *dn,
   const char *attr, struct berval *bvalue,
   LDAPControl **serverctrls, LDAPControl **clientctrls );

Parameters

This function has the following parameters:

ld

Connection handle, which is a pointer to an LDAP structure containing information about the connection to the LDAP server.

dn

Distinguished name (DN) of the entry used in the comparison.

attr

Attribute type that you want to check the value against.

value

Value that you want to compare against the attribute values.

serverctrls

Pointer to an array of LDAPControl structures representing LDAP server controls that apply to this LDAP operation. If you do not want to pass any server controls, specify NULL for this argument.

clientctrls

Pointer to an array of LDAPControl structures representing LDAP client controls that apply to this LDAP operation. If you do not want to pass any client controls, specify NULL for this argument.

Returns

One of the following values:

The following result codes can be returned by the Netscape Directory Server when processing an LDAP compare request. Other LDAP servers may send these result codes under different circumstances or may send different result codes back to your LDAP client.

Note that the Netscape Directory Server may send other result codes in addition to the codes described here (for example, the server may have loaded a custom plug-in that returns other result codes).

Description

The ldap_compare_ext_s() function synchronously compares the value of an attribute in an entry against a specified value.

This function is a new version of the ldap_compare_s() function. If you are writing a new LDAP client, you should call this function instead of ldap_compare_s().

ldap_compare_ext_s() is a synchronous function, which directly returns the results of the operation. If you want to perform other operations while waiting for the results of this operation, call the asynchronous function ldap_compare_ext() instead. (For more information on asynchronous and synchronous functions, see "Calling Synchronous and Asynchronous Functions" on page 80.)

For additional information on comparing attribute values in an entry, see "Comparing the Value of an Attribute" on page 231.

Example

See the example under "Example: Comparing a Value in an Entry (Synchronous)" on page 237.

See Also

ldap_compare_ext().


Table of Contents | Previous | Next | Index

Last Updated: 10/01/98 17:06:23