<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Harish,</p>
    <p><br>
    </p>
    <p>Not really.  In ldns there are functions to find information,
      like ldns_dnssec_zone_find_rrset that finds by name and rrset type
      in the information and that could be useful (depending on what you
      need).</p>
    <p>But unbound has libunbound, and it can return responses to a
      function call, and recent unbound versions have the auth-zone
      functionality.  This can be used to create a libunbound instance
      that returns authority zone responses for a query from zone file
      contents.  Right now that needs the libunbound call to read a
      unbound.conf file, that contains an auth-zone directive, with a
      zonefile pointed at where you want it.  And with for-downstream:
      yes specified; that makes it return authority responses to the
      libunbound calls, without that it would return recursive
      responses.</p>
    <p>If you then want to put that DNS response on the wire, and not do
      something else with it, then there are authority DNS servers that
      do the whole thing (a bit obvious, but I thought I would mention
      it), like NSD and unbound with auth-zone configured.</p>
    <p>If the something else you want to do just means change a couple
      of names, then unbound's local-data is in front of the auth-zone,
      and would be processed first.  It can do some things, eg. return
      that data instead.<br>
    </p>
    <p>Best regards, Wouter<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 20/09/18 18:58, Harish Holenarsipura
      Viswanatha wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAG0aUSg59V-e6qeNxkpZEf6ebiVfCmh5_jCE=RK1A03Pxz1Dgg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div dir="auto">Hi, 
        <div dir="auto"><br>
        </div>
        <div dir="auto">Is there away to generate DNS response  for a
          particular query from the zone file contents. </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Thanks</div>
        <div dir="auto">Harish </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
ldns-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ldns-users@nlnetlabs.nl">ldns-users@nlnetlabs.nl</a>
<a class="moz-txt-link-freetext" href="https://open.nlnetlabs.nl/mailman/listinfo/ldns-users">https://open.nlnetlabs.nl/mailman/listinfo/ldns-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>