pub async fn netstack_event(&mut self, event: netstack::NetstackEvent) -> error::Result<()> {
        self.stats.events += 1;
        match event {
            netstack::NetstackEvent::OnInterfacesChanged { interfaces } => {
                // This type of event is useful to know that there has been some change related
                // to the network state, but doesn't give an indication about what that event
                // was. We need to check all interfaces to find out if there has been a state
                // change.
                for i in interfaces {
                    if let Some(current_info) = self.hal.get_interface(u64::from(i.id)).await {
                        self.update_state(&current_info).await;
                    }
                }
            }
        }
        self.dump_state();
        Ok(())
    }
/// Processes an event coming from fuchsia.netstack containing updates to
/// properties associated with an interface.
Processes an event coming from fuchsia.netstack containing updates to
properties associated with an interface.
Processes an event coming from fuchsia . netstack containing updates to properties associated with an interface .
pub async fn netstack_event(&mut self, event: netstack::NetstackEvent) -> error::Result<()> {
        self.stats.events += 1;
        match event {
            netstack::NetstackEvent::OnInterfacesChanged { interfaces } => {
                // This type of event is useful to know that there has been some change related
                // to the network state, but doesn't give an indication about what that event
                // was. We need to check all interfaces to find out if there has been a state
                // change.
                for i in interfaces {
                    if let Some(current_info) = self.hal.get_interface(u64::from(i.id)).await {
                        self.update_state(&current_info).await;
                    }
                }
            }
        }
        self.dump_state();
        Ok(())
    }
pub async fn netstack_event ( & mut self , event : netstack :: NetstackEvent ) -> error :: Result < ( ) > { self . stats . events += 1 ; match event { netstack :: NetstackEvent :: OnInterfacesChanged { interfaces } => { // This type of event is useful to know that there has been some change related // to the network state, but doesn't give an indication about what that event // was. We need to check all interfaces to find out if there has been a state // change. for i in interfaces { if let Some ( current_info ) = self . hal . get_interface ( u64 :: from ( i . id ) ) . await { self . update_state ( & current_info ) . await ; } } } } self . dump_state ( ) ; Ok ( ( ) ) }
Processes an event coming from fuchsia.netstack containing updates to
properties associated with an interface.
Processes an event coming from fuchsia . netstack containing updates to properties associated with an interface .
&mut self
event
netstack::NetstackEvent