1 Reply Latest reply on Jan 16, 2013 11:45 AM by roymeo_

    NetworkInfo.networkInfo.findInterfaces() problem

    flexchief

      I have a small code example of how i can find network interfaces on my pc which works ok but i can only see the interfaces that are connected to the interent and not those that are disconnected? Can anyone please tell me how I can get all interfaces even those that are disconnected like when you type ipconfig /a in command prompt?

       

      Here is some of my code:

       

      public function findInterface():void

      {

                  var results:Vector.<NetworkInterface> = NetworkInfo.networkInfo.findInterfaces();

             

                  for(var i:int=0; i<results.length; i++)

                  {

                      var output:String = output + "Name: " + results[i].name + "\n"

                                  + "DisplayName: " + results[i].displayName + "\n"

                                  + "MTU: " + results[i].mtu + "\n"

                                  + "HardwareAddress: " + results[i].hardwareAddress + "\n"

                                  + "Active: " + results[i].active + "\n";

                                 

                                  if(results[i].displayName == "Local Area Connection")

                                  {

                                      currentUDID = results[i].hardwareAddress;

                                  }

                                 

                      for(var j:int=0; j<results[i].addresses.length; j++)

                      {

                          output = output + "Address: " + results[i].addresses[j].address + "\n"

                              + "Broadcast: " + results[i].addresses[j].broadcast + "\n"

                              + "PrefixLength: " + results[i].addresses[j].prefixLength + "\n"

                              + "IPVersion: " + results[i].addresses[j].ipVersion + "\n";

                      }

                     

                      output = output + "\n";

                  }

                 

                  Alert.show(output);

      }