[avahi] Resolve multiple IP4 Addresses
lennart at poettering.net
Fri May 8 14:34:07 PDT 2009
On Fri, 08.05.09 10:56, Daniel Wynne (daniel.wynne at mobotix.com) wrote:
> Like Mr. Gollahon we also try to connect AXIS and related camera types.
> The cameras answer with several IPs. The order of arrival is not
> deterministic. Therefore WE have to decide which IP-Addresses we take
> into account. A single network interface might have more than one IP,
> which even might all be reachbale by the DNS-SD-client.
> Disregarding any issue of "misuse" respectively "unspecified usage", the
> DNS-SD interface should map the SPECS and not act as their guardian in
> any way. Since DNS-SD allows the sending of several addresses, the
> interface should deliver all of them to the user. In this issue I
> totally agree with Mr. Gollahon.
I mean, it's not that Avahi wouldn't allow you to get all
adresses. As mentioned, that's what the low-level AvahiRecordBrowser
may be used for.
> Is there a way to influence the timeouts of the ServiceResolver? We are
> resolving many devices and before all can be resolved we receive
The resolving timeout is hard-coded in Avahi (see TIMEOUT_MSEC in in
avahi-core/resolve-service.c). You can change it only by recompiling
> Is it a good practice to create a new ServiceResolver for every Service
> found immediately?
The whole reason why browsing and resolving are two different things
in mDNS/DNS-SD is to minimize traffic. i.e. first browse and show the
user a list and only when the user selects one specific item actually
Now, sometimes meta information about a service is needed at the
browsing stage already. Sometimes that can be accomplished by simple
putting it in the service name instead of the TXT data. Often enough
this isn't feasible however in which case the only option is to
immediately resolve every service you find when browsing.
So, in summary: don't do it. But when you can't do without it, then go
ahead and don't feel too bad about it. ;-)
> Is there a maximum number of registered ServiceResolvers?
Yes, we enforce limits on everything clients can do, for security
reasons. Currently each D-Bus client can have 250 objects at max. And
256 clients can be connected. See OBJECTS_PER_CLIENT_MAX/CLIENTS_MAX
at the top of avahi-daemon/dbus-internal.h.
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
More information about the avahi