avahi / avahi

Avahi - Service Discovery for Linux using mDNS/DNS-SD -- compatible with Bonjour
http://www.avahi.org
GNU Lesser General Public License v2.1
1.17k stars 325 forks source link

Could AvahiServiceResolverCallback get all the IP addresses of the DNS-SD response? #476

Open wqx6 opened 11 months ago

wqx6 commented 11 months ago

I can only get one IP address in AvahiServiceResolverCallback, but the DNS-SD query response might include several IP address, How can I get all the IP addresses for service resolving?

wqx6 commented 2 months ago

There could be multiple AAAA type answers in resolve response, but the AvahiServiceResolverCallback will only pass one address of the AAAA answers. Is there a method to get all the AAAA answers?

evverx commented 2 months ago

It should be possible to take the hostname, create an AAAA record browser using avahi_record_browser_new and collect all the AAAA RRs. If they are all in the cache the AVAHI_BROWSER_CACHE_EXHAUSTED event can be used to stop the browser.