From 235f4762b700174c795b28de7d4fe2f70cddbcd8 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 6 Jul 2015 15:51:04 -0700 Subject: Plumbing for local interface addresses -- GitHub issue #180 --- node/Path.hpp | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'node/Path.hpp') diff --git a/node/Path.hpp b/node/Path.hpp index b43b3f6d..80b9a3c0 100644 --- a/node/Path.hpp +++ b/node/Path.hpp @@ -37,28 +37,27 @@ namespace ZeroTier { class Path { public: + // Must be the same values as ZT1_LocalInterfaceAddressTrust in ZeroTierOne.h enum Trust { - TRUST_NORMAL, - TRUST_PRIVACY, - TRUST_ULTIMATE + TRUST_NORMAL = 0, + TRUST_PRIVACY = 1, + TRUST_ULTIMATE = 2 }; Path() : _addr(), _metric(0), _trust(TRUST_NORMAL), - _reliable(false), - _fixed(false) + _reliable(false) { } - Path(const InetAddress &addr,int metric,Trust trust,bool reliable,bool fixed) : + Path(const InetAddress &addr,int metric,Trust trust,bool reliable) : _addr(addr), _metric(metric), _trust(trust), - _reliable(reliable), - _fixed(fixed) + _reliable(reliable) { } @@ -82,11 +81,6 @@ public: */ inline bool reliable() const throw() { return _reliable; } - /** - * @return Is this a fixed path? - */ - inline bool fixed() const throw() { return _fixed; } - /** * @return True if address is non-NULL */ @@ -105,7 +99,6 @@ protected: int _metric; // negative == blacklisted Trust _trust; bool _reliable; - bool _fixed; }; } // namespace ZeroTier -- cgit v1.2.3