From 457eb9af72e6e7aa85c26b65ba4d053f9ecbffac Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Thu, 27 Jul 2006 19:59:58 +0000 Subject: [zebra] Add test rig code, for testing the zebra RIB 2006-07-27 Paul Jakma * {ioctl,kernel}_null.c: Dummy/Null kernel method implementations, useful for testing zebra code that calls such methods. * {redistribute,misc}_null.c: Dummy/Null methods, as above. But for zclient, and for various misc functions. * test_main.c: Test harness for zebra, currently just to test the RIB. * Makefile.am: Build testzebra using above. * zebra_rib.c: Add a global for the workqueue hold time, useful for testing. --- zebra/zebra_rib.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'zebra/zebra_rib.c') diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 665e5673..7373c6d8 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -42,6 +42,12 @@ /* Default rtm_table for all clients */ extern struct zebra_t zebrad; +/* Hold time for RIB process, should be very minimal. + * it is useful to able to set it otherwise for testing, hence exported + * as global here for test-rig code. + */ +int rib_process_hold_time = 10; + /* Each route type's string and default distance value. */ struct { @@ -1120,6 +1126,7 @@ rib_queue_init (struct zebra_t *zebra) zebra->ribq->spec.del_item_data = &rib_queue_qnode_del; /* XXX: TODO: These should be runtime configurable via vty */ zebra->ribq->spec.max_retries = 3; + zebra->ribq->spec.hold = rib_process_hold_time; return; } -- cgit v1.2.1