summaryrefslogtreecommitdiff
path: root/controller/SqliteNetworkController.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'controller/SqliteNetworkController.hpp')
-rw-r--r--controller/SqliteNetworkController.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/controller/SqliteNetworkController.hpp b/controller/SqliteNetworkController.hpp
index 68529e39..7a01487c 100644
--- a/controller/SqliteNetworkController.hpp
+++ b/controller/SqliteNetworkController.hpp
@@ -43,6 +43,9 @@
// Number of in-memory last log entries to maintain per user
#define ZT_SQLITENETWORKCONTROLLER_IN_MEMORY_LOG_SIZE 32
+// How long do circuit tests "live"? This is just to prevent buildup in memory.
+#define ZT_SQLITENETWORKCONTROLLER_CIRCUIT_TEST_TIMEOUT 300000
+
namespace ZeroTier {
class Node;
@@ -106,6 +109,8 @@ private:
const Dictionary &metaData,
Dictionary &netconf);
+ static void _circuitTestCallback(ZT_Node *node,ZT_CircuitTest *test,const ZT_CircuitTestReport *report);
+
Node *_node;
std::string _dbPath;
std::string _circuitTestPath;
@@ -140,6 +145,9 @@ private:
// Last log entries by address and network ID pair
std::map< std::pair<Address,uint64_t>,_LLEntry > _lastLog;
+ // Circuit tests outstanding
+ std::map< uint64_t,ZT_CircuitTest * > _circuitTests;
+
sqlite3 *_db;
sqlite3_stmt *_sGetNetworkById;