Chapter 7, Developing applications over TCP/IP using Internet sockets
Mapping network names (Internet domain)

Mapping network names (Internet domain)

Routines are provided for mapping network names to numbers, and mapping numbers to network names. These routines return a netent structure. The network number is limited to 32 bits.

struct	netent {
        char                *n_name;
        char               **n_aliases;
        int                  n_addrtype;
        unsigned long        n_net;
        }

*n_name
is the official name of net.

**n_aliases
is the alias list.

n_addrtype
is the net address type.

n_net
is the network number (32-bit limit).
The routines getnetbyname(SLIB), getnetbynumber and getnetent(SLIB) are the network counterparts to the host routines above.