-.TH LDAP_SCHEMA 3 "4 June 2000" "OpenLDAP LDVERSION"
+.TH LDAP_SCHEMA 3 "RELEASEDATE" "OpenLDAP LDVERSION"
.\" $OpenLDAP$
-.\" Copyright 2000 The OpenLDAP Foundation All Rights Reserved.
+.\" Copyright 2000-2006 The OpenLDAP Foundation All Rights Reserved.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.SH NAME
ldap_str2syntax, ldap_syntax2str, ldap_syntax2name, ldap_syntax_free,
ldap_str2objectclass, ldap_objectclass2str, ldap_objectclass2name,
ldap_objectclass_free,
ldap_scherr2str \- Schema definition handling routines
+.SH LIBRARY
+OpenLDAP LDAP (libldap, -lldap)
.SH SYNOPSIS
.nf
.ft B
#include <ldap.h>
+#include <ldap_schema.h>
.LP
.ft B
-LDAP_SYNTAX * ldap_str2syntax(s, code, errp, flags)
+LDAPSyntax * ldap_str2syntax(s, code, errp, flags)
.ft
const char * s;
int * code;
.ft B
char * ldap_syntax2str(syn)
.ft
-const LDAP_SYNTAX * syn;
+const LDAPSyntax * syn;
.LP
.ft B
const char * ldap_syntax2name(syn)
.ft
-LDAP_SYNTAX * syn;
+LDAPSyntax * syn;
.LP
.ft B
ldap_syntax_free(syn)
.ft
-LDAP_SYNTAX * syn;
+LDAPSyntax * syn;
.LP
.ft B
-LDAP_MATCHING_RULE * ldap_str2matchingrule(s, code, errp, flags)
+LDAPMatchingRule * ldap_str2matchingrule(s, code, errp, flags)
.ft
const char * s;
int * code;
.ft B
char * ldap_matchingrule2str(mr);
.ft
-const LDAP_MATCHING_RULE * mr;
+const LDAPMatchingRule * mr;
.LP
.ft B
const char * ldap_matchingrule2name(mr)
.ft
-LDAP_MATCHING_RULE * mr;
+LDAPMatchingRule * mr;
.LP
.ft B
ldap_matchingrule_free(mr)
.ft
-LDAP_MATCHING_RULE * mr;
+LDAPMatchingRule * mr;
.LP
.ft B
-LDAP_ATTRIBUTE_TYPE * ldap_str2attributetype(s, code, errp, flags)
+LDAPAttributeType * ldap_str2attributetype(s, code, errp, flags)
.ft
const char * s;
int * code;
.ft B
char * ldap_attributetype2str(at)
.ft
-const LDAP_ATTRIBUTE_TYPE * at;
+const LDAPAttributeType * at;
.LP
.ft B
const char * ldap_attributetype2name(at)
.ft
-LDAP_ATTRIBUTE_TYPE * at;
+LDAPAttributeType * at;
.LP
.ft B
ldap_attributetype_free(at)
.ft
-LDAP_ATTRIBUTE_TYPE * at;
+LDAPAttributeType * at;
.LP
.ft B
-LDAP_OBJECT_CLASS * ldap_str2objectclass(s, code, errp, flags)
+LDAPObjectClass * ldap_str2objectclass(s, code, errp, flags)
.ft
const char * s;
int * code;
.ft B
char * ldap_objectclass2str(oc)
.ft
-const LDAP_OBJECT_CLASS * oc;
+const LDAPObjectClass * oc;
.LP
.ft B
const char * ldap_objectclass2name(oc)
.ft
-LDAP_OBJECT_CLASS * oc;
+LDAPObjectClass * oc;
.LP
.ft B
ldap_objectclass_free(oc)
.ft
-LDAP_OBJECT_CLASS * oc;
+LDAPObjectClass * oc;
.LP
.ft B
char * ldap_scherr2str(code)
int code;
.SH DESCRIPTION
These routines are used to parse schema definitions in the syntax
-defined in RFC2252 into structs and handle these structs. These
+defined in RFC 2252 into structs and handle these structs. These
routines handle four kinds of definitions: syntaxes, matching rules,
-attribute types and objectclasses. For each definition kind, four
+attribute types and object classes. For each definition kind, four
routines are provided.
.LP
.B ldap_str2xxx()
-takes a definition in RFC2252 format in argument
+takes a definition in RFC 2252 format in argument
.IR s
as a NUL-terminated string and returns, if possible, a pointer to a
newly allocated struct of the appropriate kind. The caller is
syntax recognized. The following values are defined:
.TP
.B LDAP_SCHEMA_ALLOW_NONE
-strict parsing according to RFC2252.
+strict parsing according to RFC 2252.
.TP
.B LDAP_SCHEMA_ALLOW_NO_OID
permit definitions that do not contain an initial OID.
.RS
.nf
.ne 7
-.ta 8n 16n 32 n
+.ta 8n 16n 32n
typedef struct ldap_schema_extension_item {
char *lsei_name; /* Extension name */
char **lsei_values; /* Extension values */
-} LDAP_SCHEMA_EXTENSION_ITEM;
+} LDAPSchemaExtensionItem;
typedef struct ldap_syntax {
char *syn_oid; /* OID */
char **syn_names; /* Names */
char *syn_desc; /* Description */
- LDAP_SCHEMA_EXTENSION_ITEM **syn_extensions; /* Extension */
-} LDAP_SYNTAX;
+ LDAPSchemaExtensionItem **syn_extensions; /* Extension */
+} LDAPSyntax;
typedef struct ldap_matchingrule {
char *mr_oid; /* OID */
char *mr_desc; /* Description */
int mr_obsolete; /* Is obsolete? */
char *mr_syntax_oid; /* Syntax of asserted values */
- LDAP_SCHEMA_EXTENSION_ITEM **mr_extensions; /* Extensions */
-} LDAP_MATCHING_RULE;
+ LDAPSchemaExtensionItem **mr_extensions; /* Extensions */
+} LDAPMatchingRule;
typedef struct ldap_attributetype {
char *at_oid; /* OID */
int at_collective; /* Is collective? */
int at_no_user_mod; /* Are changes forbidden through LDAP? */
int at_usage; /* Usage, see below */
- LDAP_SCHEMA_EXTENSION_ITEM **at_extensions; /* Extensions */
-} LDAP_ATTRIBUTE_TYPE;
+ LDAPSchemaExtensionItem **at_extensions; /* Extensions */
+} LDAPAttributeType;
typedef struct ldap_objectclass {
char *oc_oid; /* OID */
int oc_kind; /* Kind, see below */
char **oc_at_oids_must; /* OIDs of required attribute types */
char **oc_at_oids_may; /* OIDs of optional attribute types */
- LDAP_SCHEMA_EXTENSION_ITEM **oc_extensions; /* Extensions */
-} LDAP_OBJECT_CLASS;
+ LDAPSchemaExtensionItem **oc_extensions; /* Extensions */
+} LDAPObjectClass;
.ta
.fi
.RE
.LP
Routines
.B ldap_xxx2str()
-return a string representation in the format described by RFC2252 of
+return a string representation in the format described by RFC 2252 of
the struct passed in the argument. The string is a newly allocated
string that must be freed by the caller. These routines may return
NULL if no memory can be allocated for the string.
Unexpected end of data.
.SH SEE ALSO
-.BR ldap (3),
+.BR ldap (3)
.SH ACKNOWLEDGEMENTS
-.B OpenLDAP
+.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B OpenLDAP
+.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.