Changed lookup_connection to use struct addrinfo