dns_name6(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– dns_name6(3) β€” Library Functions Manual πŸ’–

okay bestie, welcome to dns_name6, the little function that does reverse DNS for IPv6. it's giving "who is this address actually" energy and honestly? we're obsessed. πŸ¦‹


✨ NAME ✨

dns_name6 β€” look up host name πŸ”


🌸 SYNTAX 🌸

#include <libowfat/dns.h>

int dns_name6(stralloc* out,const char* ip[16]);

πŸ’… DESCRIPTION πŸ’…

so dns_name6 looks up the domain name for the 16-byte IPv6 address sitting in ip. it drops the (first) domain name into out and returns 0. slay. ✨

but like… if the relevant ip6.arpa domain doesn't exist in DNS, or it just has no PTR records at all? then out will be empty. no name for you, bestie. πŸ™ˆ

if dns_name6 has trouble with the DNS lookup or runs out of memory, it returns -1 and sets errno appropriately. and here's the thing β€” it may or may not change out. so don't go assuming anything about what's in there, fr fr. 😭

lowkey important: that -1 return means something went wrong, not no name found. those are two different vibes. 🫢

πŸŽ€ SEE ALSO πŸŽ€


and that's the whole page, bestie!! πŸ’– mwah. this was dns_name6(3) from the Library Functions Manual, so go forth and reverse-look-up those IPv6 addresses like the main character you are. πŸ‘‘βœ¨πŸŒˆ