zebra: cleanup srcdest routes when client disconnects

Signed-off-by: Christian Franke <nobody@nowhere.ws>
zebra: fix support for ifindex src-dest routes

Signed-off-by: Christian Franke <nobody@nowhere.ws>
lib,zebra: move srcdest_table from zebra_rib into libzebra

- make srcdest routing table reusable by putting it into lib
- make the srcdest routing table structure more opaque
- implement a srcdest routing table iterator

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
lib: fix a refcounting issue in src_node_lookup

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
lib: match route_node_lookup behavior with srcdest_rnode_lookup

Return NULL from srcdest_rnode_lookup if the found route_node has
rn->info == NULL. This is to match the behavior of route_node_lookup.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
lib: suppport route_table_finish on srcdest_table

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
lib,zebra: refactor srcdest_table a bit

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
tests: add a test for the srcdest_table structure

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
DEBUG: build: silent
DEBUG: gitignore
lib: add separate output fd support to VTYs

to be used with stdin/stdout terminals, this adds support for writing to
a different FD than we're reading from.  Also fixes error messages from
config load being written to stdin.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
lib: add vty_stdio()

this introduces a new public/API function to the vty code for opening a
VTY on stdin/stdout.  Intended for unrestricted use by the individual
daemons, i.e. "offical API".

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
zebra: add --terminal/-t option for VTY on stdio

this allows running zebra accepting commands from stdin, writing results
to stdout.  In addition to terminals, both files and pipes should work
correctly.  Zebra does not currently exit on losing the input terminal.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
tests: add integration tests

Author: David Lamparter <equinox@opensourcerouting.org>
Author: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
tests: add pyzclient for adding test routes to zebra

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
tests: add some zebra rib integration tests

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
tests: add support for FreeBSD
tests: use nose to run python tests; reorganize tests
tests: add a module to access Quagga constants from python
tests: drop DejaGNU; use Python testrunner for C programs

Move all the C programms into the python test hierarchy and add
python scripts which ensure that they are run when the testsuite
is executed.