In this post I am going to focus on the common IP version dependencies that exist in application. (You can read the previous post here).  The following points summarize the common IP version dependencies:

  • Presentation format for an IP address: IPv4 and IPv6 do not use the same presentation format.  IPv4 (32 bit) uses a dot (.) to separate the four octets written in decimal notation, and IPv6 (128 bit) uses a colon (:) to separate each pair of octets written in hexadecimal notation. The string buffers used to hold the addresses should be changed to accommodate IPv6 addresses.
  • Transport Layer API: Communication applications often include a transport module that establishes communications.  Usually this module manages everything related to communications and uses a transport-layer API, typically as a network library. Generic data structures which can store any address family needs to be used. Protocol independent API’s should be used for communication.
  • Name and Address resolution: With IPv6, there are two new basic resolution functions, getaddrinfo() and getnameinfo().  The first returns a list of all configured IP addresses for a hostname. These queries can be constrained to one protocol family; for instance, only IPv4 or only IPv6 addresses.  The second function returns the hostname associated to an IP address. The application should try out each of these returned IP addresses till the communication with the remote host succeeds.
  • IP Address selection: Unlike the IPv4 model, IPv6 promotes the configuration of multiple IP addresses per node, however, applications only use a destination/source pair for a communication.  Unless applications have a specific reason to select any particular destination address, they should try each element in the list until the communication succeeds.
  • DNS does not indicate which IP version will be used: The DNS name resolution issue related to application transition is that by only doing a DNS name lookup a client application cannot be certain of the version of the peer application.
  • Multi cast applications: When multicast facilities are used some changes must be carried out to support IPv6.  Applications must change the IPv4 multicast addresses to IPv6 ones and the socket configuration options must be changed.

(Source: IETF RFC 4038)