I'm trying to write a sub to print out all the IP information for a host computer.
Here's what I have to print the Ip addresses to all the Ethernet Adapters:
The other piece of information the Ethernet Adapter to which the IP address is tied to (output similar to ipconfig.exe where it prints out "Ethernet adapter Local Area Connection 2:" etc.).
Any help is greatly appreciated.
MB
Here's what I have to print the Ip addresses to all the Ethernet Adapters:
VB.NET:
Dim LocalHostName = Dns.GetHostName()
Dim IpCollection As New Collection
Dim i As Integer
Dim h As System.Net.IPHostEntry = System.Net.Dns.GetHostEntry(LocalHostName)
Dim IpA() As Net.IPAddress = h.AddressList
For i = 0 To IpA.GetUpperBound(0)
IpCollection.Add(IpA(i).ToString)
MsgBox(IpA(i).ToString)
Next
The other piece of information the Ethernet Adapter to which the IP address is tied to (output similar to ipconfig.exe where it prints out "Ethernet adapter Local Area Connection 2:" etc.).
Any help is greatly appreciated.
MB