2
0

WinDNSHelper.hpp 692 B

123456789101112131415161718192021222324252627282930
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at https://mozilla.org/MPL/2.0/.
  4. *
  5. * (c) ZeroTier, Inc.
  6. * https://www.zerotier.com/
  7. */
  8. #ifndef WIN_DNS_HELPER_H_
  9. #define WIN_DNS_HELPER_H_
  10. #include "../node/InetAddress.hpp"
  11. #include <cstdint>
  12. #include <vector>
  13. namespace ZeroTier {
  14. class WinDNSHelper {
  15. public:
  16. static void setDNS(uint64_t nwid, const char* domain, const std::vector<InetAddress>& servers);
  17. static void removeDNS(uint64_t nwid);
  18. private:
  19. static std::pair<bool, std::string> hasDNSConfig(uint64_t nwid);
  20. };
  21. } // namespace ZeroTier
  22. #endif