getnetent,  getnetbyname,  getnetbyaddr,  setnetent,  endnetent  -  get
   network entry


   #include <netdb.h>

   struct netent *getnetent(void);

   struct netent *getnetbyname(const char *name);

   struct netent *getnetbyaddr(uint32_t net, int type);

   void setnetent(int stayopen);

   void endnetent(void);


   The getnetent()  function  reads  the  next  entry  from  the  networks
   database  and  returns  a  netent  structure  containing the broken-out
   fields from the entry.  A connection  is  opened  to  the  database  if

   The  getnetbyname()  function  returns a netent structure for the entry
   from the database that matches the network name.

   The getnetbyaddr() function returns a netent structure  for  the  entry
   from  the  database  that  matches the network number net of type type.
   The net argument must be in host byte order.

   The setnetent() function opens a connection to the database,  and  sets
   the  next  entry  to the first entry.  If stayopen is nonzero, then the
   connection to the database will not be closed between calls to  one  of
   the getnet*() functions.

   The endnetent() function closes the connection to the database.

   The netent structure is defined in <netdb.h> as follows:

       struct netent {
           char      *n_name;     /* official network name */
           char     **n_aliases;  /* alias list */
           int        n_addrtype; /* net address type */
           uint32_t   n_net;      /* network number */

   The members of the netent structure are:

   n_name The official name of the network.

          A NULL-terminated list of alternative names for the network.

          The type of the network number; always AF_INET.

   n_net  The network number in host byte order.


   The  getnetent(),  getnetbyname() and getnetbyaddr() functions return a
   pointer to a statically allocated netent structure, or a  null  pointer
   if an error occurs or the end of the file is reached.


          networks database file


   For   an   explanation   of   the  terms  used  in  this  section,  see

   │InterfaceAttributeValue                     │
   │getnetent()    │ Thread safety │ MT-Unsafe race:netent     │
   │               │               │ race:netentbuf env locale │
   │getnetbyname() │ Thread safety │ MT-Unsafe race:netbyname  │
   │               │               │ env locale                │
   │getnetbyaddr() │ Thread safety │ MT-Unsafe race:netbyaddr  │
   │               │               │ locale                    │
   │setnetent(),   │ Thread safety │ MT-Unsafe race:netent env │
   │endnetent()    │               │ locale                    │
   In the above table, netent in race:netent signifies that if any of  the
   functions setnetent(), getnetent(), or endnetent() are used in parallel
   in different threads of a program, then data races could occur.


   POSIX.1-2001, POSIX.1-2008, 4.3BSD.


   In glibc versions before 2.2, the net argument of getnetbyaddr() was of
   type long.


   getnetent_r(3), getprotoent(3), getservent(3)
   RFC 1101


   This  page  is  part of release 4.09 of the Linux man-pages project.  A
   description of the project, information about reporting bugs,  and  the
   latest     version     of     this    page,    can    be    found    at

More Linux Commands

perlreguts(1) - Description of the Perl regular expression e
This document is an attempt to shine some light on the guts of the regex engine and how it works. The regex engine represents a significant chunk of the perl co

XGetErrorDatabaseText(3) - default error handlers (ManPage)
Xlib generally calls the programs supplied error handler whenever an error is received. It is not called on BadName errors from OpenFont, LookupColor, or AllocN

git-fsck-objects(1) - Verifies the connectivity and validity
This is a synonym for git-fsck(1). Please refer to the documentation of that command. GIT Part of the git(1) suite git-fsck-objects.1 (Commands - Linux manual

Tcl_GetEnsembleFlags(3) - manipulate ensemble commands......
An ensemble is a command, bound to some namespace, which consists of a collection of subcommands implemented by other Tcl commands. The first argument to the en

kexec_load(2) - load a new kernel for later execution.......
The kexec_load() system call loads a new kernel that can be executed later by reboot(2). The flags argument is a mask whose high-order bits control the operatio

gnutls_x509_crt_get_issuer_dn(3) - API function (Man Page)
This function will copy the name of the Certificate issuer in the provided buffer. The name will be in the form C=xxxx,O=yyyy,CN=zzzz as described in RFC2253. T

Tcl_LimitGetCommands(3) - manage and check resource limits o
Tcls interpreter resource limit subsystem allows for close control over how much computation time a script may use, and is useful for cases where a program is d

XCreatePixmap(3) - create or destroy pixmaps (Man Page).....
The XCreatePixmap function creates a pixmap of the width, height, and depth you specified and returns a pixmap ID that identifies it. It is valid to pass an Inp

xdr_pmaplist(3) - library routines for remote procedure call
These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the s

gc-analyze(1) - Analyze Garbage Collector (GC) memory dumps
gc-analyze prints an analysis of a GC memory dump to standard out. The memory dumps may be created by calling gnu.gcj.util.GCInfo.enumerate(String namePrefix) f

buffchan(8) - Buffered file-writing backend for INN.........
buffchan reads lines from standard input and copies the initial fields in each line to the files named by the remaining fields on the line. buffchan is intended

XML::SAX::DocumentLocator(3pm) - Helper class for document l
This module gives you a tied hash reference that calls the specified closures when asked for PublicId, SystemId, LineNumber and ColumnNumber. It is useful for w

We can't live, work or learn in freedom unless the software we use is free.