mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-29 15:43:52 +00:00
Stub out NetworkConfig for GitHub issue #666
This commit is contained in:
parent
055b99c3cb
commit
34e2ad0dfc
@ -93,15 +93,20 @@
|
||||
#define ZT_NETWORKCONFIG_FLAG_DISABLE_COMPRESSION 0x0000000000000010ULL
|
||||
|
||||
/**
|
||||
* Device is an active bridge
|
||||
* Device can bridge to other Ethernet networks and gets unknown recipient multicasts
|
||||
*/
|
||||
#define ZT_NETWORKCONFIG_SPECIALIST_TYPE_ACTIVE_BRIDGE 0x0000020000000000ULL
|
||||
|
||||
/**
|
||||
* Anchors are stable devices on this network that can cache multicast info, etc.
|
||||
* Anchors are stable devices on this network that can act like roots when none are up
|
||||
*/
|
||||
#define ZT_NETWORKCONFIG_SPECIALIST_TYPE_ANCHOR 0x0000040000000000ULL
|
||||
|
||||
/**
|
||||
* Designated multicast replicators replicate multicast in place of sender-side replication
|
||||
*/
|
||||
#define ZT_NETWORKCONFIG_SPECIALIST_TYPE_MULTICAST_REPLICATOR 0x0000080000000000ULL
|
||||
|
||||
namespace ZeroTier {
|
||||
|
||||
// Dictionary capacity needed for max size network config
|
||||
@ -312,16 +317,16 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* @param a Address to check
|
||||
* @return True if address is an anchor
|
||||
* @return ZeroTier addresses of "anchor" devices on this network
|
||||
*/
|
||||
inline bool isAnchor(const Address &a) const
|
||||
inline std::vector<Address> multicastReplicators() const
|
||||
{
|
||||
std::vector<Address> r;
|
||||
for(unsigned int i=0;i<specialistCount;++i) {
|
||||
if ((a == specialists[i])&&((specialists[i] & ZT_NETWORKCONFIG_SPECIALIST_TYPE_ANCHOR) != 0))
|
||||
return true;
|
||||
if ((specialists[i] & ZT_NETWORKCONFIG_SPECIALIST_TYPE_MULTICAST_REPLICATOR) != 0)
|
||||
r.push_back(Address(specialists[i]));
|
||||
}
|
||||
return false;
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user