Add basic LDAP structs

This commit is contained in:
Valentin Tolmer 2021-03-06 21:23:39 +01:00
parent bbecb47c59
commit 4cefa1ecc4
2 changed files with 29 additions and 0 deletions

28
src/domain/messages.rs Normal file
View 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
View File

@ -0,0 +1 @@
mod messages;