Subject: Re: Nameserver address which responded to query

Re: Nameserver address which responded to query

From: Manish Mehra <maneesh.mehra84_at_gmail.com>
Date: Tue, 5 Jan 2021 08:38:15 -0800

With ARES_FLAG_STAY_OPEN, will ares_getfds() always return one active
sockfd (associated with primary or secondary) assuming handle_error()
function cleans up socket state?

 If only one fd is returned, can we potentially use getpeername() on the
sockfd to fetch nameserver?

On Tue, Jan 5, 2021 at 6:41 AM Brad House <brad_at_brad-house.com> wrote:

> No, that information is not available in the callback.
>
> On 1/5/21 3:14 AM, Manish Mehra wrote:
> > Hi,
> >
> > In case of primary and secondary DNS nameservers, is there a way to
> > retrieve DNS server address which responded to DNS query? Our
> > application would like to gather this information for telemetry purposes.
> >
> > --
> > Best,
> > Manish
> >
>
>
Received on 2021-01-05