Ejemplo n.º 1
0
 /// <summary>
 /// Issues a scan order on the interface and processes (and sends) the rest of the message when the scan is completed.
 /// </summary>
 /// <param name="laresp">The Link_Action_Response for this action.</param>
 /// <param name="iface">The interface to scan.</param>
 /// <param name="m">The message to be processed and sent when the scan is complete.</param>
 public static void Action_Scan(Link_Action_Response laresp, NativeWifi.WlanClient.WlanInterface iface, Message m)
 {
     if (iface != null)
     {
         if(!iface.ScanRequested)
             iface.Scan();
         iface.ScanRequested = true;
         Console.Write("Waiting for scan results...");
         Information.MiscData.PendingLinkActionResponses.Add(m, laresp); //Message sent at the WlanApi class, when a scan event occurs.
     }
     else
     {
         Console.WriteLine("Cannot scan a disabled interface.");
         laresp.Status = STATUS.REJECTED;
     }
 }