inet_makeaddr()
Constructs an Internet (IP) address from an Internet network address and a local node address.
IPaddr = inet_makeaddr(net, node)
struct in_addr IPaddr;
u_long net, node;
IPaddr | Internet (IP) address constructed from the specified network |
| address and node address. |
| IP addresses for the Internet family are stored in an address |
| variable of type in_addr. Refer to •Preparing Socket |
| Addresses" in BSD IPC Reference Manual for NSARPA/1000 |
| and ARPA/1000 for more information on in_addr. |
net | Internet network number that defines the network on which a |
| node resides. The network number makes up a portion of an IP |
| address. |
node | Internet node address that defines the address of a node within |
| a network. The node address makes up a portion of an IP |
| address. |
inet_netof()
Breaks apart an IP address and returns the network address portion of the IP address.
network = inet_netof(IPaddr)
u_long network; struct in_addr IPaddr;
network | Network address portion of the IP address returned by |
| inet_netof(). |
IPaddr | IP address of the local host. IP addresses for the Internet |
| family are stored in an address variable of type in_addr. |
inet_network()
Interprets character strings representing numbers in the Internet standard •dot" notation, and returns numbers suitable for use as Internet network numbers.
network = inet_network(string)
struct in_addr network;
char*string;
network | Internet network number returned by inet_network(). |
string | Pointer to character string representing numbers expressed in |
| the Internet standard •dot" notation, such as: •192.41.233.2". |
| Terminate the string with the character \0. |
430 Berkeley Software Distribution Interprocess Communication