Add NodeHistory table on sqlite controller.
This commit is contained in:
parent
7a63fdc447
commit
f8eb6b0067
4 changed files with 62 additions and 31 deletions
|
@ -123,33 +123,6 @@ private:
|
|||
std::string _circuitTestPath;
|
||||
std::string _instanceId;
|
||||
|
||||
// Recent request log by device address and network ID
|
||||
struct _LLEntry
|
||||
{
|
||||
_LLEntry()
|
||||
{
|
||||
for(long i=0;i<ZT_SQLITENETWORKCONTROLLER_IN_MEMORY_LOG_SIZE;++i)
|
||||
this->l[i].ts = 0;
|
||||
this->lastRequestTime = 0;
|
||||
this->totalRequests = 0;
|
||||
}
|
||||
|
||||
// Circular buffer of last log entries
|
||||
struct {
|
||||
uint64_t ts; // timestamp or 0 if circular buffer entry unused
|
||||
char version[64];
|
||||
InetAddress fromAddr;
|
||||
bool authorized;
|
||||
} l[ZT_SQLITENETWORKCONTROLLER_IN_MEMORY_LOG_SIZE];
|
||||
|
||||
// Time of last request whether successful or not
|
||||
uint64_t lastRequestTime;
|
||||
|
||||
// Total requests by this address / network ID pair (also serves mod IN_MEMORY_LOG_SIZE as circular buffer ptr)
|
||||
uint64_t totalRequests;
|
||||
};
|
||||
std::map< std::pair<Address,uint64_t>,_LLEntry > _lastLog;
|
||||
|
||||
// Circuit tests outstanding
|
||||
struct _CircuitTestEntry
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue