[getdns-api] Remove IDNA functions from getdns?

Joe Hildebrand (jhildebr) jhildebr at cisco.com
Thu Sep 3 20:57:27 UTC 2015


I think the current IDN API may be at the wrong level of granularity.  I want to be able to pass in a UTF-8 encoded domain name, and have the library do whatever conversions are needed, like getaddrinfo does (now):

>From http://man7.org/linux/man-pages/man3/getaddrinfo.3.html :

   Extensions to getaddrinfo() for Internationalized Domain Names
       Starting with glibc 2.3.4, getaddrinfo() has been extended to
       selectively allow the incoming and outgoing hostnames to be
       transparently converted to and from the Internationalized Domain Name
       (IDN) format (see RFC 3490, Internationalizing Domain Names in
       Applications (IDNA)).  Four new flags are defined:

       AI_IDN If this flag is specified, then the node name given in node is
              converted to IDN format if necessary.  The source encoding is
              that of the current locale.

              If the input name contains non-ASCII characters, then the IDN
              encoding is used.  Those parts of the node name (delimited by
              dots) that contain non-ASCII characters are encoded using
              ASCII Compatible Encoding (ACE) before being passed to the
              name resolution functions.

       AI_CANONIDN
              After a successful name lookup, and if the AI_CANONNAME flag
              was specified, getaddrinfo() will return the canonical name of
              the node corresponding to the addrinfo structure value passed
              back.  The return value is an exact copy of the value returned
              by the name resolution function.

              If the name is encoded using ACE, then it will contain the
              xn-- prefix for one or more components of the name.  To
              convert these components into a readable form the AI_CANONIDN
              flag can be passed in addition to AI_CANONNAME.  The resulting
              string is encoded using the current locale's encoding.

       AI_IDN_ALLOW_UNASSIGNED, AI_IDN_USE_STD3_ASCII_RULES
              Setting these flags will enable the IDNA_ALLOW_UNASSIGNED
              (allow unassigned Unicode code points) and
              IDNA_USE_STD3_ASCII_RULES (check output to make sure it is a
              STD3 conforming hostname) flags respectively to be used in the
              IDNA handling.


-- 
Joe Hildebrand








On 9/3/15, 12:34 PM, "spec on behalf of Andrew Sullivan" <spec-bounces at getdnsapi.net on behalf of asullivan at dyn.com> wrote:

>On Thu, Sep 03, 2015 at 05:22:36PM +0200, Willem Toorop wrote:
>> Perhaps it would be better to offer IDNA in a more getdns way?  For
>> example through an extension, which will process query names ulabel to
>> alabel and return processed dname's converted from alabels to ulabels in
>> the response dict?
>
>I think the idea was that an application can often need the U-label of
>an A-label or conversely, but nobody could think of anything else an
>application would need.
>
>Is there anything else?  
>
>A
>
>-- 
>Andrew Sullivan
>Dyn
>asullivan at dyn.com
>_______________________________________________
>spec mailing list
>spec at getdnsapi.net




More information about the spec mailing list