Split get_host_ip function