Reputation: 1113
Is there a library or open sourced Obj C code that will let me sniff for all advertised Bonjour services on a network? Best if it works on Mac OS X or iOS.
Thx all.
Upvotes: 0
Views: 1440
Reputation: 6723
You're spoilt for choice.
OS X ships with the mdns
command for registering and browsing services on the link-local network. To browse for advertised websites (normally services of type _http._tcp.
) you'd do this:
mdns -B _http._tcp
And a list will return and update pretty much instantly as things appear/disappear. Yes, it's open-sourced. Apple's C-based implementation of multicast DNS (both library and tools) compiles without much hassle on most *NIXes.
If you're looking for a GUI tool, I find the bonjour browser app from Tildesoft pretty useful.
If you don't want to use mdns
to advertise your own services try the network beacon.
Upvotes: 4