ldap_schema_fetch

Connects to a directory and retuns the schema to an LDAPSchema struct.

Library:*ldapsdk.*
NDS Version:7.xx or higher
Platform:NLM, Windows (NT, 95, 98, 2000, XP, Vista 32-bit and 64-bit ), Linux (32-bit and 64-bit), Solaris, AIX, and HP-UX

Syntax

  #include <ldap.h>
  
  int ldap_schema_fetch (
     lDAP        ld,
     LDAPSchema  **schema,
     const char  *subschemaSubentryDN);
  

Parameters

ld

(IN) LDAP session handle.

schema

(OUT) Address of a handle to LDAPSchema, contains a local copy of the entire directory schema.

subschemaSubentryDN

(IN) Distinguished name of the entry from which to return schema.

Return Values

See the LDAP Return Codes for return values.

Remarks

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.

See Also

ldap_schema_free