Question

How I can get network parameters (ip4, ip6, mask, gateway) for all available interfaces in WindowsPhone 8? As like ipconfig. I found how I can do it with Iphlpapi, but I can not find it in WP8

Was it helpful?

Solution

You can find whether a network is using IPv4 or v6 on WP8 using properties of HostName (MSDN reference here). The IPInformation property of HostName should contain what you are looking for. However it won't tell you the network gateway that I can see.

You can get a list of the current networks which are active from Windows.Networking.Connectivity.NetworkInformation.GetHostNames() (see here - it's a bit of a pain to navigate between both references).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top