DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Programming with sockets

Network names

As for host names, routines for mapping network names to numbers, and back, are provided. These routines return a netent structure:

   /*
    * Assumption here is that a network number
    * fits in 32 bits -- probably a poor one.
    */
   struct netent {
        char *n_name;         /* official name of net */
        char **n_aliases;     /* alias list */
        int  n_addrtype;      /* net address type */
        int  n_net;           /* network number, host byte order */
   };
The routines getnetbyname, getnetbyaddr, and getnetent(3N) are the network counterparts to the host routines described above.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004