From b80c229d873ca51bf679ff9df90c8360dca5d0d7 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 31 Jul 2014 14:09:32 -0700 Subject: Tons of code cleanup, refactor Network to use EthernetTapFactory, probably also fix GitHub issue #90 --- node/RuntimeEnvironment.hpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'node/RuntimeEnvironment.hpp') diff --git a/node/RuntimeEnvironment.hpp b/node/RuntimeEnvironment.hpp index 8887b081..78d950ce 100644 --- a/node/RuntimeEnvironment.hpp +++ b/node/RuntimeEnvironment.hpp @@ -39,7 +39,6 @@ class NodeConfig; class Logger; class Switch; class Topology; -class SysEnv; class CMWC4096; class Service; class Node; @@ -47,6 +46,8 @@ class Multicaster; class SoftwareUpdater; class SocketManager; class AntiRecursion; +class EthernetTapFactory; +class RoutingTable; /** * Holds global state for an instance of ZeroTier::Node @@ -68,6 +69,8 @@ public: tcpTunnelingEnabled(false), timeOfLastResynchronize(0), timeOfLastPacketReceived(0), + tapFactory((EthernetTapFactory *)0), + routingTable((RoutingTable *)0), log((Logger *)0), prng((CMWC4096 *)0), antiRec((AntiRecursion *)0), @@ -75,7 +78,6 @@ public: sw((Switch *)0), sm((SocketManager *)0), topology((Topology *)0), - sysEnv((SysEnv *)0), nc((NodeConfig *)0), updater((SoftwareUpdater *)0) #ifndef __WINDOWS__ @@ -103,6 +105,10 @@ public: // via an ugly const_cast<>. volatile uint64_t timeOfLastPacketReceived; + // These are passed in from outside and are not created or deleted by the ZeroTier node core + EthernetTapFactory *tapFactory; + RoutingTable *routingTable; + /* * Order matters a bit here. These are constructed in this order * and then deleted in the opposite order on Node exit. The order ensures @@ -118,7 +124,6 @@ public: Switch *sw; SocketManager *sm; Topology *topology; - SysEnv *sysEnv; NodeConfig *nc; Node *node; SoftwareUpdater *updater; // null if software updates are not enabled -- cgit v1.2.3