Quantcast
Channel: Adobe Community : Popular Discussions - Archived Discussions
Viewing all articles
Browse latest Browse all 21156

NetworkInfo.networkInfo.findInterfaces() problem

$
0
0

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);

}


Viewing all articles
Browse latest Browse all 21156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>