blob: 3c84fe658329d7442702fccd098e8216c4fc0af3 [file] [log] [blame]
paul718e3742002-12-13 20:15:29 +00001/*
hasso508e53e2004-05-18 18:57:06 +00002 * Copyright (C) 2003 Yasuhiro Ohara
paul718e3742002-12-13 20:15:29 +00003 *
4 * This file is part of GNU Zebra.
5 *
6 * GNU Zebra is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2, or (at your option) any
9 * later version.
10 *
11 * GNU Zebra is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with GNU Zebra; see the file COPYING. If not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
hasso508e53e2004-05-18 18:57:06 +000022#include <zebra.h>
23
24#include "thread.h"
25#include "linklist.h"
26#include "vty.h"
27#include "command.h"
28
hasso508e53e2004-05-18 18:57:06 +000029#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"
hasso049207c2004-08-04 20:02:13 +000043#include "ospf6_abr.h"
hasso1e058382004-09-01 21:36:14 +000044#include "ospf6_flood.h"
hasso049207c2004-08-04 20:02:13 +000045#include "ospf6d.h"
paul718e3742002-12-13 20:15:29 +000046
hassoef1bbf52004-10-08 12:04:21 +000047#ifdef HAVE_SNMP
48#include "ospf6_snmp.h"
49#endif /*HAVE_SNMP*/
50
paul718e3742002-12-13 20:15:29 +000051char ospf6_daemon_version[] = OSPF6_DAEMON_VERSION;
52
paul718e3742002-12-13 20:15:29 +000053void
hasso508e53e2004-05-18 18:57:06 +000054ospf6_debug ()
paul718e3742002-12-13 20:15:29 +000055{
hasso508e53e2004-05-18 18:57:06 +000056}
paul718e3742002-12-13 20:15:29 +000057
hasso508e53e2004-05-18 18:57:06 +000058struct route_node *
59route_prev (struct route_node *node)
paul718e3742002-12-13 20:15:29 +000060{
hasso508e53e2004-05-18 18:57:06 +000061 struct route_node *end;
62 struct route_node *prev = NULL;
paul718e3742002-12-13 20:15:29 +000063
hasso508e53e2004-05-18 18:57:06 +000064 end = node;
65 node = node->parent;
hasso3b687352004-08-19 06:56:53 +000066 if (node)
67 route_lock_node (node);
hasso508e53e2004-05-18 18:57:06 +000068 while (node)
69 {
70 prev = node;
hasso3b687352004-08-19 06:56:53 +000071 node = route_next (node);
72 if (node == end)
73 {
74 route_unlock_node (node);
75 node = NULL;
76 }
hasso508e53e2004-05-18 18:57:06 +000077 }
78 route_unlock_node (end);
hasso3b687352004-08-19 06:56:53 +000079 if (prev)
80 route_lock_node (prev);
hasso508e53e2004-05-18 18:57:06 +000081
82 return prev;
paul718e3742002-12-13 20:15:29 +000083}
84
hasso6452df02004-08-15 05:52:07 +000085
86/* show database functions */
paul718e3742002-12-13 20:15:29 +000087DEFUN (show_version_ospf6,
88 show_version_ospf6_cmd,
89 "show version ospf6",
90 SHOW_STR
hasso508e53e2004-05-18 18:57:06 +000091 "Displays ospf6d version\n"
92 )
paul718e3742002-12-13 20:15:29 +000093{
94 vty_out (vty, "Zebra OSPF6d Version: %s%s",
hasso049207c2004-08-04 20:02:13 +000095 ospf6_daemon_version, VNL);
paul718e3742002-12-13 20:15:29 +000096
97 return CMD_SUCCESS;
98}
99
hasso508e53e2004-05-18 18:57:06 +0000100struct cmd_node debug_node =
paul718e3742002-12-13 20:15:29 +0000101{
hasso508e53e2004-05-18 18:57:06 +0000102 DEBUG_NODE,
hasso69b4a812004-08-26 18:10:36 +0000103 "",
104 1 /* VTYSH */
hasso508e53e2004-05-18 18:57:06 +0000105};
paul718e3742002-12-13 20:15:29 +0000106
107int
hasso508e53e2004-05-18 18:57:06 +0000108config_write_ospf6_debug (struct vty *vty)
paul718e3742002-12-13 20:15:29 +0000109{
hasso508e53e2004-05-18 18:57:06 +0000110 config_write_ospf6_debug_message (vty);
111 config_write_ospf6_debug_lsa (vty);
112 config_write_ospf6_debug_zebra (vty);
113 config_write_ospf6_debug_interface (vty);
114 config_write_ospf6_debug_neighbor (vty);
115 config_write_ospf6_debug_spf (vty);
116 config_write_ospf6_debug_route (vty);
Paul Jakmacb4b8842006-05-15 10:39:30 +0000117 config_write_ospf6_debug_brouter (vty);
hasso508e53e2004-05-18 18:57:06 +0000118 config_write_ospf6_debug_asbr (vty);
hasso049207c2004-08-04 20:02:13 +0000119 config_write_ospf6_debug_abr (vty);
hasso1e058382004-09-01 21:36:14 +0000120 config_write_ospf6_debug_flood (vty);
hasso049207c2004-08-04 20:02:13 +0000121 vty_out (vty, "!%s", VNL);
paul718e3742002-12-13 20:15:29 +0000122 return 0;
123}
124
hasso049207c2004-08-04 20:02:13 +0000125#define AREA_LSDB_TITLE_FORMAT \
126 "%s Area Scoped Link State Database (Area %s)%s%s"
127#define IF_LSDB_TITLE_FORMAT \
128 "%s I/F Scoped Link State Database (I/F %s in Area %s)%s%s"
129#define AS_LSDB_TITLE_FORMAT \
130 "%s AS Scoped Link State Database%s%s"
131
132static int
paul0c083ee2004-10-10 12:54:58 +0000133parse_show_level (int argc, const char *argv[])
hasso049207c2004-08-04 20:02:13 +0000134{
hasso6452df02004-08-15 05:52:07 +0000135 int level = 0;
hasso049207c2004-08-04 20:02:13 +0000136 if (argc)
137 {
138 if (! strncmp (argv[0], "de", 2))
139 level = OSPF6_LSDB_SHOW_LEVEL_DETAIL;
140 else if (! strncmp (argv[0], "du", 2))
141 level = OSPF6_LSDB_SHOW_LEVEL_DUMP;
142 else if (! strncmp (argv[0], "in", 2))
143 level = OSPF6_LSDB_SHOW_LEVEL_INTERNAL;
144 }
145 else
146 level = OSPF6_LSDB_SHOW_LEVEL_NORMAL;
147 return level;
148}
149
150static u_int16_t
paul0c083ee2004-10-10 12:54:58 +0000151parse_type_spec (int argc, const char *argv[])
hasso049207c2004-08-04 20:02:13 +0000152{
hasso6452df02004-08-15 05:52:07 +0000153 u_int16_t type = 0;
hasso049207c2004-08-04 20:02:13 +0000154 assert (argc);
155 if (! strcmp (argv[0], "router"))
156 type = htons (OSPF6_LSTYPE_ROUTER);
157 else if (! strcmp (argv[0], "network"))
158 type = htons (OSPF6_LSTYPE_NETWORK);
159 else if (! strcmp (argv[0], "as-external"))
160 type = htons (OSPF6_LSTYPE_AS_EXTERNAL);
161 else if (! strcmp (argv[0], "intra-prefix"))
162 type = htons (OSPF6_LSTYPE_INTRA_PREFIX);
163 else if (! strcmp (argv[0], "inter-router"))
164 type = htons (OSPF6_LSTYPE_INTER_ROUTER);
165 else if (! strcmp (argv[0], "inter-prefix"))
166 type = htons (OSPF6_LSTYPE_INTER_PREFIX);
167 else if (! strcmp (argv[0], "link"))
168 type = htons (OSPF6_LSTYPE_LINK);
169 return type;
170}
171
hasso508e53e2004-05-18 18:57:06 +0000172DEFUN (show_ipv6_ospf6_database,
173 show_ipv6_ospf6_database_cmd,
174 "show ipv6 ospf6 database",
175 SHOW_STR
176 IPV6_STR
177 OSPF6_STR
178 "Display Link state database\n"
179 )
paul718e3742002-12-13 20:15:29 +0000180{
hasso049207c2004-08-04 20:02:13 +0000181 int level;
hasso52dc7ee2004-09-23 19:18:23 +0000182 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +0000183 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +0000184 struct ospf6_area *oa;
185 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +0000186
187 OSPF6_CMD_CHECK_RUNNING ();
188
hasso049207c2004-08-04 20:02:13 +0000189 level = parse_show_level (argc, argv);
hasso508e53e2004-05-18 18:57:06 +0000190
paul1eb8ef22005-04-07 07:30:20 +0000191 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000192 {
hasso049207c2004-08-04 20:02:13 +0000193 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
194 ospf6_lsdb_show (vty, level, NULL, NULL, NULL, oa->lsdb);
hasso508e53e2004-05-18 18:57:06 +0000195 }
hasso049207c2004-08-04 20:02:13 +0000196
paul1eb8ef22005-04-07 07:30:20 +0000197 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000198 {
paul1eb8ef22005-04-07 07:30:20 +0000199 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso508e53e2004-05-18 18:57:06 +0000200 {
hasso049207c2004-08-04 20:02:13 +0000201 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
202 oi->interface->name, oa->name, VNL, VNL);
203 ospf6_lsdb_show (vty, level, NULL, NULL, NULL, oi->lsdb);
hasso508e53e2004-05-18 18:57:06 +0000204 }
205 }
206
hasso049207c2004-08-04 20:02:13 +0000207 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
208 ospf6_lsdb_show (vty, level, NULL, NULL, NULL, o->lsdb);
209
210 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000211 return CMD_SUCCESS;
212}
213
214ALIAS (show_ipv6_ospf6_database,
215 show_ipv6_ospf6_database_detail_cmd,
216 "show ipv6 ospf6 database (detail|dump|internal)",
217 SHOW_STR
218 IPV6_STR
219 OSPF6_STR
220 "Display Link state database\n"
221 "Display details of LSAs\n"
222 "Dump LSAs\n"
223 "Display LSA's internal information\n"
224 );
225
226DEFUN (show_ipv6_ospf6_database_type,
227 show_ipv6_ospf6_database_type_cmd,
228 "show ipv6 ospf6 database "
229 "(router|network|inter-prefix|inter-router|as-external|"
230 "group-membership|type-7|link|intra-prefix)",
231 SHOW_STR
232 IPV6_STR
233 OSPF6_STR
234 "Display Link state database\n"
235 "Display Router LSAs\n"
236 "Display Network LSAs\n"
237 "Display Inter-Area-Prefix LSAs\n"
238 "Display Inter-Area-Router LSAs\n"
239 "Display As-External LSAs\n"
240 "Display Group-Membership LSAs\n"
241 "Display Type-7 LSAs\n"
242 "Display Link LSAs\n"
243 "Display Intra-Area-Prefix LSAs\n"
244 )
245{
hasso049207c2004-08-04 20:02:13 +0000246 int level;
hasso52dc7ee2004-09-23 19:18:23 +0000247 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +0000248 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +0000249 struct ospf6_area *oa;
250 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +0000251 u_int16_t type = 0;
252
253 OSPF6_CMD_CHECK_RUNNING ();
254
hasso049207c2004-08-04 20:02:13 +0000255 type = parse_type_spec (argc, argv);
256 argc--;
257 argv++;
258 level = parse_show_level (argc, argv);
hasso508e53e2004-05-18 18:57:06 +0000259
hasso049207c2004-08-04 20:02:13 +0000260 switch (OSPF6_LSA_SCOPE (type))
hasso508e53e2004-05-18 18:57:06 +0000261 {
hasso6452df02004-08-15 05:52:07 +0000262 case OSPF6_SCOPE_AREA:
paul1eb8ef22005-04-07 07:30:20 +0000263 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +0000264 {
hasso049207c2004-08-04 20:02:13 +0000265 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
266 ospf6_lsdb_show (vty, level, &type, NULL, NULL, oa->lsdb);
267 }
268 break;
269
hasso6452df02004-08-15 05:52:07 +0000270 case OSPF6_SCOPE_LINKLOCAL:
paul1eb8ef22005-04-07 07:30:20 +0000271 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +0000272 {
paul1eb8ef22005-04-07 07:30:20 +0000273 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +0000274 {
hasso049207c2004-08-04 20:02:13 +0000275 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
276 oi->interface->name, oa->name, VNL, VNL);
277 ospf6_lsdb_show (vty, level, &type, NULL, NULL, oi->lsdb);
278 }
279 }
280 break;
281
hasso6452df02004-08-15 05:52:07 +0000282 case OSPF6_SCOPE_AS:
hasso049207c2004-08-04 20:02:13 +0000283 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
284 ospf6_lsdb_show (vty, level, &type, NULL, NULL, o->lsdb);
285 break;
286
287 default:
288 assert (0);
289 break;
hasso508e53e2004-05-18 18:57:06 +0000290 }
291
hasso049207c2004-08-04 20:02:13 +0000292 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000293 return CMD_SUCCESS;
294}
295
296ALIAS (show_ipv6_ospf6_database_type,
297 show_ipv6_ospf6_database_type_detail_cmd,
298 "show ipv6 ospf6 database "
299 "(router|network|inter-prefix|inter-router|as-external|"
300 "group-membership|type-7|link|intra-prefix) "
301 "(detail|dump|internal)",
302 SHOW_STR
303 IPV6_STR
304 OSPF6_STR
305 "Display Link state database\n"
306 "Display Router LSAs\n"
307 "Display Network LSAs\n"
308 "Display Inter-Area-Prefix LSAs\n"
309 "Display Inter-Area-Router LSAs\n"
310 "Display As-External LSAs\n"
311 "Display Group-Membership LSAs\n"
312 "Display Type-7 LSAs\n"
313 "Display Link LSAs\n"
314 "Display Intra-Area-Prefix LSAs\n"
315 "Display details of LSAs\n"
316 "Dump LSAs\n"
317 "Display LSA's internal information\n"
318 );
319
320DEFUN (show_ipv6_ospf6_database_id,
321 show_ipv6_ospf6_database_id_cmd,
322 "show ipv6 ospf6 database * A.B.C.D",
323 SHOW_STR
324 IPV6_STR
325 OSPF6_STR
326 "Display Link state database\n"
327 "Any Link state Type\n"
328 "Specify Link state ID as IPv4 address notation\n"
329 )
330{
hasso049207c2004-08-04 20:02:13 +0000331 int level;
hasso52dc7ee2004-09-23 19:18:23 +0000332 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +0000333 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +0000334 struct ospf6_area *oa;
335 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +0000336 u_int32_t id = 0;
337
338 OSPF6_CMD_CHECK_RUNNING ();
339
hasso508e53e2004-05-18 18:57:06 +0000340 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
341 {
342 vty_out (vty, "Link State ID is not parsable: %s%s",
hasso049207c2004-08-04 20:02:13 +0000343 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +0000344 return CMD_SUCCESS;
345 }
346
hasso049207c2004-08-04 20:02:13 +0000347 argc--;
348 argv++;
349 level = parse_show_level (argc, argv);
350
paul1eb8ef22005-04-07 07:30:20 +0000351 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000352 {
hasso049207c2004-08-04 20:02:13 +0000353 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
354 ospf6_lsdb_show (vty, level, NULL, &id, NULL, oa->lsdb);
hasso508e53e2004-05-18 18:57:06 +0000355 }
hasso049207c2004-08-04 20:02:13 +0000356
paul1eb8ef22005-04-07 07:30:20 +0000357 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000358 {
paul1eb8ef22005-04-07 07:30:20 +0000359 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso508e53e2004-05-18 18:57:06 +0000360 {
hasso049207c2004-08-04 20:02:13 +0000361 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
362 oi->interface->name, oa->name, VNL, VNL);
363 ospf6_lsdb_show (vty, level, NULL, &id, NULL, oi->lsdb);
hasso508e53e2004-05-18 18:57:06 +0000364 }
365 }
366
hasso049207c2004-08-04 20:02:13 +0000367 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
368 ospf6_lsdb_show (vty, level, NULL, &id, NULL, o->lsdb);
369
370 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000371 return CMD_SUCCESS;
372}
373
374ALIAS (show_ipv6_ospf6_database_id,
375 show_ipv6_ospf6_database_id_detail_cmd,
376 "show ipv6 ospf6 database * A.B.C.D "
377 "(detail|dump|internal)",
378 SHOW_STR
379 IPV6_STR
380 OSPF6_STR
381 "Display Link state database\n"
382 "Any Link state Type\n"
hasso049207c2004-08-04 20:02:13 +0000383 "Specify Link state ID as IPv4 address notation\n"
384 "Display details of LSAs\n"
385 "Dump LSAs\n"
386 "Display LSA's internal information\n"
387 );
388
389ALIAS (show_ipv6_ospf6_database_id,
390 show_ipv6_ospf6_database_linkstate_id_cmd,
391 "show ipv6 ospf6 database linkstate-id A.B.C.D",
392 SHOW_STR
393 IPV6_STR
394 OSPF6_STR
395 "Display Link state database\n"
396 "Search by Link state ID\n"
397 "Specify Link state ID as IPv4 address notation\n"
398 );
399
400ALIAS (show_ipv6_ospf6_database_id,
401 show_ipv6_ospf6_database_linkstate_id_detail_cmd,
402 "show ipv6 ospf6 database linkstate-id A.B.C.D "
403 "(detail|dump|internal)",
404 SHOW_STR
405 IPV6_STR
406 OSPF6_STR
407 "Display Link state database\n"
408 "Search by Link state ID\n"
hasso508e53e2004-05-18 18:57:06 +0000409 "Specify Link state ID as IPv4 address notation\n"
410 "Display details of LSAs\n"
411 "Dump LSAs\n"
412 "Display LSA's internal information\n"
413 );
414
415DEFUN (show_ipv6_ospf6_database_router,
416 show_ipv6_ospf6_database_router_cmd,
417 "show ipv6 ospf6 database * * A.B.C.D",
418 SHOW_STR
419 IPV6_STR
420 OSPF6_STR
421 "Display Link state database\n"
422 "Any Link state Type\n"
423 "Any Link state ID\n"
424 "Specify Advertising Router as IPv4 address notation\n"
425 )
426{
hasso049207c2004-08-04 20:02:13 +0000427 int level;
hasso52dc7ee2004-09-23 19:18:23 +0000428 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +0000429 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +0000430 struct ospf6_area *oa;
431 struct ospf6_interface *oi;
432 u_int32_t adv_router = 0;
hasso508e53e2004-05-18 18:57:06 +0000433
434 OSPF6_CMD_CHECK_RUNNING ();
435
hasso049207c2004-08-04 20:02:13 +0000436 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
hasso508e53e2004-05-18 18:57:06 +0000437 {
438 vty_out (vty, "Advertising Router is not parsable: %s%s",
hasso049207c2004-08-04 20:02:13 +0000439 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +0000440 return CMD_SUCCESS;
441 }
442
hasso049207c2004-08-04 20:02:13 +0000443 argc--;
444 argv++;
445 level = parse_show_level (argc, argv);
446
paul1eb8ef22005-04-07 07:30:20 +0000447 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000448 {
hasso049207c2004-08-04 20:02:13 +0000449 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
450 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oa->lsdb);
hasso508e53e2004-05-18 18:57:06 +0000451 }
hasso049207c2004-08-04 20:02:13 +0000452
paul1eb8ef22005-04-07 07:30:20 +0000453 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000454 {
paul1eb8ef22005-04-07 07:30:20 +0000455 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso508e53e2004-05-18 18:57:06 +0000456 {
hasso049207c2004-08-04 20:02:13 +0000457 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
458 oi->interface->name, oa->name, VNL, VNL);
459 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oi->lsdb);
hasso508e53e2004-05-18 18:57:06 +0000460 }
461 }
462
hasso049207c2004-08-04 20:02:13 +0000463 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
464 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, o->lsdb);
465
466 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000467 return CMD_SUCCESS;
468}
469
470ALIAS (show_ipv6_ospf6_database_router,
471 show_ipv6_ospf6_database_router_detail_cmd,
472 "show ipv6 ospf6 database * * A.B.C.D "
473 "(detail|dump|internal)",
474 SHOW_STR
475 IPV6_STR
476 OSPF6_STR
477 "Display Link state database\n"
478 "Any Link state Type\n"
479 "Any Link state ID\n"
480 "Specify Advertising Router as IPv4 address notation\n"
481 "Display details of LSAs\n"
482 "Dump LSAs\n"
483 "Display LSA's internal information\n"
484 );
485
hasso049207c2004-08-04 20:02:13 +0000486ALIAS (show_ipv6_ospf6_database_router,
487 show_ipv6_ospf6_database_adv_router_cmd,
488 "show ipv6 ospf6 database adv-router A.B.C.D",
489 SHOW_STR
490 IPV6_STR
491 OSPF6_STR
492 "Display Link state database\n"
493 "Search by Advertising Router\n"
494 "Specify Advertising Router as IPv4 address notation\n"
495 );
496
497ALIAS (show_ipv6_ospf6_database_router,
498 show_ipv6_ospf6_database_adv_router_detail_cmd,
499 "show ipv6 ospf6 database adv-router A.B.C.D "
500 "(detail|dump|internal)",
501 SHOW_STR
502 IPV6_STR
503 OSPF6_STR
504 "Display Link state database\n"
505 "Search by Advertising Router\n"
506 "Specify Advertising Router as IPv4 address notation\n"
507 "Display details of LSAs\n"
508 "Dump LSAs\n"
509 "Display LSA's internal information\n"
510 );
511
hasso508e53e2004-05-18 18:57:06 +0000512DEFUN (show_ipv6_ospf6_database_type_id,
513 show_ipv6_ospf6_database_type_id_cmd,
514 "show ipv6 ospf6 database "
515 "(router|network|inter-prefix|inter-router|as-external|"
516 "group-membership|type-7|link|intra-prefix) A.B.C.D",
517 SHOW_STR
518 IPV6_STR
519 OSPF6_STR
520 "Display Link state database\n"
521 "Display Router LSAs\n"
522 "Display Network LSAs\n"
523 "Display Inter-Area-Prefix LSAs\n"
524 "Display Inter-Area-Router LSAs\n"
525 "Display As-External LSAs\n"
526 "Display Group-Membership LSAs\n"
527 "Display Type-7 LSAs\n"
528 "Display Link LSAs\n"
529 "Display Intra-Area-Prefix LSAs\n"
530 "Specify Link state ID as IPv4 address notation\n"
531 )
532{
hasso049207c2004-08-04 20:02:13 +0000533 int level;
hasso52dc7ee2004-09-23 19:18:23 +0000534 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +0000535 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +0000536 struct ospf6_area *oa;
537 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +0000538 u_int16_t type = 0;
539 u_int32_t id = 0;
540
541 OSPF6_CMD_CHECK_RUNNING ();
542
hasso049207c2004-08-04 20:02:13 +0000543 type = parse_type_spec (argc, argv);
544 argc--;
545 argv++;
hasso508e53e2004-05-18 18:57:06 +0000546
hasso049207c2004-08-04 20:02:13 +0000547 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
hasso508e53e2004-05-18 18:57:06 +0000548 {
549 vty_out (vty, "Link state ID is not parsable: %s%s",
hasso049207c2004-08-04 20:02:13 +0000550 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +0000551 return CMD_SUCCESS;
552 }
553
hasso049207c2004-08-04 20:02:13 +0000554 argc--;
555 argv++;
556 level = parse_show_level (argc, argv);
557
558 switch (OSPF6_LSA_SCOPE (type))
hasso508e53e2004-05-18 18:57:06 +0000559 {
hasso6452df02004-08-15 05:52:07 +0000560 case OSPF6_SCOPE_AREA:
paul1eb8ef22005-04-07 07:30:20 +0000561 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +0000562 {
hasso049207c2004-08-04 20:02:13 +0000563 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
564 ospf6_lsdb_show (vty, level, &type, &id, NULL, oa->lsdb);
565 }
566 break;
567
hasso6452df02004-08-15 05:52:07 +0000568 case OSPF6_SCOPE_LINKLOCAL:
paul1eb8ef22005-04-07 07:30:20 +0000569 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +0000570 {
paul1eb8ef22005-04-07 07:30:20 +0000571 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +0000572 {
hasso049207c2004-08-04 20:02:13 +0000573 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
574 oi->interface->name, oa->name, VNL, VNL);
575 ospf6_lsdb_show (vty, level, &type, &id, NULL, oi->lsdb);
576 }
577 }
578 break;
579
hasso6452df02004-08-15 05:52:07 +0000580 case OSPF6_SCOPE_AS:
hasso049207c2004-08-04 20:02:13 +0000581 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
582 ospf6_lsdb_show (vty, level, &type, &id, NULL, o->lsdb);
583 break;
584
585 default:
586 assert (0);
587 break;
hasso508e53e2004-05-18 18:57:06 +0000588 }
589
hasso049207c2004-08-04 20:02:13 +0000590 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000591 return CMD_SUCCESS;
592}
593
594ALIAS (show_ipv6_ospf6_database_type_id,
595 show_ipv6_ospf6_database_type_id_detail_cmd,
596 "show ipv6 ospf6 database "
597 "(router|network|inter-prefix|inter-router|as-external|"
598 "group-membership|type-7|link|intra-prefix) A.B.C.D "
599 "(detail|dump|internal)",
600 SHOW_STR
601 IPV6_STR
602 OSPF6_STR
603 "Display Link state database\n"
604 "Display Router LSAs\n"
605 "Display Network LSAs\n"
606 "Display Inter-Area-Prefix LSAs\n"
607 "Display Inter-Area-Router LSAs\n"
608 "Display As-External LSAs\n"
609 "Display Group-Membership LSAs\n"
610 "Display Type-7 LSAs\n"
611 "Display Link LSAs\n"
612 "Display Intra-Area-Prefix LSAs\n"
613 "Specify Link state ID as IPv4 address notation\n"
614 "Display details of LSAs\n"
615 "Dump LSAs\n"
616 "Display LSA's internal information\n"
617 );
618
hasso049207c2004-08-04 20:02:13 +0000619ALIAS (show_ipv6_ospf6_database_type_id,
620 show_ipv6_ospf6_database_type_linkstate_id_cmd,
621 "show ipv6 ospf6 database "
622 "(router|network|inter-prefix|inter-router|as-external|"
623 "group-membership|type-7|link|intra-prefix) linkstate-id A.B.C.D",
624 SHOW_STR
625 IPV6_STR
626 OSPF6_STR
627 "Display Link state database\n"
628 "Display Router LSAs\n"
629 "Display Network LSAs\n"
630 "Display Inter-Area-Prefix LSAs\n"
631 "Display Inter-Area-Router LSAs\n"
632 "Display As-External LSAs\n"
633 "Display Group-Membership LSAs\n"
634 "Display Type-7 LSAs\n"
635 "Display Link LSAs\n"
636 "Display Intra-Area-Prefix LSAs\n"
637 "Search by Link state ID\n"
638 "Specify Link state ID as IPv4 address notation\n"
639 );
640
641ALIAS (show_ipv6_ospf6_database_type_id,
642 show_ipv6_ospf6_database_type_linkstate_id_detail_cmd,
643 "show ipv6 ospf6 database "
644 "(router|network|inter-prefix|inter-router|as-external|"
645 "group-membership|type-7|link|intra-prefix) linkstate-id A.B.C.D "
646 "(detail|dump|internal)",
647 SHOW_STR
648 IPV6_STR
649 OSPF6_STR
650 "Display Link state database\n"
651 "Display Router LSAs\n"
652 "Display Network LSAs\n"
653 "Display Inter-Area-Prefix LSAs\n"
654 "Display Inter-Area-Router LSAs\n"
655 "Display As-External LSAs\n"
656 "Display Group-Membership LSAs\n"
657 "Display Type-7 LSAs\n"
658 "Display Link LSAs\n"
659 "Display Intra-Area-Prefix LSAs\n"
660 "Search by Link state ID\n"
661 "Specify Link state ID as IPv4 address notation\n"
662 "Display details of LSAs\n"
663 "Dump LSAs\n"
664 "Display LSA's internal information\n"
665 );
666
hasso508e53e2004-05-18 18:57:06 +0000667DEFUN (show_ipv6_ospf6_database_type_router,
668 show_ipv6_ospf6_database_type_router_cmd,
669 "show ipv6 ospf6 database "
670 "(router|network|inter-prefix|inter-router|as-external|"
671 "group-membership|type-7|link|intra-prefix) * A.B.C.D",
672 SHOW_STR
673 IPV6_STR
674 OSPF6_STR
675 "Display Link state database\n"
676 "Display Router LSAs\n"
677 "Display Network LSAs\n"
678 "Display Inter-Area-Prefix LSAs\n"
679 "Display Inter-Area-Router LSAs\n"
680 "Display As-External LSAs\n"
681 "Display Group-Membership LSAs\n"
682 "Display Type-7 LSAs\n"
683 "Display Link LSAs\n"
684 "Display Intra-Area-Prefix LSAs\n"
685 "Any Link state ID\n"
686 "Specify Advertising Router as IPv4 address notation\n"
687 )
688{
hasso049207c2004-08-04 20:02:13 +0000689 int level;
hasso52dc7ee2004-09-23 19:18:23 +0000690 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +0000691 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +0000692 struct ospf6_area *oa;
693 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +0000694 u_int16_t type = 0;
hasso049207c2004-08-04 20:02:13 +0000695 u_int32_t adv_router = 0;
hasso508e53e2004-05-18 18:57:06 +0000696
697 OSPF6_CMD_CHECK_RUNNING ();
698
hasso049207c2004-08-04 20:02:13 +0000699 type = parse_type_spec (argc, argv);
700 argc--;
701 argv++;
hasso508e53e2004-05-18 18:57:06 +0000702
hasso049207c2004-08-04 20:02:13 +0000703 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
hasso508e53e2004-05-18 18:57:06 +0000704 {
705 vty_out (vty, "Advertising Router is not parsable: %s%s",
hasso049207c2004-08-04 20:02:13 +0000706 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +0000707 return CMD_SUCCESS;
708 }
709
hasso049207c2004-08-04 20:02:13 +0000710 argc--;
711 argv++;
712 level = parse_show_level (argc, argv);
713
714 switch (OSPF6_LSA_SCOPE (type))
hasso508e53e2004-05-18 18:57:06 +0000715 {
hasso6452df02004-08-15 05:52:07 +0000716 case OSPF6_SCOPE_AREA:
paul1eb8ef22005-04-07 07:30:20 +0000717 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +0000718 {
hasso049207c2004-08-04 20:02:13 +0000719 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
720 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oa->lsdb);
721 }
722 break;
723
hasso6452df02004-08-15 05:52:07 +0000724 case OSPF6_SCOPE_LINKLOCAL:
paul1eb8ef22005-04-07 07:30:20 +0000725 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +0000726 {
paul1eb8ef22005-04-07 07:30:20 +0000727 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +0000728 {
hasso049207c2004-08-04 20:02:13 +0000729 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
730 oi->interface->name, oa->name, VNL, VNL);
731 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oi->lsdb);
732 }
733 }
734 break;
735
hasso6452df02004-08-15 05:52:07 +0000736 case OSPF6_SCOPE_AS:
hasso049207c2004-08-04 20:02:13 +0000737 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
738 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, o->lsdb);
739 break;
740
741 default:
742 assert (0);
743 break;
hasso508e53e2004-05-18 18:57:06 +0000744 }
745
hasso049207c2004-08-04 20:02:13 +0000746 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000747 return CMD_SUCCESS;
748}
749
750ALIAS (show_ipv6_ospf6_database_type_router,
751 show_ipv6_ospf6_database_type_router_detail_cmd,
752 "show ipv6 ospf6 database "
753 "(router|network|inter-prefix|inter-router|as-external|"
754 "group-membership|type-7|link|intra-prefix) * A.B.C.D "
755 "(detail|dump|internal)",
756 SHOW_STR
757 IPV6_STR
758 OSPF6_STR
759 "Display Link state database\n"
760 "Display Router LSAs\n"
761 "Display Network LSAs\n"
762 "Display Inter-Area-Prefix LSAs\n"
763 "Display Inter-Area-Router LSAs\n"
764 "Display As-External LSAs\n"
765 "Display Group-Membership LSAs\n"
766 "Display Type-7 LSAs\n"
767 "Display Link LSAs\n"
768 "Display Intra-Area-Prefix LSAs\n"
769 "Any Link state ID\n"
770 "Specify Advertising Router as IPv4 address notation\n"
771 "Display details of LSAs\n"
772 "Dump LSAs\n"
773 "Display LSA's internal information\n"
774 );
775
hasso049207c2004-08-04 20:02:13 +0000776ALIAS (show_ipv6_ospf6_database_type_router,
777 show_ipv6_ospf6_database_type_adv_router_cmd,
778 "show ipv6 ospf6 database "
779 "(router|network|inter-prefix|inter-router|as-external|"
780 "group-membership|type-7|link|intra-prefix) adv-router A.B.C.D",
781 SHOW_STR
782 IPV6_STR
783 OSPF6_STR
784 "Display Link state database\n"
785 "Display Router LSAs\n"
786 "Display Network LSAs\n"
787 "Display Inter-Area-Prefix LSAs\n"
788 "Display Inter-Area-Router LSAs\n"
789 "Display As-External LSAs\n"
790 "Display Group-Membership LSAs\n"
791 "Display Type-7 LSAs\n"
792 "Display Link LSAs\n"
793 "Display Intra-Area-Prefix LSAs\n"
794 "Search by Advertising Router\n"
795 "Specify Advertising Router as IPv4 address notation\n"
796 );
797
798ALIAS (show_ipv6_ospf6_database_type_router,
799 show_ipv6_ospf6_database_type_adv_router_detail_cmd,
800 "show ipv6 ospf6 database "
801 "(router|network|inter-prefix|inter-router|as-external|"
802 "group-membership|type-7|link|intra-prefix) adv-router A.B.C.D "
803 "(detail|dump|internal)",
804 SHOW_STR
805 IPV6_STR
806 OSPF6_STR
807 "Display Link state database\n"
808 "Display Router LSAs\n"
809 "Display Network LSAs\n"
810 "Display Inter-Area-Prefix LSAs\n"
811 "Display Inter-Area-Router LSAs\n"
812 "Display As-External LSAs\n"
813 "Display Group-Membership LSAs\n"
814 "Display Type-7 LSAs\n"
815 "Display Link LSAs\n"
816 "Display Intra-Area-Prefix LSAs\n"
817 "Search by Advertising Router\n"
818 "Specify Advertising Router as IPv4 address notation\n"
819 "Display details of LSAs\n"
820 "Dump LSAs\n"
821 "Display LSA's internal information\n"
822 );
823
hasso508e53e2004-05-18 18:57:06 +0000824DEFUN (show_ipv6_ospf6_database_id_router,
825 show_ipv6_ospf6_database_id_router_cmd,
826 "show ipv6 ospf6 database * A.B.C.D A.B.C.D",
827 SHOW_STR
828 IPV6_STR
829 OSPF6_STR
830 "Display Link state database\n"
831 "Any Link state Type\n"
832 "Specify Link state ID as IPv4 address notation\n"
833 "Specify Advertising Router as IPv4 address notation\n"
834 )
835{
hasso049207c2004-08-04 20:02:13 +0000836 int level;
hasso52dc7ee2004-09-23 19:18:23 +0000837 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +0000838 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +0000839 struct ospf6_area *oa;
840 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +0000841 u_int32_t id = 0;
hasso049207c2004-08-04 20:02:13 +0000842 u_int32_t adv_router = 0;
hasso508e53e2004-05-18 18:57:06 +0000843
844 OSPF6_CMD_CHECK_RUNNING ();
845
hasso508e53e2004-05-18 18:57:06 +0000846 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
847 {
848 vty_out (vty, "Link state ID is not parsable: %s%s",
hasso6452df02004-08-15 05:52:07 +0000849 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +0000850 return CMD_SUCCESS;
851 }
852
hasso049207c2004-08-04 20:02:13 +0000853 argc--;
854 argv++;
855
856 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
hasso508e53e2004-05-18 18:57:06 +0000857 {
858 vty_out (vty, "Advertising Router is not parsable: %s%s",
hasso049207c2004-08-04 20:02:13 +0000859 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +0000860 return CMD_SUCCESS;
861 }
862
hasso049207c2004-08-04 20:02:13 +0000863 argc--;
864 argv++;
865 level = parse_show_level (argc, argv);
866
paul1eb8ef22005-04-07 07:30:20 +0000867 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000868 {
hasso049207c2004-08-04 20:02:13 +0000869 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
870 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oa->lsdb);
hasso508e53e2004-05-18 18:57:06 +0000871 }
hasso049207c2004-08-04 20:02:13 +0000872
paul1eb8ef22005-04-07 07:30:20 +0000873 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000874 {
paul1eb8ef22005-04-07 07:30:20 +0000875 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso508e53e2004-05-18 18:57:06 +0000876 {
hasso049207c2004-08-04 20:02:13 +0000877 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
878 oi->interface->name, oa->name, VNL, VNL);
879 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oi->lsdb);
hasso508e53e2004-05-18 18:57:06 +0000880 }
881 }
882
hasso049207c2004-08-04 20:02:13 +0000883 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
884 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, o->lsdb);
885
886 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000887 return CMD_SUCCESS;
888}
889
890ALIAS (show_ipv6_ospf6_database_id_router,
891 show_ipv6_ospf6_database_id_router_detail_cmd,
892 "show ipv6 ospf6 database * A.B.C.D A.B.C.D "
893 "(detail|dump|internal)",
894 SHOW_STR
895 IPV6_STR
896 OSPF6_STR
897 "Display Link state database\n"
898 "Any Link state Type\n"
899 "Specify Link state ID as IPv4 address notation\n"
900 "Specify Advertising Router as IPv4 address notation\n"
901 "Display details of LSAs\n"
902 "Dump LSAs\n"
903 "Display LSA's internal information\n"
904 );
905
hasso049207c2004-08-04 20:02:13 +0000906DEFUN (show_ipv6_ospf6_database_adv_router_linkstate_id,
907 show_ipv6_ospf6_database_adv_router_linkstate_id_cmd,
908 "show ipv6 ospf6 database adv-router A.B.C.D linkstate-id A.B.C.D",
909 SHOW_STR
910 IPV6_STR
911 OSPF6_STR
912 "Display Link state database\n"
913 "Search by Advertising Router\n"
914 "Specify Advertising Router as IPv4 address notation\n"
915 "Search by Link state ID\n"
916 "Specify Link state ID as IPv4 address notation\n"
917 )
918{
919 int level;
hasso52dc7ee2004-09-23 19:18:23 +0000920 struct listnode *i, *j;
hasso049207c2004-08-04 20:02:13 +0000921 struct ospf6 *o = ospf6;
922 struct ospf6_area *oa;
923 struct ospf6_interface *oi;
924 u_int32_t id = 0;
925 u_int32_t adv_router = 0;
926
927 OSPF6_CMD_CHECK_RUNNING ();
928
929 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
930 {
931 vty_out (vty, "Advertising Router is not parsable: %s%s",
932 argv[0], VNL);
933 return CMD_SUCCESS;
934 }
935
936 argc--;
937 argv++;
938
939 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
940 {
941 vty_out (vty, "Link state ID is not parsable: %s%s",
hasso6452df02004-08-15 05:52:07 +0000942 argv[0], VNL);
hasso049207c2004-08-04 20:02:13 +0000943 return CMD_SUCCESS;
944 }
945
946 argc--;
947 argv++;
948 level = parse_show_level (argc, argv);
949
paul1eb8ef22005-04-07 07:30:20 +0000950 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +0000951 {
hasso049207c2004-08-04 20:02:13 +0000952 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
953 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oa->lsdb);
954 }
955
paul1eb8ef22005-04-07 07:30:20 +0000956 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +0000957 {
paul1eb8ef22005-04-07 07:30:20 +0000958 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +0000959 {
hasso049207c2004-08-04 20:02:13 +0000960 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
961 oi->interface->name, oa->name, VNL, VNL);
962 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oi->lsdb);
963 }
964 }
965
966 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
967 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, o->lsdb);
968
969 vty_out (vty, "%s", VNL);
970 return CMD_SUCCESS;
971}
972
973ALIAS (show_ipv6_ospf6_database_adv_router_linkstate_id,
974 show_ipv6_ospf6_database_adv_router_linkstate_id_detail_cmd,
975 "show ipv6 ospf6 database adv-router A.B.C.D linkstate-id A.B.C.D "
976 "(detail|dump|internal)",
977 SHOW_STR
978 IPV6_STR
979 OSPF6_STR
980 "Display Link state database\n"
981 "Search by Advertising Router\n"
982 "Specify Advertising Router as IPv4 address notation\n"
983 "Search by Link state ID\n"
984 "Specify Link state ID as IPv4 address notation\n"
985 "Display details of LSAs\n"
986 "Dump LSAs\n"
987 "Display LSA's internal information\n"
988 );
989
hasso508e53e2004-05-18 18:57:06 +0000990DEFUN (show_ipv6_ospf6_database_type_id_router,
991 show_ipv6_ospf6_database_type_id_router_cmd,
992 "show ipv6 ospf6 database "
993 "(router|network|inter-prefix|inter-router|as-external|"
994 "group-membership|type-7|link|intra-prefix) A.B.C.D A.B.C.D",
995 SHOW_STR
996 IPV6_STR
997 OSPF6_STR
998 "Display Link state database\n"
999 "Display Router LSAs\n"
1000 "Display Network LSAs\n"
1001 "Display Inter-Area-Prefix LSAs\n"
1002 "Display Inter-Area-Router LSAs\n"
1003 "Display As-External LSAs\n"
1004 "Display Group-Membership LSAs\n"
1005 "Display Type-7 LSAs\n"
1006 "Display Link LSAs\n"
1007 "Display Intra-Area-Prefix LSAs\n"
1008 "Specify Link state ID as IPv4 address notation\n"
1009 "Specify Advertising Router as IPv4 address notation\n"
1010 )
1011{
hasso049207c2004-08-04 20:02:13 +00001012 int level;
hasso52dc7ee2004-09-23 19:18:23 +00001013 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +00001014 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +00001015 struct ospf6_area *oa;
1016 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +00001017 u_int16_t type = 0;
1018 u_int32_t id = 0;
hasso049207c2004-08-04 20:02:13 +00001019 u_int32_t adv_router = 0;
hasso508e53e2004-05-18 18:57:06 +00001020
1021 OSPF6_CMD_CHECK_RUNNING ();
1022
hasso049207c2004-08-04 20:02:13 +00001023 type = parse_type_spec (argc, argv);
1024 argc--;
1025 argv++;
hasso508e53e2004-05-18 18:57:06 +00001026
hasso049207c2004-08-04 20:02:13 +00001027 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
hasso508e53e2004-05-18 18:57:06 +00001028 {
1029 vty_out (vty, "Link state ID is not parsable: %s%s",
hasso049207c2004-08-04 20:02:13 +00001030 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +00001031 return CMD_SUCCESS;
1032 }
1033
hasso049207c2004-08-04 20:02:13 +00001034 argc--;
1035 argv++;
1036
1037 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
hasso508e53e2004-05-18 18:57:06 +00001038 {
1039 vty_out (vty, "Advertising Router is not parsable: %s%s",
hasso049207c2004-08-04 20:02:13 +00001040 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +00001041 return CMD_SUCCESS;
1042 }
1043
hasso049207c2004-08-04 20:02:13 +00001044 argc--;
1045 argv++;
1046 level = parse_show_level (argc, argv);
1047
1048 switch (OSPF6_LSA_SCOPE (type))
hasso508e53e2004-05-18 18:57:06 +00001049 {
hasso6452df02004-08-15 05:52:07 +00001050 case OSPF6_SCOPE_AREA:
paul1eb8ef22005-04-07 07:30:20 +00001051 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001052 {
hasso049207c2004-08-04 20:02:13 +00001053 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1054 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);
1055 }
1056 break;
1057
hasso6452df02004-08-15 05:52:07 +00001058 case OSPF6_SCOPE_LINKLOCAL:
paul1eb8ef22005-04-07 07:30:20 +00001059 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001060 {
paul1eb8ef22005-04-07 07:30:20 +00001061 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +00001062 {
hasso049207c2004-08-04 20:02:13 +00001063 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1064 oi->interface->name, oa->name, VNL, VNL);
1065 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);
1066 }
1067 }
1068 break;
1069
hasso6452df02004-08-15 05:52:07 +00001070 case OSPF6_SCOPE_AS:
hasso049207c2004-08-04 20:02:13 +00001071 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1072 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, o->lsdb);
1073 break;
1074
1075 default:
1076 assert (0);
1077 break;
hasso508e53e2004-05-18 18:57:06 +00001078 }
1079
hasso049207c2004-08-04 20:02:13 +00001080 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +00001081 return CMD_SUCCESS;
1082}
1083
1084ALIAS (show_ipv6_ospf6_database_type_id_router,
1085 show_ipv6_ospf6_database_type_id_router_detail_cmd,
1086 "show ipv6 ospf6 database "
1087 "(router|network|inter-prefix|inter-router|as-external|"
1088 "group-membership|type-7|link|intra-prefix) A.B.C.D A.B.C.D "
1089 "(dump|internal)",
1090 SHOW_STR
1091 IPV6_STR
1092 OSPF6_STR
1093 "Display Link state database\n"
1094 "Display Router LSAs\n"
1095 "Display Network LSAs\n"
1096 "Display Inter-Area-Prefix LSAs\n"
1097 "Display Inter-Area-Router LSAs\n"
1098 "Display As-External LSAs\n"
1099 "Display Group-Membership LSAs\n"
1100 "Display Type-7 LSAs\n"
1101 "Display Link LSAs\n"
1102 "Display Intra-Area-Prefix LSAs\n"
1103 "Specify Link state ID as IPv4 address notation\n"
1104 "Specify Advertising Router as IPv4 address notation\n"
hasso049207c2004-08-04 20:02:13 +00001105 "Dump LSAs\n"
1106 "Display LSA's internal information\n"
1107 );
1108
1109DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id,
1110 show_ipv6_ospf6_database_type_adv_router_linkstate_id_cmd,
1111 "show ipv6 ospf6 database "
1112 "(router|network|inter-prefix|inter-router|as-external|"
1113 "group-membership|type-7|link|intra-prefix) "
1114 "adv-router A.B.C.D linkstate-id A.B.C.D",
1115 SHOW_STR
1116 IPV6_STR
1117 OSPF6_STR
1118 "Display Link state database\n"
1119 "Display Router LSAs\n"
1120 "Display Network LSAs\n"
1121 "Display Inter-Area-Prefix LSAs\n"
1122 "Display Inter-Area-Router LSAs\n"
1123 "Display As-External LSAs\n"
1124 "Display Group-Membership LSAs\n"
1125 "Display Type-7 LSAs\n"
1126 "Display Link LSAs\n"
1127 "Display Intra-Area-Prefix LSAs\n"
1128 "Search by Advertising Router\n"
1129 "Specify Advertising Router as IPv4 address notation\n"
1130 "Search by Link state ID\n"
1131 "Specify Link state ID as IPv4 address notation\n"
1132 )
1133{
1134 int level;
hasso52dc7ee2004-09-23 19:18:23 +00001135 struct listnode *i, *j;
hasso049207c2004-08-04 20:02:13 +00001136 struct ospf6 *o = ospf6;
1137 struct ospf6_area *oa;
1138 struct ospf6_interface *oi;
1139 u_int16_t type = 0;
1140 u_int32_t id = 0;
1141 u_int32_t adv_router = 0;
1142
1143 OSPF6_CMD_CHECK_RUNNING ();
1144
1145 type = parse_type_spec (argc, argv);
1146 argc--;
1147 argv++;
1148
1149 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
1150 {
1151 vty_out (vty, "Advertising Router is not parsable: %s%s",
1152 argv[0], VNL);
1153 return CMD_SUCCESS;
1154 }
1155
1156 argc--;
1157 argv++;
1158
1159 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
1160 {
1161 vty_out (vty, "Link state ID is not parsable: %s%s",
1162 argv[0], VNL);
1163 return CMD_SUCCESS;
1164 }
1165
1166 argc--;
1167 argv++;
1168 level = parse_show_level (argc, argv);
1169
1170 switch (OSPF6_LSA_SCOPE (type))
1171 {
hasso6452df02004-08-15 05:52:07 +00001172 case OSPF6_SCOPE_AREA:
paul1eb8ef22005-04-07 07:30:20 +00001173 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001174 {
hasso049207c2004-08-04 20:02:13 +00001175 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1176 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);
1177 }
1178 break;
1179
hasso6452df02004-08-15 05:52:07 +00001180 case OSPF6_SCOPE_LINKLOCAL:
paul1eb8ef22005-04-07 07:30:20 +00001181 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001182 {
paul1eb8ef22005-04-07 07:30:20 +00001183 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +00001184 {
hasso049207c2004-08-04 20:02:13 +00001185 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1186 oi->interface->name, oa->name, VNL, VNL);
1187 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);
1188 }
1189 }
1190 break;
1191
hasso6452df02004-08-15 05:52:07 +00001192 case OSPF6_SCOPE_AS:
hasso049207c2004-08-04 20:02:13 +00001193 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1194 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, o->lsdb);
1195 break;
1196
1197 default:
1198 assert (0);
1199 break;
1200 }
1201
1202 vty_out (vty, "%s", VNL);
1203 return CMD_SUCCESS;
1204}
1205
1206ALIAS (show_ipv6_ospf6_database_type_adv_router_linkstate_id,
1207 show_ipv6_ospf6_database_type_adv_router_linkstate_id_detail_cmd,
1208 "show ipv6 ospf6 database "
1209 "(router|network|inter-prefix|inter-router|as-external|"
1210 "group-membership|type-7|link|intra-prefix) "
1211 "adv-router A.B.C.D linkstate-id A.B.C.D "
1212 "(dump|internal)",
1213 SHOW_STR
1214 IPV6_STR
1215 OSPF6_STR
1216 "Display Link state database\n"
1217 "Display Router LSAs\n"
1218 "Display Network LSAs\n"
1219 "Display Inter-Area-Prefix LSAs\n"
1220 "Display Inter-Area-Router LSAs\n"
1221 "Display As-External LSAs\n"
1222 "Display Group-Membership LSAs\n"
1223 "Display Type-7 LSAs\n"
1224 "Display Link LSAs\n"
1225 "Display Intra-Area-Prefix LSAs\n"
1226 "Search by Advertising Router\n"
1227 "Specify Advertising Router as IPv4 address notation\n"
1228 "Search by Link state ID\n"
1229 "Specify Link state ID as IPv4 address notation\n"
hasso508e53e2004-05-18 18:57:06 +00001230 "Dump LSAs\n"
1231 "Display LSA's internal information\n"
1232 );
1233
1234DEFUN (show_ipv6_ospf6_database_self_originated,
1235 show_ipv6_ospf6_database_self_originated_cmd,
1236 "show ipv6 ospf6 database self-originated",
1237 SHOW_STR
1238 IPV6_STR
1239 OSPF6_STR
hasso508e53e2004-05-18 18:57:06 +00001240 "Display Self-originated LSAs\n"
1241 )
1242{
hasso049207c2004-08-04 20:02:13 +00001243 int level;
hasso52dc7ee2004-09-23 19:18:23 +00001244 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +00001245 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +00001246 struct ospf6_area *oa;
1247 struct ospf6_interface *oi;
1248 u_int32_t adv_router = 0;
hasso508e53e2004-05-18 18:57:06 +00001249
1250 OSPF6_CMD_CHECK_RUNNING ();
1251
hasso049207c2004-08-04 20:02:13 +00001252 level = parse_show_level (argc, argv);
hasso508e53e2004-05-18 18:57:06 +00001253
hasso049207c2004-08-04 20:02:13 +00001254 adv_router = o->router_id;
hasso508e53e2004-05-18 18:57:06 +00001255
paul1eb8ef22005-04-07 07:30:20 +00001256 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +00001257 {
hasso049207c2004-08-04 20:02:13 +00001258 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1259 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oa->lsdb);
hasso508e53e2004-05-18 18:57:06 +00001260 }
hasso049207c2004-08-04 20:02:13 +00001261
paul1eb8ef22005-04-07 07:30:20 +00001262 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +00001263 {
paul1eb8ef22005-04-07 07:30:20 +00001264 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso508e53e2004-05-18 18:57:06 +00001265 {
hasso049207c2004-08-04 20:02:13 +00001266 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1267 oi->interface->name, oa->name, VNL, VNL);
1268 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oi->lsdb);
hasso508e53e2004-05-18 18:57:06 +00001269 }
1270 }
1271
hasso049207c2004-08-04 20:02:13 +00001272 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1273 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, o->lsdb);
1274
1275 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +00001276 return CMD_SUCCESS;
1277}
1278
1279ALIAS (show_ipv6_ospf6_database_self_originated,
1280 show_ipv6_ospf6_database_self_originated_detail_cmd,
1281 "show ipv6 ospf6 database self-originated "
1282 "(detail|dump|internal)",
1283 SHOW_STR
1284 IPV6_STR
1285 OSPF6_STR
hasso508e53e2004-05-18 18:57:06 +00001286 "Display Self-originated LSAs\n"
1287 "Display details of LSAs\n"
1288 "Dump LSAs\n"
1289 "Display LSA's internal information\n"
hasso049207c2004-08-04 20:02:13 +00001290 )
hasso508e53e2004-05-18 18:57:06 +00001291
1292DEFUN (show_ipv6_ospf6_database_type_self_originated,
1293 show_ipv6_ospf6_database_type_self_originated_cmd,
1294 "show ipv6 ospf6 database "
1295 "(router|network|inter-prefix|inter-router|as-external|"
1296 "group-membership|type-7|link|intra-prefix) self-originated",
1297 SHOW_STR
1298 IPV6_STR
1299 OSPF6_STR
1300 "Display Link state database\n"
1301 "Display Router LSAs\n"
1302 "Display Network LSAs\n"
1303 "Display Inter-Area-Prefix LSAs\n"
1304 "Display Inter-Area-Router LSAs\n"
1305 "Display As-External LSAs\n"
1306 "Display Group-Membership LSAs\n"
1307 "Display Type-7 LSAs\n"
1308 "Display Link LSAs\n"
1309 "Display Intra-Area-Prefix LSAs\n"
1310 "Display Self-originated LSAs\n"
1311 )
1312{
hasso049207c2004-08-04 20:02:13 +00001313 int level;
hasso52dc7ee2004-09-23 19:18:23 +00001314 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +00001315 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +00001316 struct ospf6_area *oa;
1317 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +00001318 u_int16_t type = 0;
hasso049207c2004-08-04 20:02:13 +00001319 u_int32_t adv_router = 0;
hasso508e53e2004-05-18 18:57:06 +00001320
1321 OSPF6_CMD_CHECK_RUNNING ();
1322
hasso049207c2004-08-04 20:02:13 +00001323 type = parse_type_spec (argc, argv);
1324 argc--;
1325 argv++;
1326 level = parse_show_level (argc, argv);
hasso508e53e2004-05-18 18:57:06 +00001327
hasso049207c2004-08-04 20:02:13 +00001328 adv_router = o->router_id;
hasso508e53e2004-05-18 18:57:06 +00001329
hasso049207c2004-08-04 20:02:13 +00001330 switch (OSPF6_LSA_SCOPE (type))
1331 {
hasso6452df02004-08-15 05:52:07 +00001332 case OSPF6_SCOPE_AREA:
paul1eb8ef22005-04-07 07:30:20 +00001333 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001334 {
hasso049207c2004-08-04 20:02:13 +00001335 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1336 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oa->lsdb);
1337 }
1338 break;
hasso508e53e2004-05-18 18:57:06 +00001339
hasso6452df02004-08-15 05:52:07 +00001340 case OSPF6_SCOPE_LINKLOCAL:
paul1eb8ef22005-04-07 07:30:20 +00001341 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001342 {
paul1eb8ef22005-04-07 07:30:20 +00001343 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +00001344 {
hasso049207c2004-08-04 20:02:13 +00001345 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1346 oi->interface->name, oa->name, VNL, VNL);
1347 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oi->lsdb);
1348 }
1349 }
1350 break;
1351
hasso6452df02004-08-15 05:52:07 +00001352 case OSPF6_SCOPE_AS:
hasso049207c2004-08-04 20:02:13 +00001353 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1354 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, o->lsdb);
1355 break;
1356
1357 default:
1358 assert (0);
1359 break;
hasso508e53e2004-05-18 18:57:06 +00001360 }
1361
hasso049207c2004-08-04 20:02:13 +00001362 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +00001363 return CMD_SUCCESS;
1364}
1365
1366ALIAS (show_ipv6_ospf6_database_type_self_originated,
1367 show_ipv6_ospf6_database_type_self_originated_detail_cmd,
1368 "show ipv6 ospf6 database "
1369 "(router|network|inter-prefix|inter-router|as-external|"
1370 "group-membership|type-7|link|intra-prefix) self-originated "
1371 "(detail|dump|internal)",
1372 SHOW_STR
1373 IPV6_STR
1374 OSPF6_STR
1375 "Display Link state database\n"
1376 "Display Router LSAs\n"
1377 "Display Network LSAs\n"
1378 "Display Inter-Area-Prefix LSAs\n"
1379 "Display Inter-Area-Router LSAs\n"
1380 "Display As-External LSAs\n"
1381 "Display Group-Membership LSAs\n"
1382 "Display Type-7 LSAs\n"
1383 "Display Link LSAs\n"
1384 "Display Intra-Area-Prefix LSAs\n"
1385 "Display Self-originated LSAs\n"
1386 "Display details of LSAs\n"
1387 "Dump LSAs\n"
1388 "Display LSA's internal information\n"
1389 );
1390
hasso049207c2004-08-04 20:02:13 +00001391DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id,
1392 show_ipv6_ospf6_database_type_self_originated_linkstate_id_cmd,
1393 "show ipv6 ospf6 database "
1394 "(router|network|inter-prefix|inter-router|as-external|"
1395 "group-membership|type-7|link|intra-prefix) self-originated "
1396 "linkstate-id A.B.C.D",
1397 SHOW_STR
1398 IPV6_STR
1399 OSPF6_STR
1400 "Display Link state database\n"
1401 "Display Router LSAs\n"
1402 "Display Network LSAs\n"
1403 "Display Inter-Area-Prefix LSAs\n"
1404 "Display Inter-Area-Router LSAs\n"
1405 "Display As-External LSAs\n"
1406 "Display Group-Membership LSAs\n"
1407 "Display Type-7 LSAs\n"
1408 "Display Link LSAs\n"
1409 "Display Intra-Area-Prefix LSAs\n"
1410 "Display Self-originated LSAs\n"
1411 "Search by Link state ID\n"
1412 "Specify Link state ID as IPv4 address notation\n"
1413 )
1414{
1415 int level;
hasso52dc7ee2004-09-23 19:18:23 +00001416 struct listnode *i, *j;
hasso049207c2004-08-04 20:02:13 +00001417 struct ospf6 *o = ospf6;
1418 struct ospf6_area *oa;
1419 struct ospf6_interface *oi;
1420 u_int16_t type = 0;
1421 u_int32_t adv_router = 0;
1422 u_int32_t id = 0;
1423
1424 OSPF6_CMD_CHECK_RUNNING ();
1425
1426 type = parse_type_spec (argc, argv);
1427 argc--;
1428 argv++;
1429
hasso6452df02004-08-15 05:52:07 +00001430 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
hasso049207c2004-08-04 20:02:13 +00001431 {
1432 vty_out (vty, "Link State ID is not parsable: %s%s",
1433 argv[0], VNL);
1434 return CMD_SUCCESS;
1435 }
1436
1437 argc--;
1438 argv++;
1439 level = parse_show_level (argc, argv);
1440
1441 adv_router = o->router_id;
1442
1443 switch (OSPF6_LSA_SCOPE (type))
1444 {
hasso6452df02004-08-15 05:52:07 +00001445 case OSPF6_SCOPE_AREA:
paul1eb8ef22005-04-07 07:30:20 +00001446 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001447 {
hasso049207c2004-08-04 20:02:13 +00001448 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1449 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);
1450 }
1451 break;
1452
hasso6452df02004-08-15 05:52:07 +00001453 case OSPF6_SCOPE_LINKLOCAL:
paul1eb8ef22005-04-07 07:30:20 +00001454 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001455 {
paul1eb8ef22005-04-07 07:30:20 +00001456 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +00001457 {
hasso049207c2004-08-04 20:02:13 +00001458 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1459 oi->interface->name, oa->name, VNL, VNL);
1460 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);
1461 }
1462 }
1463 break;
1464
hasso6452df02004-08-15 05:52:07 +00001465 case OSPF6_SCOPE_AS:
hasso049207c2004-08-04 20:02:13 +00001466 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1467 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, o->lsdb);
1468 break;
1469
1470 default:
1471 assert (0);
1472 break;
1473 }
1474
1475 vty_out (vty, "%s", VNL);
1476 return CMD_SUCCESS;
1477}
1478
1479ALIAS (show_ipv6_ospf6_database_type_self_originated_linkstate_id,
1480 show_ipv6_ospf6_database_type_self_originated_linkstate_id_detail_cmd,
1481 "show ipv6 ospf6 database "
1482 "(router|network|inter-prefix|inter-router|as-external|"
1483 "group-membership|type-7|link|intra-prefix) self-originated "
1484 "linkstate-id A.B.C.D (detail|dump|internal)",
1485 SHOW_STR
1486 IPV6_STR
1487 OSPF6_STR
1488 "Display Link state database\n"
1489 "Display Router LSAs\n"
1490 "Display Network LSAs\n"
1491 "Display Inter-Area-Prefix LSAs\n"
1492 "Display Inter-Area-Router LSAs\n"
1493 "Display As-External LSAs\n"
1494 "Display Group-Membership LSAs\n"
1495 "Display Type-7 LSAs\n"
1496 "Display Link LSAs\n"
1497 "Display Intra-Area-Prefix LSAs\n"
1498 "Display Self-originated LSAs\n"
1499 "Search by Link state ID\n"
1500 "Specify Link state ID as IPv4 address notation\n"
1501 "Display details of LSAs\n"
1502 "Dump LSAs\n"
1503 "Display LSA's internal information\n"
1504 );
1505
hasso508e53e2004-05-18 18:57:06 +00001506DEFUN (show_ipv6_ospf6_database_type_id_self_originated,
1507 show_ipv6_ospf6_database_type_id_self_originated_cmd,
1508 "show ipv6 ospf6 database "
1509 "(router|network|inter-prefix|inter-router|as-external|"
1510 "group-membership|type-7|link|intra-prefix) A.B.C.D self-originated",
1511 SHOW_STR
1512 IPV6_STR
1513 OSPF6_STR
1514 "Display Link state database\n"
1515 "Display Router LSAs\n"
1516 "Display Network LSAs\n"
1517 "Display Inter-Area-Prefix LSAs\n"
1518 "Display Inter-Area-Router LSAs\n"
1519 "Display As-External LSAs\n"
1520 "Display Group-Membership LSAs\n"
1521 "Display Type-7 LSAs\n"
1522 "Display Link LSAs\n"
1523 "Display Intra-Area-Prefix LSAs\n"
1524 "Specify Link state ID as IPv4 address notation\n"
1525 "Display Self-originated LSAs\n"
1526 )
1527{
hasso049207c2004-08-04 20:02:13 +00001528 int level;
hasso52dc7ee2004-09-23 19:18:23 +00001529 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +00001530 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +00001531 struct ospf6_area *oa;
1532 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +00001533 u_int16_t type = 0;
hasso049207c2004-08-04 20:02:13 +00001534 u_int32_t adv_router = 0;
hasso508e53e2004-05-18 18:57:06 +00001535 u_int32_t id = 0;
1536
1537 OSPF6_CMD_CHECK_RUNNING ();
1538
hasso049207c2004-08-04 20:02:13 +00001539 type = parse_type_spec (argc, argv);
1540 argc--;
1541 argv++;
hasso508e53e2004-05-18 18:57:06 +00001542
hasso6452df02004-08-15 05:52:07 +00001543 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
hasso508e53e2004-05-18 18:57:06 +00001544 {
1545 vty_out (vty, "Link State ID is not parsable: %s%s",
hasso049207c2004-08-04 20:02:13 +00001546 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +00001547 return CMD_SUCCESS;
1548 }
1549
hasso049207c2004-08-04 20:02:13 +00001550 argc--;
1551 argv++;
1552 level = parse_show_level (argc, argv);
1553
1554 adv_router = o->router_id;
1555
1556 switch (OSPF6_LSA_SCOPE (type))
hasso508e53e2004-05-18 18:57:06 +00001557 {
hasso6452df02004-08-15 05:52:07 +00001558 case OSPF6_SCOPE_AREA:
paul1eb8ef22005-04-07 07:30:20 +00001559 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001560 {
hasso049207c2004-08-04 20:02:13 +00001561 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1562 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);
1563 }
1564 break;
1565
hasso6452df02004-08-15 05:52:07 +00001566 case OSPF6_SCOPE_LINKLOCAL:
paul1eb8ef22005-04-07 07:30:20 +00001567 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001568 {
paul1eb8ef22005-04-07 07:30:20 +00001569 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +00001570 {
hasso049207c2004-08-04 20:02:13 +00001571 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1572 oi->interface->name, oa->name, VNL, VNL);
1573 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);
1574 }
1575 }
1576 break;
1577
hasso6452df02004-08-15 05:52:07 +00001578 case OSPF6_SCOPE_AS:
hasso049207c2004-08-04 20:02:13 +00001579 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1580 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, o->lsdb);
1581 break;
1582
1583 default:
1584 assert (0);
1585 break;
hasso508e53e2004-05-18 18:57:06 +00001586 }
1587
hasso049207c2004-08-04 20:02:13 +00001588 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +00001589 return CMD_SUCCESS;
1590}
1591
1592ALIAS (show_ipv6_ospf6_database_type_id_self_originated,
1593 show_ipv6_ospf6_database_type_id_self_originated_detail_cmd,
1594 "show ipv6 ospf6 database "
1595 "(router|network|inter-prefix|inter-router|as-external|"
1596 "group-membership|type-7|link|intra-prefix) A.B.C.D self-originated "
hasso049207c2004-08-04 20:02:13 +00001597 "(detail|dump|internal)",
hasso508e53e2004-05-18 18:57:06 +00001598 SHOW_STR
1599 IPV6_STR
1600 OSPF6_STR
1601 "Display Link state database\n"
1602 "Display Router LSAs\n"
1603 "Display Network LSAs\n"
1604 "Display Inter-Area-Prefix LSAs\n"
1605 "Display Inter-Area-Router LSAs\n"
1606 "Display As-External LSAs\n"
1607 "Display Group-Membership LSAs\n"
1608 "Display Type-7 LSAs\n"
1609 "Display Link LSAs\n"
1610 "Display Intra-Area-Prefix LSAs\n"
hasso508e53e2004-05-18 18:57:06 +00001611 "Display Self-originated LSAs\n"
hasso049207c2004-08-04 20:02:13 +00001612 "Search by Link state ID\n"
1613 "Specify Link state ID as IPv4 address notation\n"
hasso508e53e2004-05-18 18:57:06 +00001614 "Display details of LSAs\n"
1615 "Dump LSAs\n"
1616 "Display LSA's internal information\n"
1617 );
1618
hasso6452df02004-08-15 05:52:07 +00001619
1620DEFUN (show_ipv6_ospf6_border_routers,
1621 show_ipv6_ospf6_border_routers_cmd,
1622 "show ipv6 ospf6 border-routers",
1623 SHOW_STR
1624 IP6_STR
1625 OSPF6_STR
1626 "Display routing table for ABR and ASBR\n"
1627 )
1628{
1629 u_int32_t adv_router;
1630 void (*showfunc) (struct vty *, struct ospf6_route *);
1631 struct ospf6_route *ro;
1632 struct prefix prefix;
1633
1634 OSPF6_CMD_CHECK_RUNNING ();
1635
1636 if (argc && ! strcmp ("detail", argv[0]))
1637 {
1638 showfunc = ospf6_route_show_detail;
1639 argc--;
1640 argv++;
1641 }
1642 else
1643 showfunc = ospf6_brouter_show;
1644
1645 if (argc)
1646 {
1647 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
1648 {
1649 vty_out (vty, "Router ID is not parsable: %s%s", argv[0], VNL);
1650 return CMD_SUCCESS;
1651 }
1652
1653 ospf6_linkstate_prefix (adv_router, 0, &prefix);
1654 ro = ospf6_route_lookup (&prefix, ospf6->brouter_table);
1655 ospf6_route_show_detail (vty, ro);
1656 return CMD_SUCCESS;
1657 }
1658
1659 if (showfunc == ospf6_brouter_show)
1660 ospf6_brouter_show_header (vty);
1661
1662 for (ro = ospf6_route_head (ospf6->brouter_table); ro;
1663 ro = ospf6_route_next (ro))
1664 (*showfunc) (vty, ro);
1665
1666 return CMD_SUCCESS;
1667}
1668
1669ALIAS (show_ipv6_ospf6_border_routers,
1670 show_ipv6_ospf6_border_routers_detail_cmd,
1671 "show ipv6 ospf6 border-routers (A.B.C.D|detail)",
1672 SHOW_STR
1673 IP6_STR
1674 OSPF6_STR
1675 "Display routing table for ABR and ASBR\n"
1676 "Specify Router-ID\n"
1677 "Display Detail\n"
1678 );
1679
hasso4846ef62004-09-03 06:04:00 +00001680DEFUN (show_ipv6_ospf6_linkstate,
1681 show_ipv6_ospf6_linkstate_cmd,
1682 "show ipv6 ospf6 linkstate",
1683 SHOW_STR
1684 IP6_STR
1685 OSPF6_STR
1686 "Display linkstate routing table\n"
1687 )
1688{
hasso52dc7ee2004-09-23 19:18:23 +00001689 struct listnode *node;
hasso4846ef62004-09-03 06:04:00 +00001690 struct ospf6_area *oa;
1691
paul1eb8ef22005-04-07 07:30:20 +00001692 for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa))
hasso4846ef62004-09-03 06:04:00 +00001693 {
hasso4846ef62004-09-03 06:04:00 +00001694 vty_out (vty, "%s SPF Result in Area %s%s%s",
1695 VNL, oa->name, VNL, VNL);
1696 ospf6_linkstate_table_show (vty, argc, argv, oa->spf_table);
1697 }
1698
1699 vty_out (vty, "%s", VNL);
1700 return CMD_SUCCESS;
1701}
1702
1703ALIAS (show_ipv6_ospf6_linkstate,
1704 show_ipv6_ospf6_linkstate_router_cmd,
1705 "show ipv6 ospf6 linkstate router A.B.C.D",
1706 SHOW_STR
1707 IP6_STR
1708 OSPF6_STR
1709 "Display linkstate routing table\n"
1710 "Display Router Entry\n"
1711 "Specify Router ID as IPv4 address notation\n"
1712 );
1713
1714ALIAS (show_ipv6_ospf6_linkstate,
1715 show_ipv6_ospf6_linkstate_network_cmd,
1716 "show ipv6 ospf6 linkstate network A.B.C.D A.B.C.D",
1717 SHOW_STR
1718 IP6_STR
1719 OSPF6_STR
1720 "Display linkstate routing table\n"
1721 "Display Network Entry\n"
1722 "Specify Router ID as IPv4 address notation\n"
1723 "Specify Link state ID as IPv4 address notation\n"
1724 );
1725
1726DEFUN (show_ipv6_ospf6_linkstate_detail,
1727 show_ipv6_ospf6_linkstate_detail_cmd,
1728 "show ipv6 ospf6 linkstate detail",
1729 SHOW_STR
1730 IP6_STR
1731 OSPF6_STR
1732 "Display linkstate routing table\n"
1733 )
1734{
paul0c083ee2004-10-10 12:54:58 +00001735 const char *sargv[CMD_ARGC_MAX];
hasso4846ef62004-09-03 06:04:00 +00001736 int i, sargc;
hasso52dc7ee2004-09-23 19:18:23 +00001737 struct listnode *node;
hasso4846ef62004-09-03 06:04:00 +00001738 struct ospf6_area *oa;
1739
1740 /* copy argv to sargv and then append "detail" */
1741 for (i = 0; i < argc; i++)
1742 sargv[i] = argv[i];
1743 sargc = argc;
1744 sargv[sargc++] = "detail";
1745 sargv[sargc] = NULL;
1746
paul1eb8ef22005-04-07 07:30:20 +00001747 for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa))
hasso4846ef62004-09-03 06:04:00 +00001748 {
hasso4846ef62004-09-03 06:04:00 +00001749 vty_out (vty, "%s SPF Result in Area %s%s%s",
1750 VNL, oa->name, VNL, VNL);
1751 ospf6_linkstate_table_show (vty, sargc, sargv, oa->spf_table);
1752 }
1753
1754 vty_out (vty, "%s", VNL);
1755 return CMD_SUCCESS;
1756}
hasso6452df02004-08-15 05:52:07 +00001757
paul718e3742002-12-13 20:15:29 +00001758/* Install ospf related commands. */
1759void
1760ospf6_init ()
1761{
hasso1e058382004-09-01 21:36:14 +00001762 ospf6_top_init ();
1763 ospf6_area_init ();
1764 ospf6_interface_init ();
1765 ospf6_neighbor_init ();
1766 ospf6_zebra_init ();
1767
1768 ospf6_lsa_init ();
1769 ospf6_spf_init ();
1770 ospf6_intra_init ();
1771 ospf6_asbr_init ();
1772 ospf6_abr_init ();
1773
hassoef1bbf52004-10-08 12:04:21 +00001774#ifdef HAVE_SNMP
paul0c083ee2004-10-10 12:54:58 +00001775 ospf6_snmp_init (master);
hassoef1bbf52004-10-08 12:04:21 +00001776#endif /*HAVE_SNMP*/
1777
hasso508e53e2004-05-18 18:57:06 +00001778 install_node (&debug_node, config_write_ospf6_debug);
paul718e3742002-12-13 20:15:29 +00001779
hasso508e53e2004-05-18 18:57:06 +00001780 install_element_ospf6_debug_message ();
1781 install_element_ospf6_debug_lsa ();
1782 install_element_ospf6_debug_interface ();
1783 install_element_ospf6_debug_neighbor ();
1784 install_element_ospf6_debug_zebra ();
1785 install_element_ospf6_debug_spf ();
1786 install_element_ospf6_debug_route ();
Paul Jakmacb4b8842006-05-15 10:39:30 +00001787 install_element_ospf6_debug_brouter ();
hasso508e53e2004-05-18 18:57:06 +00001788 install_element_ospf6_debug_asbr ();
hasso6452df02004-08-15 05:52:07 +00001789 install_element_ospf6_debug_abr ();
hasso1e058382004-09-01 21:36:14 +00001790 install_element_ospf6_debug_flood ();
hasso508e53e2004-05-18 18:57:06 +00001791
paul718e3742002-12-13 20:15:29 +00001792 install_element (VIEW_NODE, &show_version_ospf6_cmd);
paul718e3742002-12-13 20:15:29 +00001793 install_element (ENABLE_NODE, &show_version_ospf6_cmd);
hasso049207c2004-08-04 20:02:13 +00001794
hasso6452df02004-08-15 05:52:07 +00001795 install_element (VIEW_NODE, &show_ipv6_ospf6_border_routers_cmd);
1796 install_element (VIEW_NODE, &show_ipv6_ospf6_border_routers_detail_cmd);
1797 install_element (ENABLE_NODE, &show_ipv6_ospf6_border_routers_cmd);
1798 install_element (ENABLE_NODE, &show_ipv6_ospf6_border_routers_detail_cmd);
1799
hasso4846ef62004-09-03 06:04:00 +00001800 install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_cmd);
1801 install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_router_cmd);
1802 install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_network_cmd);
1803 install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_detail_cmd);
1804 install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_cmd);
1805 install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_router_cmd);
1806 install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_network_cmd);
1807 install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_detail_cmd);
1808
hasso049207c2004-08-04 20:02:13 +00001809#define INSTALL(n,c) \
hassob31b8132005-05-31 10:24:28 +00001810 install_element (n ## _NODE, &show_ipv6_ospf6_ ## c)
hasso049207c2004-08-04 20:02:13 +00001811
1812 INSTALL (VIEW, database_cmd);
1813 INSTALL (VIEW, database_detail_cmd);
1814 INSTALL (VIEW, database_type_cmd);
1815 INSTALL (VIEW, database_type_detail_cmd);
1816 INSTALL (VIEW, database_id_cmd);
1817 INSTALL (VIEW, database_id_detail_cmd);
1818 INSTALL (VIEW, database_linkstate_id_cmd);
1819 INSTALL (VIEW, database_linkstate_id_detail_cmd);
1820 INSTALL (VIEW, database_router_cmd);
1821 INSTALL (VIEW, database_router_detail_cmd);
1822 INSTALL (VIEW, database_adv_router_cmd);
1823 INSTALL (VIEW, database_adv_router_detail_cmd);
1824 INSTALL (VIEW, database_type_id_cmd);
1825 INSTALL (VIEW, database_type_id_detail_cmd);
1826 INSTALL (VIEW, database_type_linkstate_id_cmd);
1827 INSTALL (VIEW, database_type_linkstate_id_detail_cmd);
1828 INSTALL (VIEW, database_type_router_cmd);
1829 INSTALL (VIEW, database_type_router_detail_cmd);
1830 INSTALL (VIEW, database_type_adv_router_cmd);
1831 INSTALL (VIEW, database_type_adv_router_detail_cmd);
1832 INSTALL (VIEW, database_adv_router_linkstate_id_cmd);
1833 INSTALL (VIEW, database_adv_router_linkstate_id_detail_cmd);
1834 INSTALL (VIEW, database_id_router_cmd);
1835 INSTALL (VIEW, database_id_router_detail_cmd);
1836 INSTALL (VIEW, database_type_id_router_cmd);
1837 INSTALL (VIEW, database_type_id_router_detail_cmd);
1838 INSTALL (VIEW, database_type_adv_router_linkstate_id_cmd);
1839 INSTALL (VIEW, database_type_adv_router_linkstate_id_detail_cmd);
1840 INSTALL (VIEW, database_self_originated_cmd);
1841 INSTALL (VIEW, database_self_originated_detail_cmd);
1842 INSTALL (VIEW, database_type_self_originated_cmd);
1843 INSTALL (VIEW, database_type_self_originated_detail_cmd);
1844 INSTALL (VIEW, database_type_id_self_originated_cmd);
1845 INSTALL (VIEW, database_type_id_self_originated_detail_cmd);
1846 INSTALL (VIEW, database_type_self_originated_linkstate_id_cmd);
1847 INSTALL (VIEW, database_type_self_originated_linkstate_id_detail_cmd);
hasso049207c2004-08-04 20:02:13 +00001848
1849 INSTALL (ENABLE, database_cmd);
1850 INSTALL (ENABLE, database_detail_cmd);
1851 INSTALL (ENABLE, database_type_cmd);
1852 INSTALL (ENABLE, database_type_detail_cmd);
1853 INSTALL (ENABLE, database_id_cmd);
1854 INSTALL (ENABLE, database_id_detail_cmd);
1855 INSTALL (ENABLE, database_linkstate_id_cmd);
1856 INSTALL (ENABLE, database_linkstate_id_detail_cmd);
1857 INSTALL (ENABLE, database_router_cmd);
1858 INSTALL (ENABLE, database_router_detail_cmd);
1859 INSTALL (ENABLE, database_adv_router_cmd);
1860 INSTALL (ENABLE, database_adv_router_detail_cmd);
1861 INSTALL (ENABLE, database_type_id_cmd);
1862 INSTALL (ENABLE, database_type_id_detail_cmd);
1863 INSTALL (ENABLE, database_type_linkstate_id_cmd);
1864 INSTALL (ENABLE, database_type_linkstate_id_detail_cmd);
1865 INSTALL (ENABLE, database_type_router_cmd);
1866 INSTALL (ENABLE, database_type_router_detail_cmd);
1867 INSTALL (ENABLE, database_type_adv_router_cmd);
1868 INSTALL (ENABLE, database_type_adv_router_detail_cmd);
1869 INSTALL (ENABLE, database_adv_router_linkstate_id_cmd);
1870 INSTALL (ENABLE, database_adv_router_linkstate_id_detail_cmd);
1871 INSTALL (ENABLE, database_id_router_cmd);
1872 INSTALL (ENABLE, database_id_router_detail_cmd);
1873 INSTALL (ENABLE, database_type_id_router_cmd);
1874 INSTALL (ENABLE, database_type_id_router_detail_cmd);
1875 INSTALL (ENABLE, database_type_adv_router_linkstate_id_cmd);
1876 INSTALL (ENABLE, database_type_adv_router_linkstate_id_detail_cmd);
1877 INSTALL (ENABLE, database_self_originated_cmd);
1878 INSTALL (ENABLE, database_self_originated_detail_cmd);
1879 INSTALL (ENABLE, database_type_self_originated_cmd);
1880 INSTALL (ENABLE, database_type_self_originated_detail_cmd);
1881 INSTALL (ENABLE, database_type_id_self_originated_cmd);
1882 INSTALL (ENABLE, database_type_id_self_originated_detail_cmd);
1883 INSTALL (ENABLE, database_type_self_originated_linkstate_id_cmd);
1884 INSTALL (ENABLE, database_type_self_originated_linkstate_id_detail_cmd);
paul718e3742002-12-13 20:15:29 +00001885
hasso508e53e2004-05-18 18:57:06 +00001886 /* Make ospf protocol socket. */
1887 ospf6_serv_sock ();
1888 thread_add_read (master, ospf6_receive, NULL, ospf6_sock);
paul718e3742002-12-13 20:15:29 +00001889}
1890
paul718e3742002-12-13 20:15:29 +00001891