summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_intra.h
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2006-05-15 10:39:30 +0000
committerPaul Jakma <paul.jakma@sun.com>2006-05-15 10:39:30 +0000
commitcb4b88452e04a0102fedff4f01a2246f5e70dea9 (patch)
tree02af223018f79db39a091a985b7605539cb180a5 /ospf6d/ospf6_intra.h
parentb2518c1e884cb8b4f4502f8b90b1c368e1a352ec (diff)
[ospf6d] Import GNU Zebra CVSps#3559: Fix inter-area as-ext bug, cleanup debug
2005-10-06 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> * ospf6_asbr.c: fix bug of calculating AS-External routes in other areas. Add debugging function for border-router calculation. * ospf6d.h: version 0.9.7p
Diffstat (limited to 'ospf6d/ospf6_intra.h')
-rw-r--r--ospf6d/ospf6_intra.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/ospf6d/ospf6_intra.h b/ospf6d/ospf6_intra.h
index db92f7e7..8a9474a8 100644
--- a/ospf6d/ospf6_intra.h
+++ b/ospf6d/ospf6_intra.h
@@ -22,6 +22,52 @@
#ifndef OSPF6_INTRA_H
#define OSPF6_INTRA_H
+/* Debug option */
+extern unsigned char conf_debug_ospf6_brouter;
+extern u_int32_t conf_debug_ospf6_brouter_specific_router_id;
+extern u_int32_t conf_debug_ospf6_brouter_specific_area_id;
+#define OSPF6_DEBUG_BROUTER_SUMMARY 0x01
+#define OSPF6_DEBUG_BROUTER_SPECIFIC_ROUTER 0x02
+#define OSPF6_DEBUG_BROUTER_SPECIFIC_AREA 0x04
+#define OSPF6_DEBUG_BROUTER_ON() \
+ (conf_debug_ospf6_brouter |= OSPF6_DEBUG_BROUTER_SUMMARY)
+#define OSPF6_DEBUG_BROUTER_OFF() \
+ (conf_debug_ospf6_brouter &= ~OSPF6_DEBUG_BROUTER_SUMMARY)
+#define IS_OSPF6_DEBUG_BROUTER \
+ (conf_debug_ospf6_brouter & OSPF6_DEBUG_BROUTER_SUMMARY)
+
+#define OSPF6_DEBUG_BROUTER_SPECIFIC_ROUTER_ON(router_id) \
+ do { \
+ conf_debug_ospf6_brouter_specific_router_id = (router_id); \
+ conf_debug_ospf6_brouter |= OSPF6_DEBUG_BROUTER_SPECIFIC_ROUTER; \
+ } while (0)
+#define OSPF6_DEBUG_BROUTER_SPECIFIC_ROUTER_OFF() \
+ do { \
+ conf_debug_ospf6_brouter_specific_router_id = 0; \
+ conf_debug_ospf6_brouter &= ~OSPF6_DEBUG_BROUTER_SPECIFIC_ROUTER; \
+ } while (0)
+#define IS_OSPF6_DEBUG_BROUTER_SPECIFIC_ROUTER \
+ (conf_debug_ospf6_brouter & OSPF6_DEBUG_BROUTER_SPECIFIC_ROUTER)
+#define IS_OSPF6_DEBUG_BROUTER_SPECIFIC_ROUTER_ID(router_id) \
+ (IS_OSPF6_DEBUG_BROUTER_SPECIFIC_ROUTER && \
+ conf_debug_ospf6_brouter_specific_router_id == (router_id))
+
+#define OSPF6_DEBUG_BROUTER_SPECIFIC_AREA_ON(area_id) \
+ do { \
+ conf_debug_ospf6_brouter_specific_area_id = (area_id); \
+ conf_debug_ospf6_brouter |= OSPF6_DEBUG_BROUTER_SPECIFIC_AREA; \
+ } while (0)
+#define OSPF6_DEBUG_BROUTER_SPECIFIC_AREA_OFF() \
+ do { \
+ conf_debug_ospf6_brouter_specific_area_id = 0; \
+ conf_debug_ospf6_brouter &= ~OSPF6_DEBUG_BROUTER_SPECIFIC_AREA; \
+ } while (0)
+#define IS_OSPF6_DEBUG_BROUTER_SPECIFIC_AREA \
+ (conf_debug_ospf6_brouter & OSPF6_DEBUG_BROUTER_SPECIFIC_AREA)
+#define IS_OSPF6_DEBUG_BROUTER_SPECIFIC_AREA_ID(area_id) \
+ (IS_OSPF6_DEBUG_BROUTER_SPECIFIC_AREA && \
+ conf_debug_ospf6_brouter_specific_area_id == (area_id))
+
/* Router-LSA */
struct ospf6_router_lsa
{
@@ -161,5 +207,8 @@ void ospf6_intra_brouter_calculation (struct ospf6_area *oa);
void ospf6_intra_init ();
+int config_write_ospf6_debug_brouter (struct vty *vty);
+void install_element_ospf6_debug_brouter ();
+
#endif /* OSPF6_LSA_H */