1*cbf71a81SAugustin Cavalier #include <arpa/inet.h> 2*cbf71a81SAugustin Cavalier #include <stdio.h> 3*cbf71a81SAugustin Cavalier inet_ntoa(struct in_addr in)4*cbf71a81SAugustin Cavalierchar *inet_ntoa(struct in_addr in) 5*cbf71a81SAugustin Cavalier { 6*cbf71a81SAugustin Cavalier static char buf[16]; 7*cbf71a81SAugustin Cavalier unsigned char *a = (void *)∈ 8*cbf71a81SAugustin Cavalier snprintf(buf, sizeof buf, "%d.%d.%d.%d", a[0], a[1], a[2], a[3]); 9*cbf71a81SAugustin Cavalier return buf; 10*cbf71a81SAugustin Cavalier } 11