Adds a schema element definition to the local copy of schema in an LDAPSchema structure.
#include <ldap.h>
int ldap_schema_add (
LDAPSchema *schema,
int type,
LDAPSchemaMod *fields[]);
(IN) A handle to the schema of a directory.
(IN) Type of element requested. Use the definitions listed in Schema Element Types.
(IN) An array of pointers to LDAPSchemaMod structures. Each structure represents a field in an attribute definition. ldap_schema_add ignores the ’op’ field in this structure.
See the LDAP Return Codes
for return values.
ldap_schema_add will construct a new schema element definition from the schema mod structures passed in and add the definition to the LDAPSchema structure passed in. Additions are only made to the LDAPSchema structure. To commit this addition to the directory, call ldap_schema_save.