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