Implement continuous contacting of designated anchors and multicast replicators - GitHub issue #666
This commit is contained in:
parent
f821db29f3
commit
4419734a7d
7 changed files with 88 additions and 80 deletions
|
@ -47,6 +47,7 @@
|
|||
#include "Capability.hpp"
|
||||
#include "Tag.hpp"
|
||||
#include "Dictionary.hpp"
|
||||
#include "Hashtable.hpp"
|
||||
#include "Identity.hpp"
|
||||
#include "Utils.hpp"
|
||||
#include "Trace.hpp"
|
||||
|
@ -317,6 +318,18 @@ public:
|
|||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add addresses that we should attempt to stay connected to to a set
|
||||
*/
|
||||
inline void getAlwaysContactAddresses(Hashtable< Address,std::vector<InetAddress> > &a) const
|
||||
{
|
||||
for(unsigned int i=0;i<specialistCount;++i) {
|
||||
if ((specialists[i] & (ZT_NETWORKCONFIG_SPECIALIST_TYPE_ANCHOR | ZT_NETWORKCONFIG_SPECIALIST_TYPE_MULTICAST_REPLICATOR)) != 0) {
|
||||
a[Address(specialists[i])];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fromPeer Peer attempting to bridge other Ethernet peers onto network
|
||||
* @return True if this network allows bridging
|
||||
|
@ -332,11 +345,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if this network config is non-NULL
|
||||
*/
|
||||
inline operator bool() const { return (networkId != 0); }
|
||||
|
||||
inline bool operator==(const NetworkConfig &nc) const { return (memcmp(this,&nc,sizeof(NetworkConfig)) == 0); }
|
||||
inline bool operator!=(const NetworkConfig &nc) const { return (!(*this == nc)); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue