Pass 1 at adding DNS to controller
This commit is contained in:
parent
8eb453e042
commit
387039456d
5 changed files with 164 additions and 1 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "Constants.hpp"
|
||||
#include "Buffer.hpp"
|
||||
#include "DNS.hpp"
|
||||
#include "InetAddress.hpp"
|
||||
#include "MulticastGroup.hpp"
|
||||
#include "Address.hpp"
|
||||
|
@ -175,6 +176,8 @@ namespace ZeroTier {
|
|||
#define ZT_NETWORKCONFIG_DICT_KEY_TAGS "TAG"
|
||||
// tags (binary blobs)
|
||||
#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
|
||||
|
||||
|
@ -229,13 +232,15 @@ public:
|
|||
capabilities(),
|
||||
tags(),
|
||||
certificatesOfOwnership(),
|
||||
type(ZT_NETWORK_TYPE_PRIVATE)
|
||||
type(ZT_NETWORK_TYPE_PRIVATE),
|
||||
dnsCount(0)
|
||||
{
|
||||
name[0] = 0;
|
||||
memset(specialists, 0, sizeof(uint64_t)*ZT_MAX_NETWORK_SPECIALISTS);
|
||||
memset(routes, 0, sizeof(ZT_VirtualNetworkRoute)*ZT_MAX_NETWORK_ROUTES);
|
||||
memset(staticIps, 0, sizeof(InetAddress)*ZT_MAX_ZT_ASSIGNED_ADDRESSES);
|
||||
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)
|
||||
*/
|
||||
CertificateOfMembership com;
|
||||
|
||||
/**
|
||||
* Number of ZT-pushed DNS configurations
|
||||
*/
|
||||
unsigned int dnsCount;
|
||||
|
||||
/**
|
||||
* ZT pushed DNS configuration
|
||||
*/
|
||||
ZT_VirtualNetworkDNS dns[ZT_MAX_NETWORK_DNS];
|
||||
};
|
||||
|
||||
} // namespace ZeroTier
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue