From 08fe84d707c81b2581c2b528b5b2cfcc9994674a Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 14 Aug 2013 13:23:25 -0400 Subject: [PATCH] Windows builds, self test runs in Debug mode! --- .gitignore | 2 + ZeroTierOne.sln | 4 +- node/Constants.hpp | 1 + node/EthernetTap.cpp | 60 +++++++++++++++++++++++++++- vsprojects/SelfTest/SelfTest.vcxproj | 6 ++- 5 files changed, 68 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 78bab478e..9d6f45ca8 100755 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ mac-tap/tuntap/tap.kext /vsprojects/SelfTest/Debug /vsprojects/SelfTest/SelfTest.vcxproj.user /Debug +/Release +/vsprojects/SelfTest/Release diff --git a/ZeroTierOne.sln b/ZeroTierOne.sln index 0264ccd10..ec7b195a5 100644 --- a/ZeroTierOne.sln +++ b/ZeroTierOne.sln @@ -9,8 +9,8 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Debug|Win32.ActiveCfg = Debug|Win32 - {DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Debug|Win32.Build.0 = Debug|Win32 + {DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Debug|Win32.ActiveCfg = Release|Win32 + {DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Debug|Win32.Build.0 = Release|Win32 {DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Release|Win32.ActiveCfg = Release|Win32 {DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection diff --git a/node/Constants.hpp b/node/Constants.hpp index f92540d67..adff34ae4 100644 --- a/node/Constants.hpp +++ b/node/Constants.hpp @@ -71,6 +71,7 @@ #define NOMINMAX #pragma warning(disable : 4290) #pragma warning(disable : 4996) +#pragma warning(disable : 4101) #undef __UNIX_LIKE__ #define ZT_PATH_SEPARATOR '\\' #define ZT_PATH_SEPARATOR_S "\\" diff --git a/node/EthernetTap.cpp b/node/EthernetTap.cpp index 38d37bd1b..89265188f 100644 --- a/node/EthernetTap.cpp +++ b/node/EthernetTap.cpp @@ -675,6 +675,64 @@ void EthernetTap::threadMain() #ifdef __WINDOWS__ -// TODO +#include +#include +#include + +namespace ZeroTier { + +EthernetTap::EthernetTap( + const RuntimeEnvironment *renv, + const MAC &mac, + unsigned int mtu, + void (*handler)(void *,const MAC &,const MAC &,unsigned int,const Buffer<4096> &), + void *arg) + throw(std::runtime_error) : + _mac(mac), + _mtu(mtu), + _r(renv), + _handler(handler), + _arg(arg) +{ +} + +EthernetTap::~EthernetTap() +{ +} + +void EthernetTap::whack() +{ +} + +bool EthernetTap::addIP(const InetAddress &ip) +{ + return false; +} + +bool EthernetTap::removeIP(const InetAddress &ip) +{ + return false; +} + +void EthernetTap::put(const MAC &from,const MAC &to,unsigned int etherType,const void *data,unsigned int len) +{ +} + +std::string EthernetTap::deviceName() const +{ + return std::string(); +} + +bool EthernetTap::updateMulticastGroups(std::set &groups) +{ + return false; +} + +void EthernetTap::threadMain() + throw() +{ +} + +} // namespace ZeroTier #endif // __WINDOWS__ diff --git a/vsprojects/SelfTest/SelfTest.vcxproj b/vsprojects/SelfTest/SelfTest.vcxproj index 0be2d7397..66b0724db 100644 --- a/vsprojects/SelfTest/SelfTest.vcxproj +++ b/vsprojects/SelfTest/SelfTest.vcxproj @@ -57,24 +57,26 @@ Console true - $(SolutionDir)\ext\bin\libcrypto\win32-vs2012\libeay32.lib;wsock32.lib;%(AdditionalDependencies) + $(SolutionDir)\ext\bin\libcrypto\win32-vs2012\libeay32.lib;wsock32.lib;ws2_32.lib;%(AdditionalDependencies) Level3 - Use + NotUsing MaxSpeed true true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true + $(SolutionDir)\ext\bin\libcrypto\include;%(AdditionalIncludeDirectories) Console true true true + wsock32.lib;ws2_32.lib;$(SolutionDir)\ext\bin\libcrypto\win32-vs2012\libeay32.lib;%(AdditionalDependencies)