Decodes the information returned from a search operation that used a persistent search control.
#include <ldap.h>
int ldap_parse_entrychange_control (
LDAP *ld,
LDAPControl **ctls,
int *changeType,
char **prevDN,
int *hasChangeNum,
long *changeNum);
(IN) Points to the handle of the LDAP session.
(IN) A pointer to an array of pointers to controls returned by the server. The controls are obtained by calling the ldap_get_entry_controls() function on an entry returned by the server.
(OUT) A pointer to an integer specifying the type of change made to the entry. Valid flags are as follows:
(OUT) A 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 should free this by calling the ldap_memfree function. This parameter is optional and can be set to NULL.
(OUT) A pointer to an integer specifying whether or not the change number is included in the control. A non-zero value indicates that the change number is included and is available as the changeNum argument. Zero indicates that the change number is not included. This parameter and the changeNum parameter must either both be NULL or both be non-NULL.
(OUT) A pointer to the change number identifying the change made to the entry. This parameter and the hasChangeNum parameter must either both be NULL or both be non-NULL. Change numbers are typically only returned by servers that support a change log.
|
0x00 |
LDAP_SUCCESS |
|
0x53 |
LDAP_DECODING_ERROR |
|
0x5A |
LDAP_NO_MEMORY |
|
Non-zero |
Non-zero values indicate errors. See |
The ldap_parse_entrychange_control function examines the controls returned with and entry as a result of a persistent search operation. If an entry change control is present, the control is parsed and its elements' values are retrieved. This function should be called after an entry is returned to the client as a result of a persistent search operation. An entry’s controls are retrieved by calling the ldap_get_entry_controls function.
For example code, see searchPersist.c.