Is there any code or method to get the IP addresses of the local system?
If you are in C#, you could use .NET:
using System;
using System.Net;
public static string GetLocalIP() {
var hosts = Dns.GetHostEntry(Dns.GetHostName());
foreach (var ipEntry in host.AddressList)
{
if (ipEntry.AddressFamily == AddressFamily.InterNetwork)
{
return ip.ToString();
}
}
}
You can later add a throw new Exception at the end, it will show up if you have no IPv4 adapters installed.