mirror of
https://github.com/arampoire/onetun.git
synced 2025-12-01 01:00:24 -05:00
Graceful shutdown. Docs.
This commit is contained in:
parent
8243945970
commit
006a1b0b4e
4 changed files with 40 additions and 2 deletions
|
|
@ -3,9 +3,13 @@ use smoltcp::phy::{Device, DeviceCapabilities, Medium};
|
|||
use smoltcp::time::Instant;
|
||||
use std::sync::Arc;
|
||||
|
||||
/// A virtual device that processes IP packets. IP packets received from the WireGuard endpoint
|
||||
/// are made available to this device using a broadcast channel receiver. IP packets sent from this device
|
||||
/// are asynchronously sent out to the WireGuard tunnel.
|
||||
pub struct VirtualIpDevice {
|
||||
/// Tunnel to send IP packets to.
|
||||
wg: Arc<WireGuardTunnel>,
|
||||
/// Broadcast channel receiver for received IP packets.
|
||||
ip_broadcast_rx: tokio::sync::broadcast::Receiver<Vec<u8>>,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue