summaryrefslogtreecommitdiff
path: root/node/NetworkConfig.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-06-23 22:41:14 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-06-23 22:41:14 -0700
commit38dfebad8c285b0037a69c4577e7daeb38040d45 (patch)
tree3bbec0417d860e6e762c1b3a1311db9daeddc01c /node/NetworkConfig.hpp
parenta5a05e454ea5beea0ba690f1d45c3bde184a9142 (diff)
downloadinfinitytier-38dfebad8c285b0037a69c4577e7daeb38040d45.tar.gz
infinitytier-38dfebad8c285b0037a69c4577e7daeb38040d45.zip
IPv6 NDP emulation flag in NetworkConfig, and implement Docker-friendly
(and other host friendly) IPv6 /80 magic subnetting to allow massive multicast-free NDP emulated IPv6 networks where each host can have a /48 worth of IPv6 IPs for internal containers, VMs, etc. Alan Kay, thou art avenged. https://ivanovivan.wordpress.com/2010/09/13/alan-kay-quotes/
Diffstat (limited to 'node/NetworkConfig.hpp')
-rw-r--r--node/NetworkConfig.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/node/NetworkConfig.hpp b/node/NetworkConfig.hpp
index c137a2a5..117b18d2 100644
--- a/node/NetworkConfig.hpp
+++ b/node/NetworkConfig.hpp
@@ -48,6 +48,11 @@
#define ZT_NETWORKCONFIG_FLAG_ENABLE_BROADCAST 0x0000000000000002ULL
/**
+ * Flag: enable IPv6 NDP emulation for certain V6 address patterns
+ */
+#define ZT_NETWORKCONFIG_FLAG_ENABLE_IPV6_NDP_EMULATION 0x0000000000000004ULL
+
+/**
* Device is a network preferred relay
*/
#define ZT_NETWORKCONFIG_SPECIALIST_TYPE_NETWORK_PREFERRED_RELAY 0x0000010000000000ULL
@@ -258,6 +263,11 @@ public:
inline bool enableBroadcast() const throw() { return ((this->flags & ZT_NETWORKCONFIG_FLAG_ENABLE_BROADCAST) != 0); }
/**
+ * @return True if IPv6 NDP emulation should be allowed for certain "magic" IPv6 address patterns
+ */
+ inline bool ndpEmulation() const throw() { return ((this->flags & ZT_NETWORKCONFIG_FLAG_ENABLE_IPV6_NDP_EMULATION) != 0); }
+
+ /**
* @return Network type is public (no access control)
*/
inline bool isPublic() const throw() { return (this->type == ZT_NETWORK_TYPE_PUBLIC); }