public static List <Wifi> loadWifis()
        {
            WlanClient  client = new WlanClient();
            List <Wifi> wifis  = new List <Wifi>();

            foreach (WlanClient.WlanInterface wlanIface in client.Interfaces)
            {
                Wlan.WlanBssEntry[] bssEntries = wlanIface.GetNetworkBssList();
                foreach (Wlan.WlanBssEntry bssEntry in bssEntries)
                {
                    var mac    = GetBssIdString(bssEntry.dot11Bssid);
                    var ssid   = GetStringForSSID(bssEntry.dot11Ssid);
                    int powerc = (int)bssEntry.linkQuality;
                    wifis.Add(new Wifi()
                    {
                        SSID = ssid, PowerPerc = powerc, MAC = mac
                    });
                }
            }
            return(wifis);
        }
Beispiel #2
0
 internal WlanInterface(WlanClient client, Wlan.WlanInterfaceInfo info)
 {
     this.client = client;
     this.info   = info;
 }