summaryrefslogtreecommitdiff
path: root/node/Path.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-07-06 15:51:04 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-07-06 15:51:04 -0700
commit235f4762b700174c795b28de7d4fe2f70cddbcd8 (patch)
tree2acca7f20487cf20eac76466debdfa60424128da /node/Path.hpp
parent79e9a8bcc26491a43577082ec7edb86020f7ec00 (diff)
downloadinfinitytier-235f4762b700174c795b28de7d4fe2f70cddbcd8.tar.gz
infinitytier-235f4762b700174c795b28de7d4fe2f70cddbcd8.zip
Plumbing for local interface addresses -- GitHub issue #180
Diffstat (limited to 'node/Path.hpp')
-rw-r--r--node/Path.hpp21
1 files changed, 7 insertions, 14 deletions
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)
{
}
@@ -83,11 +82,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
*/
inline operator bool() const throw() { return (_addr); }
@@ -105,7 +99,6 @@ protected:
int _metric; // negative == blacklisted
Trust _trust;
bool _reliable;
- bool _fixed;
};
} // namespace ZeroTier