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

  man pages->OpenBSD man pages -> gethostid (3)              
Title
Content
Arch
Section
 

GETHOSTID(3)

Contents


NAME    [Toc]    [Back]

     gethostid, sethostid - get/set unique identifier of  current
host

SYNOPSIS    [Toc]    [Back]

     #include <unistd.h>

     long
     gethostid(void);

     int
     sethostid(long hostid);

DESCRIPTION    [Toc]    [Back]

     The sethostid() function establishes a 32-bit identifier for
the current
     processor that is intended to be unique among all UNIX  systems in existence.
   This  is  normally a DARPA Internet address for the
local machine.
     This call is allowed only to the superuser and  is  normally
performed at
     boot-time.

     gethostid()  returns  the  32-bit identifier for the current
processor.

     This function has been deprecated.  The hostid should be set
or retrieved
     by use of sysctl(3).

SEE ALSO    [Toc]    [Back]

      
      
     gethostname(3), sysctl(3), sysctl(8)

HISTORY    [Toc]    [Back]

     The  gethostid() and sethostid() syscalls appeared in 4.2BSD
and were
     dropped in 4.4BSD.

BUGS    [Toc]    [Back]

     32 bits for the identifier is too small.

OpenBSD      3.6                           June      2,      1993
[ Back ]
 Similar pages
Name OS Title
gethostid Linux get or set the unique identifier of the current host
sethostid Tru64 Set the unique identifier of the current host
gethostid Tru64 Get the unique identifier of the current host
gethostid HP-UX get an identifier for the current host
hostid Linux print the numeric identifier for the current host
hostid IRIX set or print identifier of current host system
getuid IRIX convert from string to unique identifier
uuid IRIX Universal Unique Identifier functions
pthread_getsequence_np Tru64 Obtains the unique identifier for the specified thread
uuidgen HP-UX Generates a Universal Unique Identifier (UUID)
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service