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 "Constants.hpp"
#include "MulticastTopology.hpp"
#include "Multicaster.hpp"
#include "Topology.hpp"
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);
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));
}
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);
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);
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/
*/
#ifndef ZT_MULTICASTTOPOLOGY_HPP
#define ZT_MULTICASTTOPOLOGY_HPP
#ifndef ZT_MULTICASTER_HPP
#define ZT_MULTICASTER_HPP
#include <stdint.h>
#include <string.h>
@ -51,7 +51,7 @@ class Topology;
/**
* Database of known multicast peers within a network
*/
class MulticastTopology
class Multicaster
{
private:
struct MulticastGroupMember
@ -78,8 +78,8 @@ private:
};
public:
MulticastTopology();
~MulticastTopology();
Multicaster();
~Multicaster();
/**
* Add or update a member in a multicast group

View File

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

View File

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