summaryrefslogtreecommitdiff
path: root/node/RemotePath.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/RemotePath.hpp')
-rw-r--r--node/RemotePath.hpp26
1 files changed, 4 insertions, 22 deletions
diff --git a/node/RemotePath.hpp b/node/RemotePath.hpp
index d2f99997..8b37621a 100644
--- a/node/RemotePath.hpp
+++ b/node/RemotePath.hpp
@@ -39,8 +39,6 @@
#include "AntiRecursion.hpp"
#include "RuntimeEnvironment.hpp"
-#define ZT_REMOTEPATH_FLAG_FIXED 0x0001
-
namespace ZeroTier {
/**
@@ -58,12 +56,12 @@ public:
_localAddress(),
_flags(0) {}
- RemotePath(const InetAddress &localAddress,const InetAddress &addr,bool fixed) :
+ RemotePath(const InetAddress &localAddress,const InetAddress &addr) :
Path(addr,0,TRUST_NORMAL),
_lastSend(0),
_lastReceived(0),
_localAddress(localAddress),
- _flags(fixed ? ZT_REMOTEPATH_FLAG_FIXED : 0) {}
+ _flags(0) {}
inline const InetAddress &localAddress() const throw() { return _localAddress; }
@@ -71,22 +69,6 @@ public:
inline uint64_t lastReceived() const throw() { return _lastReceived; }
/**
- * @return Is this a fixed path?
- */
- inline bool fixed() const throw() { return ((_flags & ZT_REMOTEPATH_FLAG_FIXED) != 0); }
-
- /**
- * @param f New value of fixed flag
- */
- inline void setFixed(const bool f)
- throw()
- {
- if (f)
- _flags |= ZT_REMOTEPATH_FLAG_FIXED;
- else _flags &= ~ZT_REMOTEPATH_FLAG_FIXED;
- }
-
- /**
* Called when a packet is sent to this remote path
*
* This is called automatically by RemotePath::send().
@@ -112,12 +94,12 @@ public:
/**
* @param now Current time
- * @return True if this path is fixed or has received data in last ACTIVITY_TIMEOUT ms
+ * @return True if this path appears active
*/
inline bool active(uint64_t now) const
throw()
{
- return ( ((_flags & ZT_REMOTEPATH_FLAG_FIXED) != 0) || ((now - _lastReceived) < ZT_PEER_ACTIVITY_TIMEOUT) );
+ return ((now - _lastReceived) < ZT_PEER_ACTIVITY_TIMEOUT);
}
/**