diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-09-04 14:14:32 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-09-04 14:14:32 -0700 |
| commit | 307e44f7c84dccd402e33fec08029d824b46515d (patch) | |
| tree | 82e8c5d4ed4d8b2acb8d0ea122391c0c69c55742 /node/Network.hpp | |
| parent | d1341578d8dc7fd3e39b24dde1ac2dae4da7a632 (diff) | |
| download | infinitytier-307e44f7c84dccd402e33fec08029d824b46515d.tar.gz infinitytier-307e44f7c84dccd402e33fec08029d824b46515d.zip | |
Two for one! (std::map removal)
Diffstat (limited to 'node/Network.hpp')
| -rw-r--r-- | node/Network.hpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/node/Network.hpp b/node/Network.hpp index d8ffd612..7f215555 100644 --- a/node/Network.hpp +++ b/node/Network.hpp @@ -347,6 +347,13 @@ public: inline bool operator>=(const Network &n) const throw() { return (_id >= n._id); } private: + struct _RemoteMemberCertificateInfo + { + _RemoteMemberCertificateInfo() : com(),lastPushed(0) {} + CertificateOfMembership com; // remote member's COM + uint64_t lastPushed; // when did we last push ours to them? + }; + ZT1_VirtualNetworkStatus _status() const; void _externalConfig(ZT1_VirtualNetworkConfig *ec) const; // assumes _lock is locked bool _isAllowed(const Address &peer) const; @@ -361,11 +368,9 @@ private: std::vector< MulticastGroup > _myMulticastGroups; // multicast groups that we belong to (according to tap) Hashtable< MulticastGroup,uint64_t > _multicastGroupsBehindMe; // multicast groups that seem to be behind us and when we last saw them (if we are a bridge) + Hashtable< MAC,Address > _remoteBridgeRoutes; // remote addresses where given MACs are reachable (for tracking devices behind remote bridges) - Hashtable< MAC,Address > _remoteBridgeRoutes; // remote addresses where given MACs are reachable (for remote bridges) - - std::map<Address,CertificateOfMembership> _membershipCertificates; // Other members' certificates of membership - std::map<Address,uint64_t> _lastPushedMembershipCertificate; // When did we last push our certificate to each remote member? + Hashtable< Address,_RemoteMemberCertificateInfo > _certInfo; SharedPtr<NetworkConfig> _config; // Most recent network configuration, which is an immutable value-object volatile uint64_t _lastConfigUpdate; |
