Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sethost(2) — HP-UX 5.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

hostname(1)

uname(1)

gethostname(2)

uname(2)

SETHOSTNAME(2)

NAME

sethostname − set name of host cpu

SYNOPSIS

sethostname(name, namelen)
char *name;
int namelen;

HP-UX COMPATIBILITY

Level: HP-UX/RUN ONLY

Origin: UCB

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 determined by the uname structure.  This is normally executed when the system is bootstrapped, executed out of the file /etc/rc.  This intrinsic sets the nodename field in the utsname structure returned by uname(2).

Sethostname will fail and return an error if:

­[EPERM] It is not executed by the super-user. 

­[EFAULT] Name points to an illegal address. 

HARDWARE DEPENDENCIES

Integral PC:
The super-user capabilities are provided to the normal user.

SEE ALSO

hostname(1), uname(1), gethostname(2), uname(2). 

Hewlett-Packard  —  last mod. May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026