reverse_addr(3z)

NAME
reverse_addr_lookup - convert IP address to hstname

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.

If ipaddr is not known to the queried nameservers then the ipaddr is converted to the form a.b.c.d and returned.

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. The function returns TRUE or FALSE depending on whether the queried nameservers knew ipaddr.

reverse_addr_lookup() may also be called by the macro gethostbyaddr

BUGS
If you use the macro gethostbyaddr then beware that the ZSock implementation is not at all standard.

AUTHOR
Dominic Morris <dom@jb.man.ac.uk>