Say if you have the following IP address:
192.168.0.255
How can I store that human readable IP address into a struct in_addr
? I'm brand new to network programming in C at this low level, so any help would be greatly appreciated.
You can do
struct in_addr p;
inet_aton("192.168.0.255", &p.s_addr);