|
@@ -26,6 +26,7 @@
|
|
|
|
|
|
#include "Constants.hpp"
|
|
#include "Constants.hpp"
|
|
#include "Buffer.hpp"
|
|
#include "Buffer.hpp"
|
|
|
|
+#include "DNS.hpp"
|
|
#include "InetAddress.hpp"
|
|
#include "InetAddress.hpp"
|
|
#include "MulticastGroup.hpp"
|
|
#include "MulticastGroup.hpp"
|
|
#include "Address.hpp"
|
|
#include "Address.hpp"
|
|
@@ -175,6 +176,8 @@ namespace ZeroTier {
|
|
#define ZT_NETWORKCONFIG_DICT_KEY_TAGS "TAG"
|
|
#define ZT_NETWORKCONFIG_DICT_KEY_TAGS "TAG"
|
|
// tags (binary blobs)
|
|
// tags (binary blobs)
|
|
#define ZT_NETWORKCONFIG_DICT_KEY_CERTIFICATES_OF_OWNERSHIP "COO"
|
|
#define ZT_NETWORKCONFIG_DICT_KEY_CERTIFICATES_OF_OWNERSHIP "COO"
|
|
|
|
+// dns (binary blobs)
|
|
|
|
+#define ZT_NETWORKCONFIG_DICT_KEY_DNS "DNS"
|
|
|
|
|
|
// Legacy fields -- these are obsoleted but are included when older clients query
|
|
// Legacy fields -- these are obsoleted but are included when older clients query
|
|
|
|
|
|
@@ -229,13 +232,15 @@ public:
|
|
capabilities(),
|
|
capabilities(),
|
|
tags(),
|
|
tags(),
|
|
certificatesOfOwnership(),
|
|
certificatesOfOwnership(),
|
|
- type(ZT_NETWORK_TYPE_PRIVATE)
|
|
|
|
|
|
+ type(ZT_NETWORK_TYPE_PRIVATE),
|
|
|
|
+ dnsCount(0)
|
|
{
|
|
{
|
|
name[0] = 0;
|
|
name[0] = 0;
|
|
memset(specialists, 0, sizeof(uint64_t)*ZT_MAX_NETWORK_SPECIALISTS);
|
|
memset(specialists, 0, sizeof(uint64_t)*ZT_MAX_NETWORK_SPECIALISTS);
|
|
memset(routes, 0, sizeof(ZT_VirtualNetworkRoute)*ZT_MAX_NETWORK_ROUTES);
|
|
memset(routes, 0, sizeof(ZT_VirtualNetworkRoute)*ZT_MAX_NETWORK_ROUTES);
|
|
memset(staticIps, 0, sizeof(InetAddress)*ZT_MAX_ZT_ASSIGNED_ADDRESSES);
|
|
memset(staticIps, 0, sizeof(InetAddress)*ZT_MAX_ZT_ASSIGNED_ADDRESSES);
|
|
memset(rules, 0, sizeof(ZT_VirtualNetworkRule)*ZT_MAX_NETWORK_RULES);
|
|
memset(rules, 0, sizeof(ZT_VirtualNetworkRule)*ZT_MAX_NETWORK_RULES);
|
|
|
|
+ memset(dns, 0, sizeof(ZT_VirtualNetworkDNS)*ZT_MAX_NETWORK_DNS);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -589,6 +594,16 @@ public:
|
|
* Certificate of membership (for private networks)
|
|
* Certificate of membership (for private networks)
|
|
*/
|
|
*/
|
|
CertificateOfMembership com;
|
|
CertificateOfMembership com;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Number of ZT-pushed DNS configurations
|
|
|
|
+ */
|
|
|
|
+ unsigned int dnsCount;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * ZT pushed DNS configuration
|
|
|
|
+ */
|
|
|
|
+ ZT_VirtualNetworkDNS dns[ZT_MAX_NETWORK_DNS];
|
|
};
|
|
};
|
|
|
|
|
|
} // namespace ZeroTier
|
|
} // namespace ZeroTier
|