[avahi] Wide area support

Lennart Poettering lennart at poettering.de
Sun Sep 25 14:51:09 PDT 2005


Hi!

As some of you probably already noticed, current SVN of Avahi has
"wide area" support (i.e. DNS-SD over classic unicast DNS instead of
multicast DNS). 

To see how this works update your avahi installation and run
"avahi-browse -a -d 0pointer.de". This will show you a list of all
services published by 0pointer.de. Another interesting domain is
"dns-sd.org"

For now this is for browsing only, no support for publishing services
using wide area DNS. (this would require DNSSEC support, which is a
lot of work)

The wide area stuff comes with a few API changes. All
browsing/resolving functions now take an additional "flags" argument,
which can be used to specify the exact behaviour.  See the doxygen
docs for more information about the available flags.

In addition some new browse/resolve events are generated:

AVAHI_BROWSE_CACHE_EXHAUSTED:

        All entries from the cache have been dispatched. This is fired
        only once per browser, shortly after creating a browser object.

AVAHI_BROWSE_ALL_FOR_NOW:

        It is unlikely that there will be more entries returned in the
        near future. This is fired once only, shortly after creating a
        browser object. When it is fired the already read
        responses are a reliable complete list of currently available
        items on the net. On wide area DNS this is fired after he DNS
        server responded. On multicast DNS this is fired after the
        query existed for a second. 
        
AVAHI_BROWSER_NOT_FOUND/AVAHI_RESOLVER_NOT_FOUND:

        Only fired when using wide area lookups and the DNS server
        told us that the specific entry we were looking for doesn't
        exist.

AVAHI_BROWSER_FAILURE/AVAHI_RESOLVER_FAILURE

        Only fired when using wide area lookups and the DNS server
        failed due to some reason.

When porting programs from avahi 0.5 to avahi 0.6 (svn) you need to
make the following changes:

* pass 0 for the flags parameter for browse/resolve functions
* change the signature of your browse/resolve callbacks to take an
  extra flags argument
* make sure to handle the new browse/resolve events

wide area support is handled transparently for the user. i.e. if the
user browses ".local" mDNS is used. If he browses any other domain
unicast DNS is used. Using the "flags" argument the programmer can
force browsing/resolving via a specific protocol.

Wide area support is not well tested, feel free to help us with
testing.

Lennart

-- 
Lennart Poettering; lennart [at] poettering [dot] de
ICQ# 11060553; GPG 0x1A015CC4; http://0pointer.de/lennart/


More information about the avahi mailing list