#include <cat/catutil.h>
char *cat_hostname(char *buf, int buflen);
buflen is the size of the supplied buffer.
The name stored is not necessarily a name associated with any network address for the machine.
The function returns buf if successful, or NULL on error.