I've been writing a client on linux/UNIX for a while using the raw mDNS
calls,
because I couldn't find the DNSService calls in the 58.8 distribution,
despite the presence of include/dns_sd.h.
Yes,, I see dhssd* stuff in mDNSShared, but there is no Makefile for
it,
nor make instructions. Running make in the mDNSPosix directory left
me .o's I could link against, so I've been using them.
Oh, enlightened ones, what should I have built and been using
as environment on posix systems? How should I have built it?
Go to the mDNSPosix directory and do something like: make os=linux
It will create a build/prod directory that contains binaries (make
os=linux install will do too)
The ReadMe.txt in the same directory says more.
I use the CVS version of the service and that works quite well on
panther as well as linux. (just had to hack the deamon scripts a little
to my own distribution on linux) (see:
http://developer.apple.com/darwin/tools/cvs/howto.html )
Also, I am seeing that mDNS_StartResolveService will never complete
if there is no mDNS resolution of the host in question. I'm not sure
that is a feature if the name is resolvable by plain DNS, or is
a dotted decimal name.
Include the dns_sd.h header and link against the libdns_sd.so and you
can use the DNSServiceBrowse and DNSServiceResolve to find services and
their IP address. (as I just learned a day ago :) )