ts_transport_tun 0.3.3

tailscale tun transport
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use core::num::NonZeroU16;

/// Configuration for setting up a tun device.
#[derive(Clone, Debug)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
pub struct Config {
    /// The name of the network interface.
    pub name: String,

    /// The MTU (Maximum Transmission Unit) of the network interface. Must be between 1
    /// (inclusive) and 65535 (inclusive).
    pub mtu: NonZeroU16,

    /// The prefix for the interface, non-truncated (full address + subnet mask), e.g.
    /// `192.168.100.32/24`.
    pub prefix: ipnet::IpNet,
}