summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
authorpaul <paul>2006-07-27 19:59:58 +0000
committerpaul <paul>2006-07-27 19:59:58 +0000
commitdc96de65bcdaca5346e7a4b3c11846ad3a6272d3 (patch)
treec8da81ea12e6ee8a905dc8b37ac97c02af343c37 /zebra/zebra_rib.c
parentb2d769edff602fda3b522b3fe7bf02915a7a317b (diff)
downloadquagga-dc96de65bcdaca5346e7a4b3c11846ad3a6272d3.tar.bz2
quagga-dc96de65bcdaca5346e7a4b3c11846ad3a6272d3.tar.xz
[zebra] Add test rig code, for testing the zebra RIB
2006-07-27 Paul Jakma <paul.jakma@sun.com> * {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.
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c7
1 files changed, 7 insertions, 0 deletions
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;
}