GETHOSTNAME(3) UNIX Programmer's Manual GETHOSTNAME(3) NAME gethostname - get name of current host SYNOPSIS gethostname(name, namelen) char *name; int namelen; DESCRIPTION _G_e_t_h_o_s_t_n_a_m_e returns the standard host name for the current processor, as previously set by _h_o_s_t_n_a_m_e(1). The parameter _n_a_m_e_l_e_n specifies the size of the _n_a_m_e array. The name is not necessarily null-terminated. FILES /etc/localhostname file containing name of local host RETURN VALUE If the call succeeds a value of 0 is returned. If the call fails, then a value of -1 is returned and an error code is placed int the global location _e_r_r_n_o. SEE ALSO hostname(1) BUGS This is a C library simulation of the VMUNIX _g_e_t_h_o_s_t_n_a_m_e system call. It may not necessarily exactly duplicate its counterpart. Host names are limited in length. Printed 5/20/83 1