summaryrefslogtreecommitdiff
path: root/node/Network.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/Network.hpp')
-rw-r--r--node/Network.hpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/node/Network.hpp b/node/Network.hpp
index a24f161c..33c3226c 100644
--- a/node/Network.hpp
+++ b/node/Network.hpp
@@ -159,7 +159,7 @@ public:
inline std::set<MulticastGroup> multicastGroups() const
{
Mutex::Lock _l(_lock);
- return _multicastGroups;
+ return _myMulticastGroups;
}
/**
@@ -378,8 +378,8 @@ public:
inline Address findBridgeTo(const MAC &mac) const
{
Mutex::Lock _l(_lock);
- std::map<MAC,Address>::const_iterator br(_bridgeRoutes.find(mac));
- if (br == _bridgeRoutes.end())
+ std::map<MAC,Address>::const_iterator br(_remoteBridgeRoutes.find(mac));
+ if (br == _remoteBridgeRoutes.end())
return Address();
return br->second;
}
@@ -401,7 +401,7 @@ public:
inline void learnBridgedMulticastGroup(const MulticastGroup &mg,uint64_t now)
{
Mutex::Lock _l(_lock);
- _bridgedMulticastGroups[mg] = now;
+ _multicastGroupsBehindMe[mg] = now;
}
/**
@@ -445,16 +445,20 @@ private:
EthernetTap *volatile _tap; // tap device or NULL if not initialized yet
volatile bool _enabled;
- std::set<MulticastGroup> _multicastGroups;
- std::map< std::pair<Address,MulticastGroup>,BandwidthAccount > _multicastRateAccounts;
+ std::set<MulticastGroup> _myMulticastGroups; // multicast groups that we belong to including those behind us (updated periodically)
+ std::map<MulticastGroup,uint64_t> _multicastGroupsBehindMe; // multicast groups bridged to us and when we last saw activity on each
+
+ std::map<MAC,Address> _remoteBridgeRoutes; // remote addresses where given MACs are reachable
- std::map<Address,CertificateOfMembership> _membershipCertificates;
- std::map<Address,uint64_t> _lastPushedMembershipCertificate;
+ // Deprecated, but will be kept around until P5_MULTICAST_FRAME is gone -- but the
+ // entry for us is still used by both. Eventually there will only be one BandwidthAccount,
+ // namely ours.
+ std::map< std::pair<Address,MulticastGroup>,BandwidthAccount > _multicastRateAccounts;
- std::map<MAC,Address> _bridgeRoutes; // remote addresses where given MACs are reachable
- std::map<MulticastGroup,uint64_t> _bridgedMulticastGroups; // multicast groups of interest on our side of the bridge
+ 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?
- SharedPtr<NetworkConfig> _config;
+ SharedPtr<NetworkConfig> _config; // Most recent network configuration, which is an immutable value-object
volatile uint64_t _lastConfigUpdate;
volatile bool _destroyed;