[getdns-api] "name" as passed to getdns() et al

Paul Hoffman paul.hoffman
Mon Jan 21 20:12:49 CET 2013


On Jan 21, 2013, at 8:49 AM, Ray Bellis <Ray.Bellis at nominet.org.uk> wrote:

> One thing I see in the API is that "name" is in human readable format.
> 
> This would make it impossible to look up any name where a label contains an embedded "."
> 
> It's also technically possible to have an embedded NUL in a label, which isn't friendly to C-style "char *" strings.
> 
> I don't know what the right "fix" would be, just pointing out a potential design flaw.

Good catch, this is indeed a design flaw, and it will be fixed. 

> Other APIs I've seen require labels like these to be encoded as if they were in "master file format".  Similarly, the RDATA output from some libraries (e.g. dnsjava) also appear in that format.

Using "master file format", more formally "the rules at the end of section 5.1 or RFC 1035", seems fine. I'll include some examples.

--Paul Hoffman





More information about the spec mailing list