/// <summary> /// Collects all local IPs of every NIC that is currently in operational status <c>Up</c> (active). /// Note: Only NICs of type <c>Wireless80211</c> and <c>Ethernet</c> are considered. /// </summary> /// <returns>An array of local IPs for every active NIC</returns> private static IPAddress[] GetLocalIPs() { var a = new NetworkInterfaceAccumulator(); a.Accumulate(AddressFamily.InterNetwork); return(a.IPs.ToArray()); }
/// <summary> /// Collects all local IPs of every NIC that is currently in operational status <c>Up</c> (active). /// Note: Only NICs of type <c>Wireless80211</c> and <c>Ethernet</c> are considered. /// </summary> /// <returns>An array of local IPs for every active NIC</returns> private static IPAddress[] GetLocalIPs() { BeardedManStudios.Forge.Logging.BMSLog.Log("### BEGIN GetLocalIPs()"); var a = new NetworkInterfaceAccumulator(); a.Accumulate(AddressFamily.InterNetwork); BeardedManStudios.Forge.Logging.BMSLog.Log("### END GetLocalIPs(): " + a.IPs.ToArray()); return(a.IPs.ToArray()); }