From 91c8e82c428cea9d9e0a6911fbd1820212871ad8 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Wed, 2 May 2018 15:24:14 -0700 Subject: Adjusted locking order of _paths_m for path pruning. Other minor multipath changes --- node/Path.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'node/Path.hpp') diff --git a/node/Path.hpp b/node/Path.hpp index 7ce6e0f1..e6bcecf0 100644 --- a/node/Path.hpp +++ b/node/Path.hpp @@ -432,6 +432,22 @@ public: } } + /** + * @param buf Buffer to store resultant string + * @return Description of path, in ASCII string format + */ + inline char *toString(char *buf) { + sprintf(buf,"%6s, q=%8.3f, %5.3f Mb/s, j=%8.2f, ml=%8.2f, meanAge=%8.2f, addr=%45s", + getName(), + lastComputedQuality(), + (float)meanThroughput() / (float)1000000, + jitter(), + meanLatency(), + meanAge(), + getAddressString()); + return buf; + } + /** * Record whether a packet is considered invalid by MAC/compression/cipher checks. This * could be an indication of a bit error. This function will keep a running counter of -- cgit v1.2.3