1CURLOPT_DNS_LOCAL_IP6(3) libcurl CURLOPT_DNS_LOCAL_IP6(3)
2
3
4
6 CURLOPT_DNS_LOCAL_IP6 - IPv6 address to bind DNS resolves to
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_LOCAL_IP6, char *address);
12
14 Set the local IPv6 address that the resolver should bind to. The argu‐
15 ment should be of type char * and contain a single IPv6 address as a
16 string. Set this option to NULL to use the default setting (do not
17 bind to a specific IP address).
18
19 The application does not have to keep the string around after setting
20 this option.
21
23 NULL
24
26 All
27
29 CURL *curl = curl_easy_init();
30 if(curl) {
31 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
32 curl_easy_setopt(curl, CURLOPT_DNS_LOCAL_IP6, "fe80::a9ff:fe46:b619");
33 ret = curl_easy_perform(curl);
34 curl_easy_cleanup(curl);
35 }
36
38 This option requires that libcurl was built with a resolver backend
39 that supports this operation. The c-ares backend is the only such one.
40
41 Added in 7.33.0
42
44 Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if
45 not, CURLE_NOT_BUILT_IN if support was disabled at compile-time, or
46 CURLE_BAD_FUNCTION_ARGUMENT when given a bad address.
47
49 CURLOPT_DNS_INTERFACE(3), CURLOPT_DNS_LOCAL_IP4(3),
50
51
52
53ibcurl 8.2.1 April 26, 2023 CURLOPT_DNS_LOCAL_IP6(3)