dns_name4(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

NAME πŸ’–

okay bestie, this is the dns_name4(3) page from the Library Functions Manual β€” and it's all about dns_name4, the function that does one job: look up host name. iconic behavior, honestly. πŸŽ€


SYNTAX <✨>

#include <libowfat/dns.h>

int dns_name4(stralloc* out,const char* ip[4]);

DESCRIPTION <πŸ’…>

okay so here's the tea: dns_name4 is gonna look up the domain name for the 4-byte IP address sitting in ip. Then it drops the (first) domain name into out and returns 0. slay. ✨

But if the relevant in-addr.arpa domain does not exist in DNS, or has no PTR records, then out will be empty. no cap. 😭

If dns_name4 has trouble with the DNS lookup or runs out of memory, it returns -1, setting errno appropriately. also important: it may or may not change out. so don't assume, bestie. πŸ’€


SEE ALSO <🌈>


signing off from dns_name4(3) in the Library Functions Manual πŸ’– no date stamp on this page, just the manual name and the vibes, periodt. πŸ¦‹