z/OS Communications Server: IPv6 Network and Application Design Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Resolver API processing

z/OS Communications Server: IPv6 Network and Application Design Guide
SC27-3663-00

TCP/IP applications typically need to resolve a host name to an IP address and sometimes need to resolve an IP address to a host name. Applications perform this processing by invoking resolver APIs, such as gethostbyname() and gethostbyaddr(). A new set of resolver APIs was introduced to support IPv6. Applications that currently use resolver APIs need to be modified to use the new APIs in order to be enabled for IPv6. The older resolver APIs continue to be supported for IPv4 communications. For more information about resolver APIs, see Name and address resolution functions.
Table 1. Resolver API changes
Affected API call Required changes
gethostbyname() Use new getaddrinfo() API. This API can be used even if the system is not IPv6 enabled. Note that the freeaddrinfo() API needs to be issued to free up storage areas returned by the getaddrinfo() API.
gethostbyaddr() Use the new getnameinfo() API. This API can also be used on a system that is not IPv6 enabled.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014