ARES_SET_LOCAL_IP6(3)

πŸ“¦
version 1.34.9 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

ares_set_local_ip6 β€” bestie, this one sets the local IPv6 address for your outgoing requests. It's giving "I choose my own outbound interface" energy. ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <ares.h>

void ares_set_local_ip6(ares_channel_t *channel, const unsigned char* local_ip6)

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so, ares_set_local_ip6 sets the IPv6 address that your outbound IPv6 requests are gonna use. Main character behaviour, fr fr. πŸ’…

The local_ip6 parameter is specified in network byte order β€” do not come in here with your host byte order, that's not the vibe. 😭

The way this is actually iconic is on multi-homed systems 🌈, because it lets you pick which outbound interface your traffic goes out of. You're literally choosing your own adventure. No cap.

Heads up bestie: the local_ip6 argument must be 16 bytes in length. Sixteen. Not 15, not 17, we don't do that here. πŸ’€

🌸 SEE ALSO 🌸


⭐ NOTES ⭐

Not me pulling up the receipts β€” this function was added in c-ares 1.7.4. Oldie but a goodie, she's been serving since forever. πŸ‘‘


Okay that's the whole page, you ate that πŸ’– This little baddie comes to you courtesy of the c-ares library, dated 30 June 2010 β€” yes, she's a 2010s icon and she still slays. Mwah, go forth and set your local IPv6 address, bestie. πŸŽ€βœ¨