Convert IP addresses to integers and vice versa