gethostent

Gets a host file entry from the network host database file.

Format

#include  <netdb.h>

struct hostent *gethostent  (void);

Description

The gethostent routine reads the next entry of the database, opening a connection to the database, if necessary.

See the <netdb.h> header file for a description of the hostent structure.

This routine uses a common static area for its return values. Therefore, subsequent calls to this routine overwrite any existing network entry. You must make a copy of the network services entry, if you wish to save it.

Return Values
A pointer to the hostent structure. 
NULL  Indicates an error. 


Previous Page | Next Page | Table of Contents | Index