*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: getnetent | Section: 3 | Source: Digital UNIX | File: getnetent.3.gz
getnetent(3) Library Functions Manual getnetent(3) NAME getnetent, getnetent_r - Get a network entry LIBRARY Standard C Library (libc.so, libc.a) SYNOPSIS #include <netdb.h> struct netent *getnetent(void); [Digital] The following obsolete function is supported in order to maintain backward compatibility with previous versions of the operating system. You should not use it in new designs. int getnetent_r( struct netent *net, struct netent_data *net_data); STANDARDS Interfaces documented on this reference page conform to industry stan- dards as follows: getnetent(): XPG4-UNIX Refer to the standards(5) reference page for more information about in- dustry standards and associated tags. PARAMETERS [Digital] Points to the netent structure. The netdb.h header file de- fines the netent structure. [Digital] Is data for the networks data- base. The netdb.h header file defines the netent_data structure. DESCRIPTION The getnetent() function retrieves network information by opening and sequentially reading 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. The getnetent() function returns a pointer to a netent structure, which contains the equivalent fields for a network description line in the networks file. The netent structure is defined in the netdb.h header file. Use the endnetent() function to close the /etc/networks file. The getnetent() return value points to static data, which is overwrit- ten by any subsequently called functions using the same structure. NOTES The getnetent() function returns a pointer to thread-specific data. Subsequent calls to this function from the same thread overwrite this data. [Digital] The getnetent_r() function is an obsolete reentrant version of the getnetent() function. It is supported in order to maintain backward compatibility with previous versions of the operating system and should not be used in new designs. Note that you must set the net_fp field of the netent_data structure to NULL before its first ac- cess by either the setnetent_r() or getnetent_r() function. RETURN VALUES Upon successful completion, the getnetent() function returns a pointer to a netent structure. If it fails or reaches the end of the /etc/net- works name file, it returns a null pointer. [Digital] Upon successful completion, the getnetent_r() function stores the netent structure in the location pointed to by net, and re- turns a value of 0 (zero). Upon failure, it returns a value of -1. ERRORS Current industry standards do not define error values for the getne- tent() function. [Digital] If any of the following conditions occurs, the getnetent_r() function sets errno to the corresponding value: The netent or net_data parameter is invalid. The search failed (EOF). FILES This file is the DARPA Internet network name database file. Each record in the file occupies a single line and has three fields: the official network name, the network number, and alias. The database service se- lection configuration file. RELATED INFORMATION Functions: getnetbyaddr(3), getnetbyname(3), setnetent(3), endne- tent(3). Files: networks, svc.conf(4). Networks: nis_intro(7). Standards: standards(5). delim off getnetent(3)

Navigation Options