dirmngr: Implement a getaddrinfo wrapper.
authorWerner Koch <wk@gnupg.org>
Wed, 21 Oct 2015 15:55:56 +0000 (17:55 +0200)
committerWerner Koch <wk@gnupg.org>
Wed, 21 Oct 2015 15:56:56 +0000 (17:56 +0200)
commit8bccbf477878fd99baa96e11db9db99aaf1e8d91
tree42269f195e79c317dd9ab64699e481d77a904d40
parentffe60eb3d2b8f7d6c506804ce4645d695c91f237
dirmngr: Implement a getaddrinfo wrapper.

* dirmngr/dns-stuff.h: Include some header files.
(dns_addinfo_t, dns_addrinfo_s): New.
* dirmngr/dns-stuff.c: Always include DNS related headers.
(free_dns_addrinfo): New.
(resolve_name_standard): New.
(resolve_dns_name): New.

* dirmngr/t-dns-stuff.c: Include netdb.h.
(main): Keep old default mode with no args but else print outout of
resolve_dns_name.  Revamp option parser.
--

This wrapper allows us to switch to ADNS and thus Tor for standard
name resultion.

Signed-off-by: Werner Koch <wk@gnupg.org>
dirmngr/dns-stuff.c
dirmngr/dns-stuff.h
dirmngr/t-dns-stuff.c