Rename MulticastTopology to Multicaster -- same name as old multicast controller but different code. More descriptive though.

This commit is contained in:
Adam Ierymenko 2014-09-24 14:02:16 -07:00
parent 81b12b6826
commit 6c87f9f765
4 changed files with 17 additions and 17 deletions

View file

@ -28,24 +28,24 @@
#include <algorithm> #include <algorithm>
#include "Constants.hpp" #include "Constants.hpp"
#include "MulticastTopology.hpp" #include "Multicaster.hpp"
#include "Topology.hpp" #include "Topology.hpp"
namespace ZeroTier { namespace ZeroTier {
MulticastTopology::MulticastTopology() Multicaster::Multicaster()
{ {
} }
MulticastTopology::~MulticastTopology() Multicaster::~Multicaster()
{ {
} }
void MulticastTopology::add(const MulticastGroup &mg,const Address &learnedFrom,const Address &member) void Multicaster::add(const MulticastGroup &mg,const Address &learnedFrom,const Address &member)
{ {
} }
void MulticastTopology::erase(const MulticastGroup &mg,const Address &member) void Multicaster::erase(const MulticastGroup &mg,const Address &member)
{ {
Mutex::Lock _l(_groups_m); Mutex::Lock _l(_groups_m);
std::map< MulticastGroup,MulticastGroupStatus >::iterator r(_groups.find(mg)); std::map< MulticastGroup,MulticastGroupStatus >::iterator r(_groups.find(mg));
@ -67,7 +67,7 @@ void send(uint64_t nwid,uint64_t now,const Address &self,const MulticastGroup &m
std::map< MulticastGroup,MulticastGroupStatus >::iterator r(_groups.find(mg)); std::map< MulticastGroup,MulticastGroupStatus >::iterator r(_groups.find(mg));
} }
unsigned int MulticastTopology::shouldGather(const MulticastGroup &mg,uint64_t now,unsigned int limit,bool updateLastGatheredTimeOnNonzeroReturn) unsigned int Multicaster::shouldGather(const MulticastGroup &mg,uint64_t now,unsigned int limit,bool updateLastGatheredTimeOnNonzeroReturn)
{ {
Mutex::Lock _l(_groups_m); Mutex::Lock _l(_groups_m);
MulticastGroupStatus &gs = _groups[mg]; MulticastGroupStatus &gs = _groups[mg];
@ -86,7 +86,7 @@ unsigned int MulticastTopology::shouldGather(const MulticastGroup &mg,uint64_t n
} }
} }
void MulticastTopology::clean(uint64_t now,const Topology &topology) void Multicaster::clean(uint64_t now,const Topology &topology)
{ {
Mutex::Lock _l(_groups_m); Mutex::Lock _l(_groups_m);
for(std::map< MulticastGroup,MulticastGroupStatus >::iterator mm(_groups.begin());mm!=_groups.end();) { for(std::map< MulticastGroup,MulticastGroupStatus >::iterator mm(_groups.begin());mm!=_groups.end();) {

View file

@ -25,8 +25,8 @@
* LLC. Start here: http://www.zerotier.com/ * LLC. Start here: http://www.zerotier.com/
*/ */
#ifndef ZT_MULTICASTTOPOLOGY_HPP #ifndef ZT_MULTICASTER_HPP
#define ZT_MULTICASTTOPOLOGY_HPP #define ZT_MULTICASTER_HPP
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
@ -51,7 +51,7 @@ class Topology;
/** /**
* Database of known multicast peers within a network * Database of known multicast peers within a network
*/ */
class MulticastTopology class Multicaster
{ {
private: private:
struct MulticastGroupMember struct MulticastGroupMember
@ -78,8 +78,8 @@ private:
}; };
public: public:
MulticastTopology(); Multicaster();
~MulticastTopology(); ~Multicaster();
/** /**
* Add or update a member in a multicast group * Add or update a member in a multicast group

View file

@ -51,7 +51,7 @@
#include "Identity.hpp" #include "Identity.hpp"
#include "InetAddress.hpp" #include "InetAddress.hpp"
#include "BandwidthAccount.hpp" #include "BandwidthAccount.hpp"
#include "MulticastTopology.hpp" #include "Multicaster.hpp"
#include "NetworkConfig.hpp" #include "NetworkConfig.hpp"
#include "CertificateOfMembership.hpp" #include "CertificateOfMembership.hpp"
#include "Thread.hpp" #include "Thread.hpp"
@ -416,8 +416,8 @@ public:
/** /**
* @return Multicast topology for this network * @return Multicast topology for this network
*/ */
inline MulticastTopology &mcTopology() { return _multicastTopology; } inline Multicaster &mc() { return _multicaster; }
inline const MulticastTopology &mcTopology() const { return _multicastTopology; } inline const Multicaster &mc() const { return _multicaster; }
/** /**
* Destroy this network * Destroy this network
@ -453,7 +453,7 @@ private:
std::set< MulticastGroup > _myMulticastGroups; // multicast groups that we belong to including those behind us (updated periodically) 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< MulticastGroup,uint64_t > _multicastGroupsBehindMe; // multicast groups bridged to us and when we last saw activity on each
std::map< MulticastGroup,BandwidthAccount > _multicastRateAccounts; std::map< MulticastGroup,BandwidthAccount > _multicastRateAccounts;
MulticastTopology _multicastTopology; Multicaster _multicaster;
std::map<MAC,Address> _remoteBridgeRoutes; // remote addresses where given MACs are reachable std::map<MAC,Address> _remoteBridgeRoutes; // remote addresses where given MACs are reachable

View file

@ -13,7 +13,7 @@ OBJS=\
node/IncomingPacket.o \ node/IncomingPacket.o \
node/InetAddress.o \ node/InetAddress.o \
node/Logger.o \ node/Logger.o \
node/MulticastTopology.o \ node/Multicaster.o \
node/Network.o \ node/Network.o \
node/NetworkConfig.o \ node/NetworkConfig.o \
node/Node.o \ node/Node.o \