[getdns-users] GetDNSapi for Erlang

Willem Toorop willem at nlnetlabs.nl
Mon Jul 3 10:21:31 UTC 2017

Op 02-07-17 om 21:46 schreef Rick van Rein:
> Hey Willem,
>>> Is anyone aware of work that has been done to make GetDNSapi work with
>>> Erlang?  DuckDuckGo seems to have misplaced the answers to this one :)
>> I don't know for sure, but I vaguely remember that Linus Nordberg (on
>> the CC) was interested in getdns bindings for Erlang for his CT for
>> DNSSEC work and I believe he looked into this at some point.
> Thanks.  It is very strange to hit a language these days with barely
> any support for DNS and DNSSEC!  But that's what GetDNS is all about
> of course.
> But I have come to realise that my question was too hasty...
> the extensive dictionaries generated by GetDNS are very close to a
> scripted or dynamic language, and Erlang being function and dynamic
> in nature I thought the match would work.
> In the end however, I realised that the Unbound API is much closer
> to Erlang in style, because it is easier to use with pattern matching
> on an output record with bogus/secure/... flags.  The extra work
> needed for parsing the RDATA is easy because Erlang even does
> pattern matching in binaries:
> case SrvRDATA of
>    << _:48, $. >> -> ...unavailable...;
>    << Priority:16, Weight:16, Port:16, Target >> ) -> ...act...
> end

Hey Rick,

Did you know that getdns, when used to lookup SRV records, produces a
list of addresses and ports sorted in the half random way by weight and
priority as described in RFC2782?  You can find it under "srv_addresses"
in the top of the response object.

> In comparison, I believe pattern matching GetDNS's dictionaries
> would be more difficult.  I saw a link with the message-passing
> between minute processes (Go adopted the same style) on account
> of event-driven GetDNS, but that is not unique about GetDNS, of
> course.
> Hope I'm not disappointing you with this :)

A little bit, but I'll get over it ;)


-- Willem

> Thanks,
>  -Rick
> _______________________________________________
> Users mailing list
> Users at getdnsapi.net
> https://getdnsapi.net/mailman/listinfo/users

More information about the Users mailing list