major rework structure and handling

This is a larger commit sampling ongoing progress in restructure the
code.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
event handling: use new libeve

New libev is in the ability to use select (additionaly to epoll). So we
use it now.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
nameserver selection changes

patch one in a serie to enable dynamic selection of nameserver

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
fix several bugs and extend time nameserver selection

This fixes several (not yet triggered) bugs and extend
the nameserver selection process. Default is first, but there
is PRNG and a time selection strategy too.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
git ignore core file

By default a error will now exit the programm by calling abort to get a
core dumb (and later see the stack trace). So we ignore core files from
now on.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
add missing prototype for str to enum convertion

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
implement random ns select strategy

This selects nameserver by random from a pool of previously specified
nameservers.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
add timestamp functionality

The front end is extended to measure packet request and response time.
This can be used to calculate the "best" nameserver and for other
statistics as well.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
finish timestamp measurement for request/response

This finish the functionality to take round trip time measurements. This
can further be used for time statistics etc cetera.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
finish time selection strategy

Several bugs and implementation error are fixed. Now the time selection
algorithm works perfectly.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
fix nearly all warnings and add cache infrastructure

This larger patch removes all warnings as well as cache infrastructure
for for none and memory backend.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
zone file parser implementation

Currently A and AAAA records are parsed. NS, PTR, CNAME, SOA
are still missing but a question of time.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
add mx parser

This add functionality to parse MX ressource records.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
add RFC 2782 to documentation

A DNS RR for specifying the location of services (DNS SRV

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Document example zone file

Extend the inline documentation of the example zone file.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
add option recursive/iterative

This is the start of recursion operation mode. First
is iterative and later on we support recursive.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
add additional option to restrict usage

This is not implemented yet but documented now. ;-)

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
use new generic infrastructure for edns

This shifts from special crafted code to the new generic parser
logic.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
add prefix compare functionality for IPv{4,6}

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
remove list add failed because of duplicate

This is the only message currently, therefore we know
if this function fails we tried to add a duplicate.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>