Convert an Internet address into a string
#include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> char * inet_ntoa( struct in_addr in );
libsocket
Use the -l socket option to qcc to link against this library.
The inet_ntoa() routine converts an IPv4 Internet address into an ASCII string representing the address in dot notation (for example, “127.0.0.1”).
For more information on Internet addresses, see inet_net_ntop().
A string representing an Internet address.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | No |
The string returned by this function is stored in a static buffer that's reused for every call to inet_ntoa(). For a thread-safe version, see inet_ntoa_r().