Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In the following sections, we describe the older, now obsolete functions for converting host names and service names to and from binary and presentation formats. Although new programs should perform these conversions using the modern functions described earlier in this chapter, a knowledge of the obsolete functions is useful because we may encounter them in older code.
The inet_aton() and inet_ntoa() functions convert IPv4 addresses between dotted-decimal notation and binary form (in network byte order). These functions are nowadays made obsolete by inet_pton() and inet_ntop().