GNURLOPT_DNS_LOCAL_IP6(3)
π GNURLOPT_DNS_LOCAL_IP6(3) π
okay so bestie, this is the GNURLOPT_DNS_LOCAL_IP6(3) page, and it lives in the curl_easy_setopt options manual. Buckle up, it's giving very specific IPv6 DNS binding energy. π¦
β¨ NAME β¨
CURLOPT_DNS_LOCAL_IP6 β the IPv6 address to bind DNS resolves to. periodt. π
π SYNOPSIS π
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_LOCAL_IP6, char
*address);
πΈ DESCRIPTION πΈ
okay so you're setting the local IPv6 address that the resolver should bind to. The argument should be of type char * and contain a single IPv6 address as a string. Set this option to NULL to use the default setting β aka don't bind to a specific IP address. π«Ά
The application does not have to keep the string around after setting this option. so you can let it go, bestie, it's fine. πβ¨
π DEFAULT π
NULL β iconic, unbothered, unbound. π
π PROTOCOLS π
All π
π§ EXAMPLE π§
here's the whole vibe, copied exactly:
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_DNS_LOCAL_IP6, "fe80::a9ff:fe46:b619");
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
π AVAILABILITY π
This option requires that libcurl was built with a resolver backend that supports this operation. The c-ares backend is the only such one. iykyk. π
Added in 7.33.0 β
π RETURN VALUE π
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, CURLE_NOT_BUILT_IN if support was disabled at compile-time, or CURLE_BAD_FUNCTION_ARGUMENT when given a bad address. no cap, those are the possible outcomes. π
π¦ SEE ALSO π¦
CURLOPT_DNS_INTERFACE(3), CURLOPT_DNS_LOCAL_IP4(3), β yes, the trailing comma is canon. π«Ά
mwah π β this page is from libcurl 7.37.0, dated 19 Jun 2014, and it's literally titled GNURLOPT_DNS_LOCAL_IP6(3). bye bestie π«Άβ¨
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms