Open System Services Library Calls Reference Manual (G06.28+, H06.05+)
OSS Library Calls (g - h) gethostent(3)
NAME
gethostent - Gets the next entry in the network host database
LIBRARY
G-series native OSS processes: /G/system/sysnn/zinetsrl
H-series OSS processes: /G/system/zdllnnn/zinetdll
SYNOPSIS
#include <netdb.h>
struct hostent *gethostent(void)
PARAMETERS
None.
DESCRIPTION
The gethostent() function retrieves the next entry in /etc/hosts, the network host database.
RETURN VALUES
On successful completion, gethostent() returns a pointer to a hostent structure if the entry was
found, and a null pointer if the end of the database was reached. If the call to gethostent() fails,
a null pointer is returned.
ERRORS
gethostent() does not set errno.
FILES
/etc/hosts The Internet network hostname database. Each record in the file occupies a sin-
gle line and has three fields: the host address, the official hostname, and aliases.
RELATED INFORMATION
Functions: gethostbyname(3), gethostbyaddr(3), sethostent(3).
Files: hosts(4).
527187-007 Hewlett-Packard Company 3−39