level = parse_show_level (argc, argv);
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, NULL, NULL, NULL, oa->lsdb);
}
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
- for (j = listhead (oa->if_list); j; nextnode (j))
+ for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
{
- oi = (struct ospf6_interface *) getdata (j);
vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
oi->interface->name, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, NULL, NULL, NULL, oi->lsdb);
switch (OSPF6_LSA_SCOPE (type))
{
case OSPF6_SCOPE_AREA:
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, &type, NULL, NULL, oa->lsdb);
}
break;
case OSPF6_SCOPE_LINKLOCAL:
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
- for (j = listhead (oa->if_list); j; nextnode (j))
+ for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
{
- oi = (struct ospf6_interface *) getdata (j);
vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
oi->interface->name, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, &type, NULL, NULL, oi->lsdb);
argv++;
level = parse_show_level (argc, argv);
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, NULL, &id, NULL, oa->lsdb);
}
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
- for (j = listhead (oa->if_list); j; nextnode (j))
+ for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
{
- oi = (struct ospf6_interface *) getdata (j);
vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
oi->interface->name, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, NULL, &id, NULL, oi->lsdb);
argv++;
level = parse_show_level (argc, argv);
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oa->lsdb);
}
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
- for (j = listhead (oa->if_list); j; nextnode (j))
+ for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
{
- oi = (struct ospf6_interface *) getdata (j);
vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
oi->interface->name, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oi->lsdb);
switch (OSPF6_LSA_SCOPE (type))
{
case OSPF6_SCOPE_AREA:
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, &type, &id, NULL, oa->lsdb);
}
break;
case OSPF6_SCOPE_LINKLOCAL:
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
- for (j = listhead (oa->if_list); j; nextnode (j))
+ for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
{
- oi = (struct ospf6_interface *) getdata (j);
vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
oi->interface->name, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, &type, &id, NULL, oi->lsdb);
switch (OSPF6_LSA_SCOPE (type))
{
case OSPF6_SCOPE_AREA:
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oa->lsdb);
}
break;
case OSPF6_SCOPE_LINKLOCAL:
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
- for (j = listhead (oa->if_list); j; nextnode (j))
+ for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
{
- oi = (struct ospf6_interface *) getdata (j);
vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
oi->interface->name, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oi->lsdb);
argv++;
level = parse_show_level (argc, argv);
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oa->lsdb);
}
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
- for (j = listhead (oa->if_list); j; nextnode (j))
+ for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
{
- oi = (struct ospf6_interface *) getdata (j);
vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
oi->interface->name, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oi->lsdb);
argv++;
level = parse_show_level (argc, argv);
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oa->lsdb);
}
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
- for (j = listhead (oa->if_list); j; nextnode (j))
+ for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
{
- oi = (struct ospf6_interface *) getdata (j);
vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
oi->interface->name, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oi->lsdb);
switch (OSPF6_LSA_SCOPE (type))
{
case OSPF6_SCOPE_AREA:
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);
}
break;
case OSPF6_SCOPE_LINKLOCAL:
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
- for (j = listhead (oa->if_list); j; nextnode (j))
+ for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
{
- oi = (struct ospf6_interface *) getdata (j);
vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
oi->interface->name, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);
switch (OSPF6_LSA_SCOPE (type))
{
case OSPF6_SCOPE_AREA:
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);
}
break;
case OSPF6_SCOPE_LINKLOCAL:
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
- for (j = listhead (oa->if_list); j; nextnode (j))
+ for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
{
- oi = (struct ospf6_interface *) getdata (j);
vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
oi->interface->name, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);
adv_router = o->router_id;
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oa->lsdb);
}
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
- for (j = listhead (oa->if_list); j; nextnode (j))
+ for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
{
- oi = (struct ospf6_interface *) getdata (j);
vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
oi->interface->name, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oi->lsdb);
switch (OSPF6_LSA_SCOPE (type))
{
case OSPF6_SCOPE_AREA:
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oa->lsdb);
}
break;
case OSPF6_SCOPE_LINKLOCAL:
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
- for (j = listhead (oa->if_list); j; nextnode (j))
+ for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
{
- oi = (struct ospf6_interface *) getdata (j);
vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
oi->interface->name, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oi->lsdb);
switch (OSPF6_LSA_SCOPE (type))
{
case OSPF6_SCOPE_AREA:
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);
}
break;
case OSPF6_SCOPE_LINKLOCAL:
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
- for (j = listhead (oa->if_list); j; nextnode (j))
+ for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
{
- oi = (struct ospf6_interface *) getdata (j);
vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
oi->interface->name, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);
switch (OSPF6_LSA_SCOPE (type))
{
case OSPF6_SCOPE_AREA:
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);
}
break;
case OSPF6_SCOPE_LINKLOCAL:
- for (i = listhead (o->area_list); i; nextnode (i))
+ for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
{
- oa = (struct ospf6_area *) getdata (i);
- for (j = listhead (oa->if_list); j; nextnode (j))
+ for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
{
- oi = (struct ospf6_interface *) getdata (j);
vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,
oi->interface->name, oa->name, VNL, VNL);
ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);
struct listnode *node;
struct ospf6_area *oa;
- for (node = listhead (ospf6->area_list); node; nextnode (node))
+ for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa))
{
- oa = OSPF6_AREA (getdata (node));
-
vty_out (vty, "%s SPF Result in Area %s%s%s",
VNL, oa->name, VNL, VNL);
ospf6_linkstate_table_show (vty, argc, argv, oa->spf_table);
sargv[sargc++] = "detail";
sargv[sargc] = NULL;
- for (node = listhead (ospf6->area_list); node; nextnode (node))
+ for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa))
{
- oa = OSPF6_AREA (getdata (node));
-
vty_out (vty, "%s SPF Result in Area %s%s%s",
VNL, oa->name, VNL, VNL);
ospf6_linkstate_table_show (vty, sargc, sargv, oa->spf_table);