Skip to main content

expected_by_interface

Function expected_by_interface 

Source
pub fn expected_by_interface(
    local: impl IntoIterator<Item = (String, IpAddr)>,
) -> Vec<BTreeSet<Ipv4Addr>>
Expand description

The IPv4 addresses a LAN peer could reach us on, grouped by interface: not loopback, unspecified, link-local (169.254/16), multicast or broadcast.

Grouped because mdns-sd announces on ONE address per interface and IP version (send_unsolicited_response), so an interface with two IPv4 addresses never announces its second. Counting each address would leave such a host Degraded for good. An interface is covered when any one of its addresses was announced.