CURLOPT_DNS_LOCAL_IP6.3 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. .\" generated by cd2nroff 0.1 from CURLOPT_DNS_LOCAL_IP6.md
  2. .TH CURLOPT_DNS_LOCAL_IP6 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_DNS_LOCAL_IP6 \- IPv6 address to bind DNS resolves to
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_LOCAL_IP6, char *address);
  9. .fi
  10. .SH DESCRIPTION
  11. Set the local IPv6 \fIaddress\fP that the resolver should bind to. The argument
  12. should be of type char * and contain a single IPv6 address as a string. Set
  13. this option to NULL to use the default setting (do not bind to a specific IP
  14. address).
  15. The application does not have to keep the string around after setting this
  16. option.
  17. .SH DEFAULT
  18. NULL
  19. .SH PROTOCOLS
  20. This functionality affects all supported protocols
  21. .SH EXAMPLE
  22. .nf
  23. int main(void)
  24. {
  25. CURL *curl = curl_easy_init();
  26. if(curl) {
  27. CURLcode res;
  28. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
  29. curl_easy_setopt(curl, CURLOPT_DNS_LOCAL_IP6, "fe80::a9ff:fe46:b619");
  30. res = curl_easy_perform(curl);
  31. curl_easy_cleanup(curl);
  32. }
  33. }
  34. .fi
  35. .SH NOTES
  36. This option requires that libcurl was built with a resolver backend that
  37. supports this operation. The c\-ares backend is the only such one.
  38. .SH AVAILABILITY
  39. Added in curl 7.33.0
  40. .SH RETURN VALUE
  41. Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not,
  42. CURLE_NOT_BUILT_IN if support was disabled at compile\-time, or
  43. CURLE_BAD_FUNCTION_ARGUMENT when given a bad address.
  44. .SH SEE ALSO
  45. .BR CURLOPT_DNS_INTERFACE (3),
  46. .BR CURLOPT_DNS_LOCAL_IP4 (3),
  47. .BR CURLOPT_DNS_SERVERS (3)