diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-03-01 14:36:52 -0800 | 
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-03-01 14:36:52 -0800 | 
| commit | 1d39be61b267a85adebeee9e979bd1d84f55da3c (patch) | |
| tree | 2fa5efbe2406a9a60686c1de422ff2c574802ba5 /one.cpp | |
| parent | 2bf9145ae65385bf968542619ffcf204cf6241d8 (diff) | |
| download | infinitytier-1d39be61b267a85adebeee9e979bd1d84f55da3c.tar.gz infinitytier-1d39be61b267a85adebeee9e979bd1d84f55da3c.zip | |
ZeroTier now has link quality measurement. We are not using this yet but decided to put it in to prep for future QoS support and SD-WAN stuff.
Diffstat (limited to 'one.cpp')
| -rw-r--r-- | one.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
| @@ -355,7 +355,8 @@ static int cli(int argc,char **argv)  									char tmp[256];  									std::string addr = path["address"];  									const uint64_t now = OSUtils::now(); -									Utils::snprintf(tmp,sizeof(tmp),"%s;%llu;%llu",addr.c_str(),now - (uint64_t)path["lastSend"],now - (uint64_t)path["lastReceive"]); +									const double lq = (path.count("linkQuality")) ? (double)path["linkQuality"] : -1.0; +									Utils::snprintf(tmp,sizeof(tmp),"%s;%llu;%llu;%1.2f",addr.c_str(),now - (uint64_t)path["lastSend"],now - (uint64_t)path["lastReceive"],lq);  									bestPath = tmp;  									break;  								} | 
