/// Compute the reachability state of an interface.
///
/// The interface may have been recently-discovered, or the properties of a known interface may
/// have changed.
Compute the reachability state of an interface.
The interface may have been recently-discovered, or the properties of a known interface may
have changed.
Compute the reachability state of an interface . The interface may have been recently - discovered or the properties of a known interface may have changed .
pub async fn compute_state(&mut self, properties: &fnet_interfaces_ext::Properties) {
        let routes = self.stack.get_forwarding_table().await.unwrap_or_else(|e| {
            log::error!("failed to get route table: {}", e);
            Vec::new()
        });
        if let Some(info) = compute_state(properties, &routes, &ping::Pinger).await {
            let id = Id::from(properties.id);
            let () = self.update_state(id, &properties.name, info);
        }
    }
pub async fn compute_state ( & mut self , properties : & fnet_interfaces_ext :: Properties ) { let routes = self . stack . get_forwarding_table ( ) . await . unwrap_or_else ( | e | { log :: error ! ( " " e ) ; Vec :: new ( ) } ) ; if let Some ( info ) = compute_state ( properties , & routes , & ping :: Pinger ) . await { let id = Id :: from ( properties . id ) ; let ( ) = self . update_state ( id , & properties . name , info ) ; } }
Compute the reachability state of an interface.
Compute the reachability state of an interface .
&mut self
properties
&fnet_interfaces_ext::Properties