[Pdns-dev] Translation from text or wire format to DNSResourceRecord

Jim McDonald Jim at mcdee.net
Wed Nov 15 11:01:45 UTC 2017


 

Hi,

   I'm writing a PowerDNS module that obtains data from an external source, 
and this data is being received in text or wire format.  For example, 
obtaining a test SOA record from the module's lookup() returns:


    example.com.    3600    IN      
SOA     ns1.example.com. hostmaster.example.com. 1 900 900 1800 60


in text format and


076578616d706c6503636f6d000006000100000e10003d036e7331076578616d706c6503636f6d000a686f73746d6173746572076578616d706c6503636f6d00000000010000038400000384000007080000003c


in wire format.  Is there some in-built way to translate either of these 
formats to a DNSResourceRecord so that it can be returned by the module's 
get()?


   Thanks in advance for any responses.


Cheers,

Jim.

 
 




More information about the Pdns-dev mailing list