.TH GETHOSTNAME 3 .UC .SH NAME gethostname \- get name of current host .SH SYNOPSIS .nf .ft B gethostname(name, namelen) char *name; int namelen; .fi .SH DESCRIPTION .I Gethostname returns the standard host name for the current processor, as previously set by .IR hostname (1). The parameter .I namelen specifies the size of the .I name array. The name is not necessarily null-terminated. .SH FILES .ta 2i /etc/localhostname file containing name of local host .SH "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 \fIerrno\fP. .SH SEE ALSO hostname(1) .SH BUGS This is a C library simulation of the VMUNIX .I gethostname system call. It may not necessarily exactly duplicate its counterpart. .PP Host names are limited in length.