diff options
-rwxr-xr-x | .gitignore | 2 | ||||
-rw-r--r-- | ZeroTierOne.sln | 4 | ||||
-rw-r--r-- | node/Constants.hpp | 1 | ||||
-rw-r--r-- | node/EthernetTap.cpp | 60 | ||||
-rw-r--r-- | vsprojects/SelfTest/SelfTest.vcxproj | 6 |
5 files changed, 68 insertions, 5 deletions
@@ -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 0264ccd1..ec7b195a 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 f92540d6..adff34ae 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 38d37bd1..89265188 100644 --- a/node/EthernetTap.cpp +++ b/node/EthernetTap.cpp @@ -675,6 +675,64 @@ void EthernetTap::threadMain() #ifdef __WINDOWS__ -// TODO +#include <WinSock2.h> +#include <Windows.h> +#include <ws2ipdef.h> + +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<MulticastGroup> &groups) +{ + return false; +} + +void EthernetTap::threadMain() + throw() +{ +} + +} // namespace ZeroTier #endif // __WINDOWS__ diff --git a/vsprojects/SelfTest/SelfTest.vcxproj b/vsprojects/SelfTest/SelfTest.vcxproj index 0be2d739..66b0724d 100644 --- a/vsprojects/SelfTest/SelfTest.vcxproj +++ b/vsprojects/SelfTest/SelfTest.vcxproj @@ -57,24 +57,26 @@ <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> - <AdditionalDependencies>$(SolutionDir)\ext\bin\libcrypto\win32-vs2012\libeay32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>$(SolutionDir)\ext\bin\libcrypto\win32-vs2012\libeay32.lib;wsock32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader>Use</PrecompiledHeader> + <PrecompiledHeader>NotUsing</PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <SDLCheck>true</SDLCheck> + <AdditionalIncludeDirectories>$(SolutionDir)\ext\bin\libcrypto\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ClCompile> <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> + <AdditionalDependencies>wsock32.lib;ws2_32.lib;$(SolutionDir)\ext\bin\libcrypto\win32-vs2012\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemGroup> |