pub struct Netmap<const PEERS: usize = MAX_PEERS> {
pub peers: PeerTable<PEERS>,
pub peers_truncated: bool,
pub derp: DerpMap,
pub dns: DnsConfig,
pub node_key: Option<NodePublic>,
pub disco_key: Option<DiscoPublic>,
pub addresses: Vec<Cidr, { crate::netmap::MAX_ADDRESSES }>,
pub primary_routes: Vec<Cidr, { crate::netmap::MAX_PRIMARY_ROUTES }>,
pub home_derp: u16,
pub packet_filter: PacketPolicy,
pub responses: usize,
}Expand description
The state a netmap is accumulated into.
Fields§
§peers: PeerTable<PEERS>§peers_truncated: boolThe control map named more peers than this target retains, or named a peer whose addresses or allowed IPs exceed the per-peer bounds.
Selection is deterministic and independent of server order: a full
table keeps the highest-ranked non-self records (online first, then the
lowest node id), skipping oversized records. With the alloc feature
the table is full only at PEERS or when the allocator refuses to
grow it. This lets memory-constrained targets remain connected to
control instead of rejecting the entire map.
derp: DerpMap§dns: DnsConfigThe tailnet’s DNS configuration, minus the unbounded Routes map.
node_key: Option<NodePublic>This node’s own record, once the server has sent one.
disco_key: Option<DiscoPublic>§addresses: Vec<Cidr, { crate::netmap::MAX_ADDRESSES }>§primary_routes: Vec<Cidr, { crate::netmap::MAX_PRIMARY_ROUTES }>Routes this control plane has approved for this node.
home_derp: u16Preferred relay for this node.
packet_filter: PacketPolicyStaged packet-filter policy. No packet is forwarded until at least one syntactically valid policy update has been received.
responses: usizeHow many complete MapResponses have been applied.
Implementations§
Source§impl<const PEERS: usize> Netmap<PEERS>
impl<const PEERS: usize> Netmap<PEERS>
pub const fn new() -> Self
pub fn has_assigned_ipv4(&self) -> bool
Sourcepub fn ipv4_default_route_approved(&self) -> bool
pub fn ipv4_default_route_approved(&self) -> bool
Approval of 0.0.0.0/0 is independent of IPv6 uplink capability.
Sourcepub fn ipv6_default_route_approved(&self) -> bool
pub fn ipv6_default_route_approved(&self) -> bool
Only an explicitly approved ::/0 authorizes IPv6 exit forwarding.
Sourcepub fn default_routes_approved(&self) -> bool
pub fn default_routes_approved(&self) -> bool
Whether both exit-route families are approved. Family-specific packet paths must use the corresponding approval query instead.