[getdns-api] data structures/arguments to getdns_hostname and getdns_hostname_sync

Paul Hoffman paul.hoffman at vpnc.org
Wed Nov 20 09:34:04 MST 2013

On Nov 20, 2013, at 8:20 AM, Ray Bellis <Ray.Bellis at nominet.org.uk> wrote:

> On 20 Nov 2013, at 16:12, Matt Miller <linuxwolf at outer-planes.net> wrote:
>> What I've consistently seen done right is dealing with null-termination for ASCII strings.  What I've consistently seen done wrong is the preparing of whatever input the API user has into the actual on-the-wire address.
>> If not an ASCII null-terminated string, then we really ought to provide a helper function to do the most common preparation -- converting a string into binary address structure.
> With the caveat that it is actually possible to have both NULs (\0) and literal period characters (\. or \046) in a DNS label...
> I'm not arguing that we need to support this, just pointing out that it should be noted as a limitation of any such function.  Alternatively, that function could accept "master file format" escaped (null terminated) strings.

I think that Melinda was unclear in her message, and that the proposed change was *only* for addresses (IPv4 and IPv6), not host names. She was proposing that addresses for lookup could be supplied as an ASCII string such as "abcd:def0::1\0". Melinda, is that correct? If so, Ray's concern is not an issue. My objection (that addresses should be exactly the octets used) still stands.

--Paul Hoffman

More information about the getdns-api mailing list