summaryrefslogtreecommitdiff
path: root/node/Network.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-07-31 14:09:32 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-07-31 14:09:32 -0700
commitb80c229d873ca51bf679ff9df90c8360dca5d0d7 (patch)
treee5c4342b78dcb83f6c9312fff42d073e1f134ae3 /node/Network.hpp
parent9b93141dd0f39af70a867231ce8ba7cb34cd23e6 (diff)
downloadinfinitytier-b80c229d873ca51bf679ff9df90c8360dca5d0d7.tar.gz
infinitytier-b80c229d873ca51bf679ff9df90c8360dca5d0d7.zip
Tons of code cleanup, refactor Network to use EthernetTapFactory, probably also fix GitHub issue #90
Diffstat (limited to 'node/Network.hpp')
-rw-r--r--node/Network.hpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/node/Network.hpp b/node/Network.hpp
index 03b011f3..1d62bdf1 100644
--- a/node/Network.hpp
+++ b/node/Network.hpp
@@ -426,6 +426,14 @@ private:
void _restoreState();
void _dumpMulticastCerts();
+ inline void _mkNetworkFriendlyName(char *buf,unsigned int len)
+ {
+ // assumes _lock is locked
+ if (_config)
+ Utils::snprintf(buf,len,"ZeroTier One [%s]",_config->name().c_str());
+ else Utils::snprintf(buf,len,"ZeroTier One [%.16llx]",(unsigned long long)_id);
+ }
+
uint64_t _id;
NodeConfig *_nc; // parent NodeConfig object
MAC _mac; // local MAC address
@@ -439,8 +447,8 @@ private:
std::map<Address,CertificateOfMembership> _membershipCertificates;
std::map<Address,uint64_t> _lastPushedMembershipCertificate;
- std::map<MAC,Address> _bridgeRoutes;
- std::map<MulticastGroup,uint64_t> _bridgedMulticastGroups;
+ std::map<MAC,Address> _bridgeRoutes; // remote addresses where given MACs are reachable
+ std::map<MulticastGroup,uint64_t> _bridgedMulticastGroups; // multicast groups of interest on our side of the bridge
SharedPtr<NetworkConfig> _config;
volatile uint64_t _lastConfigUpdate;