IPv4 string->int

Does anyone know how to convert a IP address given as 'string' into a 'u_int32_t'? Are there any build any functions already?

See man inet_pton (POSIX). And maybe Beej's Guide to Network Programming.