HOST ToDo -- Things that could be fixed/improved/added.

Patches to close any of these items will be gratefully accepted!  Other
suggestions and comments are also encouraged.

- try looking through the additional records in a reply in order to do
  canonical checks, especially when the queried server isn't allowing
  recursion

- do not use gethostbyname()/gethostbyaddr() (i.e. util.c:geth_by*()) to
  do basic A and PTR lookups and checks [i.e. addr.c:check_addr() and
  addr.c:check_name()], but instead use the low-level interfaces.
  Provide separate options for using those functions just so that the
  native implementations can be tested.

- add support for getaddrinfo(), getnameinfo(), et al., replacing
  getipnodeby*(), and of course gethostby*() too, where possible and
  where it is still used.

- RFC 3490 (3491, and 3492) internationalization support (suggested by
  Peter da Silva).  See pksrc/devel/libidn for sample implementaiton.

- implement host_h_strerror() to return descriptions for extended error
  codes from get_info() -- or maybe don't over-load h_errno in
  get_hinfo() but instead also implement global host_errno?

- use setservbyname() to get the local NAMESERVER_PORT value.

- also add an option to set the target port when also setting the server
  name, (i.e. in util.c:use_servers())  (just use "HOST:PORT" syntax?)

- allow runtime specification of source port with '-O'

- allow runtime specification of destination port in server with ':PORT'

- check that the names in the answer records match the names we asked
  for (taking CNAMEs into account only where they are allowed).

- "host -t mx 204.92.254.2" just quietly does the PTR lookup as if the
  '-t mx' option had not been given, but on the other hand if '-i' is
  also given then it looks for an MX under the PTR's name.

- add TTL comparisons to 'host -C'.

- make 'host -Z -C' show all the fields.

- build more mechanisms to allow checking using only authoritative
  sources, i.e. in the same way '-C' does; e.g. MX, NS, and PTR lookups,
  which might require looking up two separate sets of NS records, one
  for the the MX, NS, or PTR domain and one for the target canonical
  host's domain.  Need to deal with cases where the target name is the
  zone name.

- allow for setting the (stream) read timeout (conn_timeout) at runtime.

- clean up the host_res_*() mess.

- don't strip the trailing dot from PTR targets that have only one label.

- maybe '-P' should be the default for '-C', but then we'd need
  something like a '--not-parent' or '--listed-ns' variant to explicitly
  check the nameservers listed inside the zone and it all gets a whole
  lot messier....

- implement something more along the lines of the algorithm used in
  BIND's res_findzonecut.c when looking for the true parent zone,
  especially when looking for the published NS records that delegate a
  sub-zone, e.g. for doing what nscheck does.

- allow multiple nameservers to be given on the command-line (MAXNS, or
  maybe keep trying in an outside loop until success?)

- check for both A and AAAA records.  The check for canonical hostnames
  in NS and MX records should be extended to include also AAAA records.
  Originally asked by Matti Aarnio <matti.aarnio@sonera.fi>

- try to build a regression test suite (but how do we feed it known
  bogus junk to test error handling?  nc?).

- think about using autobuild.
