SETHOSTNAME(2) — HP-UX
NAME
sethostname − set name of host cpu
SYNOPSIS
sethostname(name, namelen)
char *name;
int namelen;
DESCRIPTION
This call sets the name of the host processor to be name, which has a length of namelen characters. The maximum value of namelen is UTSLEN as defined in <sys/utsname.h>. This is normally executed when the system is bootstrapped, executed out of the file /etc/rc. This system call sets the nodename field in the utsname structure returned by uname(2).
ERRORS
Sethostname will fail and return an error if:
[EPERM] It is not executed by the super-user.
[EFAULT] Name points to an illegal address. The reliable detection of this error will be implementation dependent.
HARDWARE DEPENDENCIES
Integral PC
Normal users have all super-user capabilities.
AUTHOR
Sethostname was developed by the University of California, Berkeley.
SEE ALSO
hostname(1), uname(1), gethostname(2), uname(2).
Hewlett-Packard Company — Version B.1, April 12, 1993