local ip addresses required in c#

local ip addresses required in c#

Post by UXVha2 » Sat, 18 Dec 2004 19:43:01


Hi all,

How can I get all the localhost addresses in c#? (ipv4 and ipv6)
The solution has to be dns independent! (w/o Dns.Resolve())
I could implement it in java (With the NetworkInterfaces+IPv?Address) easily.
But I didn't find any acceptable solution in C# (nor in unmanaged codes) :((
I've found an IPAddress.getLocalHostAddresses in framework 2.0, but it gave
me only ipv4 addresses. (But I have ipv6 installed, and the java code shows
my ipv6 addrs, all my machine.config has the setting ipv6enabled=true)
If anyone has an idea... please let me know.

Tams
 
 
 

local ip addresses required in c#

Post by Dino Chies » Wed, 22 Dec 2004 01:10:11

WMI.

There is a WMI group as well. microsoft.public.dotnet.framework.wmi

-Dino