I want to make improvements to the Go library for mDNS: https://github.com/davecheney/mdns/
I spoke with an author who simply says: “I got to the point that it worked for me,” and it’s fine, good in the spirit of open source.
He mentioned some compatibility issues with the Avahi, Bonjour, and dns-sd detection tools, not finding the services he exported.
I want to understand what records Avahi publishes when performing a simple service with a port and a simple name.
I was expecting the appropriate version:
dig @localhost .local -t AXFR
Avahi may be exporting it to the zone, but it didn’t work for me (cue “you are doing it wrong”!). I would like to understand the minimum records exported by a typical Avahi service, and learn the same from the automatically exported Lee-Hambleys-Macbook.local from the Apple implementation on my laptop that I could improve Go lang support for mDNS.
When other people work with Avahi / Bonjour / mDNS, what tools do they use to find and verify that everything is working as expected?
The kind #avahi people were kind enough to give me the following advice:
killall -USR1 avahi-daemon
This causes avahi-daemon dump the zone file in syslog .
But ideally, I would like to know what is the best way to request a server, tcpdump also looks promising, but it still shows only the records that are looking for, and not a complete dump of everything in the zone:
sudo tcpdump dst port 53 Password: tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on en0, link-type EN10MB (Ethernet), capture size 65535 bytes 09:43:28.883763 IP 192.168.178.41.50916 > resolver2.opendns.com.domain: 50479+ A? e3191.c.akamaiedge.net. (40) 09:43:29.046201 IP 192.168.178.41.61989 > resolver2.opendns.com.domain: 55378+ PTR? 251.0.0.224.in-addr.arpa. (42) 09:43:29.123784 IP 192.168.178.41.56659 > resolver2.opendns.com.domain: 26471+ A? p05-btmmdns.icloud.com.akadns.net. (51) 09:43:29.819277 IP 192.168.178.41.53504 > resolver2.opendns.com.domain: 32010+ PTR? 220.220.67.208.in-addr.arpa. (45) 09:43:47.379251 IP 192.168.178.41.50916 > resolver2.opendns.com.domain: 50479+ A? e3191.c.akamaiedge.net. (40) 09:43:55.900406 IP 192.168.178.41.60511 > resolver2.opendns.com.domain: 32846+ AAAA? lc22.prod.livefyre.com. (40) 09:44:04.115159 IP 192.168.178.41.50916 > resolver2.opendns.com.domain: 50479+ A? e3191.c.akamaiedge.net. (40) ^C 7 packets captured 3187 packets received by filter 0 packets dropped by kernel