public void GaewaysSearchTest() { List <IPAddress> Gateways = NetworkTools.GetNetworkInterfacesGateways(OperationalStatus.Up); foreach (IPAddress ip in Gateways) { if (ip.AddressFamily != AddressFamily.InterNetwork) { throw new Exception("Ip address in gataways-list is not IPv4!"); } } }
private void UpdateActiveGatawaysInfo() { ActiveGateways = NetworkTools.GetNetworkInterfacesGateways(OperationalStatus.Up, CurrentInterfaceTypes.ToArray()); OnActiveGatawaysInfoUpdated(); }