Skip to main content

classify_interface

Function classify_interface 

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

Klassifiziert eine IP-Adresse in die NetInterface-Taxonomie.

Reihenfolge:

  1. Loopback (127/8, ::1).
  2. Named-Matches aus config.named (erstes Match gewinnt).
  3. Local-Subnet-Matches aus config.local_subnets.
  4. Fallback Wan.