Use addrinfo struct instead of sockaddr_in/sockaddr_in6