paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 1 | /* |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 2 | * Copyright (C) 2003 Yasuhiro Ohara |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 3 | * |
| 4 | * This file is part of GNU Zebra. |
| 5 | * |
| 6 | * GNU Zebra is free software; you can redistribute it and/or modify it |
| 7 | * under the terms of the GNU General Public License as published by the |
| 8 | * Free Software Foundation; either version 2, or (at your option) any |
| 9 | * later version. |
| 10 | * |
| 11 | * GNU Zebra is distributed in the hope that it will be useful, but |
| 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | * General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with GNU Zebra; see the file COPYING. If not, write to the |
| 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 19 | * Boston, MA 02111-1307, USA. |
| 20 | */ |
| 21 | |
| 22 | #include <zebra.h> |
| 23 | |
| 24 | #include "log.h" |
| 25 | #include "memory.h" |
| 26 | #include "vty.h" |
| 27 | #include "linklist.h" |
| 28 | #include "prefix.h" |
| 29 | #include "table.h" |
| 30 | #include "thread.h" |
| 31 | #include "command.h" |
| 32 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 33 | #include "ospf6_proto.h" |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 34 | #include "ospf6_message.h" |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 35 | #include "ospf6_lsa.h" |
| 36 | #include "ospf6_lsdb.h" |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 37 | #include "ospf6_route.h" |
| 38 | #include "ospf6_zebra.h" |
| 39 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 40 | #include "ospf6_top.h" |
| 41 | #include "ospf6_area.h" |
| 42 | #include "ospf6_interface.h" |
| 43 | #include "ospf6_neighbor.h" |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 44 | |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 45 | #include "ospf6_flood.h" |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 46 | #include "ospf6_asbr.h" |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 47 | #include "ospf6_abr.h" |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 48 | #include "ospf6_intra.h" |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 49 | #include "ospf6d.h" |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 50 | |
| 51 | /* global ospf6d variable */ |
| 52 | struct ospf6 *ospf6; |
| 53 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 54 | void |
| 55 | ospf6_top_lsdb_hook_add (struct ospf6_lsa *lsa) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 56 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 57 | switch (ntohs (lsa->header->type)) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 58 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 59 | case OSPF6_LSTYPE_AS_EXTERNAL: |
| 60 | ospf6_asbr_lsa_add (lsa); |
| 61 | break; |
| 62 | |
| 63 | default: |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 64 | break; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 65 | } |
| 66 | } |
| 67 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 68 | void |
| 69 | ospf6_top_lsdb_hook_remove (struct ospf6_lsa *lsa) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 70 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 71 | switch (ntohs (lsa->header->type)) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 72 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 73 | case OSPF6_LSTYPE_AS_EXTERNAL: |
| 74 | ospf6_asbr_lsa_remove (lsa); |
| 75 | break; |
| 76 | |
| 77 | default: |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 78 | break; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 79 | } |
| 80 | } |
| 81 | |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 82 | void |
| 83 | ospf6_top_route_hook_add (struct ospf6_route *route) |
| 84 | { |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 85 | ospf6_abr_originate_summary (route); |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 86 | ospf6_zebra_route_update_add (route); |
| 87 | } |
| 88 | |
| 89 | void |
| 90 | ospf6_top_route_hook_remove (struct ospf6_route *route) |
| 91 | { |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 92 | ospf6_abr_originate_summary (route); |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 93 | ospf6_zebra_route_update_remove (route); |
| 94 | } |
| 95 | |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 96 | void |
| 97 | ospf6_top_brouter_hook_add (struct ospf6_route *route) |
| 98 | { |
hasso | ccb59b1 | 2004-08-25 09:10:37 +0000 | [diff] [blame] | 99 | ospf6_abr_examin_brouter (ADV_ROUTER_IN_PREFIX (&route->prefix)); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 100 | ospf6_asbr_lsentry_add (route); |
hasso | ccb59b1 | 2004-08-25 09:10:37 +0000 | [diff] [blame] | 101 | ospf6_abr_originate_summary (route); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 102 | } |
| 103 | |
| 104 | void |
| 105 | ospf6_top_brouter_hook_remove (struct ospf6_route *route) |
| 106 | { |
hasso | ccb59b1 | 2004-08-25 09:10:37 +0000 | [diff] [blame] | 107 | ospf6_abr_examin_brouter (ADV_ROUTER_IN_PREFIX (&route->prefix)); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 108 | ospf6_asbr_lsentry_remove (route); |
hasso | ccb59b1 | 2004-08-25 09:10:37 +0000 | [diff] [blame] | 109 | ospf6_abr_originate_summary (route); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 110 | } |
| 111 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 112 | struct ospf6 * |
| 113 | ospf6_create () |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 114 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 115 | struct ospf6 *o; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 116 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 117 | o = XMALLOC (MTYPE_OSPF6_TOP, sizeof (struct ospf6)); |
| 118 | memset (o, 0, sizeof (struct ospf6)); |
| 119 | |
| 120 | /* initialize */ |
| 121 | gettimeofday (&o->starttime, (struct timezone *) NULL); |
| 122 | o->area_list = list_new (); |
| 123 | o->area_list->cmp = ospf6_area_cmp; |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 124 | o->lsdb = ospf6_lsdb_create (o); |
| 125 | o->lsdb_self = ospf6_lsdb_create (o); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 126 | o->lsdb->hook_add = ospf6_top_lsdb_hook_add; |
| 127 | o->lsdb->hook_remove = ospf6_top_lsdb_hook_remove; |
| 128 | |
| 129 | o->route_table = ospf6_route_table_create (); |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 130 | o->route_table->hook_add = ospf6_top_route_hook_add; |
| 131 | o->route_table->hook_remove = ospf6_top_route_hook_remove; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 132 | |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 133 | o->brouter_table = ospf6_route_table_create (); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 134 | o->brouter_table->hook_add = ospf6_top_brouter_hook_add; |
| 135 | o->brouter_table->hook_remove = ospf6_top_brouter_hook_remove; |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 136 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 137 | o->external_table = ospf6_route_table_create (); |
| 138 | o->external_id_table = route_table_init (); |
| 139 | |
| 140 | return o; |
| 141 | } |
| 142 | |
| 143 | void |
| 144 | ospf6_delete (struct ospf6 *o) |
| 145 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 146 | struct listnode *node, *nnode; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 147 | struct ospf6_area *oa; |
| 148 | |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 149 | for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa)) |
| 150 | ospf6_area_delete (oa); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 151 | |
| 152 | ospf6_lsdb_delete (o->lsdb); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 153 | ospf6_lsdb_delete (o->lsdb_self); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 154 | |
| 155 | ospf6_route_table_delete (o->route_table); |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 156 | ospf6_route_table_delete (o->brouter_table); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 157 | |
| 158 | ospf6_route_table_delete (o->external_table); |
| 159 | route_table_finish (o->external_id_table); |
| 160 | |
| 161 | XFREE (MTYPE_OSPF6_TOP, o); |
| 162 | } |
| 163 | |
| 164 | void |
| 165 | ospf6_enable (struct ospf6 *o) |
| 166 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 167 | struct listnode *node, *nnode; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 168 | struct ospf6_area *oa; |
| 169 | |
| 170 | if (CHECK_FLAG (o->flag, OSPF6_DISABLED)) |
| 171 | { |
| 172 | UNSET_FLAG (o->flag, OSPF6_DISABLED); |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 173 | for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa)) |
| 174 | ospf6_area_enable (oa); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 175 | } |
| 176 | } |
| 177 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 178 | void |
| 179 | ospf6_disable (struct ospf6 *o) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 180 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 181 | struct listnode *node, *nnode; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 182 | struct ospf6_area *oa; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 183 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 184 | if (! CHECK_FLAG (o->flag, OSPF6_DISABLED)) |
| 185 | { |
| 186 | SET_FLAG (o->flag, OSPF6_DISABLED); |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 187 | |
| 188 | for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa)) |
| 189 | ospf6_area_disable (oa); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 190 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 191 | ospf6_lsdb_remove_all (o->lsdb); |
| 192 | ospf6_route_remove_all (o->route_table); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 193 | ospf6_route_remove_all (o->brouter_table); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 194 | } |
| 195 | } |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 196 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 197 | int |
| 198 | ospf6_maxage_remover (struct thread *thread) |
| 199 | { |
| 200 | struct ospf6 *o = (struct ospf6 *) THREAD_ARG (thread); |
| 201 | struct ospf6_area *oa; |
| 202 | struct ospf6_interface *oi; |
| 203 | struct ospf6_neighbor *on; |
hasso | 52dc7ee | 2004-09-23 19:18:23 +0000 | [diff] [blame] | 204 | struct listnode *i, *j, *k; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 205 | |
| 206 | o->maxage_remover = (struct thread *) NULL; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 207 | |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 208 | for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa)) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 209 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 210 | for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi)) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 211 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 212 | for (ALL_LIST_ELEMENTS_RO (oi->neighbor_list, k, on)) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 213 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 214 | if (on->state != OSPF6_NEIGHBOR_EXCHANGE && |
| 215 | on->state != OSPF6_NEIGHBOR_LOADING) |
| 216 | continue; |
| 217 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 218 | return 0; |
| 219 | } |
| 220 | } |
| 221 | } |
| 222 | |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 223 | for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa)) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 224 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 225 | for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi)) |
| 226 | OSPF6_LSDB_MAXAGE_REMOVER (oi->lsdb); |
| 227 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 228 | OSPF6_LSDB_MAXAGE_REMOVER (oa->lsdb); |
| 229 | } |
| 230 | OSPF6_LSDB_MAXAGE_REMOVER (o->lsdb); |
| 231 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 232 | return 0; |
| 233 | } |
| 234 | |
| 235 | void |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 236 | ospf6_maxage_remove (struct ospf6 *o) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 237 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 238 | if (o && ! o->maxage_remover) |
| 239 | o->maxage_remover = thread_add_event (master, ospf6_maxage_remover, o, 0); |
| 240 | } |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 241 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 242 | /* start ospf6 */ |
| 243 | DEFUN (router_ospf6, |
| 244 | router_ospf6_cmd, |
| 245 | "router ospf6", |
| 246 | ROUTER_STR |
| 247 | OSPF6_STR) |
| 248 | { |
| 249 | if (ospf6 == NULL) |
| 250 | ospf6 = ospf6_create (); |
| 251 | if (CHECK_FLAG (ospf6->flag, OSPF6_DISABLED)) |
| 252 | ospf6_enable (ospf6); |
| 253 | |
| 254 | /* set current ospf point. */ |
| 255 | vty->node = OSPF6_NODE; |
| 256 | vty->index = ospf6; |
| 257 | |
| 258 | return CMD_SUCCESS; |
| 259 | } |
| 260 | |
| 261 | /* stop ospf6 */ |
| 262 | DEFUN (no_router_ospf6, |
| 263 | no_router_ospf6_cmd, |
| 264 | "no router ospf6", |
| 265 | NO_STR |
| 266 | OSPF6_ROUTER_STR) |
| 267 | { |
| 268 | if (ospf6 == NULL || CHECK_FLAG (ospf6->flag, OSPF6_DISABLED)) |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 269 | vty_out (vty, "OSPFv3 is not running%s", VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 270 | else |
| 271 | ospf6_disable (ospf6); |
| 272 | |
| 273 | /* return to config node . */ |
| 274 | vty->node = CONFIG_NODE; |
| 275 | vty->index = NULL; |
| 276 | |
| 277 | return CMD_SUCCESS; |
| 278 | } |
| 279 | |
| 280 | /* change Router_ID commands. */ |
| 281 | DEFUN (ospf6_router_id, |
| 282 | ospf6_router_id_cmd, |
| 283 | "router-id A.B.C.D", |
| 284 | "Configure OSPF Router-ID\n" |
| 285 | V4NOTATION_STR) |
| 286 | { |
| 287 | int ret; |
| 288 | u_int32_t router_id; |
| 289 | struct ospf6 *o; |
| 290 | |
| 291 | o = (struct ospf6 *) vty->index; |
| 292 | |
| 293 | ret = inet_pton (AF_INET, argv[0], &router_id); |
| 294 | if (ret == 0) |
| 295 | { |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 296 | vty_out (vty, "malformed OSPF Router-ID: %s%s", argv[0], VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 297 | return CMD_SUCCESS; |
| 298 | } |
| 299 | |
hasso | c8a440e | 2004-10-11 17:02:40 +0000 | [diff] [blame] | 300 | o->router_id_static = router_id; |
| 301 | if (o->router_id == 0) |
| 302 | o->router_id = router_id; |
| 303 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 304 | return CMD_SUCCESS; |
| 305 | } |
| 306 | |
| 307 | DEFUN (ospf6_interface_area, |
| 308 | ospf6_interface_area_cmd, |
| 309 | "interface IFNAME area A.B.C.D", |
| 310 | "Enable routing on an IPv6 interface\n" |
| 311 | IFNAME_STR |
| 312 | "Specify the OSPF6 area ID\n" |
| 313 | "OSPF6 area ID in IPv4 address notation\n" |
| 314 | ) |
| 315 | { |
| 316 | struct ospf6 *o; |
hasso | 3b68735 | 2004-08-19 06:56:53 +0000 | [diff] [blame] | 317 | struct ospf6_area *oa; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 318 | struct ospf6_interface *oi; |
| 319 | struct interface *ifp; |
| 320 | u_int32_t area_id; |
| 321 | |
| 322 | o = (struct ospf6 *) vty->index; |
| 323 | |
| 324 | /* find/create ospf6 interface */ |
| 325 | ifp = if_get_by_name (argv[0]); |
| 326 | oi = (struct ospf6_interface *) ifp->info; |
| 327 | if (oi == NULL) |
| 328 | oi = ospf6_interface_create (ifp); |
| 329 | if (oi->area) |
| 330 | { |
| 331 | vty_out (vty, "%s already attached to Area %s%s", |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 332 | oi->interface->name, oi->area->name, VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 333 | return CMD_SUCCESS; |
| 334 | } |
| 335 | |
| 336 | /* parse Area-ID */ |
| 337 | if (inet_pton (AF_INET, argv[1], &area_id) != 1) |
| 338 | { |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 339 | vty_out (vty, "Invalid Area-ID: %s%s", argv[1], VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 340 | return CMD_SUCCESS; |
| 341 | } |
| 342 | |
| 343 | /* find/create ospf6 area */ |
| 344 | oa = ospf6_area_lookup (area_id, o); |
| 345 | if (oa == NULL) |
| 346 | oa = ospf6_area_create (area_id, o); |
| 347 | |
| 348 | /* attach interface to area */ |
| 349 | listnode_add (oa->if_list, oi); /* sort ?? */ |
| 350 | oi->area = oa; |
| 351 | |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 352 | SET_FLAG (oa->flag, OSPF6_AREA_ENABLE); |
| 353 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 354 | /* start up */ |
| 355 | thread_add_event (master, interface_up, oi, 0); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 356 | |
hasso | 3b68735 | 2004-08-19 06:56:53 +0000 | [diff] [blame] | 357 | /* If the router is ABR, originate summary routes */ |
| 358 | if (ospf6_is_router_abr (o)) |
| 359 | ospf6_abr_enable_area (oa); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 360 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 361 | return CMD_SUCCESS; |
| 362 | } |
| 363 | |
| 364 | DEFUN (no_ospf6_interface_area, |
| 365 | no_ospf6_interface_area_cmd, |
| 366 | "no interface IFNAME area A.B.C.D", |
| 367 | NO_STR |
| 368 | "Disable routing on an IPv6 interface\n" |
| 369 | IFNAME_STR |
| 370 | "Specify the OSPF6 area ID\n" |
| 371 | "OSPF6 area ID in IPv4 address notation\n" |
| 372 | ) |
| 373 | { |
| 374 | struct ospf6 *o; |
| 375 | struct ospf6_interface *oi; |
hasso | 3b68735 | 2004-08-19 06:56:53 +0000 | [diff] [blame] | 376 | struct ospf6_area *oa; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 377 | struct interface *ifp; |
| 378 | u_int32_t area_id; |
| 379 | |
| 380 | o = (struct ospf6 *) vty->index; |
| 381 | |
| 382 | ifp = if_lookup_by_name (argv[0]); |
| 383 | if (ifp == NULL) |
| 384 | { |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 385 | vty_out (vty, "No such interface %s%s", argv[0], VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 386 | return CMD_SUCCESS; |
| 387 | } |
| 388 | |
| 389 | oi = (struct ospf6_interface *) ifp->info; |
| 390 | if (oi == NULL) |
| 391 | { |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 392 | vty_out (vty, "Interface %s not enabled%s", ifp->name, VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 393 | return CMD_SUCCESS; |
| 394 | } |
| 395 | |
| 396 | /* parse Area-ID */ |
| 397 | if (inet_pton (AF_INET, argv[1], &area_id) != 1) |
| 398 | { |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 399 | vty_out (vty, "Invalid Area-ID: %s%s", argv[1], VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 400 | return CMD_SUCCESS; |
| 401 | } |
| 402 | |
| 403 | if (oi->area->area_id != area_id) |
| 404 | { |
| 405 | vty_out (vty, "Wrong Area-ID: %s is attached to area %s%s", |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 406 | oi->interface->name, oi->area->name, VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 407 | return CMD_SUCCESS; |
| 408 | } |
| 409 | |
| 410 | thread_execute (master, interface_down, oi, 0); |
| 411 | |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 412 | oa = oi->area; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 413 | listnode_delete (oi->area->if_list, oi); |
| 414 | oi->area = (struct ospf6_area *) NULL; |
| 415 | |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 416 | /* Withdraw inter-area routes from this area, if necessary */ |
| 417 | if (oa->if_list->count == 0) |
| 418 | { |
| 419 | UNSET_FLAG (oa->flag, OSPF6_AREA_ENABLE); |
hasso | 3b68735 | 2004-08-19 06:56:53 +0000 | [diff] [blame] | 420 | ospf6_abr_disable_area (oa); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 421 | } |
| 422 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 423 | return CMD_SUCCESS; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 424 | } |
| 425 | |
| 426 | void |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 427 | ospf6_show (struct vty *vty, struct ospf6 *o) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 428 | { |
hasso | 52dc7ee | 2004-09-23 19:18:23 +0000 | [diff] [blame] | 429 | struct listnode *n; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 430 | struct ospf6_area *oa; |
| 431 | char router_id[16], duration[32]; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 432 | struct timeval now, running; |
| 433 | |
| 434 | /* process id, router id */ |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 435 | inet_ntop (AF_INET, &o->router_id, router_id, sizeof (router_id)); |
| 436 | vty_out (vty, " OSPFv3 Routing Process (0) with Router-ID %s%s", |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 437 | router_id, VNL); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 438 | |
| 439 | /* running time */ |
| 440 | gettimeofday (&now, (struct timezone *)NULL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 441 | timersub (&now, &o->starttime, &running); |
| 442 | timerstring (&running, duration, sizeof (duration)); |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 443 | vty_out (vty, " Running %s%s", duration, VNL); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 444 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 445 | /* Redistribute configuration */ |
| 446 | /* XXX */ |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 447 | |
| 448 | /* LSAs */ |
| 449 | vty_out (vty, " Number of AS scoped LSAs is %u%s", |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 450 | o->lsdb->count, VNL); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 451 | |
| 452 | /* Areas */ |
| 453 | vty_out (vty, " Number of areas in this router is %u%s", |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 454 | listcount (o->area_list), VNL); |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 455 | |
| 456 | for (ALL_LIST_ELEMENTS_RO (o->area_list, n, oa)) |
| 457 | ospf6_area_show (vty, oa); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 458 | } |
| 459 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 460 | /* show top level structures */ |
| 461 | DEFUN (show_ipv6_ospf6, |
| 462 | show_ipv6_ospf6_cmd, |
| 463 | "show ipv6 ospf6", |
| 464 | SHOW_STR |
| 465 | IP6_STR |
| 466 | OSPF6_STR) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 467 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 468 | OSPF6_CMD_CHECK_RUNNING (); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 469 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 470 | ospf6_show (vty, ospf6); |
| 471 | return CMD_SUCCESS; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 472 | } |
| 473 | |
| 474 | DEFUN (show_ipv6_ospf6_route, |
| 475 | show_ipv6_ospf6_route_cmd, |
| 476 | "show ipv6 ospf6 route", |
| 477 | SHOW_STR |
| 478 | IP6_STR |
| 479 | OSPF6_STR |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 480 | ROUTE_STR |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 481 | ) |
| 482 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 483 | ospf6_route_table_show (vty, argc, argv, ospf6->route_table); |
| 484 | return CMD_SUCCESS; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 485 | } |
| 486 | |
| 487 | ALIAS (show_ipv6_ospf6_route, |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 488 | show_ipv6_ospf6_route_detail_cmd, |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 489 | "show ipv6 ospf6 route (X:X::X:X|X:X::X:X/M|detail|summary)", |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 490 | SHOW_STR |
| 491 | IP6_STR |
| 492 | OSPF6_STR |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 493 | ROUTE_STR |
| 494 | "Specify IPv6 address\n" |
| 495 | "Specify IPv6 prefix\n" |
| 496 | "Detailed information\n" |
| 497 | "Summary of route table\n" |
| 498 | ); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 499 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 500 | DEFUN (show_ipv6_ospf6_route_match, |
| 501 | show_ipv6_ospf6_route_match_cmd, |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 502 | "show ipv6 ospf6 route X:X::X:X/M match", |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 503 | SHOW_STR |
| 504 | IP6_STR |
| 505 | OSPF6_STR |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 506 | ROUTE_STR |
| 507 | "Specify IPv6 prefix\n" |
| 508 | "Display routes which match the specified route\n" |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 509 | ) |
| 510 | { |
paul | 0c083ee | 2004-10-10 12:54:58 +0000 | [diff] [blame] | 511 | const char *sargv[CMD_ARGC_MAX]; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 512 | int i, sargc; |
| 513 | |
| 514 | /* copy argv to sargv and then append "match" */ |
| 515 | for (i = 0; i < argc; i++) |
| 516 | sargv[i] = argv[i]; |
| 517 | sargc = argc; |
| 518 | sargv[sargc++] = "match"; |
| 519 | sargv[sargc] = NULL; |
| 520 | |
| 521 | ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table); |
| 522 | return CMD_SUCCESS; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 523 | } |
| 524 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 525 | DEFUN (show_ipv6_ospf6_route_match_detail, |
| 526 | show_ipv6_ospf6_route_match_detail_cmd, |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 527 | "show ipv6 ospf6 route X:X::X:X/M match detail", |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 528 | SHOW_STR |
| 529 | IP6_STR |
| 530 | OSPF6_STR |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 531 | ROUTE_STR |
| 532 | "Specify IPv6 prefix\n" |
| 533 | "Display routes which match the specified route\n" |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 534 | "Detailed information\n" |
| 535 | ) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 536 | { |
paul | 0c083ee | 2004-10-10 12:54:58 +0000 | [diff] [blame] | 537 | const char *sargv[CMD_ARGC_MAX]; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 538 | int i, sargc; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 539 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 540 | /* copy argv to sargv and then append "match" and "detail" */ |
| 541 | for (i = 0; i < argc; i++) |
| 542 | sargv[i] = argv[i]; |
| 543 | sargc = argc; |
| 544 | sargv[sargc++] = "match"; |
| 545 | sargv[sargc++] = "detail"; |
| 546 | sargv[sargc] = NULL; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 547 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 548 | ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table); |
| 549 | return CMD_SUCCESS; |
| 550 | } |
| 551 | |
Paul Jakma | cb4b884 | 2006-05-15 10:39:30 +0000 | [diff] [blame] | 552 | ALIAS (show_ipv6_ospf6_route_match, |
| 553 | show_ipv6_ospf6_route_longer_cmd, |
| 554 | "show ipv6 ospf6 route X:X::X:X/M longer", |
| 555 | SHOW_STR |
| 556 | IP6_STR |
| 557 | OSPF6_STR |
| 558 | ROUTE_STR |
| 559 | "Specify IPv6 prefix\n" |
| 560 | "Display routes longer than the specified route\n" |
| 561 | ); |
| 562 | |
| 563 | DEFUN (show_ipv6_ospf6_route_match_detail, |
| 564 | show_ipv6_ospf6_route_longer_detail_cmd, |
| 565 | "show ipv6 ospf6 route X:X::X:X/M longer detail", |
| 566 | SHOW_STR |
| 567 | IP6_STR |
| 568 | OSPF6_STR |
| 569 | ROUTE_STR |
| 570 | "Specify IPv6 prefix\n" |
| 571 | "Display routes longer than the specified route\n" |
| 572 | "Detailed information\n" |
| 573 | ); |
| 574 | |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 575 | ALIAS (show_ipv6_ospf6_route, |
| 576 | show_ipv6_ospf6_route_type_cmd, |
| 577 | "show ipv6 ospf6 route (intra-area|inter-area|external-1|external-2)", |
| 578 | SHOW_STR |
| 579 | IP6_STR |
| 580 | OSPF6_STR |
| 581 | ROUTE_STR |
| 582 | "Dispaly Intra-Area routes\n" |
| 583 | "Dispaly Inter-Area routes\n" |
| 584 | "Dispaly Type-1 External routes\n" |
| 585 | "Dispaly Type-2 External routes\n" |
| 586 | ); |
| 587 | |
| 588 | DEFUN (show_ipv6_ospf6_route_type_detail, |
| 589 | show_ipv6_ospf6_route_type_detail_cmd, |
| 590 | "show ipv6 ospf6 route (intra-area|inter-area|external-1|external-2) detail", |
| 591 | SHOW_STR |
| 592 | IP6_STR |
| 593 | OSPF6_STR |
| 594 | ROUTE_STR |
| 595 | "Dispaly Intra-Area routes\n" |
| 596 | "Dispaly Inter-Area routes\n" |
| 597 | "Dispaly Type-1 External routes\n" |
| 598 | "Dispaly Type-2 External routes\n" |
| 599 | "Detailed information\n" |
| 600 | ) |
| 601 | { |
paul | 0c083ee | 2004-10-10 12:54:58 +0000 | [diff] [blame] | 602 | const char *sargv[CMD_ARGC_MAX]; |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 603 | int i, sargc; |
| 604 | |
| 605 | /* copy argv to sargv and then append "detail" */ |
| 606 | for (i = 0; i < argc; i++) |
| 607 | sargv[i] = argv[i]; |
| 608 | sargc = argc; |
| 609 | sargv[sargc++] = "detail"; |
| 610 | sargv[sargc] = NULL; |
| 611 | |
| 612 | ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table); |
| 613 | return CMD_SUCCESS; |
| 614 | } |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 615 | |
| 616 | /* OSPF configuration write function. */ |
| 617 | int |
| 618 | config_write_ospf6 (struct vty *vty) |
| 619 | { |
| 620 | char router_id[16]; |
hasso | 52dc7ee | 2004-09-23 19:18:23 +0000 | [diff] [blame] | 621 | struct listnode *j, *k; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 622 | struct ospf6_area *oa; |
| 623 | struct ospf6_interface *oi; |
| 624 | |
| 625 | /* OSPFv6 configuration. */ |
| 626 | if (ospf6 == NULL) |
| 627 | return CMD_SUCCESS; |
| 628 | if (CHECK_FLAG (ospf6->flag, OSPF6_DISABLED)) |
| 629 | return CMD_SUCCESS; |
| 630 | |
hasso | c8a440e | 2004-10-11 17:02:40 +0000 | [diff] [blame] | 631 | inet_ntop (AF_INET, &ospf6->router_id_static, router_id, sizeof (router_id)); |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 632 | vty_out (vty, "router ospf6%s", VNL); |
hasso | c8a440e | 2004-10-11 17:02:40 +0000 | [diff] [blame] | 633 | if (ospf6->router_id_static != 0) |
| 634 | vty_out (vty, " router-id %s%s", router_id, VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 635 | |
| 636 | ospf6_redistribute_config_write (vty); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 637 | ospf6_area_config_write (vty); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 638 | |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 639 | for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, j, oa)) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 640 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 641 | for (ALL_LIST_ELEMENTS_RO (oa->if_list, k, oi)) |
| 642 | vty_out (vty, " interface %s area %s%s", |
| 643 | oi->interface->name, oa->name, VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 644 | } |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 645 | vty_out (vty, "!%s", VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 646 | return 0; |
| 647 | } |
| 648 | |
| 649 | /* OSPF6 node structure. */ |
| 650 | struct cmd_node ospf6_node = |
| 651 | { |
| 652 | OSPF6_NODE, |
| 653 | "%s(config-ospf6)# ", |
hasso | 69b4a81 | 2004-08-26 18:10:36 +0000 | [diff] [blame] | 654 | 1 /* VTYSH */ |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 655 | }; |
| 656 | |
| 657 | /* Install ospf related commands. */ |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 658 | void |
| 659 | ospf6_top_init () |
| 660 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 661 | /* Install ospf6 top node. */ |
| 662 | install_node (&ospf6_node, config_write_ospf6); |
| 663 | |
| 664 | install_element (VIEW_NODE, &show_ipv6_ospf6_cmd); |
| 665 | install_element (ENABLE_NODE, &show_ipv6_ospf6_cmd); |
| 666 | install_element (CONFIG_NODE, &router_ospf6_cmd); |
| 667 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 668 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_cmd); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 669 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_detail_cmd); |
| 670 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_match_cmd); |
| 671 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_match_detail_cmd); |
Paul Jakma | cb4b884 | 2006-05-15 10:39:30 +0000 | [diff] [blame] | 672 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_longer_cmd); |
| 673 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_longer_detail_cmd); |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 674 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_type_cmd); |
| 675 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_type_detail_cmd); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 676 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_cmd); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 677 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_detail_cmd); |
| 678 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_match_cmd); |
| 679 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_match_detail_cmd); |
Paul Jakma | cb4b884 | 2006-05-15 10:39:30 +0000 | [diff] [blame] | 680 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_longer_cmd); |
| 681 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_longer_detail_cmd); |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 682 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_type_cmd); |
| 683 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_type_detail_cmd); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 684 | |
| 685 | install_default (OSPF6_NODE); |
| 686 | install_element (OSPF6_NODE, &ospf6_router_id_cmd); |
| 687 | install_element (OSPF6_NODE, &ospf6_interface_area_cmd); |
| 688 | install_element (OSPF6_NODE, &no_ospf6_interface_area_cmd); |
| 689 | install_element (OSPF6_NODE, &no_router_ospf6_cmd); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 690 | } |
| 691 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 692 | |