Exemplo n.º 1
0
        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!");
                }
            }
        }
Exemplo n.º 2
0
 private void UpdateActiveGatawaysInfo()
 {
     ActiveGateways = NetworkTools.GetNetworkInterfacesGateways(OperationalStatus.Up, CurrentInterfaceTypes.ToArray());
     OnActiveGatawaysInfoUpdated();
 }