Added get_local_ip function