package ldap
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=b5b3d095351ec4af7c93795fd9c8e68d8f106cea910f72414846402bc20f3a96
md5=ab4569687487ee49427aa0a93f02e375
doc/ldap/Ldap_schemaparser/index.html
Module Ldap_schemaparser
Source
A library for parsing rfc2252 schemas as returned by directory servers
type objectclass = {
oc_name : string list;
oc_oid : Oid.t;
oc_desc : string;
oc_obsolete : bool;
oc_sup : Lcstring.t list;
oc_must : Lcstring.t list;
oc_may : Lcstring.t list;
oc_type : octype;
oc_xattr : string list;
}
The type representing an objectclass definition
type attribute = {
at_name : string list;
at_desc : string;
at_oid : Oid.t;
at_equality : string;
at_ordering : string;
at_substr : Oid.t;
at_syntax : Oid.t;
at_length : Int64.t;
at_obsolete : bool;
at_single_value : bool;
at_collective : bool;
at_no_user_modification : bool;
at_usage : string;
at_sup : Lcstring.t list;
at_xattr : string list;
}
The type representing an attribute definition
type schema = {
objectclasses : (Lcstring.t, objectclass) Hashtbl.t;
objectclasses_byoid : (Oid.t, objectclass) Hashtbl.t;
attributes : (Lcstring.t, attribute) Hashtbl.t;
attributes_byoid : (Oid.t, attribute) Hashtbl.t;
}
The type representing the whole schema. Consists of hashtbls indexed by two useful keys. For both attributes and objectclasses there exists a hashtbl indexed by OID, and one indexed by lower case canonical name. There exist functions in Ldap_ooclient to look up attributes and objectclasses by non canonical names if that is necessary for you to do. see attrToOid, and ocToOid. They will find the oid of an attribute or objectclass given any name, not just the canonical one. Not that this is somewhat (like several orders of magnitude) slower than lookups by canonical name.
This reference controls the dept of printing for the schema in the toplevel. The default is 10 keys from each table will be printed. OID tables are not currently printed.
A formatter for the schema, prints the structure, and expands the hashtbls to show the keys. The number of keys printed is controled by schema_print_depth.