add defined to $ip and $name