Query: sethostname
OS: osf1
Section: 2
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
sethostname(2) System Calls Manual sethostname(2)NAMEsethostname - Sets the name of the current hostSYNOPSISint sethostname ( char *name, int name_len );PARAMETERSPoints to an array of bytes where the host name is stored. Specifies the length of the array pointed to by the name parameter.DESCRIPTIONThe sethostname() function allows a calling process with root user authority to set the internal host name of a machine on a network. System host names 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 superuser privilege.RETURN VALUESUpon 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.ERRORSIf 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 appropriate privilege.RELATED INFORMATIONFunctions: gethostid(2), sethostid(2), gethostname(2) delim off sethostname(2)
Related Man Pages |
---|
sethostname(2) - osf1 |
sethostname(3c) - sunos |
sethostname(3c) - minix |
sethostname(3c) - debian |
sethostname(3c) - plan9 |
Similar Topics in the Unix Linux Community |
---|
Extraction of .gz file using 7zip fails |