#include <cat/catutil.h>
catnet_host *catnet_hostbyname(const char *name);
The catnet_host structure returned looks as follows:
typedef struct catnet_host {
char **names; /* name, alias, ..., NULL */
char **addrs; /* addresses, as strings, NULL-terminated */
} catnet_host;
Where names is a NULL-terminated array of strings in which names[0]
is the official name and the rest are the different alias names.
addrs is a NULL-terminated array of addresses specified as strings (in dotted
decimal notation).
The entire catnet_host struct is stored in a single area of memory allocated by the function. This
memory must be freed by a single call to free().
If no data was found, NULL is returned.
catnet_getnetinfo, catnet_hostbyaddr