pub struct InterfaceConfig {
pub name: String,
pub mtu: u32,
pub mesh_ipv4_prefix: Option<String>,
pub mesh_ipv6_prefix: Option<String>,
}Expand description
Settings for the Linux TUN interface that carries mesh IP traffic.
Mesh addresses are derived deterministically from each node’s
NodeId via [pim_core::derive_mesh_ipv4] / [derive_mesh_ipv6].
Configure only the mesh prefix; the per-node host bits come from
the derivation. Two daemons sharing a prefix will never collide on
IPv6 (/64 is collision-free at PIM scale) and only rarely on IPv4
in small prefixes; collisions degrade gracefully — see the routing
docs.
Fields§
§name: StringRequested interface name, for example pim0.
mtu: u32Interface MTU in bytes.
mesh_ipv4_prefix: Option<String>Mesh IPv4 prefix (e.g. "10.77.0.0/16"). Defaults to
[pim_core::DEFAULT_MESH_IPV4_PREFIX]. Each node’s host bits
inside this prefix are derived from its NodeId.
mesh_ipv6_prefix: Option<String>Mesh IPv6 prefix (e.g. "fd77::/64"). Defaults to
[pim_core::DEFAULT_MESH_IPV6_PREFIX]. /64 recommended.
Trait Implementations§
Source§impl Clone for InterfaceConfig
impl Clone for InterfaceConfig
Source§fn clone(&self) -> InterfaceConfig
fn clone(&self) -> InterfaceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InterfaceConfig
impl Debug for InterfaceConfig
Source§impl Default for InterfaceConfig
impl Default for InterfaceConfig
Source§impl<'de> Deserialize<'de> for InterfaceConfig
impl<'de> Deserialize<'de> for InterfaceConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for InterfaceConfig
impl PartialEq for InterfaceConfig
Source§fn eq(&self, other: &InterfaceConfig) -> bool
fn eq(&self, other: &InterfaceConfig) -> bool
self and other values to be equal, and is used by ==.