summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_spf.h
diff options
context:
space:
mode:
authorDinesh G Dutt <ddutt@cumulusnetworks.com>2014-09-30 12:53:28 -0700
committerPaul Jakma <paul@quagga.net>2014-11-11 17:25:09 +0000
commit50f38b3500a6af6e1b0d1389d65c62d70c41e8c2 (patch)
tree0525b14ce3c53f891cd7f5a00fcf954f4893a99f /ospfd/ospf_spf.h
parent88d37b902bc8127379d3293b9671aa6a11479c23 (diff)
downloadquagga-50f38b3500a6af6e1b0d1389d65c62d70c41e8c2.tar.bz2
quagga-50f38b3500a6af6e1b0d1389d65c62d70c41e8c2.tar.xz
Compute and display SPF execution statistics
Detailed SPF statistics, all around time spent executing various pieces of SPF such as the SPF algorithm itself, installing routes, pruning unreachable networks etc. Reason codes for firing up SPF are: R - Router LSA, N - Network LSA, S - Summary LSA, ABR - ABR status change, ASBR - ASBR Status Change, AS - ASBR Summary, M - MaxAge Signed-off-by: Dinesh G Dutt <ddutt@cumulusnetworks.com> Reviewed-by: JR Rivers <jrrivers@cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com> Reviewed-by: Ayan Banerjee <ayan@cumulusnetworks.com> Reviewed-by: Paul Jakma <paul@opensourcerouting.org>
Diffstat (limited to 'ospfd/ospf_spf.h')
-rw-r--r--ospfd/ospf_spf.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/ospfd/ospf_spf.h b/ospfd/ospf_spf.h
index c1316e4c..c9c539ad 100644
--- a/ospfd/ospf_spf.h
+++ b/ospfd/ospf_spf.h
@@ -64,4 +64,17 @@ extern void ospf_rtrs_free (struct route_table *);
/* void ospf_spf_calculate_timer_add (); */
+/* What triggered the SPF ? Can have at most 32 reasons with this */
+#define SPF_FLAG_ROUTER_LSA_INSTALL 0x1
+#define SPF_FLAG_NETWORK_LSA_INSTALL 0x2
+#define SPF_FLAG_SUMMARY_LSA_INSTALL 0x4
+#define SPF_FLAG_ASBR_SUMMARY_LSA_INSTALL 0x8
+#define SPF_FLAG_MAXAGE 0x10
+#define SPF_FLAG_ABR_STATUS_CHANGE 0x20
+#define SPF_FLAG_ASBR_STATUS_CHANGE 0x40
+#define SPF_FLAG_MAX_VALUE 0x40 /* Update this when adding flags */
+#define SPF_FLAG_MISC 0x1000000 /* Keep this last */
+
+extern void ospf_flag_spf_reason (unsigned int reason);
+
#endif /* _QUAGGA_OSPF_SPF_H */