diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-03-13 13:53:15 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-03-13 13:53:15 -0700 |
| commit | 278c8fd9f1a36bc7b81cbfd50b93626d5341b8de (patch) | |
| tree | 05982f038be7be478ae3bd58cae976dcbf01a6d8 /node | |
| parent | 61d89bd1182273fb479a2eb250ce0cc452345d9b (diff) | |
| download | infinitytier-278c8fd9f1a36bc7b81cbfd50b93626d5341b8de.tar.gz infinitytier-278c8fd9f1a36bc7b81cbfd50b93626d5341b8de.zip | |
Wire up externally specified NetworkConfigMaster
Diffstat (limited to 'node')
| -rw-r--r-- | node/Node.cpp | 3 | ||||
| -rw-r--r-- | node/Node.hpp | 3 | ||||
| -rw-r--r-- | node/RuntimeEnvironment.hpp | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/node/Node.cpp b/node/Node.cpp index 28c9ddaa..d013444a 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -108,7 +108,6 @@ struct _NodeImpl delete renv.mc; renv.mc = (Multicaster *)0; delete renv.antiRec; renv.antiRec = (AntiRecursion *)0; delete renv.sw; renv.sw = (Switch *)0; // order matters less from here down - delete renv.netconfMaster; renv.netconfMaster = (NetworkConfigMaster *)0; delete renv.http; renv.http = (HttpClient *)0; delete renv.prng; renv.prng = (CMWC4096 *)0; delete renv.log; renv.log = (Logger *)0; // but stop logging last of all @@ -129,6 +128,7 @@ Node::Node( EthernetTapFactory *tf, RoutingTable *rt, SocketManager *sm, + NetworkConfigMaster *nm, bool resetIdentity, const char *overrideRootTopology) throw() : _impl(new _NodeImpl) @@ -142,6 +142,7 @@ Node::Node( impl->renv.tapFactory = tf; impl->renv.routingTable = rt; impl->renv.sm = sm; + impl->renv.netconfMaster = nm; if (resetIdentity) { // Forget identity and peer database, peer keys, etc. diff --git a/node/Node.hpp b/node/Node.hpp index 2e428a98..23d59e36 100644 --- a/node/Node.hpp +++ b/node/Node.hpp @@ -37,6 +37,7 @@ namespace ZeroTier { class EthernetTapFactory; class RoutingTable; class SocketManager; +class NetworkConfigMaster; /** * A ZeroTier One node @@ -87,6 +88,7 @@ public: * @param tf Ethernet tap factory for platform network stack * @param rt Routing table interface for platform network stack * @param sm Socket manager for physical network I/O + * @param nm Network configuration master or NULL for none * @param resetIdentity If true, delete identity before starting and regenerate * @param overrideRootTopology Override root topology with this dictionary (in string serialized format) and do not update (default: NULL for none) */ @@ -95,6 +97,7 @@ public: EthernetTapFactory *tf, RoutingTable *rt, SocketManager *sm, + NetworkConfigMaster *nm, bool resetIdentity, const char *overrideRootTopology = (const char *)0) throw(); diff --git a/node/RuntimeEnvironment.hpp b/node/RuntimeEnvironment.hpp index 035903d9..57a1c262 100644 --- a/node/RuntimeEnvironment.hpp +++ b/node/RuntimeEnvironment.hpp @@ -75,10 +75,10 @@ public: tapFactory((EthernetTapFactory *)0), routingTable((RoutingTable *)0), sm((SocketManager *)0), + netconfMaster((NetworkConfigMaster *)0), log((Logger *)0), prng((CMWC4096 *)0), http((HttpClient *)0), - netconfMaster((NetworkConfigMaster *)0), sw((Switch *)0), mc((Multicaster *)0), antiRec((AntiRecursion *)0), @@ -112,6 +112,7 @@ public: EthernetTapFactory *tapFactory; RoutingTable *routingTable; SocketManager *sm; + NetworkConfigMaster *netconfMaster; /* * Order matters a bit here. These are constructed in this order @@ -124,7 +125,6 @@ public: Logger *log; // null if logging is disabled CMWC4096 *prng; HttpClient *http; - NetworkConfigMaster *netconfMaster; Switch *sw; Multicaster *mc; AntiRecursion *antiRec; |
