[getdns-api] getdns-api review - section 2.1
Paul Hoffman
paul.hoffman at vpnc.org
Wed Jan 29 14:34:52 MST 2014
On Jan 29, 2014, at 12:45 PM, Goyal, Neel <ngoyal at verisign.com> wrote:
> Hi all,
>
> This is commentary on section 2.1 in reference to Bob Steagall’s review of the getdns API - http://www.vpnc.org/pipermail/getdns-api/2014-January/000229.html
>
> The suggestion is to use enumerated types where possible. In particular, getdns_return_t and some context setter function parameters. An example would be:
>
>
> getdns_return_t getdns_context_set_resolution_type( getdns_context_t context, uint16_t value );
>
>
> The spec says the value must be either GETDNS_CONTEXT_RECURSING or GETDNS_CONTEXT_STUB.
>
> I am in favor of this change - definitely for getdns_return_t. The other functions will be a bit of work, but I think they do result in a cleaner API in the long run.
>
> Thoughts?
During the original design, the sentiment was against enumerateds for these types of lists because an implementation didn't know how big to make them. If we have a stated rule that all enumerated values will be less than 64K, that makes the implementations a bit more bounded.
--Paul Hoffman
More information about the getdns-api
mailing list