`sig
exception LDAP_Encoder of string
exception LDAP_Decoder of string
type ldap_resultcode =
[ `ADMINLIMIT_EXCEEDED
| `AFFECTS_MULTIPLE_DSAS
| `ALIAS_DEREF_PROBLEM
| `ALIAS_PROBLEM
| `ALREADY_EXISTS
| `AUTH_METHOD_NOT_SUPPORTED
| `AUTH_UNKNOWN
| `BUSY
| `CLIENT_LOOP
| `COMPARE_FALSE
| `COMPARE_TRUE
| `CONFIDENTIALITY_REQUIRED
| `CONNECT_ERROR
| `CONSTRAINT_VIOLATION
| `CONTROL_NOT_FOUND
| `DECODING_ERROR
| `ENCODING_ERROR
| `FILTER_ERROR
| `INAPPROPRIATE_AUTH
| `INAPPROPRIATE_MATCHING
| `INSUFFICIENT_ACCESS
| `INVALID_CREDENTIALS
| `INVALID_DN_SYNTAX
| `INVALID_SYNTAX
| `IS_LEAF
| `LOCAL_ERROR
| `LOOP_DETECT
| `MORE_RESULTS_TO_RETURN
| `NAMING_VIOLATION
| `NOT_ALLOWED_ON_NONLEAF
| `NOT_ALLOWED_ON_RDN
| `NOT_SUPPORTED
| `NO_MEMORY
| `NO_OBJECT_CLASS_MODS
| `NO_RESULTS_RETURNED
| `NO_SUCH_ATTRIBUTE
| `NO_SUCH_OBJECT
| `OBJECT_CLASS_VIOLATION
| `OPERATIONS_ERROR
| `OTHER
| `PARAM_ERROR
| `PROTOCOL_ERROR
| `REFERRAL
| `REFERRAL_LIMIT_EXCEEDED
| `SASL_BIND_IN_PROGRESS
| `SERVER_DOWN
| `SIZELIMIT_EXCEEDED
| `STRONG_AUTH_REQUIRED
| `SUCCESS
| `TIMELIMIT_EXCEEDED
| `TIMEOUT
| `TYPE_OR_VALUE_EXISTS
| `UNAVAILABLE
| `UNAVAILABLE_CRITICAL_EXTENSION
| `UNDEFINED_TYPE
| `UNKNOWN_ERROR of int
| `UNWILLING_TO_PERFORM
| `USER_CANCELLED ]
type ldap_result = {
result_code : Ldap_types.ldap_resultcode;
matched_dn : string;
error_message : string;
ldap_referral : string list option;
}
type ldap_ext_return = {
ext_matched_dn : string;
ext_referral : string list option;
}
exception LDAP_Failure of Ldap_types.ldap_resultcode * string *
Ldap_types.ldap_ext_return
type saslCredentials = {
sasl_mechanism : string;
sasl_credentials : string option;
}
type authentication = Simple of string | Sasl of Ldap_types.saslCredentials
type bind_request = {
bind_version : int;
bind_name : string;
bind_authentication : Ldap_types.authentication;
}
type bind_response = {
bind_result : Ldap_types.ldap_result;
bind_serverSaslCredentials : string option;
}
type attribute = { attr_type : string; attr_vals : string list; }
type dn = Ldap_types.attribute list
type search_result_entry = {
sr_dn : string;
sr_attributes : Ldap_types.attribute list;
}
type search_scope = [ `BASE | `ONELEVEL | `SUBTREE ]
type alias_deref =
[ `DEREFALWAYS
| `DEREFFINDINGBASE
| `DEREFINSEARCHING
| `NEVERDEREFALIASES ]
type attribute_value_assertion = {
attributeDesc : string;
assertionValue : string;
}
type matching_rule_assertion = {
matchingRule : string option;
ruletype : string option;
matchValue : string;
dnAttributes : bool;
}
type substring_component = {
substr_initial : string list;
substr_any : string list;
substr_final : string list;
}
type substring_filter = {
attrtype : string;
substrings : Ldap_types.substring_component;
}
type filter =
[ `And of Ldap_types.filter list
| `ApproxMatch of Ldap_types.attribute_value_assertion
| `EqualityMatch of Ldap_types.attribute_value_assertion
| `ExtensibleMatch of Ldap_types.matching_rule_assertion
| `GreaterOrEqual of Ldap_types.attribute_value_assertion
| `LessOrEqual of Ldap_types.attribute_value_assertion
| `Not of Ldap_types.filter
| `Or of Ldap_types.filter list
| `Present of string
| `Substrings of Ldap_types.substring_filter ]
type search_request = {
baseObject : string;
scope : Ldap_types.search_scope;
derefAliases : Ldap_types.alias_deref;
sizeLimit : int32;
timeLimit : int32;
typesOnly : bool;
filter : Ldap_types.filter;
s_attributes : string list;
}
type modify_optype = [ `ADD | `DELETE | `REPLACE ]
type modify_op = {
mod_op : Ldap_types.modify_optype;
mod_value : Ldap_types.attribute;
}
type modify_request = {
mod_dn : string;
modification : Ldap_types.modify_op list;
}
type modify_dn_request = {
modn_dn : string;
modn_newrdn : string;
modn_deleteoldrdn : bool;
modn_newSuperior : string option;
}
type compare_request = {
cmp_dn : string;
cmp_ava : Ldap_types.attribute_value_assertion;
}
type extended_request = {
ext_requestName : string;
ext_requestValue : string option;
}
type extended_response = {
ext_result : Ldap_types.ldap_result;
ext_responseName : string option;
ext_response : string option;
}
type protocol_op =
Bind_request of Ldap_types.bind_request
| Bind_response of Ldap_types.bind_response
| Unbind_request
| Search_request of Ldap_types.search_request
| Search_result_entry of Ldap_types.search_result_entry
| Search_result_reference of string list
| Search_result_done of Ldap_types.ldap_result
| Modify_request of Ldap_types.modify_request
| Modify_response of Ldap_types.ldap_result
| Add_request of Ldap_types.search_result_entry
| Add_response of Ldap_types.ldap_result
| Delete_request of string
| Delete_response of Ldap_types.ldap_result
| Modify_dn_request of Ldap_types.modify_dn_request
| Modify_dn_response of Ldap_types.ldap_result
| Compare_request of Ldap_types.compare_request
| Compare_response of Ldap_types.ldap_result
| Abandon_request of Stdlib.Int32.t
| Extended_request of Ldap_types.extended_request
| Extended_response of Ldap_types.extended_response
type paged_results_control_value = { size : int; cookie : string; }
type control_details =
[ `Paged_results_control of Ldap_types.paged_results_control_value
| `Unknown_value of string ]
type ldap_control = {
criticality : bool;
control_details : Ldap_types.control_details;
}
type ldap_controls = Ldap_types.ldap_control list
type ldap_message = {
messageID : Stdlib.Int32.t;
protocolOp : Ldap_types.protocol_op;
controls : Ldap_types.ldap_controls option;
}
type con_mech = [ `PLAIN | `SSL ]
type ldap_url = {
url_mech : Ldap_types.con_mech;
url_host : string option;
url_port : string option;
url_dn : string option;
url_attributes : string list option;
url_scope : Ldap_types.search_scope option;
url_filter : Ldap_types.filter option;
url_ext : (bool * string * string) list option;
}
type ldap_grouping_type = [ `LDAP_GROUP_TXN ]
type ldap_grouping_cookie
end`