mirror of
https://github.com/lldap/lldap.git
synced 2024-11-25 00:50:55 +00:00
Add basic LDAP structs
This commit is contained in:
parent
bbecb47c59
commit
4cefa1ecc4
2 changed files with 29 additions and 0 deletions
28
src/domain/messages.rs
Normal file
28
src/domain/messages.rs
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
struct LdapMessage {
|
||||
message_id: u32,
|
||||
operation: LdapOperation,
|
||||
}
|
||||
|
||||
enum LdapOperation {
|
||||
BindRequest(BindRequest),
|
||||
BindResponse(BindResponse),
|
||||
//UnbindRequest(UnbindRequest),
|
||||
}
|
||||
|
||||
struct BindRequest {
|
||||
version: u8,
|
||||
name: String,
|
||||
authentication: AuthenticationChoice,
|
||||
}
|
||||
|
||||
enum AuthenticationChoice {
|
||||
Simple(String),
|
||||
// Sasl
|
||||
}
|
||||
|
||||
struct BindResponse {
|
||||
result_code: u8,
|
||||
matched_dn: String,
|
||||
diagnostic_message: String,
|
||||
}
|
1
src/domain/mod.rs
Normal file
1
src/domain/mod.rs
Normal file
|
@ -0,0 +1 @@
|
|||
mod messages;
|
Loading…
Reference in a new issue