<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <div class="moz-cite-prefix">On 2016-12-13 05:34 PM, Till Kamppeter
      wrote:<br>
    </div>
    <blockquote
      cite="mid:f89c6c9d-fc13-9206-0aa9-807729dc43d7@gmail.com"
      type="cite">On 12/13/2016 08:22 PM, jbagg wrote:
      <br>
      <blockquote type="cite">I suspect you need to pass the ID of the
        local loopback network
        <br>
        interface instead of AVAHI_IF_UNSPEC.  From the avahi api
        <br>
        doc..."interface: The interface this service shall be announced
        on. We
        <br>
        recommend to pass AVAHI_IF_UNSPEC here, to announce on all
        interfaces."
        <br>
        <br>
      </blockquote>
      <br>
      And what is the ID of the local loopback network interface? This
      parameter must be given as an integer number.
      <br>
      <br>
         Till
      <br>
    </blockquote>
    Good question.  I would experiment with <b>getifaddrs()</b>.  Maybe
    if "lo" is the 2nd in the list, you pass integer 1, I don't know.<br>
    <br>
    <a class="moz-txt-link-freetext" href="http://man7.org/linux/man-pages/man3/getifaddrs.3.html">http://man7.org/linux/man-pages/man3/getifaddrs.3.html</a><br>
    <br>
    uint32_t n = 0;<br>
    getifaddrs(&ifaddr);<br>
    for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next)<br>
    {<br>
        if (!(strcmp(ifa->ifa_name, "lo")))<br>
            break;<br>
        n++;<br>
    }<br>
    freeifaddrs(ifaddr);<br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Jonathan Bagg
Embedded Systems Developer
NAD Electronics | Lenbrook Industries Limited
633 Granite Court, Pickering, Ontario, Canada L1W 3K1 | 905-831-0799 ext 4478 | <a class="moz-txt-link-freetext" href="http://www.nadelectronics.com">http://www.nadelectronics.com</a></pre>
  </body>
</html>