Trying to fetch SRV data with libunbound / libldns
W.C.A. Wijngaards
wouter at nlnetlabs.nl
Thu May 12 14:16:55 UTC 2016
Hi Rick,
On 12/05/16 15:51, Rick van Rein via Unbound-users wrote:
> Hello,
>
> I'm trying to use libunbound (and possibly libldns) to pull out SRV
> records. I am not certain how to proceed, based on the documentation
> that I could found in the form of man pages, tutorials and doxygen.
>
> Am I correct that libunbound returns RDATA unmodified, and is basically
> concerned with the security chain but not the RDATA contents? And so,
> that I have to turn to another tool?
>
> I therefore looked at LDNS, but that does not seem to help either. I
> don't mind following the RFC (though in the case of SRV it is not
> explicit on the wire format) to pull out data, but I would be surprised
> if I was to make assumptions about the structure of hosts, especially
> because it may point back into a DNS packet. Is this really how it is
> done though? Then, should I assume the data[i]/len[i] to be pointers
> into the frame, and compute offsets manually?
The data[i] elements contain self-contained, uncompressed, rdata
elements that do not point to a packet somewhere.
For SRV that means there is an uncompressed domainname in there. In
wireformat. LDNS can parse the rdata in data[i].
Best regards, Wouter
>
> I can hardly believe that this hasn't been tried before :) but as I
> said, I can't find the documentation that answers this with clarity. So
> any help is welcome, including pointers to documentation that I've
> overlooked!
>
> Thanks,
> -Rick
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.nlnetlabs.nl/pipermail/unbound-users/attachments/20160512/b8332dc6/attachment.bin>
More information about the Unbound-users
mailing list