mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 05:13:58 -07:00
Wire up externally specified NetworkConfigMaster
This commit is contained in:
parent
61d89bd118
commit
278c8fd9f1
6 changed files with 18 additions and 9 deletions
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue