[getdns-api] Changing the getdns transport options
Sara Dickinson
sara at sinodun.com
Wed Jun 17 18:54:10 CEST 2015
Hi All,
Thanks for all the comments. 2 minor updates on this.
1) I have done a test implementation of the new transport list (see pull request #104 if interested) and since the transport list is much more like the namespace list I propose we use the signature below instead of the one using a getdns_list I originally proposed:
getdns_return_t
getdns_context_set_dns_transport_list(
getdns_context *context,
size_t transport_count,
getdns_transport_list_t *transports);
with the text
“The 'transports' array contains an ordered list of transports that will be used for DNS lookups. The values are
GETDNS_TRANSPORT_UDP,
GETDNS_TRANSPORT_TCP,
GETDNS_TRANSPORT_TLS, or
GETDNS_TRANSPORT_STARTTLS”
There was discussion about changing the default to TCP in the call last week…..
2) I have left the existing transport methods untouched and mapped behaviour as closely as possible. If the list can’t be mapped to a getdns_transport_t the getter function returns GETDNS_RETURN_WRONG_TYPE_REQUESTED.
In addition, new context level options proposed for the API are:
getdns_return_t
getdns_context_set_idle_timeout(
getdns_context *context,
uint64_t timeout
);
Specifies number of milliseconds the API will leave an idle TCP, TLS or STARTTLS connection open for. The default is 0.
getdns_return_t
getdns_context_set_limit_queries_per_connection(
getdns_context *context,
uint16_t limit
);
Specifies the limit on the number of DNS queries that will be made on a TCP, TLS or STARTTLS connection. The API will close the existing connection if it is about to exceed this value and open a new connection. A value of 0 indicates that the number of DNS queries per connection is unlimited.
Regards
Sara.
> On 12 Jun 2015, at 00:23, Goyal, Neel <ngoyal at verisign.com> wrote:
>
> What about making it a new method to not break existing APIs / bindings - set_dns_transports (note the plural) or set_dns_transport_order? Internally the old method can just call this w/ a single element list, and the getter can return the head of the list.
>
> From: Sara Dickinson <sara at sinodun.com <mailto:sara at sinodun.com>>
> Date: Wednesday, June 10, 2015 at 11:28 AM
> To: "getdns-api at vpnc.org <mailto:getdns-api at vpnc.org>" <getdns-api at vpnc.org <mailto:getdns-api at vpnc.org>>
> Subject: Re: [getdns-api] Changing the getdns transport options
>
> Hi All,
>
> Following the earlier discussion of transport options I would like further comments on replacing the relevant part of section 8.3 of the API spec with the following:
>
>> getdns_return_t
>> getdns_context_set_dns_transport(
>> getdns_context *context,
>> getdns_list *transport_list
>> );
>> Specifies what transport is used for DNS lookups. The transport_list is an ordered list, values are GETDNS_TRANSPORT_UDP, GETDNS_TRANSPORT_TCP, GETDNS_TRANSPORT_STARTTLS , GETDNS_TRANSPORT_TLS.
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://getdnsapi.net/pipermail/spec/attachments/20150617/8ffb2c57/attachment.html>
-------------- next part --------------
_______________________________________________
getdns-api mailing list
getdns-api at vpnc.org
More information about the spec
mailing list