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

Ray Bellis Ray.Bellis at nominet.org.uk
Wed Nov 20 09:20:47 MST 2013

On 20 Nov 2013, at 16:12, Matt Miller <linuxwolf at outer-planes.net<mailto: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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vpnc.org/pipermail/getdns-api/attachments/20131120/737a9aab/attachment.html>

More information about the getdns-api mailing list