Add basic bond health status reporting (listbonds)

This commit is contained in:
Joseph Henry 2020-07-27 23:01:12 -07:00
parent c92e030a4b
commit 9f4985b11a
6 changed files with 199 additions and 6 deletions

View file

@ -485,6 +485,21 @@ public:
*/
inline uint8_t getPolicy() { return _bondingPolicy; }
/**
* @return the health status of the bond
*/
inline bool isHealthy() { return _isHealthy; }
/**
* @return the number of links comprising this bond which are considered alive
*/
inline uint8_t getNumAliveLinks() { return _numAliveLinks; };
/**
* @return the number of links comprising this bond
*/
inline uint8_t getNumTotalLinks() { return _numTotalLinks; }
/**
*
* @param allowFlowHashing
@ -626,6 +641,10 @@ private:
uint16_t _maxAcceptablePacketDelayVariance;
uint8_t _minAcceptableAllocation;
bool _isHealthy;
uint8_t _numAliveLinks;
uint8_t _numTotalLinks;
/**
* Default initial punishment inflicted on misbehaving paths. Punishment slowly
* drains linearly. For each eligibility change the remaining punishment is doubled.