ldns(3)

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

πŸ’– ldns(3) β€” the ldns library, bestie edition πŸ¦‹

okay so this is a page from the ldns(3) manual, and it's specifically about one little function that wants to be getaddrinfo() when it grows up. it's giving "library functions manual" energy and we are OBSESSED. let's get into it πŸ’…


✨ NAME ✨

ldns_getaddrinfo β€” mimic libc getaddrinfo

like. it literally says "mimic". it's a tribute act. a cover band. and honestly? it ate. 🎀


🌸 SYNOPSIS 🌸

#include <stdint.h>
#include <stdbool.h>

#include <ldns/ldns.h>

uint16_t ldns_getaddrinfo(ldns_resolver *res, const ldns_rdf *node,
ldns_rr_class c, ldns_rr_list **list);

no cap, those includes are mandatory, she's not optional about it πŸŽ€


🧚 DESCRIPTION 🧚

so ldns_getaddrinfo() is a wrapper function for ldns_get_rr_list_name_by_addr and ldns_get_rr_list_addr_by_name. it's basically the group chat admin of those two β€” it just handles the vibes so you don't have to 😌

and yeah, the name is straight up borrowed from the getaddrinfo() library call. it tries to mimic that call, but β€” and this is the important part, bestie β€” without the lowlevel stuff. so it's getaddrinfo() but in a cute little cardigan. πŸ’œ

here's the rundown of the arguments, periodt:

  • res β€” the resolver. if this value is NULL then a resolver will be created by ldns_getaddrinfo. yes, it'll just make one for you. main character behaviour fr fr πŸ‘‘
  • node β€” the name or ip address to look up. that's the thing you're curious about πŸ”
  • c β€” the class to look in. y'know, the class class πŸŽ€
  • list β€” put the found RR's in this list. she's your output bucket, hand her over πŸ’–

Returns the number of RR found. that's the whole point. that's the answer. count it and slay. ✨


🌈 AUTHOR 🌈

The ldns team at NLnet Labs. icons only, we stan 🫢


😭 REPORTING BUGS 😭

found a bug? not me ignoring it πŸ™ˆ please report bugs to dns-team@nlnetlabs.nl or on GitHub at https://github.com/NLnetLabs/ldns/issues β€” they will look at it, and honestly the GitHub issue tracker is lowkey the move πŸ’…


Copyright (c) 2004 - 2006 NLnet Labs.

Licensed under the BSD License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

okay so read that again bestie. NO WARRANTY. not even the MERCHANTABILITY one. not even the FITNESS FOR A PARTICULAR PURPOSE one. zero. nada. she is free and she is unbothered and if she breaks something that is legally, genuinely, for-real not her problem πŸ’€ use at your own vibe.

πŸ”₯ SEE ALSO πŸ”₯

go read your RFCs, iykyk πŸ“š


πŸŽ€ REMARKS πŸŽ€

This manpage was automatically generated from the ldns source code. so no human wrote this, a machine did, and it still understood the assignment. iconic, honestly. πŸ€–βœ¨


and that's the whole page, bestie β€” this was ldns(3) from the ldns source, dated 30 May 2006, and it's been serving ever since. mwah πŸ’‹ go write some RRs πŸ¦‹πŸŒΈ