Connects to a directory and retuns the schema to an LDAPSchema struct.
#include <ldap.h>
int ldap_schema_fetch (
lDAP ld,
LDAPSchema **schema,
const char *subschemaSubentryDN);
(IN) LDAP session handle.
(OUT) Address of a handle to LDAPSchema, contains a local copy of the entire directory schema.
(IN) Distinguished name of the entry from which to return schema.
See the LDAP Return Codes
for return values.
A call to ldap_schema_fetch will connect to a directory and locate the SubSchemaSubEntry. It allocates an LDAPSchema structure and populates it with all available schema definitions.
The schema will be read from the subschemaSubentry passed in. If subschemaSubentryDN is NULL then the first subschemaSubentry listed in the root DSE will be used.
NOTE:Setting the SubSchemaSubentryDN to NULL requires version 3 and eDirectory 8.xx.