[avahi] Strange intermittent avahi-core example behaviour
David Lambert
dave at lambsys.com
Tue Oct 14 09:12:44 PDT 2008
I wrote a simple embedded browser based upon the core-browse-services.c
in the examples directory. I noticed that my browser was occasionally
giving me strange addresses when attempting to resolve a service. In
order to attempt to narrow down this problem I reverted to the original
example file, and found the same problem. Since then I have added the
following code (in red) to core-browse-services.c to attempt to track
the problem further:
case AVAHI_RESOLVER_FOUND: {
char a[AVAHI_ADDRESS_STR_MAX], *t;
fprintf(stderr, "(Resolver) Service '%s' of type '%s' in
domain '%s':\n", name, type, domain);
avahi_address_snprint(a, sizeof(a), address);
{
int ia, ib, ic, id;
if (sscanf(a, "%d.%d.%d.%d", &ia, &ib,&ic, &id) != 4) {
fprintf(stderr, "Suspicious address\n");
fprintf(stderr, "Avahi address protocol:%d,
address:%#010lX\n",
address->proto, address->data.ipv4);\
exit (1);
}
}
t = avahi_string_list_to_string(txt);
The printout from core-browse-services is now:
(Browser) NEW: service 'Web Configuration on - visualproof' of type
'_http._tcp' in domain 'local'
(Resolver) Service 'Web Configuration on - visualproof' of type
'_http._tcp' in domain 'local':
visualproof.local:80 (192.168.2.10)
TXT=
cookie is 0
is_local: 0
wide_area: 0
multicast: 1
cached: 1
(Browser) NEW: service 'Firefly svn-1696 on abraxas-studio' of type
'_http._tcp' in domain 'local'
(Resolver) Service 'Firefly svn-1696 on abraxas-studio' of type
'_http._tcp' in domain 'local':
Suspicious address
Avahi address protocol:1, address:0X000080FE
#
Please note that this is very intermittent (~once in 100), but always
seems to return the same suspicious address 0X000080FE (254.128.0.0) but
not always on the same service.
Any help would be greatly appreciated.
Dave.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/avahi/attachments/20081014/dc8d5300/attachment.html
More information about the avahi
mailing list