C - inet_ntop ========================= Public domain ******************************************************************************** ### inet_ntop : convert IPv4 and IPv6 addresses from binary to text form #include #include #include int main() { char dst[INET_ADDRSTRLEN]; struct in_addr src; src.s_addr = 0x142AAA53; inet_ntop(AF_INET, &src, dst, INET_ADDRSTRLEN); printf("Network = %X\n", src.s_addr); printf("Presentation = %s\n", dst); return 0; } ******************************************************************************** _BY: Pejman Moghadam_ _TAG: c, inet-ntop_ _DATE: 2014-01-21 02:04:33_