I want to use getaddrinfo() but get only the first result.
more specifically, I want the function to first scan the hosts file and fetch the first result found, and only if not found in hosts I want to query the dns server.
is it possible?
thanks.