pub struct CWNetwork { /* private fields */ }Expand description
“Encapsulates an IEEE 802.11 network, providing read-only accessors to various properties of the network.”
Implementations§
Source§impl CWNetwork
impl CWNetwork
Sourcepub fn supportsSecurity(&self, security: CWSecurity) -> bool
pub fn supportsSecurity(&self, security: CWSecurity) -> bool
“Method for determining which security types a network supports.”
Sourcepub fn supportsPHYMode(&self, mode: CWPHYMode) -> bool
pub fn supportsPHYMode(&self, mode: CWPHYMode) -> bool
“Method for determining which PHY modes a network supports.”
Sourcepub fn beaconInterval(&self) -> i64
pub fn beaconInterval(&self) -> i64
“The beacon interval (ms) for the network.”
Sourcepub fn bssid(&self) -> Option<String>
pub fn bssid(&self) -> Option<String>
“The basic service set identifier (BSSID) for the network.”
This value is not typically returned. Getting it to work is finicky. Try googling ‘bssid CoreWLAN macOS’ and pray.
Further notes:
Afaik if the following are true this should return a valid value:
- CoreLocation::CLLocationManager::requestAlwaysAuthorization()
- Executable is signed
I’ve been unable to test/reproduce this.
Sourcepub fn countryCode(&self) -> Option<String>
pub fn countryCode(&self) -> Option<String>
“The country code (ISO/IEC 3166-1:1997) for the network.”
Requesting this information also requires location services permissions. See CWNetwork::bssid for how you might get this information.
Sourcepub fn ibss(&self) -> bool
pub fn ibss(&self) -> bool
“The network is an IBSS network.”
IBSS networks are essentially peer-to-peer networks.
Sourcepub fn noiseMeasurement(&self) -> i64
pub fn noiseMeasurement(&self) -> i64
“The aggregate noise measurement (dBm) for the network.”
Sourcepub fn rssiValue(&self) -> i64
pub fn rssiValue(&self) -> i64
“The aggregate received signal strength indication (RSSI) measurement (dBm) for the network.”
Sourcepub fn wlanChannel(&self) -> CWChannel
pub fn wlanChannel(&self) -> CWChannel
“The channel for the network.”