blob: 7191270143e05c4043d26a846b70848547e569be [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
Vincent Bernatfd500682012-10-24 14:45:54 +0000151 o->ref_bandwidth = OSPF6_REFERENCE_BANDWIDTH;
152
hasso508e53e2004-05-18 18:57:06 +0000153 return o;
154}
155
Tom Goffae2254a2010-11-10 13:01:41 -0800156void
hasso508e53e2004-05-18 18:57:06 +0000157ospf6_delete (struct ospf6 *o)
158{
paul1eb8ef22005-04-07 07:30:20 +0000159 struct listnode *node, *nnode;
hasso508e53e2004-05-18 18:57:06 +0000160 struct ospf6_area *oa;
161
Tom Goffae2254a2010-11-10 13:01:41 -0800162 ospf6_disable (ospf6);
163
paul1eb8ef22005-04-07 07:30:20 +0000164 for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa))
165 ospf6_area_delete (oa);
Christian Franked9628722013-03-08 21:47:35 +0100166
167
Tom Goffae2254a2010-11-10 13:01:41 -0800168 list_delete (o->area_list);
hasso508e53e2004-05-18 18:57:06 +0000169
170 ospf6_lsdb_delete (o->lsdb);
hasso6452df02004-08-15 05:52:07 +0000171 ospf6_lsdb_delete (o->lsdb_self);
hasso508e53e2004-05-18 18:57:06 +0000172
173 ospf6_route_table_delete (o->route_table);
hasso049207c2004-08-04 20:02:13 +0000174 ospf6_route_table_delete (o->brouter_table);
hasso508e53e2004-05-18 18:57:06 +0000175
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 Jakma6ac29a52008-08-15 13:45:30 +0100182static void
hasso508e53e2004-05-18 18:57:06 +0000183ospf6_enable (struct ospf6 *o)
184{
paul1eb8ef22005-04-07 07:30:20 +0000185 struct listnode *node, *nnode;
hasso508e53e2004-05-18 18:57:06 +0000186 struct ospf6_area *oa;
187
188 if (CHECK_FLAG (o->flag, OSPF6_DISABLED))
189 {
190 UNSET_FLAG (o->flag, OSPF6_DISABLED);
paul1eb8ef22005-04-07 07:30:20 +0000191 for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa))
192 ospf6_area_enable (oa);
paul718e3742002-12-13 20:15:29 +0000193 }
194}
195
Paul Jakma6ac29a52008-08-15 13:45:30 +0100196static void
hasso508e53e2004-05-18 18:57:06 +0000197ospf6_disable (struct ospf6 *o)
paul718e3742002-12-13 20:15:29 +0000198{
paul1eb8ef22005-04-07 07:30:20 +0000199 struct listnode *node, *nnode;
hasso508e53e2004-05-18 18:57:06 +0000200 struct ospf6_area *oa;
paul718e3742002-12-13 20:15:29 +0000201
hasso508e53e2004-05-18 18:57:06 +0000202 if (! CHECK_FLAG (o->flag, OSPF6_DISABLED))
203 {
204 SET_FLAG (o->flag, OSPF6_DISABLED);
paul1eb8ef22005-04-07 07:30:20 +0000205
206 for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa))
207 ospf6_area_disable (oa);
paul718e3742002-12-13 20:15:29 +0000208
Christian Franked9628722013-03-08 21:47:35 +0100209 /* XXX: This also changes persistent settings */
210 ospf6_asbr_redistribute_reset();
211
hasso508e53e2004-05-18 18:57:06 +0000212 ospf6_lsdb_remove_all (o->lsdb);
213 ospf6_route_remove_all (o->route_table);
hasso6452df02004-08-15 05:52:07 +0000214 ospf6_route_remove_all (o->brouter_table);
Christian Franked9628722013-03-08 21:47:35 +0100215
216 THREAD_OFF(o->maxage_remover);
217 THREAD_OFF(o->t_spf_calc);
218 THREAD_OFF(o->t_ase_calc);
hasso508e53e2004-05-18 18:57:06 +0000219 }
220}
paul718e3742002-12-13 20:15:29 +0000221
Dinesh Dutt2449fcd2013-08-24 07:54:17 +0000222int
hasso508e53e2004-05-18 18:57:06 +0000223ospf6_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;
hasso52dc7ee2004-09-23 19:18:23 +0000229 struct listnode *i, *j, *k;
Dinesh Dutt2449fcd2013-08-24 07:54:17 +0000230 int reschedule = 0;
hasso508e53e2004-05-18 18:57:06 +0000231
232 o->maxage_remover = (struct thread *) NULL;
hasso508e53e2004-05-18 18:57:06 +0000233
paul1eb8ef22005-04-07 07:30:20 +0000234 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000235 {
paul1eb8ef22005-04-07 07:30:20 +0000236 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso508e53e2004-05-18 18:57:06 +0000237 {
paul1eb8ef22005-04-07 07:30:20 +0000238 for (ALL_LIST_ELEMENTS_RO (oi->neighbor_list, k, on))
hasso508e53e2004-05-18 18:57:06 +0000239 {
hasso508e53e2004-05-18 18:57:06 +0000240 if (on->state != OSPF6_NEIGHBOR_EXCHANGE &&
241 on->state != OSPF6_NEIGHBOR_LOADING)
Dinesh Dutt2449fcd2013-08-24 07:54:17 +0000242 continue;
hasso508e53e2004-05-18 18:57:06 +0000243
Dinesh Dutt2449fcd2013-08-24 07:54:17 +0000244 ospf6_maxage_remove (o);
hasso508e53e2004-05-18 18:57:06 +0000245 return 0;
246 }
247 }
248 }
249
paul1eb8ef22005-04-07 07:30:20 +0000250 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000251 {
paul1eb8ef22005-04-07 07:30:20 +0000252 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
Dinesh Dutt2449fcd2013-08-24 07:54:17 +0000253 {
254 if (ospf6_lsdb_maxage_remover (oi->lsdb))
255 {
256 reschedule = 1;
257 }
258 }
paul1eb8ef22005-04-07 07:30:20 +0000259
Dinesh Dutt2449fcd2013-08-24 07:54:17 +0000260 if (ospf6_lsdb_maxage_remover (oa->lsdb))
261 {
262 reschedule = 1;
263 }
hasso508e53e2004-05-18 18:57:06 +0000264 }
Dinesh Dutt2449fcd2013-08-24 07:54:17 +0000265
266 if (ospf6_lsdb_maxage_remover (o->lsdb))
267 {
268 reschedule = 1;
269 }
270
271 if (reschedule)
272 {
273 ospf6_maxage_remove (o);
274 }
hasso508e53e2004-05-18 18:57:06 +0000275
paul718e3742002-12-13 20:15:29 +0000276 return 0;
277}
278
279void
hasso508e53e2004-05-18 18:57:06 +0000280ospf6_maxage_remove (struct ospf6 *o)
paul718e3742002-12-13 20:15:29 +0000281{
hasso508e53e2004-05-18 18:57:06 +0000282 if (o && ! o->maxage_remover)
Dinesh Dutt2449fcd2013-08-24 07:54:17 +0000283 o->maxage_remover = thread_add_timer (master, ospf6_maxage_remover, o,
284 OSPF_LSA_MAXAGE_REMOVE_DELAY_DEFAULT);
hasso508e53e2004-05-18 18:57:06 +0000285}
paul718e3742002-12-13 20:15:29 +0000286
hasso508e53e2004-05-18 18:57:06 +0000287/* start ospf6 */
288DEFUN (router_ospf6,
289 router_ospf6_cmd,
290 "router ospf6",
291 ROUTER_STR
292 OSPF6_STR)
293{
294 if (ospf6 == NULL)
295 ospf6 = ospf6_create ();
hasso508e53e2004-05-18 18:57:06 +0000296
297 /* set current ospf point. */
298 vty->node = OSPF6_NODE;
299 vty->index = ospf6;
300
301 return CMD_SUCCESS;
302}
303
304/* stop ospf6 */
305DEFUN (no_router_ospf6,
306 no_router_ospf6_cmd,
307 "no router ospf6",
308 NO_STR
309 OSPF6_ROUTER_STR)
310{
Christian Franked9628722013-03-08 21:47:35 +0100311 if (ospf6 == NULL)
312 vty_out (vty, "OSPFv3 is not configured%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000313 else
Christian Franked9628722013-03-08 21:47:35 +0100314 {
315 ospf6_delete (ospf6);
316 ospf6 = NULL;
317 }
hasso508e53e2004-05-18 18:57:06 +0000318
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. */
327DEFUN (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 {
hasso049207c2004-08-04 20:02:13 +0000342 vty_out (vty, "malformed OSPF Router-ID: %s%s", argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +0000343 return CMD_SUCCESS;
344 }
345
hassoc8a440e2004-10-11 17:02:40 +0000346 o->router_id_static = router_id;
347 if (o->router_id == 0)
348 o->router_id = router_id;
349
hasso508e53e2004-05-18 18:57:06 +0000350 return CMD_SUCCESS;
351}
352
Dinesh Dutt3d35ca42013-08-26 03:40:16 +0000353DEFUN (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
364DEFUN (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
377DEFUN (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
390DEFUN (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
hasso508e53e2004-05-18 18:57:06 +0000403DEFUN (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;
hasso3b687352004-08-19 06:56:53 +0000413 struct ospf6_area *oa;
hasso508e53e2004-05-18 18:57:06 +0000414 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",
hasso049207c2004-08-04 20:02:13 +0000428 oi->interface->name, oi->area->name, VNL);
hasso508e53e2004-05-18 18:57:06 +0000429 return CMD_SUCCESS;
430 }
431
432 /* parse Area-ID */
433 if (inet_pton (AF_INET, argv[1], &area_id) != 1)
434 {
hasso049207c2004-08-04 20:02:13 +0000435 vty_out (vty, "Invalid Area-ID: %s%s", argv[1], VNL);
hasso508e53e2004-05-18 18:57:06 +0000436 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
hasso6452df02004-08-15 05:52:07 +0000448 SET_FLAG (oa->flag, OSPF6_AREA_ENABLE);
449
Christian Franked9628722013-03-08 21:47:35 +0100450 /* ospf6 process is currently disabled, not much more to do */
451 if (CHECK_FLAG (o->flag, OSPF6_DISABLED))
452 return CMD_SUCCESS;
453
hasso508e53e2004-05-18 18:57:06 +0000454 /* start up */
Christian Franked9628722013-03-08 21:47:35 +0100455 ospf6_interface_enable (oi);
hasso6452df02004-08-15 05:52:07 +0000456
hasso3b687352004-08-19 06:56:53 +0000457 /* If the router is ABR, originate summary routes */
458 if (ospf6_is_router_abr (o))
459 ospf6_abr_enable_area (oa);
hasso6452df02004-08-15 05:52:07 +0000460
hasso508e53e2004-05-18 18:57:06 +0000461 return CMD_SUCCESS;
462}
463
464DEFUN (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;
hasso3b687352004-08-19 06:56:53 +0000476 struct ospf6_area *oa;
hasso508e53e2004-05-18 18:57:06 +0000477 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 {
hasso049207c2004-08-04 20:02:13 +0000485 vty_out (vty, "No such interface %s%s", argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +0000486 return CMD_SUCCESS;
487 }
488
489 oi = (struct ospf6_interface *) ifp->info;
490 if (oi == NULL)
491 {
hasso049207c2004-08-04 20:02:13 +0000492 vty_out (vty, "Interface %s not enabled%s", ifp->name, VNL);
hasso508e53e2004-05-18 18:57:06 +0000493 return CMD_SUCCESS;
494 }
495
496 /* parse Area-ID */
497 if (inet_pton (AF_INET, argv[1], &area_id) != 1)
498 {
hasso049207c2004-08-04 20:02:13 +0000499 vty_out (vty, "Invalid Area-ID: %s%s", argv[1], VNL);
hasso508e53e2004-05-18 18:57:06 +0000500 return CMD_SUCCESS;
501 }
502
Jon56abbb82009-02-11 17:30:44 -0800503 /* 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
hasso508e53e2004-05-18 18:57:06 +0000510 if (oi->area->area_id != area_id)
511 {
512 vty_out (vty, "Wrong Area-ID: %s is attached to area %s%s",
hasso049207c2004-08-04 20:02:13 +0000513 oi->interface->name, oi->area->name, VNL);
hasso508e53e2004-05-18 18:57:06 +0000514 return CMD_SUCCESS;
515 }
516
517 thread_execute (master, interface_down, oi, 0);
518
hasso6452df02004-08-15 05:52:07 +0000519 oa = oi->area;
hasso508e53e2004-05-18 18:57:06 +0000520 listnode_delete (oi->area->if_list, oi);
521 oi->area = (struct ospf6_area *) NULL;
522
hasso6452df02004-08-15 05:52:07 +0000523 /* 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);
hasso3b687352004-08-19 06:56:53 +0000527 ospf6_abr_disable_area (oa);
hasso6452df02004-08-15 05:52:07 +0000528 }
529
hasso508e53e2004-05-18 18:57:06 +0000530 return CMD_SUCCESS;
paul718e3742002-12-13 20:15:29 +0000531}
532
Dinesh Duttf41b4a02013-08-24 08:00:37 +0000533DEFUN (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
557DEFUN (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
582DEFUN (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
593DEFUN (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
605DEFUN (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
616DEFUN (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 Jakma6ac29a52008-08-15 13:45:30 +0100628static void
hasso508e53e2004-05-18 18:57:06 +0000629ospf6_show (struct vty *vty, struct ospf6 *o)
paul718e3742002-12-13 20:15:29 +0000630{
hasso52dc7ee2004-09-23 19:18:23 +0000631 struct listnode *n;
hasso508e53e2004-05-18 18:57:06 +0000632 struct ospf6_area *oa;
633 char router_id[16], duration[32];
Dinesh Dutta0edf672013-08-26 03:40:23 +0000634 struct timeval now, running, result;
635 char buf[32], rbuf[32];
paul718e3742002-12-13 20:15:29 +0000636
637 /* process id, router id */
hasso508e53e2004-05-18 18:57:06 +0000638 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",
hasso049207c2004-08-04 20:02:13 +0000640 router_id, VNL);
paul718e3742002-12-13 20:15:29 +0000641
642 /* running time */
Takashi Sogabe86f72dc2009-06-22 13:07:02 +0900643 quagga_gettime (QUAGGA_CLK_MONOTONIC, &now);
hasso508e53e2004-05-18 18:57:06 +0000644 timersub (&now, &o->starttime, &running);
645 timerstring (&running, duration, sizeof (duration));
hasso049207c2004-08-04 20:02:13 +0000646 vty_out (vty, " Running %s%s", duration, VNL);
paul718e3742002-12-13 20:15:29 +0000647
hasso508e53e2004-05-18 18:57:06 +0000648 /* Redistribute configuration */
649 /* XXX */
paul718e3742002-12-13 20:15:29 +0000650
Dinesh Dutta0edf672013-08-26 03:40:23 +0000651 /* 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 Duttf41b4a02013-08-24 08:00:37 +0000677 if (CHECK_FLAG (o->flag, OSPF6_STUB_ROUTER))
678 vty_out (vty, " Router Is Stub Router%s", VNL);
679
paul718e3742002-12-13 20:15:29 +0000680 /* LSAs */
681 vty_out (vty, " Number of AS scoped LSAs is %u%s",
hasso049207c2004-08-04 20:02:13 +0000682 o->lsdb->count, VNL);
paul718e3742002-12-13 20:15:29 +0000683
684 /* Areas */
685 vty_out (vty, " Number of areas in this router is %u%s",
hasso049207c2004-08-04 20:02:13 +0000686 listcount (o->area_list), VNL);
paul1eb8ef22005-04-07 07:30:20 +0000687
Dinesh Dutt3d35ca42013-08-26 03:40:16 +0000688 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
paul1eb8ef22005-04-07 07:30:20 +0000698 for (ALL_LIST_ELEMENTS_RO (o->area_list, n, oa))
699 ospf6_area_show (vty, oa);
paul718e3742002-12-13 20:15:29 +0000700}
701
hasso508e53e2004-05-18 18:57:06 +0000702/* show top level structures */
703DEFUN (show_ipv6_ospf6,
704 show_ipv6_ospf6_cmd,
705 "show ipv6 ospf6",
706 SHOW_STR
707 IP6_STR
708 OSPF6_STR)
paul718e3742002-12-13 20:15:29 +0000709{
hasso508e53e2004-05-18 18:57:06 +0000710 OSPF6_CMD_CHECK_RUNNING ();
paul718e3742002-12-13 20:15:29 +0000711
hasso508e53e2004-05-18 18:57:06 +0000712 ospf6_show (vty, ospf6);
713 return CMD_SUCCESS;
paul718e3742002-12-13 20:15:29 +0000714}
715
716DEFUN (show_ipv6_ospf6_route,
717 show_ipv6_ospf6_route_cmd,
718 "show ipv6 ospf6 route",
719 SHOW_STR
720 IP6_STR
721 OSPF6_STR
hasso508e53e2004-05-18 18:57:06 +0000722 ROUTE_STR
paul718e3742002-12-13 20:15:29 +0000723 )
724{
hasso508e53e2004-05-18 18:57:06 +0000725 ospf6_route_table_show (vty, argc, argv, ospf6->route_table);
726 return CMD_SUCCESS;
paul718e3742002-12-13 20:15:29 +0000727}
728
729ALIAS (show_ipv6_ospf6_route,
hasso508e53e2004-05-18 18:57:06 +0000730 show_ipv6_ospf6_route_detail_cmd,
hasso4846ef62004-09-03 06:04:00 +0000731 "show ipv6 ospf6 route (X:X::X:X|X:X::X:X/M|detail|summary)",
paul718e3742002-12-13 20:15:29 +0000732 SHOW_STR
733 IP6_STR
734 OSPF6_STR
hasso508e53e2004-05-18 18:57:06 +0000735 ROUTE_STR
736 "Specify IPv6 address\n"
737 "Specify IPv6 prefix\n"
738 "Detailed information\n"
739 "Summary of route table\n"
Paul Jakma6ac29a52008-08-15 13:45:30 +0100740 )
paul718e3742002-12-13 20:15:29 +0000741
hasso508e53e2004-05-18 18:57:06 +0000742DEFUN (show_ipv6_ospf6_route_match,
743 show_ipv6_ospf6_route_match_cmd,
hasso4846ef62004-09-03 06:04:00 +0000744 "show ipv6 ospf6 route X:X::X:X/M match",
paul718e3742002-12-13 20:15:29 +0000745 SHOW_STR
746 IP6_STR
747 OSPF6_STR
hasso508e53e2004-05-18 18:57:06 +0000748 ROUTE_STR
749 "Specify IPv6 prefix\n"
750 "Display routes which match the specified route\n"
paul718e3742002-12-13 20:15:29 +0000751 )
752{
paul0c083ee2004-10-10 12:54:58 +0000753 const char *sargv[CMD_ARGC_MAX];
hasso508e53e2004-05-18 18:57:06 +0000754 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;
paul718e3742002-12-13 20:15:29 +0000765}
766
hasso508e53e2004-05-18 18:57:06 +0000767DEFUN (show_ipv6_ospf6_route_match_detail,
768 show_ipv6_ospf6_route_match_detail_cmd,
hasso4846ef62004-09-03 06:04:00 +0000769 "show ipv6 ospf6 route X:X::X:X/M match detail",
paul718e3742002-12-13 20:15:29 +0000770 SHOW_STR
771 IP6_STR
772 OSPF6_STR
hasso508e53e2004-05-18 18:57:06 +0000773 ROUTE_STR
774 "Specify IPv6 prefix\n"
775 "Display routes which match the specified route\n"
paul718e3742002-12-13 20:15:29 +0000776 "Detailed information\n"
777 )
hasso508e53e2004-05-18 18:57:06 +0000778{
paul0c083ee2004-10-10 12:54:58 +0000779 const char *sargv[CMD_ARGC_MAX];
hasso508e53e2004-05-18 18:57:06 +0000780 int i, sargc;
paul718e3742002-12-13 20:15:29 +0000781
hasso508e53e2004-05-18 18:57:06 +0000782 /* 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;
paul718e3742002-12-13 20:15:29 +0000789
hasso508e53e2004-05-18 18:57:06 +0000790 ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table);
791 return CMD_SUCCESS;
792}
793
Paul Jakmacb4b8842006-05-15 10:39:30 +0000794ALIAS (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 Jakma6ac29a52008-08-15 13:45:30 +0100803 )
Paul Jakmacb4b8842006-05-15 10:39:30 +0000804
805DEFUN (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
hasso4846ef62004-09-03 06:04:00 +0000817ALIAS (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 Ovsienkoea402192011-08-19 16:27:16 +0400824 "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 Jakma6ac29a52008-08-15 13:45:30 +0100828 )
hasso4846ef62004-09-03 06:04:00 +0000829
830DEFUN (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 Ovsienkoea402192011-08-19 16:27:16 +0400837 "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"
hasso4846ef62004-09-03 06:04:00 +0000841 "Detailed information\n"
842 )
843{
paul0c083ee2004-10-10 12:54:58 +0000844 const char *sargv[CMD_ARGC_MAX];
hasso4846ef62004-09-03 06:04:00 +0000845 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}
hasso508e53e2004-05-18 18:57:06 +0000857
Dinesh Duttf41b4a02013-08-24 08:00:37 +0000858static void
859ospf6_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
hasso508e53e2004-05-18 18:57:06 +0000868/* OSPF configuration write function. */
Paul Jakma6ac29a52008-08-15 13:45:30 +0100869static int
hasso508e53e2004-05-18 18:57:06 +0000870config_write_ospf6 (struct vty *vty)
871{
872 char router_id[16];
hasso52dc7ee2004-09-23 19:18:23 +0000873 struct listnode *j, *k;
hasso508e53e2004-05-18 18:57:06 +0000874 struct ospf6_area *oa;
875 struct ospf6_interface *oi;
876
877 /* OSPFv6 configuration. */
878 if (ospf6 == NULL)
879 return CMD_SUCCESS;
hasso508e53e2004-05-18 18:57:06 +0000880
hassoc8a440e2004-10-11 17:02:40 +0000881 inet_ntop (AF_INET, &ospf6->router_id_static, router_id, sizeof (router_id));
hasso049207c2004-08-04 20:02:13 +0000882 vty_out (vty, "router ospf6%s", VNL);
hassoc8a440e2004-10-11 17:02:40 +0000883 if (ospf6->router_id_static != 0)
884 vty_out (vty, " router-id %s%s", router_id, VNL);
hasso508e53e2004-05-18 18:57:06 +0000885
Dinesh Dutt3d35ca42013-08-26 03:40:16 +0000886 /* 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 Bernatfd500682012-10-24 14:45:54 +0000895 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 Duttf41b4a02013-08-24 08:00:37 +0000899 ospf6_stub_router_config_write (vty);
hasso508e53e2004-05-18 18:57:06 +0000900 ospf6_redistribute_config_write (vty);
hasso6452df02004-08-15 05:52:07 +0000901 ospf6_area_config_write (vty);
Dinesh Dutt3810e062013-08-24 07:54:09 +0000902 ospf6_spf_config_write (vty);
hasso508e53e2004-05-18 18:57:06 +0000903
paul1eb8ef22005-04-07 07:30:20 +0000904 for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, j, oa))
hasso508e53e2004-05-18 18:57:06 +0000905 {
paul1eb8ef22005-04-07 07:30:20 +0000906 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);
hasso508e53e2004-05-18 18:57:06 +0000909 }
hasso049207c2004-08-04 20:02:13 +0000910 vty_out (vty, "!%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000911 return 0;
912}
913
914/* OSPF6 node structure. */
Stephen Hemminger7fc626d2008-12-01 11:10:34 -0800915static struct cmd_node ospf6_node =
hasso508e53e2004-05-18 18:57:06 +0000916{
917 OSPF6_NODE,
918 "%s(config-ospf6)# ",
hasso69b4a812004-08-26 18:10:36 +0000919 1 /* VTYSH */
hasso508e53e2004-05-18 18:57:06 +0000920};
921
922/* Install ospf related commands. */
paul718e3742002-12-13 20:15:29 +0000923void
Paul Jakma6ac29a52008-08-15 13:45:30 +0100924ospf6_top_init (void)
paul718e3742002-12-13 20:15:29 +0000925{
hasso508e53e2004-05-18 18:57:06 +0000926 /* 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);
Jon6c19d262009-02-11 17:19:07 -0800932 install_element (CONFIG_NODE, &no_router_ospf6_cmd);
hasso508e53e2004-05-18 18:57:06 +0000933
paul718e3742002-12-13 20:15:29 +0000934 install_element (VIEW_NODE, &show_ipv6_ospf6_route_cmd);
hasso508e53e2004-05-18 18:57:06 +0000935 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 Jakmacb4b8842006-05-15 10:39:30 +0000938 install_element (VIEW_NODE, &show_ipv6_ospf6_route_longer_cmd);
939 install_element (VIEW_NODE, &show_ipv6_ospf6_route_longer_detail_cmd);
hasso4846ef62004-09-03 06:04:00 +0000940 install_element (VIEW_NODE, &show_ipv6_ospf6_route_type_cmd);
941 install_element (VIEW_NODE, &show_ipv6_ospf6_route_type_detail_cmd);
paul718e3742002-12-13 20:15:29 +0000942 install_element (ENABLE_NODE, &show_ipv6_ospf6_route_cmd);
hasso508e53e2004-05-18 18:57:06 +0000943 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 Jakmacb4b8842006-05-15 10:39:30 +0000946 install_element (ENABLE_NODE, &show_ipv6_ospf6_route_longer_cmd);
947 install_element (ENABLE_NODE, &show_ipv6_ospf6_route_longer_detail_cmd);
hasso4846ef62004-09-03 06:04:00 +0000948 install_element (ENABLE_NODE, &show_ipv6_ospf6_route_type_cmd);
949 install_element (ENABLE_NODE, &show_ipv6_ospf6_route_type_detail_cmd);
hasso508e53e2004-05-18 18:57:06 +0000950
951 install_default (OSPF6_NODE);
952 install_element (OSPF6_NODE, &ospf6_router_id_cmd);
Dinesh Dutt3d35ca42013-08-26 03:40:16 +0000953 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);
hasso508e53e2004-05-18 18:57:06 +0000957 install_element (OSPF6_NODE, &ospf6_interface_area_cmd);
958 install_element (OSPF6_NODE, &no_ospf6_interface_area_cmd);
Dinesh Duttf41b4a02013-08-24 08:00:37 +0000959 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 */
paul718e3742002-12-13 20:15:29 +0000967}
968
hasso508e53e2004-05-18 18:57:06 +0000969