[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.
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 665e567..7373c6d 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 @@
   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;
 }