diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-01-26 20:38:44 -0500 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-01-26 20:38:44 -0500 |
| commit | f03fd5799738699f2410c3961fbd5a08c8b1b568 (patch) | |
| tree | 85e740b49a3301beb8f3722d9cd851ea082f667d /node/NetworkConfig.hpp | |
| parent | e74cd4b4ef013bf211b0ed703b1e2d3ea1fc6dd8 (diff) | |
| download | infinitytier-f03fd5799738699f2410c3961fbd5a08c8b1b568.tar.gz infinitytier-f03fd5799738699f2410c3961fbd5a08c8b1b568.zip | |
Clean up some multicast code.
Diffstat (limited to 'node/NetworkConfig.hpp')
| -rw-r--r-- | node/NetworkConfig.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/node/NetworkConfig.hpp b/node/NetworkConfig.hpp index 00f5d80f..156b8561 100644 --- a/node/NetworkConfig.hpp +++ b/node/NetworkConfig.hpp @@ -292,6 +292,16 @@ public: return r; } + inline unsigned int activeBridges(Address ab[ZT_MAX_NETWORK_SPECIALISTS]) const + { + unsigned int c = 0; + for(unsigned int i=0;i<specialistCount;++i) { + if ((specialists[i] & ZT_NETWORKCONFIG_SPECIALIST_TYPE_ACTIVE_BRIDGE) != 0) + ab[c++] = specialists[i]; + } + return c; + } + inline std::vector<Address> anchors() const { std::vector<Address> r; @@ -322,6 +332,16 @@ public: return r; } + inline unsigned int alwaysContactAddresses(Address ac[ZT_MAX_NETWORK_SPECIALISTS]) const + { + unsigned int c = 0; + for(unsigned int i=0;i<specialistCount;++i) { + if ((specialists[i] & (ZT_NETWORKCONFIG_SPECIALIST_TYPE_ANCHOR | ZT_NETWORKCONFIG_SPECIALIST_TYPE_MULTICAST_REPLICATOR)) != 0) + ac[c++] = specialists[i]; + } + return c; + } + inline void alwaysContactAddresses(Hashtable< Address,std::vector<InetAddress> > &a) const { for(unsigned int i=0;i<specialistCount;++i) { |
