[avahi] avahi-core and what functionality it provides

Jim Hodapp james.hodapp at gmail.com
Tue Aug 12 13:39:24 PDT 2008


Thanks Trent for your reply. That answers all of my questions and will  
prove very useful for my project!

Jim


On Aug 12, 2008, at 6:22 AM, Trent Lloyd wrote:

> Hi Jim,
>
> On 12/08/2008, at 4:54 AM, Jim Hodapp wrote:
>
>> I need DNS-SD functionality on an embedded device that I'm making. I
>> noticed that avahi-core is recommended for this application type and
>> not avahi-client. What is the real difference between the two?
>
> Avahi-core is an "embeddable" version of the mDNS stack.  It runs in
> process, and should ideally only be used by 1 process.  This is what
> avahi-daemon/avahi-client use internally.
>
> This suggestion is because it would use less resources, most
> specifically it bypasses the need for d-bus which is a bit heavy on
> some embedded systems (but then again, the 'spec' of some embedded
> systems these days is insane...)
>
> Normally avahi-client interacts over d-bus to avahi-daemon which makes
> the avahi-core calls for you and allows you to efficiently and
> functionally use Avahi from multiple programs.
>
>> Is
>> there an example service publish/browse application using avahi-core
>> instead of avahi-client?
>
> Yes there are both core- and client- examples.
>
>>
>>
>> What doesn't avahi-core allow me to do?
>
> Use Avahi from more than 1 program.
>
>>
>>
>> Does avahi-core require the avahi-daemon to be running? Or can I just
>> make API calls via avahi-core without avahi-daemon running and does
>> this allow me to publish a service? How about browsing services
>> published on a network, is this possible without avahi-daemon?
>
> avahi-core does not use avahi-daemon.  all functions of avahi-client
> (well, most of them, browsing/publishing, etc, avahi-client has some
> convenience functions though) - are available in avahi-core - just
> with the aforementioned limit of only being usable from 1 application
> at once.
>
> In theory you can use it in multiple programs (multiple mDNS stacks
> can run on 1 machine) - in practice this can cause some problems and
> is best avoided and use avahi-daemon or something similar you make
> yourself to replace it if you need to remove the dbus and other
> dependencies (glib, etc)
>
> If you care to write a lighter-weight avahi-daemon for embedded usage,
> it would be create if you could contribute a generic one to the
> greater avahi project!
>
> Thanks,
> Trent
> _______________________________________________
> avahi mailing list
> avahi at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/avahi



More information about the avahi mailing list