The inet_ntoa() call returns a pointer to a string in dotted-decimal notation.
Syntax
#include <types.h> #include <arpa\inet.h> char *inet_ntoa(in) struct in_addr in;
Parameters
in
Description
This call returns a pointer to a string expressed in the dotted-decimal notation. The inet_ntoa() call accepts an internet address expressed as a 32-bit quantity in network-byte order and returns a string expressed in dotted-decimal notation. All internet addresses are returned in network order, with the first byte being the high-order byte.
Use C-language integers when specifying each part of a dotted-decimal notation.
Return Values
Returns a pointer to the internet address expressed in dotted-decimal notation. The return value points to static data that subsequent API calls can modify.
If the inet_ntoa() call is unsuccessful, the call returns a value of -1.
Related Calls
endhostent() endnetent()
gethostbyaddr()
gethostbyname()
getnetbyaddr()
getnetbyname()
getnetent()
inet_addr()
inet_netof()
inet_makeaddr()
inet_network()
sethostent()
setnetent()