blob: 604413a7bc22655c144fa95da4412e94280fa8aa [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);
117 config_write_ospf6_debug_asbr (vty);
hasso049207c2004-08-04 20:02:13 +0000118 config_write_ospf6_debug_abr (vty);
hasso1e058382004-09-01 21:36:14 +0000119 config_write_ospf6_debug_flood (vty);
hasso049207c2004-08-04 20:02:13 +0000120 vty_out (vty, "!%s", VNL);
paul718e3742002-12-13 20:15:29 +0000121 return 0;
122}
123
hasso049207c2004-08-04 20:02:13 +0000124#define AREA_LSDB_TITLE_FORMAT \
125 "%s Area Scoped Link State Database (Area %s)%s%s"
126#define IF_LSDB_TITLE_FORMAT \
127 "%s I/F Scoped Link State Database (I/F %s in Area %s)%s%s"
128#define AS_LSDB_TITLE_FORMAT \
129 "%s AS Scoped Link State Database%s%s"
130
131static int
paul0c083ee2004-10-10 12:54:58 +0000132parse_show_level (int argc, const char *argv[])
hasso049207c2004-08-04 20:02:13 +0000133{
hasso6452df02004-08-15 05:52:07 +0000134 int level = 0;
hasso049207c2004-08-04 20:02:13 +0000135 if (argc)
136 {
137 if (! strncmp (argv[0], "de", 2))
138 level = OSPF6_LSDB_SHOW_LEVEL_DETAIL;
139 else if (! strncmp (argv[0], "du", 2))
140 level = OSPF6_LSDB_SHOW_LEVEL_DUMP;
141 else if (! strncmp (argv[0], "in", 2))
142 level = OSPF6_LSDB_SHOW_LEVEL_INTERNAL;
143 }
144 else
145 level = OSPF6_LSDB_SHOW_LEVEL_NORMAL;
146 return level;
147}
148
149static u_int16_t
paul0c083ee2004-10-10 12:54:58 +0000150parse_type_spec (int argc, const char *argv[])
hasso049207c2004-08-04 20:02:13 +0000151{
hasso6452df02004-08-15 05:52:07 +0000152 u_int16_t type = 0;
hasso049207c2004-08-04 20:02:13 +0000153 assert (argc);
154 if (! strcmp (argv[0], "router"))
155 type = htons (OSPF6_LSTYPE_ROUTER);
156 else if (! strcmp (argv[0], "network"))
157 type = htons (OSPF6_LSTYPE_NETWORK);
158 else if (! strcmp (argv[0], "as-external"))
159 type = htons (OSPF6_LSTYPE_AS_EXTERNAL);
160 else if (! strcmp (argv[0], "intra-prefix"))
161 type = htons (OSPF6_LSTYPE_INTRA_PREFIX);
162 else if (! strcmp (argv[0], "inter-router"))
163 type = htons (OSPF6_LSTYPE_INTER_ROUTER);
164 else if (! strcmp (argv[0], "inter-prefix"))
165 type = htons (OSPF6_LSTYPE_INTER_PREFIX);
166 else if (! strcmp (argv[0], "link"))
167 type = htons (OSPF6_LSTYPE_LINK);
168 return type;
169}
170
hasso508e53e2004-05-18 18:57:06 +0000171DEFUN (show_ipv6_ospf6_database,
172 show_ipv6_ospf6_database_cmd,
173 "show ipv6 ospf6 database",
174 SHOW_STR
175 IPV6_STR
176 OSPF6_STR
177 "Display Link state database\n"
178 )
paul718e3742002-12-13 20:15:29 +0000179{
hasso049207c2004-08-04 20:02:13 +0000180 int level;
hasso52dc7ee2004-09-23 19:18:23 +0000181 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +0000182 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +0000183 struct ospf6_area *oa;
184 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +0000185
186 OSPF6_CMD_CHECK_RUNNING ();
187
hasso049207c2004-08-04 20:02:13 +0000188 level = parse_show_level (argc, argv);
hasso508e53e2004-05-18 18:57:06 +0000189
paul1eb8ef22005-04-07 07:30:20 +0000190 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000191 {
hasso049207c2004-08-04 20:02:13 +0000192 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
193 ospf6_lsdb_show (vty, level, NULL, NULL, NULL, oa->lsdb);
hasso508e53e2004-05-18 18:57:06 +0000194 }
hasso049207c2004-08-04 20:02:13 +0000195
paul1eb8ef22005-04-07 07:30:20 +0000196 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000197 {
paul1eb8ef22005-04-07 07:30:20 +0000198 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso508e53e2004-05-18 18:57:06 +0000199 {
hasso049207c2004-08-04 20:02:13 +0000200 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
201 oi->interface->name, oa->name, VNL, VNL);
202 ospf6_lsdb_show (vty, level, NULL, NULL, NULL, oi->lsdb);
hasso508e53e2004-05-18 18:57:06 +0000203 }
204 }
205
hasso049207c2004-08-04 20:02:13 +0000206 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
207 ospf6_lsdb_show (vty, level, NULL, NULL, NULL, o->lsdb);
208
209 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000210 return CMD_SUCCESS;
211}
212
213ALIAS (show_ipv6_ospf6_database,
214 show_ipv6_ospf6_database_detail_cmd,
215 "show ipv6 ospf6 database (detail|dump|internal)",
216 SHOW_STR
217 IPV6_STR
218 OSPF6_STR
219 "Display Link state database\n"
220 "Display details of LSAs\n"
221 "Dump LSAs\n"
222 "Display LSA's internal information\n"
223 );
224
225DEFUN (show_ipv6_ospf6_database_type,
226 show_ipv6_ospf6_database_type_cmd,
227 "show ipv6 ospf6 database "
228 "(router|network|inter-prefix|inter-router|as-external|"
229 "group-membership|type-7|link|intra-prefix)",
230 SHOW_STR
231 IPV6_STR
232 OSPF6_STR
233 "Display Link state database\n"
234 "Display Router LSAs\n"
235 "Display Network LSAs\n"
236 "Display Inter-Area-Prefix LSAs\n"
237 "Display Inter-Area-Router LSAs\n"
238 "Display As-External LSAs\n"
239 "Display Group-Membership LSAs\n"
240 "Display Type-7 LSAs\n"
241 "Display Link LSAs\n"
242 "Display Intra-Area-Prefix LSAs\n"
243 )
244{
hasso049207c2004-08-04 20:02:13 +0000245 int level;
hasso52dc7ee2004-09-23 19:18:23 +0000246 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +0000247 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +0000248 struct ospf6_area *oa;
249 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +0000250 u_int16_t type = 0;
251
252 OSPF6_CMD_CHECK_RUNNING ();
253
hasso049207c2004-08-04 20:02:13 +0000254 type = parse_type_spec (argc, argv);
255 argc--;
256 argv++;
257 level = parse_show_level (argc, argv);
hasso508e53e2004-05-18 18:57:06 +0000258
hasso049207c2004-08-04 20:02:13 +0000259 switch (OSPF6_LSA_SCOPE (type))
hasso508e53e2004-05-18 18:57:06 +0000260 {
hasso6452df02004-08-15 05:52:07 +0000261 case OSPF6_SCOPE_AREA:
paul1eb8ef22005-04-07 07:30:20 +0000262 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +0000263 {
hasso049207c2004-08-04 20:02:13 +0000264 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
265 ospf6_lsdb_show (vty, level, &type, NULL, NULL, oa->lsdb);
266 }
267 break;
268
hasso6452df02004-08-15 05:52:07 +0000269 case OSPF6_SCOPE_LINKLOCAL:
paul1eb8ef22005-04-07 07:30:20 +0000270 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +0000271 {
paul1eb8ef22005-04-07 07:30:20 +0000272 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +0000273 {
hasso049207c2004-08-04 20:02:13 +0000274 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
275 oi->interface->name, oa->name, VNL, VNL);
276 ospf6_lsdb_show (vty, level, &type, NULL, NULL, oi->lsdb);
277 }
278 }
279 break;
280
hasso6452df02004-08-15 05:52:07 +0000281 case OSPF6_SCOPE_AS:
hasso049207c2004-08-04 20:02:13 +0000282 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
283 ospf6_lsdb_show (vty, level, &type, NULL, NULL, o->lsdb);
284 break;
285
286 default:
287 assert (0);
288 break;
hasso508e53e2004-05-18 18:57:06 +0000289 }
290
hasso049207c2004-08-04 20:02:13 +0000291 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000292 return CMD_SUCCESS;
293}
294
295ALIAS (show_ipv6_ospf6_database_type,
296 show_ipv6_ospf6_database_type_detail_cmd,
297 "show ipv6 ospf6 database "
298 "(router|network|inter-prefix|inter-router|as-external|"
299 "group-membership|type-7|link|intra-prefix) "
300 "(detail|dump|internal)",
301 SHOW_STR
302 IPV6_STR
303 OSPF6_STR
304 "Display Link state database\n"
305 "Display Router LSAs\n"
306 "Display Network LSAs\n"
307 "Display Inter-Area-Prefix LSAs\n"
308 "Display Inter-Area-Router LSAs\n"
309 "Display As-External LSAs\n"
310 "Display Group-Membership LSAs\n"
311 "Display Type-7 LSAs\n"
312 "Display Link LSAs\n"
313 "Display Intra-Area-Prefix LSAs\n"
314 "Display details of LSAs\n"
315 "Dump LSAs\n"
316 "Display LSA's internal information\n"
317 );
318
319DEFUN (show_ipv6_ospf6_database_id,
320 show_ipv6_ospf6_database_id_cmd,
321 "show ipv6 ospf6 database * A.B.C.D",
322 SHOW_STR
323 IPV6_STR
324 OSPF6_STR
325 "Display Link state database\n"
326 "Any Link state Type\n"
327 "Specify Link state ID as IPv4 address notation\n"
328 )
329{
hasso049207c2004-08-04 20:02:13 +0000330 int level;
hasso52dc7ee2004-09-23 19:18:23 +0000331 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +0000332 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +0000333 struct ospf6_area *oa;
334 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +0000335 u_int32_t id = 0;
336
337 OSPF6_CMD_CHECK_RUNNING ();
338
hasso508e53e2004-05-18 18:57:06 +0000339 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
340 {
341 vty_out (vty, "Link State ID is not parsable: %s%s",
hasso049207c2004-08-04 20:02:13 +0000342 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +0000343 return CMD_SUCCESS;
344 }
345
hasso049207c2004-08-04 20:02:13 +0000346 argc--;
347 argv++;
348 level = parse_show_level (argc, argv);
349
paul1eb8ef22005-04-07 07:30:20 +0000350 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000351 {
hasso049207c2004-08-04 20:02:13 +0000352 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
353 ospf6_lsdb_show (vty, level, NULL, &id, NULL, oa->lsdb);
hasso508e53e2004-05-18 18:57:06 +0000354 }
hasso049207c2004-08-04 20:02:13 +0000355
paul1eb8ef22005-04-07 07:30:20 +0000356 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000357 {
paul1eb8ef22005-04-07 07:30:20 +0000358 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso508e53e2004-05-18 18:57:06 +0000359 {
hasso049207c2004-08-04 20:02:13 +0000360 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
361 oi->interface->name, oa->name, VNL, VNL);
362 ospf6_lsdb_show (vty, level, NULL, &id, NULL, oi->lsdb);
hasso508e53e2004-05-18 18:57:06 +0000363 }
364 }
365
hasso049207c2004-08-04 20:02:13 +0000366 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
367 ospf6_lsdb_show (vty, level, NULL, &id, NULL, o->lsdb);
368
369 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000370 return CMD_SUCCESS;
371}
372
373ALIAS (show_ipv6_ospf6_database_id,
374 show_ipv6_ospf6_database_id_detail_cmd,
375 "show ipv6 ospf6 database * A.B.C.D "
376 "(detail|dump|internal)",
377 SHOW_STR
378 IPV6_STR
379 OSPF6_STR
380 "Display Link state database\n"
381 "Any Link state Type\n"
hasso049207c2004-08-04 20:02:13 +0000382 "Specify Link state ID as IPv4 address notation\n"
383 "Display details of LSAs\n"
384 "Dump LSAs\n"
385 "Display LSA's internal information\n"
386 );
387
388ALIAS (show_ipv6_ospf6_database_id,
389 show_ipv6_ospf6_database_linkstate_id_cmd,
390 "show ipv6 ospf6 database linkstate-id A.B.C.D",
391 SHOW_STR
392 IPV6_STR
393 OSPF6_STR
394 "Display Link state database\n"
395 "Search by Link state ID\n"
396 "Specify Link state ID as IPv4 address notation\n"
397 );
398
399ALIAS (show_ipv6_ospf6_database_id,
400 show_ipv6_ospf6_database_linkstate_id_detail_cmd,
401 "show ipv6 ospf6 database linkstate-id A.B.C.D "
402 "(detail|dump|internal)",
403 SHOW_STR
404 IPV6_STR
405 OSPF6_STR
406 "Display Link state database\n"
407 "Search by Link state ID\n"
hasso508e53e2004-05-18 18:57:06 +0000408 "Specify Link state ID as IPv4 address notation\n"
409 "Display details of LSAs\n"
410 "Dump LSAs\n"
411 "Display LSA's internal information\n"
412 );
413
414DEFUN (show_ipv6_ospf6_database_router,
415 show_ipv6_ospf6_database_router_cmd,
416 "show ipv6 ospf6 database * * A.B.C.D",
417 SHOW_STR
418 IPV6_STR
419 OSPF6_STR
420 "Display Link state database\n"
421 "Any Link state Type\n"
422 "Any Link state ID\n"
423 "Specify Advertising Router as IPv4 address notation\n"
424 )
425{
hasso049207c2004-08-04 20:02:13 +0000426 int level;
hasso52dc7ee2004-09-23 19:18:23 +0000427 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +0000428 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +0000429 struct ospf6_area *oa;
430 struct ospf6_interface *oi;
431 u_int32_t adv_router = 0;
hasso508e53e2004-05-18 18:57:06 +0000432
433 OSPF6_CMD_CHECK_RUNNING ();
434
hasso049207c2004-08-04 20:02:13 +0000435 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
hasso508e53e2004-05-18 18:57:06 +0000436 {
437 vty_out (vty, "Advertising Router is not parsable: %s%s",
hasso049207c2004-08-04 20:02:13 +0000438 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +0000439 return CMD_SUCCESS;
440 }
441
hasso049207c2004-08-04 20:02:13 +0000442 argc--;
443 argv++;
444 level = parse_show_level (argc, argv);
445
paul1eb8ef22005-04-07 07:30:20 +0000446 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000447 {
hasso049207c2004-08-04 20:02:13 +0000448 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
449 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oa->lsdb);
hasso508e53e2004-05-18 18:57:06 +0000450 }
hasso049207c2004-08-04 20:02:13 +0000451
paul1eb8ef22005-04-07 07:30:20 +0000452 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000453 {
paul1eb8ef22005-04-07 07:30:20 +0000454 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso508e53e2004-05-18 18:57:06 +0000455 {
hasso049207c2004-08-04 20:02:13 +0000456 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
457 oi->interface->name, oa->name, VNL, VNL);
458 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oi->lsdb);
hasso508e53e2004-05-18 18:57:06 +0000459 }
460 }
461
hasso049207c2004-08-04 20:02:13 +0000462 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
463 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, o->lsdb);
464
465 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000466 return CMD_SUCCESS;
467}
468
469ALIAS (show_ipv6_ospf6_database_router,
470 show_ipv6_ospf6_database_router_detail_cmd,
471 "show ipv6 ospf6 database * * A.B.C.D "
472 "(detail|dump|internal)",
473 SHOW_STR
474 IPV6_STR
475 OSPF6_STR
476 "Display Link state database\n"
477 "Any Link state Type\n"
478 "Any Link state ID\n"
479 "Specify Advertising Router as IPv4 address notation\n"
480 "Display details of LSAs\n"
481 "Dump LSAs\n"
482 "Display LSA's internal information\n"
483 );
484
hasso049207c2004-08-04 20:02:13 +0000485ALIAS (show_ipv6_ospf6_database_router,
486 show_ipv6_ospf6_database_adv_router_cmd,
487 "show ipv6 ospf6 database adv-router A.B.C.D",
488 SHOW_STR
489 IPV6_STR
490 OSPF6_STR
491 "Display Link state database\n"
492 "Search by Advertising Router\n"
493 "Specify Advertising Router as IPv4 address notation\n"
494 );
495
496ALIAS (show_ipv6_ospf6_database_router,
497 show_ipv6_ospf6_database_adv_router_detail_cmd,
498 "show ipv6 ospf6 database adv-router A.B.C.D "
499 "(detail|dump|internal)",
500 SHOW_STR
501 IPV6_STR
502 OSPF6_STR
503 "Display Link state database\n"
504 "Search by Advertising Router\n"
505 "Specify Advertising Router as IPv4 address notation\n"
506 "Display details of LSAs\n"
507 "Dump LSAs\n"
508 "Display LSA's internal information\n"
509 );
510
hasso508e53e2004-05-18 18:57:06 +0000511DEFUN (show_ipv6_ospf6_database_type_id,
512 show_ipv6_ospf6_database_type_id_cmd,
513 "show ipv6 ospf6 database "
514 "(router|network|inter-prefix|inter-router|as-external|"
515 "group-membership|type-7|link|intra-prefix) A.B.C.D",
516 SHOW_STR
517 IPV6_STR
518 OSPF6_STR
519 "Display Link state database\n"
520 "Display Router LSAs\n"
521 "Display Network LSAs\n"
522 "Display Inter-Area-Prefix LSAs\n"
523 "Display Inter-Area-Router LSAs\n"
524 "Display As-External LSAs\n"
525 "Display Group-Membership LSAs\n"
526 "Display Type-7 LSAs\n"
527 "Display Link LSAs\n"
528 "Display Intra-Area-Prefix LSAs\n"
529 "Specify Link state ID as IPv4 address notation\n"
530 )
531{
hasso049207c2004-08-04 20:02:13 +0000532 int level;
hasso52dc7ee2004-09-23 19:18:23 +0000533 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +0000534 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +0000535 struct ospf6_area *oa;
536 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +0000537 u_int16_t type = 0;
538 u_int32_t id = 0;
539
540 OSPF6_CMD_CHECK_RUNNING ();
541
hasso049207c2004-08-04 20:02:13 +0000542 type = parse_type_spec (argc, argv);
543 argc--;
544 argv++;
hasso508e53e2004-05-18 18:57:06 +0000545
hasso049207c2004-08-04 20:02:13 +0000546 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
hasso508e53e2004-05-18 18:57:06 +0000547 {
548 vty_out (vty, "Link state ID is not parsable: %s%s",
hasso049207c2004-08-04 20:02:13 +0000549 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +0000550 return CMD_SUCCESS;
551 }
552
hasso049207c2004-08-04 20:02:13 +0000553 argc--;
554 argv++;
555 level = parse_show_level (argc, argv);
556
557 switch (OSPF6_LSA_SCOPE (type))
hasso508e53e2004-05-18 18:57:06 +0000558 {
hasso6452df02004-08-15 05:52:07 +0000559 case OSPF6_SCOPE_AREA:
paul1eb8ef22005-04-07 07:30:20 +0000560 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +0000561 {
hasso049207c2004-08-04 20:02:13 +0000562 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
563 ospf6_lsdb_show (vty, level, &type, &id, NULL, oa->lsdb);
564 }
565 break;
566
hasso6452df02004-08-15 05:52:07 +0000567 case OSPF6_SCOPE_LINKLOCAL:
paul1eb8ef22005-04-07 07:30:20 +0000568 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +0000569 {
paul1eb8ef22005-04-07 07:30:20 +0000570 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +0000571 {
hasso049207c2004-08-04 20:02:13 +0000572 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
573 oi->interface->name, oa->name, VNL, VNL);
574 ospf6_lsdb_show (vty, level, &type, &id, NULL, oi->lsdb);
575 }
576 }
577 break;
578
hasso6452df02004-08-15 05:52:07 +0000579 case OSPF6_SCOPE_AS:
hasso049207c2004-08-04 20:02:13 +0000580 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
581 ospf6_lsdb_show (vty, level, &type, &id, NULL, o->lsdb);
582 break;
583
584 default:
585 assert (0);
586 break;
hasso508e53e2004-05-18 18:57:06 +0000587 }
588
hasso049207c2004-08-04 20:02:13 +0000589 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000590 return CMD_SUCCESS;
591}
592
593ALIAS (show_ipv6_ospf6_database_type_id,
594 show_ipv6_ospf6_database_type_id_detail_cmd,
595 "show ipv6 ospf6 database "
596 "(router|network|inter-prefix|inter-router|as-external|"
597 "group-membership|type-7|link|intra-prefix) A.B.C.D "
598 "(detail|dump|internal)",
599 SHOW_STR
600 IPV6_STR
601 OSPF6_STR
602 "Display Link state database\n"
603 "Display Router LSAs\n"
604 "Display Network LSAs\n"
605 "Display Inter-Area-Prefix LSAs\n"
606 "Display Inter-Area-Router LSAs\n"
607 "Display As-External LSAs\n"
608 "Display Group-Membership LSAs\n"
609 "Display Type-7 LSAs\n"
610 "Display Link LSAs\n"
611 "Display Intra-Area-Prefix LSAs\n"
612 "Specify Link state ID as IPv4 address notation\n"
613 "Display details of LSAs\n"
614 "Dump LSAs\n"
615 "Display LSA's internal information\n"
616 );
617
hasso049207c2004-08-04 20:02:13 +0000618ALIAS (show_ipv6_ospf6_database_type_id,
619 show_ipv6_ospf6_database_type_linkstate_id_cmd,
620 "show ipv6 ospf6 database "
621 "(router|network|inter-prefix|inter-router|as-external|"
622 "group-membership|type-7|link|intra-prefix) linkstate-id A.B.C.D",
623 SHOW_STR
624 IPV6_STR
625 OSPF6_STR
626 "Display Link state database\n"
627 "Display Router LSAs\n"
628 "Display Network LSAs\n"
629 "Display Inter-Area-Prefix LSAs\n"
630 "Display Inter-Area-Router LSAs\n"
631 "Display As-External LSAs\n"
632 "Display Group-Membership LSAs\n"
633 "Display Type-7 LSAs\n"
634 "Display Link LSAs\n"
635 "Display Intra-Area-Prefix LSAs\n"
636 "Search by Link state ID\n"
637 "Specify Link state ID as IPv4 address notation\n"
638 );
639
640ALIAS (show_ipv6_ospf6_database_type_id,
641 show_ipv6_ospf6_database_type_linkstate_id_detail_cmd,
642 "show ipv6 ospf6 database "
643 "(router|network|inter-prefix|inter-router|as-external|"
644 "group-membership|type-7|link|intra-prefix) linkstate-id A.B.C.D "
645 "(detail|dump|internal)",
646 SHOW_STR
647 IPV6_STR
648 OSPF6_STR
649 "Display Link state database\n"
650 "Display Router LSAs\n"
651 "Display Network LSAs\n"
652 "Display Inter-Area-Prefix LSAs\n"
653 "Display Inter-Area-Router LSAs\n"
654 "Display As-External LSAs\n"
655 "Display Group-Membership LSAs\n"
656 "Display Type-7 LSAs\n"
657 "Display Link LSAs\n"
658 "Display Intra-Area-Prefix LSAs\n"
659 "Search by Link state ID\n"
660 "Specify Link state ID as IPv4 address notation\n"
661 "Display details of LSAs\n"
662 "Dump LSAs\n"
663 "Display LSA's internal information\n"
664 );
665
hasso508e53e2004-05-18 18:57:06 +0000666DEFUN (show_ipv6_ospf6_database_type_router,
667 show_ipv6_ospf6_database_type_router_cmd,
668 "show ipv6 ospf6 database "
669 "(router|network|inter-prefix|inter-router|as-external|"
670 "group-membership|type-7|link|intra-prefix) * A.B.C.D",
671 SHOW_STR
672 IPV6_STR
673 OSPF6_STR
674 "Display Link state database\n"
675 "Display Router LSAs\n"
676 "Display Network LSAs\n"
677 "Display Inter-Area-Prefix LSAs\n"
678 "Display Inter-Area-Router LSAs\n"
679 "Display As-External LSAs\n"
680 "Display Group-Membership LSAs\n"
681 "Display Type-7 LSAs\n"
682 "Display Link LSAs\n"
683 "Display Intra-Area-Prefix LSAs\n"
684 "Any Link state ID\n"
685 "Specify Advertising Router as IPv4 address notation\n"
686 )
687{
hasso049207c2004-08-04 20:02:13 +0000688 int level;
hasso52dc7ee2004-09-23 19:18:23 +0000689 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +0000690 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +0000691 struct ospf6_area *oa;
692 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +0000693 u_int16_t type = 0;
hasso049207c2004-08-04 20:02:13 +0000694 u_int32_t adv_router = 0;
hasso508e53e2004-05-18 18:57:06 +0000695
696 OSPF6_CMD_CHECK_RUNNING ();
697
hasso049207c2004-08-04 20:02:13 +0000698 type = parse_type_spec (argc, argv);
699 argc--;
700 argv++;
hasso508e53e2004-05-18 18:57:06 +0000701
hasso049207c2004-08-04 20:02:13 +0000702 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
hasso508e53e2004-05-18 18:57:06 +0000703 {
704 vty_out (vty, "Advertising Router is not parsable: %s%s",
hasso049207c2004-08-04 20:02:13 +0000705 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +0000706 return CMD_SUCCESS;
707 }
708
hasso049207c2004-08-04 20:02:13 +0000709 argc--;
710 argv++;
711 level = parse_show_level (argc, argv);
712
713 switch (OSPF6_LSA_SCOPE (type))
hasso508e53e2004-05-18 18:57:06 +0000714 {
hasso6452df02004-08-15 05:52:07 +0000715 case OSPF6_SCOPE_AREA:
paul1eb8ef22005-04-07 07:30:20 +0000716 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +0000717 {
hasso049207c2004-08-04 20:02:13 +0000718 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
719 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oa->lsdb);
720 }
721 break;
722
hasso6452df02004-08-15 05:52:07 +0000723 case OSPF6_SCOPE_LINKLOCAL:
paul1eb8ef22005-04-07 07:30:20 +0000724 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +0000725 {
paul1eb8ef22005-04-07 07:30:20 +0000726 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +0000727 {
hasso049207c2004-08-04 20:02:13 +0000728 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
729 oi->interface->name, oa->name, VNL, VNL);
730 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oi->lsdb);
731 }
732 }
733 break;
734
hasso6452df02004-08-15 05:52:07 +0000735 case OSPF6_SCOPE_AS:
hasso049207c2004-08-04 20:02:13 +0000736 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
737 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, o->lsdb);
738 break;
739
740 default:
741 assert (0);
742 break;
hasso508e53e2004-05-18 18:57:06 +0000743 }
744
hasso049207c2004-08-04 20:02:13 +0000745 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000746 return CMD_SUCCESS;
747}
748
749ALIAS (show_ipv6_ospf6_database_type_router,
750 show_ipv6_ospf6_database_type_router_detail_cmd,
751 "show ipv6 ospf6 database "
752 "(router|network|inter-prefix|inter-router|as-external|"
753 "group-membership|type-7|link|intra-prefix) * A.B.C.D "
754 "(detail|dump|internal)",
755 SHOW_STR
756 IPV6_STR
757 OSPF6_STR
758 "Display Link state database\n"
759 "Display Router LSAs\n"
760 "Display Network LSAs\n"
761 "Display Inter-Area-Prefix LSAs\n"
762 "Display Inter-Area-Router LSAs\n"
763 "Display As-External LSAs\n"
764 "Display Group-Membership LSAs\n"
765 "Display Type-7 LSAs\n"
766 "Display Link LSAs\n"
767 "Display Intra-Area-Prefix LSAs\n"
768 "Any Link state ID\n"
769 "Specify Advertising Router as IPv4 address notation\n"
770 "Display details of LSAs\n"
771 "Dump LSAs\n"
772 "Display LSA's internal information\n"
773 );
774
hasso049207c2004-08-04 20:02:13 +0000775ALIAS (show_ipv6_ospf6_database_type_router,
776 show_ipv6_ospf6_database_type_adv_router_cmd,
777 "show ipv6 ospf6 database "
778 "(router|network|inter-prefix|inter-router|as-external|"
779 "group-membership|type-7|link|intra-prefix) adv-router A.B.C.D",
780 SHOW_STR
781 IPV6_STR
782 OSPF6_STR
783 "Display Link state database\n"
784 "Display Router LSAs\n"
785 "Display Network LSAs\n"
786 "Display Inter-Area-Prefix LSAs\n"
787 "Display Inter-Area-Router LSAs\n"
788 "Display As-External LSAs\n"
789 "Display Group-Membership LSAs\n"
790 "Display Type-7 LSAs\n"
791 "Display Link LSAs\n"
792 "Display Intra-Area-Prefix LSAs\n"
793 "Search by Advertising Router\n"
794 "Specify Advertising Router as IPv4 address notation\n"
795 );
796
797ALIAS (show_ipv6_ospf6_database_type_router,
798 show_ipv6_ospf6_database_type_adv_router_detail_cmd,
799 "show ipv6 ospf6 database "
800 "(router|network|inter-prefix|inter-router|as-external|"
801 "group-membership|type-7|link|intra-prefix) adv-router A.B.C.D "
802 "(detail|dump|internal)",
803 SHOW_STR
804 IPV6_STR
805 OSPF6_STR
806 "Display Link state database\n"
807 "Display Router LSAs\n"
808 "Display Network LSAs\n"
809 "Display Inter-Area-Prefix LSAs\n"
810 "Display Inter-Area-Router LSAs\n"
811 "Display As-External LSAs\n"
812 "Display Group-Membership LSAs\n"
813 "Display Type-7 LSAs\n"
814 "Display Link LSAs\n"
815 "Display Intra-Area-Prefix LSAs\n"
816 "Search by Advertising Router\n"
817 "Specify Advertising Router as IPv4 address notation\n"
818 "Display details of LSAs\n"
819 "Dump LSAs\n"
820 "Display LSA's internal information\n"
821 );
822
hasso508e53e2004-05-18 18:57:06 +0000823DEFUN (show_ipv6_ospf6_database_id_router,
824 show_ipv6_ospf6_database_id_router_cmd,
825 "show ipv6 ospf6 database * A.B.C.D A.B.C.D",
826 SHOW_STR
827 IPV6_STR
828 OSPF6_STR
829 "Display Link state database\n"
830 "Any Link state Type\n"
831 "Specify Link state ID as IPv4 address notation\n"
832 "Specify Advertising Router as IPv4 address notation\n"
833 )
834{
hasso049207c2004-08-04 20:02:13 +0000835 int level;
hasso52dc7ee2004-09-23 19:18:23 +0000836 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +0000837 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +0000838 struct ospf6_area *oa;
839 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +0000840 u_int32_t id = 0;
hasso049207c2004-08-04 20:02:13 +0000841 u_int32_t adv_router = 0;
hasso508e53e2004-05-18 18:57:06 +0000842
843 OSPF6_CMD_CHECK_RUNNING ();
844
hasso508e53e2004-05-18 18:57:06 +0000845 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
846 {
847 vty_out (vty, "Link state ID is not parsable: %s%s",
hasso6452df02004-08-15 05:52:07 +0000848 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +0000849 return CMD_SUCCESS;
850 }
851
hasso049207c2004-08-04 20:02:13 +0000852 argc--;
853 argv++;
854
855 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
hasso508e53e2004-05-18 18:57:06 +0000856 {
857 vty_out (vty, "Advertising Router is not parsable: %s%s",
hasso049207c2004-08-04 20:02:13 +0000858 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +0000859 return CMD_SUCCESS;
860 }
861
hasso049207c2004-08-04 20:02:13 +0000862 argc--;
863 argv++;
864 level = parse_show_level (argc, argv);
865
paul1eb8ef22005-04-07 07:30:20 +0000866 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000867 {
hasso049207c2004-08-04 20:02:13 +0000868 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
869 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oa->lsdb);
hasso508e53e2004-05-18 18:57:06 +0000870 }
hasso049207c2004-08-04 20:02:13 +0000871
paul1eb8ef22005-04-07 07:30:20 +0000872 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +0000873 {
paul1eb8ef22005-04-07 07:30:20 +0000874 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso508e53e2004-05-18 18:57:06 +0000875 {
hasso049207c2004-08-04 20:02:13 +0000876 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
877 oi->interface->name, oa->name, VNL, VNL);
878 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oi->lsdb);
hasso508e53e2004-05-18 18:57:06 +0000879 }
880 }
881
hasso049207c2004-08-04 20:02:13 +0000882 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
883 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, o->lsdb);
884
885 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +0000886 return CMD_SUCCESS;
887}
888
889ALIAS (show_ipv6_ospf6_database_id_router,
890 show_ipv6_ospf6_database_id_router_detail_cmd,
891 "show ipv6 ospf6 database * A.B.C.D A.B.C.D "
892 "(detail|dump|internal)",
893 SHOW_STR
894 IPV6_STR
895 OSPF6_STR
896 "Display Link state database\n"
897 "Any Link state Type\n"
898 "Specify Link state ID as IPv4 address notation\n"
899 "Specify Advertising Router as IPv4 address notation\n"
900 "Display details of LSAs\n"
901 "Dump LSAs\n"
902 "Display LSA's internal information\n"
903 );
904
hasso049207c2004-08-04 20:02:13 +0000905DEFUN (show_ipv6_ospf6_database_adv_router_linkstate_id,
906 show_ipv6_ospf6_database_adv_router_linkstate_id_cmd,
907 "show ipv6 ospf6 database adv-router A.B.C.D linkstate-id A.B.C.D",
908 SHOW_STR
909 IPV6_STR
910 OSPF6_STR
911 "Display Link state database\n"
912 "Search by Advertising Router\n"
913 "Specify Advertising Router as IPv4 address notation\n"
914 "Search by Link state ID\n"
915 "Specify Link state ID as IPv4 address notation\n"
916 )
917{
918 int level;
hasso52dc7ee2004-09-23 19:18:23 +0000919 struct listnode *i, *j;
hasso049207c2004-08-04 20:02:13 +0000920 struct ospf6 *o = ospf6;
921 struct ospf6_area *oa;
922 struct ospf6_interface *oi;
923 u_int32_t id = 0;
924 u_int32_t adv_router = 0;
925
926 OSPF6_CMD_CHECK_RUNNING ();
927
928 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
929 {
930 vty_out (vty, "Advertising Router is not parsable: %s%s",
931 argv[0], VNL);
932 return CMD_SUCCESS;
933 }
934
935 argc--;
936 argv++;
937
938 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
939 {
940 vty_out (vty, "Link state ID is not parsable: %s%s",
hasso6452df02004-08-15 05:52:07 +0000941 argv[0], VNL);
hasso049207c2004-08-04 20:02:13 +0000942 return CMD_SUCCESS;
943 }
944
945 argc--;
946 argv++;
947 level = parse_show_level (argc, argv);
948
paul1eb8ef22005-04-07 07:30:20 +0000949 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +0000950 {
hasso049207c2004-08-04 20:02:13 +0000951 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
952 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oa->lsdb);
953 }
954
paul1eb8ef22005-04-07 07:30:20 +0000955 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +0000956 {
paul1eb8ef22005-04-07 07:30:20 +0000957 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +0000958 {
hasso049207c2004-08-04 20:02:13 +0000959 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
960 oi->interface->name, oa->name, VNL, VNL);
961 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oi->lsdb);
962 }
963 }
964
965 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
966 ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, o->lsdb);
967
968 vty_out (vty, "%s", VNL);
969 return CMD_SUCCESS;
970}
971
972ALIAS (show_ipv6_ospf6_database_adv_router_linkstate_id,
973 show_ipv6_ospf6_database_adv_router_linkstate_id_detail_cmd,
974 "show ipv6 ospf6 database adv-router A.B.C.D linkstate-id A.B.C.D "
975 "(detail|dump|internal)",
976 SHOW_STR
977 IPV6_STR
978 OSPF6_STR
979 "Display Link state database\n"
980 "Search by Advertising Router\n"
981 "Specify Advertising Router as IPv4 address notation\n"
982 "Search by Link state ID\n"
983 "Specify Link state ID as IPv4 address notation\n"
984 "Display details of LSAs\n"
985 "Dump LSAs\n"
986 "Display LSA's internal information\n"
987 );
988
hasso508e53e2004-05-18 18:57:06 +0000989DEFUN (show_ipv6_ospf6_database_type_id_router,
990 show_ipv6_ospf6_database_type_id_router_cmd,
991 "show ipv6 ospf6 database "
992 "(router|network|inter-prefix|inter-router|as-external|"
993 "group-membership|type-7|link|intra-prefix) A.B.C.D A.B.C.D",
994 SHOW_STR
995 IPV6_STR
996 OSPF6_STR
997 "Display Link state database\n"
998 "Display Router LSAs\n"
999 "Display Network LSAs\n"
1000 "Display Inter-Area-Prefix LSAs\n"
1001 "Display Inter-Area-Router LSAs\n"
1002 "Display As-External LSAs\n"
1003 "Display Group-Membership LSAs\n"
1004 "Display Type-7 LSAs\n"
1005 "Display Link LSAs\n"
1006 "Display Intra-Area-Prefix LSAs\n"
1007 "Specify Link state ID as IPv4 address notation\n"
1008 "Specify Advertising Router as IPv4 address notation\n"
1009 )
1010{
hasso049207c2004-08-04 20:02:13 +00001011 int level;
hasso52dc7ee2004-09-23 19:18:23 +00001012 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +00001013 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +00001014 struct ospf6_area *oa;
1015 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +00001016 u_int16_t type = 0;
1017 u_int32_t id = 0;
hasso049207c2004-08-04 20:02:13 +00001018 u_int32_t adv_router = 0;
hasso508e53e2004-05-18 18:57:06 +00001019
1020 OSPF6_CMD_CHECK_RUNNING ();
1021
hasso049207c2004-08-04 20:02:13 +00001022 type = parse_type_spec (argc, argv);
1023 argc--;
1024 argv++;
hasso508e53e2004-05-18 18:57:06 +00001025
hasso049207c2004-08-04 20:02:13 +00001026 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
hasso508e53e2004-05-18 18:57:06 +00001027 {
1028 vty_out (vty, "Link state ID is not parsable: %s%s",
hasso049207c2004-08-04 20:02:13 +00001029 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +00001030 return CMD_SUCCESS;
1031 }
1032
hasso049207c2004-08-04 20:02:13 +00001033 argc--;
1034 argv++;
1035
1036 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
hasso508e53e2004-05-18 18:57:06 +00001037 {
1038 vty_out (vty, "Advertising Router is not parsable: %s%s",
hasso049207c2004-08-04 20:02:13 +00001039 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +00001040 return CMD_SUCCESS;
1041 }
1042
hasso049207c2004-08-04 20:02:13 +00001043 argc--;
1044 argv++;
1045 level = parse_show_level (argc, argv);
1046
1047 switch (OSPF6_LSA_SCOPE (type))
hasso508e53e2004-05-18 18:57:06 +00001048 {
hasso6452df02004-08-15 05:52:07 +00001049 case OSPF6_SCOPE_AREA:
paul1eb8ef22005-04-07 07:30:20 +00001050 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001051 {
hasso049207c2004-08-04 20:02:13 +00001052 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1053 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);
1054 }
1055 break;
1056
hasso6452df02004-08-15 05:52:07 +00001057 case OSPF6_SCOPE_LINKLOCAL:
paul1eb8ef22005-04-07 07:30:20 +00001058 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001059 {
paul1eb8ef22005-04-07 07:30:20 +00001060 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +00001061 {
hasso049207c2004-08-04 20:02:13 +00001062 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1063 oi->interface->name, oa->name, VNL, VNL);
1064 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);
1065 }
1066 }
1067 break;
1068
hasso6452df02004-08-15 05:52:07 +00001069 case OSPF6_SCOPE_AS:
hasso049207c2004-08-04 20:02:13 +00001070 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1071 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, o->lsdb);
1072 break;
1073
1074 default:
1075 assert (0);
1076 break;
hasso508e53e2004-05-18 18:57:06 +00001077 }
1078
hasso049207c2004-08-04 20:02:13 +00001079 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +00001080 return CMD_SUCCESS;
1081}
1082
1083ALIAS (show_ipv6_ospf6_database_type_id_router,
1084 show_ipv6_ospf6_database_type_id_router_detail_cmd,
1085 "show ipv6 ospf6 database "
1086 "(router|network|inter-prefix|inter-router|as-external|"
1087 "group-membership|type-7|link|intra-prefix) A.B.C.D A.B.C.D "
1088 "(dump|internal)",
1089 SHOW_STR
1090 IPV6_STR
1091 OSPF6_STR
1092 "Display Link state database\n"
1093 "Display Router LSAs\n"
1094 "Display Network LSAs\n"
1095 "Display Inter-Area-Prefix LSAs\n"
1096 "Display Inter-Area-Router LSAs\n"
1097 "Display As-External LSAs\n"
1098 "Display Group-Membership LSAs\n"
1099 "Display Type-7 LSAs\n"
1100 "Display Link LSAs\n"
1101 "Display Intra-Area-Prefix LSAs\n"
1102 "Specify Link state ID as IPv4 address notation\n"
1103 "Specify Advertising Router as IPv4 address notation\n"
hasso049207c2004-08-04 20:02:13 +00001104 "Dump LSAs\n"
1105 "Display LSA's internal information\n"
1106 );
1107
1108DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id,
1109 show_ipv6_ospf6_database_type_adv_router_linkstate_id_cmd,
1110 "show ipv6 ospf6 database "
1111 "(router|network|inter-prefix|inter-router|as-external|"
1112 "group-membership|type-7|link|intra-prefix) "
1113 "adv-router A.B.C.D linkstate-id A.B.C.D",
1114 SHOW_STR
1115 IPV6_STR
1116 OSPF6_STR
1117 "Display Link state database\n"
1118 "Display Router LSAs\n"
1119 "Display Network LSAs\n"
1120 "Display Inter-Area-Prefix LSAs\n"
1121 "Display Inter-Area-Router LSAs\n"
1122 "Display As-External LSAs\n"
1123 "Display Group-Membership LSAs\n"
1124 "Display Type-7 LSAs\n"
1125 "Display Link LSAs\n"
1126 "Display Intra-Area-Prefix LSAs\n"
1127 "Search by Advertising Router\n"
1128 "Specify Advertising Router as IPv4 address notation\n"
1129 "Search by Link state ID\n"
1130 "Specify Link state ID as IPv4 address notation\n"
1131 )
1132{
1133 int level;
hasso52dc7ee2004-09-23 19:18:23 +00001134 struct listnode *i, *j;
hasso049207c2004-08-04 20:02:13 +00001135 struct ospf6 *o = ospf6;
1136 struct ospf6_area *oa;
1137 struct ospf6_interface *oi;
1138 u_int16_t type = 0;
1139 u_int32_t id = 0;
1140 u_int32_t adv_router = 0;
1141
1142 OSPF6_CMD_CHECK_RUNNING ();
1143
1144 type = parse_type_spec (argc, argv);
1145 argc--;
1146 argv++;
1147
1148 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
1149 {
1150 vty_out (vty, "Advertising Router is not parsable: %s%s",
1151 argv[0], VNL);
1152 return CMD_SUCCESS;
1153 }
1154
1155 argc--;
1156 argv++;
1157
1158 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
1159 {
1160 vty_out (vty, "Link state ID is not parsable: %s%s",
1161 argv[0], VNL);
1162 return CMD_SUCCESS;
1163 }
1164
1165 argc--;
1166 argv++;
1167 level = parse_show_level (argc, argv);
1168
1169 switch (OSPF6_LSA_SCOPE (type))
1170 {
hasso6452df02004-08-15 05:52:07 +00001171 case OSPF6_SCOPE_AREA:
paul1eb8ef22005-04-07 07:30:20 +00001172 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001173 {
hasso049207c2004-08-04 20:02:13 +00001174 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1175 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);
1176 }
1177 break;
1178
hasso6452df02004-08-15 05:52:07 +00001179 case OSPF6_SCOPE_LINKLOCAL:
paul1eb8ef22005-04-07 07:30:20 +00001180 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001181 {
paul1eb8ef22005-04-07 07:30:20 +00001182 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +00001183 {
hasso049207c2004-08-04 20:02:13 +00001184 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1185 oi->interface->name, oa->name, VNL, VNL);
1186 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);
1187 }
1188 }
1189 break;
1190
hasso6452df02004-08-15 05:52:07 +00001191 case OSPF6_SCOPE_AS:
hasso049207c2004-08-04 20:02:13 +00001192 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1193 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, o->lsdb);
1194 break;
1195
1196 default:
1197 assert (0);
1198 break;
1199 }
1200
1201 vty_out (vty, "%s", VNL);
1202 return CMD_SUCCESS;
1203}
1204
1205ALIAS (show_ipv6_ospf6_database_type_adv_router_linkstate_id,
1206 show_ipv6_ospf6_database_type_adv_router_linkstate_id_detail_cmd,
1207 "show ipv6 ospf6 database "
1208 "(router|network|inter-prefix|inter-router|as-external|"
1209 "group-membership|type-7|link|intra-prefix) "
1210 "adv-router A.B.C.D linkstate-id A.B.C.D "
1211 "(dump|internal)",
1212 SHOW_STR
1213 IPV6_STR
1214 OSPF6_STR
1215 "Display Link state database\n"
1216 "Display Router LSAs\n"
1217 "Display Network LSAs\n"
1218 "Display Inter-Area-Prefix LSAs\n"
1219 "Display Inter-Area-Router LSAs\n"
1220 "Display As-External LSAs\n"
1221 "Display Group-Membership LSAs\n"
1222 "Display Type-7 LSAs\n"
1223 "Display Link LSAs\n"
1224 "Display Intra-Area-Prefix LSAs\n"
1225 "Search by Advertising Router\n"
1226 "Specify Advertising Router as IPv4 address notation\n"
1227 "Search by Link state ID\n"
1228 "Specify Link state ID as IPv4 address notation\n"
hasso508e53e2004-05-18 18:57:06 +00001229 "Dump LSAs\n"
1230 "Display LSA's internal information\n"
1231 );
1232
1233DEFUN (show_ipv6_ospf6_database_self_originated,
1234 show_ipv6_ospf6_database_self_originated_cmd,
1235 "show ipv6 ospf6 database self-originated",
1236 SHOW_STR
1237 IPV6_STR
1238 OSPF6_STR
hasso508e53e2004-05-18 18:57:06 +00001239 "Display Self-originated LSAs\n"
1240 )
1241{
hasso049207c2004-08-04 20:02:13 +00001242 int level;
hasso52dc7ee2004-09-23 19:18:23 +00001243 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +00001244 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +00001245 struct ospf6_area *oa;
1246 struct ospf6_interface *oi;
1247 u_int32_t adv_router = 0;
hasso508e53e2004-05-18 18:57:06 +00001248
1249 OSPF6_CMD_CHECK_RUNNING ();
1250
hasso049207c2004-08-04 20:02:13 +00001251 level = parse_show_level (argc, argv);
hasso508e53e2004-05-18 18:57:06 +00001252
hasso049207c2004-08-04 20:02:13 +00001253 adv_router = o->router_id;
hasso508e53e2004-05-18 18:57:06 +00001254
paul1eb8ef22005-04-07 07:30:20 +00001255 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +00001256 {
hasso049207c2004-08-04 20:02:13 +00001257 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1258 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oa->lsdb);
hasso508e53e2004-05-18 18:57:06 +00001259 }
hasso049207c2004-08-04 20:02:13 +00001260
paul1eb8ef22005-04-07 07:30:20 +00001261 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso508e53e2004-05-18 18:57:06 +00001262 {
paul1eb8ef22005-04-07 07:30:20 +00001263 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso508e53e2004-05-18 18:57:06 +00001264 {
hasso049207c2004-08-04 20:02:13 +00001265 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1266 oi->interface->name, oa->name, VNL, VNL);
1267 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oi->lsdb);
hasso508e53e2004-05-18 18:57:06 +00001268 }
1269 }
1270
hasso049207c2004-08-04 20:02:13 +00001271 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1272 ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, o->lsdb);
1273
1274 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +00001275 return CMD_SUCCESS;
1276}
1277
1278ALIAS (show_ipv6_ospf6_database_self_originated,
1279 show_ipv6_ospf6_database_self_originated_detail_cmd,
1280 "show ipv6 ospf6 database self-originated "
1281 "(detail|dump|internal)",
1282 SHOW_STR
1283 IPV6_STR
1284 OSPF6_STR
hasso508e53e2004-05-18 18:57:06 +00001285 "Display Self-originated LSAs\n"
1286 "Display details of LSAs\n"
1287 "Dump LSAs\n"
1288 "Display LSA's internal information\n"
hasso049207c2004-08-04 20:02:13 +00001289 )
hasso508e53e2004-05-18 18:57:06 +00001290
1291DEFUN (show_ipv6_ospf6_database_type_self_originated,
1292 show_ipv6_ospf6_database_type_self_originated_cmd,
1293 "show ipv6 ospf6 database "
1294 "(router|network|inter-prefix|inter-router|as-external|"
1295 "group-membership|type-7|link|intra-prefix) self-originated",
1296 SHOW_STR
1297 IPV6_STR
1298 OSPF6_STR
1299 "Display Link state database\n"
1300 "Display Router LSAs\n"
1301 "Display Network LSAs\n"
1302 "Display Inter-Area-Prefix LSAs\n"
1303 "Display Inter-Area-Router LSAs\n"
1304 "Display As-External LSAs\n"
1305 "Display Group-Membership LSAs\n"
1306 "Display Type-7 LSAs\n"
1307 "Display Link LSAs\n"
1308 "Display Intra-Area-Prefix LSAs\n"
1309 "Display Self-originated LSAs\n"
1310 )
1311{
hasso049207c2004-08-04 20:02:13 +00001312 int level;
hasso52dc7ee2004-09-23 19:18:23 +00001313 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +00001314 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +00001315 struct ospf6_area *oa;
1316 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +00001317 u_int16_t type = 0;
hasso049207c2004-08-04 20:02:13 +00001318 u_int32_t adv_router = 0;
hasso508e53e2004-05-18 18:57:06 +00001319
1320 OSPF6_CMD_CHECK_RUNNING ();
1321
hasso049207c2004-08-04 20:02:13 +00001322 type = parse_type_spec (argc, argv);
1323 argc--;
1324 argv++;
1325 level = parse_show_level (argc, argv);
hasso508e53e2004-05-18 18:57:06 +00001326
hasso049207c2004-08-04 20:02:13 +00001327 adv_router = o->router_id;
hasso508e53e2004-05-18 18:57:06 +00001328
hasso049207c2004-08-04 20:02:13 +00001329 switch (OSPF6_LSA_SCOPE (type))
1330 {
hasso6452df02004-08-15 05:52:07 +00001331 case OSPF6_SCOPE_AREA:
paul1eb8ef22005-04-07 07:30:20 +00001332 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001333 {
hasso049207c2004-08-04 20:02:13 +00001334 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1335 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oa->lsdb);
1336 }
1337 break;
hasso508e53e2004-05-18 18:57:06 +00001338
hasso6452df02004-08-15 05:52:07 +00001339 case OSPF6_SCOPE_LINKLOCAL:
paul1eb8ef22005-04-07 07:30:20 +00001340 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001341 {
paul1eb8ef22005-04-07 07:30:20 +00001342 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +00001343 {
hasso049207c2004-08-04 20:02:13 +00001344 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1345 oi->interface->name, oa->name, VNL, VNL);
1346 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oi->lsdb);
1347 }
1348 }
1349 break;
1350
hasso6452df02004-08-15 05:52:07 +00001351 case OSPF6_SCOPE_AS:
hasso049207c2004-08-04 20:02:13 +00001352 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1353 ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, o->lsdb);
1354 break;
1355
1356 default:
1357 assert (0);
1358 break;
hasso508e53e2004-05-18 18:57:06 +00001359 }
1360
hasso049207c2004-08-04 20:02:13 +00001361 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +00001362 return CMD_SUCCESS;
1363}
1364
1365ALIAS (show_ipv6_ospf6_database_type_self_originated,
1366 show_ipv6_ospf6_database_type_self_originated_detail_cmd,
1367 "show ipv6 ospf6 database "
1368 "(router|network|inter-prefix|inter-router|as-external|"
1369 "group-membership|type-7|link|intra-prefix) self-originated "
1370 "(detail|dump|internal)",
1371 SHOW_STR
1372 IPV6_STR
1373 OSPF6_STR
1374 "Display Link state database\n"
1375 "Display Router LSAs\n"
1376 "Display Network LSAs\n"
1377 "Display Inter-Area-Prefix LSAs\n"
1378 "Display Inter-Area-Router LSAs\n"
1379 "Display As-External LSAs\n"
1380 "Display Group-Membership LSAs\n"
1381 "Display Type-7 LSAs\n"
1382 "Display Link LSAs\n"
1383 "Display Intra-Area-Prefix LSAs\n"
1384 "Display Self-originated LSAs\n"
1385 "Display details of LSAs\n"
1386 "Dump LSAs\n"
1387 "Display LSA's internal information\n"
1388 );
1389
hasso049207c2004-08-04 20:02:13 +00001390DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id,
1391 show_ipv6_ospf6_database_type_self_originated_linkstate_id_cmd,
1392 "show ipv6 ospf6 database "
1393 "(router|network|inter-prefix|inter-router|as-external|"
1394 "group-membership|type-7|link|intra-prefix) self-originated "
1395 "linkstate-id A.B.C.D",
1396 SHOW_STR
1397 IPV6_STR
1398 OSPF6_STR
1399 "Display Link state database\n"
1400 "Display Router LSAs\n"
1401 "Display Network LSAs\n"
1402 "Display Inter-Area-Prefix LSAs\n"
1403 "Display Inter-Area-Router LSAs\n"
1404 "Display As-External LSAs\n"
1405 "Display Group-Membership LSAs\n"
1406 "Display Type-7 LSAs\n"
1407 "Display Link LSAs\n"
1408 "Display Intra-Area-Prefix LSAs\n"
1409 "Display Self-originated LSAs\n"
1410 "Search by Link state ID\n"
1411 "Specify Link state ID as IPv4 address notation\n"
1412 )
1413{
1414 int level;
hasso52dc7ee2004-09-23 19:18:23 +00001415 struct listnode *i, *j;
hasso049207c2004-08-04 20:02:13 +00001416 struct ospf6 *o = ospf6;
1417 struct ospf6_area *oa;
1418 struct ospf6_interface *oi;
1419 u_int16_t type = 0;
1420 u_int32_t adv_router = 0;
1421 u_int32_t id = 0;
1422
1423 OSPF6_CMD_CHECK_RUNNING ();
1424
1425 type = parse_type_spec (argc, argv);
1426 argc--;
1427 argv++;
1428
hasso6452df02004-08-15 05:52:07 +00001429 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
hasso049207c2004-08-04 20:02:13 +00001430 {
1431 vty_out (vty, "Link State ID is not parsable: %s%s",
1432 argv[0], VNL);
1433 return CMD_SUCCESS;
1434 }
1435
1436 argc--;
1437 argv++;
1438 level = parse_show_level (argc, argv);
1439
1440 adv_router = o->router_id;
1441
1442 switch (OSPF6_LSA_SCOPE (type))
1443 {
hasso6452df02004-08-15 05:52:07 +00001444 case OSPF6_SCOPE_AREA:
paul1eb8ef22005-04-07 07:30:20 +00001445 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001446 {
hasso049207c2004-08-04 20:02:13 +00001447 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1448 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);
1449 }
1450 break;
1451
hasso6452df02004-08-15 05:52:07 +00001452 case OSPF6_SCOPE_LINKLOCAL:
paul1eb8ef22005-04-07 07:30:20 +00001453 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001454 {
paul1eb8ef22005-04-07 07:30:20 +00001455 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +00001456 {
hasso049207c2004-08-04 20:02:13 +00001457 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1458 oi->interface->name, oa->name, VNL, VNL);
1459 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);
1460 }
1461 }
1462 break;
1463
hasso6452df02004-08-15 05:52:07 +00001464 case OSPF6_SCOPE_AS:
hasso049207c2004-08-04 20:02:13 +00001465 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1466 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, o->lsdb);
1467 break;
1468
1469 default:
1470 assert (0);
1471 break;
1472 }
1473
1474 vty_out (vty, "%s", VNL);
1475 return CMD_SUCCESS;
1476}
1477
1478ALIAS (show_ipv6_ospf6_database_type_self_originated_linkstate_id,
1479 show_ipv6_ospf6_database_type_self_originated_linkstate_id_detail_cmd,
1480 "show ipv6 ospf6 database "
1481 "(router|network|inter-prefix|inter-router|as-external|"
1482 "group-membership|type-7|link|intra-prefix) self-originated "
1483 "linkstate-id A.B.C.D (detail|dump|internal)",
1484 SHOW_STR
1485 IPV6_STR
1486 OSPF6_STR
1487 "Display Link state database\n"
1488 "Display Router LSAs\n"
1489 "Display Network LSAs\n"
1490 "Display Inter-Area-Prefix LSAs\n"
1491 "Display Inter-Area-Router LSAs\n"
1492 "Display As-External LSAs\n"
1493 "Display Group-Membership LSAs\n"
1494 "Display Type-7 LSAs\n"
1495 "Display Link LSAs\n"
1496 "Display Intra-Area-Prefix LSAs\n"
1497 "Display Self-originated LSAs\n"
1498 "Search by Link state ID\n"
1499 "Specify Link state ID as IPv4 address notation\n"
1500 "Display details of LSAs\n"
1501 "Dump LSAs\n"
1502 "Display LSA's internal information\n"
1503 );
1504
hasso508e53e2004-05-18 18:57:06 +00001505DEFUN (show_ipv6_ospf6_database_type_id_self_originated,
1506 show_ipv6_ospf6_database_type_id_self_originated_cmd,
1507 "show ipv6 ospf6 database "
1508 "(router|network|inter-prefix|inter-router|as-external|"
1509 "group-membership|type-7|link|intra-prefix) A.B.C.D self-originated",
1510 SHOW_STR
1511 IPV6_STR
1512 OSPF6_STR
1513 "Display Link state database\n"
1514 "Display Router LSAs\n"
1515 "Display Network LSAs\n"
1516 "Display Inter-Area-Prefix LSAs\n"
1517 "Display Inter-Area-Router LSAs\n"
1518 "Display As-External LSAs\n"
1519 "Display Group-Membership LSAs\n"
1520 "Display Type-7 LSAs\n"
1521 "Display Link LSAs\n"
1522 "Display Intra-Area-Prefix LSAs\n"
1523 "Specify Link state ID as IPv4 address notation\n"
1524 "Display Self-originated LSAs\n"
1525 )
1526{
hasso049207c2004-08-04 20:02:13 +00001527 int level;
hasso52dc7ee2004-09-23 19:18:23 +00001528 struct listnode *i, *j;
hasso508e53e2004-05-18 18:57:06 +00001529 struct ospf6 *o = ospf6;
hasso049207c2004-08-04 20:02:13 +00001530 struct ospf6_area *oa;
1531 struct ospf6_interface *oi;
hasso508e53e2004-05-18 18:57:06 +00001532 u_int16_t type = 0;
hasso049207c2004-08-04 20:02:13 +00001533 u_int32_t adv_router = 0;
hasso508e53e2004-05-18 18:57:06 +00001534 u_int32_t id = 0;
1535
1536 OSPF6_CMD_CHECK_RUNNING ();
1537
hasso049207c2004-08-04 20:02:13 +00001538 type = parse_type_spec (argc, argv);
1539 argc--;
1540 argv++;
hasso508e53e2004-05-18 18:57:06 +00001541
hasso6452df02004-08-15 05:52:07 +00001542 if ((inet_pton (AF_INET, argv[0], &id)) != 1)
hasso508e53e2004-05-18 18:57:06 +00001543 {
1544 vty_out (vty, "Link State ID is not parsable: %s%s",
hasso049207c2004-08-04 20:02:13 +00001545 argv[0], VNL);
hasso508e53e2004-05-18 18:57:06 +00001546 return CMD_SUCCESS;
1547 }
1548
hasso049207c2004-08-04 20:02:13 +00001549 argc--;
1550 argv++;
1551 level = parse_show_level (argc, argv);
1552
1553 adv_router = o->router_id;
1554
1555 switch (OSPF6_LSA_SCOPE (type))
hasso508e53e2004-05-18 18:57:06 +00001556 {
hasso6452df02004-08-15 05:52:07 +00001557 case OSPF6_SCOPE_AREA:
paul1eb8ef22005-04-07 07:30:20 +00001558 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001559 {
hasso049207c2004-08-04 20:02:13 +00001560 vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
1561 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);
1562 }
1563 break;
1564
hasso6452df02004-08-15 05:52:07 +00001565 case OSPF6_SCOPE_LINKLOCAL:
paul1eb8ef22005-04-07 07:30:20 +00001566 for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
hasso049207c2004-08-04 20:02:13 +00001567 {
paul1eb8ef22005-04-07 07:30:20 +00001568 for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
hasso049207c2004-08-04 20:02:13 +00001569 {
hasso049207c2004-08-04 20:02:13 +00001570 vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
1571 oi->interface->name, oa->name, VNL, VNL);
1572 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);
1573 }
1574 }
1575 break;
1576
hasso6452df02004-08-15 05:52:07 +00001577 case OSPF6_SCOPE_AS:
hasso049207c2004-08-04 20:02:13 +00001578 vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);
1579 ospf6_lsdb_show (vty, level, &type, &id, &adv_router, o->lsdb);
1580 break;
1581
1582 default:
1583 assert (0);
1584 break;
hasso508e53e2004-05-18 18:57:06 +00001585 }
1586
hasso049207c2004-08-04 20:02:13 +00001587 vty_out (vty, "%s", VNL);
hasso508e53e2004-05-18 18:57:06 +00001588 return CMD_SUCCESS;
1589}
1590
1591ALIAS (show_ipv6_ospf6_database_type_id_self_originated,
1592 show_ipv6_ospf6_database_type_id_self_originated_detail_cmd,
1593 "show ipv6 ospf6 database "
1594 "(router|network|inter-prefix|inter-router|as-external|"
1595 "group-membership|type-7|link|intra-prefix) A.B.C.D self-originated "
hasso049207c2004-08-04 20:02:13 +00001596 "(detail|dump|internal)",
hasso508e53e2004-05-18 18:57:06 +00001597 SHOW_STR
1598 IPV6_STR
1599 OSPF6_STR
1600 "Display Link state database\n"
1601 "Display Router LSAs\n"
1602 "Display Network LSAs\n"
1603 "Display Inter-Area-Prefix LSAs\n"
1604 "Display Inter-Area-Router LSAs\n"
1605 "Display As-External LSAs\n"
1606 "Display Group-Membership LSAs\n"
1607 "Display Type-7 LSAs\n"
1608 "Display Link LSAs\n"
1609 "Display Intra-Area-Prefix LSAs\n"
hasso508e53e2004-05-18 18:57:06 +00001610 "Display Self-originated LSAs\n"
hasso049207c2004-08-04 20:02:13 +00001611 "Search by Link state ID\n"
1612 "Specify Link state ID as IPv4 address notation\n"
hasso508e53e2004-05-18 18:57:06 +00001613 "Display details of LSAs\n"
1614 "Dump LSAs\n"
1615 "Display LSA's internal information\n"
1616 );
1617
hasso6452df02004-08-15 05:52:07 +00001618
1619DEFUN (show_ipv6_ospf6_border_routers,
1620 show_ipv6_ospf6_border_routers_cmd,
1621 "show ipv6 ospf6 border-routers",
1622 SHOW_STR
1623 IP6_STR
1624 OSPF6_STR
1625 "Display routing table for ABR and ASBR\n"
1626 )
1627{
1628 u_int32_t adv_router;
1629 void (*showfunc) (struct vty *, struct ospf6_route *);
1630 struct ospf6_route *ro;
1631 struct prefix prefix;
1632
1633 OSPF6_CMD_CHECK_RUNNING ();
1634
1635 if (argc && ! strcmp ("detail", argv[0]))
1636 {
1637 showfunc = ospf6_route_show_detail;
1638 argc--;
1639 argv++;
1640 }
1641 else
1642 showfunc = ospf6_brouter_show;
1643
1644 if (argc)
1645 {
1646 if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
1647 {
1648 vty_out (vty, "Router ID is not parsable: %s%s", argv[0], VNL);
1649 return CMD_SUCCESS;
1650 }
1651
1652 ospf6_linkstate_prefix (adv_router, 0, &prefix);
1653 ro = ospf6_route_lookup (&prefix, ospf6->brouter_table);
1654 ospf6_route_show_detail (vty, ro);
1655 return CMD_SUCCESS;
1656 }
1657
1658 if (showfunc == ospf6_brouter_show)
1659 ospf6_brouter_show_header (vty);
1660
1661 for (ro = ospf6_route_head (ospf6->brouter_table); ro;
1662 ro = ospf6_route_next (ro))
1663 (*showfunc) (vty, ro);
1664
1665 return CMD_SUCCESS;
1666}
1667
1668ALIAS (show_ipv6_ospf6_border_routers,
1669 show_ipv6_ospf6_border_routers_detail_cmd,
1670 "show ipv6 ospf6 border-routers (A.B.C.D|detail)",
1671 SHOW_STR
1672 IP6_STR
1673 OSPF6_STR
1674 "Display routing table for ABR and ASBR\n"
1675 "Specify Router-ID\n"
1676 "Display Detail\n"
1677 );
1678
hasso4846ef62004-09-03 06:04:00 +00001679DEFUN (show_ipv6_ospf6_linkstate,
1680 show_ipv6_ospf6_linkstate_cmd,
1681 "show ipv6 ospf6 linkstate",
1682 SHOW_STR
1683 IP6_STR
1684 OSPF6_STR
1685 "Display linkstate routing table\n"
1686 )
1687{
hasso52dc7ee2004-09-23 19:18:23 +00001688 struct listnode *node;
hasso4846ef62004-09-03 06:04:00 +00001689 struct ospf6_area *oa;
1690
paul1eb8ef22005-04-07 07:30:20 +00001691 for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa))
hasso4846ef62004-09-03 06:04:00 +00001692 {
hasso4846ef62004-09-03 06:04:00 +00001693 vty_out (vty, "%s SPF Result in Area %s%s%s",
1694 VNL, oa->name, VNL, VNL);
1695 ospf6_linkstate_table_show (vty, argc, argv, oa->spf_table);
1696 }
1697
1698 vty_out (vty, "%s", VNL);
1699 return CMD_SUCCESS;
1700}
1701
1702ALIAS (show_ipv6_ospf6_linkstate,
1703 show_ipv6_ospf6_linkstate_router_cmd,
1704 "show ipv6 ospf6 linkstate router A.B.C.D",
1705 SHOW_STR
1706 IP6_STR
1707 OSPF6_STR
1708 "Display linkstate routing table\n"
1709 "Display Router Entry\n"
1710 "Specify Router ID as IPv4 address notation\n"
1711 );
1712
1713ALIAS (show_ipv6_ospf6_linkstate,
1714 show_ipv6_ospf6_linkstate_network_cmd,
1715 "show ipv6 ospf6 linkstate network A.B.C.D A.B.C.D",
1716 SHOW_STR
1717 IP6_STR
1718 OSPF6_STR
1719 "Display linkstate routing table\n"
1720 "Display Network Entry\n"
1721 "Specify Router ID as IPv4 address notation\n"
1722 "Specify Link state ID as IPv4 address notation\n"
1723 );
1724
1725DEFUN (show_ipv6_ospf6_linkstate_detail,
1726 show_ipv6_ospf6_linkstate_detail_cmd,
1727 "show ipv6 ospf6 linkstate detail",
1728 SHOW_STR
1729 IP6_STR
1730 OSPF6_STR
1731 "Display linkstate routing table\n"
1732 )
1733{
paul0c083ee2004-10-10 12:54:58 +00001734 const char *sargv[CMD_ARGC_MAX];
hasso4846ef62004-09-03 06:04:00 +00001735 int i, sargc;
hasso52dc7ee2004-09-23 19:18:23 +00001736 struct listnode *node;
hasso4846ef62004-09-03 06:04:00 +00001737 struct ospf6_area *oa;
1738
1739 /* copy argv to sargv and then append "detail" */
1740 for (i = 0; i < argc; i++)
1741 sargv[i] = argv[i];
1742 sargc = argc;
1743 sargv[sargc++] = "detail";
1744 sargv[sargc] = NULL;
1745
paul1eb8ef22005-04-07 07:30:20 +00001746 for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa))
hasso4846ef62004-09-03 06:04:00 +00001747 {
hasso4846ef62004-09-03 06:04:00 +00001748 vty_out (vty, "%s SPF Result in Area %s%s%s",
1749 VNL, oa->name, VNL, VNL);
1750 ospf6_linkstate_table_show (vty, sargc, sargv, oa->spf_table);
1751 }
1752
1753 vty_out (vty, "%s", VNL);
1754 return CMD_SUCCESS;
1755}
hasso6452df02004-08-15 05:52:07 +00001756
paul718e3742002-12-13 20:15:29 +00001757/* Install ospf related commands. */
1758void
1759ospf6_init ()
1760{
hasso1e058382004-09-01 21:36:14 +00001761 ospf6_top_init ();
1762 ospf6_area_init ();
1763 ospf6_interface_init ();
1764 ospf6_neighbor_init ();
1765 ospf6_zebra_init ();
1766
1767 ospf6_lsa_init ();
1768 ospf6_spf_init ();
1769 ospf6_intra_init ();
1770 ospf6_asbr_init ();
1771 ospf6_abr_init ();
1772
hassoef1bbf52004-10-08 12:04:21 +00001773#ifdef HAVE_SNMP
paul0c083ee2004-10-10 12:54:58 +00001774 ospf6_snmp_init (master);
hassoef1bbf52004-10-08 12:04:21 +00001775#endif /*HAVE_SNMP*/
1776
hasso508e53e2004-05-18 18:57:06 +00001777 install_node (&debug_node, config_write_ospf6_debug);
paul718e3742002-12-13 20:15:29 +00001778
hasso508e53e2004-05-18 18:57:06 +00001779 install_element_ospf6_debug_message ();
1780 install_element_ospf6_debug_lsa ();
1781 install_element_ospf6_debug_interface ();
1782 install_element_ospf6_debug_neighbor ();
1783 install_element_ospf6_debug_zebra ();
1784 install_element_ospf6_debug_spf ();
1785 install_element_ospf6_debug_route ();
1786 install_element_ospf6_debug_asbr ();
hasso6452df02004-08-15 05:52:07 +00001787 install_element_ospf6_debug_abr ();
hasso1e058382004-09-01 21:36:14 +00001788 install_element_ospf6_debug_flood ();
hasso508e53e2004-05-18 18:57:06 +00001789
paul718e3742002-12-13 20:15:29 +00001790 install_element (VIEW_NODE, &show_version_ospf6_cmd);
paul718e3742002-12-13 20:15:29 +00001791 install_element (ENABLE_NODE, &show_version_ospf6_cmd);
hasso049207c2004-08-04 20:02:13 +00001792
hasso6452df02004-08-15 05:52:07 +00001793 install_element (VIEW_NODE, &show_ipv6_ospf6_border_routers_cmd);
1794 install_element (VIEW_NODE, &show_ipv6_ospf6_border_routers_detail_cmd);
1795 install_element (ENABLE_NODE, &show_ipv6_ospf6_border_routers_cmd);
1796 install_element (ENABLE_NODE, &show_ipv6_ospf6_border_routers_detail_cmd);
1797
hasso4846ef62004-09-03 06:04:00 +00001798 install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_cmd);
1799 install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_router_cmd);
1800 install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_network_cmd);
1801 install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_detail_cmd);
1802 install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_cmd);
1803 install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_router_cmd);
1804 install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_network_cmd);
1805 install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_detail_cmd);
1806
hasso049207c2004-08-04 20:02:13 +00001807#define INSTALL(n,c) \
hassob31b8132005-05-31 10:24:28 +00001808 install_element (n ## _NODE, &show_ipv6_ospf6_ ## c)
hasso049207c2004-08-04 20:02:13 +00001809
1810 INSTALL (VIEW, database_cmd);
1811 INSTALL (VIEW, database_detail_cmd);
1812 INSTALL (VIEW, database_type_cmd);
1813 INSTALL (VIEW, database_type_detail_cmd);
1814 INSTALL (VIEW, database_id_cmd);
1815 INSTALL (VIEW, database_id_detail_cmd);
1816 INSTALL (VIEW, database_linkstate_id_cmd);
1817 INSTALL (VIEW, database_linkstate_id_detail_cmd);
1818 INSTALL (VIEW, database_router_cmd);
1819 INSTALL (VIEW, database_router_detail_cmd);
1820 INSTALL (VIEW, database_adv_router_cmd);
1821 INSTALL (VIEW, database_adv_router_detail_cmd);
1822 INSTALL (VIEW, database_type_id_cmd);
1823 INSTALL (VIEW, database_type_id_detail_cmd);
1824 INSTALL (VIEW, database_type_linkstate_id_cmd);
1825 INSTALL (VIEW, database_type_linkstate_id_detail_cmd);
1826 INSTALL (VIEW, database_type_router_cmd);
1827 INSTALL (VIEW, database_type_router_detail_cmd);
1828 INSTALL (VIEW, database_type_adv_router_cmd);
1829 INSTALL (VIEW, database_type_adv_router_detail_cmd);
1830 INSTALL (VIEW, database_adv_router_linkstate_id_cmd);
1831 INSTALL (VIEW, database_adv_router_linkstate_id_detail_cmd);
1832 INSTALL (VIEW, database_id_router_cmd);
1833 INSTALL (VIEW, database_id_router_detail_cmd);
1834 INSTALL (VIEW, database_type_id_router_cmd);
1835 INSTALL (VIEW, database_type_id_router_detail_cmd);
1836 INSTALL (VIEW, database_type_adv_router_linkstate_id_cmd);
1837 INSTALL (VIEW, database_type_adv_router_linkstate_id_detail_cmd);
1838 INSTALL (VIEW, database_self_originated_cmd);
1839 INSTALL (VIEW, database_self_originated_detail_cmd);
1840 INSTALL (VIEW, database_type_self_originated_cmd);
1841 INSTALL (VIEW, database_type_self_originated_detail_cmd);
1842 INSTALL (VIEW, database_type_id_self_originated_cmd);
1843 INSTALL (VIEW, database_type_id_self_originated_detail_cmd);
1844 INSTALL (VIEW, database_type_self_originated_linkstate_id_cmd);
1845 INSTALL (VIEW, database_type_self_originated_linkstate_id_detail_cmd);
hasso049207c2004-08-04 20:02:13 +00001846
1847 INSTALL (ENABLE, database_cmd);
1848 INSTALL (ENABLE, database_detail_cmd);
1849 INSTALL (ENABLE, database_type_cmd);
1850 INSTALL (ENABLE, database_type_detail_cmd);
1851 INSTALL (ENABLE, database_id_cmd);
1852 INSTALL (ENABLE, database_id_detail_cmd);
1853 INSTALL (ENABLE, database_linkstate_id_cmd);
1854 INSTALL (ENABLE, database_linkstate_id_detail_cmd);
1855 INSTALL (ENABLE, database_router_cmd);
1856 INSTALL (ENABLE, database_router_detail_cmd);
1857 INSTALL (ENABLE, database_adv_router_cmd);
1858 INSTALL (ENABLE, database_adv_router_detail_cmd);
1859 INSTALL (ENABLE, database_type_id_cmd);
1860 INSTALL (ENABLE, database_type_id_detail_cmd);
1861 INSTALL (ENABLE, database_type_linkstate_id_cmd);
1862 INSTALL (ENABLE, database_type_linkstate_id_detail_cmd);
1863 INSTALL (ENABLE, database_type_router_cmd);
1864 INSTALL (ENABLE, database_type_router_detail_cmd);
1865 INSTALL (ENABLE, database_type_adv_router_cmd);
1866 INSTALL (ENABLE, database_type_adv_router_detail_cmd);
1867 INSTALL (ENABLE, database_adv_router_linkstate_id_cmd);
1868 INSTALL (ENABLE, database_adv_router_linkstate_id_detail_cmd);
1869 INSTALL (ENABLE, database_id_router_cmd);
1870 INSTALL (ENABLE, database_id_router_detail_cmd);
1871 INSTALL (ENABLE, database_type_id_router_cmd);
1872 INSTALL (ENABLE, database_type_id_router_detail_cmd);
1873 INSTALL (ENABLE, database_type_adv_router_linkstate_id_cmd);
1874 INSTALL (ENABLE, database_type_adv_router_linkstate_id_detail_cmd);
1875 INSTALL (ENABLE, database_self_originated_cmd);
1876 INSTALL (ENABLE, database_self_originated_detail_cmd);
1877 INSTALL (ENABLE, database_type_self_originated_cmd);
1878 INSTALL (ENABLE, database_type_self_originated_detail_cmd);
1879 INSTALL (ENABLE, database_type_id_self_originated_cmd);
1880 INSTALL (ENABLE, database_type_id_self_originated_detail_cmd);
1881 INSTALL (ENABLE, database_type_self_originated_linkstate_id_cmd);
1882 INSTALL (ENABLE, database_type_self_originated_linkstate_id_detail_cmd);
paul718e3742002-12-13 20:15:29 +00001883
hasso508e53e2004-05-18 18:57:06 +00001884 /* Make ospf protocol socket. */
1885 ospf6_serv_sock ();
1886 thread_add_read (master, ospf6_receive, NULL, ospf6_sock);
paul718e3742002-12-13 20:15:29 +00001887}
1888
paul718e3742002-12-13 20:15:29 +00001889