summaryrefslogtreecommitdiff
path: root/node/NodeConfig.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-02-10 14:22:57 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-02-10 14:22:57 -0800
commitcd339486b70d8d43ea9fd64c764e63c65730f4cb (patch)
treec112a799db93c9cc6f12cc633ed8c0b0b728c957 /node/NodeConfig.hpp
parente54a34d8dd3f725ed86b690bfd74eab5cd1257db (diff)
downloadinfinitytier-cd339486b70d8d43ea9fd64c764e63c65730f4cb.tar.gz
infinitytier-cd339486b70d8d43ea9fd64c764e63c65730f4cb.zip
local.conf in NodeConfig
Diffstat (limited to 'node/NodeConfig.hpp')
-rw-r--r--node/NodeConfig.hpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/node/NodeConfig.hpp b/node/NodeConfig.hpp
index b26d180b..d7a3984a 100644
--- a/node/NodeConfig.hpp
+++ b/node/NodeConfig.hpp
@@ -41,6 +41,7 @@
#include "Utils.hpp"
#include "UdpSocket.hpp"
#include "Buffer.hpp"
+#include "Dictionary.hpp"
namespace ZeroTier {
@@ -121,7 +122,7 @@ public:
}
/**
- * Execute a command
+ * Execute a control command (called when stuff comes in via control bus)
*
* @param command Command and arguments separated by whitespace (must already be trimmed of CR+LF, etc.)
* @return One or more command results (lines of output)
@@ -159,12 +160,18 @@ public:
private:
static void _CBcontrolPacketHandler(UdpSocket *sock,void *arg,const InetAddress &remoteAddr,const void *data,unsigned int len);
+ void _readLocalConfig();
+ void _writeLocalConfig();
+
const RuntimeEnvironment *_r;
unsigned char _controlSocketKey[32];
UdpSocket _controlSocket;
- std::map< uint64_t,SharedPtr<Network> > _networks;
+ Dictionary _localConfig; // persisted as local.conf
+ Mutex _localConfig_m;
+
+ std::map< uint64_t,SharedPtr<Network> > _networks; // persisted in networks.d/
Mutex _networks_m;
};