Network Address Translation

Network library subroutines enable an application program to locate and construct network addresses while using interprocess communication facilities in a distributed environment.

Locating a service on a remote host requires many levels of mapping before client and server can communicate. A network service is assigned a name that is intended to be understandable for a user; such as "the login server on host prospero." This name and the name of the peer host must then be translated into network addresses. Finally, the address must then be used to determine a physical location and route to the service.

Network library subroutines map:
  • Host names to network addresses
  • Network names to network numbers
  • Protocol names to protocol numbers
  • Service names to port numbers

Additional network library subroutines exist to simplify the manipulation of names and addresses.

An application program must include the netdb.h file when using any of the network library subroutines.

Note: All networking services return values in standard network byte order.