paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 1 | /* |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 2 | * Copyright (C) 2003 Yasuhiro Ohara |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 3 | * |
| 4 | * This file is part of GNU Zebra. |
| 5 | * |
| 6 | * GNU Zebra is free software; you can redistribute it and/or modify it |
| 7 | * under the terms of the GNU General Public License as published by the |
| 8 | * Free Software Foundation; either version 2, or (at your option) any |
| 9 | * later version. |
| 10 | * |
| 11 | * GNU Zebra is distributed in the hope that it will be useful, but |
| 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | * General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with GNU Zebra; see the file COPYING. If not, write to the |
| 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 19 | * Boston, MA 02111-1307, USA. |
| 20 | */ |
| 21 | |
| 22 | #include <zebra.h> |
| 23 | |
| 24 | #include "log.h" |
| 25 | #include "memory.h" |
| 26 | #include "vty.h" |
| 27 | #include "linklist.h" |
| 28 | #include "prefix.h" |
| 29 | #include "table.h" |
| 30 | #include "thread.h" |
| 31 | #include "command.h" |
| 32 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 33 | #include "ospf6_proto.h" |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 34 | #include "ospf6_message.h" |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 35 | #include "ospf6_lsa.h" |
| 36 | #include "ospf6_lsdb.h" |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 37 | #include "ospf6_route.h" |
| 38 | #include "ospf6_zebra.h" |
| 39 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 40 | #include "ospf6_top.h" |
| 41 | #include "ospf6_area.h" |
| 42 | #include "ospf6_interface.h" |
| 43 | #include "ospf6_neighbor.h" |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 44 | |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 45 | #include "ospf6_flood.h" |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 46 | #include "ospf6_asbr.h" |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 47 | #include "ospf6_abr.h" |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 48 | #include "ospf6_intra.h" |
Dinesh Dutt | 3810e06 | 2013-08-24 07:54:09 +0000 | [diff] [blame] | 49 | #include "ospf6_spf.h" |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 50 | #include "ospf6d.h" |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 51 | |
| 52 | /* global ospf6d variable */ |
| 53 | struct ospf6 *ospf6; |
| 54 | |
Tom Goff | ae2254a | 2010-11-10 13:01:41 -0800 | [diff] [blame] | 55 | static void ospf6_disable (struct ospf6 *o); |
| 56 | |
Paul Jakma | 6ac29a5 | 2008-08-15 13:45:30 +0100 | [diff] [blame] | 57 | static void |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 58 | ospf6_top_lsdb_hook_add (struct ospf6_lsa *lsa) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 59 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 60 | switch (ntohs (lsa->header->type)) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 61 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 62 | case OSPF6_LSTYPE_AS_EXTERNAL: |
| 63 | ospf6_asbr_lsa_add (lsa); |
| 64 | break; |
| 65 | |
| 66 | default: |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 67 | break; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 68 | } |
| 69 | } |
| 70 | |
Paul Jakma | 6ac29a5 | 2008-08-15 13:45:30 +0100 | [diff] [blame] | 71 | static void |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 72 | ospf6_top_lsdb_hook_remove (struct ospf6_lsa *lsa) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 73 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 74 | switch (ntohs (lsa->header->type)) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 75 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 76 | case OSPF6_LSTYPE_AS_EXTERNAL: |
| 77 | ospf6_asbr_lsa_remove (lsa); |
| 78 | break; |
| 79 | |
| 80 | default: |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 81 | break; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 82 | } |
| 83 | } |
| 84 | |
Paul Jakma | 6ac29a5 | 2008-08-15 13:45:30 +0100 | [diff] [blame] | 85 | static void |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 86 | ospf6_top_route_hook_add (struct ospf6_route *route) |
| 87 | { |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 88 | ospf6_abr_originate_summary (route); |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 89 | ospf6_zebra_route_update_add (route); |
| 90 | } |
| 91 | |
Paul Jakma | 6ac29a5 | 2008-08-15 13:45:30 +0100 | [diff] [blame] | 92 | static void |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 93 | ospf6_top_route_hook_remove (struct ospf6_route *route) |
| 94 | { |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 95 | ospf6_abr_originate_summary (route); |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 96 | ospf6_zebra_route_update_remove (route); |
| 97 | } |
| 98 | |
Paul Jakma | 6ac29a5 | 2008-08-15 13:45:30 +0100 | [diff] [blame] | 99 | static void |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 100 | ospf6_top_brouter_hook_add (struct ospf6_route *route) |
| 101 | { |
hasso | ccb59b1 | 2004-08-25 09:10:37 +0000 | [diff] [blame] | 102 | ospf6_abr_examin_brouter (ADV_ROUTER_IN_PREFIX (&route->prefix)); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 103 | ospf6_asbr_lsentry_add (route); |
hasso | ccb59b1 | 2004-08-25 09:10:37 +0000 | [diff] [blame] | 104 | ospf6_abr_originate_summary (route); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 105 | } |
| 106 | |
Paul Jakma | 6ac29a5 | 2008-08-15 13:45:30 +0100 | [diff] [blame] | 107 | static void |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 108 | ospf6_top_brouter_hook_remove (struct ospf6_route *route) |
| 109 | { |
hasso | ccb59b1 | 2004-08-25 09:10:37 +0000 | [diff] [blame] | 110 | ospf6_abr_examin_brouter (ADV_ROUTER_IN_PREFIX (&route->prefix)); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 111 | ospf6_asbr_lsentry_remove (route); |
hasso | ccb59b1 | 2004-08-25 09:10:37 +0000 | [diff] [blame] | 112 | ospf6_abr_originate_summary (route); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 113 | } |
| 114 | |
Paul Jakma | 6ac29a5 | 2008-08-15 13:45:30 +0100 | [diff] [blame] | 115 | static struct ospf6 * |
| 116 | ospf6_create (void) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 117 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 118 | struct ospf6 *o; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 119 | |
Stephen Hemminger | 393deb9 | 2008-08-18 14:13:29 -0700 | [diff] [blame] | 120 | o = XCALLOC (MTYPE_OSPF6_TOP, sizeof (struct ospf6)); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 121 | |
| 122 | /* initialize */ |
Takashi Sogabe | 86f72dc | 2009-06-22 13:07:02 +0900 | [diff] [blame] | 123 | quagga_gettime (QUAGGA_CLK_MONOTONIC, &o->starttime); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 124 | o->area_list = list_new (); |
| 125 | o->area_list->cmp = ospf6_area_cmp; |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 126 | o->lsdb = ospf6_lsdb_create (o); |
| 127 | o->lsdb_self = ospf6_lsdb_create (o); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 128 | o->lsdb->hook_add = ospf6_top_lsdb_hook_add; |
| 129 | o->lsdb->hook_remove = ospf6_top_lsdb_hook_remove; |
| 130 | |
Dinesh Dutt | 3810e06 | 2013-08-24 07:54:09 +0000 | [diff] [blame] | 131 | o->spf_delay = OSPF_SPF_DELAY_DEFAULT; |
| 132 | o->spf_holdtime = OSPF_SPF_HOLDTIME_DEFAULT; |
| 133 | o->spf_max_holdtime = OSPF_SPF_MAX_HOLDTIME_DEFAULT; |
| 134 | o->spf_hold_multiplier = 1; |
| 135 | |
Paul Jakma | cf1ce25 | 2006-05-15 10:46:07 +0000 | [diff] [blame] | 136 | o->route_table = OSPF6_ROUTE_TABLE_CREATE (GLOBAL, ROUTES); |
| 137 | o->route_table->scope = o; |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 138 | o->route_table->hook_add = ospf6_top_route_hook_add; |
| 139 | o->route_table->hook_remove = ospf6_top_route_hook_remove; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 140 | |
Paul Jakma | cf1ce25 | 2006-05-15 10:46:07 +0000 | [diff] [blame] | 141 | o->brouter_table = OSPF6_ROUTE_TABLE_CREATE (GLOBAL, BORDER_ROUTERS); |
| 142 | o->brouter_table->scope = o; |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 143 | o->brouter_table->hook_add = ospf6_top_brouter_hook_add; |
| 144 | o->brouter_table->hook_remove = ospf6_top_brouter_hook_remove; |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 145 | |
Paul Jakma | cf1ce25 | 2006-05-15 10:46:07 +0000 | [diff] [blame] | 146 | o->external_table = OSPF6_ROUTE_TABLE_CREATE (GLOBAL, EXTERNAL_ROUTES); |
| 147 | o->external_table->scope = o; |
| 148 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 149 | o->external_id_table = route_table_init (); |
| 150 | |
Vincent Bernat | fd50068 | 2012-10-24 14:45:54 +0000 | [diff] [blame] | 151 | o->ref_bandwidth = OSPF6_REFERENCE_BANDWIDTH; |
| 152 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 153 | return o; |
| 154 | } |
| 155 | |
Tom Goff | ae2254a | 2010-11-10 13:01:41 -0800 | [diff] [blame] | 156 | void |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 157 | ospf6_delete (struct ospf6 *o) |
| 158 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 159 | struct listnode *node, *nnode; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 160 | struct ospf6_area *oa; |
| 161 | |
Tom Goff | ae2254a | 2010-11-10 13:01:41 -0800 | [diff] [blame] | 162 | ospf6_disable (ospf6); |
| 163 | |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 164 | for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa)) |
| 165 | ospf6_area_delete (oa); |
Christian Franke | d962872 | 2013-03-08 21:47:35 +0100 | [diff] [blame] | 166 | |
| 167 | |
Tom Goff | ae2254a | 2010-11-10 13:01:41 -0800 | [diff] [blame] | 168 | list_delete (o->area_list); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 169 | |
| 170 | ospf6_lsdb_delete (o->lsdb); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 171 | ospf6_lsdb_delete (o->lsdb_self); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 172 | |
| 173 | ospf6_route_table_delete (o->route_table); |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 174 | ospf6_route_table_delete (o->brouter_table); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 175 | |
| 176 | ospf6_route_table_delete (o->external_table); |
| 177 | route_table_finish (o->external_id_table); |
| 178 | |
| 179 | XFREE (MTYPE_OSPF6_TOP, o); |
| 180 | } |
| 181 | |
Paul Jakma | 6ac29a5 | 2008-08-15 13:45:30 +0100 | [diff] [blame] | 182 | static void |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 183 | ospf6_enable (struct ospf6 *o) |
| 184 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 185 | struct listnode *node, *nnode; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 186 | struct ospf6_area *oa; |
| 187 | |
| 188 | if (CHECK_FLAG (o->flag, OSPF6_DISABLED)) |
| 189 | { |
| 190 | UNSET_FLAG (o->flag, OSPF6_DISABLED); |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 191 | for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa)) |
| 192 | ospf6_area_enable (oa); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 193 | } |
| 194 | } |
| 195 | |
Paul Jakma | 6ac29a5 | 2008-08-15 13:45:30 +0100 | [diff] [blame] | 196 | static void |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 197 | ospf6_disable (struct ospf6 *o) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 198 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 199 | struct listnode *node, *nnode; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 200 | struct ospf6_area *oa; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 201 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 202 | if (! CHECK_FLAG (o->flag, OSPF6_DISABLED)) |
| 203 | { |
| 204 | SET_FLAG (o->flag, OSPF6_DISABLED); |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 205 | |
| 206 | for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa)) |
| 207 | ospf6_area_disable (oa); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 208 | |
Christian Franke | d962872 | 2013-03-08 21:47:35 +0100 | [diff] [blame] | 209 | /* XXX: This also changes persistent settings */ |
| 210 | ospf6_asbr_redistribute_reset(); |
| 211 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 212 | ospf6_lsdb_remove_all (o->lsdb); |
| 213 | ospf6_route_remove_all (o->route_table); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 214 | ospf6_route_remove_all (o->brouter_table); |
Christian Franke | d962872 | 2013-03-08 21:47:35 +0100 | [diff] [blame] | 215 | |
| 216 | THREAD_OFF(o->maxage_remover); |
| 217 | THREAD_OFF(o->t_spf_calc); |
| 218 | THREAD_OFF(o->t_ase_calc); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 219 | } |
| 220 | } |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 221 | |
Dinesh Dutt | 2449fcd | 2013-08-24 07:54:17 +0000 | [diff] [blame] | 222 | int |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 223 | ospf6_maxage_remover (struct thread *thread) |
| 224 | { |
| 225 | struct ospf6 *o = (struct ospf6 *) THREAD_ARG (thread); |
| 226 | struct ospf6_area *oa; |
| 227 | struct ospf6_interface *oi; |
| 228 | struct ospf6_neighbor *on; |
hasso | 52dc7ee | 2004-09-23 19:18:23 +0000 | [diff] [blame] | 229 | struct listnode *i, *j, *k; |
Dinesh Dutt | 2449fcd | 2013-08-24 07:54:17 +0000 | [diff] [blame] | 230 | int reschedule = 0; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 231 | |
| 232 | o->maxage_remover = (struct thread *) NULL; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 233 | |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 234 | for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa)) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 235 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 236 | for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi)) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 237 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 238 | for (ALL_LIST_ELEMENTS_RO (oi->neighbor_list, k, on)) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 239 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 240 | if (on->state != OSPF6_NEIGHBOR_EXCHANGE && |
| 241 | on->state != OSPF6_NEIGHBOR_LOADING) |
Dinesh Dutt | 2449fcd | 2013-08-24 07:54:17 +0000 | [diff] [blame] | 242 | continue; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 243 | |
Dinesh Dutt | 2449fcd | 2013-08-24 07:54:17 +0000 | [diff] [blame] | 244 | ospf6_maxage_remove (o); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 245 | return 0; |
| 246 | } |
| 247 | } |
| 248 | } |
| 249 | |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 250 | for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa)) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 251 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 252 | for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi)) |
Dinesh Dutt | 2449fcd | 2013-08-24 07:54:17 +0000 | [diff] [blame] | 253 | { |
| 254 | if (ospf6_lsdb_maxage_remover (oi->lsdb)) |
| 255 | { |
| 256 | reschedule = 1; |
| 257 | } |
| 258 | } |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 259 | |
Dinesh Dutt | 2449fcd | 2013-08-24 07:54:17 +0000 | [diff] [blame] | 260 | if (ospf6_lsdb_maxage_remover (oa->lsdb)) |
| 261 | { |
| 262 | reschedule = 1; |
| 263 | } |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 264 | } |
Dinesh Dutt | 2449fcd | 2013-08-24 07:54:17 +0000 | [diff] [blame] | 265 | |
| 266 | if (ospf6_lsdb_maxage_remover (o->lsdb)) |
| 267 | { |
| 268 | reschedule = 1; |
| 269 | } |
| 270 | |
| 271 | if (reschedule) |
| 272 | { |
| 273 | ospf6_maxage_remove (o); |
| 274 | } |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 275 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 276 | return 0; |
| 277 | } |
| 278 | |
| 279 | void |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 280 | ospf6_maxage_remove (struct ospf6 *o) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 281 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 282 | if (o && ! o->maxage_remover) |
Dinesh Dutt | 2449fcd | 2013-08-24 07:54:17 +0000 | [diff] [blame] | 283 | o->maxage_remover = thread_add_timer (master, ospf6_maxage_remover, o, |
| 284 | OSPF_LSA_MAXAGE_REMOVE_DELAY_DEFAULT); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 285 | } |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 286 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 287 | /* start ospf6 */ |
| 288 | DEFUN (router_ospf6, |
| 289 | router_ospf6_cmd, |
| 290 | "router ospf6", |
| 291 | ROUTER_STR |
| 292 | OSPF6_STR) |
| 293 | { |
| 294 | if (ospf6 == NULL) |
| 295 | ospf6 = ospf6_create (); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 296 | |
| 297 | /* set current ospf point. */ |
| 298 | vty->node = OSPF6_NODE; |
| 299 | vty->index = ospf6; |
| 300 | |
| 301 | return CMD_SUCCESS; |
| 302 | } |
| 303 | |
| 304 | /* stop ospf6 */ |
| 305 | DEFUN (no_router_ospf6, |
| 306 | no_router_ospf6_cmd, |
| 307 | "no router ospf6", |
| 308 | NO_STR |
| 309 | OSPF6_ROUTER_STR) |
| 310 | { |
Christian Franke | d962872 | 2013-03-08 21:47:35 +0100 | [diff] [blame] | 311 | if (ospf6 == NULL) |
| 312 | vty_out (vty, "OSPFv3 is not configured%s", VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 313 | else |
Christian Franke | d962872 | 2013-03-08 21:47:35 +0100 | [diff] [blame] | 314 | { |
| 315 | ospf6_delete (ospf6); |
| 316 | ospf6 = NULL; |
| 317 | } |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 318 | |
| 319 | /* return to config node . */ |
| 320 | vty->node = CONFIG_NODE; |
| 321 | vty->index = NULL; |
| 322 | |
| 323 | return CMD_SUCCESS; |
| 324 | } |
| 325 | |
| 326 | /* change Router_ID commands. */ |
| 327 | DEFUN (ospf6_router_id, |
| 328 | ospf6_router_id_cmd, |
| 329 | "router-id A.B.C.D", |
| 330 | "Configure OSPF Router-ID\n" |
| 331 | V4NOTATION_STR) |
| 332 | { |
| 333 | int ret; |
| 334 | u_int32_t router_id; |
| 335 | struct ospf6 *o; |
| 336 | |
| 337 | o = (struct ospf6 *) vty->index; |
| 338 | |
| 339 | ret = inet_pton (AF_INET, argv[0], &router_id); |
| 340 | if (ret == 0) |
| 341 | { |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 342 | vty_out (vty, "malformed OSPF Router-ID: %s%s", argv[0], VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 343 | return CMD_SUCCESS; |
| 344 | } |
| 345 | |
hasso | c8a440e | 2004-10-11 17:02:40 +0000 | [diff] [blame] | 346 | o->router_id_static = router_id; |
| 347 | if (o->router_id == 0) |
| 348 | o->router_id = router_id; |
| 349 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 350 | return CMD_SUCCESS; |
| 351 | } |
| 352 | |
Dinesh Dutt | 3d35ca4 | 2013-08-26 03:40:16 +0000 | [diff] [blame] | 353 | DEFUN (ospf6_log_adjacency_changes, |
| 354 | ospf6_log_adjacency_changes_cmd, |
| 355 | "log-adjacency-changes", |
| 356 | "Log changes in adjacency state\n") |
| 357 | { |
| 358 | struct ospf6 *ospf6 = vty->index; |
| 359 | |
| 360 | SET_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_CHANGES); |
| 361 | return CMD_SUCCESS; |
| 362 | } |
| 363 | |
| 364 | DEFUN (ospf6_log_adjacency_changes_detail, |
| 365 | ospf6_log_adjacency_changes_detail_cmd, |
| 366 | "log-adjacency-changes detail", |
| 367 | "Log changes in adjacency state\n" |
| 368 | "Log all state changes\n") |
| 369 | { |
| 370 | struct ospf6 *ospf6 = vty->index; |
| 371 | |
| 372 | SET_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_CHANGES); |
| 373 | SET_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_DETAIL); |
| 374 | return CMD_SUCCESS; |
| 375 | } |
| 376 | |
| 377 | DEFUN (no_ospf6_log_adjacency_changes, |
| 378 | no_ospf6_log_adjacency_changes_cmd, |
| 379 | "no log-adjacency-changes", |
| 380 | NO_STR |
| 381 | "Log changes in adjacency state\n") |
| 382 | { |
| 383 | struct ospf6 *ospf6 = vty->index; |
| 384 | |
| 385 | UNSET_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_DETAIL); |
| 386 | UNSET_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_CHANGES); |
| 387 | return CMD_SUCCESS; |
| 388 | } |
| 389 | |
| 390 | DEFUN (no_ospf6_log_adjacency_changes_detail, |
| 391 | no_ospf6_log_adjacency_changes_detail_cmd, |
| 392 | "no log-adjacency-changes detail", |
| 393 | NO_STR |
| 394 | "Log changes in adjacency state\n" |
| 395 | "Log all state changes\n") |
| 396 | { |
| 397 | struct ospf6 *ospf6 = vty->index; |
| 398 | |
| 399 | UNSET_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_DETAIL); |
| 400 | return CMD_SUCCESS; |
| 401 | } |
| 402 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 403 | DEFUN (ospf6_interface_area, |
| 404 | ospf6_interface_area_cmd, |
| 405 | "interface IFNAME area A.B.C.D", |
| 406 | "Enable routing on an IPv6 interface\n" |
| 407 | IFNAME_STR |
| 408 | "Specify the OSPF6 area ID\n" |
| 409 | "OSPF6 area ID in IPv4 address notation\n" |
| 410 | ) |
| 411 | { |
| 412 | struct ospf6 *o; |
hasso | 3b68735 | 2004-08-19 06:56:53 +0000 | [diff] [blame] | 413 | struct ospf6_area *oa; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 414 | struct ospf6_interface *oi; |
| 415 | struct interface *ifp; |
| 416 | u_int32_t area_id; |
| 417 | |
| 418 | o = (struct ospf6 *) vty->index; |
| 419 | |
| 420 | /* find/create ospf6 interface */ |
| 421 | ifp = if_get_by_name (argv[0]); |
| 422 | oi = (struct ospf6_interface *) ifp->info; |
| 423 | if (oi == NULL) |
| 424 | oi = ospf6_interface_create (ifp); |
| 425 | if (oi->area) |
| 426 | { |
| 427 | vty_out (vty, "%s already attached to Area %s%s", |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 428 | oi->interface->name, oi->area->name, VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 429 | return CMD_SUCCESS; |
| 430 | } |
| 431 | |
| 432 | /* parse Area-ID */ |
| 433 | if (inet_pton (AF_INET, argv[1], &area_id) != 1) |
| 434 | { |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 435 | vty_out (vty, "Invalid Area-ID: %s%s", argv[1], VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 436 | return CMD_SUCCESS; |
| 437 | } |
| 438 | |
| 439 | /* find/create ospf6 area */ |
| 440 | oa = ospf6_area_lookup (area_id, o); |
| 441 | if (oa == NULL) |
| 442 | oa = ospf6_area_create (area_id, o); |
| 443 | |
| 444 | /* attach interface to area */ |
| 445 | listnode_add (oa->if_list, oi); /* sort ?? */ |
| 446 | oi->area = oa; |
| 447 | |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 448 | SET_FLAG (oa->flag, OSPF6_AREA_ENABLE); |
| 449 | |
Christian Franke | d962872 | 2013-03-08 21:47:35 +0100 | [diff] [blame] | 450 | /* ospf6 process is currently disabled, not much more to do */ |
| 451 | if (CHECK_FLAG (o->flag, OSPF6_DISABLED)) |
| 452 | return CMD_SUCCESS; |
| 453 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 454 | /* start up */ |
Christian Franke | d962872 | 2013-03-08 21:47:35 +0100 | [diff] [blame] | 455 | ospf6_interface_enable (oi); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 456 | |
hasso | 3b68735 | 2004-08-19 06:56:53 +0000 | [diff] [blame] | 457 | /* If the router is ABR, originate summary routes */ |
| 458 | if (ospf6_is_router_abr (o)) |
| 459 | ospf6_abr_enable_area (oa); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 460 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 461 | return CMD_SUCCESS; |
| 462 | } |
| 463 | |
| 464 | DEFUN (no_ospf6_interface_area, |
| 465 | no_ospf6_interface_area_cmd, |
| 466 | "no interface IFNAME area A.B.C.D", |
| 467 | NO_STR |
| 468 | "Disable routing on an IPv6 interface\n" |
| 469 | IFNAME_STR |
| 470 | "Specify the OSPF6 area ID\n" |
| 471 | "OSPF6 area ID in IPv4 address notation\n" |
| 472 | ) |
| 473 | { |
| 474 | struct ospf6 *o; |
| 475 | struct ospf6_interface *oi; |
hasso | 3b68735 | 2004-08-19 06:56:53 +0000 | [diff] [blame] | 476 | struct ospf6_area *oa; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 477 | struct interface *ifp; |
| 478 | u_int32_t area_id; |
| 479 | |
| 480 | o = (struct ospf6 *) vty->index; |
| 481 | |
| 482 | ifp = if_lookup_by_name (argv[0]); |
| 483 | if (ifp == NULL) |
| 484 | { |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 485 | vty_out (vty, "No such interface %s%s", argv[0], VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 486 | return CMD_SUCCESS; |
| 487 | } |
| 488 | |
| 489 | oi = (struct ospf6_interface *) ifp->info; |
| 490 | if (oi == NULL) |
| 491 | { |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 492 | vty_out (vty, "Interface %s not enabled%s", ifp->name, VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 493 | return CMD_SUCCESS; |
| 494 | } |
| 495 | |
| 496 | /* parse Area-ID */ |
| 497 | if (inet_pton (AF_INET, argv[1], &area_id) != 1) |
| 498 | { |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 499 | vty_out (vty, "Invalid Area-ID: %s%s", argv[1], VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 500 | return CMD_SUCCESS; |
| 501 | } |
| 502 | |
Jon | 56abbb8 | 2009-02-11 17:30:44 -0800 | [diff] [blame] | 503 | /* Verify Area */ |
| 504 | if (oi->area == NULL) |
| 505 | { |
| 506 | vty_out (vty, "No such Area-ID: %s%s", argv[1], VNL); |
| 507 | return CMD_SUCCESS; |
| 508 | } |
| 509 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 510 | if (oi->area->area_id != area_id) |
| 511 | { |
| 512 | vty_out (vty, "Wrong Area-ID: %s is attached to area %s%s", |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 513 | oi->interface->name, oi->area->name, VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 514 | return CMD_SUCCESS; |
| 515 | } |
| 516 | |
| 517 | thread_execute (master, interface_down, oi, 0); |
| 518 | |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 519 | oa = oi->area; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 520 | listnode_delete (oi->area->if_list, oi); |
| 521 | oi->area = (struct ospf6_area *) NULL; |
| 522 | |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 523 | /* Withdraw inter-area routes from this area, if necessary */ |
| 524 | if (oa->if_list->count == 0) |
| 525 | { |
| 526 | UNSET_FLAG (oa->flag, OSPF6_AREA_ENABLE); |
hasso | 3b68735 | 2004-08-19 06:56:53 +0000 | [diff] [blame] | 527 | ospf6_abr_disable_area (oa); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 528 | } |
| 529 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 530 | return CMD_SUCCESS; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 531 | } |
| 532 | |
Dinesh Dutt | f41b4a0 | 2013-08-24 08:00:37 +0000 | [diff] [blame] | 533 | DEFUN (ospf6_stub_router_admin, |
| 534 | ospf6_stub_router_admin_cmd, |
| 535 | "stub-router administrative", |
| 536 | "Make router a stub router\n" |
| 537 | "Advertise inability to be a transit router\n" |
| 538 | "Administratively applied, for an indefinite period\n") |
| 539 | { |
| 540 | struct listnode *node; |
| 541 | struct ospf6_area *oa; |
| 542 | |
| 543 | if (!CHECK_FLAG (ospf6->flag, OSPF6_STUB_ROUTER)) |
| 544 | { |
| 545 | for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa)) |
| 546 | { |
| 547 | OSPF6_OPT_CLEAR (oa->options, OSPF6_OPT_V6); |
| 548 | OSPF6_OPT_CLEAR (oa->options, OSPF6_OPT_R); |
| 549 | OSPF6_ROUTER_LSA_SCHEDULE (oa); |
| 550 | } |
| 551 | SET_FLAG (ospf6->flag, OSPF6_STUB_ROUTER); |
| 552 | } |
| 553 | |
| 554 | return CMD_SUCCESS; |
| 555 | } |
| 556 | |
| 557 | DEFUN (no_ospf6_stub_router_admin, |
| 558 | no_ospf6_stub_router_admin_cmd, |
| 559 | "no stub-router administrative", |
| 560 | NO_STR |
| 561 | "Make router a stub router\n" |
| 562 | "Advertise ability to be a transit router\n" |
| 563 | "Administratively applied, for an indefinite period\n") |
| 564 | { |
| 565 | struct listnode *node; |
| 566 | struct ospf6_area *oa; |
| 567 | |
| 568 | if (CHECK_FLAG (ospf6->flag, OSPF6_STUB_ROUTER)) |
| 569 | { |
| 570 | for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa)) |
| 571 | { |
| 572 | OSPF6_OPT_SET (oa->options, OSPF6_OPT_V6); |
| 573 | OSPF6_OPT_SET (oa->options, OSPF6_OPT_R); |
| 574 | OSPF6_ROUTER_LSA_SCHEDULE (oa); |
| 575 | } |
| 576 | UNSET_FLAG (ospf6->flag, OSPF6_STUB_ROUTER); |
| 577 | } |
| 578 | |
| 579 | return CMD_SUCCESS; |
| 580 | } |
| 581 | |
| 582 | DEFUN (ospf6_stub_router_startup, |
| 583 | ospf6_stub_router_startup_cmd, |
| 584 | "stub-router on-startup <5-86400>", |
| 585 | "Make router a stub router\n" |
| 586 | "Advertise inability to be a transit router\n" |
| 587 | "Automatically advertise as stub-router on startup of OSPF6\n" |
| 588 | "Time (seconds) to advertise self as stub-router\n") |
| 589 | { |
| 590 | return CMD_SUCCESS; |
| 591 | } |
| 592 | |
| 593 | DEFUN (no_ospf6_stub_router_startup, |
| 594 | no_ospf6_stub_router_startup_cmd, |
| 595 | "no stub-router on-startup", |
| 596 | NO_STR |
| 597 | "Make router a stub router\n" |
| 598 | "Advertise inability to be a transit router\n" |
| 599 | "Automatically advertise as stub-router on startup of OSPF6\n" |
| 600 | "Time (seconds) to advertise self as stub-router\n") |
| 601 | { |
| 602 | return CMD_SUCCESS; |
| 603 | } |
| 604 | |
| 605 | DEFUN (ospf6_stub_router_shutdown, |
| 606 | ospf6_stub_router_shutdown_cmd, |
| 607 | "stub-router on-shutdown <5-86400>", |
| 608 | "Make router a stub router\n" |
| 609 | "Advertise inability to be a transit router\n" |
| 610 | "Automatically advertise as stub-router before shutdown\n" |
| 611 | "Time (seconds) to advertise self as stub-router\n") |
| 612 | { |
| 613 | return CMD_SUCCESS; |
| 614 | } |
| 615 | |
| 616 | DEFUN (no_ospf6_stub_router_shutdown, |
| 617 | no_ospf6_stub_router_shutdown_cmd, |
| 618 | "no stub-router on-shutdown", |
| 619 | NO_STR |
| 620 | "Make router a stub router\n" |
| 621 | "Advertise inability to be a transit router\n" |
| 622 | "Automatically advertise as stub-router before shutdown\n" |
| 623 | "Time (seconds) to advertise self as stub-router\n") |
| 624 | { |
| 625 | return CMD_SUCCESS; |
| 626 | } |
| 627 | |
Paul Jakma | 6ac29a5 | 2008-08-15 13:45:30 +0100 | [diff] [blame] | 628 | static void |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 629 | ospf6_show (struct vty *vty, struct ospf6 *o) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 630 | { |
hasso | 52dc7ee | 2004-09-23 19:18:23 +0000 | [diff] [blame] | 631 | struct listnode *n; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 632 | struct ospf6_area *oa; |
| 633 | char router_id[16], duration[32]; |
Dinesh Dutt | a0edf67 | 2013-08-26 03:40:23 +0000 | [diff] [blame] | 634 | struct timeval now, running, result; |
| 635 | char buf[32], rbuf[32]; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 636 | |
| 637 | /* process id, router id */ |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 638 | inet_ntop (AF_INET, &o->router_id, router_id, sizeof (router_id)); |
| 639 | vty_out (vty, " OSPFv3 Routing Process (0) with Router-ID %s%s", |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 640 | router_id, VNL); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 641 | |
| 642 | /* running time */ |
Takashi Sogabe | 86f72dc | 2009-06-22 13:07:02 +0900 | [diff] [blame] | 643 | quagga_gettime (QUAGGA_CLK_MONOTONIC, &now); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 644 | timersub (&now, &o->starttime, &running); |
| 645 | timerstring (&running, duration, sizeof (duration)); |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 646 | vty_out (vty, " Running %s%s", duration, VNL); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 647 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 648 | /* Redistribute configuration */ |
| 649 | /* XXX */ |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 650 | |
Dinesh Dutt | a0edf67 | 2013-08-26 03:40:23 +0000 | [diff] [blame] | 651 | /* Show SPF parameters */ |
| 652 | vty_out(vty, " Initial SPF scheduling delay %d millisec(s)%s" |
| 653 | " Minimum hold time between consecutive SPFs %d millsecond(s)%s" |
| 654 | " Maximum hold time between consecutive SPFs %d millsecond(s)%s" |
| 655 | " Hold time multiplier is currently %d%s", |
| 656 | o->spf_delay, VNL, |
| 657 | o->spf_holdtime, VNL, |
| 658 | o->spf_max_holdtime, VNL, |
| 659 | o->spf_hold_multiplier, VNL); |
| 660 | |
| 661 | vty_out(vty, " SPF algorithm "); |
| 662 | if (o->ts_spf.tv_sec || o->ts_spf.tv_usec) |
| 663 | { |
| 664 | timersub(&now, &o->ts_spf, &result); |
| 665 | timerstring(&result, buf, sizeof(buf)); |
| 666 | ospf6_spf_reason_string(o->last_spf_reason, rbuf, sizeof(rbuf)); |
| 667 | vty_out(vty, "last executed %s ago, reason %s%s", buf, rbuf, VNL); |
| 668 | vty_out (vty, " Last SPF duration %ld sec %ld usec%s", |
| 669 | o->ts_spf_duration.tv_sec, o->ts_spf_duration.tv_usec, VNL); |
| 670 | } |
| 671 | else |
| 672 | vty_out(vty, "has not been run$%s", VNL); |
| 673 | threadtimer_string(now, o->t_spf_calc, buf, sizeof(buf)); |
| 674 | vty_out (vty, " SPF timer %s%s%s", |
| 675 | (o->t_spf_calc ? "due in " : "is "), buf, VNL); |
| 676 | |
Dinesh Dutt | f41b4a0 | 2013-08-24 08:00:37 +0000 | [diff] [blame] | 677 | if (CHECK_FLAG (o->flag, OSPF6_STUB_ROUTER)) |
| 678 | vty_out (vty, " Router Is Stub Router%s", VNL); |
| 679 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 680 | /* LSAs */ |
| 681 | vty_out (vty, " Number of AS scoped LSAs is %u%s", |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 682 | o->lsdb->count, VNL); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 683 | |
| 684 | /* Areas */ |
| 685 | vty_out (vty, " Number of areas in this router is %u%s", |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 686 | listcount (o->area_list), VNL); |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 687 | |
Dinesh Dutt | 3d35ca4 | 2013-08-26 03:40:16 +0000 | [diff] [blame] | 688 | if (CHECK_FLAG(o->config_flags, OSPF6_LOG_ADJACENCY_CHANGES)) |
| 689 | { |
| 690 | if (CHECK_FLAG(o->config_flags, OSPF6_LOG_ADJACENCY_DETAIL)) |
| 691 | vty_out(vty, " All adjacency changes are logged%s",VTY_NEWLINE); |
| 692 | else |
| 693 | vty_out(vty, " Adjacency changes are logged%s",VTY_NEWLINE); |
| 694 | } |
| 695 | |
| 696 | vty_out (vty, "%s",VTY_NEWLINE); |
| 697 | |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 698 | for (ALL_LIST_ELEMENTS_RO (o->area_list, n, oa)) |
| 699 | ospf6_area_show (vty, oa); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 700 | } |
| 701 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 702 | /* show top level structures */ |
| 703 | DEFUN (show_ipv6_ospf6, |
| 704 | show_ipv6_ospf6_cmd, |
| 705 | "show ipv6 ospf6", |
| 706 | SHOW_STR |
| 707 | IP6_STR |
| 708 | OSPF6_STR) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 709 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 710 | OSPF6_CMD_CHECK_RUNNING (); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 711 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 712 | ospf6_show (vty, ospf6); |
| 713 | return CMD_SUCCESS; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 714 | } |
| 715 | |
| 716 | DEFUN (show_ipv6_ospf6_route, |
| 717 | show_ipv6_ospf6_route_cmd, |
| 718 | "show ipv6 ospf6 route", |
| 719 | SHOW_STR |
| 720 | IP6_STR |
| 721 | OSPF6_STR |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 722 | ROUTE_STR |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 723 | ) |
| 724 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 725 | ospf6_route_table_show (vty, argc, argv, ospf6->route_table); |
| 726 | return CMD_SUCCESS; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 727 | } |
| 728 | |
| 729 | ALIAS (show_ipv6_ospf6_route, |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 730 | show_ipv6_ospf6_route_detail_cmd, |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 731 | "show ipv6 ospf6 route (X:X::X:X|X:X::X:X/M|detail|summary)", |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 732 | SHOW_STR |
| 733 | IP6_STR |
| 734 | OSPF6_STR |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 735 | ROUTE_STR |
| 736 | "Specify IPv6 address\n" |
| 737 | "Specify IPv6 prefix\n" |
| 738 | "Detailed information\n" |
| 739 | "Summary of route table\n" |
Paul Jakma | 6ac29a5 | 2008-08-15 13:45:30 +0100 | [diff] [blame] | 740 | ) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 741 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 742 | DEFUN (show_ipv6_ospf6_route_match, |
| 743 | show_ipv6_ospf6_route_match_cmd, |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 744 | "show ipv6 ospf6 route X:X::X:X/M match", |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 745 | SHOW_STR |
| 746 | IP6_STR |
| 747 | OSPF6_STR |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 748 | ROUTE_STR |
| 749 | "Specify IPv6 prefix\n" |
| 750 | "Display routes which match the specified route\n" |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 751 | ) |
| 752 | { |
paul | 0c083ee | 2004-10-10 12:54:58 +0000 | [diff] [blame] | 753 | const char *sargv[CMD_ARGC_MAX]; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 754 | int i, sargc; |
| 755 | |
| 756 | /* copy argv to sargv and then append "match" */ |
| 757 | for (i = 0; i < argc; i++) |
| 758 | sargv[i] = argv[i]; |
| 759 | sargc = argc; |
| 760 | sargv[sargc++] = "match"; |
| 761 | sargv[sargc] = NULL; |
| 762 | |
| 763 | ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table); |
| 764 | return CMD_SUCCESS; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 765 | } |
| 766 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 767 | DEFUN (show_ipv6_ospf6_route_match_detail, |
| 768 | show_ipv6_ospf6_route_match_detail_cmd, |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 769 | "show ipv6 ospf6 route X:X::X:X/M match detail", |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 770 | SHOW_STR |
| 771 | IP6_STR |
| 772 | OSPF6_STR |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 773 | ROUTE_STR |
| 774 | "Specify IPv6 prefix\n" |
| 775 | "Display routes which match the specified route\n" |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 776 | "Detailed information\n" |
| 777 | ) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 778 | { |
paul | 0c083ee | 2004-10-10 12:54:58 +0000 | [diff] [blame] | 779 | const char *sargv[CMD_ARGC_MAX]; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 780 | int i, sargc; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 781 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 782 | /* copy argv to sargv and then append "match" and "detail" */ |
| 783 | for (i = 0; i < argc; i++) |
| 784 | sargv[i] = argv[i]; |
| 785 | sargc = argc; |
| 786 | sargv[sargc++] = "match"; |
| 787 | sargv[sargc++] = "detail"; |
| 788 | sargv[sargc] = NULL; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 789 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 790 | ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table); |
| 791 | return CMD_SUCCESS; |
| 792 | } |
| 793 | |
Paul Jakma | cb4b884 | 2006-05-15 10:39:30 +0000 | [diff] [blame] | 794 | ALIAS (show_ipv6_ospf6_route_match, |
| 795 | show_ipv6_ospf6_route_longer_cmd, |
| 796 | "show ipv6 ospf6 route X:X::X:X/M longer", |
| 797 | SHOW_STR |
| 798 | IP6_STR |
| 799 | OSPF6_STR |
| 800 | ROUTE_STR |
| 801 | "Specify IPv6 prefix\n" |
| 802 | "Display routes longer than the specified route\n" |
Paul Jakma | 6ac29a5 | 2008-08-15 13:45:30 +0100 | [diff] [blame] | 803 | ) |
Paul Jakma | cb4b884 | 2006-05-15 10:39:30 +0000 | [diff] [blame] | 804 | |
| 805 | DEFUN (show_ipv6_ospf6_route_match_detail, |
| 806 | show_ipv6_ospf6_route_longer_detail_cmd, |
| 807 | "show ipv6 ospf6 route X:X::X:X/M longer detail", |
| 808 | SHOW_STR |
| 809 | IP6_STR |
| 810 | OSPF6_STR |
| 811 | ROUTE_STR |
| 812 | "Specify IPv6 prefix\n" |
| 813 | "Display routes longer than the specified route\n" |
| 814 | "Detailed information\n" |
| 815 | ); |
| 816 | |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 817 | ALIAS (show_ipv6_ospf6_route, |
| 818 | show_ipv6_ospf6_route_type_cmd, |
| 819 | "show ipv6 ospf6 route (intra-area|inter-area|external-1|external-2)", |
| 820 | SHOW_STR |
| 821 | IP6_STR |
| 822 | OSPF6_STR |
| 823 | ROUTE_STR |
Denis Ovsienko | ea40219 | 2011-08-19 16:27:16 +0400 | [diff] [blame] | 824 | "Display Intra-Area routes\n" |
| 825 | "Display Inter-Area routes\n" |
| 826 | "Display Type-1 External routes\n" |
| 827 | "Display Type-2 External routes\n" |
Paul Jakma | 6ac29a5 | 2008-08-15 13:45:30 +0100 | [diff] [blame] | 828 | ) |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 829 | |
| 830 | DEFUN (show_ipv6_ospf6_route_type_detail, |
| 831 | show_ipv6_ospf6_route_type_detail_cmd, |
| 832 | "show ipv6 ospf6 route (intra-area|inter-area|external-1|external-2) detail", |
| 833 | SHOW_STR |
| 834 | IP6_STR |
| 835 | OSPF6_STR |
| 836 | ROUTE_STR |
Denis Ovsienko | ea40219 | 2011-08-19 16:27:16 +0400 | [diff] [blame] | 837 | "Display Intra-Area routes\n" |
| 838 | "Display Inter-Area routes\n" |
| 839 | "Display Type-1 External routes\n" |
| 840 | "Display Type-2 External routes\n" |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 841 | "Detailed information\n" |
| 842 | ) |
| 843 | { |
paul | 0c083ee | 2004-10-10 12:54:58 +0000 | [diff] [blame] | 844 | const char *sargv[CMD_ARGC_MAX]; |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 845 | int i, sargc; |
| 846 | |
| 847 | /* copy argv to sargv and then append "detail" */ |
| 848 | for (i = 0; i < argc; i++) |
| 849 | sargv[i] = argv[i]; |
| 850 | sargc = argc; |
| 851 | sargv[sargc++] = "detail"; |
| 852 | sargv[sargc] = NULL; |
| 853 | |
| 854 | ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table); |
| 855 | return CMD_SUCCESS; |
| 856 | } |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 857 | |
Dinesh Dutt | f41b4a0 | 2013-08-24 08:00:37 +0000 | [diff] [blame] | 858 | static void |
| 859 | ospf6_stub_router_config_write (struct vty *vty) |
| 860 | { |
| 861 | if (CHECK_FLAG (ospf6->flag, OSPF6_STUB_ROUTER)) |
| 862 | { |
| 863 | vty_out (vty, " stub-router administrative%s", VNL); |
| 864 | } |
| 865 | return; |
| 866 | } |
| 867 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 868 | /* OSPF configuration write function. */ |
Paul Jakma | 6ac29a5 | 2008-08-15 13:45:30 +0100 | [diff] [blame] | 869 | static int |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 870 | config_write_ospf6 (struct vty *vty) |
| 871 | { |
| 872 | char router_id[16]; |
hasso | 52dc7ee | 2004-09-23 19:18:23 +0000 | [diff] [blame] | 873 | struct listnode *j, *k; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 874 | struct ospf6_area *oa; |
| 875 | struct ospf6_interface *oi; |
| 876 | |
| 877 | /* OSPFv6 configuration. */ |
| 878 | if (ospf6 == NULL) |
| 879 | return CMD_SUCCESS; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 880 | |
hasso | c8a440e | 2004-10-11 17:02:40 +0000 | [diff] [blame] | 881 | inet_ntop (AF_INET, &ospf6->router_id_static, router_id, sizeof (router_id)); |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 882 | vty_out (vty, "router ospf6%s", VNL); |
hasso | c8a440e | 2004-10-11 17:02:40 +0000 | [diff] [blame] | 883 | if (ospf6->router_id_static != 0) |
| 884 | vty_out (vty, " router-id %s%s", router_id, VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 885 | |
Dinesh Dutt | 3d35ca4 | 2013-08-26 03:40:16 +0000 | [diff] [blame] | 886 | /* log-adjacency-changes flag print. */ |
| 887 | if (CHECK_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_CHANGES)) |
| 888 | { |
| 889 | vty_out(vty, " log-adjacency-changes"); |
| 890 | if (CHECK_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_DETAIL)) |
| 891 | vty_out(vty, " detail"); |
| 892 | vty_out(vty, "%s", VTY_NEWLINE); |
| 893 | } |
| 894 | |
Vincent Bernat | fd50068 | 2012-10-24 14:45:54 +0000 | [diff] [blame] | 895 | if (ospf6->ref_bandwidth != OSPF6_REFERENCE_BANDWIDTH) |
| 896 | vty_out (vty, " auto-cost reference-bandwidth %d%s", ospf6->ref_bandwidth / 1000, |
| 897 | VNL); |
| 898 | |
Dinesh Dutt | f41b4a0 | 2013-08-24 08:00:37 +0000 | [diff] [blame] | 899 | ospf6_stub_router_config_write (vty); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 900 | ospf6_redistribute_config_write (vty); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 901 | ospf6_area_config_write (vty); |
Dinesh Dutt | 3810e06 | 2013-08-24 07:54:09 +0000 | [diff] [blame] | 902 | ospf6_spf_config_write (vty); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 903 | |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 904 | for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, j, oa)) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 905 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 906 | for (ALL_LIST_ELEMENTS_RO (oa->if_list, k, oi)) |
| 907 | vty_out (vty, " interface %s area %s%s", |
| 908 | oi->interface->name, oa->name, VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 909 | } |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 910 | vty_out (vty, "!%s", VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 911 | return 0; |
| 912 | } |
| 913 | |
| 914 | /* OSPF6 node structure. */ |
Stephen Hemminger | 7fc626d | 2008-12-01 11:10:34 -0800 | [diff] [blame] | 915 | static struct cmd_node ospf6_node = |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 916 | { |
| 917 | OSPF6_NODE, |
| 918 | "%s(config-ospf6)# ", |
hasso | 69b4a81 | 2004-08-26 18:10:36 +0000 | [diff] [blame] | 919 | 1 /* VTYSH */ |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 920 | }; |
| 921 | |
| 922 | /* Install ospf related commands. */ |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 923 | void |
Paul Jakma | 6ac29a5 | 2008-08-15 13:45:30 +0100 | [diff] [blame] | 924 | ospf6_top_init (void) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 925 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 926 | /* Install ospf6 top node. */ |
| 927 | install_node (&ospf6_node, config_write_ospf6); |
| 928 | |
| 929 | install_element (VIEW_NODE, &show_ipv6_ospf6_cmd); |
| 930 | install_element (ENABLE_NODE, &show_ipv6_ospf6_cmd); |
| 931 | install_element (CONFIG_NODE, &router_ospf6_cmd); |
Jon | 6c19d26 | 2009-02-11 17:19:07 -0800 | [diff] [blame] | 932 | install_element (CONFIG_NODE, &no_router_ospf6_cmd); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 933 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 934 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_cmd); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 935 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_detail_cmd); |
| 936 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_match_cmd); |
| 937 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_match_detail_cmd); |
Paul Jakma | cb4b884 | 2006-05-15 10:39:30 +0000 | [diff] [blame] | 938 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_longer_cmd); |
| 939 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_longer_detail_cmd); |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 940 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_type_cmd); |
| 941 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_type_detail_cmd); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 942 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_cmd); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 943 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_detail_cmd); |
| 944 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_match_cmd); |
| 945 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_match_detail_cmd); |
Paul Jakma | cb4b884 | 2006-05-15 10:39:30 +0000 | [diff] [blame] | 946 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_longer_cmd); |
| 947 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_longer_detail_cmd); |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 948 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_type_cmd); |
| 949 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_type_detail_cmd); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 950 | |
| 951 | install_default (OSPF6_NODE); |
| 952 | install_element (OSPF6_NODE, &ospf6_router_id_cmd); |
Dinesh Dutt | 3d35ca4 | 2013-08-26 03:40:16 +0000 | [diff] [blame] | 953 | install_element (OSPF6_NODE, &ospf6_log_adjacency_changes_cmd); |
| 954 | install_element (OSPF6_NODE, &ospf6_log_adjacency_changes_detail_cmd); |
| 955 | install_element (OSPF6_NODE, &no_ospf6_log_adjacency_changes_cmd); |
| 956 | install_element (OSPF6_NODE, &no_ospf6_log_adjacency_changes_detail_cmd); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 957 | install_element (OSPF6_NODE, &ospf6_interface_area_cmd); |
| 958 | install_element (OSPF6_NODE, &no_ospf6_interface_area_cmd); |
Dinesh Dutt | f41b4a0 | 2013-08-24 08:00:37 +0000 | [diff] [blame] | 959 | install_element (OSPF6_NODE, &ospf6_stub_router_admin_cmd); |
| 960 | install_element (OSPF6_NODE, &no_ospf6_stub_router_admin_cmd); |
| 961 | /* For a later time |
| 962 | install_element (OSPF6_NODE, &ospf6_stub_router_startup_cmd); |
| 963 | install_element (OSPF6_NODE, &no_ospf6_stub_router_startup_cmd); |
| 964 | install_element (OSPF6_NODE, &ospf6_stub_router_shutdown_cmd); |
| 965 | install_element (OSPF6_NODE, &no_ospf6_stub_router_shutdown_cmd); |
| 966 | */ |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 967 | } |
| 968 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 969 | |