>>/I suspect you need to pass the ID of the local loopback network />>/interface instead of AVAHI_IF_UNSPEC. From the avahi api 
/>>/doc..."interface: The interface this service shall be announced on. We />>/recommend to pass AVAHI_IF_UNSPEC here, to 
announce on all interfaces." />>//>//>/And what is the ID of the local loopback network interface? This />/parameter must be 
given as an integer number. />//>/Till /Good question.  I would experiment with *getifaddrs()*.  Maybe if "lo"
is the 2nd in the list, you pass integer 1, I don't know.

http://man7.org/linux/man-pages/man3/getifaddrs.3.html

uint32_t n = 0;
getifaddrs(&ifaddr);
for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next)
{
      if (!(strcmp(ifa->ifa_name, "lo")))
          break;
      n++;
}
freeifaddrs(ifaddr);
The interface index doesn't have anything to do with the order in the getifaddrs list. You probably want if_nametoindex("lo")

http://man7.org/linux/man-pages/man3/if_indextoname.3.html

_______________________________________________
avahi mailing list
avahi@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/avahi

Reply via email to