I made a decision to try some linux programming this weekend. I wanted to
try out the inet_aton function which is supposed to convert a normal ip to
its decimal value right?
here is the problem. When i run the program and pass it 192.168.0.1 it
unfortunately that integer is the decimal value of 220.127.116.11
18.104.22.168 returns 1
0.0.0.1 returns 16777216
everything is backwards!
needlesss to say i am a little confused. Any help would be greatly
Here is the code i used:
int main (int argc, char **argv)
struct in_addr FullAddress;
printf("You did not provide a parameter!\n");
ipaddr = argv;
printf("The Decimal value of your ip is: %lu\n", FullAddress);