esp_openthread_dns64.h 951 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #include "esp_openthread.h"
  8. #include "lwip/netdb.h"
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. /**
  13. * @brief This function acquires the NAT64 prefix in the Thread network.
  14. *
  15. * @param[out] nat64_prefix The NAT64 prefix output.
  16. *
  17. * @return
  18. * - ESP_OK on success
  19. * - ESP_ERR_NOT_FOUND if NAT64 prefix available
  20. *
  21. */
  22. esp_err_t esp_openthread_get_nat64_prefix(ip6_addr_t *nat64_prefix);
  23. /**
  24. * @brief The alternative function for gethostbyname and adds the NAT64 prefix.
  25. *
  26. */
  27. struct hostent *esp_openthread_gethostbyname_dns64(const char *name);
  28. /**
  29. * @brief The alternative function for getaddrinfo and adds the NAT64 prefix.
  30. *
  31. */
  32. int esp_openthread_getaddrinfo_dns64(const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res);
  33. #ifdef __cplusplus
  34. }
  35. #endif