On Apr 26, 2006, at 10:13 AM, Lennart Poettering wrote:
On Wed, 26.04.06 16:53, anton feldmann ([EMAIL PROTECTED]
bielefeld.de) wrote:
Hi
my name is anton feldmann. I an student at university bielefeld
germany.
I wold like to know if it is possible to use avahi to write a
program,
which look in an local network for other computers and write the IP
addresses to a file, so the host list is automaticly updated?
If the other computers don't run an mDNS responder, this won't work.
If the other computers do run an mDNS responder but don't publish any
services, this won't work either.
If they run a responder and publish at least one service this might
work. However, it still is terribly ugly, since you'd need to browse
for all service types using an AvahiServiceTypeBrowser object which
causes a lot of traffic and shouldn't be used by real world
apps. There's a good reason why the mDNS/DNS-SD designers did not
support browsing for host names in their specs. They wanted to stress
that people should look for services and not for machines.
Avahi and newer MacOSX versions register a service "_workstation._tcp"
by default. You might have a chance to use that for your
purposes. However, YMMV, and not all mDNS responders publish it, most
notably Bonjour for Windows doesn't.
Also, future versions of Mac OS X will probably stop adverting the
"_workstation._tcp" service by default, since this service is
currently used by our Workgroup Manager application to configure
machines that are bound to a directory server, however, by default
most machines do not bind to a directory server so there's little
reason to advertise this by default.
-Marc
_______________________________________________
avahi mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/avahi