summaryrefslogtreecommitdiff
path: root/node/Path.hpp
diff options
context:
space:
mode:
authorJoseph Henry <josephjah@gmail.com>2018-05-02 15:24:14 -0700
committerJoseph Henry <josephjah@gmail.com>2018-05-02 15:24:14 -0700
commit91c8e82c428cea9d9e0a6911fbd1820212871ad8 (patch)
tree29d6d512e1a2ae8621820af0e83a86c64e38f085 /node/Path.hpp
parent1debe2292d85e2d377064f74246244ac607046bf (diff)
downloadinfinitytier-91c8e82c428cea9d9e0a6911fbd1820212871ad8.tar.gz
infinitytier-91c8e82c428cea9d9e0a6911fbd1820212871ad8.zip
Adjusted locking order of _paths_m for path pruning. Other minor multipath changes
Diffstat (limited to 'node/Path.hpp')
-rw-r--r--node/Path.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/node/Path.hpp b/node/Path.hpp
index 7ce6e0f1..e6bcecf0 100644
--- a/node/Path.hpp
+++ b/node/Path.hpp
@@ -433,6 +433,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
* up to a given window size and with each counter overflow it will compute a mean error rate