pub struct WireguardPeer {
pub flags: c_int,
pub public_key: [u8; 32],
pub preshared_key: [u8; 32],
pub persistent_keepalive: u16,
pub endpoint: SocketAddr,
pub tx_bytes: u64,
pub rx_bytes: u64,
pub last_handshake: Option<SystemTime>,
pub allowed_ips: Vec<IpNet>,
}
Fields§
§flags: c_int
Bitwise combination of flags
public_key: [u8; 32]
Public key, the peer’s primary identifier
Preshared key for additional layer of post-quantum resistance
persistent_keepalive: u16
Seconds interval, or 0 to disable
endpoint: SocketAddr
Endpoint, with IP address and UDP port number
tx_bytes: u64
Number of bytes transmitted
rx_bytes: u64
Number of bytes received
last_handshake: Option<SystemTime>
Time of the last handshake, None
if no handshake has occurred
allowed_ips: Vec<IpNet>
Number of allowed IP structs following this struct
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WireguardPeer
impl RefUnwindSafe for WireguardPeer
impl Send for WireguardPeer
impl Sync for WireguardPeer
impl Unpin for WireguardPeer
impl UnwindSafe for WireguardPeer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more