[ldns-users] Access to raw rdata in ressource records
Wouter Wijngaards
wouter at NLnetLabs.nl
Wed May 2 15:42:48 UTC 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Simon Vallet wrote:
> On Wed, 02 May 2007 16:04:35 +0200
> Jelte Jansen <jelte at NLnetLabs.nl> wrote:
>> Simon Vallet wrote:
>
>> Cool, let me know how you are faring, and how we can improve on ldns.
>
> I certainly will
>
>>> Looking a bit at the API documentation, I wonder wether it is possible
>>> to have access to the raw rdata in an RR (i.e. a size and a void *,
>>> rather than an ldns_rdf **). Best for us would be to have a drop-in
>>> replacement for more common resolver functions, and as some apps do the
>>> rdata parsing themselves, I'd rather not reassemble a raw rdata to
>>> parse it again once we're out of the compatibility layer.
>>>
>> For individual rdata fields, or do you want to read out the complete
>> rdata from an rr in one void*?
>
> Well, access to individual rdata fields is practical, since it is
> already parsed in an ldns_rdf **. But what I'm looking for is a pointer
> to the complete rdata from an rr, yes.
>
> It is not a big problem, since reassembling it from the ldns_rdf array
> is quite trivial, but I just wanted to make sure it was necessary. It
> seems the answer is yes.
Well you can also use ldns_rdf2wire(), it will give you a void* and
size_t. You can find its description in host2wire.h.
Best regards,
Wouter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFGOLF4kDLqNwOhpPgRAjlhAJ9uA23Eg92QpyJ1RtmE0a23q4KsWQCfbwFK
FXV8A9ObQzaujCW0JjkFQUg=
=RQjC
-----END PGP SIGNATURE-----
More information about the ldns-users
mailing list