added function to convert string repr of IP addr to int repr of IP