示例#1
0
 public static TapDevice GetTapDevice(string device_name)
 {
   TapDevice tap = null;
   if(OSDependent.OSVersion == OSDependent.OS.Linux) {
     tap = new LinuxTap(device_name);
   } else if(OSDependent.OSVersion == OSDependent.OS.Windows) {
     tap = new WindowsTap(device_name);
   } else {
     tap = new cTap(device_name);
   }
   return tap;
 }
示例#2
0
        public static TapDevice GetTapDevice(string device_name)
        {
            TapDevice tap = null;

            if (OSDependent.OSVersion == OSDependent.OS.Linux)
            {
                tap = new LinuxTap(device_name);
            }
            else if (OSDependent.OSVersion == OSDependent.OS.Windows)
            {
                tap = new WindowsTap(device_name);
            }
            else
            {
                tap = new cTap(device_name);
            }
            return(tap);
        }