Creates and encodes a persistent search control.
#include <ldap.h>
int ldap_create_persistentsearch_control (
LDAP *ld,
int changeTypes,
int changesOnly,
int returnEchgCtls,
char isCritical,
LDAPControl **ctrlp);
(IN) Points to the handle of the LDAP session.
(IN) an integer whose value is the bit-wise OR of the flag values corresponding to the changes types for which a the client wishes to be notified. Valid flags are as follows:
(IN) If non-zero, the initial search is only used to establish a result set on the server. No results are returned from this initial search. As changes are subsequently made to entries in the result set, the server returns the changed entries to the client. If zero, both the results of the initial search and entries that are subsequently changed are returned.
(IN) If non-zero, an entry change notification control is included with each entry. If 0, entry change notification controls are not included with the entries returned from the server.
(IN) Specifies whether or not the persistent search control is critical to the search operation. If non-zero, the control is critical to the search operation. If the server does not support persistent searches, the server will return the error LDAP_UNAVAILABLE_CRITICAL_EXTENSION.
If 0, the control is not critical to the search operation. Even if the server does not support persistent searches, the search operation is still performed.]
(OUT) Points to a pointer for the LDAPControl structure which this function creates and which can be used in the search operation. When you are done with this control, its memory should be freed by calling the ldap_control_free function.
|
0x00 |
LDAP_SUCCESS |
|
0x53 |
LDAP_ENCODING_ERROR |
|
0x59 |
LDAP_PARAM_ERROR |
|
0x5A |
LDAP_NO_MEMORY |
|
Non-zero |
Non-zero values indicate errors. See |
This API creates an LDAP persistent search control using the supplied parameters. The control can then be used in a call to ldap_search_ext to request that the server perform a persistent search. A persistent search allows the client to be notified when changes are made to entries that satisfy the specified search filter. When a persistent search is performed, the connection to the server remains open until the cient abandons the search or unbinds from the server. The timeout parameters to the search are ignored.
For example code, see searchPersist.c.