pub enum Notification {
Show 17 variants
Client {
event: ClientEvent,
cid: u64,
kid: Option<u64>,
env: Vec<(String, String)>,
},
ClientAddress {
cid: u64,
addr: String,
primary: bool,
},
State {
timestamp: u64,
name: OpenVpnState,
description: String,
local_ip: String,
remote_ip: String,
local_port: String,
remote_port: String,
},
ByteCount {
bytes_in: u64,
bytes_out: u64,
},
ByteCountCli {
cid: u64,
bytes_in: u64,
bytes_out: u64,
},
Log {
timestamp: u64,
level: LogLevel,
message: String,
},
Echo {
timestamp: u64,
param: String,
},
Hold {
text: String,
},
Fatal {
message: String,
},
Pkcs11IdCount {
count: u32,
},
NeedOk {
name: String,
message: String,
},
NeedStr {
name: String,
message: String,
},
RsaSign {
data: String,
},
Remote {
host: String,
port: u16,
protocol: TransportProtocol,
},
Proxy {
proto_num: u32,
proto_type: TransportProtocol,
host: String,
port: u16,
},
Password(PasswordNotification),
Simple {
kind: String,
payload: String,
},
}Expand description
A parsed real-time notification from OpenVPN.
Variants§
Client
A multi-line >CLIENT: notification (CONNECT, REAUTH, ESTABLISHED,
DISCONNECT). The header and all ENV key=value pairs are accumulated
into a single struct before this is emitted.
Fields
event: ClientEventThe client event sub-type.
ClientAddress
A single-line >CLIENT:ADDRESS notification.
Fields
State
>STATE:timestamp,name,description,local_ip,remote_ip[,local_port,remote_port]
Fields
name: OpenVpnStateState name (e.g. Connected, Reconnecting).
ByteCount
>BYTECOUNT:bytes_in,bytes_out (client mode)
ByteCountCli
>BYTECOUNT_CLI:cid,bytes_in,bytes_out (server mode, per-client)
Fields
Log
>LOG:timestamp,level,message
Fields
Echo
>ECHO:timestamp,param_string
Hold
>HOLD:Waiting for hold release[:N]
Fatal
>FATAL:message
Pkcs11IdCount
>PKCS11ID-COUNT:count
NeedOk
>NEED-OK:Need 'name' confirmation MSG:message
NeedStr
>NEED-STR:Need 'name' input MSG:message
RsaSign
>RSA_SIGN:base64_data
Remote
>REMOTE:host,port,protocol
Fields
protocol: TransportProtocolTransport protocol.
Proxy
>PROXY:proto_num,proto_type,host[,port]
Fields
proto_type: TransportProtocolTransport protocol type.
Password(PasswordNotification)
>PASSWORD:... — see PasswordNotification for the sub-types.
Simple
Fallback for any notification type not explicitly modeled above. Kept for forward compatibility with future OpenVPN versions.
Trait Implementations§
Source§impl Clone for Notification
impl Clone for Notification
Source§fn clone(&self) -> Notification
fn clone(&self) -> Notification
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more