ARES_SET_LOCAL_IP4(3)
πΈ NAME πΈ
okay bestie, this is the ares_set_local_ip4 page from the Library Functions Manual, and we're keeping it cute but fully factual π
ares_set_local_ip4β Set local IPv4 address outgoing requests.
no cap, that's the whole name section. periodt. π
β¨ SYNOPSIS β¨
here's the incantation, copy it exactly bestie:
#include <ares.h>
void ares_set_local_ip4(ares_channel_t *channel, unsigned int local_ip)
π DESCRIPTION π
so the ares_set_local_ip4 function sets the IP address for outbound requests. iconic behavior, honestly. β¨
the parameter local_ip is specified in host byte order. that part is important, don't skip it. π«Ά
this allows users to specify outbound interfaces when used on multi-homed systems. it's giving "I have options and I'm choosing one." π
π¦ SEE ALSO π¦
like, the IPv6 sibling. go check it out if you need the v6 version. π¦
π NOTES π
this function was added in c-ares 1.7.4. yes bestie, it's been around for a minute. π
mwah π this little page lives in the Library Functions Manual and is dated 30 June 2010, k byeeee π β¨
π¦ where this page comes from
- alpine 3.22: c-ares-doc 1.34.9-r0 Β· MIT
- alpine 3.23: c-ares-doc 1.34.9-r0 Β· MIT
- alpine 3.24: c-ares-doc 1.34.9-r0 Β· MIT
- arch rolling: c-ares 1.34.9-1 Β· MIT
- centos-stream 10: c-ares-devel 1.34.9-1.el10 Β· MIT
- debian trixie: libc-ares-dev 1.34.5-1+deb13u1 Β· MIT
- fedora 43: c-ares-devel 1.34.5-2.fc43 Β· MIT
- fedora 43: c-ares-devel 1.34.5-2.fc43 Β· MIT
- fedora 43: c-ares-devel 1.34.8-1.fc43 Β· MIT
- fedora 43: c-ares-devel 1.34.8-1.fc43 Β· MIT
- fedora 44: c-ares-devel 1.34.6-3.fc44 Β· MIT
- fedora 44: c-ares-devel 1.34.6-3.fc44 Β· MIT
- fedora 44: c-ares-devel 1.34.8-1.fc44 Β· MIT
- fedora 44: c-ares-devel 1.34.8-1.fc44 Β· MIT
- nixos 26.05: c-ares 1.34.9
- nixpkgs unstable: c-ares 1.34.8
- opensuse-leap 16.0: c-ares-devel 1.34.8-160000.1.1 Β· MIT
- opensuse-leap 16.0: c-ares-devel 1.34.8-160000.1.1 Β· MIT
- opensuse-leap 16.0: c-ares-devel 1.34.8-160000.1.1 Β· MIT
- opensuse-leap 16.0: c-ares-devel 1.34.8-160000.1.1 Β· MIT
- ubuntu questing: libc-ares-dev 1.34.5-1
- ubuntu questing: libc-ares-dev 1.34.5-1ubuntu0.1
- ubuntu resolute: libc-ares-dev 1.34.6-1 Β· MIT
- ubuntu resolute: libc-ares-dev 1.34.6-1ubuntu0.1
- ubuntu resolute: libc-ares-dev 1.34.6-1ubuntu0.2 Β· MIT
- ubuntu stonking: libc-ares-dev 1.34.8-1 Β· MIT
- π the page's license: MIT
- Copyright 2010 by Ben Greear <greearb@candelatech.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms