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.
This commit is contained in:
parent
2bf9145ae6
commit
1d39be61b2
9 changed files with 111 additions and 22 deletions
3
one.cpp
3
one.cpp
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue