[getdns-api] data structures/arguments to getdns_hostname and getdns_hostname_sync
Melinda Shore
melinda.shore at nomountain.net
Wed Nov 20 00:25:58 CET 2013
As specified, the address to resolve is passed into getdns_hostname
and getdns_hostname_sync as a dict containing an address type, encoded
as a string (or octet sequence - this should be made explicit if it
stays), and the address itself, also a bindata. There's an awful lot
of memory allocation and data movement in the API and I think that
this (getdns_hostname) is an example of the cost/benefit tradeoff being
a little sketchy. If we do hang onto the dict encoding and make the
address type explicit, I think the address type should be an int (i.e.
a constant/macro) rather than an octet sequence, but since there are
reliable heuristics for determining whether a given ASCII octet sequence
is a v4 or v6 address it strikes me as redundant to pass that in, with
the additional complexity and execution cost that comes from using a
getdns_dict rather than just a string.
Melinda
--
Melinda Shore
No Mountain Software
melinda.shore at nomountain.net
"Software longa, hardware brevis."
_______________________________________________
getdns-api mailing list
getdns-api at vpnc.org
More information about the spec
mailing list