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