package ldap
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=746db5d6239931ff7ceff7a75bc61315
sha512=8dcad3e5b86445c914ea6bb76e2a8fbf35deb674b226222a6482e3ffea0144b30f2e39bb2920b068b0c11f66a4bda3c12d5e1408e19739069ef066ce5b65980c
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.