transform ip to int