Skip to main content

classify_interface

Function classify_interface 

Source
pub fn classify_interface(
    addr: &IpAddr,
    config: &InterfaceConfig,
) -> NetInterface
Expand description

Classifies an IP address into the NetInterface taxonomy.

Order:

  1. Loopback (127/8, ::1).
  2. Named matches from config.named (first match wins).
  3. Local-subnet matches from config.local_subnets.
  4. Fallback Wan.