<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>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.</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Sara Dickinson <<a href="mailto:sara@sinodun.com">sara@sinodun.com</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, June 10, 2015 at 11:28 AM<br>
<span style="font-weight:bold">To: </span>"<a href="mailto:getdns-api@vpnc.org">getdns-api@vpnc.org</a>" <<a href="mailto:getdns-api@vpnc.org">getdns-api@vpnc.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [getdns-api] Changing the getdns transport options<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div>Hi All, </div>
<div><br class="">
</div>
<div class="">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:</div>
<div class=""><span style="text-shadow: rgba(0, 0, 0, 0.333333) 0px 1px 10px;" class=""><br class="">
</span></div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class="">
<div class=""><span style="widows: 1; background-color: rgb(255, 255, 255);" class=""><font color="#333333" class=""><span style="line-height: 20px; white-space: pre;" class="">getdns_return_t</span></font></span></div>
<div class=""><span style="widows: 1; background-color: rgb(255, 255, 255);" class=""><font color="#333333" class=""><span style="line-height: 20px; white-space: pre;" class="">getdns_context_set_dns_transport(</span></font></span></div>
<div class=""><span style="widows: 1; background-color: rgb(255, 255, 255);" class=""><font color="#333333" class=""><span style="line-height: 20px; white-space: pre;" class="">getdns_context *context,</span></font></span></div>
<div class=""><span style="widows: 1; background-color: rgb(255, 255, 255);" class=""><font color="#333333" class=""><span style="line-height: 20px; white-space: pre;" class="">getdns_list *transport_list</span></font></span></div>
<div class=""><span style="widows: 1; background-color: rgb(255, 255, 255);" class=""><font color="#333333" class=""><span style="line-height: 20px; white-space: pre;" class="">);</span></font></span></div>
<div class="">
<p style="margin: 10px 0px 0px; padding: 0px; widows: 1; background-color: rgb(255, 255, 255);" class="">
<font color="#333333" class=""><span style="line-height: 18.18181800842285px;" class="">Specifies what transport is used for DNS lookups. </span><span style="line-height: 18.1818180084229px;" class="">The transport_list is an ordered list, values are </span></font><span style="color: rgb(51, 51, 51); line-height: 18.1818180084229px;" class="">GETDNS_TRANSPORT_</span><span style="color: rgb(51, 51, 51); line-height: 18.1818180084229px;" class="">UDP, </span><span style="color: rgb(51, 51, 51); line-height: 18.1818180084229px;" class="">GETDNS_TRANSPORT_</span><span style="color: rgb(51, 51, 51); line-height: 18.1818180084229px;" class="">TCP, </span><span style="color: rgb(51, 51, 51); line-height: 18.1818180084229px;" class="">GETDNS_TRANSPORT_</span><span style="color: rgb(51, 51, 51); line-height: 18.1818180084229px;" class="">STARTTLS
, </span><span style="color: rgb(51, 51, 51); line-height: 18.1818180084229px;" class="">GETDNS_TRANSPORT_</span><font color="#333333" class=""><span style="line-height: 18.1818180084229px;" class="">TLS. </span></font></p>
</div>
</blockquote>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class="">
<div class=""><br class="">
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">[I presume the BOLD type face on the web page denotes the default, in which case it would be <span style="color: rgb(51, 51, 51); line-height: 18.18181800842285px; widows: 1; background-color: rgb(255, 255, 255);" class="">GETDNS_TRANSPORT_UDP, </span><span style="color: rgb(51, 51, 51); widows: 1; background-color: rgb(255, 255, 255); line-height: 1.4285715;" class="">GETDNS_TRANSPORT_TCP</span>]</div>
<div class=""><br class="">
</div>
<div class="">And adding in section 8.7:</div>
<div class=""><br class="">
</div>
<div class=""><span class="Apple-tab-span" style="white-space:pre"></span>It might also contain tls_port to specify which port to use to contact these DNS servers when using TLS; the default is recommended as 1021 in lieu of an assignment from IANA.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">API Notes</div>
<div class="">--------</div>
<div style="widows: auto;" class="">1) For all TCP based connections:</div>
<div class="">
<div class=""><br class="">
</div>
<div class=""> — It is suggested from the default idle time should be 0. This is because several widely used server implementations (including BIND and Unbound) have a default configuration which cannot handle many long-lived TCP connections well. </div>
<div class=""><br class="">
</div>
<div class=""> — The DNSOP WG is in the process of discussing protocol options to establish behaviour for long lived DNS-over-TCP connections. The question is how best to handle this in the API in the short term. It is likely that two useful configuration options
for long-lived connections will be the 'idle_time' and the 'max_transactions_per_connection'. It is more convenient for users if they are context settings (as the query ‘timeout' and ‘limit_outstanding_queries’ are today), however we should consider if such
values are more suited to being per-upstream or per-transport settings. </div>
</div>
<div class=""><span style="widows: 1;" class=""><font color="#333333" class=""><span style="line-height: 18.1818180084229px;" class=""><br class="">
</span></font></span></div>
<div style="widows: 1;" class=""><font color="#333333" class=""><span style="line-height: 18.18181800842285px;" class="">2)</span></font> For STARTTLS/TLS connections I think we should also consider adding a per-upstream setting for “TLS Authentication data”
and a context setting for “TLS versions/ciphers” in the future (current support is for TLS 1.2 only). </div>
<div class=""><br class="">
</div>
<div class="">
<div class="">Implementation Note</div>
<div class="">---------------------------</div>
<div class="">In the 0.2 release, if multiple upstreams and multiple transport values are both specified then the transport list take precedence over the upstream list when initially sending queries. [This is in order to maximise the chance of using an encrypted
transport when fallback to an unencrypted transport is allowed]. However on reply truncation (TC=1) the message is re-tried over TCP to the same upstream if TCP is in the transport list.</div>
</div>
<div class=""><br class="">
</div>
<div class="">Regards</div>
<div class=""><br class="">
</div>
<div class="">Sara.</div>
</div>
</div>
</span>
</body>
</html>