ARES_PARSE_URI_REPLY(3)
π ares_parse_uri_reply β bestie edition π
okay so this is ARES_PARSE_URI_REPLY(3), from the Library Functions Manual, and it's literally the glow-up page for one very specific little function. no cap. π¦
β¨ NAME β¨
ares_parse_uri_reply β she parses a reply to a DNS query of type URI. that's the whole job. she's an icon, she's a specialist. π
πΈ SYNOPSIS πΈ
#include <ares.h>
int ares_parse_uri_reply(const unsigned char* abuf, int alen,
struct ares_uri_reply** uri_out);
π DESCRIPTION π
so the ares_parse_uri_reply(3) function takes the response to a query of type URI and parses it into a linked list of struct ares_uri_reply. yes, a linked list, we love a little chain of structs. βοΈβ¨
the parameters abuf and alen give the contents of the response β that's your raw buffer and its length, hand them over together like a matched set. π«Ά
the result gets stored in allocated memory, and a pointer to that memory gets stored into the variable pointed to by uri_out.
β οΈ bestie, listen. it is the caller's responsibility to free the resultinguri_outstructure when it is no longer needed, using the functionares_free_data(3). you allocated it, you clean it up. no leaving your mess in the group chat. π
the structure ares_uri_reply contains the following fields:
struct ares_uri_reply {
struct ares_uri_reply *next;
unsigned short weight;
unsigned short priority;
char *uri;
int ttl;
};
look at her. next, weight, priority, uri, ttl. five fields, zero notes. main character energy fr fr. π
π RETURN VALUES π
ares_parse_uri_reply can return any of the following values:
ARES_SUCCESSβ the response was successfully parsed. ate and left no crumbs. πARES_EBADRESPβ the response was malformatted. it's giving chaos, not data. πARES_ENODATAβ the response did not contain an answer to the query. she looked. nothing was there. πARES_ENOMEMβ memory was exhausted. the vibes ran out. π
β AVAILABILITY β
this section is here, and it is empty. that's not me skipping it, that's genuinely what's in the original β the heading exists and nothing is underneath it. respect the blank space, it's minimalism. π§
π¦ SEE ALSO π¦
(yes you need both. one asks the question, one cleans up after the party. π)
and that's the page!! brought to you by the 14 August 2020 crew, from ARES_PARSE_URI_REPLY(3), with so much love. go forth and free your uri_out, bestie. ππβ¨
π¦ 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