*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> sethostname (2)              
Title
Content
Arch
Section
 

Contents


 sethostname(2)                                               sethostname(2)




 NAME    [Toc]    [Back]
      sethostname - set name of host cpu

 SYNOPSIS    [Toc]    [Back]
      #include <unistd.h>

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

 DESCRIPTION    [Toc]    [Back]
      The sethostname() system call sets the name of the host processor to
      name, which has a length of namelen characters.  At system boot time
      sethostname() is normally executed by the hostname command (see
      hostname(1)) in the /sbin/init.d/hostname script.  Host names are
      limited to MAXHOSTNAMELEN characters, as defined in <sys/param.h>.

 RETURN VALUE    [Toc]    [Back]
      sethostname() returns the following values:

            0   Successful completion.
           -1   Failure.  errno is set to indicate the error.

 ERRORS    [Toc]    [Back]
      If sethostname() fails, errno is set to one of the following values.

           [EFAULT]       name points to an illegal address.  The reliable
                          detection of this error is implementation
                          dependent.

           [EPERM]        The user does not have appropriate privileges.

 AUTHOR    [Toc]    [Back]
      sethostname() was developed by the University of California, Berkeley.

 SEE ALSO    [Toc]    [Back]
      hostname(1), uname(1), gethostname(2), uname(2).


 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003
[ Back ]
      
      
 Similar pages
Name OS Title
rcp Tru64 Copies files on the same host, between a local host and a remote host, and between two remote hosts
ssh-hostbased-setup Tru64 Sets up Secure Shell host-based authentication by verifying and if necessary, copying a public host ...
t6rhdb_put_host IRIX TSIX Remote Host DataBase get host information
t6rhdb_get_host IRIX TSIX Remote Host DataBase get host information
upl OpenBSD USB support for Prolific based host-to-host adapters
rsh Tru64 Executes a specified command on a remote host or logs into a remote host
gethostname Linux get/set host name
dced HP-UX DCE Host daemon
sethostname NetBSD get/set name of current host
sethostname OpenBSD get/set name of current host
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service