/// Handles the interface being discovered.
Handles the interface being discovered.
Handles the interface being discovered .
async fn on_discovery(
        &mut self,
        properties: &fnet_interfaces_ext::Properties,
        dhcpv6_client_provider: Option<&fnet_dhcpv6::ClientProviderProxy>,
        watchers: &mut DnsServerWatchers<'_>,
    ) -> Result<(), errors::Error> {
        let fnet_interfaces_ext::Properties { online, .. } = properties;
        match self {
            InterfaceState::Host(HostInterfaceState { dhcpv6_client_addr }) => {
                if !online {
                    return Ok(());
                }
                let dhcpv6_client_provider = match dhcpv6_client_provider {
                    Some(p) => p,
                    None => return Ok(()),
                };
                *dhcpv6_client_addr =
                    start_dhcpv6_client(properties, dhcpv6_client_provider, watchers)?;
            }
            InterfaceState::WlanAp(WlanApInterfaceState {}) => {}
        }
        Ok(())
    }
async fn on_discovery ( & mut self , properties : & fnet_interfaces_ext :: Properties , dhcpv6_client_provider : Option < & fnet_dhcpv6 :: ClientProviderProxy > , watchers : & mut DnsServerWatchers < ' _ > , ) -> Result < ( ) , errors :: Error > { let fnet_interfaces_ext :: Properties { online , .. } = properties ; match self { InterfaceState :: Host ( HostInterfaceState { dhcpv6_client_addr } ) => { if ! online { return Ok ( ( ) ) ; } let dhcpv6_client_provider = match dhcpv6_client_provider { Some ( p ) => p , None => return Ok ( ( ) ) , } ; * dhcpv6_client_addr = start_dhcpv6_client ( properties , dhcpv6_client_provider , watchers ) ? ; } InterfaceState :: WlanAp ( WlanApInterfaceState { } ) => { } } Ok ( ( ) ) }
Handles the interface being discovered.
Handles the interface being discovered .
&mut self
properties
&fnet_interfaces_ext::Properties
dhcpv6_client_provider
Option<&fnet_dhcpv6::ClientProviderProxy>
watchers
&mut DnsServerWatchers<'_>