ldap_schema_add

Adds a schema element definition to the local copy of schema in an LDAPSchema structure.

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_add (
     LDAPSchema     *schema,
     int            type,
     LDAPSchemaMod  *fields[]);
  

Parameters

schema

(IN) A handle to the schema of a directory.

type

(IN) Type of element requested. Use the definitions listed in Schema Element Types.

fields

(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.

Return Values

See the LDAP Return Codes for return values.

Remarks

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.