![]() |
![]() |
![]() |
Convert an Internet address into a string
#include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> char* inet_ntoa_r( struct in_addr in, char* buffer, int bufflen );
libsocket
The inet_ntoa_r() function is a thread-safe version of inet_ntoa(). It converts an Internet address into a string (for example, "127.0.0.1""). For more information on this routine, see inet_aton().
The result is stored in buffer, which must be at least bufflen bytes long.
The result, or NULL if an error occurs (errno is set).
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
![]() |
![]() |
![]() |