Name-to-address mapping enables an application to obtain the address of a service on a specified host independent of the transport used. Name-to-address mapping consists of the following interfaces:
Maps the host and service name to a set of addresses
Maps addresses into host and service names
Frees structures allocated by the name-to-address translation routines
Translates an address and returns a transport-independent character representation of the address
The universal address is translated into a netbuf structure
Interfaces to transport-specific capabilities such as the broadcast address and reserved port facilities of TCP and UDP
Displays a message stating why one of the routines that map name-to-address failed on stderr.
Returns a string containing the error message stating why one of the routines that map name-to-address failed.
The first argument of each routine points to a netconfig(4) structure that describes a transport. The routine uses the array of directory-lookup library paths in the netconfig(4) structure to call each path until the translation succeeds.
The name-to-address libraries are described in Table 10–1. The routines that are described in Using the Name-to-Address Mapping Routines are defined in the netdir(3NSL) man page.
|