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 | |
Paul Jakma | cf1ce25 | 2006-05-15 10:46:07 +0000 | [diff] [blame] | 129 | o->route_table = OSPF6_ROUTE_TABLE_CREATE (GLOBAL, ROUTES); |
| 130 | o->route_table->scope = o; |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 131 | o->route_table->hook_add = ospf6_top_route_hook_add; |
| 132 | o->route_table->hook_remove = ospf6_top_route_hook_remove; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 133 | |
Paul Jakma | cf1ce25 | 2006-05-15 10:46:07 +0000 | [diff] [blame] | 134 | o->brouter_table = OSPF6_ROUTE_TABLE_CREATE (GLOBAL, BORDER_ROUTERS); |
| 135 | o->brouter_table->scope = o; |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 136 | o->brouter_table->hook_add = ospf6_top_brouter_hook_add; |
| 137 | o->brouter_table->hook_remove = ospf6_top_brouter_hook_remove; |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 138 | |
Paul Jakma | cf1ce25 | 2006-05-15 10:46:07 +0000 | [diff] [blame] | 139 | o->external_table = OSPF6_ROUTE_TABLE_CREATE (GLOBAL, EXTERNAL_ROUTES); |
| 140 | o->external_table->scope = o; |
| 141 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 142 | o->external_id_table = route_table_init (); |
| 143 | |
| 144 | return o; |
| 145 | } |
| 146 | |
| 147 | void |
| 148 | ospf6_delete (struct ospf6 *o) |
| 149 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 150 | struct listnode *node, *nnode; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 151 | struct ospf6_area *oa; |
| 152 | |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 153 | for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa)) |
| 154 | ospf6_area_delete (oa); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 155 | |
| 156 | ospf6_lsdb_delete (o->lsdb); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 157 | ospf6_lsdb_delete (o->lsdb_self); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 158 | |
| 159 | ospf6_route_table_delete (o->route_table); |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 160 | ospf6_route_table_delete (o->brouter_table); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 161 | |
| 162 | ospf6_route_table_delete (o->external_table); |
| 163 | route_table_finish (o->external_id_table); |
| 164 | |
| 165 | XFREE (MTYPE_OSPF6_TOP, o); |
| 166 | } |
| 167 | |
| 168 | void |
| 169 | ospf6_enable (struct ospf6 *o) |
| 170 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 171 | struct listnode *node, *nnode; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 172 | struct ospf6_area *oa; |
| 173 | |
| 174 | if (CHECK_FLAG (o->flag, OSPF6_DISABLED)) |
| 175 | { |
| 176 | UNSET_FLAG (o->flag, OSPF6_DISABLED); |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 177 | for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa)) |
| 178 | ospf6_area_enable (oa); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 179 | } |
| 180 | } |
| 181 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 182 | void |
| 183 | ospf6_disable (struct ospf6 *o) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 184 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 185 | struct listnode *node, *nnode; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 186 | struct ospf6_area *oa; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 187 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 188 | if (! CHECK_FLAG (o->flag, OSPF6_DISABLED)) |
| 189 | { |
| 190 | SET_FLAG (o->flag, OSPF6_DISABLED); |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 191 | |
| 192 | for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa)) |
| 193 | ospf6_area_disable (oa); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 194 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 195 | ospf6_lsdb_remove_all (o->lsdb); |
| 196 | ospf6_route_remove_all (o->route_table); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 197 | ospf6_route_remove_all (o->brouter_table); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 198 | } |
| 199 | } |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 200 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 201 | int |
| 202 | ospf6_maxage_remover (struct thread *thread) |
| 203 | { |
| 204 | struct ospf6 *o = (struct ospf6 *) THREAD_ARG (thread); |
| 205 | struct ospf6_area *oa; |
| 206 | struct ospf6_interface *oi; |
| 207 | struct ospf6_neighbor *on; |
hasso | 52dc7ee | 2004-09-23 19:18:23 +0000 | [diff] [blame] | 208 | struct listnode *i, *j, *k; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 209 | |
| 210 | o->maxage_remover = (struct thread *) NULL; |
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 (o->area_list, i, oa)) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 213 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 214 | for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi)) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 215 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 216 | for (ALL_LIST_ELEMENTS_RO (oi->neighbor_list, k, on)) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 217 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 218 | if (on->state != OSPF6_NEIGHBOR_EXCHANGE && |
| 219 | on->state != OSPF6_NEIGHBOR_LOADING) |
| 220 | continue; |
| 221 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 222 | return 0; |
| 223 | } |
| 224 | } |
| 225 | } |
| 226 | |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 227 | for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa)) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 228 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 229 | for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi)) |
| 230 | OSPF6_LSDB_MAXAGE_REMOVER (oi->lsdb); |
| 231 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 232 | OSPF6_LSDB_MAXAGE_REMOVER (oa->lsdb); |
| 233 | } |
| 234 | OSPF6_LSDB_MAXAGE_REMOVER (o->lsdb); |
| 235 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 236 | return 0; |
| 237 | } |
| 238 | |
| 239 | void |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 240 | ospf6_maxage_remove (struct ospf6 *o) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 241 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 242 | if (o && ! o->maxage_remover) |
| 243 | o->maxage_remover = thread_add_event (master, ospf6_maxage_remover, o, 0); |
| 244 | } |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 245 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 246 | /* start ospf6 */ |
| 247 | DEFUN (router_ospf6, |
| 248 | router_ospf6_cmd, |
| 249 | "router ospf6", |
| 250 | ROUTER_STR |
| 251 | OSPF6_STR) |
| 252 | { |
| 253 | if (ospf6 == NULL) |
| 254 | ospf6 = ospf6_create (); |
| 255 | if (CHECK_FLAG (ospf6->flag, OSPF6_DISABLED)) |
| 256 | ospf6_enable (ospf6); |
| 257 | |
| 258 | /* set current ospf point. */ |
| 259 | vty->node = OSPF6_NODE; |
| 260 | vty->index = ospf6; |
| 261 | |
| 262 | return CMD_SUCCESS; |
| 263 | } |
| 264 | |
| 265 | /* stop ospf6 */ |
| 266 | DEFUN (no_router_ospf6, |
| 267 | no_router_ospf6_cmd, |
| 268 | "no router ospf6", |
| 269 | NO_STR |
| 270 | OSPF6_ROUTER_STR) |
| 271 | { |
| 272 | if (ospf6 == NULL || CHECK_FLAG (ospf6->flag, OSPF6_DISABLED)) |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 273 | vty_out (vty, "OSPFv3 is not running%s", VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 274 | else |
| 275 | ospf6_disable (ospf6); |
| 276 | |
| 277 | /* return to config node . */ |
| 278 | vty->node = CONFIG_NODE; |
| 279 | vty->index = NULL; |
| 280 | |
| 281 | return CMD_SUCCESS; |
| 282 | } |
| 283 | |
| 284 | /* change Router_ID commands. */ |
| 285 | DEFUN (ospf6_router_id, |
| 286 | ospf6_router_id_cmd, |
| 287 | "router-id A.B.C.D", |
| 288 | "Configure OSPF Router-ID\n" |
| 289 | V4NOTATION_STR) |
| 290 | { |
| 291 | int ret; |
| 292 | u_int32_t router_id; |
| 293 | struct ospf6 *o; |
| 294 | |
| 295 | o = (struct ospf6 *) vty->index; |
| 296 | |
| 297 | ret = inet_pton (AF_INET, argv[0], &router_id); |
| 298 | if (ret == 0) |
| 299 | { |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 300 | vty_out (vty, "malformed OSPF Router-ID: %s%s", argv[0], VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 301 | return CMD_SUCCESS; |
| 302 | } |
| 303 | |
hasso | c8a440e | 2004-10-11 17:02:40 +0000 | [diff] [blame] | 304 | o->router_id_static = router_id; |
| 305 | if (o->router_id == 0) |
| 306 | o->router_id = router_id; |
| 307 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 308 | return CMD_SUCCESS; |
| 309 | } |
| 310 | |
| 311 | DEFUN (ospf6_interface_area, |
| 312 | ospf6_interface_area_cmd, |
| 313 | "interface IFNAME area A.B.C.D", |
| 314 | "Enable routing on an IPv6 interface\n" |
| 315 | IFNAME_STR |
| 316 | "Specify the OSPF6 area ID\n" |
| 317 | "OSPF6 area ID in IPv4 address notation\n" |
| 318 | ) |
| 319 | { |
| 320 | struct ospf6 *o; |
hasso | 3b68735 | 2004-08-19 06:56:53 +0000 | [diff] [blame] | 321 | struct ospf6_area *oa; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 322 | struct ospf6_interface *oi; |
| 323 | struct interface *ifp; |
| 324 | u_int32_t area_id; |
| 325 | |
| 326 | o = (struct ospf6 *) vty->index; |
| 327 | |
| 328 | /* find/create ospf6 interface */ |
| 329 | ifp = if_get_by_name (argv[0]); |
| 330 | oi = (struct ospf6_interface *) ifp->info; |
| 331 | if (oi == NULL) |
| 332 | oi = ospf6_interface_create (ifp); |
| 333 | if (oi->area) |
| 334 | { |
| 335 | vty_out (vty, "%s already attached to Area %s%s", |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 336 | oi->interface->name, oi->area->name, VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 337 | return CMD_SUCCESS; |
| 338 | } |
| 339 | |
| 340 | /* parse Area-ID */ |
| 341 | if (inet_pton (AF_INET, argv[1], &area_id) != 1) |
| 342 | { |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 343 | vty_out (vty, "Invalid Area-ID: %s%s", argv[1], VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 344 | return CMD_SUCCESS; |
| 345 | } |
| 346 | |
| 347 | /* find/create ospf6 area */ |
| 348 | oa = ospf6_area_lookup (area_id, o); |
| 349 | if (oa == NULL) |
| 350 | oa = ospf6_area_create (area_id, o); |
| 351 | |
| 352 | /* attach interface to area */ |
| 353 | listnode_add (oa->if_list, oi); /* sort ?? */ |
| 354 | oi->area = oa; |
| 355 | |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 356 | SET_FLAG (oa->flag, OSPF6_AREA_ENABLE); |
| 357 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 358 | /* start up */ |
| 359 | thread_add_event (master, interface_up, oi, 0); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 360 | |
hasso | 3b68735 | 2004-08-19 06:56:53 +0000 | [diff] [blame] | 361 | /* If the router is ABR, originate summary routes */ |
| 362 | if (ospf6_is_router_abr (o)) |
| 363 | ospf6_abr_enable_area (oa); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 364 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 365 | return CMD_SUCCESS; |
| 366 | } |
| 367 | |
| 368 | DEFUN (no_ospf6_interface_area, |
| 369 | no_ospf6_interface_area_cmd, |
| 370 | "no interface IFNAME area A.B.C.D", |
| 371 | NO_STR |
| 372 | "Disable routing on an IPv6 interface\n" |
| 373 | IFNAME_STR |
| 374 | "Specify the OSPF6 area ID\n" |
| 375 | "OSPF6 area ID in IPv4 address notation\n" |
| 376 | ) |
| 377 | { |
| 378 | struct ospf6 *o; |
| 379 | struct ospf6_interface *oi; |
hasso | 3b68735 | 2004-08-19 06:56:53 +0000 | [diff] [blame] | 380 | struct ospf6_area *oa; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 381 | struct interface *ifp; |
| 382 | u_int32_t area_id; |
| 383 | |
| 384 | o = (struct ospf6 *) vty->index; |
| 385 | |
| 386 | ifp = if_lookup_by_name (argv[0]); |
| 387 | if (ifp == NULL) |
| 388 | { |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 389 | vty_out (vty, "No such interface %s%s", argv[0], VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 390 | return CMD_SUCCESS; |
| 391 | } |
| 392 | |
| 393 | oi = (struct ospf6_interface *) ifp->info; |
| 394 | if (oi == NULL) |
| 395 | { |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 396 | vty_out (vty, "Interface %s not enabled%s", ifp->name, VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 397 | return CMD_SUCCESS; |
| 398 | } |
| 399 | |
| 400 | /* parse Area-ID */ |
| 401 | if (inet_pton (AF_INET, argv[1], &area_id) != 1) |
| 402 | { |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 403 | vty_out (vty, "Invalid Area-ID: %s%s", argv[1], VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 404 | return CMD_SUCCESS; |
| 405 | } |
| 406 | |
| 407 | if (oi->area->area_id != area_id) |
| 408 | { |
| 409 | vty_out (vty, "Wrong Area-ID: %s is attached to area %s%s", |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 410 | oi->interface->name, oi->area->name, VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 411 | return CMD_SUCCESS; |
| 412 | } |
| 413 | |
| 414 | thread_execute (master, interface_down, oi, 0); |
| 415 | |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 416 | oa = oi->area; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 417 | listnode_delete (oi->area->if_list, oi); |
| 418 | oi->area = (struct ospf6_area *) NULL; |
| 419 | |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 420 | /* Withdraw inter-area routes from this area, if necessary */ |
| 421 | if (oa->if_list->count == 0) |
| 422 | { |
| 423 | UNSET_FLAG (oa->flag, OSPF6_AREA_ENABLE); |
hasso | 3b68735 | 2004-08-19 06:56:53 +0000 | [diff] [blame] | 424 | ospf6_abr_disable_area (oa); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 425 | } |
| 426 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 427 | return CMD_SUCCESS; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 428 | } |
| 429 | |
| 430 | void |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 431 | ospf6_show (struct vty *vty, struct ospf6 *o) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 432 | { |
hasso | 52dc7ee | 2004-09-23 19:18:23 +0000 | [diff] [blame] | 433 | struct listnode *n; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 434 | struct ospf6_area *oa; |
| 435 | char router_id[16], duration[32]; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 436 | struct timeval now, running; |
| 437 | |
| 438 | /* process id, router id */ |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 439 | inet_ntop (AF_INET, &o->router_id, router_id, sizeof (router_id)); |
| 440 | vty_out (vty, " OSPFv3 Routing Process (0) with Router-ID %s%s", |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 441 | router_id, VNL); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 442 | |
| 443 | /* running time */ |
| 444 | gettimeofday (&now, (struct timezone *)NULL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 445 | timersub (&now, &o->starttime, &running); |
| 446 | timerstring (&running, duration, sizeof (duration)); |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 447 | vty_out (vty, " Running %s%s", duration, VNL); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 448 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 449 | /* Redistribute configuration */ |
| 450 | /* XXX */ |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 451 | |
| 452 | /* LSAs */ |
| 453 | vty_out (vty, " Number of AS scoped LSAs is %u%s", |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 454 | o->lsdb->count, VNL); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 455 | |
| 456 | /* Areas */ |
| 457 | vty_out (vty, " Number of areas in this router is %u%s", |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 458 | listcount (o->area_list), VNL); |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 459 | |
| 460 | for (ALL_LIST_ELEMENTS_RO (o->area_list, n, oa)) |
| 461 | ospf6_area_show (vty, oa); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 462 | } |
| 463 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 464 | /* show top level structures */ |
| 465 | DEFUN (show_ipv6_ospf6, |
| 466 | show_ipv6_ospf6_cmd, |
| 467 | "show ipv6 ospf6", |
| 468 | SHOW_STR |
| 469 | IP6_STR |
| 470 | OSPF6_STR) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 471 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 472 | OSPF6_CMD_CHECK_RUNNING (); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 473 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 474 | ospf6_show (vty, ospf6); |
| 475 | return CMD_SUCCESS; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 476 | } |
| 477 | |
| 478 | DEFUN (show_ipv6_ospf6_route, |
| 479 | show_ipv6_ospf6_route_cmd, |
| 480 | "show ipv6 ospf6 route", |
| 481 | SHOW_STR |
| 482 | IP6_STR |
| 483 | OSPF6_STR |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 484 | ROUTE_STR |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 485 | ) |
| 486 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 487 | ospf6_route_table_show (vty, argc, argv, ospf6->route_table); |
| 488 | return CMD_SUCCESS; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 489 | } |
| 490 | |
| 491 | ALIAS (show_ipv6_ospf6_route, |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 492 | show_ipv6_ospf6_route_detail_cmd, |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 493 | "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] | 494 | SHOW_STR |
| 495 | IP6_STR |
| 496 | OSPF6_STR |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 497 | ROUTE_STR |
| 498 | "Specify IPv6 address\n" |
| 499 | "Specify IPv6 prefix\n" |
| 500 | "Detailed information\n" |
| 501 | "Summary of route table\n" |
| 502 | ); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 503 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 504 | DEFUN (show_ipv6_ospf6_route_match, |
| 505 | show_ipv6_ospf6_route_match_cmd, |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 506 | "show ipv6 ospf6 route X:X::X:X/M match", |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 507 | SHOW_STR |
| 508 | IP6_STR |
| 509 | OSPF6_STR |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 510 | ROUTE_STR |
| 511 | "Specify IPv6 prefix\n" |
| 512 | "Display routes which match the specified route\n" |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 513 | ) |
| 514 | { |
paul | 0c083ee | 2004-10-10 12:54:58 +0000 | [diff] [blame] | 515 | const char *sargv[CMD_ARGC_MAX]; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 516 | int i, sargc; |
| 517 | |
| 518 | /* copy argv to sargv and then append "match" */ |
| 519 | for (i = 0; i < argc; i++) |
| 520 | sargv[i] = argv[i]; |
| 521 | sargc = argc; |
| 522 | sargv[sargc++] = "match"; |
| 523 | sargv[sargc] = NULL; |
| 524 | |
| 525 | ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table); |
| 526 | return CMD_SUCCESS; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 527 | } |
| 528 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 529 | DEFUN (show_ipv6_ospf6_route_match_detail, |
| 530 | show_ipv6_ospf6_route_match_detail_cmd, |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 531 | "show ipv6 ospf6 route X:X::X:X/M match detail", |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 532 | SHOW_STR |
| 533 | IP6_STR |
| 534 | OSPF6_STR |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 535 | ROUTE_STR |
| 536 | "Specify IPv6 prefix\n" |
| 537 | "Display routes which match the specified route\n" |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 538 | "Detailed information\n" |
| 539 | ) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 540 | { |
paul | 0c083ee | 2004-10-10 12:54:58 +0000 | [diff] [blame] | 541 | const char *sargv[CMD_ARGC_MAX]; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 542 | int i, sargc; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 543 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 544 | /* copy argv to sargv and then append "match" and "detail" */ |
| 545 | for (i = 0; i < argc; i++) |
| 546 | sargv[i] = argv[i]; |
| 547 | sargc = argc; |
| 548 | sargv[sargc++] = "match"; |
| 549 | sargv[sargc++] = "detail"; |
| 550 | sargv[sargc] = NULL; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 551 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 552 | ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table); |
| 553 | return CMD_SUCCESS; |
| 554 | } |
| 555 | |
Paul Jakma | cb4b884 | 2006-05-15 10:39:30 +0000 | [diff] [blame] | 556 | ALIAS (show_ipv6_ospf6_route_match, |
| 557 | show_ipv6_ospf6_route_longer_cmd, |
| 558 | "show ipv6 ospf6 route X:X::X:X/M longer", |
| 559 | SHOW_STR |
| 560 | IP6_STR |
| 561 | OSPF6_STR |
| 562 | ROUTE_STR |
| 563 | "Specify IPv6 prefix\n" |
| 564 | "Display routes longer than the specified route\n" |
| 565 | ); |
| 566 | |
| 567 | DEFUN (show_ipv6_ospf6_route_match_detail, |
| 568 | show_ipv6_ospf6_route_longer_detail_cmd, |
| 569 | "show ipv6 ospf6 route X:X::X:X/M longer detail", |
| 570 | SHOW_STR |
| 571 | IP6_STR |
| 572 | OSPF6_STR |
| 573 | ROUTE_STR |
| 574 | "Specify IPv6 prefix\n" |
| 575 | "Display routes longer than the specified route\n" |
| 576 | "Detailed information\n" |
| 577 | ); |
| 578 | |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 579 | ALIAS (show_ipv6_ospf6_route, |
| 580 | show_ipv6_ospf6_route_type_cmd, |
| 581 | "show ipv6 ospf6 route (intra-area|inter-area|external-1|external-2)", |
| 582 | SHOW_STR |
| 583 | IP6_STR |
| 584 | OSPF6_STR |
| 585 | ROUTE_STR |
| 586 | "Dispaly Intra-Area routes\n" |
| 587 | "Dispaly Inter-Area routes\n" |
| 588 | "Dispaly Type-1 External routes\n" |
| 589 | "Dispaly Type-2 External routes\n" |
| 590 | ); |
| 591 | |
| 592 | DEFUN (show_ipv6_ospf6_route_type_detail, |
| 593 | show_ipv6_ospf6_route_type_detail_cmd, |
| 594 | "show ipv6 ospf6 route (intra-area|inter-area|external-1|external-2) detail", |
| 595 | SHOW_STR |
| 596 | IP6_STR |
| 597 | OSPF6_STR |
| 598 | ROUTE_STR |
| 599 | "Dispaly Intra-Area routes\n" |
| 600 | "Dispaly Inter-Area routes\n" |
| 601 | "Dispaly Type-1 External routes\n" |
| 602 | "Dispaly Type-2 External routes\n" |
| 603 | "Detailed information\n" |
| 604 | ) |
| 605 | { |
paul | 0c083ee | 2004-10-10 12:54:58 +0000 | [diff] [blame] | 606 | const char *sargv[CMD_ARGC_MAX]; |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 607 | int i, sargc; |
| 608 | |
| 609 | /* copy argv to sargv and then append "detail" */ |
| 610 | for (i = 0; i < argc; i++) |
| 611 | sargv[i] = argv[i]; |
| 612 | sargc = argc; |
| 613 | sargv[sargc++] = "detail"; |
| 614 | sargv[sargc] = NULL; |
| 615 | |
| 616 | ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table); |
| 617 | return CMD_SUCCESS; |
| 618 | } |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 619 | |
| 620 | /* OSPF configuration write function. */ |
| 621 | int |
| 622 | config_write_ospf6 (struct vty *vty) |
| 623 | { |
| 624 | char router_id[16]; |
hasso | 52dc7ee | 2004-09-23 19:18:23 +0000 | [diff] [blame] | 625 | struct listnode *j, *k; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 626 | struct ospf6_area *oa; |
| 627 | struct ospf6_interface *oi; |
| 628 | |
| 629 | /* OSPFv6 configuration. */ |
| 630 | if (ospf6 == NULL) |
| 631 | return CMD_SUCCESS; |
| 632 | if (CHECK_FLAG (ospf6->flag, OSPF6_DISABLED)) |
| 633 | return CMD_SUCCESS; |
| 634 | |
hasso | c8a440e | 2004-10-11 17:02:40 +0000 | [diff] [blame] | 635 | inet_ntop (AF_INET, &ospf6->router_id_static, router_id, sizeof (router_id)); |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 636 | vty_out (vty, "router ospf6%s", VNL); |
hasso | c8a440e | 2004-10-11 17:02:40 +0000 | [diff] [blame] | 637 | if (ospf6->router_id_static != 0) |
| 638 | vty_out (vty, " router-id %s%s", router_id, VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 639 | |
| 640 | ospf6_redistribute_config_write (vty); |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 641 | ospf6_area_config_write (vty); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 642 | |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 643 | for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, j, oa)) |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 644 | { |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 645 | for (ALL_LIST_ELEMENTS_RO (oa->if_list, k, oi)) |
| 646 | vty_out (vty, " interface %s area %s%s", |
| 647 | oi->interface->name, oa->name, VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 648 | } |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 649 | vty_out (vty, "!%s", VNL); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 650 | return 0; |
| 651 | } |
| 652 | |
| 653 | /* OSPF6 node structure. */ |
| 654 | struct cmd_node ospf6_node = |
| 655 | { |
| 656 | OSPF6_NODE, |
| 657 | "%s(config-ospf6)# ", |
hasso | 69b4a81 | 2004-08-26 18:10:36 +0000 | [diff] [blame] | 658 | 1 /* VTYSH */ |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 659 | }; |
| 660 | |
| 661 | /* Install ospf related commands. */ |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 662 | void |
| 663 | ospf6_top_init () |
| 664 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 665 | /* Install ospf6 top node. */ |
| 666 | install_node (&ospf6_node, config_write_ospf6); |
| 667 | |
| 668 | install_element (VIEW_NODE, &show_ipv6_ospf6_cmd); |
| 669 | install_element (ENABLE_NODE, &show_ipv6_ospf6_cmd); |
| 670 | install_element (CONFIG_NODE, &router_ospf6_cmd); |
| 671 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 672 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_cmd); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 673 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_detail_cmd); |
| 674 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_match_cmd); |
| 675 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_match_detail_cmd); |
Paul Jakma | cb4b884 | 2006-05-15 10:39:30 +0000 | [diff] [blame] | 676 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_longer_cmd); |
| 677 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_longer_detail_cmd); |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 678 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_type_cmd); |
| 679 | install_element (VIEW_NODE, &show_ipv6_ospf6_route_type_detail_cmd); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 680 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_cmd); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 681 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_detail_cmd); |
| 682 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_match_cmd); |
| 683 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_match_detail_cmd); |
Paul Jakma | cb4b884 | 2006-05-15 10:39:30 +0000 | [diff] [blame] | 684 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_longer_cmd); |
| 685 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_longer_detail_cmd); |
hasso | 4846ef6 | 2004-09-03 06:04:00 +0000 | [diff] [blame] | 686 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_type_cmd); |
| 687 | install_element (ENABLE_NODE, &show_ipv6_ospf6_route_type_detail_cmd); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 688 | |
| 689 | install_default (OSPF6_NODE); |
| 690 | install_element (OSPF6_NODE, &ospf6_router_id_cmd); |
| 691 | install_element (OSPF6_NODE, &ospf6_interface_area_cmd); |
| 692 | install_element (OSPF6_NODE, &no_ospf6_interface_area_cmd); |
| 693 | install_element (OSPF6_NODE, &no_router_ospf6_cmd); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 694 | } |
| 695 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 696 | |