ldap_schema_get_by_name

Retrieves a handle to a schema element, identified by its type and either a name or oid.

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_get_by_name (
     LDAPSchema          *schema,
     char*               nameOrOid,
     int                 elementType,
     LDAPSchemaElement  **element);
  

Parameters

schema

(IN) A handle to the schema of an LDAP directory.

nameOrOid

(IN) Name or oid of the schema element requested.

elementType

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

element

(OUT) Address to a handle of the schema element requested. The user must not modify this memory.

Return Values

See the LDAP Return Codes for return values.

Remarks

The returned handle to an LDAPSchemaElement structure, ’element’, is a pointer to memory within the LDAPSchema structure, ’schema’. Therefore if ’schema’ changes or is freed, ’element’ may also change, or become invalid. Likewise, if the user frees or tampers with ’element’, ’schema’ may become corrupted.