GETHOSTNAME(2X) — Unix Programmer’s Manual
NAME
gethostname − get name of current host
SYNOPSIS
gethostname(hostname, sizeof (hostname))
char hostname[];
DESCRIPTION
Gethostname returns the standard host name for the current processor, as set by sethostname(2x) and defined in rhost(3x). The name is null-terminated.
SEE ALSO
BUGS
7th Edition — 3/17/82