MacDNSHelper.hpp 912 B

12345678910111213141516171819202122232425262728293031
  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 MAC_DNS_HELPER
  9. #define MAC_DNS_HELPER
  10. #include "../node/InetAddress.hpp"
  11. #include "../node/MAC.hpp"
  12. #include <vector>
  13. namespace ZeroTier {
  14. class MacDNSHelper {
  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. static bool addIps4(uint64_t nwid, const MAC mac, const char* dev, const std::vector<InetAddress>& addrs);
  19. static bool addIps6(uint64_t nwid, const MAC mac, const char* dev, const std::vector<InetAddress>& addrs);
  20. static bool removeIps4(uint64_t nwid);
  21. static bool removeIps6(uint64_t nwid);
  22. };
  23. } // namespace ZeroTier
  24. #endif