<div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:13px"><div id="yui_3_16_0_1_1417026960719_2998" dir="ltr"><span id="yui_3_16_0_1_1417026960719_3439">I'm not able to get a record browser doing what I want. I have modified </span><a class="" href="http://avahi.org/download/doxygen/client-browse-services_8c-example.html" style="color: rgb(61, 87, 140); text-decoration: none; padding: 2px; font-family: 'Lucida Grande', Verdana, Geneva, Arial, sans-serif; line-height: 16.8999996185303px; white-space: nowrap; background-color: rgb(249, 250, 252);" id="yui_3_16_0_1_1417026960719_3988">client-browse-services.c</a> to make a record browser instead of a service browser. </div><div id="yui_3_16_0_1_1417026960719_2998" dir="ltr"><span><br></span></div><div id="yui_3_16_0_1_1417026960719_2998" dir="ltr"><span id="yui_3_16_0_1_1417026960719_3007">avahi_record_browser_new(client, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "BRN30055C232008.local", AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_A, 0, browse_callback, client)<br></span></div><div id="yui_3_16_0_1_1417026960719_2998" dir="ltr"><span><br></span></div><div id="yui_3_16_0_1_1417026960719_2998" dir="ltr"><span id="yui_3_16_0_1_1417026960719_4579">I know my printer </span>BRN30055C232008.local is making DNS A announcements because I can see them in Wireshark. However I just get CACHE_EXHAUSTED then seg fault. I've tried different host names with and without the domain and sometimes that will get CACHE_EXHAUSTED, ALL_FOR_NOW instead of seg fault. I've also tried the hostnames with and without the domain of various Apple devices I know are making DNS A announcements.</div><div id="yui_3_16_0_1_1417026960719_2998" dir="ltr"><br></div><div id="yui_3_16_0_1_1417026960719_2998" dir="ltr">I know that my printer is also making _http._tcp service announcements as "Brother DCP-8011DN". If I pass "Brother DCP-8011DN" as the host name then I get:</div><div id="yui_3_16_0_1_1417026960719_2998" dir="ltr">CACHE_EXHAUSTED</div><div id="yui_3_16_0_1_1417026960719_2998" dir="ltr">DNS failure: NXDOMAIN</div><div id="yui_3_16_0_1_1417026960719_2998" dir="ltr"><br></div><div id="yui_3_16_0_1_1417026960719_2998" dir="ltr">That's the closest I get to an outcome. It's worrying because I don't only want to get the DNS A records of hosts that also advertise services, I just want to grab (preferably all) DNS A records that the daemon has in memory.</div><div id="yui_3_16_0_1_1417026960719_2998" dir="ltr"><br></div><div id="yui_3_16_0_1_1417026960719_2998" dir="ltr">Regards,</div><div id="yui_3_16_0_1_1417026960719_2998" dir="ltr"><br>Jonathan</div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;"> <div dir="ltr"> <font size="2" face="Arial"> On Tuesday, 25 November 2014, 16:38, Michael Jones <avahi@jonesmz.com> wrote:<br> </font> </div>  <br><br> <div class="y_msg_container"><div id="yiv4830283321"><div dir="ltr"><br><div class="yiv4830283321gmail_extra"><div class="yiv4830283321gmail_quote"><blockquote class="yiv4830283321gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;">
<br>
In the avahi-client C-API there is the concept of a Service Browser and a Record Browser. Service Browser sounds like what you are using now:<br>
<br>
| AvahiServiceBrowser* avahi_service_browser_new | ( | AvahiClient *  | client, |<br>
|  |  | AvahiIfIndex  | interface, |<br>
|  |  | AvahiProtocol  | protocol, |<br>
|  |  | const char *  | type, |<br>
|  |  | const char *  | domain, |<br>
|  |  | AvahiLookupFlags  | flags, |<br>
|  |  | AvahiServiceBrowserCallback  | callback, |<br>
|  |  | void *  | userdata  |<br>
|  | ) |<br>
<br>
<br>
The type being for example _http._tcp. Whereas a Record Browser looks like this:<br>
<br>
| AvahiRecordBrowser* avahi_record_browser_new | ( | AvahiClient *  | client, |<br>
|  |  | AvahiIfIndex  | interface, |<br>
|  |  | AvahiProtocol  | protocol, |<br>
|  |  | const char *  | name, |<br>
|  |  | uint16_t  | clazz, |<br>
|  |  | uint16_t  | type, |<br>
|  |  | AvahiLookupFlags  | flags, |<br>
|  |  | AvahiRecordBrowserCallback  | callback, |<br>
|  |  | void *  | userdata  |<br>
|  | ) |<br>
<br>
</blockquote></div><br></div><div class="yiv4830283321gmail_extra">Hi Jonathan,<br><br></div><div class="yiv4830283321gmail_extra">    Yea, that looks familiar. As far as I remember, the qtzeroconf (either the original, or my fork) doesn't use the avahi_record_browser api.<br><br></div><div class="yiv4830283321gmail_extra">    I'd be happy to collaborate with you on building support for that.<br><br></div><div class="yiv4830283321gmail_extra">    Should be pretty straight forward. Mostly we'll just need to copy and modify the ServiceBrowser class, I think. <br><br></div><div class="yiv4830283321gmail_extra">--Mike<br></div></div></div><br>_______________________________________________<br>avahi mailing list<br><a ymailto="mailto:avahi@lists.freedesktop.org" href="mailto:avahi@lists.freedesktop.org">avahi@lists.freedesktop.org</a><br><a href="http://lists.freedesktop.org/mailman/listinfo/avahi" target="_blank">http://lists.freedesktop.org/mailman/listinfo/avahi</a><br><br><br></div>  </div> </div>  </div> </div>