[avahi] Is there a way to set up Avahi to implement "anycast name resolution" on a LAN?

Jeremy Friesner jaf at meyersound.com
Fri Jun 3 16:04:38 PDT 2011


Hi Andrew,

Andrew Tunnell-Jones wrote:
> The Avahi API could be used to register one or more CNAME records
> (there is an example on the wiki)

Thanks!  I was able to rewrite that Python example into C and get it to work.   I've posted the resulting C source code here, in case it might be helpful to anyone:

    https://public.msli.com/lcs/jaf/publish_cnames.c

> but it seems a little odd to me --
> is there a reason you're not using service discovery to find the HTTP
> services? It's a checkbox to enable Bonjour in Safari and Bonjour for
> Windows includes a plugin for IE. There's also an extension available
> for the Windows and OS X versions of Firefox.

If it was only web browsers I wanted to support, the above would probably be sufficient... but these Linux boxes also run other servers, for which the corresponding client executables do not have any Bonjour support compiled in to them.  Those clients to support connecting to a specified hostname and port, however, so (when running on a computer with mDNS active) they should be able to make use of the CNAME records without a recompile.

-Jeremy



More information about the avahi mailing list