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