Is there an easy way to scan a given network for Bonjour/Zeroconf services?
I have a set of computers (Linux, Windows, Apple) and would like to auto-generate a list of all available Zeroconf-capable, networked nodes in my Intranet.
If using Linux and the Avahi-Daemon, it looks like Avahi-Discover is worth an investigation.
You'll obviously have to download/install/launch it though. On Ubuntu/Debian, you can use the following:
% sudo apt-get install avahi-discover
And launch GUI with:
% avahi-discover
I haven't used it, but you might want to take a look at the Mono Project's Zeroconf library.
It looks like they have a query tool mzclient
that may help you.
If nothing else, you should be able to build something in C# using that library.
By far the most reliable method (I've tried all these, building a MDNS capable embedded product) is to use the opensource 'Bonjour'. This is the mDNSResponder daemon, and its available here:
http://opensource.apple.com/source/mDNSResponder/mDNSResponder-320.10/
mDNSResponder package has a Java JNI library and examples which let you poll all the available services.
@EdH, thanks for your post. I up voted it. I haven't tried Mono.Zeroconf yet, but I am positive that it will work since Bonjour/Zeroconf has changed very little in the last couple years. I am only looking for basic functionalities like service publish and discovery. The mzclient seems a nice location to start with. I dug out the git location for the source: mzclient on github . Hope this helps others looking for a similar solution :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With