diff options
author | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2014-10-19 12:56:39 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2014-10-19 12:56:39 -0700 |
commit | 74f36f5dc0a8e81a53cfeb86c64db4bb9c23fe30 (patch) | |
tree | 84bd7a508a5046eaa1e1cf37dfba6941908ff0b0 | |
parent | 2eeb3dee9e525ef5fd1f3ad2049e4b4cb9cdef0d (diff) | |
download | infinitytier-74f36f5dc0a8e81a53cfeb86c64db4bb9c23fe30.tar.gz infinitytier-74f36f5dc0a8e81a53cfeb86c64db4bb9c23fe30.zip |
Windows build fixes.
-rw-r--r-- | control/NodeControlClient.cpp | 8 | ||||
-rw-r--r-- | control/NodeControlService.cpp | 16 | ||||
-rw-r--r-- | include/ZeroTierOne.h | 74 | ||||
-rw-r--r-- | node/Multicaster.cpp | 4 | ||||
-rw-r--r-- | node/Node.cpp | 22 | ||||
-rw-r--r-- | node/Topology.hpp | 2 | ||||
-rw-r--r-- | windows/ZeroTierOne/ZeroTierOne.vcxproj | 41 | ||||
-rw-r--r-- | windows/ZeroTierOne/ZeroTierOne.vcxproj.filters | 75 | ||||
-rw-r--r-- | windows/ZeroTierOne/ZeroTierOneService.cpp | 4 |
9 files changed, 163 insertions, 83 deletions
diff --git a/control/NodeControlClient.cpp b/control/NodeControlClient.cpp index 7d0e04e8..6fd7b12e 100644 --- a/control/NodeControlClient.cpp +++ b/control/NodeControlClient.cpp @@ -33,6 +33,14 @@ #include "IpcListener.hpp" #include "NodeControlService.hpp" +#ifdef __WINDOWS__ +#include <WinSock2.h> +#include <Windows.h> +#include <tchar.h> +#include <wchar.h> +#include <ShlObj.h> +#endif // __WINDOWS__ + namespace ZeroTier { struct _NodeControlClientImpl diff --git a/control/NodeControlService.cpp b/control/NodeControlService.cpp index fc86c54c..96eabc50 100644 --- a/control/NodeControlService.cpp +++ b/control/NodeControlService.cpp @@ -154,16 +154,16 @@ void NodeControlService::_doCommand(IpcConnection *ipcc,const char *commandLine) default: ipcc->printf("unknown;"); break; - case ZT1_Node_PhysicalPath::ZT1_Node_PhysicalPath_TYPE_UDP: + case ZT1_Node_PhysicalPathType::ZT1_Node_PhysicalPath_TYPE_UDP: ipcc->printf("udp;"); break; - case ZT1_Node_PhysicalPath::ZT1_Node_PhysicalPath_TYPE_TCP_OUT: + case ZT1_Node_PhysicalPathType::ZT1_Node_PhysicalPath_TYPE_TCP_OUT: ipcc->printf("tcp_out;"); break; - case ZT1_Node_PhysicalPath::ZT1_Node_PhysicalPath_TYPE_TCP_IN: + case ZT1_Node_PhysicalPathType::ZT1_Node_PhysicalPath_TYPE_TCP_IN: ipcc->printf("tcp_in;"); break; - case ZT1_Node_PhysicalPath::ZT1_Node_PhysicalPath_TYPE_ETHERNET: + case ZT1_Node_PhysicalPathType::ZT1_Node_PhysicalPath_TYPE_ETHERNET: ipcc->printf("eth;"); break; } @@ -178,9 +178,9 @@ void NodeControlService::_doCommand(IpcConnection *ipcc,const char *commandLine) } const char *rolestr; switch(pl->peers[i].role) { - case ZT1_Node_Peer::ZT1_Node_Peer_SUPERNODE: rolestr = "SUPERNODE"; break; - case ZT1_Node_Peer::ZT1_Node_Peer_HUB: rolestr = "HUB"; break; - case ZT1_Node_Peer::ZT1_Node_Peer_NODE: rolestr = "NODE"; break; + case ZT1_Node_PeerRole::ZT1_Node_Peer_SUPERNODE: rolestr = "SUPERNODE"; break; + case ZT1_Node_PeerRole::ZT1_Node_Peer_HUB: rolestr = "HUB"; break; + case ZT1_Node_PeerRole::ZT1_Node_Peer_NODE: rolestr = "NODE"; break; default: rolestr = "?"; break; } ipcc->printf(" %u %s %s"ZT_EOL_S, @@ -249,7 +249,7 @@ void NodeControlService::_doCommand(IpcConnection *ipcc,const char *commandLine) to.fromString(cmd[3].c_str()); from.copyTo(from2,6); to.copyTo(to2,6); - if (_node->injectPacketFromHost(Utils::hexStrToU64(cmd[1].c_str()),from2,to2,Utils::hexStrToUInt(cmd[4].c_str()),cmd[5].c_str(),cmd[5].length()+1)) { + if (_node->injectPacketFromHost(Utils::hexStrToU64(cmd[1].c_str()),from2,to2,Utils::hexStrToUInt(cmd[4].c_str()),cmd[5].c_str(),(unsigned int)cmd[5].length()+1)) { ipcc->printf("200 OK"ZT_EOL_S); } else { ipcc->printf("500 inject failed or not supported by this tap device"ZT_EOL_S); diff --git a/include/ZeroTierOne.h b/include/ZeroTierOne.h index 2474a3a0..0a7c7984 100644 --- a/include/ZeroTierOne.h +++ b/include/ZeroTierOne.h @@ -96,6 +96,16 @@ struct ZT1_Node_Status }; /** + * Physical address type + */ +enum ZT1_Node_PhysicalAddressType { + ZT1_Node_PhysicalAddress_TYPE_NULL = 0, /* none/invalid */ + ZT1_Node_PhysicalAddress_TYPE_IPV4 = 1, /* 32-bit IPv4 address (and port) */ + ZT1_Node_PhysicalAddress_TYPE_IPV6 = 2, /* 128-bit IPv6 address (and port) */ + ZT1_Node_PhysicalAddress_TYPE_ETHERNET = 3 /* 48-bit Ethernet MAC address */ +}; + +/** * Physical address result buffer */ struct ZT1_Node_PhysicalAddress @@ -103,12 +113,7 @@ struct ZT1_Node_PhysicalAddress /** * Physical address type */ - enum { - ZT1_Node_PhysicalAddress_TYPE_NULL = 0, /* none/invalid */ - ZT1_Node_PhysicalAddress_TYPE_IPV4 = 1, /* 32-bit IPv4 address (and port) */ - ZT1_Node_PhysicalAddress_TYPE_IPV6 = 2, /* 128-bit IPv6 address (and port) */ - ZT1_Node_PhysicalAddress_TYPE_ETHERNET = 3 /* 48-bit Ethernet MAC address */ - } type; + enum ZT1_Node_PhysicalAddressType type; /** * Address in raw binary form -- length depends on type @@ -132,6 +137,17 @@ struct ZT1_Node_PhysicalAddress }; /** + * Physical path type + */ +enum ZT1_Node_PhysicalPathType { /* These must be numerically the same as type in Path.hpp */ + ZT1_Node_PhysicalPath_TYPE_NULL = 0, /* none/invalid */ + ZT1_Node_PhysicalPath_TYPE_UDP = 1, /* UDP association */ + ZT1_Node_PhysicalPath_TYPE_TCP_OUT = 2, /* outgoing TCP tunnel using pseudo-SSL */ + ZT1_Node_PhysicalPath_TYPE_TCP_IN = 3, /* incoming TCP tunnel using pseudo-SSL */ + ZT1_Node_PhysicalPath_TYPE_ETHERNET = 4 /* raw ethernet frames over trusted backplane */ +}; + +/** * Network path result buffer */ struct ZT1_Node_PhysicalPath @@ -139,13 +155,7 @@ struct ZT1_Node_PhysicalPath /** * Physical path type */ - enum { /* These must be numerically the same as type in Path.hpp */ - ZT1_Node_PhysicalPath_TYPE_NULL = 0, /* none/invalid */ - ZT1_Node_PhysicalPath_TYPE_UDP = 1, /* UDP association */ - ZT1_Node_PhysicalPath_TYPE_TCP_OUT = 2, /* outgoing TCP tunnel using pseudo-SSL */ - ZT1_Node_PhysicalPath_TYPE_TCP_IN = 3, /* incoming TCP tunnel using pseudo-SSL */ - ZT1_Node_PhysicalPath_TYPE_ETHERNET = 4 /* raw ethernet frames over trusted backplane */ - } type; + enum ZT1_Node_PhysicalPathType type; /** * Physical address of endpoint @@ -179,6 +189,15 @@ struct ZT1_Node_PhysicalPath }; /** + * What trust hierarchy role does this device have? + */ +enum ZT1_Node_PeerRole { + ZT1_Node_Peer_SUPERNODE = 0, // planetary supernode + ZT1_Node_Peer_HUB = 1, // locally federated hub (coming soon) + ZT1_Node_Peer_NODE = 2 // ordinary node +}; + +/** * Peer status result buffer */ struct ZT1_Node_Peer @@ -206,11 +225,7 @@ struct ZT1_Node_Peer /** * What trust hierarchy role does this device have? */ - enum { - ZT1_Node_Peer_SUPERNODE = 0, // planetary supernode - ZT1_Node_Peer_HUB = 1, // locally federated hub (coming soon) - ZT1_Node_Peer_NODE = 2 // ordinary node - } role; + enum ZT1_Node_PeerRole role; /** * Array of network paths to peer @@ -233,6 +248,19 @@ struct ZT1_Node_PeerList }; /** + * Network status code + */ +enum ZT1_Node_NetworkStatus { + ZT1_Node_Network_INITIALIZING = 0, + ZT1_Node_Network_WAITING_FOR_FIRST_AUTOCONF = 1, + ZT1_Node_Network_OK = 2, + ZT1_Node_Network_ACCESS_DENIED = 3, + ZT1_Node_Network_NOT_FOUND = 4, + ZT1_Node_Network_INITIALIZATION_FAILED = 5, + ZT1_Node_Network_NO_MORE_DEVICES = 6 +}; + +/** * Network status result buffer */ struct ZT1_Node_Network @@ -299,15 +327,7 @@ struct ZT1_Node_Network /** * Network status code */ - enum { /* Must be same as Status in Network.hpp */ - ZT1_Node_Network_INITIALIZING = 0, - ZT1_Node_Network_WAITING_FOR_FIRST_AUTOCONF = 1, - ZT1_Node_Network_OK = 2, - ZT1_Node_Network_ACCESS_DENIED = 3, - ZT1_Node_Network_NOT_FOUND = 4, - ZT1_Node_Network_INITIALIZATION_FAILED = 5, - ZT1_Node_Network_NO_MORE_DEVICES = 6 - } status; + enum ZT1_Node_NetworkStatus status; /** * True if traffic on network is enabled diff --git a/node/Multicaster.cpp b/node/Multicaster.cpp index ba8258b2..38bcc237 100644 --- a/node/Multicaster.cpp +++ b/node/Multicaster.cpp @@ -81,7 +81,7 @@ unsigned int Multicaster::gather(const Address &queryingPeer,uint64_t nwid,const std::map< std::pair<uint64_t,MulticastGroup>,MulticastGroupStatus >::const_iterator gs(_groups.find(std::pair<uint64_t,MulticastGroup>(nwid,mg))); if ((gs != _groups.end())&&(!gs->second.members.empty())) { - totalKnown += gs->second.members.size(); + totalKnown += (unsigned int)gs->second.members.size(); // Members are returned in random order so that repeated gather queries // will return different subsets of a large multicast group. @@ -290,7 +290,7 @@ void Multicaster::send( C25519::Signature sig(RR->identity.sign(outp.field(ZT_PROTO_VERB_P5_MULTICAST_FRAME_IDX__START_OF_SIGNED_PORTION,signedPortionLen),signedPortionLen)); outp.append((uint16_t)sig.size()); - outp.append(sig.data,sig.size()); + outp.append(sig.data,(unsigned int)sig.size()); if (com) com->serialize(outp); diff --git a/node/Node.cpp b/node/Node.cpp index 4673312a..c6322c31 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -837,7 +837,7 @@ ZT1_Node_PeerList *Node::listPeers() unsigned int returnBufSize = sizeof(ZT1_Node_PeerList); for(std::vector< std::pair< SharedPtr<Peer>,std::vector<Path> > >::iterator p(pp.data.begin());p!=pp.data.end();++p) - returnBufSize += sizeof(ZT1_Node_Peer) + (sizeof(ZT1_Node_PhysicalPath) * p->second.size()); + returnBufSize += sizeof(ZT1_Node_Peer) + (sizeof(ZT1_Node_PhysicalPath) * (unsigned int)p->second.size()); char *buf = (char *)::malloc(returnBufSize); if (!buf) @@ -859,7 +859,7 @@ ZT1_Node_PeerList *Node::listPeers() p->first->address().toString(prec->address,sizeof(prec->address)); prec->rawAddress = p->first->address().toInt(); prec->latency = p->first->latency(); - prec->role = RR->topology->isSupernode(p->first->address()) ? ZT1_Node_Peer::ZT1_Node_Peer_SUPERNODE : ZT1_Node_Peer::ZT1_Node_Peer_NODE; + prec->role = RR->topology->isSupernode(p->first->address()) ? ZT1_Node_PeerRole::ZT1_Node_Peer_SUPERNODE : ZT1_Node_PeerRole::ZT1_Node_Peer_NODE; prec->paths = (ZT1_Node_PhysicalPath *)buf; buf += sizeof(ZT1_Node_PhysicalPath) * p->second.size(); @@ -867,13 +867,13 @@ ZT1_Node_PeerList *Node::listPeers() prec->numPaths = 0; for(std::vector<Path>::iterator pi(p->second.begin());pi!=p->second.end();++pi) { ZT1_Node_PhysicalPath *path = &(prec->paths[prec->numPaths++]); - path->type = static_cast<typeof(path->type)>(pi->type()); + path->type = (ZT1_Node_PhysicalPathType)pi->type(); if (pi->address().isV6()) { - path->address.type = ZT1_Node_PhysicalAddress::ZT1_Node_PhysicalAddress_TYPE_IPV6; + path->address.type = ZT1_Node_PhysicalAddressType::ZT1_Node_PhysicalAddress_TYPE_IPV6; memcpy(path->address.bits,pi->address().rawIpData(),16); // TODO: zoneIndex not supported yet, but should be once echo-location works w/V6 } else { - path->address.type = ZT1_Node_PhysicalAddress::ZT1_Node_PhysicalAddress_TYPE_IPV4; + path->address.type = ZT1_Node_PhysicalAddressType::ZT1_Node_PhysicalAddress_TYPE_IPV4; memcpy(path->address.bits,pi->address().rawIpData(),4); } path->address.port = pi->address().port(); @@ -906,7 +906,7 @@ static void _fillNetworkQueryResultBuffer(const SharedPtr<Network> &network,cons if (lcu > 0) nbuf->configAge = (long)(Utils::now() - lcu); else nbuf->configAge = -1; - nbuf->status = static_cast<typeof(nbuf->status)>(network->status()); + nbuf->status = (ZT1_Node_NetworkStatus)network->status(); nbuf->enabled = network->enabled(); nbuf->isPrivate = (nconf) ? nconf->isPrivate() : true; } @@ -938,10 +938,10 @@ ZT1_Node_Network *Node::getNetworkStatus(uint64_t nwid) for(std::set<InetAddress>::iterator ip(ips.begin());ip!=ips.end();++ip) { ZT1_Node_PhysicalAddress *ipb = &(nbuf->ips[nbuf->numIps++]); if (ip->isV6()) { - ipb->type = ZT1_Node_PhysicalAddress::ZT1_Node_PhysicalAddress_TYPE_IPV6; + ipb->type = ZT1_Node_PhysicalAddressType::ZT1_Node_PhysicalAddress_TYPE_IPV6; memcpy(ipb->bits,ip->rawIpData(),16); } else { - ipb->type = ZT1_Node_PhysicalAddress::ZT1_Node_PhysicalAddress_TYPE_IPV4; + ipb->type = ZT1_Node_PhysicalAddressType::ZT1_Node_PhysicalAddress_TYPE_IPV4; memcpy(ipb->bits,ip->rawIpData(),4); } ipb->port = ip->port(); @@ -965,7 +965,7 @@ ZT1_Node_NetworkList *Node::listNetworks() for(unsigned long i=0;i<networks.size();++i) { nconfs[i] = networks[i]->config2(); ipsv[i] = networks[i]->ips(); - returnBufSize += sizeof(ZT1_Node_Network) + (sizeof(ZT1_Node_PhysicalAddress) * ipsv[i].size()); + returnBufSize += sizeof(ZT1_Node_Network) + (sizeof(ZT1_Node_PhysicalAddress) * (unsigned int)ipsv[i].size()); } char *buf = (char *)::malloc(returnBufSize); @@ -991,10 +991,10 @@ ZT1_Node_NetworkList *Node::listNetworks() for(std::set<InetAddress>::iterator ip(ipsv[i].begin());ip!=ipsv[i].end();++ip) { ZT1_Node_PhysicalAddress *ipb = &(nbuf->ips[nbuf->numIps++]); if (ip->isV6()) { - ipb->type = ZT1_Node_PhysicalAddress::ZT1_Node_PhysicalAddress_TYPE_IPV6; + ipb->type = ZT1_Node_PhysicalAddressType::ZT1_Node_PhysicalAddress_TYPE_IPV6; memcpy(ipb->bits,ip->rawIpData(),16); } else { - ipb->type = ZT1_Node_PhysicalAddress::ZT1_Node_PhysicalAddress_TYPE_IPV4; + ipb->type = ZT1_Node_PhysicalAddressType::ZT1_Node_PhysicalAddress_TYPE_IPV4; memcpy(ipb->bits,ip->rawIpData(),4); } ipb->port = ip->port(); diff --git a/node/Topology.hpp b/node/Topology.hpp index e3e573ed..15e8db3b 100644 --- a/node/Topology.hpp +++ b/node/Topology.hpp @@ -112,7 +112,7 @@ public: inline unsigned int numSupernodes() const { Mutex::Lock _l(_lock); - return _supernodePeers.size(); + return (unsigned int)_supernodePeers.size(); } /** diff --git a/windows/ZeroTierOne/ZeroTierOne.vcxproj b/windows/ZeroTierOne/ZeroTierOne.vcxproj index 6c6a0262..bdab5aed 100644 --- a/windows/ZeroTierOne/ZeroTierOne.vcxproj +++ b/windows/ZeroTierOne/ZeroTierOne.vcxproj @@ -19,12 +19,16 @@ </ProjectConfiguration> </ItemGroup> <ItemGroup> + <ClCompile Include="..\..\control\IpcConnection.cpp" /> + <ClCompile Include="..\..\control\IpcListener.cpp" /> + <ClCompile Include="..\..\control\NodeControlClient.cpp" /> + <ClCompile Include="..\..\control\NodeControlService.cpp" /> <ClCompile Include="..\..\ext\lz4\lz4.c" /> <ClCompile Include="..\..\main.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\..\node\C25519.cpp" /> <ClCompile Include="..\..\node\CertificateOfMembership.cpp" /> @@ -32,17 +36,16 @@ <ClCompile Include="..\..\node\Dictionary.cpp" /> <ClCompile Include="..\..\node\HttpClient.cpp" /> <ClCompile Include="..\..\node\Identity.cpp" /> + <ClCompile Include="..\..\node\IncomingPacket.cpp" /> <ClCompile Include="..\..\node\InetAddress.cpp" /> - <ClCompile Include="..\..\node\IpcConnection.cpp" /> - <ClCompile Include="..\..\node\IpcListener.cpp" /> <ClCompile Include="..\..\node\Logger.cpp" /> <ClCompile Include="..\..\node\Multicaster.cpp" /> <ClCompile Include="..\..\node\Network.cpp" /> <ClCompile Include="..\..\node\NetworkConfig.cpp" /> <ClCompile Include="..\..\node\Node.cpp" /> <ClCompile Include="..\..\node\NodeConfig.cpp" /> + <ClCompile Include="..\..\node\OutboundMulticast.cpp" /> <ClCompile Include="..\..\node\Packet.cpp" /> - <ClCompile Include="..\..\node\PacketDecoder.cpp" /> <ClCompile Include="..\..\node\Peer.cpp" /> <ClCompile Include="..\..\node\Poly1305.cpp" /> <ClCompile Include="..\..\node\RoutingTable.cpp" /> @@ -60,17 +63,25 @@ <ClCompile Include="..\..\osnet\WindowsEthernetTapFactory.cpp" /> <ClCompile Include="..\..\osnet\WindowsRoutingTable.cpp" /> <ClCompile Include="..\..\selftest.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> </ClCompile> + <ClCompile Include="..\..\testnet\TestEthernetTap.cpp" /> + <ClCompile Include="..\..\testnet\TestEthernetTapFactory.cpp" /> + <ClCompile Include="..\..\testnet\TestRoutingTable.cpp" /> <ClCompile Include="ServiceBase.cpp" /> <ClCompile Include="ServiceInstaller.cpp" /> <ClCompile Include="ZeroTierOneService.cpp" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\..\control\IpcConnection.hpp" /> + <ClInclude Include="..\..\control\IpcListener.hpp" /> + <ClInclude Include="..\..\control\NodeControlClient.hpp" /> + <ClInclude Include="..\..\control\NodeControlService.hpp" /> <ClInclude Include="..\..\ext\lz4\lz4.h" /> + <ClInclude Include="..\..\include\ZeroTierOne.h" /> <ClInclude Include="..\..\node\Address.hpp" /> <ClInclude Include="..\..\node\AntiRecursion.hpp" /> <ClInclude Include="..\..\node\Array.hpp" /> @@ -87,9 +98,8 @@ <ClInclude Include="..\..\node\EthernetTap.hpp" /> <ClInclude Include="..\..\node\HttpClient.hpp" /> <ClInclude Include="..\..\node\Identity.hpp" /> + <ClInclude Include="..\..\node\IncomingPacket.hpp" /> <ClInclude Include="..\..\node\InetAddress.hpp" /> - <ClInclude Include="..\..\node\IpcConnection.hpp" /> - <ClInclude Include="..\..\node\IpcListener.hpp" /> <ClInclude Include="..\..\node\Logger.hpp" /> <ClInclude Include="..\..\node\MAC.hpp" /> <ClInclude Include="..\..\node\Multicaster.hpp" /> @@ -100,8 +110,8 @@ <ClInclude Include="..\..\node\Node.hpp" /> <ClInclude Include="..\..\node\NodeConfig.hpp" /> <ClInclude Include="..\..\node\NonCopyable.hpp" /> + <ClInclude Include="..\..\node\OutboundMulticast.hpp" /> <ClInclude Include="..\..\node\Packet.hpp" /> - <ClInclude Include="..\..\node\PacketDecoder.hpp" /> <ClInclude Include="..\..\node\Path.hpp" /> <ClInclude Include="..\..\node\Peer.hpp" /> <ClInclude Include="..\..\node\Poly1305.hpp" /> @@ -123,6 +133,9 @@ <ClInclude Include="..\..\osnet\WindowsEthernetTap.hpp" /> <ClInclude Include="..\..\osnet\WindowsEthernetTapFactory.hpp" /> <ClInclude Include="..\..\osnet\WindowsRoutingTable.hpp" /> + <ClInclude Include="..\..\testnet\TestEthernetTap.hpp" /> + <ClInclude Include="..\..\testnet\TestEthernetTapFactory.hpp" /> + <ClInclude Include="..\..\testnet\TestRoutingTable.hpp" /> <ClInclude Include="..\..\version.h" /> <ClInclude Include="resource.h" /> <ClInclude Include="ServiceBase.h" /> diff --git a/windows/ZeroTierOne/ZeroTierOne.vcxproj.filters b/windows/ZeroTierOne/ZeroTierOne.vcxproj.filters index 80e78630..4d816c36 100644 --- a/windows/ZeroTierOne/ZeroTierOne.vcxproj.filters +++ b/windows/ZeroTierOne/ZeroTierOne.vcxproj.filters @@ -57,9 +57,6 @@ <ClCompile Include="..\..\node\Packet.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\node\PacketDecoder.cpp"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\..\node\Peer.cpp"> <Filter>Source Files</Filter> </ClCompile> @@ -99,12 +96,6 @@ <ClCompile Include="ZeroTierOneService.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\node\IpcConnection.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\..\node\IpcListener.cpp"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\..\node\SocketManager.cpp"> <Filter>Source Files</Filter> </ClCompile> @@ -132,6 +123,33 @@ <ClCompile Include="..\..\selftest.cpp"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="..\..\control\IpcConnection.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\control\IpcListener.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\control\NodeControlClient.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\control\NodeControlService.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\testnet\TestEthernetTap.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\testnet\TestEthernetTapFactory.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\testnet\TestRoutingTable.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\node\IncomingPacket.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\node\OutboundMulticast.cpp"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\ext\lz4\lz4.h"> @@ -218,9 +236,6 @@ <ClInclude Include="..\..\node\Packet.hpp"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\node\PacketDecoder.hpp"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\..\node\Peer.hpp"> <Filter>Header Files</Filter> </ClInclude> @@ -272,12 +287,6 @@ <ClInclude Include="ZeroTierOneService.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\node\IpcConnection.hpp"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\node\IpcListener.hpp"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\..\node\Path.hpp"> <Filter>Header Files</Filter> </ClInclude> @@ -308,6 +317,36 @@ <ClInclude Include="..\..\osnet\WindowsRoutingTable.hpp"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="..\..\control\IpcConnection.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\control\IpcListener.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\control\NodeControlClient.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\control\NodeControlService.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\testnet\TestEthernetTap.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\testnet\TestEthernetTapFactory.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\testnet\TestRoutingTable.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\node\IncomingPacket.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ZeroTierOne.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\node\OutboundMulticast.hpp"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ResourceCompile Include="ZeroTierOne.rc"> diff --git a/windows/ZeroTierOne/ZeroTierOneService.cpp b/windows/ZeroTierOne/ZeroTierOneService.cpp index f0d93280..e7f02544 100644 --- a/windows/ZeroTierOne/ZeroTierOneService.cpp +++ b/windows/ZeroTierOne/ZeroTierOneService.cpp @@ -106,7 +106,7 @@ restart_node: // Get upgrade path, which will be its reason for termination std::string msiPath; if (n) { - const char *msiPathTmp = n->reasonForTermination(); + const char *msiPathTmp = n->terminationMessage(); if (msiPathTmp) msiPath = msiPathTmp; } @@ -131,7 +131,7 @@ restart_node: case ZeroTier::Node::NODE_UNRECOVERABLE_ERROR: { std::string err("ZeroTier node encountered an unrecoverable error: "); - const char *r = _node->reasonForTermination(); + const char *r = _node->terminationMessage(); if (r) err.append(r); else err.append("(unknown error)"); |