diff options
| author | Grant Limberg <glimberg@gmail.com> | 2015-10-26 18:10:27 -0700 |
|---|---|---|
| committer | Grant Limberg <glimberg@gmail.com> | 2015-10-26 18:10:27 -0700 |
| commit | 352b83252fb2617a15cde0927cc30110b729e46d (patch) | |
| tree | 38569e4f6c1c162cdaabf7ac8c9d6b7917d71ffd /node/SelfAwareness.hpp | |
| parent | a0c3083af0821db0303c62dfae9ebc560c3c147a (diff) | |
| parent | 6625d7929654803f99b7a69f56a400046314acac (diff) | |
| download | infinitytier-352b83252fb2617a15cde0927cc30110b729e46d.tar.gz infinitytier-352b83252fb2617a15cde0927cc30110b729e46d.zip | |
Merge branch 'adamierymenko-dev' into windows-ui
Diffstat (limited to 'node/SelfAwareness.hpp')
| -rw-r--r-- | node/SelfAwareness.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/node/SelfAwareness.hpp b/node/SelfAwareness.hpp index 3133553e..400b05e6 100644 --- a/node/SelfAwareness.hpp +++ b/node/SelfAwareness.hpp @@ -69,14 +69,14 @@ private: struct PhySurfaceKey { Address reporter; + InetAddress reporterPhysicalAddress; InetAddress::IpScope scope; - inline unsigned long hashCode() const throw() { return ((unsigned long)reporter.toInt() + (unsigned long)scope); } - PhySurfaceKey() : reporter(),scope(InetAddress::IP_SCOPE_NONE) {} - PhySurfaceKey(const Address &r,InetAddress::IpScope s) : reporter(r),scope(s) {} - inline bool operator<(const PhySurfaceKey &k) const throw() { return ((reporter < k.reporter) ? true : ((reporter == k.reporter) ? ((int)scope < (int)k.scope) : false)); } - inline bool operator==(const PhySurfaceKey &k) const throw() { return ((reporter == k.reporter)&&(scope == k.scope)); } + PhySurfaceKey(const Address &r,const InetAddress &ra,InetAddress::IpScope s) : reporter(r),reporterPhysicalAddress(ra),scope(s) {} + + inline unsigned long hashCode() const throw() { return ((unsigned long)reporter.toInt() + (unsigned long)scope); } + inline bool operator==(const PhySurfaceKey &k) const throw() { return ((reporter == k.reporter)&&(reporterPhysicalAddress == k.reporterPhysicalAddress)&&(scope == k.scope)); } }; struct PhySurfaceEntry { |
