Retrieves a handle to a schema element, identified by its type and either a name or oid.
#include <ldap.h>
int ldap_schema_get_by_name (
LDAPSchema *schema,
char* nameOrOid,
int elementType,
LDAPSchemaElement **element);
(IN) A handle to the schema of an LDAP directory.
(IN) Name or oid of the schema element requested.
(IN) Type of element requested. Use the definitions listed in Section 6.11, Schema Element Types.
(OUT) Address to a handle of the schema element requested. The user must not modify this memory.
See the LDAP Return Codes
for return values.
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.