blob: 1f7cdc8542f70775992d360275e4ff4b47f73bda [file] [log] [blame]
paul718e3742002-12-13 20:15:29 +00001/*
hasso508e53e2004-05-18 18:57:06 +00002 * Copyright (C) 2003 Yasuhiro Ohara
paul718e3742002-12-13 20:15:29 +00003 *
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
paul718e3742002-12-13 20:15:29 +000033#include "ospf6_proto.h"
hasso508e53e2004-05-18 18:57:06 +000034#include "ospf6_message.h"
paul718e3742002-12-13 20:15:29 +000035#include "ospf6_lsa.h"
36#include "ospf6_lsdb.h"
paul718e3742002-12-13 20:15:29 +000037#include "ospf6_route.h"
38#include "ospf6_zebra.h"
39
hasso508e53e2004-05-18 18:57:06 +000040#include "ospf6_top.h"
41#include "ospf6_area.h"
42#include "ospf6_interface.h"
43#include "ospf6_neighbor.h"
paul718e3742002-12-13 20:15:29 +000044
hasso6452df02004-08-15 05:52:07 +000045#include "ospf6_flood.h"
hasso508e53e2004-05-18 18:57:06 +000046#include "ospf6_asbr.h"
hasso049207c2004-08-04 20:02:13 +000047#include "ospf6_abr.h"
hasso6452df02004-08-15 05:52:07 +000048#include "ospf6_intra.h"
Dinesh Dutt3810e062013-08-24 07:54:09 +000049#include "ospf6_spf.h"
hasso049207c2004-08-04 20:02:13 +000050#include "ospf6d.h"
paul718e3742002-12-13 20:15:29 +000051
52/* global ospf6d variable */
53struct ospf6 *ospf6;
54
Tom Goffae2254a2010-11-10 13:01:41 -080055static void ospf6_disable (struct ospf6 *o);
56
Paul Jakma6ac29a52008-08-15 13:45:30 +010057static void
hasso508e53e2004-05-18 18:57:06 +000058ospf6_top_lsdb_hook_add (struct ospf6_lsa *lsa)
paul718e3742002-12-13 20:15:29 +000059{
hasso508e53e2004-05-18 18:57:06 +000060 switch (ntohs (lsa->header->type))
paul718e3742002-12-13 20:15:29 +000061 {
hasso508e53e2004-05-18 18:57:06 +000062 case OSPF6_LSTYPE_AS_EXTERNAL:
63 ospf6_asbr_lsa_add (lsa);
64 break;
65
66 default:
hasso508e53e2004-05-18 18:57:06 +000067 break;
paul718e3742002-12-13 20:15:29 +000068 }
69}
70
Paul Jakma6ac29a52008-08-15 13:45:30 +010071static void
hasso508e53e2004-05-18 18:57:06 +000072ospf6_top_lsdb_hook_remove (struct ospf6_lsa *lsa)
paul718e3742002-12-13 20:15:29 +000073{
hasso508e53e2004-05-18 18:57:06 +000074 switch (ntohs (lsa->header->type))
paul718e3742002-12-13 20:15:29 +000075 {
hasso508e53e2004-05-18 18:57:06 +000076 case OSPF6_LSTYPE_AS_EXTERNAL:
77 ospf6_asbr_lsa_remove (lsa);
78 break;
79
80 default:
hasso508e53e2004-05-18 18:57:06 +000081 break;
paul718e3742002-12-13 20:15:29 +000082 }
83}
84
Paul Jakma6ac29a52008-08-15 13:45:30 +010085static void
hasso049207c2004-08-04 20:02:13 +000086ospf6_top_route_hook_add (struct ospf6_route *route)
87{
hasso6452df02004-08-15 05:52:07 +000088 ospf6_abr_originate_summary (route);
hasso049207c2004-08-04 20:02:13 +000089 ospf6_zebra_route_update_add (route);
90}
91
Paul Jakma6ac29a52008-08-15 13:45:30 +010092static void
hasso049207c2004-08-04 20:02:13 +000093ospf6_top_route_hook_remove (struct ospf6_route *route)
94{
hasso6452df02004-08-15 05:52:07 +000095 ospf6_abr_originate_summary (route);
hasso049207c2004-08-04 20:02:13 +000096 ospf6_zebra_route_update_remove (route);
97}
98
Paul Jakma6ac29a52008-08-15 13:45:30 +010099static void
hasso6452df02004-08-15 05:52:07 +0000100ospf6_top_brouter_hook_add (struct ospf6_route *route)
101{
hassoccb59b12004-08-25 09:10:37 +0000102 ospf6_abr_examin_brouter (ADV_ROUTER_IN_PREFIX (&route->prefix));
hasso6452df02004-08-15 05:52:07 +0000103 ospf6_asbr_lsentry_add (route);
hassoccb59b12004-08-25 09:10:37 +0000104 ospf6_abr_originate_summary (route);
hasso6452df02004-08-15 05:52:07 +0000105}
106
Paul Jakma6ac29a52008-08-15 13:45:30 +0100107static void
hasso6452df02004-08-15 05:52:07 +0000108ospf6_top_brouter_hook_remove (struct ospf6_route *route)
109{
hassoccb59b12004-08-25 09:10:37 +0000110 ospf6_abr_examin_brouter (ADV_ROUTER_IN_PREFIX (&route->prefix));
hasso6452df02004-08-15 05:52:07 +0000111 ospf6_asbr_lsentry_remove (route);
hassoccb59b12004-08-25 09:10:37 +0000112 ospf6_abr_originate_summary (route);
hasso6452df02004-08-15 05:52:07 +0000113}
114
Paul Jakma6ac29a52008-08-15 13:45:30 +0100115static struct ospf6 *
116ospf6_create (void)
paul718e3742002-12-13 20:15:29 +0000117{
hasso508e53e2004-05-18 18:57:06 +0000118 struct ospf6 *o;
paul718e3742002-12-13 20:15:29 +0000119
Stephen Hemminger393deb92008-08-18 14:13:29 -0700120 o = XCALLOC (MTYPE_OSPF6_TOP, sizeof (struct ospf6));
hasso508e53e2004-05-18 18:57:06 +0000121
122 /* initialize */
Takashi Sogabe86f72dc2009-06-22 13:07:02 +0900123 quagga_gettime (QUAGGA_CLK_MONOTONIC, &o->starttime);
hasso508e53e2004-05-18 18:57:06 +0000124 o->area_list = list_new ();
125 o->area_list->cmp = ospf6_area_cmp;
hasso6452df02004-08-15 05:52:07 +0000126 o->lsdb = ospf6_lsdb_create (o);
127 o->lsdb_self = ospf6_lsdb_create (o);
hasso508e53e2004-05-18 18:57:06 +0000128 o->lsdb->hook_add = ospf6_top_lsdb_hook_add;
129 o->lsdb->hook_remove = ospf6_top_lsdb_hook_remove;
130
Dinesh Dutt3810e062013-08-24 07:54:09 +0000131 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 Jakmacf1ce252006-05-15 10:46:07 +0000136 o->route_table = OSPF6_ROUTE_TABLE_CREATE (GLOBAL, ROUTES);
137 o->route_table->scope = o;
hasso049207c2004-08-04 20:02:13 +0000138 o->route_table->hook_add = ospf6_top_route_hook_add;
139 o->route_table->hook_remove = ospf6_top_route_hook_remove;
hasso508e53e2004-05-18 18:57:06 +0000140
Paul Jakmacf1ce252006-05-15 10:46:07 +0000141 o->brouter_table = OSPF6_ROUTE_TABLE_CREATE (GLOBAL, BORDER_ROUTERS);
142 o->brouter_table->scope = o;
hasso6452df02004-08-15 05:52:07 +0000143 o->brouter_table->hook_add = ospf6_top_brouter_hook_add;
144 o->brouter_table->hook_remove = ospf6_top_brouter_hook_remove;
hasso049207c2004-08-04 20:02:13 +0000145
Paul Jakmacf1ce252006-05-15 10:46:07 +0000146 o->external_table = OSPF6_ROUTE_TABLE_CREATE (GLOBAL, EXTERNAL_ROUTES);
147 o->external_table->scope = o;
148
hasso508e53e2004-05-18 18:57:06 +0000149 o->external_id_table = route_table_init ();
150
151 return o;
152}
153
Tom Goffae2254a2010-11-10 13:01:41 -0800154void
hasso508e53e2004-05-18 18:57:06 +0000155ospf6_delete (struct ospf6 *o)
156{
paul1eb8ef22005-04-07 07:30:20 +0000157 struct listnode *node, *nnode;
hasso508e53e2004-05-18 18:57:06 +0000158 struct ospf6_area *oa;
159
Tom Goffae2254a2010-11-10 13:01:41 -0800160 ospf6_disable (ospf6);
161
paul1eb8ef22005-04-07 07:30:20 +0000162 for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa))
163 ospf6_area_delete (oa);
Tom Goffae2254a2010-11-10 13:01:41 -0800164 list_delete (o->area_list);
hasso508e53e2004-05-18 18:57:06 +0000165
166 ospf6_lsdb_delete (o->lsdb);
hasso6452df02004-08-15 05:52:07 +0000167 ospf6_lsdb_delete (o->lsdb_self);
hasso508e53e2004-05-18 18:57:06 +0000168
169 ospf6_route_table_delete (o->route_table);
hasso049207c2004-08-04 20:02:13 +0000170 ospf6_route_table_delete (o->brouter_table);
hasso508e53e2004-05-18 18:57:06 +0000171
172 ospf6_route_table_delete (o->external_table);
173 route_table_finish (o->external_id_table);
174
175 XFREE (MTYPE_OSPF6_TOP, o);
176}
177
Paul Jakma6ac29a52008-08-15 13:45:30 +0100178static void
hasso508e53e2004-05-18 18:57:06 +0000179ospf6_enable (struct ospf6 *o)
180{
paul1eb8ef22005-04-07 07:30:20 +0000181 struct listnode *node, *nnode;
hasso508e53e2004-05-18 18:57:06 +0000182 struct ospf6_area *oa;
183
184 if (CHECK_FLAG (o->flag, OSPF6_DISABLED))
185 {
186 UNSET_FLAG (o->flag, OSPF6_DISABLED);
paul1eb8ef22005-04-07 07:30:20 +0000187 for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa))
188 ospf6_area_enable (oa);
paul718e3742002-12-13 20:15:29 +0000189 }
190}
191
Paul Jakma6ac29a52008-08-15 13:45:30 +0100192static void
hasso508e53e2004-05-18 18:57:06 +0000193ospf6_disable (struct ospf6 *o)
paul718e3742002-12-13 20:15:29 +0000194{
paul1eb8ef22005-04-07 07:30:20 +0000195 struct listnode *node, *nnode;
hasso508e53e2004-05-18 18:57:06 +0000196 struct ospf6_area *oa;
paul718e3742002-12-13 20:15:29 +0000197
hasso508e53e2004-05-18 18:57:06 +0000198 if (! CHECK_FLAG (o->flag, OSPF6_DISABLED))
199 {
200 SET_FLAG (o->flag, OSPF6_DISABLED);
paul1eb8ef22005-04-07 07:30:20 +0000201
202 for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa))
203 ospf6_area_disable (oa);
paul718e3742002-12-13 20:15:29 +0000204
hasso508e53e2004-05-18 18:57:06 +0000205 ospf6_lsdb_remove_all (o->lsdb);
206 ospf6_route_remove_all (o->route_table);
hasso6452df02004-08-15 05:52:07 +0000207 ospf6_route_remove_all (o->brouter_table);
hasso508e53e2004-05-18 18:57:06 +0000208 }
209}
paul718e3742002-12-13 20:15:29 +0000210
Dinesh Dutt2449fcd2013-08-24 07:54:17 +0000211int
hasso508e53e2004-05-18 18:57:06 +0000212ospf6_maxage_remover (struct thread *thread)
213{
214 struct ospf6 *o = (struct ospf6 *) THREAD_ARG (thread);
215 struct ospf6_area *oa;
216 struct ospf6_interface *oi;
217 struct ospf6_neighbor *on;
hasso52dc7ee2004-09-23 19:18:23 +0000218 struct listnode *i, *j, *k;
Dinesh Dutt2449fcd2013-08-24 07:54:17 +0000219 int reschedule = 0;
hasso508e53e2004-05-18 18:57:06 +0000220
221 o->maxage_remover = (struct thread *) NULL;
hasso508e53e2004-05-18 18:57:06 +0000222
paul1eb8ef22005-04-07 07:30:20 +0000223 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000224 {
paul1eb8ef22005-04-07 07:30:20 +0000225 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso508e53e2004-05-18 18:57:06 +0000226 {
paul1eb8ef22005-04-07 07:30:20 +0000227 for (ALL_LIST_ELEMENTS_RO (oi->neighbor_list, k, on))
hasso508e53e2004-05-18 18:57:06 +0000228 {
hasso508e53e2004-05-18 18:57:06 +0000229 if (on->state != OSPF6_NEIGHBOR_EXCHANGE &&
230 on->state != OSPF6_NEIGHBOR_LOADING)
Dinesh Dutt2449fcd2013-08-24 07:54:17 +0000231 continue;
hasso508e53e2004-05-18 18:57:06 +0000232
Dinesh Dutt2449fcd2013-08-24 07:54:17 +0000233 ospf6_maxage_remove (o);
hasso508e53e2004-05-18 18:57:06 +0000234 return 0;
235 }
236 }
237 }
238
paul1eb8ef22005-04-07 07:30:20 +0000239 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000240 {
paul1eb8ef22005-04-07 07:30:20 +0000241 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
Dinesh Dutt2449fcd2013-08-24 07:54:17 +0000242 {
243 if (ospf6_lsdb_maxage_remover (oi->lsdb))
244 {
245 reschedule = 1;
246 }
247 }
paul1eb8ef22005-04-07 07:30:20 +0000248
Dinesh Dutt2449fcd2013-08-24 07:54:17 +0000249 if (ospf6_lsdb_maxage_remover (oa->lsdb))
250 {
251 reschedule = 1;
252 }
hasso508e53e2004-05-18 18:57:06 +0000253 }
Dinesh Dutt2449fcd2013-08-24 07:54:17 +0000254
255 if (ospf6_lsdb_maxage_remover (o->lsdb))
256 {
257 reschedule = 1;
258 }
259
260 if (reschedule)
261 {
262 ospf6_maxage_remove (o);
263 }
hasso508e53e2004-05-18 18:57:06 +0000264
paul718e3742002-12-13 20:15:29 +0000265 return 0;
266}
267
268void
hasso508e53e2004-05-18 18:57:06 +0000269ospf6_maxage_remove (struct ospf6 *o)
paul718e3742002-12-13 20:15:29 +0000270{
hasso508e53e2004-05-18 18:57:06 +0000271 if (o && ! o->maxage_remover)
Dinesh Dutt2449fcd2013-08-24 07:54:17 +0000272 o->maxage_remover = thread_add_timer (master, ospf6_maxage_remover, o,
273 OSPF_LSA_MAXAGE_REMOVE_DELAY_DEFAULT);
hasso508e53e2004-05-18 18:57:06 +0000274}
paul718e3742002-12-13 20:15:29 +0000275
hasso508e53e2004-05-18 18:57:06 +0000276/* start ospf6 */
277DEFUN (router_ospf6,
278 router_ospf6_cmd,
279 "router ospf6",
280 ROUTER_STR
281 OSPF6_STR)
282{
283 if (ospf6 == NULL)
284 ospf6 = ospf6_create ();
285 if (CHECK_FLAG (ospf6->flag, OSPF6_DISABLED))
286 ospf6_enable (ospf6);
287
288 /* set current ospf point. */
289 vty->node = OSPF6_NODE;
290 vty->index = ospf6;
291
292 return CMD_SUCCESS;
293}
294
295/* stop ospf6 */
296DEFUN (no_router_ospf6,
297 no_router_ospf6_cmd,
298 "no router ospf6",
299 NO_STR
300 OSPF6_ROUTER_STR)
301{
302 if (ospf6 == NULL || CHECK_FLAG (ospf6->flag, OSPF6_DISABLED))
hasso049207c2004-08-04 20:02:13 +0000303 vty_out (vty, "OSPFv3 is not running%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000304 else
305 ospf6_disable (ospf6);
306
307 /* return to config node . */
308 vty->node = CONFIG_NODE;
309 vty->index = NULL;
310
311 return CMD_SUCCESS;
312}
313
314/* change Router_ID commands. */
315DEFUN (ospf6_router_id,
316 ospf6_router_id_cmd,
317 "router-id A.B.C.D",
318 "Configure OSPF Router-ID\n"
319 V4NOTATION_STR)
320{
321 int ret;
322 u_int32_t router_id;
323 struct ospf6 *o;
324
325 o = (struct ospf6 *) vty->index;
326
327 ret = inet_pton (AF_INET, argv[0], &router_id);
328 if (ret == 0)
329 {
hasso049207c2004-08-04 20:02:13 +0000330 vty_out (vty, "malformed OSPF Router-ID: %s%s", argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +0000331 return CMD_SUCCESS;
332 }
333
hassoc8a440e2004-10-11 17:02:40 +0000334 o->router_id_static = router_id;
335 if (o->router_id == 0)
336 o->router_id = router_id;
337
hasso508e53e2004-05-18 18:57:06 +0000338 return CMD_SUCCESS;
339}
340
Dinesh Dutt3d35ca42013-08-26 03:40:16 +0000341DEFUN (ospf6_log_adjacency_changes,
342 ospf6_log_adjacency_changes_cmd,
343 "log-adjacency-changes",
344 "Log changes in adjacency state\n")
345{
346 struct ospf6 *ospf6 = vty->index;
347
348 SET_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_CHANGES);
349 return CMD_SUCCESS;
350}
351
352DEFUN (ospf6_log_adjacency_changes_detail,
353 ospf6_log_adjacency_changes_detail_cmd,
354 "log-adjacency-changes detail",
355 "Log changes in adjacency state\n"
356 "Log all state changes\n")
357{
358 struct ospf6 *ospf6 = vty->index;
359
360 SET_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_CHANGES);
361 SET_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_DETAIL);
362 return CMD_SUCCESS;
363}
364
365DEFUN (no_ospf6_log_adjacency_changes,
366 no_ospf6_log_adjacency_changes_cmd,
367 "no log-adjacency-changes",
368 NO_STR
369 "Log changes in adjacency state\n")
370{
371 struct ospf6 *ospf6 = vty->index;
372
373 UNSET_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_DETAIL);
374 UNSET_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_CHANGES);
375 return CMD_SUCCESS;
376}
377
378DEFUN (no_ospf6_log_adjacency_changes_detail,
379 no_ospf6_log_adjacency_changes_detail_cmd,
380 "no log-adjacency-changes detail",
381 NO_STR
382 "Log changes in adjacency state\n"
383 "Log all state changes\n")
384{
385 struct ospf6 *ospf6 = vty->index;
386
387 UNSET_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_DETAIL);
388 return CMD_SUCCESS;
389}
390
hasso508e53e2004-05-18 18:57:06 +0000391DEFUN (ospf6_interface_area,
392 ospf6_interface_area_cmd,
393 "interface IFNAME area A.B.C.D",
394 "Enable routing on an IPv6 interface\n"
395 IFNAME_STR
396 "Specify the OSPF6 area ID\n"
397 "OSPF6 area ID in IPv4 address notation\n"
398 )
399{
400 struct ospf6 *o;
hasso3b687352004-08-19 06:56:53 +0000401 struct ospf6_area *oa;
hasso508e53e2004-05-18 18:57:06 +0000402 struct ospf6_interface *oi;
403 struct interface *ifp;
404 u_int32_t area_id;
405
406 o = (struct ospf6 *) vty->index;
407
408 /* find/create ospf6 interface */
409 ifp = if_get_by_name (argv[0]);
410 oi = (struct ospf6_interface *) ifp->info;
411 if (oi == NULL)
412 oi = ospf6_interface_create (ifp);
413 if (oi->area)
414 {
415 vty_out (vty, "%s already attached to Area %s%s",
hasso049207c2004-08-04 20:02:13 +0000416 oi->interface->name, oi->area->name, VNL);
hasso508e53e2004-05-18 18:57:06 +0000417 return CMD_SUCCESS;
418 }
419
420 /* parse Area-ID */
421 if (inet_pton (AF_INET, argv[1], &area_id) != 1)
422 {
hasso049207c2004-08-04 20:02:13 +0000423 vty_out (vty, "Invalid Area-ID: %s%s", argv[1], VNL);
hasso508e53e2004-05-18 18:57:06 +0000424 return CMD_SUCCESS;
425 }
426
427 /* find/create ospf6 area */
428 oa = ospf6_area_lookup (area_id, o);
429 if (oa == NULL)
430 oa = ospf6_area_create (area_id, o);
431
432 /* attach interface to area */
433 listnode_add (oa->if_list, oi); /* sort ?? */
434 oi->area = oa;
435
hasso6452df02004-08-15 05:52:07 +0000436 SET_FLAG (oa->flag, OSPF6_AREA_ENABLE);
437
hasso508e53e2004-05-18 18:57:06 +0000438 /* start up */
439 thread_add_event (master, interface_up, oi, 0);
hasso6452df02004-08-15 05:52:07 +0000440
hasso3b687352004-08-19 06:56:53 +0000441 /* If the router is ABR, originate summary routes */
442 if (ospf6_is_router_abr (o))
443 ospf6_abr_enable_area (oa);
hasso6452df02004-08-15 05:52:07 +0000444
hasso508e53e2004-05-18 18:57:06 +0000445 return CMD_SUCCESS;
446}
447
448DEFUN (no_ospf6_interface_area,
449 no_ospf6_interface_area_cmd,
450 "no interface IFNAME area A.B.C.D",
451 NO_STR
452 "Disable routing on an IPv6 interface\n"
453 IFNAME_STR
454 "Specify the OSPF6 area ID\n"
455 "OSPF6 area ID in IPv4 address notation\n"
456 )
457{
458 struct ospf6 *o;
459 struct ospf6_interface *oi;
hasso3b687352004-08-19 06:56:53 +0000460 struct ospf6_area *oa;
hasso508e53e2004-05-18 18:57:06 +0000461 struct interface *ifp;
462 u_int32_t area_id;
463
464 o = (struct ospf6 *) vty->index;
465
466 ifp = if_lookup_by_name (argv[0]);
467 if (ifp == NULL)
468 {
hasso049207c2004-08-04 20:02:13 +0000469 vty_out (vty, "No such interface %s%s", argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +0000470 return CMD_SUCCESS;
471 }
472
473 oi = (struct ospf6_interface *) ifp->info;
474 if (oi == NULL)
475 {
hasso049207c2004-08-04 20:02:13 +0000476 vty_out (vty, "Interface %s not enabled%s", ifp->name, VNL);
hasso508e53e2004-05-18 18:57:06 +0000477 return CMD_SUCCESS;
478 }
479
480 /* parse Area-ID */
481 if (inet_pton (AF_INET, argv[1], &area_id) != 1)
482 {
hasso049207c2004-08-04 20:02:13 +0000483 vty_out (vty, "Invalid Area-ID: %s%s", argv[1], VNL);
hasso508e53e2004-05-18 18:57:06 +0000484 return CMD_SUCCESS;
485 }
486
Jon56abbb82009-02-11 17:30:44 -0800487 /* Verify Area */
488 if (oi->area == NULL)
489 {
490 vty_out (vty, "No such Area-ID: %s%s", argv[1], VNL);
491 return CMD_SUCCESS;
492 }
493
hasso508e53e2004-05-18 18:57:06 +0000494 if (oi->area->area_id != area_id)
495 {
496 vty_out (vty, "Wrong Area-ID: %s is attached to area %s%s",
hasso049207c2004-08-04 20:02:13 +0000497 oi->interface->name, oi->area->name, VNL);
hasso508e53e2004-05-18 18:57:06 +0000498 return CMD_SUCCESS;
499 }
500
501 thread_execute (master, interface_down, oi, 0);
502
hasso6452df02004-08-15 05:52:07 +0000503 oa = oi->area;
hasso508e53e2004-05-18 18:57:06 +0000504 listnode_delete (oi->area->if_list, oi);
505 oi->area = (struct ospf6_area *) NULL;
506
hasso6452df02004-08-15 05:52:07 +0000507 /* Withdraw inter-area routes from this area, if necessary */
508 if (oa->if_list->count == 0)
509 {
510 UNSET_FLAG (oa->flag, OSPF6_AREA_ENABLE);
hasso3b687352004-08-19 06:56:53 +0000511 ospf6_abr_disable_area (oa);
hasso6452df02004-08-15 05:52:07 +0000512 }
513
hasso508e53e2004-05-18 18:57:06 +0000514 return CMD_SUCCESS;
paul718e3742002-12-13 20:15:29 +0000515}
516
Dinesh Duttf41b4a02013-08-24 08:00:37 +0000517DEFUN (ospf6_stub_router_admin,
518 ospf6_stub_router_admin_cmd,
519 "stub-router administrative",
520 "Make router a stub router\n"
521 "Advertise inability to be a transit router\n"
522 "Administratively applied, for an indefinite period\n")
523{
524 struct listnode *node;
525 struct ospf6_area *oa;
526
527 if (!CHECK_FLAG (ospf6->flag, OSPF6_STUB_ROUTER))
528 {
529 for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa))
530 {
531 OSPF6_OPT_CLEAR (oa->options, OSPF6_OPT_V6);
532 OSPF6_OPT_CLEAR (oa->options, OSPF6_OPT_R);
533 OSPF6_ROUTER_LSA_SCHEDULE (oa);
534 }
535 SET_FLAG (ospf6->flag, OSPF6_STUB_ROUTER);
536 }
537
538 return CMD_SUCCESS;
539}
540
541DEFUN (no_ospf6_stub_router_admin,
542 no_ospf6_stub_router_admin_cmd,
543 "no stub-router administrative",
544 NO_STR
545 "Make router a stub router\n"
546 "Advertise ability to be a transit router\n"
547 "Administratively applied, for an indefinite period\n")
548{
549 struct listnode *node;
550 struct ospf6_area *oa;
551
552 if (CHECK_FLAG (ospf6->flag, OSPF6_STUB_ROUTER))
553 {
554 for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa))
555 {
556 OSPF6_OPT_SET (oa->options, OSPF6_OPT_V6);
557 OSPF6_OPT_SET (oa->options, OSPF6_OPT_R);
558 OSPF6_ROUTER_LSA_SCHEDULE (oa);
559 }
560 UNSET_FLAG (ospf6->flag, OSPF6_STUB_ROUTER);
561 }
562
563 return CMD_SUCCESS;
564}
565
566DEFUN (ospf6_stub_router_startup,
567 ospf6_stub_router_startup_cmd,
568 "stub-router on-startup <5-86400>",
569 "Make router a stub router\n"
570 "Advertise inability to be a transit router\n"
571 "Automatically advertise as stub-router on startup of OSPF6\n"
572 "Time (seconds) to advertise self as stub-router\n")
573{
574 return CMD_SUCCESS;
575}
576
577DEFUN (no_ospf6_stub_router_startup,
578 no_ospf6_stub_router_startup_cmd,
579 "no stub-router on-startup",
580 NO_STR
581 "Make router a stub router\n"
582 "Advertise inability to be a transit router\n"
583 "Automatically advertise as stub-router on startup of OSPF6\n"
584 "Time (seconds) to advertise self as stub-router\n")
585{
586 return CMD_SUCCESS;
587}
588
589DEFUN (ospf6_stub_router_shutdown,
590 ospf6_stub_router_shutdown_cmd,
591 "stub-router on-shutdown <5-86400>",
592 "Make router a stub router\n"
593 "Advertise inability to be a transit router\n"
594 "Automatically advertise as stub-router before shutdown\n"
595 "Time (seconds) to advertise self as stub-router\n")
596{
597 return CMD_SUCCESS;
598}
599
600DEFUN (no_ospf6_stub_router_shutdown,
601 no_ospf6_stub_router_shutdown_cmd,
602 "no stub-router on-shutdown",
603 NO_STR
604 "Make router a stub router\n"
605 "Advertise inability to be a transit router\n"
606 "Automatically advertise as stub-router before shutdown\n"
607 "Time (seconds) to advertise self as stub-router\n")
608{
609 return CMD_SUCCESS;
610}
611
Paul Jakma6ac29a52008-08-15 13:45:30 +0100612static void
hasso508e53e2004-05-18 18:57:06 +0000613ospf6_show (struct vty *vty, struct ospf6 *o)
paul718e3742002-12-13 20:15:29 +0000614{
hasso52dc7ee2004-09-23 19:18:23 +0000615 struct listnode *n;
hasso508e53e2004-05-18 18:57:06 +0000616 struct ospf6_area *oa;
617 char router_id[16], duration[32];
paul718e3742002-12-13 20:15:29 +0000618 struct timeval now, running;
619
620 /* process id, router id */
hasso508e53e2004-05-18 18:57:06 +0000621 inet_ntop (AF_INET, &o->router_id, router_id, sizeof (router_id));
622 vty_out (vty, " OSPFv3 Routing Process (0) with Router-ID %s%s",
hasso049207c2004-08-04 20:02:13 +0000623 router_id, VNL);
paul718e3742002-12-13 20:15:29 +0000624
625 /* running time */
Takashi Sogabe86f72dc2009-06-22 13:07:02 +0900626 quagga_gettime (QUAGGA_CLK_MONOTONIC, &now);
hasso508e53e2004-05-18 18:57:06 +0000627 timersub (&now, &o->starttime, &running);
628 timerstring (&running, duration, sizeof (duration));
hasso049207c2004-08-04 20:02:13 +0000629 vty_out (vty, " Running %s%s", duration, VNL);
paul718e3742002-12-13 20:15:29 +0000630
hasso508e53e2004-05-18 18:57:06 +0000631 /* Redistribute configuration */
632 /* XXX */
paul718e3742002-12-13 20:15:29 +0000633
Dinesh Duttf41b4a02013-08-24 08:00:37 +0000634 if (CHECK_FLAG (o->flag, OSPF6_STUB_ROUTER))
635 vty_out (vty, " Router Is Stub Router%s", VNL);
636
paul718e3742002-12-13 20:15:29 +0000637 /* LSAs */
638 vty_out (vty, " Number of AS scoped LSAs is %u%s",
hasso049207c2004-08-04 20:02:13 +0000639 o->lsdb->count, VNL);
paul718e3742002-12-13 20:15:29 +0000640
641 /* Areas */
642 vty_out (vty, " Number of areas in this router is %u%s",
hasso049207c2004-08-04 20:02:13 +0000643 listcount (o->area_list), VNL);
paul1eb8ef22005-04-07 07:30:20 +0000644
Dinesh Dutt3d35ca42013-08-26 03:40:16 +0000645 if (CHECK_FLAG(o->config_flags, OSPF6_LOG_ADJACENCY_CHANGES))
646 {
647 if (CHECK_FLAG(o->config_flags, OSPF6_LOG_ADJACENCY_DETAIL))
648 vty_out(vty, " All adjacency changes are logged%s",VTY_NEWLINE);
649 else
650 vty_out(vty, " Adjacency changes are logged%s",VTY_NEWLINE);
651 }
652
653 vty_out (vty, "%s",VTY_NEWLINE);
654
paul1eb8ef22005-04-07 07:30:20 +0000655 for (ALL_LIST_ELEMENTS_RO (o->area_list, n, oa))
656 ospf6_area_show (vty, oa);
paul718e3742002-12-13 20:15:29 +0000657}
658
hasso508e53e2004-05-18 18:57:06 +0000659/* show top level structures */
660DEFUN (show_ipv6_ospf6,
661 show_ipv6_ospf6_cmd,
662 "show ipv6 ospf6",
663 SHOW_STR
664 IP6_STR
665 OSPF6_STR)
paul718e3742002-12-13 20:15:29 +0000666{
hasso508e53e2004-05-18 18:57:06 +0000667 OSPF6_CMD_CHECK_RUNNING ();
paul718e3742002-12-13 20:15:29 +0000668
hasso508e53e2004-05-18 18:57:06 +0000669 ospf6_show (vty, ospf6);
670 return CMD_SUCCESS;
paul718e3742002-12-13 20:15:29 +0000671}
672
673DEFUN (show_ipv6_ospf6_route,
674 show_ipv6_ospf6_route_cmd,
675 "show ipv6 ospf6 route",
676 SHOW_STR
677 IP6_STR
678 OSPF6_STR
hasso508e53e2004-05-18 18:57:06 +0000679 ROUTE_STR
paul718e3742002-12-13 20:15:29 +0000680 )
681{
hasso508e53e2004-05-18 18:57:06 +0000682 ospf6_route_table_show (vty, argc, argv, ospf6->route_table);
683 return CMD_SUCCESS;
paul718e3742002-12-13 20:15:29 +0000684}
685
686ALIAS (show_ipv6_ospf6_route,
hasso508e53e2004-05-18 18:57:06 +0000687 show_ipv6_ospf6_route_detail_cmd,
hasso4846ef62004-09-03 06:04:00 +0000688 "show ipv6 ospf6 route (X:X::X:X|X:X::X:X/M|detail|summary)",
paul718e3742002-12-13 20:15:29 +0000689 SHOW_STR
690 IP6_STR
691 OSPF6_STR
hasso508e53e2004-05-18 18:57:06 +0000692 ROUTE_STR
693 "Specify IPv6 address\n"
694 "Specify IPv6 prefix\n"
695 "Detailed information\n"
696 "Summary of route table\n"
Paul Jakma6ac29a52008-08-15 13:45:30 +0100697 )
paul718e3742002-12-13 20:15:29 +0000698
hasso508e53e2004-05-18 18:57:06 +0000699DEFUN (show_ipv6_ospf6_route_match,
700 show_ipv6_ospf6_route_match_cmd,
hasso4846ef62004-09-03 06:04:00 +0000701 "show ipv6 ospf6 route X:X::X:X/M match",
paul718e3742002-12-13 20:15:29 +0000702 SHOW_STR
703 IP6_STR
704 OSPF6_STR
hasso508e53e2004-05-18 18:57:06 +0000705 ROUTE_STR
706 "Specify IPv6 prefix\n"
707 "Display routes which match the specified route\n"
paul718e3742002-12-13 20:15:29 +0000708 )
709{
paul0c083ee2004-10-10 12:54:58 +0000710 const char *sargv[CMD_ARGC_MAX];
hasso508e53e2004-05-18 18:57:06 +0000711 int i, sargc;
712
713 /* copy argv to sargv and then append "match" */
714 for (i = 0; i < argc; i++)
715 sargv[i] = argv[i];
716 sargc = argc;
717 sargv[sargc++] = "match";
718 sargv[sargc] = NULL;
719
720 ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table);
721 return CMD_SUCCESS;
paul718e3742002-12-13 20:15:29 +0000722}
723
hasso508e53e2004-05-18 18:57:06 +0000724DEFUN (show_ipv6_ospf6_route_match_detail,
725 show_ipv6_ospf6_route_match_detail_cmd,
hasso4846ef62004-09-03 06:04:00 +0000726 "show ipv6 ospf6 route X:X::X:X/M match detail",
paul718e3742002-12-13 20:15:29 +0000727 SHOW_STR
728 IP6_STR
729 OSPF6_STR
hasso508e53e2004-05-18 18:57:06 +0000730 ROUTE_STR
731 "Specify IPv6 prefix\n"
732 "Display routes which match the specified route\n"
paul718e3742002-12-13 20:15:29 +0000733 "Detailed information\n"
734 )
hasso508e53e2004-05-18 18:57:06 +0000735{
paul0c083ee2004-10-10 12:54:58 +0000736 const char *sargv[CMD_ARGC_MAX];
hasso508e53e2004-05-18 18:57:06 +0000737 int i, sargc;
paul718e3742002-12-13 20:15:29 +0000738
hasso508e53e2004-05-18 18:57:06 +0000739 /* copy argv to sargv and then append "match" and "detail" */
740 for (i = 0; i < argc; i++)
741 sargv[i] = argv[i];
742 sargc = argc;
743 sargv[sargc++] = "match";
744 sargv[sargc++] = "detail";
745 sargv[sargc] = NULL;
paul718e3742002-12-13 20:15:29 +0000746
hasso508e53e2004-05-18 18:57:06 +0000747 ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table);
748 return CMD_SUCCESS;
749}
750
Paul Jakmacb4b8842006-05-15 10:39:30 +0000751ALIAS (show_ipv6_ospf6_route_match,
752 show_ipv6_ospf6_route_longer_cmd,
753 "show ipv6 ospf6 route X:X::X:X/M longer",
754 SHOW_STR
755 IP6_STR
756 OSPF6_STR
757 ROUTE_STR
758 "Specify IPv6 prefix\n"
759 "Display routes longer than the specified route\n"
Paul Jakma6ac29a52008-08-15 13:45:30 +0100760 )
Paul Jakmacb4b8842006-05-15 10:39:30 +0000761
762DEFUN (show_ipv6_ospf6_route_match_detail,
763 show_ipv6_ospf6_route_longer_detail_cmd,
764 "show ipv6 ospf6 route X:X::X:X/M longer detail",
765 SHOW_STR
766 IP6_STR
767 OSPF6_STR
768 ROUTE_STR
769 "Specify IPv6 prefix\n"
770 "Display routes longer than the specified route\n"
771 "Detailed information\n"
772 );
773
hasso4846ef62004-09-03 06:04:00 +0000774ALIAS (show_ipv6_ospf6_route,
775 show_ipv6_ospf6_route_type_cmd,
776 "show ipv6 ospf6 route (intra-area|inter-area|external-1|external-2)",
777 SHOW_STR
778 IP6_STR
779 OSPF6_STR
780 ROUTE_STR
Denis Ovsienkoea402192011-08-19 16:27:16 +0400781 "Display Intra-Area routes\n"
782 "Display Inter-Area routes\n"
783 "Display Type-1 External routes\n"
784 "Display Type-2 External routes\n"
Paul Jakma6ac29a52008-08-15 13:45:30 +0100785 )
hasso4846ef62004-09-03 06:04:00 +0000786
787DEFUN (show_ipv6_ospf6_route_type_detail,
788 show_ipv6_ospf6_route_type_detail_cmd,
789 "show ipv6 ospf6 route (intra-area|inter-area|external-1|external-2) detail",
790 SHOW_STR
791 IP6_STR
792 OSPF6_STR
793 ROUTE_STR
Denis Ovsienkoea402192011-08-19 16:27:16 +0400794 "Display Intra-Area routes\n"
795 "Display Inter-Area routes\n"
796 "Display Type-1 External routes\n"
797 "Display Type-2 External routes\n"
hasso4846ef62004-09-03 06:04:00 +0000798 "Detailed information\n"
799 )
800{
paul0c083ee2004-10-10 12:54:58 +0000801 const char *sargv[CMD_ARGC_MAX];
hasso4846ef62004-09-03 06:04:00 +0000802 int i, sargc;
803
804 /* copy argv to sargv and then append "detail" */
805 for (i = 0; i < argc; i++)
806 sargv[i] = argv[i];
807 sargc = argc;
808 sargv[sargc++] = "detail";
809 sargv[sargc] = NULL;
810
811 ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table);
812 return CMD_SUCCESS;
813}
hasso508e53e2004-05-18 18:57:06 +0000814
Dinesh Duttf41b4a02013-08-24 08:00:37 +0000815static void
816ospf6_stub_router_config_write (struct vty *vty)
817{
818 if (CHECK_FLAG (ospf6->flag, OSPF6_STUB_ROUTER))
819 {
820 vty_out (vty, " stub-router administrative%s", VNL);
821 }
822 return;
823}
824
hasso508e53e2004-05-18 18:57:06 +0000825/* OSPF configuration write function. */
Paul Jakma6ac29a52008-08-15 13:45:30 +0100826static int
hasso508e53e2004-05-18 18:57:06 +0000827config_write_ospf6 (struct vty *vty)
828{
829 char router_id[16];
hasso52dc7ee2004-09-23 19:18:23 +0000830 struct listnode *j, *k;
hasso508e53e2004-05-18 18:57:06 +0000831 struct ospf6_area *oa;
832 struct ospf6_interface *oi;
833
834 /* OSPFv6 configuration. */
835 if (ospf6 == NULL)
836 return CMD_SUCCESS;
837 if (CHECK_FLAG (ospf6->flag, OSPF6_DISABLED))
838 return CMD_SUCCESS;
839
hassoc8a440e2004-10-11 17:02:40 +0000840 inet_ntop (AF_INET, &ospf6->router_id_static, router_id, sizeof (router_id));
hasso049207c2004-08-04 20:02:13 +0000841 vty_out (vty, "router ospf6%s", VNL);
hassoc8a440e2004-10-11 17:02:40 +0000842 if (ospf6->router_id_static != 0)
843 vty_out (vty, " router-id %s%s", router_id, VNL);
hasso508e53e2004-05-18 18:57:06 +0000844
Dinesh Dutt3d35ca42013-08-26 03:40:16 +0000845 /* log-adjacency-changes flag print. */
846 if (CHECK_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_CHANGES))
847 {
848 vty_out(vty, " log-adjacency-changes");
849 if (CHECK_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_DETAIL))
850 vty_out(vty, " detail");
851 vty_out(vty, "%s", VTY_NEWLINE);
852 }
853
Dinesh Duttf41b4a02013-08-24 08:00:37 +0000854 ospf6_stub_router_config_write (vty);
hasso508e53e2004-05-18 18:57:06 +0000855 ospf6_redistribute_config_write (vty);
hasso6452df02004-08-15 05:52:07 +0000856 ospf6_area_config_write (vty);
Dinesh Dutt3810e062013-08-24 07:54:09 +0000857 ospf6_spf_config_write (vty);
hasso508e53e2004-05-18 18:57:06 +0000858
paul1eb8ef22005-04-07 07:30:20 +0000859 for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, j, oa))
hasso508e53e2004-05-18 18:57:06 +0000860 {
paul1eb8ef22005-04-07 07:30:20 +0000861 for (ALL_LIST_ELEMENTS_RO (oa->if_list, k, oi))
862 vty_out (vty, " interface %s area %s%s",
863 oi->interface->name, oa->name, VNL);
hasso508e53e2004-05-18 18:57:06 +0000864 }
hasso049207c2004-08-04 20:02:13 +0000865 vty_out (vty, "!%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000866 return 0;
867}
868
869/* OSPF6 node structure. */
Stephen Hemminger7fc626d2008-12-01 11:10:34 -0800870static struct cmd_node ospf6_node =
hasso508e53e2004-05-18 18:57:06 +0000871{
872 OSPF6_NODE,
873 "%s(config-ospf6)# ",
hasso69b4a812004-08-26 18:10:36 +0000874 1 /* VTYSH */
hasso508e53e2004-05-18 18:57:06 +0000875};
876
877/* Install ospf related commands. */
paul718e3742002-12-13 20:15:29 +0000878void
Paul Jakma6ac29a52008-08-15 13:45:30 +0100879ospf6_top_init (void)
paul718e3742002-12-13 20:15:29 +0000880{
hasso508e53e2004-05-18 18:57:06 +0000881 /* Install ospf6 top node. */
882 install_node (&ospf6_node, config_write_ospf6);
883
884 install_element (VIEW_NODE, &show_ipv6_ospf6_cmd);
885 install_element (ENABLE_NODE, &show_ipv6_ospf6_cmd);
886 install_element (CONFIG_NODE, &router_ospf6_cmd);
Jon6c19d262009-02-11 17:19:07 -0800887 install_element (CONFIG_NODE, &no_router_ospf6_cmd);
hasso508e53e2004-05-18 18:57:06 +0000888
paul718e3742002-12-13 20:15:29 +0000889 install_element (VIEW_NODE, &show_ipv6_ospf6_route_cmd);
hasso508e53e2004-05-18 18:57:06 +0000890 install_element (VIEW_NODE, &show_ipv6_ospf6_route_detail_cmd);
891 install_element (VIEW_NODE, &show_ipv6_ospf6_route_match_cmd);
892 install_element (VIEW_NODE, &show_ipv6_ospf6_route_match_detail_cmd);
Paul Jakmacb4b8842006-05-15 10:39:30 +0000893 install_element (VIEW_NODE, &show_ipv6_ospf6_route_longer_cmd);
894 install_element (VIEW_NODE, &show_ipv6_ospf6_route_longer_detail_cmd);
hasso4846ef62004-09-03 06:04:00 +0000895 install_element (VIEW_NODE, &show_ipv6_ospf6_route_type_cmd);
896 install_element (VIEW_NODE, &show_ipv6_ospf6_route_type_detail_cmd);
paul718e3742002-12-13 20:15:29 +0000897 install_element (ENABLE_NODE, &show_ipv6_ospf6_route_cmd);
hasso508e53e2004-05-18 18:57:06 +0000898 install_element (ENABLE_NODE, &show_ipv6_ospf6_route_detail_cmd);
899 install_element (ENABLE_NODE, &show_ipv6_ospf6_route_match_cmd);
900 install_element (ENABLE_NODE, &show_ipv6_ospf6_route_match_detail_cmd);
Paul Jakmacb4b8842006-05-15 10:39:30 +0000901 install_element (ENABLE_NODE, &show_ipv6_ospf6_route_longer_cmd);
902 install_element (ENABLE_NODE, &show_ipv6_ospf6_route_longer_detail_cmd);
hasso4846ef62004-09-03 06:04:00 +0000903 install_element (ENABLE_NODE, &show_ipv6_ospf6_route_type_cmd);
904 install_element (ENABLE_NODE, &show_ipv6_ospf6_route_type_detail_cmd);
hasso508e53e2004-05-18 18:57:06 +0000905
906 install_default (OSPF6_NODE);
907 install_element (OSPF6_NODE, &ospf6_router_id_cmd);
Dinesh Dutt3d35ca42013-08-26 03:40:16 +0000908 install_element (OSPF6_NODE, &ospf6_log_adjacency_changes_cmd);
909 install_element (OSPF6_NODE, &ospf6_log_adjacency_changes_detail_cmd);
910 install_element (OSPF6_NODE, &no_ospf6_log_adjacency_changes_cmd);
911 install_element (OSPF6_NODE, &no_ospf6_log_adjacency_changes_detail_cmd);
hasso508e53e2004-05-18 18:57:06 +0000912 install_element (OSPF6_NODE, &ospf6_interface_area_cmd);
913 install_element (OSPF6_NODE, &no_ospf6_interface_area_cmd);
Dinesh Duttf41b4a02013-08-24 08:00:37 +0000914 install_element (OSPF6_NODE, &ospf6_stub_router_admin_cmd);
915 install_element (OSPF6_NODE, &no_ospf6_stub_router_admin_cmd);
916 /* For a later time
917 install_element (OSPF6_NODE, &ospf6_stub_router_startup_cmd);
918 install_element (OSPF6_NODE, &no_ospf6_stub_router_startup_cmd);
919 install_element (OSPF6_NODE, &ospf6_stub_router_shutdown_cmd);
920 install_element (OSPF6_NODE, &no_ospf6_stub_router_shutdown_cmd);
921 */
paul718e3742002-12-13 20:15:29 +0000922}
923
hasso508e53e2004-05-18 18:57:06 +0000924