ARES_EXPAND_NAME(3)
β¨ ARES_EXPAND_NAME(3) β¨
okay so bestie, welcome to the manual page for ARES_EXPAND_NAME(3) π β which, plot twist, is all about the function called ares_expand_string. yeah, the page name and the function name don't match, it's giving mysterious, we move π
πΈ NAME πΈ
ares_expand_string β expand a length encoded string π
π¦ SYNOPSIS π¦
#include <ares.h>
int ares_expand_string(const unsigned char *encoded,
const unsigned char *abuf, int alen,
unsigned char **s, long *enclen)
π DESCRIPTION π
so what does ares_expand_string actually do? bestie it converts a length encoded string into a NUL-terminated C string. iconic behavior honestly β¨
- the argument
encodedgives the beginning of the encoded string π«Ά - the arguments
abufandalengive the containing message buffer β and yes you need those, because they're necessary for the processing of indirection pointers within the encoded domain name π - the result lands in a NUL-terminated allocated buffer, and a pointer to it gets stored in the variable pointed to by
sπ« - the length of the encoded string gets stored in the variable pointed to by
enclen, so the caller can advance past the encoded string to read further data in the message. main character energy: keep it moving πΆβοΈ
no cap, that allocated buffer is yours now β there's a whole other manpage for freeing it, keep reading π
π₯ RETURN VALUES π₯
ares_expand_string can return any of the following values:
ARES_SUCCESSβ expansion of the encoded string succeeded. slay! πARES_EBADSTRβ the encoded string was malformed and could not be expanded. it's giving corrupted ππARES_ENOMEMβ memory was exhausted. the vibes ran out of RAM π
π SEE ALSO π
ares_free_string(3)β go free that string bestie, iykyk π§
and that's the whole page!! this lil legend comes to you from the <strong>Library Functions Manual</strong>, dated <strong>20 Nov 2009</strong> β vintage, retro, lowkey a classic π mwah, go write some C πβ¨π
π¦ 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 1998 by the Massachusetts Institute of Technology
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms