getaddrinfo function being used instead of gethostbyname