[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Communications Technical Reference, Volume 2

gethostid Subroutine

Purpose

Gets the unique identifier of the current host.

Library

Standard C Library (libc.a)

Syntax

#include <unistd.h>
 
int gethostid ( )

Description

The gethostid subroutine allows a process to retrieve the 32-bit identifier for the current host. In most cases, the host ID is stored in network standard byte order and is a DARPA Internet address for a local machine.

Return Values

Upon successful completion, the gethostid subroutine returns the identifier for the current host.

If the gethostid subroutine is unsuccessful, the system handler performs the following functions:

Implementation Specifics

The gethostid subroutine is part of Base Operating System (BOS) Runtime.

All applications containing the gethostid subroutine must be compiled with _BSD set to a specific value. Acceptable values are 43 and 44. In addition, all socket applications must include the BSD libbsd.a library.

Related Information

The gethostname subroutine, sethostid subroutine, sethostname subroutine.

Sockets Overview in AIX Version 4.3 Communications Programming Concepts.


[ Previous | Next | Contents | Glossary | Home | Search ]