]> git.proxmox.com Git - mirror_frr.git/blame - ospf6d/ospf6d.c
Indentation consensus.
[mirror_frr.git] / ospf6d / ospf6d.c
CommitLineData
718e3744 1/*
508e53e2 2 * Copyright (C) 2003 Yasuhiro Ohara
718e3744 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
508e53e2 22#include <zebra.h>
718e3744 23
508e53e2 24#include "thread.h"
25#include "linklist.h"
26#include "vty.h"
27#include "command.h"
718e3744 28
508e53e2 29#include "ospf6_proto.h"
30#include "ospf6_network.h"
31#include "ospf6_lsa.h"
32#include "ospf6_lsdb.h"
33#include "ospf6_message.h"
34#include "ospf6_route.h"
35#include "ospf6_zebra.h"
36#include "ospf6_spf.h"
37#include "ospf6_top.h"
38#include "ospf6_area.h"
39#include "ospf6_interface.h"
40#include "ospf6_neighbor.h"
41#include "ospf6_intra.h"
42#include "ospf6_asbr.h"
049207c3 43#include "ospf6_abr.h"
44#include "ospf6d.h"
718e3744 45
46char ospf6_daemon_version[] = OSPF6_DAEMON_VERSION;
47
718e3744 48void
508e53e2 49ospf6_debug ()
50{
51}
52
508e53e2 53struct route_node *
54route_prev (struct route_node *node)
718e3744 55{
508e53e2 56 struct route_node *end;
57 struct route_node *prev = NULL;
718e3744 58
508e53e2 59 end = node;
60 node = node->parent;
3b68735f 61 if (node)
62 route_lock_node (node);
508e53e2 63 while (node)
64 {
65 prev = node;
3b68735f 66 node = route_next (node);
67 if (node == end)
68 {
69 route_unlock_node (node);
70 node = NULL;
71 }
508e53e2 72 }
73 route_unlock_node (end);
3b68735f 74 if (prev)
75 route_lock_node (prev);
718e3744 76
508e53e2 77 return prev;
718e3744 78}
79
6452df09 80\f
81/* show database functions */
718e3744 82DEFUN (show_version_ospf6,
83 show_version_ospf6_cmd,
84 "show version ospf6",
85 SHOW_STR
508e53e2 86 "Displays ospf6d version\n"
87 )
718e3744 88{
89 vty_out (vty, "Zebra OSPF6d Version: %s%s",
049207c3 90 ospf6_daemon_version, VNL);
718e3744 91
92 return CMD_SUCCESS;
93}
94
508e53e2 95struct cmd_node debug_node =
718e3744 96{
508e53e2 97 DEBUG_NODE,
69b4a810 98 "",
99 1 /* VTYSH */
508e53e2 100};
718e3744 101
508e53e2 102int
103config_write_ospf6_debug (struct vty *vty)
104{
105 config_write_ospf6_debug_message (vty);
106 config_write_ospf6_debug_lsa (vty);
107 config_write_ospf6_debug_zebra (vty);
108 config_write_ospf6_debug_interface (vty);
109 config_write_ospf6_debug_neighbor (vty);
110 config_write_ospf6_debug_spf (vty);
111 config_write_ospf6_debug_route (vty);
112 config_write_ospf6_debug_asbr (vty);
049207c3 113 config_write_ospf6_debug_abr (vty);
114 vty_out (vty, "!%s", VNL);
508e53e2 115 return 0;
718e3744 116}
117
049207c3 118#define AREA_LSDB_TITLE_FORMAT \
119 "%s Area Scoped Link State Database (Area %s)%s%s"
120#define IF_LSDB_TITLE_FORMAT \
121 "%s I/F Scoped Link State Database (I/F %s in Area %s)%s%s"
122#define AS_LSDB_TITLE_FORMAT \
123 "%s AS Scoped Link State Database%s%s"
124
125static int
126parse_show_level (int argc, char **argv)
127{
6452df09 128 int level = 0;
049207c3 129 if (argc)
130 {
131 if (! strncmp (argv[0], "de", 2))
132 level = OSPF6_LSDB_SHOW_LEVEL_DETAIL;
133 else if (! strncmp (argv[0], "du", 2))
134 level = OSPF6_LSDB_SHOW_LEVEL_DUMP;
135 else if (! strncmp (argv[0], "in", 2))
136 level = OSPF6_LSDB_SHOW_LEVEL_INTERNAL;
137 }
138 else
139 level = OSPF6_LSDB_SHOW_LEVEL_NORMAL;
140 return level;
141}
142
143static u_int16_t
144parse_type_spec (int argc, char **argv)
145{
6452df09 146 u_int16_t type = 0;
049207c3 147 assert (argc);
148 if (! strcmp (argv[0], "router"))
149 type = htons (OSPF6_LSTYPE_ROUTER);
150 else if (! strcmp (argv[0], "network"))
151 type = htons (OSPF6_LSTYPE_NETWORK);
152 else if (! strcmp (argv[0], "as-external"))
153 type = htons (OSPF6_LSTYPE_AS_EXTERNAL);
154 else if (! strcmp (argv[0], "intra-prefix"))
155 type = htons (OSPF6_LSTYPE_INTRA_PREFIX);
156 else if (! strcmp (argv[0], "inter-router"))
157 type = htons (OSPF6_LSTYPE_INTER_ROUTER);
158 else if (! strcmp (argv[0], "inter-prefix"))
159 type = htons (OSPF6_LSTYPE_INTER_PREFIX);
160 else if (! strcmp (argv[0], "link"))
161 type = htons (OSPF6_LSTYPE_LINK);
162 return type;
163}
164
508e53e2 165DEFUN (show_ipv6_ospf6_database,
166 show_ipv6_ospf6_database_cmd,
167 "show ipv6 ospf6 database",
168 SHOW_STR
169 IPV6_STR
170 OSPF6_STR
171 "Display Link state database\n"
172 )
718e3744 173{
049207c3 174 int level;
508e53e2 175 listnode i, j;
176 struct ospf6 *o = ospf6;
049207c3 177 struct ospf6_area *oa;
178 struct ospf6_interface *oi;
508e53e2 179
180 OSPF6_CMD_CHECK_RUNNING ();
181
049207c3 182 level = parse_show_level (argc, argv);
718e3744 183
508e53e2 184 for (i = listhead (o->area_list); i; nextnode (i))
185 {
049207c3 186 oa = (struct ospf6_area *) getdata (i);
187 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
188 ospf6_lsdb_show (vty, level, NULL, NULL, NULL, oa->lsdb);
508e53e2 189 }
049207c3 190
508e53e2 191 for (i = listhead (o->area_list); i; nextnode (i))
192 {
049207c3 193 oa = (struct ospf6_area *) getdata (i);
508e53e2 194 for (j = listhead (oa->if_list); j; nextnode (j))
195 {
049207c3 196 oi = (struct ospf6_interface *) getdata (j);
197 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
198 oi->interface->name, oa->name, VNL, VNL);
199 ospf6_lsdb_show (vty, level, NULL, NULL, NULL, oi->lsdb);
508e53e2 200 }
201 }
718e3744 202
049207c3 203 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
204 ospf6_lsdb_show (vty, level, NULL, NULL, NULL, o->lsdb);
205
206 vty_out (vty, "%s", VNL);
718e3744 207 return CMD_SUCCESS;
208}
209
508e53e2 210ALIAS (show_ipv6_ospf6_database,
211 show_ipv6_ospf6_database_detail_cmd,
212 "show ipv6 ospf6 database (detail|dump|internal)",
213 SHOW_STR
214 IPV6_STR
215 OSPF6_STR
216 "Display Link state database\n"
217 "Display details of LSAs\n"
218 "Dump LSAs\n"
219 "Display LSA's internal information\n"
220 );
221
222DEFUN (show_ipv6_ospf6_database_type,
223 show_ipv6_ospf6_database_type_cmd,
224 "show ipv6 ospf6 database "
225 "(router|network|inter-prefix|inter-router|as-external|"
226 "group-membership|type-7|link|intra-prefix)",
718e3744 227 SHOW_STR
508e53e2 228 IPV6_STR
229 OSPF6_STR
230 "Display Link state database\n"
231 "Display Router LSAs\n"
232 "Display Network LSAs\n"
233 "Display Inter-Area-Prefix LSAs\n"
234 "Display Inter-Area-Router LSAs\n"
235 "Display As-External LSAs\n"
236 "Display Group-Membership LSAs\n"
237 "Display Type-7 LSAs\n"
238 "Display Link LSAs\n"
239 "Display Intra-Area-Prefix LSAs\n"
240 )
718e3744 241{
049207c3 242 int level;
508e53e2 243 listnode i, j;
244 struct ospf6 *o = ospf6;
049207c3 245 struct ospf6_area *oa;
246 struct ospf6_interface *oi;
508e53e2 247 u_int16_t type = 0;
248
718e3744 249 OSPF6_CMD_CHECK_RUNNING ();
250
049207c3 251 type = parse_type_spec (argc, argv);
252 argc--;
253 argv++;
254 level = parse_show_level (argc, argv);
508e53e2 255
049207c3 256 switch (OSPF6_LSA_SCOPE (type))
508e53e2 257 {
6452df09 258 case OSPF6_SCOPE_AREA:
049207c3 259 for (i = listhead (o->area_list); i; nextnode (i))
260 {
261 oa = (struct ospf6_area *) getdata (i);
262 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
263 ospf6_lsdb_show (vty, level, &type, NULL, NULL, oa->lsdb);
264 }
265 break;
266
6452df09 267 case OSPF6_SCOPE_LINKLOCAL:
049207c3 268 for (i = listhead (o->area_list); i; nextnode (i))
269 {
270 oa = (struct ospf6_area *) getdata (i);
271 for (j = listhead (oa->if_list); j; nextnode (j))
272 {
273 oi = (struct ospf6_interface *) getdata (j);
274 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
275 oi->interface->name, oa->name, VNL, VNL);
276 ospf6_lsdb_show (vty, level, &type, NULL, NULL, oi->lsdb);
277 }
278 }
279 break;
280
6452df09 281 case OSPF6_SCOPE_AS:
049207c3 282 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
283 ospf6_lsdb_show (vty, level, &type, NULL, NULL, o->lsdb);
284 break;
285
286 default:
287 assert (0);
288 break;
508e53e2 289 }
290
049207c3 291 vty_out (vty, "%s", VNL);
718e3744 292 return CMD_SUCCESS;
293}
294
508e53e2 295ALIAS (show_ipv6_ospf6_database_type,
296 show_ipv6_ospf6_database_type_detail_cmd,
297 "show ipv6 ospf6 database "
298 "(router|network|inter-prefix|inter-router|as-external|"
299 "group-membership|type-7|link|intra-prefix) "
300 "(detail|dump|internal)",
718e3744 301 SHOW_STR
508e53e2 302 IPV6_STR
718e3744 303 OSPF6_STR
508e53e2 304 "Display Link state database\n"
305 "Display Router LSAs\n"
306 "Display Network LSAs\n"
307 "Display Inter-Area-Prefix LSAs\n"
308 "Display Inter-Area-Router LSAs\n"
309 "Display As-External LSAs\n"
310 "Display Group-Membership LSAs\n"
311 "Display Type-7 LSAs\n"
312 "Display Link LSAs\n"
313 "Display Intra-Area-Prefix LSAs\n"
314 "Display details of LSAs\n"
315 "Dump LSAs\n"
316 "Display LSA's internal information\n"
317 );
318
319DEFUN (show_ipv6_ospf6_database_id,
320 show_ipv6_ospf6_database_id_cmd,
321 "show ipv6 ospf6 database * A.B.C.D",
718e3744 322 SHOW_STR
508e53e2 323 IPV6_STR
718e3744 324 OSPF6_STR
508e53e2 325 "Display Link state database\n"
326 "Any Link state Type\n"
327 "Specify Link state ID as IPv4 address notation\n"
328 )
718e3744 329{
049207c3 330 int level;
508e53e2 331 listnode i, j;
332 struct ospf6 *o = ospf6;
049207c3 333 struct ospf6_area *oa;
334 struct ospf6_interface *oi;
508e53e2 335 u_int32_t id = 0;
336
718e3744 337 OSPF6_CMD_CHECK_RUNNING ();
338
508e53e2 339 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
718e3744 340 {
508e53e2 341 vty_out (vty, "Link State ID is not parsable: %s%s",
049207c3 342 argv[0], VNL);
508e53e2 343 return CMD_SUCCESS;
718e3744 344 }
345
049207c3 346 argc--;
347 argv++;
348 level = parse_show_level (argc, argv);
349
508e53e2 350 for (i = listhead (o->area_list); i; nextnode (i))
351 {
049207c3 352 oa = (struct ospf6_area *) getdata (i);
353 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
354 ospf6_lsdb_show (vty, level, NULL, &id, NULL, oa->lsdb);
508e53e2 355 }
049207c3 356
508e53e2 357 for (i = listhead (o->area_list); i; nextnode (i))
358 {
049207c3 359 oa = (struct ospf6_area *) getdata (i);
508e53e2 360 for (j = listhead (oa->if_list); j; nextnode (j))
361 {
049207c3 362 oi = (struct ospf6_interface *) getdata (j);
363 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
364 oi->interface->name, oa->name, VNL, VNL);
365 ospf6_lsdb_show (vty, level, NULL, &id, NULL, oi->lsdb);
508e53e2 366 }
367 }
718e3744 368
049207c3 369 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
370 ospf6_lsdb_show (vty, level, NULL, &id, NULL, o->lsdb);
371
372 vty_out (vty, "%s", VNL);
718e3744 373 return CMD_SUCCESS;
374}
375
508e53e2 376ALIAS (show_ipv6_ospf6_database_id,
377 show_ipv6_ospf6_database_id_detail_cmd,
378 "show ipv6 ospf6 database * A.B.C.D "
379 "(detail|dump|internal)",
380 SHOW_STR
381 IPV6_STR
382 OSPF6_STR
383 "Display Link state database\n"
384 "Any Link state Type\n"
049207c3 385 "Specify Link state ID as IPv4 address notation\n"
386 "Display details of LSAs\n"
387 "Dump LSAs\n"
388 "Display LSA's internal information\n"
389 );
390
391ALIAS (show_ipv6_ospf6_database_id,
392 show_ipv6_ospf6_database_linkstate_id_cmd,
393 "show ipv6 ospf6 database linkstate-id A.B.C.D",
394 SHOW_STR
395 IPV6_STR
396 OSPF6_STR
397 "Display Link state database\n"
398 "Search by Link state ID\n"
399 "Specify Link state ID as IPv4 address notation\n"
400 );
401
402ALIAS (show_ipv6_ospf6_database_id,
403 show_ipv6_ospf6_database_linkstate_id_detail_cmd,
404 "show ipv6 ospf6 database linkstate-id A.B.C.D "
405 "(detail|dump|internal)",
406 SHOW_STR
407 IPV6_STR
408 OSPF6_STR
409 "Display Link state database\n"
410 "Search by Link state ID\n"
508e53e2 411 "Specify Link state ID as IPv4 address notation\n"
412 "Display details of LSAs\n"
413 "Dump LSAs\n"
414 "Display LSA's internal information\n"
415 );
416
417DEFUN (show_ipv6_ospf6_database_router,
418 show_ipv6_ospf6_database_router_cmd,
419 "show ipv6 ospf6 database * * A.B.C.D",
420 SHOW_STR
421 IPV6_STR
422 OSPF6_STR
423 "Display Link state database\n"
424 "Any Link state Type\n"
425 "Any Link state ID\n"
426 "Specify Advertising Router as IPv4 address notation\n"
427 )
718e3744 428{
049207c3 429 int level;
508e53e2 430 listnode i, j;
431 struct ospf6 *o = ospf6;
049207c3 432 struct ospf6_area *oa;
433 struct ospf6_interface *oi;
434 u_int32_t adv_router = 0;
718e3744 435
508e53e2 436 OSPF6_CMD_CHECK_RUNNING ();
718e3744 437
049207c3 438 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
718e3744 439 {
508e53e2 440 vty_out (vty, "Advertising Router is not parsable: %s%s",
049207c3 441 argv[0], VNL);
508e53e2 442 return CMD_SUCCESS;
718e3744 443 }
444
049207c3 445 argc--;
446 argv++;
447 level = parse_show_level (argc, argv);
448
508e53e2 449 for (i = listhead (o->area_list); i; nextnode (i))
718e3744 450 {
049207c3 451 oa = (struct ospf6_area *) getdata (i);
452 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
453 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oa->lsdb);
718e3744 454 }
049207c3 455
508e53e2 456 for (i = listhead (o->area_list); i; nextnode (i))
718e3744 457 {
049207c3 458 oa = (struct ospf6_area *) getdata (i);
508e53e2 459 for (j = listhead (oa->if_list); j; nextnode (j))
460 {
049207c3 461 oi = (struct ospf6_interface *) getdata (j);
462 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
463 oi->interface->name, oa->name, VNL, VNL);
464 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oi->lsdb);
508e53e2 465 }
718e3744 466 }
467
049207c3 468 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
469 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, o->lsdb);
470
471 vty_out (vty, "%s", VNL);
508e53e2 472 return CMD_SUCCESS;
473}
474
475ALIAS (show_ipv6_ospf6_database_router,
476 show_ipv6_ospf6_database_router_detail_cmd,
477 "show ipv6 ospf6 database * * A.B.C.D "
478 "(detail|dump|internal)",
479 SHOW_STR
480 IPV6_STR
481 OSPF6_STR
482 "Display Link state database\n"
483 "Any Link state Type\n"
484 "Any Link state ID\n"
485 "Specify Advertising Router as IPv4 address notation\n"
486 "Display details of LSAs\n"
487 "Dump LSAs\n"
488 "Display LSA's internal information\n"
489 );
490
049207c3 491ALIAS (show_ipv6_ospf6_database_router,
492 show_ipv6_ospf6_database_adv_router_cmd,
493 "show ipv6 ospf6 database adv-router A.B.C.D",
494 SHOW_STR
495 IPV6_STR
496 OSPF6_STR
497 "Display Link state database\n"
498 "Search by Advertising Router\n"
499 "Specify Advertising Router as IPv4 address notation\n"
500 );
501
502ALIAS (show_ipv6_ospf6_database_router,
503 show_ipv6_ospf6_database_adv_router_detail_cmd,
504 "show ipv6 ospf6 database adv-router A.B.C.D "
505 "(detail|dump|internal)",
506 SHOW_STR
507 IPV6_STR
508 OSPF6_STR
509 "Display Link state database\n"
510 "Search by Advertising Router\n"
511 "Specify Advertising Router as IPv4 address notation\n"
512 "Display details of LSAs\n"
513 "Dump LSAs\n"
514 "Display LSA's internal information\n"
515 );
516
508e53e2 517DEFUN (show_ipv6_ospf6_database_type_id,
518 show_ipv6_ospf6_database_type_id_cmd,
519 "show ipv6 ospf6 database "
520 "(router|network|inter-prefix|inter-router|as-external|"
521 "group-membership|type-7|link|intra-prefix) A.B.C.D",
522 SHOW_STR
523 IPV6_STR
524 OSPF6_STR
525 "Display Link state database\n"
526 "Display Router LSAs\n"
527 "Display Network LSAs\n"
528 "Display Inter-Area-Prefix LSAs\n"
529 "Display Inter-Area-Router LSAs\n"
530 "Display As-External LSAs\n"
531 "Display Group-Membership LSAs\n"
532 "Display Type-7 LSAs\n"
533 "Display Link LSAs\n"
534 "Display Intra-Area-Prefix LSAs\n"
535 "Specify Link state ID as IPv4 address notation\n"
536 )
537{
049207c3 538 int level;
508e53e2 539 listnode i, j;
540 struct ospf6 *o = ospf6;
049207c3 541 struct ospf6_area *oa;
542 struct ospf6_interface *oi;
508e53e2 543 u_int16_t type = 0;
544 u_int32_t id = 0;
545
546 OSPF6_CMD_CHECK_RUNNING ();
547
049207c3 548 type = parse_type_spec (argc, argv);
549 argc--;
550 argv++;
508e53e2 551
049207c3 552 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
718e3744 553 {
508e53e2 554 vty_out (vty, "Link state ID is not parsable: %s%s",
049207c3 555 argv[0], VNL);
508e53e2 556 return CMD_SUCCESS;
718e3744 557 }
558
049207c3 559 argc--;
560 argv++;
561 level = parse_show_level (argc, argv);
562
563 switch (OSPF6_LSA_SCOPE (type))
718e3744 564 {
6452df09 565 case OSPF6_SCOPE_AREA:
049207c3 566 for (i = listhead (o->area_list); i; nextnode (i))
567 {
568 oa = (struct ospf6_area *) getdata (i);
569 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
570 ospf6_lsdb_show (vty, level, &type, &id, NULL, oa->lsdb);
571 }
572 break;
573
6452df09 574 case OSPF6_SCOPE_LINKLOCAL:
049207c3 575 for (i = listhead (o->area_list); i; nextnode (i))
576 {
577 oa = (struct ospf6_area *) getdata (i);
578 for (j = listhead (oa->if_list); j; nextnode (j))
579 {
580 oi = (struct ospf6_interface *) getdata (j);
581 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
582 oi->interface->name, oa->name, VNL, VNL);
583 ospf6_lsdb_show (vty, level, &type, &id, NULL, oi->lsdb);
584 }
585 }
586 break;
587
6452df09 588 case OSPF6_SCOPE_AS:
049207c3 589 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
590 ospf6_lsdb_show (vty, level, &type, &id, NULL, o->lsdb);
591 break;
592
593 default:
594 assert (0);
595 break;
718e3744 596 }
597
049207c3 598 vty_out (vty, "%s", VNL);
718e3744 599 return CMD_SUCCESS;
600}
601
508e53e2 602ALIAS (show_ipv6_ospf6_database_type_id,
603 show_ipv6_ospf6_database_type_id_detail_cmd,
604 "show ipv6 ospf6 database "
605 "(router|network|inter-prefix|inter-router|as-external|"
606 "group-membership|type-7|link|intra-prefix) A.B.C.D "
607 "(detail|dump|internal)",
608 SHOW_STR
609 IPV6_STR
610 OSPF6_STR
611 "Display Link state database\n"
612 "Display Router LSAs\n"
613 "Display Network LSAs\n"
614 "Display Inter-Area-Prefix LSAs\n"
615 "Display Inter-Area-Router LSAs\n"
616 "Display As-External LSAs\n"
617 "Display Group-Membership LSAs\n"
618 "Display Type-7 LSAs\n"
619 "Display Link LSAs\n"
620 "Display Intra-Area-Prefix LSAs\n"
621 "Specify Link state ID as IPv4 address notation\n"
622 "Display details of LSAs\n"
623 "Dump LSAs\n"
624 "Display LSA's internal information\n"
625 );
626
049207c3 627ALIAS (show_ipv6_ospf6_database_type_id,
628 show_ipv6_ospf6_database_type_linkstate_id_cmd,
629 "show ipv6 ospf6 database "
630 "(router|network|inter-prefix|inter-router|as-external|"
631 "group-membership|type-7|link|intra-prefix) linkstate-id A.B.C.D",
632 SHOW_STR
633 IPV6_STR
634 OSPF6_STR
635 "Display Link state database\n"
636 "Display Router LSAs\n"
637 "Display Network LSAs\n"
638 "Display Inter-Area-Prefix LSAs\n"
639 "Display Inter-Area-Router LSAs\n"
640 "Display As-External LSAs\n"
641 "Display Group-Membership LSAs\n"
642 "Display Type-7 LSAs\n"
643 "Display Link LSAs\n"
644 "Display Intra-Area-Prefix LSAs\n"
645 "Search by Link state ID\n"
646 "Specify Link state ID as IPv4 address notation\n"
647 );
648
649ALIAS (show_ipv6_ospf6_database_type_id,
650 show_ipv6_ospf6_database_type_linkstate_id_detail_cmd,
651 "show ipv6 ospf6 database "
652 "(router|network|inter-prefix|inter-router|as-external|"
653 "group-membership|type-7|link|intra-prefix) linkstate-id A.B.C.D "
654 "(detail|dump|internal)",
655 SHOW_STR
656 IPV6_STR
657 OSPF6_STR
658 "Display Link state database\n"
659 "Display Router LSAs\n"
660 "Display Network LSAs\n"
661 "Display Inter-Area-Prefix LSAs\n"
662 "Display Inter-Area-Router LSAs\n"
663 "Display As-External LSAs\n"
664 "Display Group-Membership LSAs\n"
665 "Display Type-7 LSAs\n"
666 "Display Link LSAs\n"
667 "Display Intra-Area-Prefix LSAs\n"
668 "Search by Link state ID\n"
669 "Specify Link state ID as IPv4 address notation\n"
670 "Display details of LSAs\n"
671 "Dump LSAs\n"
672 "Display LSA's internal information\n"
673 );
674
508e53e2 675DEFUN (show_ipv6_ospf6_database_type_router,
676 show_ipv6_ospf6_database_type_router_cmd,
677 "show ipv6 ospf6 database "
678 "(router|network|inter-prefix|inter-router|as-external|"
679 "group-membership|type-7|link|intra-prefix) * A.B.C.D",
680 SHOW_STR
681 IPV6_STR
682 OSPF6_STR
683 "Display Link state database\n"
684 "Display Router LSAs\n"
685 "Display Network LSAs\n"
686 "Display Inter-Area-Prefix LSAs\n"
687 "Display Inter-Area-Router LSAs\n"
688 "Display As-External LSAs\n"
689 "Display Group-Membership LSAs\n"
690 "Display Type-7 LSAs\n"
691 "Display Link LSAs\n"
692 "Display Intra-Area-Prefix LSAs\n"
693 "Any Link state ID\n"
694 "Specify Advertising Router as IPv4 address notation\n"
718e3744 695 )
696{
049207c3 697 int level;
508e53e2 698 listnode i, j;
699 struct ospf6 *o = ospf6;
049207c3 700 struct ospf6_area *oa;
701 struct ospf6_interface *oi;
508e53e2 702 u_int16_t type = 0;
049207c3 703 u_int32_t adv_router = 0;
718e3744 704
508e53e2 705 OSPF6_CMD_CHECK_RUNNING ();
718e3744 706
049207c3 707 type = parse_type_spec (argc, argv);
708 argc--;
709 argv++;
508e53e2 710
049207c3 711 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
718e3744 712 {
508e53e2 713 vty_out (vty, "Advertising Router is not parsable: %s%s",
049207c3 714 argv[0], VNL);
508e53e2 715 return CMD_SUCCESS;
718e3744 716 }
717
049207c3 718 argc--;
719 argv++;
720 level = parse_show_level (argc, argv);
721
722 switch (OSPF6_LSA_SCOPE (type))
508e53e2 723 {
6452df09 724 case OSPF6_SCOPE_AREA:
049207c3 725 for (i = listhead (o->area_list); i; nextnode (i))
726 {
727 oa = (struct ospf6_area *) getdata (i);
728 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
729 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oa->lsdb);
730 }
731 break;
732
6452df09 733 case OSPF6_SCOPE_LINKLOCAL:
049207c3 734 for (i = listhead (o->area_list); i; nextnode (i))
735 {
736 oa = (struct ospf6_area *) getdata (i);
737 for (j = listhead (oa->if_list); j; nextnode (j))
738 {
739 oi = (struct ospf6_interface *) getdata (j);
740 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
741 oi->interface->name, oa->name, VNL, VNL);
742 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oi->lsdb);
743 }
744 }
745 break;
746
6452df09 747 case OSPF6_SCOPE_AS:
049207c3 748 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
749 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, o->lsdb);
750 break;
751
752 default:
753 assert (0);
754 break;
508e53e2 755 }
718e3744 756
049207c3 757 vty_out (vty, "%s", VNL);
508e53e2 758 return CMD_SUCCESS;
718e3744 759}
760
508e53e2 761ALIAS (show_ipv6_ospf6_database_type_router,
762 show_ipv6_ospf6_database_type_router_detail_cmd,
763 "show ipv6 ospf6 database "
764 "(router|network|inter-prefix|inter-router|as-external|"
765 "group-membership|type-7|link|intra-prefix) * A.B.C.D "
766 "(detail|dump|internal)",
767 SHOW_STR
768 IPV6_STR
769 OSPF6_STR
770 "Display Link state database\n"
771 "Display Router LSAs\n"
772 "Display Network LSAs\n"
773 "Display Inter-Area-Prefix LSAs\n"
774 "Display Inter-Area-Router LSAs\n"
775 "Display As-External LSAs\n"
776 "Display Group-Membership LSAs\n"
777 "Display Type-7 LSAs\n"
778 "Display Link LSAs\n"
779 "Display Intra-Area-Prefix LSAs\n"
780 "Any Link state ID\n"
781 "Specify Advertising Router as IPv4 address notation\n"
782 "Display details of LSAs\n"
783 "Dump LSAs\n"
784 "Display LSA's internal information\n"
785 );
786
049207c3 787ALIAS (show_ipv6_ospf6_database_type_router,
788 show_ipv6_ospf6_database_type_adv_router_cmd,
789 "show ipv6 ospf6 database "
790 "(router|network|inter-prefix|inter-router|as-external|"
791 "group-membership|type-7|link|intra-prefix) adv-router A.B.C.D",
508e53e2 792 SHOW_STR
793 IPV6_STR
794 OSPF6_STR
795 "Display Link state database\n"
049207c3 796 "Display Router LSAs\n"
797 "Display Network LSAs\n"
798 "Display Inter-Area-Prefix LSAs\n"
799 "Display Inter-Area-Router LSAs\n"
800 "Display As-External LSAs\n"
801 "Display Group-Membership LSAs\n"
802 "Display Type-7 LSAs\n"
803 "Display Link LSAs\n"
804 "Display Intra-Area-Prefix LSAs\n"
805 "Search by Advertising Router\n"
508e53e2 806 "Specify Advertising Router as IPv4 address notation\n"
049207c3 807 );
718e3744 808
049207c3 809ALIAS (show_ipv6_ospf6_database_type_router,
810 show_ipv6_ospf6_database_type_adv_router_detail_cmd,
811 "show ipv6 ospf6 database "
812 "(router|network|inter-prefix|inter-router|as-external|"
813 "group-membership|type-7|link|intra-prefix) adv-router A.B.C.D "
814 "(detail|dump|internal)",
815 SHOW_STR
816 IPV6_STR
817 OSPF6_STR
818 "Display Link state database\n"
819 "Display Router LSAs\n"
820 "Display Network LSAs\n"
821 "Display Inter-Area-Prefix LSAs\n"
822 "Display Inter-Area-Router LSAs\n"
823 "Display As-External LSAs\n"
824 "Display Group-Membership LSAs\n"
825 "Display Type-7 LSAs\n"
826 "Display Link LSAs\n"
827 "Display Intra-Area-Prefix LSAs\n"
828 "Search by Advertising Router\n"
829 "Specify Advertising Router as IPv4 address notation\n"
830 "Display details of LSAs\n"
831 "Dump LSAs\n"
832 "Display LSA's internal information\n"
833 );
834
835DEFUN (show_ipv6_ospf6_database_id_router,
836 show_ipv6_ospf6_database_id_router_cmd,
837 "show ipv6 ospf6 database * A.B.C.D A.B.C.D",
838 SHOW_STR
839 IPV6_STR
840 OSPF6_STR
841 "Display Link state database\n"
842 "Any Link state Type\n"
843 "Specify Link state ID as IPv4 address notation\n"
844 "Specify Advertising Router as IPv4 address notation\n"
845 )
846{
847 int level;
848 listnode i, j;
849 struct ospf6 *o = ospf6;
850 struct ospf6_area *oa;
851 struct ospf6_interface *oi;
852 u_int32_t id = 0;
853 u_int32_t adv_router = 0;
854
855 OSPF6_CMD_CHECK_RUNNING ();
856
857 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
858 {
859 vty_out (vty, "Link state ID is not parsable: %s%s",
6452df09 860 argv[0], VNL);
049207c3 861 return CMD_SUCCESS;
718e3744 862 }
863
049207c3 864 argc--;
865 argv++;
866
867 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
718e3744 868 {
508e53e2 869 vty_out (vty, "Advertising Router is not parsable: %s%s",
049207c3 870 argv[0], VNL);
508e53e2 871 return CMD_SUCCESS;
718e3744 872 }
873
049207c3 874 argc--;
875 argv++;
876 level = parse_show_level (argc, argv);
877
508e53e2 878 for (i = listhead (o->area_list); i; nextnode (i))
879 {
049207c3 880 oa = (struct ospf6_area *) getdata (i);
881 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
882 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oa->lsdb);
508e53e2 883 }
049207c3 884
508e53e2 885 for (i = listhead (o->area_list); i; nextnode (i))
886 {
049207c3 887 oa = (struct ospf6_area *) getdata (i);
508e53e2 888 for (j = listhead (oa->if_list); j; nextnode (j))
889 {
049207c3 890 oi = (struct ospf6_interface *) getdata (j);
891 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
892 oi->interface->name, oa->name, VNL, VNL);
893 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oi->lsdb);
508e53e2 894 }
895 }
718e3744 896
049207c3 897 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
898 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, o->lsdb);
899
900 vty_out (vty, "%s", VNL);
718e3744 901 return CMD_SUCCESS;
902}
903
508e53e2 904ALIAS (show_ipv6_ospf6_database_id_router,
905 show_ipv6_ospf6_database_id_router_detail_cmd,
906 "show ipv6 ospf6 database * A.B.C.D A.B.C.D "
907 "(detail|dump|internal)",
908 SHOW_STR
909 IPV6_STR
910 OSPF6_STR
911 "Display Link state database\n"
912 "Any Link state Type\n"
913 "Specify Link state ID as IPv4 address notation\n"
914 "Specify Advertising Router as IPv4 address notation\n"
915 "Display details of LSAs\n"
916 "Dump LSAs\n"
917 "Display LSA's internal information\n"
918 );
919
049207c3 920DEFUN (show_ipv6_ospf6_database_adv_router_linkstate_id,
921 show_ipv6_ospf6_database_adv_router_linkstate_id_cmd,
922 "show ipv6 ospf6 database adv-router A.B.C.D linkstate-id A.B.C.D",
923 SHOW_STR
924 IPV6_STR
925 OSPF6_STR
926 "Display Link state database\n"
927 "Search by Advertising Router\n"
928 "Specify Advertising Router as IPv4 address notation\n"
929 "Search by Link state ID\n"
930 "Specify Link state ID as IPv4 address notation\n"
931 )
932{
933 int level;
934 listnode i, j;
935 struct ospf6 *o = ospf6;
936 struct ospf6_area *oa;
937 struct ospf6_interface *oi;
938 u_int32_t id = 0;
939 u_int32_t adv_router = 0;
940
941 OSPF6_CMD_CHECK_RUNNING ();
942
943 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
944 {
945 vty_out (vty, "Advertising Router is not parsable: %s%s",
946 argv[0], VNL);
947 return CMD_SUCCESS;
948 }
949
950 argc--;
951 argv++;
952
953 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
954 {
955 vty_out (vty, "Link state ID is not parsable: %s%s",
6452df09 956 argv[0], VNL);
049207c3 957 return CMD_SUCCESS;
958 }
959
960 argc--;
961 argv++;
962 level = parse_show_level (argc, argv);
963
964 for (i = listhead (o->area_list); i; nextnode (i))
965 {
966 oa = (struct ospf6_area *) getdata (i);
967 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
968 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oa->lsdb);
969 }
970
971 for (i = listhead (o->area_list); i; nextnode (i))
972 {
973 oa = (struct ospf6_area *) getdata (i);
974 for (j = listhead (oa->if_list); j; nextnode (j))
975 {
976 oi = (struct ospf6_interface *) getdata (j);
977 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
978 oi->interface->name, oa->name, VNL, VNL);
979 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oi->lsdb);
980 }
981 }
982
983 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
984 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, o->lsdb);
985
986 vty_out (vty, "%s", VNL);
987 return CMD_SUCCESS;
988}
989
990ALIAS (show_ipv6_ospf6_database_adv_router_linkstate_id,
991 show_ipv6_ospf6_database_adv_router_linkstate_id_detail_cmd,
992 "show ipv6 ospf6 database adv-router A.B.C.D linkstate-id A.B.C.D "
993 "(detail|dump|internal)",
994 SHOW_STR
995 IPV6_STR
996 OSPF6_STR
997 "Display Link state database\n"
998 "Search by Advertising Router\n"
999 "Specify Advertising Router as IPv4 address notation\n"
1000 "Search by Link state ID\n"
1001 "Specify Link state ID as IPv4 address notation\n"
1002 "Display details of LSAs\n"
1003 "Dump LSAs\n"
1004 "Display LSA's internal information\n"
1005 );
1006
508e53e2 1007DEFUN (show_ipv6_ospf6_database_type_id_router,
1008 show_ipv6_ospf6_database_type_id_router_cmd,
1009 "show ipv6 ospf6 database "
1010 "(router|network|inter-prefix|inter-router|as-external|"
1011 "group-membership|type-7|link|intra-prefix) A.B.C.D A.B.C.D",
1012 SHOW_STR
1013 IPV6_STR
1014 OSPF6_STR
1015 "Display Link state database\n"
1016 "Display Router LSAs\n"
1017 "Display Network LSAs\n"
1018 "Display Inter-Area-Prefix LSAs\n"
1019 "Display Inter-Area-Router LSAs\n"
1020 "Display As-External LSAs\n"
1021 "Display Group-Membership LSAs\n"
1022 "Display Type-7 LSAs\n"
1023 "Display Link LSAs\n"
1024 "Display Intra-Area-Prefix LSAs\n"
1025 "Specify Link state ID as IPv4 address notation\n"
1026 "Specify Advertising Router as IPv4 address notation\n"
1027 )
718e3744 1028{
049207c3 1029 int level;
508e53e2 1030 listnode i, j;
1031 struct ospf6 *o = ospf6;
049207c3 1032 struct ospf6_area *oa;
1033 struct ospf6_interface *oi;
508e53e2 1034 u_int16_t type = 0;
1035 u_int32_t id = 0;
049207c3 1036 u_int32_t adv_router = 0;
508e53e2 1037
1038 OSPF6_CMD_CHECK_RUNNING ();
718e3744 1039
049207c3 1040 type = parse_type_spec (argc, argv);
1041 argc--;
1042 argv++;
508e53e2 1043
049207c3 1044 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
508e53e2 1045 {
1046 vty_out (vty, "Link state ID is not parsable: %s%s",
049207c3 1047 argv[0], VNL);
508e53e2 1048 return CMD_SUCCESS;
718e3744 1049 }
1050
049207c3 1051 argc--;
1052 argv++;
1053
1054 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
718e3744 1055 {
508e53e2 1056 vty_out (vty, "Advertising Router is not parsable: %s%s",
049207c3 1057 argv[0], VNL);
508e53e2 1058 return CMD_SUCCESS;
1059 }
1060
049207c3 1061 argc--;
1062 argv++;
1063 level = parse_show_level (argc, argv);
1064
1065 switch (OSPF6_LSA_SCOPE (type))
508e53e2 1066 {
6452df09 1067 case OSPF6_SCOPE_AREA:
049207c3 1068 for (i = listhead (o->area_list); i; nextnode (i))
1069 {
1070 oa = (struct ospf6_area *) getdata (i);
1071 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1072 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);
1073 }
1074 break;
1075
6452df09 1076 case OSPF6_SCOPE_LINKLOCAL:
049207c3 1077 for (i = listhead (o->area_list); i; nextnode (i))
1078 {
1079 oa = (struct ospf6_area *) getdata (i);
1080 for (j = listhead (oa->if_list); j; nextnode (j))
1081 {
1082 oi = (struct ospf6_interface *) getdata (j);
1083 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1084 oi->interface->name, oa->name, VNL, VNL);
1085 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);
1086 }
1087 }
1088 break;
1089
6452df09 1090 case OSPF6_SCOPE_AS:
049207c3 1091 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1092 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, o->lsdb);
1093 break;
1094
1095 default:
1096 assert (0);
1097 break;
718e3744 1098 }
1099
049207c3 1100 vty_out (vty, "%s", VNL);
718e3744 1101 return CMD_SUCCESS;
1102}
1103
508e53e2 1104ALIAS (show_ipv6_ospf6_database_type_id_router,
1105 show_ipv6_ospf6_database_type_id_router_detail_cmd,
1106 "show ipv6 ospf6 database "
1107 "(router|network|inter-prefix|inter-router|as-external|"
1108 "group-membership|type-7|link|intra-prefix) A.B.C.D A.B.C.D "
1109 "(dump|internal)",
1110 SHOW_STR
1111 IPV6_STR
1112 OSPF6_STR
1113 "Display Link state database\n"
1114 "Display Router LSAs\n"
1115 "Display Network LSAs\n"
1116 "Display Inter-Area-Prefix LSAs\n"
1117 "Display Inter-Area-Router LSAs\n"
1118 "Display As-External LSAs\n"
1119 "Display Group-Membership LSAs\n"
1120 "Display Type-7 LSAs\n"
1121 "Display Link LSAs\n"
1122 "Display Intra-Area-Prefix LSAs\n"
1123 "Specify Link state ID as IPv4 address notation\n"
1124 "Specify Advertising Router as IPv4 address notation\n"
049207c3 1125 "Dump LSAs\n"
1126 "Display LSA's internal information\n"
1127 );
1128
1129DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id,
1130 show_ipv6_ospf6_database_type_adv_router_linkstate_id_cmd,
1131 "show ipv6 ospf6 database "
1132 "(router|network|inter-prefix|inter-router|as-external|"
1133 "group-membership|type-7|link|intra-prefix) "
1134 "adv-router A.B.C.D linkstate-id A.B.C.D",
1135 SHOW_STR
1136 IPV6_STR
1137 OSPF6_STR
1138 "Display Link state database\n"
1139 "Display Router LSAs\n"
1140 "Display Network LSAs\n"
1141 "Display Inter-Area-Prefix LSAs\n"
1142 "Display Inter-Area-Router LSAs\n"
1143 "Display As-External LSAs\n"
1144 "Display Group-Membership LSAs\n"
1145 "Display Type-7 LSAs\n"
1146 "Display Link LSAs\n"
1147 "Display Intra-Area-Prefix LSAs\n"
1148 "Search by Advertising Router\n"
1149 "Specify Advertising Router as IPv4 address notation\n"
1150 "Search by Link state ID\n"
1151 "Specify Link state ID as IPv4 address notation\n"
1152 )
1153{
1154 int level;
1155 listnode i, j;
1156 struct ospf6 *o = ospf6;
1157 struct ospf6_area *oa;
1158 struct ospf6_interface *oi;
1159 u_int16_t type = 0;
1160 u_int32_t id = 0;
1161 u_int32_t adv_router = 0;
1162
1163 OSPF6_CMD_CHECK_RUNNING ();
1164
1165 type = parse_type_spec (argc, argv);
1166 argc--;
1167 argv++;
1168
1169 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
1170 {
1171 vty_out (vty, "Advertising Router is not parsable: %s%s",
1172 argv[0], VNL);
1173 return CMD_SUCCESS;
1174 }
1175
1176 argc--;
1177 argv++;
1178
1179 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
1180 {
1181 vty_out (vty, "Link state ID is not parsable: %s%s",
1182 argv[0], VNL);
1183 return CMD_SUCCESS;
1184 }
1185
1186 argc--;
1187 argv++;
1188 level = parse_show_level (argc, argv);
1189
1190 switch (OSPF6_LSA_SCOPE (type))
1191 {
6452df09 1192 case OSPF6_SCOPE_AREA:
049207c3 1193 for (i = listhead (o->area_list); i; nextnode (i))
1194 {
1195 oa = (struct ospf6_area *) getdata (i);
1196 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1197 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);
1198 }
1199 break;
1200
6452df09 1201 case OSPF6_SCOPE_LINKLOCAL:
049207c3 1202 for (i = listhead (o->area_list); i; nextnode (i))
1203 {
1204 oa = (struct ospf6_area *) getdata (i);
1205 for (j = listhead (oa->if_list); j; nextnode (j))
1206 {
1207 oi = (struct ospf6_interface *) getdata (j);
1208 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1209 oi->interface->name, oa->name, VNL, VNL);
1210 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);
1211 }
1212 }
1213 break;
1214
6452df09 1215 case OSPF6_SCOPE_AS:
049207c3 1216 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1217 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, o->lsdb);
1218 break;
1219
1220 default:
1221 assert (0);
1222 break;
1223 }
1224
1225 vty_out (vty, "%s", VNL);
1226 return CMD_SUCCESS;
1227}
1228
1229ALIAS (show_ipv6_ospf6_database_type_adv_router_linkstate_id,
1230 show_ipv6_ospf6_database_type_adv_router_linkstate_id_detail_cmd,
1231 "show ipv6 ospf6 database "
1232 "(router|network|inter-prefix|inter-router|as-external|"
1233 "group-membership|type-7|link|intra-prefix) "
1234 "adv-router A.B.C.D linkstate-id A.B.C.D "
1235 "(dump|internal)",
1236 SHOW_STR
1237 IPV6_STR
1238 OSPF6_STR
1239 "Display Link state database\n"
1240 "Display Router LSAs\n"
1241 "Display Network LSAs\n"
1242 "Display Inter-Area-Prefix LSAs\n"
1243 "Display Inter-Area-Router LSAs\n"
1244 "Display As-External LSAs\n"
1245 "Display Group-Membership LSAs\n"
1246 "Display Type-7 LSAs\n"
1247 "Display Link LSAs\n"
1248 "Display Intra-Area-Prefix LSAs\n"
1249 "Search by Advertising Router\n"
1250 "Specify Advertising Router as IPv4 address notation\n"
1251 "Search by Link state ID\n"
1252 "Specify Link state ID as IPv4 address notation\n"
508e53e2 1253 "Dump LSAs\n"
1254 "Display LSA's internal information\n"
1255 );
1256
1257DEFUN (show_ipv6_ospf6_database_self_originated,
1258 show_ipv6_ospf6_database_self_originated_cmd,
1259 "show ipv6 ospf6 database self-originated",
1260 SHOW_STR
1261 IPV6_STR
1262 OSPF6_STR
508e53e2 1263 "Display Self-originated LSAs\n"
1264 )
718e3744 1265{
049207c3 1266 int level;
508e53e2 1267 listnode i, j;
1268 struct ospf6 *o = ospf6;
049207c3 1269 struct ospf6_area *oa;
1270 struct ospf6_interface *oi;
1271 u_int32_t adv_router = 0;
718e3744 1272
508e53e2 1273 OSPF6_CMD_CHECK_RUNNING ();
1274
049207c3 1275 level = parse_show_level (argc, argv);
718e3744 1276
049207c3 1277 adv_router = o->router_id;
718e3744 1278
508e53e2 1279 for (i = listhead (o->area_list); i; nextnode (i))
1280 {
049207c3 1281 oa = (struct ospf6_area *) getdata (i);
1282 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1283 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oa->lsdb);
508e53e2 1284 }
049207c3 1285
508e53e2 1286 for (i = listhead (o->area_list); i; nextnode (i))
718e3744 1287 {
049207c3 1288 oa = (struct ospf6_area *) getdata (i);
508e53e2 1289 for (j = listhead (oa->if_list); j; nextnode (j))
1290 {
049207c3 1291 oi = (struct ospf6_interface *) getdata (j);
1292 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1293 oi->interface->name, oa->name, VNL, VNL);
1294 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oi->lsdb);
508e53e2 1295 }
718e3744 1296 }
1297
049207c3 1298 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1299 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, o->lsdb);
1300
1301 vty_out (vty, "%s", VNL);
718e3744 1302 return CMD_SUCCESS;
1303}
1304
508e53e2 1305ALIAS (show_ipv6_ospf6_database_self_originated,
1306 show_ipv6_ospf6_database_self_originated_detail_cmd,
1307 "show ipv6 ospf6 database self-originated "
1308 "(detail|dump|internal)",
1309 SHOW_STR
1310 IPV6_STR
1311 OSPF6_STR
508e53e2 1312 "Display Self-originated LSAs\n"
1313 "Display details of LSAs\n"
1314 "Dump LSAs\n"
1315 "Display LSA's internal information\n"
049207c3 1316 )
508e53e2 1317
1318DEFUN (show_ipv6_ospf6_database_type_self_originated,
1319 show_ipv6_ospf6_database_type_self_originated_cmd,
1320 "show ipv6 ospf6 database "
1321 "(router|network|inter-prefix|inter-router|as-external|"
1322 "group-membership|type-7|link|intra-prefix) self-originated",
1323 SHOW_STR
1324 IPV6_STR
1325 OSPF6_STR
1326 "Display Link state database\n"
1327 "Display Router LSAs\n"
1328 "Display Network LSAs\n"
1329 "Display Inter-Area-Prefix LSAs\n"
1330 "Display Inter-Area-Router LSAs\n"
1331 "Display As-External LSAs\n"
1332 "Display Group-Membership LSAs\n"
1333 "Display Type-7 LSAs\n"
1334 "Display Link LSAs\n"
1335 "Display Intra-Area-Prefix LSAs\n"
1336 "Display Self-originated LSAs\n"
1337 )
718e3744 1338{
049207c3 1339 int level;
508e53e2 1340 listnode i, j;
1341 struct ospf6 *o = ospf6;
049207c3 1342 struct ospf6_area *oa;
1343 struct ospf6_interface *oi;
508e53e2 1344 u_int16_t type = 0;
049207c3 1345 u_int32_t adv_router = 0;
718e3744 1346
508e53e2 1347 OSPF6_CMD_CHECK_RUNNING ();
718e3744 1348
049207c3 1349 type = parse_type_spec (argc, argv);
1350 argc--;
1351 argv++;
1352 level = parse_show_level (argc, argv);
1353
1354 adv_router = o->router_id;
1355
1356 switch (OSPF6_LSA_SCOPE (type))
718e3744 1357 {
6452df09 1358 case OSPF6_SCOPE_AREA:
049207c3 1359 for (i = listhead (o->area_list); i; nextnode (i))
1360 {
1361 oa = (struct ospf6_area *) getdata (i);
1362 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1363 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oa->lsdb);
1364 }
1365 break;
1366
6452df09 1367 case OSPF6_SCOPE_LINKLOCAL:
049207c3 1368 for (i = listhead (o->area_list); i; nextnode (i))
1369 {
1370 oa = (struct ospf6_area *) getdata (i);
1371 for (j = listhead (oa->if_list); j; nextnode (j))
1372 {
1373 oi = (struct ospf6_interface *) getdata (j);
1374 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1375 oi->interface->name, oa->name, VNL, VNL);
1376 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oi->lsdb);
1377 }
1378 }
1379 break;
1380
6452df09 1381 case OSPF6_SCOPE_AS:
049207c3 1382 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1383 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, o->lsdb);
1384 break;
1385
1386 default:
1387 assert (0);
1388 break;
718e3744 1389 }
508e53e2 1390
049207c3 1391 vty_out (vty, "%s", VNL);
1392 return CMD_SUCCESS;
1393}
508e53e2 1394
049207c3 1395ALIAS (show_ipv6_ospf6_database_type_self_originated,
1396 show_ipv6_ospf6_database_type_self_originated_detail_cmd,
1397 "show ipv6 ospf6 database "
1398 "(router|network|inter-prefix|inter-router|as-external|"
1399 "group-membership|type-7|link|intra-prefix) self-originated "
1400 "(detail|dump|internal)",
1401 SHOW_STR
1402 IPV6_STR
1403 OSPF6_STR
1404 "Display Link state database\n"
1405 "Display Router LSAs\n"
1406 "Display Network LSAs\n"
1407 "Display Inter-Area-Prefix LSAs\n"
1408 "Display Inter-Area-Router LSAs\n"
1409 "Display As-External LSAs\n"
1410 "Display Group-Membership LSAs\n"
1411 "Display Type-7 LSAs\n"
1412 "Display Link LSAs\n"
1413 "Display Intra-Area-Prefix LSAs\n"
1414 "Display Self-originated LSAs\n"
1415 "Display details of LSAs\n"
1416 "Dump LSAs\n"
1417 "Display LSA's internal information\n"
1418 );
508e53e2 1419
049207c3 1420DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id,
1421 show_ipv6_ospf6_database_type_self_originated_linkstate_id_cmd,
1422 "show ipv6 ospf6 database "
1423 "(router|network|inter-prefix|inter-router|as-external|"
1424 "group-membership|type-7|link|intra-prefix) self-originated "
1425 "linkstate-id A.B.C.D",
1426 SHOW_STR
1427 IPV6_STR
1428 OSPF6_STR
1429 "Display Link state database\n"
1430 "Display Router LSAs\n"
1431 "Display Network LSAs\n"
1432 "Display Inter-Area-Prefix LSAs\n"
1433 "Display Inter-Area-Router LSAs\n"
1434 "Display As-External LSAs\n"
1435 "Display Group-Membership LSAs\n"
1436 "Display Type-7 LSAs\n"
1437 "Display Link LSAs\n"
1438 "Display Intra-Area-Prefix LSAs\n"
1439 "Display Self-originated LSAs\n"
1440 "Search by Link state ID\n"
1441 "Specify Link state ID as IPv4 address notation\n"
1442 )
1443{
1444 int level;
1445 listnode i, j;
1446 struct ospf6 *o = ospf6;
1447 struct ospf6_area *oa;
1448 struct ospf6_interface *oi;
1449 u_int16_t type = 0;
1450 u_int32_t adv_router = 0;
1451 u_int32_t id = 0;
1452
1453 OSPF6_CMD_CHECK_RUNNING ();
1454
1455 type = parse_type_spec (argc, argv);
1456 argc--;
1457 argv++;
1458
6452df09 1459 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
718e3744 1460 {
049207c3 1461 vty_out (vty, "Link State ID is not parsable: %s%s",
1462 argv[0], VNL);
1463 return CMD_SUCCESS;
718e3744 1464 }
049207c3 1465
1466 argc--;
1467 argv++;
1468 level = parse_show_level (argc, argv);
1469
1470 adv_router = o->router_id;
1471
1472 switch (OSPF6_LSA_SCOPE (type))
718e3744 1473 {
6452df09 1474 case OSPF6_SCOPE_AREA:
049207c3 1475 for (i = listhead (o->area_list); i; nextnode (i))
1476 {
1477 oa = (struct ospf6_area *) getdata (i);
1478 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1479 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);
1480 }
1481 break;
1482
6452df09 1483 case OSPF6_SCOPE_LINKLOCAL:
049207c3 1484 for (i = listhead (o->area_list); i; nextnode (i))
1485 {
1486 oa = (struct ospf6_area *) getdata (i);
1487 for (j = listhead (oa->if_list); j; nextnode (j))
1488 {
1489 oi = (struct ospf6_interface *) getdata (j);
1490 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1491 oi->interface->name, oa->name, VNL, VNL);
1492 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);
1493 }
1494 }
1495 break;
1496
6452df09 1497 case OSPF6_SCOPE_AS:
049207c3 1498 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1499 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, o->lsdb);
1500 break;
1501
1502 default:
1503 assert (0);
1504 break;
718e3744 1505 }
718e3744 1506
049207c3 1507 vty_out (vty, "%s", VNL);
718e3744 1508 return CMD_SUCCESS;
1509}
718e3744 1510
049207c3 1511ALIAS (show_ipv6_ospf6_database_type_self_originated_linkstate_id,
1512 show_ipv6_ospf6_database_type_self_originated_linkstate_id_detail_cmd,
508e53e2 1513 "show ipv6 ospf6 database "
1514 "(router|network|inter-prefix|inter-router|as-external|"
1515 "group-membership|type-7|link|intra-prefix) self-originated "
049207c3 1516 "linkstate-id A.B.C.D (detail|dump|internal)",
508e53e2 1517 SHOW_STR
1518 IPV6_STR
1519 OSPF6_STR
1520 "Display Link state database\n"
1521 "Display Router LSAs\n"
1522 "Display Network LSAs\n"
1523 "Display Inter-Area-Prefix LSAs\n"
1524 "Display Inter-Area-Router LSAs\n"
1525 "Display As-External LSAs\n"
1526 "Display Group-Membership LSAs\n"
1527 "Display Type-7 LSAs\n"
1528 "Display Link LSAs\n"
1529 "Display Intra-Area-Prefix LSAs\n"
1530 "Display Self-originated LSAs\n"
049207c3 1531 "Search by Link state ID\n"
1532 "Specify Link state ID as IPv4 address notation\n"
508e53e2 1533 "Display details of LSAs\n"
1534 "Dump LSAs\n"
1535 "Display LSA's internal information\n"
1536 );
1537
1538DEFUN (show_ipv6_ospf6_database_type_id_self_originated,
1539 show_ipv6_ospf6_database_type_id_self_originated_cmd,
1540 "show ipv6 ospf6 database "
1541 "(router|network|inter-prefix|inter-router|as-external|"
1542 "group-membership|type-7|link|intra-prefix) A.B.C.D self-originated",
1543 SHOW_STR
1544 IPV6_STR
1545 OSPF6_STR
1546 "Display Link state database\n"
1547 "Display Router LSAs\n"
1548 "Display Network LSAs\n"
1549 "Display Inter-Area-Prefix LSAs\n"
1550 "Display Inter-Area-Router LSAs\n"
1551 "Display As-External LSAs\n"
1552 "Display Group-Membership LSAs\n"
1553 "Display Type-7 LSAs\n"
1554 "Display Link LSAs\n"
1555 "Display Intra-Area-Prefix LSAs\n"
1556 "Specify Link state ID as IPv4 address notation\n"
1557 "Display Self-originated LSAs\n"
1558 )
718e3744 1559{
049207c3 1560 int level;
508e53e2 1561 listnode i, j;
1562 struct ospf6 *o = ospf6;
049207c3 1563 struct ospf6_area *oa;
1564 struct ospf6_interface *oi;
508e53e2 1565 u_int16_t type = 0;
049207c3 1566 u_int32_t adv_router = 0;
508e53e2 1567 u_int32_t id = 0;
718e3744 1568
508e53e2 1569 OSPF6_CMD_CHECK_RUNNING ();
718e3744 1570
049207c3 1571 type = parse_type_spec (argc, argv);
1572 argc--;
1573 argv++;
508e53e2 1574
6452df09 1575 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
508e53e2 1576 {
1577 vty_out (vty, "Link State ID is not parsable: %s%s",
049207c3 1578 argv[0], VNL);
508e53e2 1579 return CMD_SUCCESS;
1580 }
718e3744 1581
049207c3 1582 argc--;
1583 argv++;
1584 level = parse_show_level (argc, argv);
1585
1586 adv_router = o->router_id;
1587
1588 switch (OSPF6_LSA_SCOPE (type))
718e3744 1589 {
6452df09 1590 case OSPF6_SCOPE_AREA:
049207c3 1591 for (i = listhead (o->area_list); i; nextnode (i))
1592 {
1593 oa = (struct ospf6_area *) getdata (i);
1594 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1595 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);
1596 }
1597 break;
1598
6452df09 1599 case OSPF6_SCOPE_LINKLOCAL:
049207c3 1600 for (i = listhead (o->area_list); i; nextnode (i))
1601 {
1602 oa = (struct ospf6_area *) getdata (i);
1603 for (j = listhead (oa->if_list); j; nextnode (j))
1604 {
1605 oi = (struct ospf6_interface *) getdata (j);
1606 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1607 oi->interface->name, oa->name, VNL, VNL);
1608 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);
1609 }
1610 }
1611 break;
1612
6452df09 1613 case OSPF6_SCOPE_AS:
049207c3 1614 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1615 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, o->lsdb);
1616 break;
1617
1618 default:
1619 assert (0);
1620 break;
718e3744 1621 }
508e53e2 1622
049207c3 1623 vty_out (vty, "%s", VNL);
508e53e2 1624 return CMD_SUCCESS;
718e3744 1625}
1626
508e53e2 1627ALIAS (show_ipv6_ospf6_database_type_id_self_originated,
1628 show_ipv6_ospf6_database_type_id_self_originated_detail_cmd,
1629 "show ipv6 ospf6 database "
1630 "(router|network|inter-prefix|inter-router|as-external|"
1631 "group-membership|type-7|link|intra-prefix) A.B.C.D self-originated "
049207c3 1632 "(detail|dump|internal)",
508e53e2 1633 SHOW_STR
1634 IPV6_STR
1635 OSPF6_STR
1636 "Display Link state database\n"
1637 "Display Router LSAs\n"
1638 "Display Network LSAs\n"
1639 "Display Inter-Area-Prefix LSAs\n"
1640 "Display Inter-Area-Router LSAs\n"
1641 "Display As-External LSAs\n"
1642 "Display Group-Membership LSAs\n"
1643 "Display Type-7 LSAs\n"
1644 "Display Link LSAs\n"
1645 "Display Intra-Area-Prefix LSAs\n"
508e53e2 1646 "Display Self-originated LSAs\n"
049207c3 1647 "Search by Link state ID\n"
1648 "Specify Link state ID as IPv4 address notation\n"
508e53e2 1649 "Display details of LSAs\n"
1650 "Dump LSAs\n"
1651 "Display LSA's internal information\n"
1652 );
1653
6452df09 1654
1655DEFUN (show_ipv6_ospf6_border_routers,
1656 show_ipv6_ospf6_border_routers_cmd,
1657 "show ipv6 ospf6 border-routers",
1658 SHOW_STR
1659 IP6_STR
1660 OSPF6_STR
1661 "Display routing table for ABR and ASBR\n"
1662 )
1663{
1664 u_int32_t adv_router;
1665 void (*showfunc) (struct vty *, struct ospf6_route *);
1666 struct ospf6_route *ro;
1667 struct prefix prefix;
1668
1669 OSPF6_CMD_CHECK_RUNNING ();
1670
1671 if (argc && ! strcmp ("detail", argv[0]))
1672 {
1673 showfunc = ospf6_route_show_detail;
1674 argc--;
1675 argv++;
1676 }
1677 else
1678 showfunc = ospf6_brouter_show;
1679
1680 if (argc)
1681 {
1682 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
1683 {
1684 vty_out (vty, "Router ID is not parsable: %s%s", argv[0], VNL);
1685 return CMD_SUCCESS;
1686 }
1687
1688 ospf6_linkstate_prefix (adv_router, 0, &prefix);
1689 ro = ospf6_route_lookup (&prefix, ospf6->brouter_table);
1690 ospf6_route_show_detail (vty, ro);
1691 return CMD_SUCCESS;
1692 }
1693
1694 if (showfunc == ospf6_brouter_show)
1695 ospf6_brouter_show_header (vty);
1696
1697 for (ro = ospf6_route_head (ospf6->brouter_table); ro;
1698 ro = ospf6_route_next (ro))
1699 (*showfunc) (vty, ro);
1700
1701 return CMD_SUCCESS;
1702}
1703
1704ALIAS (show_ipv6_ospf6_border_routers,
1705 show_ipv6_ospf6_border_routers_detail_cmd,
1706 "show ipv6 ospf6 border-routers (A.B.C.D|detail)",
1707 SHOW_STR
1708 IP6_STR
1709 OSPF6_STR
1710 "Display routing table for ABR and ASBR\n"
1711 "Specify Router-ID\n"
1712 "Display Detail\n"
1713 );
1714
1715
718e3744 1716/* Install ospf related commands. */
1717void
1718ospf6_init ()
1719{
508e53e2 1720 install_node (&debug_node, config_write_ospf6_debug);
1721
1722 install_element_ospf6_debug_message ();
1723 install_element_ospf6_debug_lsa ();
1724 install_element_ospf6_debug_interface ();
1725 install_element_ospf6_debug_neighbor ();
1726 install_element_ospf6_debug_zebra ();
1727 install_element_ospf6_debug_spf ();
1728 install_element_ospf6_debug_route ();
1729 install_element_ospf6_debug_asbr ();
6452df09 1730 install_element_ospf6_debug_abr ();
718e3744 1731
718e3744 1732 install_element (VIEW_NODE, &show_version_ospf6_cmd);
718e3744 1733 install_element (ENABLE_NODE, &show_version_ospf6_cmd);
049207c3 1734
6452df09 1735 install_element (VIEW_NODE, &show_ipv6_ospf6_border_routers_cmd);
1736 install_element (VIEW_NODE, &show_ipv6_ospf6_border_routers_detail_cmd);
1737 install_element (ENABLE_NODE, &show_ipv6_ospf6_border_routers_cmd);
1738 install_element (ENABLE_NODE, &show_ipv6_ospf6_border_routers_detail_cmd);
1739
049207c3 1740#define INSTALL(n,c) \
1741 install_element (n ## _NODE, &show_ipv6_ospf6_ ## c);
1742
1743 INSTALL (VIEW, database_cmd);
1744 INSTALL (VIEW, database_detail_cmd);
1745 INSTALL (VIEW, database_type_cmd);
1746 INSTALL (VIEW, database_type_detail_cmd);
1747 INSTALL (VIEW, database_id_cmd);
1748 INSTALL (VIEW, database_id_detail_cmd);
1749 INSTALL (VIEW, database_linkstate_id_cmd);
1750 INSTALL (VIEW, database_linkstate_id_detail_cmd);
1751 INSTALL (VIEW, database_router_cmd);
1752 INSTALL (VIEW, database_router_detail_cmd);
1753 INSTALL (VIEW, database_adv_router_cmd);
1754 INSTALL (VIEW, database_adv_router_detail_cmd);
1755 INSTALL (VIEW, database_type_id_cmd);
1756 INSTALL (VIEW, database_type_id_detail_cmd);
1757 INSTALL (VIEW, database_type_linkstate_id_cmd);
1758 INSTALL (VIEW, database_type_linkstate_id_detail_cmd);
1759 INSTALL (VIEW, database_type_router_cmd);
1760 INSTALL (VIEW, database_type_router_detail_cmd);
1761 INSTALL (VIEW, database_type_adv_router_cmd);
1762 INSTALL (VIEW, database_type_adv_router_detail_cmd);
1763 INSTALL (VIEW, database_adv_router_linkstate_id_cmd);
1764 INSTALL (VIEW, database_adv_router_linkstate_id_detail_cmd);
1765 INSTALL (VIEW, database_id_router_cmd);
1766 INSTALL (VIEW, database_id_router_detail_cmd);
1767 INSTALL (VIEW, database_type_id_router_cmd);
1768 INSTALL (VIEW, database_type_id_router_detail_cmd);
1769 INSTALL (VIEW, database_type_adv_router_linkstate_id_cmd);
1770 INSTALL (VIEW, database_type_adv_router_linkstate_id_detail_cmd);
1771 INSTALL (VIEW, database_self_originated_cmd);
1772 INSTALL (VIEW, database_self_originated_detail_cmd);
1773 INSTALL (VIEW, database_type_self_originated_cmd);
1774 INSTALL (VIEW, database_type_self_originated_detail_cmd);
1775 INSTALL (VIEW, database_type_id_self_originated_cmd);
1776 INSTALL (VIEW, database_type_id_self_originated_detail_cmd);
1777 INSTALL (VIEW, database_type_self_originated_linkstate_id_cmd);
1778 INSTALL (VIEW, database_type_self_originated_linkstate_id_detail_cmd);
1779 INSTALL (VIEW, database_type_id_self_originated_cmd);
1780 INSTALL (VIEW, database_type_id_self_originated_detail_cmd);
1781
1782 INSTALL (ENABLE, database_cmd);
1783 INSTALL (ENABLE, database_detail_cmd);
1784 INSTALL (ENABLE, database_type_cmd);
1785 INSTALL (ENABLE, database_type_detail_cmd);
1786 INSTALL (ENABLE, database_id_cmd);
1787 INSTALL (ENABLE, database_id_detail_cmd);
1788 INSTALL (ENABLE, database_linkstate_id_cmd);
1789 INSTALL (ENABLE, database_linkstate_id_detail_cmd);
1790 INSTALL (ENABLE, database_router_cmd);
1791 INSTALL (ENABLE, database_router_detail_cmd);
1792 INSTALL (ENABLE, database_adv_router_cmd);
1793 INSTALL (ENABLE, database_adv_router_detail_cmd);
1794 INSTALL (ENABLE, database_type_id_cmd);
1795 INSTALL (ENABLE, database_type_id_detail_cmd);
1796 INSTALL (ENABLE, database_type_linkstate_id_cmd);
1797 INSTALL (ENABLE, database_type_linkstate_id_detail_cmd);
1798 INSTALL (ENABLE, database_type_router_cmd);
1799 INSTALL (ENABLE, database_type_router_detail_cmd);
1800 INSTALL (ENABLE, database_type_adv_router_cmd);
1801 INSTALL (ENABLE, database_type_adv_router_detail_cmd);
1802 INSTALL (ENABLE, database_adv_router_linkstate_id_cmd);
1803 INSTALL (ENABLE, database_adv_router_linkstate_id_detail_cmd);
1804 INSTALL (ENABLE, database_id_router_cmd);
1805 INSTALL (ENABLE, database_id_router_detail_cmd);
1806 INSTALL (ENABLE, database_type_id_router_cmd);
1807 INSTALL (ENABLE, database_type_id_router_detail_cmd);
1808 INSTALL (ENABLE, database_type_adv_router_linkstate_id_cmd);
1809 INSTALL (ENABLE, database_type_adv_router_linkstate_id_detail_cmd);
1810 INSTALL (ENABLE, database_self_originated_cmd);
1811 INSTALL (ENABLE, database_self_originated_detail_cmd);
1812 INSTALL (ENABLE, database_type_self_originated_cmd);
1813 INSTALL (ENABLE, database_type_self_originated_detail_cmd);
1814 INSTALL (ENABLE, database_type_id_self_originated_cmd);
1815 INSTALL (ENABLE, database_type_id_self_originated_detail_cmd);
1816 INSTALL (ENABLE, database_type_self_originated_linkstate_id_cmd);
1817 INSTALL (ENABLE, database_type_self_originated_linkstate_id_detail_cmd);
1818 INSTALL (ENABLE, database_type_id_self_originated_cmd);
1819 INSTALL (ENABLE, database_type_id_self_originated_detail_cmd);
718e3744 1820
1821 ospf6_top_init ();
1822 ospf6_area_init ();
1823 ospf6_interface_init ();
1824 ospf6_neighbor_init ();
1825 ospf6_zebra_init ();
1826
508e53e2 1827 ospf6_lsa_init ();
718e3744 1828 ospf6_spf_init ();
718e3744 1829 ospf6_intra_init ();
718e3744 1830 ospf6_asbr_init ();
049207c3 1831 ospf6_abr_init ();
718e3744 1832
508e53e2 1833 /* Make ospf protocol socket. */
1834 ospf6_serv_sock ();
1835 thread_add_read (master, ospf6_receive, NULL, ospf6_sock);
718e3744 1836}
1837
718e3744 1838