mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 20:13:44 +02:00
cleanup
This commit is contained in:
parent
34e2ad0dfc
commit
6c64f1816d
1 changed files with 5 additions and 17 deletions
|
@ -227,21 +227,9 @@ namespace ZeroTier {
|
||||||
class NetworkConfig
|
class NetworkConfig
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NetworkConfig()
|
NetworkConfig() { memset(this,0,sizeof(NetworkConfig)); }
|
||||||
{
|
NetworkConfig(const NetworkConfig &nc) { ZT_FAST_MEMCPY(this,&nc,sizeof(NetworkConfig)); }
|
||||||
memset(this,0,sizeof(NetworkConfig));
|
inline NetworkConfig &operator=(const NetworkConfig &nc) { ZT_FAST_MEMCPY(this,&nc,sizeof(NetworkConfig)); return *this; }
|
||||||
}
|
|
||||||
|
|
||||||
NetworkConfig(const NetworkConfig &nc)
|
|
||||||
{
|
|
||||||
ZT_FAST_MEMCPY(this,&nc,sizeof(NetworkConfig));
|
|
||||||
}
|
|
||||||
|
|
||||||
inline NetworkConfig &operator=(const NetworkConfig &nc)
|
|
||||||
{
|
|
||||||
ZT_FAST_MEMCPY(this,&nc,sizeof(NetworkConfig));
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write this network config to a dictionary for transport
|
* Write this network config to a dictionary for transport
|
||||||
|
@ -317,13 +305,13 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return ZeroTier addresses of "anchor" devices on this network
|
* @return ZeroTier addresses of anchors that are also multicast replicators
|
||||||
*/
|
*/
|
||||||
inline std::vector<Address> multicastReplicators() const
|
inline std::vector<Address> multicastReplicators() const
|
||||||
{
|
{
|
||||||
std::vector<Address> r;
|
std::vector<Address> r;
|
||||||
for(unsigned int i=0;i<specialistCount;++i) {
|
for(unsigned int i=0;i<specialistCount;++i) {
|
||||||
if ((specialists[i] & ZT_NETWORKCONFIG_SPECIALIST_TYPE_MULTICAST_REPLICATOR) != 0)
|
if (((specialists[i] & ZT_NETWORKCONFIG_SPECIALIST_TYPE_ANCHOR) != 0)&&((specialists[i] & ZT_NETWORKCONFIG_SPECIALIST_TYPE_MULTICAST_REPLICATOR) != 0))
|
||||||
r.push_back(Address(specialists[i]));
|
r.push_back(Address(specialists[i]));
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
|
|
Loading…
Add table
Reference in a new issue