/// Determines whether a given BSS is compatible with this client SME configuration.
Determines whether a given BSS is compatible with this client SME configuration.
Determines whether a given BSS is compatible with this client SME configuration .
pub fn is_bss_compatible(&self, bss: &BssDescription) -> bool {
        let privacy = wlan_common::mac::CapabilityInfo(bss.cap).privacy();
        let protection = bss.protection();
        match &protection {
            Protection::Open => true,
            Protection::Wep => self.cfg.wep_supported,
            Protection::Wpa1 => self.cfg.wpa1_supported,
            Protection::Wpa2Wpa3Personal | Protection::Wpa3Personal if self.wpa3_supported => {
                match bss.rsne() {
                    Some(rsne) if privacy => match rsne::from_bytes(rsne) {
                        Ok((_, a_rsne)) => a_rsne.is_wpa3_rsn_compatible(),
                        _ => false,
                    },
                    _ => false,
                }
            }
            Protection::Wpa1Wpa2PersonalTkipOnly
            | Protection::Wpa2PersonalTkipOnly
            | Protection::Wpa1Wpa2Personal
            | Protection::Wpa2Personal
            | Protection::Wpa2Wpa3Personal => match bss.rsne() {
                Some(rsne) if privacy => match rsne::from_bytes(rsne) {
                    Ok((_, a_rsne)) => a_rsne.is_wpa2_rsn_compatible(),
                    _ => false,
                },
                _ => false,
            },
            _ => false,
        }
    }
pub fn is_bss_compatible ( & self , bss : & BssDescription ) -> bool { let privacy = wlan_common :: mac :: CapabilityInfo ( bss . cap ) . privacy ( ) ; let protection = bss . protection ( ) ; match & protection { Protection :: Open => true , Protection :: Wep => self . cfg . wep_supported , Protection :: Wpa1 => self . cfg . wpa1_supported , Protection :: Wpa2Wpa3Personal | Protection :: Wpa3Personal if self . wpa3_supported => { match bss . rsne ( ) { Some ( rsne ) if privacy => match rsne :: from_bytes ( rsne ) { Ok ( ( _ , a_rsne ) ) => a_rsne . is_wpa3_rsn_compatible ( ) , _ => false , } , _ => false , } } Protection :: Wpa1Wpa2PersonalTkipOnly | Protection :: Wpa2PersonalTkipOnly | Protection :: Wpa1Wpa2Personal | Protection :: Wpa2Personal | Protection :: Wpa2Wpa3Personal => match bss . rsne ( ) { Some ( rsne ) if privacy => match rsne :: from_bytes ( rsne ) { Ok ( ( _ , a_rsne ) ) => a_rsne . is_wpa2_rsn_compatible ( ) , _ => false , } , _ => false , } , _ => false , } }
Determines whether a given BSS is compatible with this client SME configuration.
Determines whether a given BSS is compatible with this client SME configuration .
&self
bss
&BssDescription