avahi-browse or avahi-discover for Windows [closed]
Is there a Windows free (= libre) software analoguous to GNU/Linux avahi-browse
or avahi-discover
(which would discover avahi/bonjour services on the local network and list them)?
Since I have problems with Windows and Ubuntu 12.04 seeing (discovering) each other's samba services (similar to Ubuntu Samba server not discovered by Windows 7, Unable to browse shares on a Windows 7 x64 computer, https://askubuntu.com/questions/130522/windows-7-and-ubuntu-12-04-cant-connect-anymore), I'd better not try to solve these problems, but better go with more familiar protocols to make and discover services (ssh, sftp, ftp) on LAN, like avahi/bonjour.
Solution 1:
I have previously used the JmDNS java library to implement service discovery on Windows.
If you want to write client/server software in Java that uses zero-configuration service discovery based on mDNS then I would recommend using JmDNS, however the project does not appear to be currently active.
If you simply need to discover services on your network, I wrote a simple Java program several years ago that uses JmDNS. You can download the jar from my Dropbox (all dependencies are bundled inside): https://dl.dropboxusercontent.com/u/16311400/BonjourServiceDisco.jar
To run this program you will need Java installed and a Windows command shell:
java -jar BonjourServiceDisoc.jar
Unfortunately I have misplaced the source code, however from memory it simply makes one or two API calls to JmDNS to multicast a service-discovery request and then implements listeners to output the results to standard-output. JmDNS probably includes a test-program that does something very similar.
Solution 2:
There is a Mono implementation of zeroconf including Windows binaries at: http://www.mono-project.com/Mono.Zeroconf
The Mono.Zeroconf Windows binary relies on Apple's Bonjour service being installed on your system (its Apple's implementation of mDNS). If you don't have Bonjour installed you can just install Apple iTunes since it includes Bonjour.
I have posted two separate answers because the JmDNS and Mono.Zeroconf solutions differ in many respects such as implementation language, compatibility, bugs and features, so you will likely prefer to use one over the other.