summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-03-30 17:48:48 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-03-30 17:48:48 -0700
commit60158aa5dd38c979ed823fc477ab84e8d9e7a43d (patch)
tree8cdc7091547c8173fdc270ed3d56853ddc5e6da4
parent3c1a59fa2493c6ab2758934fe1062d82975de158 (diff)
downloadinfinitytier-60158aa5dd38c979ed823fc477ab84e8d9e7a43d.tar.gz
infinitytier-60158aa5dd38c979ed823fc477ab84e8d9e7a43d.zip
Turns out that node/ likely has no business with or need for the system IP routing table. So shelve that code for now.
-rw-r--r--attic/rtbl/BSDRoutingTable.cpp (renamed from osnet/BSDRoutingTable.cpp)0
-rw-r--r--attic/rtbl/BSDRoutingTable.hpp (renamed from osnet/BSDRoutingTable.hpp)0
-rw-r--r--attic/rtbl/LinuxRoutingTable.cpp (renamed from osnet/LinuxRoutingTable.cpp)0
-rw-r--r--attic/rtbl/LinuxRoutingTable.hpp (renamed from osnet/LinuxRoutingTable.hpp)0
-rw-r--r--attic/rtbl/RoutingTable.cpp (renamed from node/RoutingTable.cpp)0
-rw-r--r--attic/rtbl/RoutingTable.hpp (renamed from node/RoutingTable.hpp)0
-rw-r--r--attic/rtbl/TestRoutingTable.cpp (renamed from testnet/TestRoutingTable.cpp)0
-rw-r--r--attic/rtbl/TestRoutingTable.hpp (renamed from testnet/TestRoutingTable.hpp)0
-rw-r--r--attic/rtbl/WindowsRoutingTable.cpp (renamed from osnet/WindowsRoutingTable.cpp)0
-rw-r--r--attic/rtbl/WindowsRoutingTable.hpp (renamed from osnet/WindowsRoutingTable.hpp)0
-rw-r--r--include/ZeroTierOne.h2
-rw-r--r--main.cpp14
-rw-r--r--make-freebsd.mk4
-rw-r--r--make-linux.mk4
-rw-r--r--make-mac.mk4
-rw-r--r--node/Node.cpp3
-rw-r--r--node/RuntimeEnvironment.hpp3
-rw-r--r--objects.mk1
-rw-r--r--testnet.cpp5
19 files changed, 9 insertions, 31 deletions
diff --git a/osnet/BSDRoutingTable.cpp b/attic/rtbl/BSDRoutingTable.cpp
index 6d44c3ec..6d44c3ec 100644
--- a/osnet/BSDRoutingTable.cpp
+++ b/attic/rtbl/BSDRoutingTable.cpp
diff --git a/osnet/BSDRoutingTable.hpp b/attic/rtbl/BSDRoutingTable.hpp
index 97969666..97969666 100644
--- a/osnet/BSDRoutingTable.hpp
+++ b/attic/rtbl/BSDRoutingTable.hpp
diff --git a/osnet/LinuxRoutingTable.cpp b/attic/rtbl/LinuxRoutingTable.cpp
index 581054e2..581054e2 100644
--- a/osnet/LinuxRoutingTable.cpp
+++ b/attic/rtbl/LinuxRoutingTable.cpp
diff --git a/osnet/LinuxRoutingTable.hpp b/attic/rtbl/LinuxRoutingTable.hpp
index 808ec7ea..808ec7ea 100644
--- a/osnet/LinuxRoutingTable.hpp
+++ b/attic/rtbl/LinuxRoutingTable.hpp
diff --git a/node/RoutingTable.cpp b/attic/rtbl/RoutingTable.cpp
index bae4bea9..bae4bea9 100644
--- a/node/RoutingTable.cpp
+++ b/attic/rtbl/RoutingTable.cpp
diff --git a/node/RoutingTable.hpp b/attic/rtbl/RoutingTable.hpp
index e1c98984..e1c98984 100644
--- a/node/RoutingTable.hpp
+++ b/attic/rtbl/RoutingTable.hpp
diff --git a/testnet/TestRoutingTable.cpp b/attic/rtbl/TestRoutingTable.cpp
index fd61b314..fd61b314 100644
--- a/testnet/TestRoutingTable.cpp
+++ b/attic/rtbl/TestRoutingTable.cpp
diff --git a/testnet/TestRoutingTable.hpp b/attic/rtbl/TestRoutingTable.hpp
index 69bd3d9f..69bd3d9f 100644
--- a/testnet/TestRoutingTable.hpp
+++ b/attic/rtbl/TestRoutingTable.hpp
diff --git a/osnet/WindowsRoutingTable.cpp b/attic/rtbl/WindowsRoutingTable.cpp
index 00674620..00674620 100644
--- a/osnet/WindowsRoutingTable.cpp
+++ b/attic/rtbl/WindowsRoutingTable.cpp
diff --git a/osnet/WindowsRoutingTable.hpp b/attic/rtbl/WindowsRoutingTable.hpp
index 491c3424..491c3424 100644
--- a/osnet/WindowsRoutingTable.hpp
+++ b/attic/rtbl/WindowsRoutingTable.hpp
diff --git a/include/ZeroTierOne.h b/include/ZeroTierOne.h
index 93d5aa8b..0808a750 100644
--- a/include/ZeroTierOne.h
+++ b/include/ZeroTierOne.h
@@ -55,7 +55,7 @@ struct ZT1_Node_Status
char address[16];
/**
- * ZeroTier address in least significant 40 bits of 64-bit integer
+ * ZeroTier address (in least significant 40 bits of 64-bit integer)
*/
uint64_t rawAddress;
diff --git a/main.cpp b/main.cpp
index 7467ba41..c78ffa89 100644
--- a/main.cpp
+++ b/main.cpp
@@ -70,7 +70,6 @@
#include "node/Thread.hpp"
#include "node/CertificateOfMembership.hpp"
#include "node/EthernetTapFactory.hpp"
-#include "node/RoutingTable.hpp"
#include "node/SocketManager.hpp"
#include "control/NodeControlClient.hpp"
@@ -84,31 +83,23 @@
#ifdef __WINDOWS__
#include "osnet/WindowsEthernetTapFactory.hpp"
-#include "osnet/WindowsRoutingTable.hpp"
#define ZTCreatePlatformEthernetTapFactory (new WindowsEthernetTapFactory(homeDir))
-#define ZTCreatePlatformRoutingTable (new WindowsRoutingTable())
#endif // __WINDOWS__
#ifdef __LINUX__
#include "osnet/LinuxEthernetTapFactory.hpp"
-#include "osnet/LinuxRoutingTable.hpp"
#define ZTCreatePlatformEthernetTapFactory (new LinuxEthernetTapFactory())
-#define ZTCreatePlatformRoutingTable (new LinuxRoutingTable())
#endif // __LINUX__
#ifdef __APPLE__
#include "osnet/OSXEthernetTapFactory.hpp"
-#include "osnet/BSDRoutingTable.hpp"
#define ZTCreatePlatformEthernetTapFactory (new OSXEthernetTapFactory(homeDir,"tap.kext"))
-#define ZTCreatePlatformRoutingTable (new BSDRoutingTable())
#endif // __APPLE__
#ifndef ZTCreatePlatformEthernetTapFactory
#ifdef __BSD__
#include "osnet/BSDEthernetTapFactory.hpp"
-#include "osnet/BSDRoutingTable.hpp"
#define ZTCreatePlatformEthernetTapFactory (new BSDEthernetTapFactory())
-#define ZTCreatePlatformRoutingTable (new BSDRoutingTable())
#else
#error Sorry, this platform has no osnet/ implementation yet. Fork me on GitHub and add one?
#endif // __BSD__
@@ -811,7 +802,6 @@ int main(int argc,char **argv)
int exitCode = 0;
bool needsReset = false;
EthernetTapFactory *tapFactory = (EthernetTapFactory *)0;
- RoutingTable *routingTable = (RoutingTable *)0;
SocketManager *socketManager = (SocketManager *)0;
NodeControlService *controlService = (NodeControlService *)0;
NetworkConfigMaster *netconfMaster = (NetworkConfigMaster *)0;
@@ -823,7 +813,6 @@ int main(int argc,char **argv)
std::string authToken(NodeControlClient::getAuthToken((std::string(homeDir) + ZT_PATH_SEPARATOR_S + "authtoken.secret").c_str(),true));
tapFactory = ZTCreatePlatformEthernetTapFactory;
- routingTable = ZTCreatePlatformRoutingTable;
try {
socketManager = new NativeSocketManager(udpPort,tcpPort);
@@ -832,7 +821,7 @@ int main(int argc,char **argv)
throw;
}
- node = new Node(homeDir,tapFactory,routingTable,socketManager,netconfMaster,needsReset,(overrideRootTopology.length() > 0) ? overrideRootTopology.c_str() : (const char *)0);
+ node = new Node(homeDir,tapFactory,socketManager,netconfMaster,needsReset,(overrideRootTopology.length() > 0) ? overrideRootTopology.c_str() : (const char *)0);
controlService = new NodeControlService(node,authToken.c_str());
switch(node->run()) {
@@ -888,7 +877,6 @@ int main(int argc,char **argv)
delete controlService;
delete node; node = (Node *)0;
delete socketManager;
- delete routingTable;
delete tapFactory;
#ifdef __UNIX_LIKE__
diff --git a/make-freebsd.mk b/make-freebsd.mk
index 6a034dc7..0b65ca7a 100644
--- a/make-freebsd.mk
+++ b/make-freebsd.mk
@@ -6,8 +6,8 @@ DEFS=
LIBS=
include objects.mk
-OBJS+=osnet/BSDEthernetTapFactory.o osnet/BSDEthernetTap.o osnet/BSDRoutingTable.o
-TESTNET_OBJS=testnet/SimNet.o testnet/SimNetSocketManager.o testnet/TestEthernetTap.o testnet/TestEthernetTapFactory.o testnet/TestRoutingTable.o
+OBJS+=osnet/BSDEthernetTapFactory.o osnet/BSDEthernetTap.o
+TESTNET_OBJS=testnet/SimNet.o testnet/SimNetSocketManager.o testnet/TestEthernetTap.o testnet/TestEthernetTapFactory.o
# Enable SSE-optimized Salsa20 on x86 and x86_64 machines
MACHINE=$(shell uname -m)
diff --git a/make-linux.mk b/make-linux.mk
index 67a63a7b..627b7737 100644
--- a/make-linux.mk
+++ b/make-linux.mk
@@ -7,8 +7,8 @@ DEFS=
LIBS=
include objects.mk
-OBJS+=osnet/LinuxRoutingTable.o osnet/LinuxEthernetTap.o osnet/LinuxEthernetTapFactory.o
-TESTNET_OBJS=testnet/SimNet.o testnet/SimNetSocketManager.o testnet/TestEthernetTap.o testnet/TestEthernetTapFactory.o testnet/TestRoutingTable.o
+OBJS+=osnet/LinuxEthernetTap.o osnet/LinuxEthernetTapFactory.o
+TESTNET_OBJS=testnet/SimNet.o testnet/SimNetSocketManager.o testnet/TestEthernetTap.o testnet/TestEthernetTapFactory.o
# Enable SSE-optimized Salsa20 on x86 and x86_64 machines
MACHINE=$(shell uname -m)
diff --git a/make-mac.mk b/make-mac.mk
index 28a7c72d..730bda15 100644
--- a/make-mac.mk
+++ b/make-mac.mk
@@ -7,8 +7,8 @@ LIBS=
ARCH_FLAGS=-arch i386 -arch x86_64
include objects.mk
-OBJS+=osnet/BSDRoutingTable.o osnet/OSXEthernetTap.o osnet/OSXEthernetTapFactory.o
-TESTNET_OBJS=testnet/SimNet.o testnet/SimNetSocketManager.o testnet/TestEthernetTap.o testnet/TestEthernetTapFactory.o testnet/TestRoutingTable.o
+OBJS+=osnet/OSXEthernetTap.o osnet/OSXEthernetTapFactory.o
+TESTNET_OBJS=testnet/SimNet.o testnet/SimNetSocketManager.o testnet/TestEthernetTap.o testnet/TestEthernetTapFactory.o
# Disable codesign since open source users will not have ZeroTier's certs
CODESIGN=echo
diff --git a/node/Node.cpp b/node/Node.cpp
index d013444a..71c2d3fa 100644
--- a/node/Node.cpp
+++ b/node/Node.cpp
@@ -74,7 +74,6 @@
#include "SoftwareUpdater.hpp"
#include "Buffer.hpp"
#include "AntiRecursion.hpp"
-#include "RoutingTable.hpp"
#include "HttpClient.hpp"
#include "NetworkConfigMaster.hpp"
@@ -126,7 +125,6 @@ struct _NodeImpl
Node::Node(
const char *hp,
EthernetTapFactory *tf,
- RoutingTable *rt,
SocketManager *sm,
NetworkConfigMaster *nm,
bool resetIdentity,
@@ -140,7 +138,6 @@ Node::Node(
else impl->renv.homePath = ZT_DEFAULTS.defaultHomePath;
impl->renv.tapFactory = tf;
- impl->renv.routingTable = rt;
impl->renv.sm = sm;
impl->renv.netconfMaster = nm;
diff --git a/node/RuntimeEnvironment.hpp b/node/RuntimeEnvironment.hpp
index 57a1c262..425c6d84 100644
--- a/node/RuntimeEnvironment.hpp
+++ b/node/RuntimeEnvironment.hpp
@@ -46,7 +46,6 @@ class SocketManager;
class Multicaster;
class AntiRecursion;
class EthernetTapFactory;
-class RoutingTable;
class HttpClient;
class NetworkConfigMaster;
@@ -73,7 +72,6 @@ public:
timeOfLastResynchronize(0),
timeOfLastPacketReceived(0),
tapFactory((EthernetTapFactory *)0),
- routingTable((RoutingTable *)0),
sm((SocketManager *)0),
netconfMaster((NetworkConfigMaster *)0),
log((Logger *)0),
@@ -110,7 +108,6 @@ public:
// These are passed in from outside and are not created or deleted by the ZeroTier node core
EthernetTapFactory *tapFactory;
- RoutingTable *routingTable;
SocketManager *sm;
NetworkConfigMaster *netconfMaster;
diff --git a/objects.mk b/objects.mk
index 8ed5339d..7fce4abb 100644
--- a/objects.mk
+++ b/objects.mk
@@ -24,7 +24,6 @@ OBJS=\
node/Packet.o \
node/Peer.o \
node/Poly1305.o \
- node/RoutingTable.o \
node/Salsa20.o \
node/SoftwareUpdater.o \
node/SHA512.o \
diff --git a/testnet.cpp b/testnet.cpp
index eeb59b90..5b175728 100644
--- a/testnet.cpp
+++ b/testnet.cpp
@@ -50,7 +50,6 @@
#include "testnet/SimNetSocketManager.hpp"
#include "testnet/TestEthernetTap.hpp"
#include "testnet/TestEthernetTapFactory.hpp"
-#include "testnet/TestRoutingTable.hpp"
#ifdef __WINDOWS__
#include <windows.h>
@@ -67,9 +66,8 @@ public:
SimNode(SimNet &net,const std::string &hp,const char *rootTopology,bool issn,const InetAddress &addr) :
home(hp),
tapFactory(),
- routingTable(),
socketManager(net.newEndpoint(addr)),
- node(home.c_str(),&tapFactory,&routingTable,socketManager,false,rootTopology),
+ node(home.c_str(),&tapFactory,socketManager,false,rootTopology),
reasonForTermination(Node::NODE_RUNNING),
supernode(issn)
{
@@ -90,7 +88,6 @@ public:
std::string home;
TestEthernetTapFactory tapFactory;
- TestRoutingTable routingTable;
SimNetSocketManager *socketManager;
Node node;
Node::ReasonForTermination reasonForTermination;