Sun Java System Web Server 7.0 Update 4 NSAPI Developer's Guide

util_hostname() Function

The util_hostname function retrieves the local host name and returns it as a string. If the function cannot find a fully qualified domain name, it returns NULL. You can reallocate or free this string. Use this function to determine the name of the system you are on.


char *util_hostname(void);

Return Values

A string containing the name, if a fully qualified domain name is found. Otherwise, the function returns NULL.