Table of Contents | Previous | Next | Index

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

ldap_parse_entrychange_control()

Examines a list of controls returned from a persistent search operation, retrieves an entry change control, and parses that control for information (such as the type of change made to the entry and the change number).

This function implements an extension to the LDAP v3 protocol. Entry change notification is an optional LDAP server feature; it may not be supported on all LDAP servers. Call this function when interacting with LDAP servers that support this LDAP v3 extension.

Syntax

#include <ldap.h>
int ldap_parse_entrychange_control( LDAP *ld,
   LDAPControl **ctrls, int *chgtypep, char **prevdnp,
   int *chgnumpresentp, long *chgnump );

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.

ctrlp

An array of controls returned by the server. You obtain these controls by calling the ldap_get_entry_controls() function on an entry returned by the server.

changetypes

Pointer to an integer specifying the type of change made to the entry. This field can have one of the following values:

prevdnp

Pointer to the previous DN of the entry, if the changetypes argument is LDAP_CHANGETYPE_MODDN. (If the changetypes argument has a different value, this argument is set to NULL.)

When done, you can free this by calling the ldap_memfree() function.

chgnumpresentp

Pointer to an integer specifying whether or not to the change number is included in the control. The parameter can have the following possible values:

chgnump

Pointer to the change number identifying the change made to the entry, if chgnumpresentp points to a non-zero value.

Returns

One of the following values:

Description

Call the ldap_parse_entrychange_control() function to parse an entry returned from a persistent search operation and retrieve an entry change control.

Call this function after receiving an entry from a persistent search and retrieving the controls from the entry (call ldap_get_entry_controls() to get the controls).

See Also

ldap_create_persistentsearch_control(), ldap_get_entry_controls().


Table of Contents | Previous | Next | Index

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