pub enum OvpnMessage {
Success(String),
Error(String),
MultiLine(Vec<String>),
SingleValue(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.
SingleValue(String)
A single non-SUCCESS/ERROR value line (from bare hold, bare state,
etc.).
Pkcs11IdEntry
Parsed response from pkcs11-id-get. The wire format is:
PKCS11ID-ENTRY:'index', ID:'id', BLOB:'base64_cert'
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