A useful support function named inet_addr converts a dotted IP address to a 32-bit unsigned long integer quantity. The inet_addr function is defined as
unsigned long inet_addr( const char FAR *cp );
The cp field is a null-terminated character string that accepts an IP address in dotted notation. Note that this function returns an IP address as a 32-bit unsigned long integer in network-byte order.
From:Network Programming for Microsoft Windows 2nd.CHM