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,
remote_port: String,
local_addr: String,
local_port: String,
local_ipv6: 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 {
index: u32,
proxy_type: String,
host: String,
},
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,desc,local_ip,remote_ip,remote_port,local_addr,local_port,local_ipv6
Field order per management-notes.txt: (a) timestamp, (b) state name, (c) description, (d) TUN/TAP local IPv4, (e) remote server address, (f) remote server port, (g) local address, (h) local port, (i) TUN/TAP local IPv6.
Fields
name: OpenVpnState(b) State 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:index,proxy_type,host
Sent when OpenVPN needs proxy information (requires
--management-query-proxy). The management client responds
with a proxy command.
Fields
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