[getdns-api] On multiple call types and their arguments

Paul Hoffman paul.hoffman at vpnc.org
Mon Feb 11 16:14:14 MST 2013


Sorry for the delay on this; thread topic changed.

On Feb 4, 2013, at 7:12 AM, Dan Winship <dan.winship at gmail.com> wrote:

>> One still-problematic part of the design is that not everything that
>> seems like a query to the DNS is actually a DNS query.
> 
> Yeah. So one way to deal with this would be to split up the API:
> 
>  getdns_address() - replaces getaddrinfo(), uses both DNS and
>    non-DNS sources
> 
>  getdns_hostname() - replaces getnameinfo(), uses both DNS and
>    non-DNS sources
> 
>  getdns_service() - does DNS SRV lookups
> 
>  getdns() - does generic DNS lookups

At a high level:

- By separating getdns_address() from getdns(), you are asking the application programmer to care about whether or not they want to get non-DNS answers to DNS-name-like queries. Is that a good idea? When would an application *not* want a reply that was like getaddrinfo()? My gut says to only go with one of them, the one that does getaddrinfo(), but I'm open to comments.

- I like the separating out of getdns_hostname() from getdns_address() / getdns(). This simplifies the logic for the vast majority of requests.

- I don't understand the value of getdns_service(), but there are some application developers on the list who use SRV, so they can comment. The proposed description is:

> getdns_service()
> 
> Another simplified form; does DNS SRV lookups and returns the
> equivalent of the srv_addresses special case in the existing spec.
> Maybe it should guarantee that it always includes the corresponding
> IP addresses too? (That is, if the server response doesn't include
> the A/AAAA records as additional responses, getdns_service() will
> automatically do a second lookup and merge the results together.)


Comments on all of these issues are appreciated.

--Paul Hoffman




More information about the getdns-api mailing list