pub enum OvpnMessage {
Success(String),
Error(String),
MultiLine(Vec<String>),
Pkcs11IdEntry {
index: String,
id: String,
blob: String,
},
Notification(Notification),
Info(String),
PasswordPrompt,
Unrecognized {
line: String,
kind: UnrecognizedKind,
},
}Expand description
A fully decoded message from the OpenVPN management interface.
Variants§
Success(String)
A success response: SUCCESS: [text].
Error(String)
An error response: ERROR: [text].
MultiLine(Vec<String>)
A multi-line response block (from status, version, help, etc.).
The terminating END line is consumed but not included.
Pkcs11IdEntry
Parsed response from >PKCS11ID-ENTRY: notification (sent by
pkcs11-id-get). Wire: >PKCS11ID-ENTRY:'index', ID:'id', BLOB:'blob'
Fields
Notification(Notification)
A real-time notification, either single-line or accumulated multi-line.
Info(String)
The >INFO: banner sent when the management socket first connects.
Technically a notification, but surfaced separately since it’s always
the first thing you see and is useful for version detection.
PasswordPrompt
Management interface password prompt. Sent when --management is
configured with a password file. The client must respond with the
password (via crate::OvpnCommand::ManagementPassword) before any
commands are accepted.
Unrecognized
A line that could not be classified into any known message type. Contains the raw line and a description of what went wrong.
Fields
kind: UnrecognizedKindWhy the line was not recognized.
Trait Implementations§
Source§impl Clone for OvpnMessage
impl Clone for OvpnMessage
Source§fn clone(&self) -> OvpnMessage
fn clone(&self) -> OvpnMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more