Windows specific implementations of IPAddresses.
Inheritance: IPAddresses
Esempio n. 1
0
 /**
 <summary>Automatically chooses which version of IPAddresses to instantiate.
 This version of the constructor allows you to choose which interfaces to
 look up</summary>
 <param name="interfaces">An array of interfaces to look up,</param>
 <returns>An IPAddresses for the host.</returns>
 */
 public static IPAddresses GetIPAddresses(string[] interfaces) {
   IPAddresses ipaddrs = null;
   if(OSDependent.OSVersion == OSDependent.OS.Linux) {
     ipaddrs = new IPAddressesLinux(interfaces);
   }
   else if(OSDependent.OSVersion == OSDependent.OS.Windows) {
     ipaddrs = new IPAddressesWindows(interfaces);
   }
   else {
     throw new Exception("Unknown OS!");
   }
   return ipaddrs;
 }
Esempio n. 2
0
        /**
         * <summary>Automatically chooses which version of IPAddresses to instantiate.
         * This version of the constructor allows you to choose which interfaces to
         * look up</summary>
         * <param name="interfaces">An array of interfaces to look up,</param>
         * <returns>An IPAddresses for the host.</returns>
         */
        public static IPAddresses GetIPAddresses(string[] interfaces)
        {
            IPAddresses ipaddrs = null;

            if (OSDependent.OSVersion == OSDependent.OS.Linux)
            {
                ipaddrs = new IPAddressesLinux(interfaces);
            }
            else if (OSDependent.OSVersion == OSDependent.OS.Windows)
            {
                ipaddrs = new IPAddressesWindows(interfaces);
            }
            else
            {
                throw new Exception("Unknown OS!");
            }
            return(ipaddrs);
        }
Esempio n. 3
0
 public GuestConnectivityWindows()
 {
     _ipaddrs = new IPAddressesWindows();
 }