getnetent(3) — Subroutines
OSF — Environment_Note_Added
NAME
getnetent − Gets network entry
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <netdb.h>
struct netent ∗getnetent ( void );
DESCRIPTION
The getnetent() function retrieves network information by opening and sequentially reading the /etc/networks file.
The getnetent() function returns a pointer to a netent structure, which contains the equivalent fields for a network description line in the /etc/networks file. The netent structure is defined in the netdb.h header file.
Use the endnetent() function to close the /etc/networks file.
NOTES
The return value points to static data that is overwritten by subsequent calls.
RETURN VALUES
Upon successful completion, the getnetent() function returns a pointer to a netent structure.If an error occurs or the end of the file is reached, the getnetent() function returns a null (0) pointer.
FILES
/etc/networks
Contains official network names.
ENVIRONMENT NOTES
This section describes system features that are not generic to OSF/1 but that are provided in this OSF/1 implementation.
Digital Extensions
The system searches either the local /etc/networks file or the NIS distributed networks file for the requested information. To determine which file or files to search, and in which order, the system uses the switches in the /etc/svc.conf file.
RELATED INFORMATION
Functions: getnetbyaddr(3), getnetbyname(3), setnetent(3), endnetent(3)