getnetbyaddr()
Returns network information on the specified network number.
network = getnetbyaddr(net, type)
struct netent *network;
long | net; |
int | type; |
network | Pointer to a netent structure that contains network |
| information returned by getnetbyaddr(). |
| The netent structure is defined in the include files |
| <netdb.h>, SOCKET.PASI, and SOCKET.FTNI, for C, |
| Pascal, and FORTRAN programs, respectively. |
net | Network number from which to get network information. |
type | The socket address family type. It must be set to AF_INET. |
getnetbyname()
Returns network information on the specified network name.
network = getnetbyname(name)
struct netent | *network; |
char | *name; |
network | Pointer to a netent structure that contains network |
| information returned by getnetbyname(). |
| The netent structure is defined in the include files |
| <netdb.h>, SOCKET.PASI, and SOCKET.FTNI, for C, |
| Pascal, and FORTRAN programs, respectively. |
name | Pointer to string that contains the network name from which to |
| get network information. Terminate the name string with the |
| character \0. |
getnetent()
Reads the next line of the /etc/networks file and returns the network information.
network = getnetent()
struct netent *network;
network | Pointer to a netent structure that contains network |
| information returned by getnetent(). |
| The netent structure is defined in the include files |
| <netdb.h>, SOCKET.PASI, and SOCKET.FTNI, for C, |
| Pascal, and FORTRAN programs, respectively. |
424 Berkeley Software Distribution Interprocess Communication