Added multipath field to zerotier-cli status output. Adjusted how path estimates are computed and cached
This commit is contained in:
parent
f8005b88ad
commit
17fbb020e7
6 changed files with 169 additions and 47 deletions
|
@ -353,14 +353,18 @@ public:
|
|||
inline int64_t isActive(int64_t now) const { return ((now - _lastNontrivialReceive) < ZT_PEER_ACTIVITY_TIMEOUT); }
|
||||
|
||||
/**
|
||||
* @return Latency in milliseconds of best path or 0xffff if unknown / no paths
|
||||
* @return Latency in milliseconds of best/aggregate path or 0xffff if unknown / no paths
|
||||
*/
|
||||
inline unsigned int latency(const int64_t now)
|
||||
{
|
||||
SharedPtr<Path> bp(getAppropriatePath(now,false));
|
||||
if (bp)
|
||||
return bp->latency();
|
||||
return 0xffff;
|
||||
if (RR->node->getMultipathMode()) {
|
||||
return (int)computeAggregateLinkMeanLatency();
|
||||
} else {
|
||||
SharedPtr<Path> bp(getAppropriatePath(now,false));
|
||||
if (bp)
|
||||
return bp->latency();
|
||||
return 0xffff;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue