Plumb through roots via API.

This commit is contained in:
Adam Ierymenko 2019-09-19 09:47:12 -07:00
parent 624efde7e4
commit 3ceb2257e5
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
9 changed files with 2480 additions and 2070 deletions

View file

@ -14,7 +14,7 @@
#ifndef ZT_CONSTANTS_HPP
#define ZT_CONSTANTS_HPP
#include "../include/ZeroTierOne.h"
#include "../include/ZeroTierCore.h"
#if __has_include("version.h")
#include "version.h"
@ -163,6 +163,17 @@
#endif
#endif
#ifdef SOCKET
#define ZT_SOCKET SOCKET
#else
#define ZT_SOCKET int
#endif
#ifdef INVALID_SOCKET
#define ZT_INVALID_SOCKET INVALID_SOCKET
#else
#define ZT_INVALID_SOCKET -1
#endif
/**
* Length of a ZeroTier address in bytes
*/
@ -452,9 +463,14 @@
* See https://conferences.sigcomm.org/imc/2010/papers/p260.pdf for
* some real world data on NAT UDP timeouts. From the paper: "the
* lowest measured timeout when a binding has seen bidirectional
* traffic is 54 sec." We use 45 to be a bit under this.
* traffic is 54 sec." 30 seconds is faster than really necessary.
*/
#define ZT_PEER_PING_PERIOD 45000
#define ZT_PEER_PING_PERIOD 30000
/**
* Delay between refreshes of locators via DNS or other methods
*/
#define ZT_DYNAMIC_ROOT_UPDATE_PERIOD 120000
/**
* Timeout for overall peer activity (measured from last receive)