Reputation: 101
Is there any command similar to this code to print out the MAC address or "hash code" of the IP stored in this variable? I have done some research and it looks like it can be a really complex to impossible task. But I think it is worth a shot to ask. (Edit: Any IP I search is an internal IP to my Network).
IPAddress addr = IPAddress.Parse(inputIP); //uses the input IP data into the addr variable to get host
IPHostEntry entry = Dns.GetHostEntry(addr); //Get hostname
Console.WriteLine("IP Address: " + addr);
Console.WriteLine("Host Name: " + entry.HostName); //output logic
Upvotes: 0
Views: 1146