2 * Copyright (C) 2003 Yasuhiro Ohara
4 * This file is part of GNU Zebra.
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
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.
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.
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"
43 #include "ospf6_abr.h"
44 #include "ospf6_flood.h"
48 #include "ospf6_snmp.h"
51 char ospf6_daemon_version
[] = OSPF6_DAEMON_VERSION
;
59 route_prev (struct route_node
*node
)
61 struct route_node
*end
;
62 struct route_node
*prev
= NULL
;
67 route_lock_node (node
);
71 node
= route_next (node
);
74 route_unlock_node (node
);
78 route_unlock_node (end
);
80 route_lock_node (prev
);
86 /* show database functions */
87 DEFUN (show_version_ospf6
,
88 show_version_ospf6_cmd
,
91 "Displays ospf6d version\n"
94 vty_out (vty
, "Zebra OSPF6d Version: %s%s",
95 ospf6_daemon_version
, VNL
);
100 struct cmd_node debug_node
=
108 config_write_ospf6_debug (struct vty
*vty
)
110 config_write_ospf6_debug_message (vty
);
111 config_write_ospf6_debug_lsa (vty
);
112 config_write_ospf6_debug_zebra (vty
);
113 config_write_ospf6_debug_interface (vty
);
114 config_write_ospf6_debug_neighbor (vty
);
115 config_write_ospf6_debug_spf (vty
);
116 config_write_ospf6_debug_route (vty
);
117 config_write_ospf6_debug_brouter (vty
);
118 config_write_ospf6_debug_asbr (vty
);
119 config_write_ospf6_debug_abr (vty
);
120 config_write_ospf6_debug_flood (vty
);
121 vty_out (vty
, "!%s", VNL
);
125 #define AREA_LSDB_TITLE_FORMAT \
126 "%s Area Scoped Link State Database (Area %s)%s%s"
127 #define IF_LSDB_TITLE_FORMAT \
128 "%s I/F Scoped Link State Database (I/F %s in Area %s)%s%s"
129 #define AS_LSDB_TITLE_FORMAT \
130 "%s AS Scoped Link State Database%s%s"
133 parse_show_level (int argc
, const char *argv
[])
138 if (! strncmp (argv
[0], "de", 2))
139 level
= OSPF6_LSDB_SHOW_LEVEL_DETAIL
;
140 else if (! strncmp (argv
[0], "du", 2))
141 level
= OSPF6_LSDB_SHOW_LEVEL_DUMP
;
142 else if (! strncmp (argv
[0], "in", 2))
143 level
= OSPF6_LSDB_SHOW_LEVEL_INTERNAL
;
146 level
= OSPF6_LSDB_SHOW_LEVEL_NORMAL
;
151 parse_type_spec (int argc
, const char *argv
[])
155 if (! strcmp (argv
[0], "router"))
156 type
= htons (OSPF6_LSTYPE_ROUTER
);
157 else if (! strcmp (argv
[0], "network"))
158 type
= htons (OSPF6_LSTYPE_NETWORK
);
159 else if (! strcmp (argv
[0], "as-external"))
160 type
= htons (OSPF6_LSTYPE_AS_EXTERNAL
);
161 else if (! strcmp (argv
[0], "intra-prefix"))
162 type
= htons (OSPF6_LSTYPE_INTRA_PREFIX
);
163 else if (! strcmp (argv
[0], "inter-router"))
164 type
= htons (OSPF6_LSTYPE_INTER_ROUTER
);
165 else if (! strcmp (argv
[0], "inter-prefix"))
166 type
= htons (OSPF6_LSTYPE_INTER_PREFIX
);
167 else if (! strcmp (argv
[0], "link"))
168 type
= htons (OSPF6_LSTYPE_LINK
);
172 DEFUN (show_ipv6_ospf6_database
,
173 show_ipv6_ospf6_database_cmd
,
174 "show ipv6 ospf6 database",
178 "Display Link state database\n"
182 struct listnode
*i
, *j
;
183 struct ospf6
*o
= ospf6
;
184 struct ospf6_area
*oa
;
185 struct ospf6_interface
*oi
;
187 OSPF6_CMD_CHECK_RUNNING ();
189 level
= parse_show_level (argc
, argv
);
191 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
193 vty_out (vty
, AREA_LSDB_TITLE_FORMAT
, VNL
, oa
->name
, VNL
, VNL
);
194 ospf6_lsdb_show (vty
, level
, NULL
, NULL
, NULL
, oa
->lsdb
);
197 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
199 for (ALL_LIST_ELEMENTS_RO (oa
->if_list
, j
, oi
))
201 vty_out (vty
, IF_LSDB_TITLE_FORMAT
, VNL
,
202 oi
->interface
->name
, oa
->name
, VNL
, VNL
);
203 ospf6_lsdb_show (vty
, level
, NULL
, NULL
, NULL
, oi
->lsdb
);
207 vty_out (vty
, AS_LSDB_TITLE_FORMAT
, VNL
, VNL
, VNL
);
208 ospf6_lsdb_show (vty
, level
, NULL
, NULL
, NULL
, o
->lsdb
);
210 vty_out (vty
, "%s", VNL
);
214 ALIAS (show_ipv6_ospf6_database
,
215 show_ipv6_ospf6_database_detail_cmd
,
216 "show ipv6 ospf6 database (detail|dump|internal)",
220 "Display Link state database\n"
221 "Display details of LSAs\n"
223 "Display LSA's internal information\n"
226 DEFUN (show_ipv6_ospf6_database_type
,
227 show_ipv6_ospf6_database_type_cmd
,
228 "show ipv6 ospf6 database "
229 "(router|network|inter-prefix|inter-router|as-external|"
230 "group-membership|type-7|link|intra-prefix)",
234 "Display Link state database\n"
235 "Display Router LSAs\n"
236 "Display Network LSAs\n"
237 "Display Inter-Area-Prefix LSAs\n"
238 "Display Inter-Area-Router LSAs\n"
239 "Display As-External LSAs\n"
240 "Display Group-Membership LSAs\n"
241 "Display Type-7 LSAs\n"
242 "Display Link LSAs\n"
243 "Display Intra-Area-Prefix LSAs\n"
247 struct listnode
*i
, *j
;
248 struct ospf6
*o
= ospf6
;
249 struct ospf6_area
*oa
;
250 struct ospf6_interface
*oi
;
253 OSPF6_CMD_CHECK_RUNNING ();
255 type
= parse_type_spec (argc
, argv
);
258 level
= parse_show_level (argc
, argv
);
260 switch (OSPF6_LSA_SCOPE (type
))
262 case OSPF6_SCOPE_AREA
:
263 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
265 vty_out (vty
, AREA_LSDB_TITLE_FORMAT
, VNL
, oa
->name
, VNL
, VNL
);
266 ospf6_lsdb_show (vty
, level
, &type
, NULL
, NULL
, oa
->lsdb
);
270 case OSPF6_SCOPE_LINKLOCAL
:
271 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
273 for (ALL_LIST_ELEMENTS_RO (oa
->if_list
, j
, oi
))
275 vty_out (vty
, IF_LSDB_TITLE_FORMAT
, VNL
,
276 oi
->interface
->name
, oa
->name
, VNL
, VNL
);
277 ospf6_lsdb_show (vty
, level
, &type
, NULL
, NULL
, oi
->lsdb
);
283 vty_out (vty
, AS_LSDB_TITLE_FORMAT
, VNL
, VNL
, VNL
);
284 ospf6_lsdb_show (vty
, level
, &type
, NULL
, NULL
, o
->lsdb
);
292 vty_out (vty
, "%s", VNL
);
296 ALIAS (show_ipv6_ospf6_database_type
,
297 show_ipv6_ospf6_database_type_detail_cmd
,
298 "show ipv6 ospf6 database "
299 "(router|network|inter-prefix|inter-router|as-external|"
300 "group-membership|type-7|link|intra-prefix) "
301 "(detail|dump|internal)",
305 "Display Link state database\n"
306 "Display Router LSAs\n"
307 "Display Network LSAs\n"
308 "Display Inter-Area-Prefix LSAs\n"
309 "Display Inter-Area-Router LSAs\n"
310 "Display As-External LSAs\n"
311 "Display Group-Membership LSAs\n"
312 "Display Type-7 LSAs\n"
313 "Display Link LSAs\n"
314 "Display Intra-Area-Prefix LSAs\n"
315 "Display details of LSAs\n"
317 "Display LSA's internal information\n"
320 DEFUN (show_ipv6_ospf6_database_id
,
321 show_ipv6_ospf6_database_id_cmd
,
322 "show ipv6 ospf6 database * A.B.C.D",
326 "Display Link state database\n"
327 "Any Link state Type\n"
328 "Specify Link state ID as IPv4 address notation\n"
332 struct listnode
*i
, *j
;
333 struct ospf6
*o
= ospf6
;
334 struct ospf6_area
*oa
;
335 struct ospf6_interface
*oi
;
338 OSPF6_CMD_CHECK_RUNNING ();
340 if ((inet_pton (AF_INET
, argv
[0], &id
)) != 1)
342 vty_out (vty
, "Link State ID is not parsable: %s%s",
349 level
= parse_show_level (argc
, argv
);
351 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
353 vty_out (vty
, AREA_LSDB_TITLE_FORMAT
, VNL
, oa
->name
, VNL
, VNL
);
354 ospf6_lsdb_show (vty
, level
, NULL
, &id
, NULL
, oa
->lsdb
);
357 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
359 for (ALL_LIST_ELEMENTS_RO (oa
->if_list
, j
, oi
))
361 vty_out (vty
, IF_LSDB_TITLE_FORMAT
, VNL
,
362 oi
->interface
->name
, oa
->name
, VNL
, VNL
);
363 ospf6_lsdb_show (vty
, level
, NULL
, &id
, NULL
, oi
->lsdb
);
367 vty_out (vty
, AS_LSDB_TITLE_FORMAT
, VNL
, VNL
, VNL
);
368 ospf6_lsdb_show (vty
, level
, NULL
, &id
, NULL
, o
->lsdb
);
370 vty_out (vty
, "%s", VNL
);
374 ALIAS (show_ipv6_ospf6_database_id
,
375 show_ipv6_ospf6_database_id_detail_cmd
,
376 "show ipv6 ospf6 database * A.B.C.D "
377 "(detail|dump|internal)",
381 "Display Link state database\n"
382 "Any Link state Type\n"
383 "Specify Link state ID as IPv4 address notation\n"
384 "Display details of LSAs\n"
386 "Display LSA's internal information\n"
389 ALIAS (show_ipv6_ospf6_database_id
,
390 show_ipv6_ospf6_database_linkstate_id_cmd
,
391 "show ipv6 ospf6 database linkstate-id A.B.C.D",
395 "Display Link state database\n"
396 "Search by Link state ID\n"
397 "Specify Link state ID as IPv4 address notation\n"
400 ALIAS (show_ipv6_ospf6_database_id
,
401 show_ipv6_ospf6_database_linkstate_id_detail_cmd
,
402 "show ipv6 ospf6 database linkstate-id A.B.C.D "
403 "(detail|dump|internal)",
407 "Display Link state database\n"
408 "Search by Link state ID\n"
409 "Specify Link state ID as IPv4 address notation\n"
410 "Display details of LSAs\n"
412 "Display LSA's internal information\n"
415 DEFUN (show_ipv6_ospf6_database_router
,
416 show_ipv6_ospf6_database_router_cmd
,
417 "show ipv6 ospf6 database * * A.B.C.D",
421 "Display Link state database\n"
422 "Any Link state Type\n"
423 "Any Link state ID\n"
424 "Specify Advertising Router as IPv4 address notation\n"
428 struct listnode
*i
, *j
;
429 struct ospf6
*o
= ospf6
;
430 struct ospf6_area
*oa
;
431 struct ospf6_interface
*oi
;
432 u_int32_t adv_router
= 0;
434 OSPF6_CMD_CHECK_RUNNING ();
436 if ((inet_pton (AF_INET
, argv
[0], &adv_router
)) != 1)
438 vty_out (vty
, "Advertising Router is not parsable: %s%s",
445 level
= parse_show_level (argc
, argv
);
447 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
449 vty_out (vty
, AREA_LSDB_TITLE_FORMAT
, VNL
, oa
->name
, VNL
, VNL
);
450 ospf6_lsdb_show (vty
, level
, NULL
, NULL
, &adv_router
, oa
->lsdb
);
453 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
455 for (ALL_LIST_ELEMENTS_RO (oa
->if_list
, j
, oi
))
457 vty_out (vty
, IF_LSDB_TITLE_FORMAT
, VNL
,
458 oi
->interface
->name
, oa
->name
, VNL
, VNL
);
459 ospf6_lsdb_show (vty
, level
, NULL
, NULL
, &adv_router
, oi
->lsdb
);
463 vty_out (vty
, AS_LSDB_TITLE_FORMAT
, VNL
, VNL
, VNL
);
464 ospf6_lsdb_show (vty
, level
, NULL
, NULL
, &adv_router
, o
->lsdb
);
466 vty_out (vty
, "%s", VNL
);
470 ALIAS (show_ipv6_ospf6_database_router
,
471 show_ipv6_ospf6_database_router_detail_cmd
,
472 "show ipv6 ospf6 database * * A.B.C.D "
473 "(detail|dump|internal)",
477 "Display Link state database\n"
478 "Any Link state Type\n"
479 "Any Link state ID\n"
480 "Specify Advertising Router as IPv4 address notation\n"
481 "Display details of LSAs\n"
483 "Display LSA's internal information\n"
486 ALIAS (show_ipv6_ospf6_database_router
,
487 show_ipv6_ospf6_database_adv_router_cmd
,
488 "show ipv6 ospf6 database adv-router A.B.C.D",
492 "Display Link state database\n"
493 "Search by Advertising Router\n"
494 "Specify Advertising Router as IPv4 address notation\n"
497 ALIAS (show_ipv6_ospf6_database_router
,
498 show_ipv6_ospf6_database_adv_router_detail_cmd
,
499 "show ipv6 ospf6 database adv-router A.B.C.D "
500 "(detail|dump|internal)",
504 "Display Link state database\n"
505 "Search by Advertising Router\n"
506 "Specify Advertising Router as IPv4 address notation\n"
507 "Display details of LSAs\n"
509 "Display LSA's internal information\n"
512 DEFUN (show_ipv6_ospf6_database_type_id
,
513 show_ipv6_ospf6_database_type_id_cmd
,
514 "show ipv6 ospf6 database "
515 "(router|network|inter-prefix|inter-router|as-external|"
516 "group-membership|type-7|link|intra-prefix) A.B.C.D",
520 "Display Link state database\n"
521 "Display Router LSAs\n"
522 "Display Network LSAs\n"
523 "Display Inter-Area-Prefix LSAs\n"
524 "Display Inter-Area-Router LSAs\n"
525 "Display As-External LSAs\n"
526 "Display Group-Membership LSAs\n"
527 "Display Type-7 LSAs\n"
528 "Display Link LSAs\n"
529 "Display Intra-Area-Prefix LSAs\n"
530 "Specify Link state ID as IPv4 address notation\n"
534 struct listnode
*i
, *j
;
535 struct ospf6
*o
= ospf6
;
536 struct ospf6_area
*oa
;
537 struct ospf6_interface
*oi
;
541 OSPF6_CMD_CHECK_RUNNING ();
543 type
= parse_type_spec (argc
, argv
);
547 if ((inet_pton (AF_INET
, argv
[0], &id
)) != 1)
549 vty_out (vty
, "Link state ID is not parsable: %s%s",
556 level
= parse_show_level (argc
, argv
);
558 switch (OSPF6_LSA_SCOPE (type
))
560 case OSPF6_SCOPE_AREA
:
561 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
563 vty_out (vty
, AREA_LSDB_TITLE_FORMAT
, VNL
, oa
->name
, VNL
, VNL
);
564 ospf6_lsdb_show (vty
, level
, &type
, &id
, NULL
, oa
->lsdb
);
568 case OSPF6_SCOPE_LINKLOCAL
:
569 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
571 for (ALL_LIST_ELEMENTS_RO (oa
->if_list
, j
, oi
))
573 vty_out (vty
, IF_LSDB_TITLE_FORMAT
, VNL
,
574 oi
->interface
->name
, oa
->name
, VNL
, VNL
);
575 ospf6_lsdb_show (vty
, level
, &type
, &id
, NULL
, oi
->lsdb
);
581 vty_out (vty
, AS_LSDB_TITLE_FORMAT
, VNL
, VNL
, VNL
);
582 ospf6_lsdb_show (vty
, level
, &type
, &id
, NULL
, o
->lsdb
);
590 vty_out (vty
, "%s", VNL
);
594 ALIAS (show_ipv6_ospf6_database_type_id
,
595 show_ipv6_ospf6_database_type_id_detail_cmd
,
596 "show ipv6 ospf6 database "
597 "(router|network|inter-prefix|inter-router|as-external|"
598 "group-membership|type-7|link|intra-prefix) A.B.C.D "
599 "(detail|dump|internal)",
603 "Display Link state database\n"
604 "Display Router LSAs\n"
605 "Display Network LSAs\n"
606 "Display Inter-Area-Prefix LSAs\n"
607 "Display Inter-Area-Router LSAs\n"
608 "Display As-External LSAs\n"
609 "Display Group-Membership LSAs\n"
610 "Display Type-7 LSAs\n"
611 "Display Link LSAs\n"
612 "Display Intra-Area-Prefix LSAs\n"
613 "Specify Link state ID as IPv4 address notation\n"
614 "Display details of LSAs\n"
616 "Display LSA's internal information\n"
619 ALIAS (show_ipv6_ospf6_database_type_id
,
620 show_ipv6_ospf6_database_type_linkstate_id_cmd
,
621 "show ipv6 ospf6 database "
622 "(router|network|inter-prefix|inter-router|as-external|"
623 "group-membership|type-7|link|intra-prefix) linkstate-id A.B.C.D",
627 "Display Link state database\n"
628 "Display Router LSAs\n"
629 "Display Network LSAs\n"
630 "Display Inter-Area-Prefix LSAs\n"
631 "Display Inter-Area-Router LSAs\n"
632 "Display As-External LSAs\n"
633 "Display Group-Membership LSAs\n"
634 "Display Type-7 LSAs\n"
635 "Display Link LSAs\n"
636 "Display Intra-Area-Prefix LSAs\n"
637 "Search by Link state ID\n"
638 "Specify Link state ID as IPv4 address notation\n"
641 ALIAS (show_ipv6_ospf6_database_type_id
,
642 show_ipv6_ospf6_database_type_linkstate_id_detail_cmd
,
643 "show ipv6 ospf6 database "
644 "(router|network|inter-prefix|inter-router|as-external|"
645 "group-membership|type-7|link|intra-prefix) linkstate-id A.B.C.D "
646 "(detail|dump|internal)",
650 "Display Link state database\n"
651 "Display Router LSAs\n"
652 "Display Network LSAs\n"
653 "Display Inter-Area-Prefix LSAs\n"
654 "Display Inter-Area-Router LSAs\n"
655 "Display As-External LSAs\n"
656 "Display Group-Membership LSAs\n"
657 "Display Type-7 LSAs\n"
658 "Display Link LSAs\n"
659 "Display Intra-Area-Prefix LSAs\n"
660 "Search by Link state ID\n"
661 "Specify Link state ID as IPv4 address notation\n"
662 "Display details of LSAs\n"
664 "Display LSA's internal information\n"
667 DEFUN (show_ipv6_ospf6_database_type_router
,
668 show_ipv6_ospf6_database_type_router_cmd
,
669 "show ipv6 ospf6 database "
670 "(router|network|inter-prefix|inter-router|as-external|"
671 "group-membership|type-7|link|intra-prefix) * A.B.C.D",
675 "Display Link state database\n"
676 "Display Router LSAs\n"
677 "Display Network LSAs\n"
678 "Display Inter-Area-Prefix LSAs\n"
679 "Display Inter-Area-Router LSAs\n"
680 "Display As-External LSAs\n"
681 "Display Group-Membership LSAs\n"
682 "Display Type-7 LSAs\n"
683 "Display Link LSAs\n"
684 "Display Intra-Area-Prefix LSAs\n"
685 "Any Link state ID\n"
686 "Specify Advertising Router as IPv4 address notation\n"
690 struct listnode
*i
, *j
;
691 struct ospf6
*o
= ospf6
;
692 struct ospf6_area
*oa
;
693 struct ospf6_interface
*oi
;
695 u_int32_t adv_router
= 0;
697 OSPF6_CMD_CHECK_RUNNING ();
699 type
= parse_type_spec (argc
, argv
);
703 if ((inet_pton (AF_INET
, argv
[0], &adv_router
)) != 1)
705 vty_out (vty
, "Advertising Router is not parsable: %s%s",
712 level
= parse_show_level (argc
, argv
);
714 switch (OSPF6_LSA_SCOPE (type
))
716 case OSPF6_SCOPE_AREA
:
717 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
719 vty_out (vty
, AREA_LSDB_TITLE_FORMAT
, VNL
, oa
->name
, VNL
, VNL
);
720 ospf6_lsdb_show (vty
, level
, &type
, NULL
, &adv_router
, oa
->lsdb
);
724 case OSPF6_SCOPE_LINKLOCAL
:
725 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
727 for (ALL_LIST_ELEMENTS_RO (oa
->if_list
, j
, oi
))
729 vty_out (vty
, IF_LSDB_TITLE_FORMAT
, VNL
,
730 oi
->interface
->name
, oa
->name
, VNL
, VNL
);
731 ospf6_lsdb_show (vty
, level
, &type
, NULL
, &adv_router
, oi
->lsdb
);
737 vty_out (vty
, AS_LSDB_TITLE_FORMAT
, VNL
, VNL
, VNL
);
738 ospf6_lsdb_show (vty
, level
, &type
, NULL
, &adv_router
, o
->lsdb
);
746 vty_out (vty
, "%s", VNL
);
750 ALIAS (show_ipv6_ospf6_database_type_router
,
751 show_ipv6_ospf6_database_type_router_detail_cmd
,
752 "show ipv6 ospf6 database "
753 "(router|network|inter-prefix|inter-router|as-external|"
754 "group-membership|type-7|link|intra-prefix) * A.B.C.D "
755 "(detail|dump|internal)",
759 "Display Link state database\n"
760 "Display Router LSAs\n"
761 "Display Network LSAs\n"
762 "Display Inter-Area-Prefix LSAs\n"
763 "Display Inter-Area-Router LSAs\n"
764 "Display As-External LSAs\n"
765 "Display Group-Membership LSAs\n"
766 "Display Type-7 LSAs\n"
767 "Display Link LSAs\n"
768 "Display Intra-Area-Prefix LSAs\n"
769 "Any Link state ID\n"
770 "Specify Advertising Router as IPv4 address notation\n"
771 "Display details of LSAs\n"
773 "Display LSA's internal information\n"
776 ALIAS (show_ipv6_ospf6_database_type_router
,
777 show_ipv6_ospf6_database_type_adv_router_cmd
,
778 "show ipv6 ospf6 database "
779 "(router|network|inter-prefix|inter-router|as-external|"
780 "group-membership|type-7|link|intra-prefix) adv-router A.B.C.D",
784 "Display Link state database\n"
785 "Display Router LSAs\n"
786 "Display Network LSAs\n"
787 "Display Inter-Area-Prefix LSAs\n"
788 "Display Inter-Area-Router LSAs\n"
789 "Display As-External LSAs\n"
790 "Display Group-Membership LSAs\n"
791 "Display Type-7 LSAs\n"
792 "Display Link LSAs\n"
793 "Display Intra-Area-Prefix LSAs\n"
794 "Search by Advertising Router\n"
795 "Specify Advertising Router as IPv4 address notation\n"
798 ALIAS (show_ipv6_ospf6_database_type_router
,
799 show_ipv6_ospf6_database_type_adv_router_detail_cmd
,
800 "show ipv6 ospf6 database "
801 "(router|network|inter-prefix|inter-router|as-external|"
802 "group-membership|type-7|link|intra-prefix) adv-router A.B.C.D "
803 "(detail|dump|internal)",
807 "Display Link state database\n"
808 "Display Router LSAs\n"
809 "Display Network LSAs\n"
810 "Display Inter-Area-Prefix LSAs\n"
811 "Display Inter-Area-Router LSAs\n"
812 "Display As-External LSAs\n"
813 "Display Group-Membership LSAs\n"
814 "Display Type-7 LSAs\n"
815 "Display Link LSAs\n"
816 "Display Intra-Area-Prefix LSAs\n"
817 "Search by Advertising Router\n"
818 "Specify Advertising Router as IPv4 address notation\n"
819 "Display details of LSAs\n"
821 "Display LSA's internal information\n"
824 DEFUN (show_ipv6_ospf6_database_id_router
,
825 show_ipv6_ospf6_database_id_router_cmd
,
826 "show ipv6 ospf6 database * A.B.C.D A.B.C.D",
830 "Display Link state database\n"
831 "Any Link state Type\n"
832 "Specify Link state ID as IPv4 address notation\n"
833 "Specify Advertising Router as IPv4 address notation\n"
837 struct listnode
*i
, *j
;
838 struct ospf6
*o
= ospf6
;
839 struct ospf6_area
*oa
;
840 struct ospf6_interface
*oi
;
842 u_int32_t adv_router
= 0;
844 OSPF6_CMD_CHECK_RUNNING ();
846 if ((inet_pton (AF_INET
, argv
[0], &id
)) != 1)
848 vty_out (vty
, "Link state ID is not parsable: %s%s",
856 if ((inet_pton (AF_INET
, argv
[0], &adv_router
)) != 1)
858 vty_out (vty
, "Advertising Router is not parsable: %s%s",
865 level
= parse_show_level (argc
, argv
);
867 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
869 vty_out (vty
, AREA_LSDB_TITLE_FORMAT
, VNL
, oa
->name
, VNL
, VNL
);
870 ospf6_lsdb_show (vty
, level
, NULL
, &id
, &adv_router
, oa
->lsdb
);
873 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
875 for (ALL_LIST_ELEMENTS_RO (oa
->if_list
, j
, oi
))
877 vty_out (vty
, IF_LSDB_TITLE_FORMAT
, VNL
,
878 oi
->interface
->name
, oa
->name
, VNL
, VNL
);
879 ospf6_lsdb_show (vty
, level
, NULL
, &id
, &adv_router
, oi
->lsdb
);
883 vty_out (vty
, AS_LSDB_TITLE_FORMAT
, VNL
, VNL
, VNL
);
884 ospf6_lsdb_show (vty
, level
, NULL
, &id
, &adv_router
, o
->lsdb
);
886 vty_out (vty
, "%s", VNL
);
890 ALIAS (show_ipv6_ospf6_database_id_router
,
891 show_ipv6_ospf6_database_id_router_detail_cmd
,
892 "show ipv6 ospf6 database * A.B.C.D A.B.C.D "
893 "(detail|dump|internal)",
897 "Display Link state database\n"
898 "Any Link state Type\n"
899 "Specify Link state ID as IPv4 address notation\n"
900 "Specify Advertising Router as IPv4 address notation\n"
901 "Display details of LSAs\n"
903 "Display LSA's internal information\n"
906 DEFUN (show_ipv6_ospf6_database_adv_router_linkstate_id
,
907 show_ipv6_ospf6_database_adv_router_linkstate_id_cmd
,
908 "show ipv6 ospf6 database adv-router A.B.C.D linkstate-id A.B.C.D",
912 "Display Link state database\n"
913 "Search by Advertising Router\n"
914 "Specify Advertising Router as IPv4 address notation\n"
915 "Search by Link state ID\n"
916 "Specify Link state ID as IPv4 address notation\n"
920 struct listnode
*i
, *j
;
921 struct ospf6
*o
= ospf6
;
922 struct ospf6_area
*oa
;
923 struct ospf6_interface
*oi
;
925 u_int32_t adv_router
= 0;
927 OSPF6_CMD_CHECK_RUNNING ();
929 if ((inet_pton (AF_INET
, argv
[0], &adv_router
)) != 1)
931 vty_out (vty
, "Advertising Router is not parsable: %s%s",
939 if ((inet_pton (AF_INET
, argv
[0], &id
)) != 1)
941 vty_out (vty
, "Link state ID is not parsable: %s%s",
948 level
= parse_show_level (argc
, argv
);
950 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
952 vty_out (vty
, AREA_LSDB_TITLE_FORMAT
, VNL
, oa
->name
, VNL
, VNL
);
953 ospf6_lsdb_show (vty
, level
, NULL
, &id
, &adv_router
, oa
->lsdb
);
956 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
958 for (ALL_LIST_ELEMENTS_RO (oa
->if_list
, j
, oi
))
960 vty_out (vty
, IF_LSDB_TITLE_FORMAT
, VNL
,
961 oi
->interface
->name
, oa
->name
, VNL
, VNL
);
962 ospf6_lsdb_show (vty
, level
, NULL
, &id
, &adv_router
, oi
->lsdb
);
966 vty_out (vty
, AS_LSDB_TITLE_FORMAT
, VNL
, VNL
, VNL
);
967 ospf6_lsdb_show (vty
, level
, NULL
, &id
, &adv_router
, o
->lsdb
);
969 vty_out (vty
, "%s", VNL
);
973 ALIAS (show_ipv6_ospf6_database_adv_router_linkstate_id
,
974 show_ipv6_ospf6_database_adv_router_linkstate_id_detail_cmd
,
975 "show ipv6 ospf6 database adv-router A.B.C.D linkstate-id A.B.C.D "
976 "(detail|dump|internal)",
980 "Display Link state database\n"
981 "Search by Advertising Router\n"
982 "Specify Advertising Router as IPv4 address notation\n"
983 "Search by Link state ID\n"
984 "Specify Link state ID as IPv4 address notation\n"
985 "Display details of LSAs\n"
987 "Display LSA's internal information\n"
990 DEFUN (show_ipv6_ospf6_database_type_id_router
,
991 show_ipv6_ospf6_database_type_id_router_cmd
,
992 "show ipv6 ospf6 database "
993 "(router|network|inter-prefix|inter-router|as-external|"
994 "group-membership|type-7|link|intra-prefix) A.B.C.D A.B.C.D",
998 "Display Link state database\n"
999 "Display Router LSAs\n"
1000 "Display Network LSAs\n"
1001 "Display Inter-Area-Prefix LSAs\n"
1002 "Display Inter-Area-Router LSAs\n"
1003 "Display As-External LSAs\n"
1004 "Display Group-Membership LSAs\n"
1005 "Display Type-7 LSAs\n"
1006 "Display Link LSAs\n"
1007 "Display Intra-Area-Prefix LSAs\n"
1008 "Specify Link state ID as IPv4 address notation\n"
1009 "Specify Advertising Router as IPv4 address notation\n"
1013 struct listnode
*i
, *j
;
1014 struct ospf6
*o
= ospf6
;
1015 struct ospf6_area
*oa
;
1016 struct ospf6_interface
*oi
;
1019 u_int32_t adv_router
= 0;
1021 OSPF6_CMD_CHECK_RUNNING ();
1023 type
= parse_type_spec (argc
, argv
);
1027 if ((inet_pton (AF_INET
, argv
[0], &id
)) != 1)
1029 vty_out (vty
, "Link state ID is not parsable: %s%s",
1037 if ((inet_pton (AF_INET
, argv
[0], &adv_router
)) != 1)
1039 vty_out (vty
, "Advertising Router is not parsable: %s%s",
1046 level
= parse_show_level (argc
, argv
);
1048 switch (OSPF6_LSA_SCOPE (type
))
1050 case OSPF6_SCOPE_AREA
:
1051 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
1053 vty_out (vty
, AREA_LSDB_TITLE_FORMAT
, VNL
, oa
->name
, VNL
, VNL
);
1054 ospf6_lsdb_show (vty
, level
, &type
, &id
, &adv_router
, oa
->lsdb
);
1058 case OSPF6_SCOPE_LINKLOCAL
:
1059 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
1061 for (ALL_LIST_ELEMENTS_RO (oa
->if_list
, j
, oi
))
1063 vty_out (vty
, IF_LSDB_TITLE_FORMAT
, VNL
,
1064 oi
->interface
->name
, oa
->name
, VNL
, VNL
);
1065 ospf6_lsdb_show (vty
, level
, &type
, &id
, &adv_router
, oi
->lsdb
);
1070 case OSPF6_SCOPE_AS
:
1071 vty_out (vty
, AS_LSDB_TITLE_FORMAT
, VNL
, VNL
, VNL
);
1072 ospf6_lsdb_show (vty
, level
, &type
, &id
, &adv_router
, o
->lsdb
);
1080 vty_out (vty
, "%s", VNL
);
1084 ALIAS (show_ipv6_ospf6_database_type_id_router
,
1085 show_ipv6_ospf6_database_type_id_router_detail_cmd
,
1086 "show ipv6 ospf6 database "
1087 "(router|network|inter-prefix|inter-router|as-external|"
1088 "group-membership|type-7|link|intra-prefix) A.B.C.D A.B.C.D "
1093 "Display Link state database\n"
1094 "Display Router LSAs\n"
1095 "Display Network LSAs\n"
1096 "Display Inter-Area-Prefix LSAs\n"
1097 "Display Inter-Area-Router LSAs\n"
1098 "Display As-External LSAs\n"
1099 "Display Group-Membership LSAs\n"
1100 "Display Type-7 LSAs\n"
1101 "Display Link LSAs\n"
1102 "Display Intra-Area-Prefix LSAs\n"
1103 "Specify Link state ID as IPv4 address notation\n"
1104 "Specify Advertising Router as IPv4 address notation\n"
1106 "Display LSA's internal information\n"
1109 DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id
,
1110 show_ipv6_ospf6_database_type_adv_router_linkstate_id_cmd
,
1111 "show ipv6 ospf6 database "
1112 "(router|network|inter-prefix|inter-router|as-external|"
1113 "group-membership|type-7|link|intra-prefix) "
1114 "adv-router A.B.C.D linkstate-id A.B.C.D",
1118 "Display Link state database\n"
1119 "Display Router LSAs\n"
1120 "Display Network LSAs\n"
1121 "Display Inter-Area-Prefix LSAs\n"
1122 "Display Inter-Area-Router LSAs\n"
1123 "Display As-External LSAs\n"
1124 "Display Group-Membership LSAs\n"
1125 "Display Type-7 LSAs\n"
1126 "Display Link LSAs\n"
1127 "Display Intra-Area-Prefix LSAs\n"
1128 "Search by Advertising Router\n"
1129 "Specify Advertising Router as IPv4 address notation\n"
1130 "Search by Link state ID\n"
1131 "Specify Link state ID as IPv4 address notation\n"
1135 struct listnode
*i
, *j
;
1136 struct ospf6
*o
= ospf6
;
1137 struct ospf6_area
*oa
;
1138 struct ospf6_interface
*oi
;
1141 u_int32_t adv_router
= 0;
1143 OSPF6_CMD_CHECK_RUNNING ();
1145 type
= parse_type_spec (argc
, argv
);
1149 if ((inet_pton (AF_INET
, argv
[0], &adv_router
)) != 1)
1151 vty_out (vty
, "Advertising Router is not parsable: %s%s",
1159 if ((inet_pton (AF_INET
, argv
[0], &id
)) != 1)
1161 vty_out (vty
, "Link state ID is not parsable: %s%s",
1168 level
= parse_show_level (argc
, argv
);
1170 switch (OSPF6_LSA_SCOPE (type
))
1172 case OSPF6_SCOPE_AREA
:
1173 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
1175 vty_out (vty
, AREA_LSDB_TITLE_FORMAT
, VNL
, oa
->name
, VNL
, VNL
);
1176 ospf6_lsdb_show (vty
, level
, &type
, &id
, &adv_router
, oa
->lsdb
);
1180 case OSPF6_SCOPE_LINKLOCAL
:
1181 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
1183 for (ALL_LIST_ELEMENTS_RO (oa
->if_list
, j
, oi
))
1185 vty_out (vty
, IF_LSDB_TITLE_FORMAT
, VNL
,
1186 oi
->interface
->name
, oa
->name
, VNL
, VNL
);
1187 ospf6_lsdb_show (vty
, level
, &type
, &id
, &adv_router
, oi
->lsdb
);
1192 case OSPF6_SCOPE_AS
:
1193 vty_out (vty
, AS_LSDB_TITLE_FORMAT
, VNL
, VNL
, VNL
);
1194 ospf6_lsdb_show (vty
, level
, &type
, &id
, &adv_router
, o
->lsdb
);
1202 vty_out (vty
, "%s", VNL
);
1206 ALIAS (show_ipv6_ospf6_database_type_adv_router_linkstate_id
,
1207 show_ipv6_ospf6_database_type_adv_router_linkstate_id_detail_cmd
,
1208 "show ipv6 ospf6 database "
1209 "(router|network|inter-prefix|inter-router|as-external|"
1210 "group-membership|type-7|link|intra-prefix) "
1211 "adv-router A.B.C.D linkstate-id A.B.C.D "
1216 "Display Link state database\n"
1217 "Display Router LSAs\n"
1218 "Display Network LSAs\n"
1219 "Display Inter-Area-Prefix LSAs\n"
1220 "Display Inter-Area-Router LSAs\n"
1221 "Display As-External LSAs\n"
1222 "Display Group-Membership LSAs\n"
1223 "Display Type-7 LSAs\n"
1224 "Display Link LSAs\n"
1225 "Display Intra-Area-Prefix LSAs\n"
1226 "Search by Advertising Router\n"
1227 "Specify Advertising Router as IPv4 address notation\n"
1228 "Search by Link state ID\n"
1229 "Specify Link state ID as IPv4 address notation\n"
1231 "Display LSA's internal information\n"
1234 DEFUN (show_ipv6_ospf6_database_self_originated
,
1235 show_ipv6_ospf6_database_self_originated_cmd
,
1236 "show ipv6 ospf6 database self-originated",
1240 "Display Self-originated LSAs\n"
1244 struct listnode
*i
, *j
;
1245 struct ospf6
*o
= ospf6
;
1246 struct ospf6_area
*oa
;
1247 struct ospf6_interface
*oi
;
1248 u_int32_t adv_router
= 0;
1250 OSPF6_CMD_CHECK_RUNNING ();
1252 level
= parse_show_level (argc
, argv
);
1254 adv_router
= o
->router_id
;
1256 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
1258 vty_out (vty
, AREA_LSDB_TITLE_FORMAT
, VNL
, oa
->name
, VNL
, VNL
);
1259 ospf6_lsdb_show (vty
, level
, NULL
, NULL
, &adv_router
, oa
->lsdb
);
1262 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
1264 for (ALL_LIST_ELEMENTS_RO (oa
->if_list
, j
, oi
))
1266 vty_out (vty
, IF_LSDB_TITLE_FORMAT
, VNL
,
1267 oi
->interface
->name
, oa
->name
, VNL
, VNL
);
1268 ospf6_lsdb_show (vty
, level
, NULL
, NULL
, &adv_router
, oi
->lsdb
);
1272 vty_out (vty
, AS_LSDB_TITLE_FORMAT
, VNL
, VNL
, VNL
);
1273 ospf6_lsdb_show (vty
, level
, NULL
, NULL
, &adv_router
, o
->lsdb
);
1275 vty_out (vty
, "%s", VNL
);
1279 ALIAS (show_ipv6_ospf6_database_self_originated
,
1280 show_ipv6_ospf6_database_self_originated_detail_cmd
,
1281 "show ipv6 ospf6 database self-originated "
1282 "(detail|dump|internal)",
1286 "Display Self-originated LSAs\n"
1287 "Display details of LSAs\n"
1289 "Display LSA's internal information\n"
1292 DEFUN (show_ipv6_ospf6_database_type_self_originated
,
1293 show_ipv6_ospf6_database_type_self_originated_cmd
,
1294 "show ipv6 ospf6 database "
1295 "(router|network|inter-prefix|inter-router|as-external|"
1296 "group-membership|type-7|link|intra-prefix) self-originated",
1300 "Display Link state database\n"
1301 "Display Router LSAs\n"
1302 "Display Network LSAs\n"
1303 "Display Inter-Area-Prefix LSAs\n"
1304 "Display Inter-Area-Router LSAs\n"
1305 "Display As-External LSAs\n"
1306 "Display Group-Membership LSAs\n"
1307 "Display Type-7 LSAs\n"
1308 "Display Link LSAs\n"
1309 "Display Intra-Area-Prefix LSAs\n"
1310 "Display Self-originated LSAs\n"
1314 struct listnode
*i
, *j
;
1315 struct ospf6
*o
= ospf6
;
1316 struct ospf6_area
*oa
;
1317 struct ospf6_interface
*oi
;
1319 u_int32_t adv_router
= 0;
1321 OSPF6_CMD_CHECK_RUNNING ();
1323 type
= parse_type_spec (argc
, argv
);
1326 level
= parse_show_level (argc
, argv
);
1328 adv_router
= o
->router_id
;
1330 switch (OSPF6_LSA_SCOPE (type
))
1332 case OSPF6_SCOPE_AREA
:
1333 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
1335 vty_out (vty
, AREA_LSDB_TITLE_FORMAT
, VNL
, oa
->name
, VNL
, VNL
);
1336 ospf6_lsdb_show (vty
, level
, &type
, NULL
, &adv_router
, oa
->lsdb
);
1340 case OSPF6_SCOPE_LINKLOCAL
:
1341 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
1343 for (ALL_LIST_ELEMENTS_RO (oa
->if_list
, j
, oi
))
1345 vty_out (vty
, IF_LSDB_TITLE_FORMAT
, VNL
,
1346 oi
->interface
->name
, oa
->name
, VNL
, VNL
);
1347 ospf6_lsdb_show (vty
, level
, &type
, NULL
, &adv_router
, oi
->lsdb
);
1352 case OSPF6_SCOPE_AS
:
1353 vty_out (vty
, AS_LSDB_TITLE_FORMAT
, VNL
, VNL
, VNL
);
1354 ospf6_lsdb_show (vty
, level
, &type
, NULL
, &adv_router
, o
->lsdb
);
1362 vty_out (vty
, "%s", VNL
);
1366 ALIAS (show_ipv6_ospf6_database_type_self_originated
,
1367 show_ipv6_ospf6_database_type_self_originated_detail_cmd
,
1368 "show ipv6 ospf6 database "
1369 "(router|network|inter-prefix|inter-router|as-external|"
1370 "group-membership|type-7|link|intra-prefix) self-originated "
1371 "(detail|dump|internal)",
1375 "Display Link state database\n"
1376 "Display Router LSAs\n"
1377 "Display Network LSAs\n"
1378 "Display Inter-Area-Prefix LSAs\n"
1379 "Display Inter-Area-Router LSAs\n"
1380 "Display As-External LSAs\n"
1381 "Display Group-Membership LSAs\n"
1382 "Display Type-7 LSAs\n"
1383 "Display Link LSAs\n"
1384 "Display Intra-Area-Prefix LSAs\n"
1385 "Display Self-originated LSAs\n"
1386 "Display details of LSAs\n"
1388 "Display LSA's internal information\n"
1391 DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id
,
1392 show_ipv6_ospf6_database_type_self_originated_linkstate_id_cmd
,
1393 "show ipv6 ospf6 database "
1394 "(router|network|inter-prefix|inter-router|as-external|"
1395 "group-membership|type-7|link|intra-prefix) self-originated "
1396 "linkstate-id A.B.C.D",
1400 "Display Link state database\n"
1401 "Display Router LSAs\n"
1402 "Display Network LSAs\n"
1403 "Display Inter-Area-Prefix LSAs\n"
1404 "Display Inter-Area-Router LSAs\n"
1405 "Display As-External LSAs\n"
1406 "Display Group-Membership LSAs\n"
1407 "Display Type-7 LSAs\n"
1408 "Display Link LSAs\n"
1409 "Display Intra-Area-Prefix LSAs\n"
1410 "Display Self-originated LSAs\n"
1411 "Search by Link state ID\n"
1412 "Specify Link state ID as IPv4 address notation\n"
1416 struct listnode
*i
, *j
;
1417 struct ospf6
*o
= ospf6
;
1418 struct ospf6_area
*oa
;
1419 struct ospf6_interface
*oi
;
1421 u_int32_t adv_router
= 0;
1424 OSPF6_CMD_CHECK_RUNNING ();
1426 type
= parse_type_spec (argc
, argv
);
1430 if ((inet_pton (AF_INET
, argv
[0], &id
)) != 1)
1432 vty_out (vty
, "Link State ID is not parsable: %s%s",
1439 level
= parse_show_level (argc
, argv
);
1441 adv_router
= o
->router_id
;
1443 switch (OSPF6_LSA_SCOPE (type
))
1445 case OSPF6_SCOPE_AREA
:
1446 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
1448 vty_out (vty
, AREA_LSDB_TITLE_FORMAT
, VNL
, oa
->name
, VNL
, VNL
);
1449 ospf6_lsdb_show (vty
, level
, &type
, &id
, &adv_router
, oa
->lsdb
);
1453 case OSPF6_SCOPE_LINKLOCAL
:
1454 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
1456 for (ALL_LIST_ELEMENTS_RO (oa
->if_list
, j
, oi
))
1458 vty_out (vty
, IF_LSDB_TITLE_FORMAT
, VNL
,
1459 oi
->interface
->name
, oa
->name
, VNL
, VNL
);
1460 ospf6_lsdb_show (vty
, level
, &type
, &id
, &adv_router
, oi
->lsdb
);
1465 case OSPF6_SCOPE_AS
:
1466 vty_out (vty
, AS_LSDB_TITLE_FORMAT
, VNL
, VNL
, VNL
);
1467 ospf6_lsdb_show (vty
, level
, &type
, &id
, &adv_router
, o
->lsdb
);
1475 vty_out (vty
, "%s", VNL
);
1479 ALIAS (show_ipv6_ospf6_database_type_self_originated_linkstate_id
,
1480 show_ipv6_ospf6_database_type_self_originated_linkstate_id_detail_cmd
,
1481 "show ipv6 ospf6 database "
1482 "(router|network|inter-prefix|inter-router|as-external|"
1483 "group-membership|type-7|link|intra-prefix) self-originated "
1484 "linkstate-id A.B.C.D (detail|dump|internal)",
1488 "Display Link state database\n"
1489 "Display Router LSAs\n"
1490 "Display Network LSAs\n"
1491 "Display Inter-Area-Prefix LSAs\n"
1492 "Display Inter-Area-Router LSAs\n"
1493 "Display As-External LSAs\n"
1494 "Display Group-Membership LSAs\n"
1495 "Display Type-7 LSAs\n"
1496 "Display Link LSAs\n"
1497 "Display Intra-Area-Prefix LSAs\n"
1498 "Display Self-originated LSAs\n"
1499 "Search by Link state ID\n"
1500 "Specify Link state ID as IPv4 address notation\n"
1501 "Display details of LSAs\n"
1503 "Display LSA's internal information\n"
1506 DEFUN (show_ipv6_ospf6_database_type_id_self_originated
,
1507 show_ipv6_ospf6_database_type_id_self_originated_cmd
,
1508 "show ipv6 ospf6 database "
1509 "(router|network|inter-prefix|inter-router|as-external|"
1510 "group-membership|type-7|link|intra-prefix) A.B.C.D self-originated",
1514 "Display Link state database\n"
1515 "Display Router LSAs\n"
1516 "Display Network LSAs\n"
1517 "Display Inter-Area-Prefix LSAs\n"
1518 "Display Inter-Area-Router LSAs\n"
1519 "Display As-External LSAs\n"
1520 "Display Group-Membership LSAs\n"
1521 "Display Type-7 LSAs\n"
1522 "Display Link LSAs\n"
1523 "Display Intra-Area-Prefix LSAs\n"
1524 "Specify Link state ID as IPv4 address notation\n"
1525 "Display Self-originated LSAs\n"
1529 struct listnode
*i
, *j
;
1530 struct ospf6
*o
= ospf6
;
1531 struct ospf6_area
*oa
;
1532 struct ospf6_interface
*oi
;
1534 u_int32_t adv_router
= 0;
1537 OSPF6_CMD_CHECK_RUNNING ();
1539 type
= parse_type_spec (argc
, argv
);
1543 if ((inet_pton (AF_INET
, argv
[0], &id
)) != 1)
1545 vty_out (vty
, "Link State ID is not parsable: %s%s",
1552 level
= parse_show_level (argc
, argv
);
1554 adv_router
= o
->router_id
;
1556 switch (OSPF6_LSA_SCOPE (type
))
1558 case OSPF6_SCOPE_AREA
:
1559 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
1561 vty_out (vty
, AREA_LSDB_TITLE_FORMAT
, VNL
, oa
->name
, VNL
, VNL
);
1562 ospf6_lsdb_show (vty
, level
, &type
, &id
, &adv_router
, oa
->lsdb
);
1566 case OSPF6_SCOPE_LINKLOCAL
:
1567 for (ALL_LIST_ELEMENTS_RO (o
->area_list
, i
, oa
))
1569 for (ALL_LIST_ELEMENTS_RO (oa
->if_list
, j
, oi
))
1571 vty_out (vty
, IF_LSDB_TITLE_FORMAT
, VNL
,
1572 oi
->interface
->name
, oa
->name
, VNL
, VNL
);
1573 ospf6_lsdb_show (vty
, level
, &type
, &id
, &adv_router
, oi
->lsdb
);
1578 case OSPF6_SCOPE_AS
:
1579 vty_out (vty
, AS_LSDB_TITLE_FORMAT
, VNL
, VNL
, VNL
);
1580 ospf6_lsdb_show (vty
, level
, &type
, &id
, &adv_router
, o
->lsdb
);
1588 vty_out (vty
, "%s", VNL
);
1592 ALIAS (show_ipv6_ospf6_database_type_id_self_originated
,
1593 show_ipv6_ospf6_database_type_id_self_originated_detail_cmd
,
1594 "show ipv6 ospf6 database "
1595 "(router|network|inter-prefix|inter-router|as-external|"
1596 "group-membership|type-7|link|intra-prefix) A.B.C.D self-originated "
1597 "(detail|dump|internal)",
1601 "Display Link state database\n"
1602 "Display Router LSAs\n"
1603 "Display Network LSAs\n"
1604 "Display Inter-Area-Prefix LSAs\n"
1605 "Display Inter-Area-Router LSAs\n"
1606 "Display As-External LSAs\n"
1607 "Display Group-Membership LSAs\n"
1608 "Display Type-7 LSAs\n"
1609 "Display Link LSAs\n"
1610 "Display Intra-Area-Prefix LSAs\n"
1611 "Display Self-originated LSAs\n"
1612 "Search by Link state ID\n"
1613 "Specify Link state ID as IPv4 address notation\n"
1614 "Display details of LSAs\n"
1616 "Display LSA's internal information\n"
1620 DEFUN (show_ipv6_ospf6_border_routers
,
1621 show_ipv6_ospf6_border_routers_cmd
,
1622 "show ipv6 ospf6 border-routers",
1626 "Display routing table for ABR and ASBR\n"
1629 u_int32_t adv_router
;
1630 void (*showfunc
) (struct vty
*, struct ospf6_route
*);
1631 struct ospf6_route
*ro
;
1632 struct prefix prefix
;
1634 OSPF6_CMD_CHECK_RUNNING ();
1636 if (argc
&& ! strcmp ("detail", argv
[0]))
1638 showfunc
= ospf6_route_show_detail
;
1643 showfunc
= ospf6_brouter_show
;
1647 if ((inet_pton (AF_INET
, argv
[0], &adv_router
)) != 1)
1649 vty_out (vty
, "Router ID is not parsable: %s%s", argv
[0], VNL
);
1653 ospf6_linkstate_prefix (adv_router
, 0, &prefix
);
1654 ro
= ospf6_route_lookup (&prefix
, ospf6
->brouter_table
);
1655 ospf6_route_show_detail (vty
, ro
);
1659 if (showfunc
== ospf6_brouter_show
)
1660 ospf6_brouter_show_header (vty
);
1662 for (ro
= ospf6_route_head (ospf6
->brouter_table
); ro
;
1663 ro
= ospf6_route_next (ro
))
1664 (*showfunc
) (vty
, ro
);
1669 ALIAS (show_ipv6_ospf6_border_routers
,
1670 show_ipv6_ospf6_border_routers_detail_cmd
,
1671 "show ipv6 ospf6 border-routers (A.B.C.D|detail)",
1675 "Display routing table for ABR and ASBR\n"
1676 "Specify Router-ID\n"
1680 DEFUN (show_ipv6_ospf6_linkstate
,
1681 show_ipv6_ospf6_linkstate_cmd
,
1682 "show ipv6 ospf6 linkstate",
1686 "Display linkstate routing table\n"
1689 struct listnode
*node
;
1690 struct ospf6_area
*oa
;
1692 for (ALL_LIST_ELEMENTS_RO (ospf6
->area_list
, node
, oa
))
1694 vty_out (vty
, "%s SPF Result in Area %s%s%s",
1695 VNL
, oa
->name
, VNL
, VNL
);
1696 ospf6_linkstate_table_show (vty
, argc
, argv
, oa
->spf_table
);
1699 vty_out (vty
, "%s", VNL
);
1703 ALIAS (show_ipv6_ospf6_linkstate
,
1704 show_ipv6_ospf6_linkstate_router_cmd
,
1705 "show ipv6 ospf6 linkstate router A.B.C.D",
1709 "Display linkstate routing table\n"
1710 "Display Router Entry\n"
1711 "Specify Router ID as IPv4 address notation\n"
1714 ALIAS (show_ipv6_ospf6_linkstate
,
1715 show_ipv6_ospf6_linkstate_network_cmd
,
1716 "show ipv6 ospf6 linkstate network A.B.C.D A.B.C.D",
1720 "Display linkstate routing table\n"
1721 "Display Network Entry\n"
1722 "Specify Router ID as IPv4 address notation\n"
1723 "Specify Link state ID as IPv4 address notation\n"
1726 DEFUN (show_ipv6_ospf6_linkstate_detail
,
1727 show_ipv6_ospf6_linkstate_detail_cmd
,
1728 "show ipv6 ospf6 linkstate detail",
1732 "Display linkstate routing table\n"
1735 const char *sargv
[CMD_ARGC_MAX
];
1737 struct listnode
*node
;
1738 struct ospf6_area
*oa
;
1740 /* copy argv to sargv and then append "detail" */
1741 for (i
= 0; i
< argc
; i
++)
1744 sargv
[sargc
++] = "detail";
1745 sargv
[sargc
] = NULL
;
1747 for (ALL_LIST_ELEMENTS_RO (ospf6
->area_list
, node
, oa
))
1749 vty_out (vty
, "%s SPF Result in Area %s%s%s",
1750 VNL
, oa
->name
, VNL
, VNL
);
1751 ospf6_linkstate_table_show (vty
, sargc
, sargv
, oa
->spf_table
);
1754 vty_out (vty
, "%s", VNL
);
1758 /* Install ospf related commands. */
1764 ospf6_interface_init ();
1765 ospf6_neighbor_init ();
1766 ospf6_zebra_init ();
1770 ospf6_intra_init ();
1775 ospf6_snmp_init (master
);
1776 #endif /*HAVE_SNMP*/
1778 install_node (&debug_node
, config_write_ospf6_debug
);
1780 install_element_ospf6_debug_message ();
1781 install_element_ospf6_debug_lsa ();
1782 install_element_ospf6_debug_interface ();
1783 install_element_ospf6_debug_neighbor ();
1784 install_element_ospf6_debug_zebra ();
1785 install_element_ospf6_debug_spf ();
1786 install_element_ospf6_debug_route ();
1787 install_element_ospf6_debug_brouter ();
1788 install_element_ospf6_debug_asbr ();
1789 install_element_ospf6_debug_abr ();
1790 install_element_ospf6_debug_flood ();
1792 install_element (VIEW_NODE
, &show_version_ospf6_cmd
);
1793 install_element (ENABLE_NODE
, &show_version_ospf6_cmd
);
1795 install_element (VIEW_NODE
, &show_ipv6_ospf6_border_routers_cmd
);
1796 install_element (VIEW_NODE
, &show_ipv6_ospf6_border_routers_detail_cmd
);
1797 install_element (ENABLE_NODE
, &show_ipv6_ospf6_border_routers_cmd
);
1798 install_element (ENABLE_NODE
, &show_ipv6_ospf6_border_routers_detail_cmd
);
1800 install_element (VIEW_NODE
, &show_ipv6_ospf6_linkstate_cmd
);
1801 install_element (VIEW_NODE
, &show_ipv6_ospf6_linkstate_router_cmd
);
1802 install_element (VIEW_NODE
, &show_ipv6_ospf6_linkstate_network_cmd
);
1803 install_element (VIEW_NODE
, &show_ipv6_ospf6_linkstate_detail_cmd
);
1804 install_element (ENABLE_NODE
, &show_ipv6_ospf6_linkstate_cmd
);
1805 install_element (ENABLE_NODE
, &show_ipv6_ospf6_linkstate_router_cmd
);
1806 install_element (ENABLE_NODE
, &show_ipv6_ospf6_linkstate_network_cmd
);
1807 install_element (ENABLE_NODE
, &show_ipv6_ospf6_linkstate_detail_cmd
);
1809 #define INSTALL(n,c) \
1810 install_element (n ## _NODE, &show_ipv6_ospf6_ ## c)
1812 INSTALL (VIEW
, database_cmd
);
1813 INSTALL (VIEW
, database_detail_cmd
);
1814 INSTALL (VIEW
, database_type_cmd
);
1815 INSTALL (VIEW
, database_type_detail_cmd
);
1816 INSTALL (VIEW
, database_id_cmd
);
1817 INSTALL (VIEW
, database_id_detail_cmd
);
1818 INSTALL (VIEW
, database_linkstate_id_cmd
);
1819 INSTALL (VIEW
, database_linkstate_id_detail_cmd
);
1820 INSTALL (VIEW
, database_router_cmd
);
1821 INSTALL (VIEW
, database_router_detail_cmd
);
1822 INSTALL (VIEW
, database_adv_router_cmd
);
1823 INSTALL (VIEW
, database_adv_router_detail_cmd
);
1824 INSTALL (VIEW
, database_type_id_cmd
);
1825 INSTALL (VIEW
, database_type_id_detail_cmd
);
1826 INSTALL (VIEW
, database_type_linkstate_id_cmd
);
1827 INSTALL (VIEW
, database_type_linkstate_id_detail_cmd
);
1828 INSTALL (VIEW
, database_type_router_cmd
);
1829 INSTALL (VIEW
, database_type_router_detail_cmd
);
1830 INSTALL (VIEW
, database_type_adv_router_cmd
);
1831 INSTALL (VIEW
, database_type_adv_router_detail_cmd
);
1832 INSTALL (VIEW
, database_adv_router_linkstate_id_cmd
);
1833 INSTALL (VIEW
, database_adv_router_linkstate_id_detail_cmd
);
1834 INSTALL (VIEW
, database_id_router_cmd
);
1835 INSTALL (VIEW
, database_id_router_detail_cmd
);
1836 INSTALL (VIEW
, database_type_id_router_cmd
);
1837 INSTALL (VIEW
, database_type_id_router_detail_cmd
);
1838 INSTALL (VIEW
, database_type_adv_router_linkstate_id_cmd
);
1839 INSTALL (VIEW
, database_type_adv_router_linkstate_id_detail_cmd
);
1840 INSTALL (VIEW
, database_self_originated_cmd
);
1841 INSTALL (VIEW
, database_self_originated_detail_cmd
);
1842 INSTALL (VIEW
, database_type_self_originated_cmd
);
1843 INSTALL (VIEW
, database_type_self_originated_detail_cmd
);
1844 INSTALL (VIEW
, database_type_id_self_originated_cmd
);
1845 INSTALL (VIEW
, database_type_id_self_originated_detail_cmd
);
1846 INSTALL (VIEW
, database_type_self_originated_linkstate_id_cmd
);
1847 INSTALL (VIEW
, database_type_self_originated_linkstate_id_detail_cmd
);
1849 INSTALL (ENABLE
, database_cmd
);
1850 INSTALL (ENABLE
, database_detail_cmd
);
1851 INSTALL (ENABLE
, database_type_cmd
);
1852 INSTALL (ENABLE
, database_type_detail_cmd
);
1853 INSTALL (ENABLE
, database_id_cmd
);
1854 INSTALL (ENABLE
, database_id_detail_cmd
);
1855 INSTALL (ENABLE
, database_linkstate_id_cmd
);
1856 INSTALL (ENABLE
, database_linkstate_id_detail_cmd
);
1857 INSTALL (ENABLE
, database_router_cmd
);
1858 INSTALL (ENABLE
, database_router_detail_cmd
);
1859 INSTALL (ENABLE
, database_adv_router_cmd
);
1860 INSTALL (ENABLE
, database_adv_router_detail_cmd
);
1861 INSTALL (ENABLE
, database_type_id_cmd
);
1862 INSTALL (ENABLE
, database_type_id_detail_cmd
);
1863 INSTALL (ENABLE
, database_type_linkstate_id_cmd
);
1864 INSTALL (ENABLE
, database_type_linkstate_id_detail_cmd
);
1865 INSTALL (ENABLE
, database_type_router_cmd
);
1866 INSTALL (ENABLE
, database_type_router_detail_cmd
);
1867 INSTALL (ENABLE
, database_type_adv_router_cmd
);
1868 INSTALL (ENABLE
, database_type_adv_router_detail_cmd
);
1869 INSTALL (ENABLE
, database_adv_router_linkstate_id_cmd
);
1870 INSTALL (ENABLE
, database_adv_router_linkstate_id_detail_cmd
);
1871 INSTALL (ENABLE
, database_id_router_cmd
);
1872 INSTALL (ENABLE
, database_id_router_detail_cmd
);
1873 INSTALL (ENABLE
, database_type_id_router_cmd
);
1874 INSTALL (ENABLE
, database_type_id_router_detail_cmd
);
1875 INSTALL (ENABLE
, database_type_adv_router_linkstate_id_cmd
);
1876 INSTALL (ENABLE
, database_type_adv_router_linkstate_id_detail_cmd
);
1877 INSTALL (ENABLE
, database_self_originated_cmd
);
1878 INSTALL (ENABLE
, database_self_originated_detail_cmd
);
1879 INSTALL (ENABLE
, database_type_self_originated_cmd
);
1880 INSTALL (ENABLE
, database_type_self_originated_detail_cmd
);
1881 INSTALL (ENABLE
, database_type_id_self_originated_cmd
);
1882 INSTALL (ENABLE
, database_type_id_self_originated_detail_cmd
);
1883 INSTALL (ENABLE
, database_type_self_originated_linkstate_id_cmd
);
1884 INSTALL (ENABLE
, database_type_self_originated_linkstate_id_detail_cmd
);
1886 /* Make ospf protocol socket. */
1888 thread_add_read (master
, ospf6_receive
, NULL
, ospf6_sock
);