[avahi] Bonjour emulation by Avahi on Ubuntu
gaspard at teti.ch
Wed Mar 14 00:49:04 PDT 2012
Avahi can be difficult to grok... I just went through this transition and
it was not easy due to missing docs for low level stuff such as the PollApi.
Here is some advice depending on your situation:
A. You want to avoid creating new threads and use your own select/poll:
You have to create a AvahiWatch and AvahiTimer classes that will insert
file descriptors into your event loop. See poll API for
Lua bindings for
both mac and linux code) as examples.
B. You can live with some extra threads:
Use the AvahiThreadedPoll <http://avahi.org/wiki/RunningAvahiClientAsThread> to
run avahi in its own event loop.
C. You use Qt or Glib as event loop: you can use libavahi-qt
and libavahi-glib respectively.
On Tue, Feb 21, 2012 at 1:31 AM, Kirk Reistroffer <kreistroffer at kace.com>wrote:
> I have a Bonjour-aware service in development and running on OSX and
> Windows. I'm currently moving it onto Linux flavors and am looking for
> advice on how best to proceed with that.
> It appears that Avahi is a preferred Linux native zeroconf
> implementation and I see that there's been some collaboration between Apple
> and the Avahi project in the past, leading to an Avahi supplied replacement
> dns_sd.h and an avahi-compat-libdns_sd library. I'm looking for
> information on how to initially make use of the compatibility library. I'm
> expecting that I'll eventually need to re-implement the zeroconf parts of
> the app to the Avahi API on Linux but hope to more immediately get a Linux
> build that plays well/ok with its peers for POC.
> I haven't yet found a spot on www.avahi.org that describes how to build
> the first step. I've substituted the Avahi dns_sd.h (which appears to be a
> subset of Apple's dns_sd.h) and link with libavahi-common.so. I've tried:
> > sudo apt-get install libavahi-compat-libdnssd1
> That appears to be a source download and I'm trying to get all of its
> dependencies via ./configure in its avahi-0.6.31 directory. I'm guessing
> that will eventually get me a libavahi-compat-libdnssd1.so to add to my app
> It seems that the standard Avahi .so's are pre-installed in Ubuntu 11 but
> the compatibility libraries aren't so I think I have to build it locally
> and add it to /usr/lib with the other libavahi-*.so files. Am I on the
> right track?
> avahi mailing list
> avahi at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the avahi