summaryrefslogtreecommitdiff
path: root/node/Peer.hpp
diff options
context:
space:
mode:
authorGrant Limberg <grant.limberg@zerotier.com>2016-11-18 14:00:25 -0800
committerGrant Limberg <grant.limberg@zerotier.com>2016-11-18 14:00:25 -0800
commit2231e878d5470d86f4c6543cc708dc78661da462 (patch)
tree0bcd8215684b0091d7bd8856f75b4e433edef71e /node/Peer.hpp
parent299a7cab200c0af4743ab36d41994fd7a582f900 (diff)
parent673c0c811ea443c217b3a4ca17eeaed3ab596501 (diff)
downloadinfinitytier-2231e878d5470d86f4c6543cc708dc78661da462.tar.gz
infinitytier-2231e878d5470d86f4c6543cc708dc78661da462.zip
Merge branch 'dev' into systemtray
Diffstat (limited to 'node/Peer.hpp')
-rw-r--r--node/Peer.hpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/node/Peer.hpp b/node/Peer.hpp
index be05aa3a..a7240cb4 100644
--- a/node/Peer.hpp
+++ b/node/Peer.hpp
@@ -403,26 +403,6 @@ public:
return false;
}
- /**
- * Find a common set of addresses by which two peers can link, if any
- *
- * @param a Peer A
- * @param b Peer B
- * @param now Current time
- * @return Pair: B's address (to send to A), A's address (to send to B)
- */
- static inline std::pair<InetAddress,InetAddress> findCommonGround(const Peer &a,const Peer &b,uint64_t now)
- {
- std::pair<InetAddress,InetAddress> v4,v6;
- b.getBestActiveAddresses(now,v4.first,v6.first);
- a.getBestActiveAddresses(now,v4.second,v6.second);
- if ((v6.first)&&(v6.second)) // prefer IPv6 if both have it since NAT-t is (almost) unnecessary
- return v6;
- else if ((v4.first)&&(v4.second))
- return v4;
- else return std::pair<InetAddress,InetAddress>();
- }
-
private:
inline uint64_t _pathScore(const unsigned int p,const uint64_t now) const
{