Converts an IP address into a text string representing the
address in the standard internet dotted-decimal format.
Format
#include <in.h>
#include <inet.h>
char *inet_ntoa ( struct in_addr in );
1 – Argument
in
An IP address in network byte order.
2 – Description
This function converts an IP address into an ASCII (null-
terminated) string that represents the address in standard
internet dotted-decimal format.
The string is returned in a static buffer that is overwritten by
subsequent calls to inet_ntoa(). If you want to save the text
string, you should copy it.
3 – Return Value
x A pointer to a string containing the IP
address in dotted-decimal format.