From cb4b88452e04a0102fedff4f01a2246f5e70dea9 Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Mon, 15 May 2006 10:39:30 +0000 Subject: [ospf6d] Import GNU Zebra CVSps#3559: Fix inter-area as-ext bug, cleanup debug 2005-10-06 Yasuhiro Ohara * 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 --- ospf6d/ospf6_intra.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'ospf6d/ospf6_intra.h') 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 */ -- cgit v1.2.1