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_top.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'ospf6d/ospf6_top.c') diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index b3d45167..66b1a121 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -549,6 +549,29 @@ DEFUN (show_ipv6_ospf6_route_match_detail, return CMD_SUCCESS; } +ALIAS (show_ipv6_ospf6_route_match, + show_ipv6_ospf6_route_longer_cmd, + "show ipv6 ospf6 route X:X::X:X/M longer", + SHOW_STR + IP6_STR + OSPF6_STR + ROUTE_STR + "Specify IPv6 prefix\n" + "Display routes longer than the specified route\n" + ); + +DEFUN (show_ipv6_ospf6_route_match_detail, + show_ipv6_ospf6_route_longer_detail_cmd, + "show ipv6 ospf6 route X:X::X:X/M longer detail", + SHOW_STR + IP6_STR + OSPF6_STR + ROUTE_STR + "Specify IPv6 prefix\n" + "Display routes longer than the specified route\n" + "Detailed information\n" + ); + ALIAS (show_ipv6_ospf6_route, show_ipv6_ospf6_route_type_cmd, "show ipv6 ospf6 route (intra-area|inter-area|external-1|external-2)", @@ -646,12 +669,16 @@ ospf6_top_init () install_element (VIEW_NODE, &show_ipv6_ospf6_route_detail_cmd); install_element (VIEW_NODE, &show_ipv6_ospf6_route_match_cmd); install_element (VIEW_NODE, &show_ipv6_ospf6_route_match_detail_cmd); + install_element (VIEW_NODE, &show_ipv6_ospf6_route_longer_cmd); + install_element (VIEW_NODE, &show_ipv6_ospf6_route_longer_detail_cmd); install_element (VIEW_NODE, &show_ipv6_ospf6_route_type_cmd); install_element (VIEW_NODE, &show_ipv6_ospf6_route_type_detail_cmd); install_element (ENABLE_NODE, &show_ipv6_ospf6_route_cmd); install_element (ENABLE_NODE, &show_ipv6_ospf6_route_detail_cmd); install_element (ENABLE_NODE, &show_ipv6_ospf6_route_match_cmd); install_element (ENABLE_NODE, &show_ipv6_ospf6_route_match_detail_cmd); + install_element (ENABLE_NODE, &show_ipv6_ospf6_route_longer_cmd); + install_element (ENABLE_NODE, &show_ipv6_ospf6_route_longer_detail_cmd); install_element (ENABLE_NODE, &show_ipv6_ospf6_route_type_cmd); install_element (ENABLE_NODE, &show_ipv6_ospf6_route_type_detail_cmd); -- cgit v1.2.3 From cf1ce250d20003ae94c835e73e95e7442d7a5b53 Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Mon, 15 May 2006 10:46:07 +0000 Subject: [ospf6d] GNU Zebra #3562: ABR Crash fix, memory fixes, route table debugs 2006-02-22 Yasuhiro Ohara * valgrind check and memory fix * route table identification string added * ospf6d.h: version 0.9.7q --- ospf6d/ospf6_top.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ospf6d/ospf6_top.c') diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 66b1a121..a5efcb8d 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -126,15 +126,19 @@ ospf6_create () o->lsdb->hook_add = ospf6_top_lsdb_hook_add; o->lsdb->hook_remove = ospf6_top_lsdb_hook_remove; - o->route_table = ospf6_route_table_create (); + o->route_table = OSPF6_ROUTE_TABLE_CREATE (GLOBAL, ROUTES); + o->route_table->scope = o; o->route_table->hook_add = ospf6_top_route_hook_add; o->route_table->hook_remove = ospf6_top_route_hook_remove; - o->brouter_table = ospf6_route_table_create (); + o->brouter_table = OSPF6_ROUTE_TABLE_CREATE (GLOBAL, BORDER_ROUTERS); + o->brouter_table->scope = o; o->brouter_table->hook_add = ospf6_top_brouter_hook_add; o->brouter_table->hook_remove = ospf6_top_brouter_hook_remove; - o->external_table = ospf6_route_table_create (); + o->external_table = OSPF6_ROUTE_TABLE_CREATE (GLOBAL, EXTERNAL_ROUTES); + o->external_table->scope = o; + o->external_id_table = route_table_init (); return o; -- cgit v1.2.3 From 6ac29a51075def99217a4ab1015635db3b3e83ed Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Fri, 15 Aug 2008 13:45:30 +0100 Subject: [trivia] finish off static'ification of ospf6d and ripngd 2008-08-15 Paul Jakma * {ospf6d,ripngd}/*: Finish job of marking functions as static, or exporting declarations for them, to quell warning noise with Quagga's GCC default high-level of warning flags. Thus allowing remaining, more useful warnings to be more easily seen. --- ospf6d/ospf6_top.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'ospf6d/ospf6_top.c') diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index a5efcb8d..f59b6f95 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -51,7 +51,7 @@ /* global ospf6d variable */ struct ospf6 *ospf6; -void +static void ospf6_top_lsdb_hook_add (struct ospf6_lsa *lsa) { switch (ntohs (lsa->header->type)) @@ -65,7 +65,7 @@ ospf6_top_lsdb_hook_add (struct ospf6_lsa *lsa) } } -void +static void ospf6_top_lsdb_hook_remove (struct ospf6_lsa *lsa) { switch (ntohs (lsa->header->type)) @@ -79,21 +79,21 @@ ospf6_top_lsdb_hook_remove (struct ospf6_lsa *lsa) } } -void +static void ospf6_top_route_hook_add (struct ospf6_route *route) { ospf6_abr_originate_summary (route); ospf6_zebra_route_update_add (route); } -void +static void ospf6_top_route_hook_remove (struct ospf6_route *route) { ospf6_abr_originate_summary (route); ospf6_zebra_route_update_remove (route); } -void +static void ospf6_top_brouter_hook_add (struct ospf6_route *route) { ospf6_abr_examin_brouter (ADV_ROUTER_IN_PREFIX (&route->prefix)); @@ -101,7 +101,7 @@ ospf6_top_brouter_hook_add (struct ospf6_route *route) ospf6_abr_originate_summary (route); } -void +static void ospf6_top_brouter_hook_remove (struct ospf6_route *route) { ospf6_abr_examin_brouter (ADV_ROUTER_IN_PREFIX (&route->prefix)); @@ -109,8 +109,8 @@ ospf6_top_brouter_hook_remove (struct ospf6_route *route) ospf6_abr_originate_summary (route); } -struct ospf6 * -ospf6_create () +static struct ospf6 * +ospf6_create (void) { struct ospf6 *o; @@ -144,7 +144,7 @@ ospf6_create () return o; } -void +static void ospf6_delete (struct ospf6 *o) { struct listnode *node, *nnode; @@ -165,7 +165,7 @@ ospf6_delete (struct ospf6 *o) XFREE (MTYPE_OSPF6_TOP, o); } -void +static void ospf6_enable (struct ospf6 *o) { struct listnode *node, *nnode; @@ -179,7 +179,7 @@ ospf6_enable (struct ospf6 *o) } } -void +static void ospf6_disable (struct ospf6 *o) { struct listnode *node, *nnode; @@ -198,7 +198,7 @@ ospf6_disable (struct ospf6 *o) } } -int +static int ospf6_maxage_remover (struct thread *thread) { struct ospf6 *o = (struct ospf6 *) THREAD_ARG (thread); @@ -427,7 +427,7 @@ DEFUN (no_ospf6_interface_area, return CMD_SUCCESS; } -void +static void ospf6_show (struct vty *vty, struct ospf6 *o) { struct listnode *n; @@ -499,7 +499,7 @@ ALIAS (show_ipv6_ospf6_route, "Specify IPv6 prefix\n" "Detailed information\n" "Summary of route table\n" - ); + ) DEFUN (show_ipv6_ospf6_route_match, show_ipv6_ospf6_route_match_cmd, @@ -562,7 +562,7 @@ ALIAS (show_ipv6_ospf6_route_match, ROUTE_STR "Specify IPv6 prefix\n" "Display routes longer than the specified route\n" - ); + ) DEFUN (show_ipv6_ospf6_route_match_detail, show_ipv6_ospf6_route_longer_detail_cmd, @@ -587,7 +587,7 @@ ALIAS (show_ipv6_ospf6_route, "Dispaly Inter-Area routes\n" "Dispaly Type-1 External routes\n" "Dispaly Type-2 External routes\n" - ); + ) DEFUN (show_ipv6_ospf6_route_type_detail, show_ipv6_ospf6_route_type_detail_cmd, @@ -618,7 +618,7 @@ DEFUN (show_ipv6_ospf6_route_type_detail, } /* OSPF configuration write function. */ -int +static int config_write_ospf6 (struct vty *vty) { char router_id[16]; @@ -660,7 +660,7 @@ struct cmd_node ospf6_node = /* Install ospf related commands. */ void -ospf6_top_init () +ospf6_top_init (void) { /* Install ospf6 top node. */ install_node (&ospf6_node, config_write_ospf6); -- cgit v1.2.3