Function

NM-1.0NMutils_security_valid

  • Given a set of device capabilities, and a desired security type to check against, determines whether the combination of device, desired security type, and AP capabilities intersect.

    NOTE: this function cannot handle checking security for AP/Hotspot mode; use nm_utils_ap_mode_security_valid() instead.

    Parameters

    • type: NM.UtilsSecurityType

      the security type to check AP flags and device capabilities against, e.g. #NMU_SEC_STATIC_WEP

    • wifi_caps: NM.DeviceWifiCapabilities

      bitfield of the capabilities of the specific Wi-Fi device, e.g. #NM_WIFI_DEVICE_CAP_CIPHER_WEP40

    • have_ap: boolean

      whether the ap_flags, ap_wpa, and ap_rsn arguments are valid

    • adhoc: boolean

      whether the capabilities being tested are from an Ad-Hoc AP (IBSS)

    • ap_flags: NM.__80211ApFlags

      bitfield of AP capabilities, e.g. #NM_802_11_AP_FLAGS_PRIVACY

    • ap_wpa: NM.__80211ApSecurityFlags

      bitfield of AP capabilities derived from the AP's WPA beacon, e.g. (#NM_802_11_AP_SEC_PAIR_TKIP | #NM_802_11_AP_SEC_KEY_MGMT_PSK)

    • ap_rsn: NM.__80211ApSecurityFlags

      bitfield of AP capabilities derived from the AP's RSN/WPA2 beacon, e.g. (#NM_802_11_AP_SEC_PAIR_CCMP | #NM_802_11_AP_SEC_PAIR_TKIP)

    Returns boolean

    true if the device capabilities and AP capabilities intersect and are compatible with the desired type, false if they are not