Lists all the replicas on the specified directory server.
#include <ldapx.h> int ldap_list_replicas ( LDAP *ld, char *serverDN, char ***replicaList);
(IN) Points to the handle for the LDAP session.
(IN) Points to the distinguished name, in LDAP format, of the server whose replicas are being listed.
(OUT) Points to a list of replicas.
0x00 |
LDAP_SUCCESS |
0x01 |
LDAP_OPERATIONS_ERROR: A string is returned with this error code that indicates the source of the error. |
0x53 |
LDAP_ENCODING_ERROR |
0x5A |
LDAP_NO_MEMORY |
0x5C |
LDAP_NOT_SUPPORTED |
Non-zero |
Non-zero values indicate errors. See |
The function allocates the memory for replicaList, but the caller is responsible for freeing the memory with the ldapx_memfree function.
This function returns all replicas including subordinate references. The replicaList agrument points to a null terminated array of strings. Each string in the array contains the distinguished name of a replica's partition root.
For sample code, see listrepl.c.
The requestName is set to the OID (2.16.840.1.113719.1.27.100.19) and the requestValue is a BER encoding of the following:
RequestBer serverDN LDAPDN
The responseName is set to the OID (2.16.840.1.113719.1.27.100.20) and the responseValue is a BER encoding of the following:
ResponseBer replicaList SEQUENCE OF OCTET STRINGS