[avahi] Resolving multiple IPV6 address

Kevin Ediger kevin.ediger at licor.com
Fri Nov 7 07:32:15 PST 2008


Hello,
I'm writing a QT application that uses avahi to resolve IPV4 and IPV6 
addresses. I would like to have avahi return all IPV6 addresses 
registered to a particular host, but I've been unable to resolve more 
than 1. Sometimes I get the link-local and sometimes the globally scoped 
address. I tracked the issue to avahi-core/resolve-service.c in 
record_browser_callback() where it only reports the first address 
resolved. I included a patch that reports all addresses.

In order to resolve all addresses, the client must not free 
AvahiServiceResolver in the callback for the first address as in the 
example program client-browse-services.c in resolve_callback(). If the 
resolver is freed after receiving the first address, no more addresses 
will be sent.

Thanks.
-Kevin Edger

-- 
Kevin Ediger
Principal Design Engineer, Software
LI-COR Biosciences
Lincoln, NE
kevin.ediger at licor.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: avahi-resolve-multiple-ipv6.patch
Type: text/x-patch
Size: 925 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/avahi/attachments/20081107/62db942c/attachment.bin 


More information about the avahi mailing list