Bläddra i källkod

All of node/ now compiles again!

Adam Ierymenko 10 år sedan
förälder
incheckning
7529d050c7
4 ändrade filer med 8 tillägg och 8 borttagningar
  1. 3 1
      node/Defaults.cpp
  2. 3 3
      node/NetworkConfig.cpp
  3. 2 3
      node/OutboundMulticast.cpp
  4. 0 1
      objects.mk

+ 3 - 1
node/Defaults.cpp

@@ -29,6 +29,8 @@
 #include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <string.h>
 
 
+#include "../include/ZeroTierOne.h"
+
 #include "Constants.hpp"
 #include "Constants.hpp"
 #include "Defaults.hpp"
 #include "Defaults.hpp"
 #include "Utils.hpp"
 #include "Utils.hpp"
@@ -158,7 +160,7 @@ Defaults::Defaults() :
 	rootTopologyAuthorities(_mkRootTopologyAuth()),
 	rootTopologyAuthorities(_mkRootTopologyAuth()),
 	updateAuthorities(_mkUpdateAuth()),
 	updateAuthorities(_mkUpdateAuth()),
 	updateLatestNfoURL(_mkUpdateUrl()),
 	updateLatestNfoURL(_mkUpdateUrl()),
-	v4Broadcast(((uint32_t)0xffffffff),ZT_DEFAULT_UDP_PORT)
+	v4Broadcast(((uint32_t)0xffffffff),ZT1_DEFAULT_PORT)
 {
 {
 }
 }
 
 

+ 3 - 3
node/NetworkConfig.cpp

@@ -144,12 +144,12 @@ void NetworkConfig::_fromDictionary(const Dictionary &d)
 	std::vector<std::string> ipAddrsSplit(Utils::split(ipAddrs.c_str(),",","",""));
 	std::vector<std::string> ipAddrsSplit(Utils::split(ipAddrs.c_str(),",","",""));
 	for(std::vector<std::string>::const_iterator ipstr(ipAddrsSplit.begin());ipstr!=ipAddrsSplit.end();++ipstr) {
 	for(std::vector<std::string>::const_iterator ipstr(ipAddrsSplit.begin());ipstr!=ipAddrsSplit.end();++ipstr) {
 		InetAddress addr(*ipstr);
 		InetAddress addr(*ipstr);
-		switch(addr.type()) {
-			case InetAddress::TYPE_IPV4:
+		switch(addr.ss_family) {
+			case AF_INET:
 				if ((!addr.netmaskBits())||(addr.netmaskBits() > 32))
 				if ((!addr.netmaskBits())||(addr.netmaskBits() > 32))
 					continue;
 					continue;
 				break;
 				break;
-			case InetAddress::TYPE_IPV6:
+			case AF_INET6:
 				if ((!addr.netmaskBits())||(addr.netmaskBits() > 128))
 				if ((!addr.netmaskBits())||(addr.netmaskBits() > 128))
 					continue;
 					continue;
 				break;
 				break;

+ 2 - 3
node/OutboundMulticast.cpp

@@ -29,10 +29,9 @@
 #include "RuntimeEnvironment.hpp"
 #include "RuntimeEnvironment.hpp"
 #include "OutboundMulticast.hpp"
 #include "OutboundMulticast.hpp"
 #include "Switch.hpp"
 #include "Switch.hpp"
-#include "NodeConfig.hpp"
 #include "Network.hpp"
 #include "Network.hpp"
 #include "CertificateOfMembership.hpp"
 #include "CertificateOfMembership.hpp"
-#include "Utils.hpp"
+#include "Node.hpp"
 #include "Logger.hpp"
 #include "Logger.hpp"
 
 
 namespace ZeroTier {
 namespace ZeroTier {
@@ -105,7 +104,7 @@ void OutboundMulticast::init(
 void OutboundMulticast::sendOnly(const RuntimeEnvironment *RR,const Address &toAddr)
 void OutboundMulticast::sendOnly(const RuntimeEnvironment *RR,const Address &toAddr)
 {
 {
 	if (_haveCom) {
 	if (_haveCom) {
-		SharedPtr<Network> network(RR->nc->network(_nwid));
+		SharedPtr<Network> network(RR->node->network(_nwid));
 		if (network->peerNeedsOurMembershipCertificate(toAddr,RR->node->now())) {
 		if (network->peerNeedsOurMembershipCertificate(toAddr,RR->node->now())) {
 			_packetWithCom.newInitializationVector();
 			_packetWithCom.newInitializationVector();
 			_packetWithCom.setDestination(toAddr);
 			_packetWithCom.setDestination(toAddr);

+ 0 - 1
objects.mk

@@ -18,7 +18,6 @@ OBJS=\
 	node/Peer.o \
 	node/Peer.o \
 	node/Poly1305.o \
 	node/Poly1305.o \
 	node/Salsa20.o \
 	node/Salsa20.o \
-	node/SoftwareUpdater.o \
 	node/SHA512.o \
 	node/SHA512.o \
 	node/Switch.o \
 	node/Switch.o \
 	node/Topology.o \
 	node/Topology.o \