diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-01-24 14:43:04 -0500 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-01-24 14:43:04 -0500 |
commit | 34e2ad0dfc3207252cd27c865a4eff0d6b8388b0 (patch) | |
tree | 866d1224c952d025b097e557a84cc6e0224993ad | |
parent | 055b99c3cb5181857a114850950c670eee106b46 (diff) | |
download | infinitytier-34e2ad0dfc3207252cd27c865a4eff0d6b8388b0.tar.gz infinitytier-34e2ad0dfc3207252cd27c865a4eff0d6b8388b0.zip |
Stub out NetworkConfig for GitHub issue #666
-rw-r--r-- | node/NetworkConfig.hpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/node/NetworkConfig.hpp b/node/NetworkConfig.hpp index 4f343206..b6764107 100644 --- a/node/NetworkConfig.hpp +++ b/node/NetworkConfig.hpp @@ -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; } /** |