I need to know the bellow code is correct to convert a IP address to equivalent decimal value ?
char ipChar[16];
struct in_addr ip;
printf("Read the IP Address to be converted\n");
scanf("%s",ipChar);
inet_aton(ipChar, &ip);
printf("ip address : %u\n", ip.s_addr);
If it is correct then the followed link
http://electrofriends.com/source-cod...-bit-long-int/ has used the unsigned long int to convert ip to decimal?
at the end can I save the ip.s_addr to a uint32_t variables for my own use?