This function finds the first host with the specified name or alias in the hosts database, or using DNS/BIND. The gethostbyname() function uses a common static area for its return values. This means that subsequent calls to this function overwrite previously returned host entries. You must make a copy of the host entry if you want to save it.