[getdns-api] getdns-api review - section 2.1

Wiley, Glen gwiley at verisign.com
Thu Jan 30 07:48:29 MST 2014


Paul, that is a reasonable concern and I think we can bound this via
contract (in the specification).  The extra type checking would certainly
be nice.
-- 
Glen Wiley
KK4SFV

Sr. Engineer
The Hive, Verisign, Inc.




On 1/29/14 4:34 PM, "Paul Hoffman" <paul.hoffman at vpnc.org> wrote:

>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
>_______________________________________________
>getdns-api mailing list
>getdns-api at vpnc.org




More information about the getdns-api mailing list