ospf6d: schedule SPF to run on events rather than directly on each event.

OSPV3 SPF triggers on every SPF-able event instead of using timers the way
OSPFv2 does. This patch makes SPF be triggered/throttled similar to OSPFv2.
It adds a command to quagga identical to the OSPFv2 equivalent to configure
these timers.
Summary:

Signed-off-by: Dinesh Dutt <ddutt at cumulusnetworks.com>
Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com>
[DL: removed reference to oa->ts_spf for rebase]
[DL: killed timeval_subtract]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/ospf6d/ospf6_top.h b/ospf6d/ospf6_top.h
index 4b2d2c3..27eb18c 100644
--- a/ospf6d/ospf6_top.h
+++ b/ospf6d/ospf6_top.h
@@ -38,6 +38,7 @@
 
   /* list of areas */
   struct list *area_list;
+  struct ospf6_area *backbone;
 
   /* AS scope link state database */
   struct ospf6_lsdb *lsdb;
@@ -59,6 +60,18 @@
 
   u_char flag;
 
+  /* SPF parameters */
+  unsigned int spf_delay;		/* SPF delay time. */
+  unsigned int spf_holdtime;		/* SPF hold time. */
+  unsigned int spf_max_holdtime;	/* SPF maximum-holdtime */
+  unsigned int spf_hold_multiplier;	/* Adaptive multiplier for hold time */
+
+  struct timeval ts_spf;		/* SPF calculation time stamp. */
+  struct timeval ts_spf_duration;	/* Execution time of last SPF */
+
+  /* Threads */
+  struct thread *t_spf_calc;	        /* SPF calculation timer. */
+  struct thread *t_ase_calc;		/* ASE calculation timer. */
   struct thread *maxage_remover;
 };