*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: sethostname | Section: 2 | Source: Digital UNIX | File: sethostname.2.gz
sethostname(2) System Calls Manual sethostname(2) NAME sethostname - Sets the name of the current host SYNOPSIS int sethostname ( char *name, int name_len ); PARAMETERS Points to an array of bytes where the hostname is stored. Specifies the length of the array pointed to by the name parameter. DESCRIPTION The sethostname() function allows a calling process with root user au- thority to set the internal hostname of a machine on a network. System hostnames are limited to MAXHOSTNAMELEN as defined in the /usr/include/sys/param.h file. The sethostid() function fails if the calling process does not have su- peruser privilege. RETURN VALUES Upon successful completion, the system returns a value of 0 (zero). If the sethostname() function fails, -1 is returned and errno is set to indicate the error. ERRORS If the sethostname() function fails, errno may be set to one of the following values: The name parameter or the name_len parameter gives an address that is not valid. The calling process does not have appropri- ate privilege. RELATED INFORMATION Functions: gethostid(2), sethostid(2), gethostname(2) delim off sethostname(2)

Navigation Options