c-ares icon indicating copy to clipboard operation
c-ares copied to clipboard

Support mDNS

Open Caligatio opened this issue 8 years ago • 2 comments

I would like to use c-ares in my Python asynchronous mDNS library but I need the ability for the underlying DNS logic to join a multicast group. I wasn't familiar at all with this process but, at a minimum it requires setting the socket option IP_ADD_MEMBERSHIP with the desired multicast group for the listening socket.

I think the rest of the multicast specific functionality can be hacked in using the existing functions (e.g. setting the destination "server" to be the multicast address).

Caligatio avatar Jan 14 '18 08:01 Caligatio

Would setting the socket creation callback or the socket configuration callback do what you need? You could have a callback that set the multicast option you needed.

daviddrysdale avatar Jan 14 '18 13:01 daviddrysdale

I think the issue title is misleading as really what he is asking for (and what brought me here) is "Multicast DNS", not "multicast IP addresses".

https://en.wikipedia.org/wiki/Multicast_DNS (also called 'mDNS')

These take the form of hostname.local on your LAN and are provided on linux by avahi-daemon, by default on MacOS, and optionally by systemd on linux.

jblachly avatar Feb 23 '22 20:02 jblachly