reverse_addr(3z)
π NAME π
okay so bestie, this is reverse_addr(3z) from the z88dk Programmer's Manual β and the actual function name is reverse_addr_lookup. The NAME line is literally reverse_addr_lookup - convert IP address to hstname (yes, hstname, we are not fixing it, we are keeping it exactly). It converts an IP address to a hostname. That's the whole vibe. β¨
π¦ SYNOPSIS π¦
#include <net/resolv.h>
bool_t reverse_addr_lookup(ipaddr_t ipaddr, char *name);
πΈ DESCRIPTION πΈ
The reverse_addr_lookup() function queries any configured nameservers for the name of the host with IP address ipaddr. Like, it's asking around: "hey, who is this IP?" π
If ipaddr is not known to the queried nameservers then the ipaddr is converted to the form a.b.c.d and returned. So if nobody knows them, they get their own numeric little name back. periodt.
π«Ά RETURN VALUE π«Ά
reverse_addr_lookup() places the hostname in the buffer specified by name, no checks are made that this buffer is large enough to hold the full hostname. π
bestie, fr fr, no checks. That's exactly what the page says.
The function returns TRUE or FALSE depending on whether the queried nameservers knew ipaddr. So TRUE = they knew the IP, FALSE = they didn't.
reverse_addr_lookup() may also be called by the macro gethostbyaddr. iykyk.
π BUGS π
If you use the macro gethostbyaddr then beware that the ZSock implementation is not at all standard. Not me being dramatic, that's literally the note. π©
π AUTHOR π
Dominic Morris <dom@jb.man.ac.uk> β iconic. π
okay that's the whole reverse_addr(3z) page, from the z88dk Programmer's Manual, dated 18 February 2000. slay. π
π¦ where this page comes from
- fedora 43: z88dk 1.10.1-33.20150709cvs.fc43 Β· ClArtistic
- fedora 44: z88dk 1.10.1-33.20150709cvs.fc43 Β· ClArtistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms