getnetent_r man page on DigitalUNIX

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
DigitalUNIX logo
[printable version]

getnetent(3)							  getnetent(3)

       getnetent, getnetent_r - Get a network entry

       #include <netdb.h>

       struct netent *getnetent(
	       void );

       [Tru64  UNIX]  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 );

       Standard C Library (libc)

       Interfaces  documented on this reference page conform to industry stan‐
       dards as follows:

       getnetent():  XNS4.0, XNS5.0

       Refer to the standards(5) reference page	 for  more  information	 about
       industry standards and associated tags.

       [Tru64  UNIX]  Points to the netent structure.  The netdb.h header file
       defines the netent structure.  [Tru64 UNIX]  Is data for	 the  networks
       database.  The netdb.h header file defines the netent_data structure.

       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

       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.

       The  getnetent()	 function  returns  a pointer to thread-specific data.
       Subsequent calls to this function from the same thread  overwrite  this

       [Tru64  UNIX]  The getnetent_r() function is an obsolete reentrant ver‐
       sion of the getnetent() function.   It is supported in order  to	 main‐
       tain  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
       access by either the setnetent_r() or getnetent_r() function.

       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.

       [Tru64 UNIX]  Upon successful completion,  the  getnetent_r()  function
       stores  the  netent  structure  in  the location pointed to by net, and
       returns a value of 0 (zero).  Upon failure, it returns a value of -1.

       Current industry standards do not define error values  for  the	getne‐
       tent() function.

       [Tru64  UNIX]  If  any  of  the following conditions occurs, the getne‐
       tent_r() function sets errno to the corresponding value:

       The netent or net_data parameter is invalid.  The search failed (EOF).

       This file is the Internet network name database file.  Each  record  in
       the file occupies a single line and has three fields: the official net‐
       work name, the network number, and alias.  The database service	selec‐
       tion configuration file.

       Functions:   getnetbyaddr(3),   getnetbyname(3),	 setnetent(3),	endne‐

       Files: networks(4), svc.conf(4).

       Networks: nis_intro(7).

       Standards: standards(5).

       Network Programmer's Guide


List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net