struct connected *ifc;
if (ifp->connected)
- LIST_LOOP (ifp->connected, ifc, node)
+ for (ALL_LIST_ELEMENTS_RO (ifp->connected, node, ifc))
return ifc->address;
return NULL;
seed = 0;
if( ifp->connected)
- LIST_LOOP (ifp->connected, ifc, node)
+ for (ALL_LIST_ELEMENTS_RO (ifp->connected, node, ifc))
{
seed = ifc->address->u.prefix4.s_addr;
break;
vty_out (vty, " ip irdp preference %ld%s",
irdp->Preference, VTY_NEWLINE);
- LIST_LOOP (irdp->AdvPrefList, adv, node)
+ for (ALL_LIST_ELEMENTS_RO (irdp->AdvPrefList, node, adv))
vty_out (vty, " ip irdp address %s preference %d%s",
inet_2a(adv->ip.s_addr, b1),
adv->pref,
pref = atoi(argv[1]);
- LIST_LOOP (irdp->AdvPrefList, adv, node)
+ for (ALL_LIST_ELEMENTS_RO (irdp->AdvPrefList, node, adv))
if(adv->ip.s_addr == ip.s_addr)
return CMD_SUCCESS;
pref = atoi(argv[1]);
- for (node = listhead (irdp->AdvPrefList); node; node = nnode)
+ for (ALL_LIST_ELEMENTS (irdp->AdvPrefList, node, nnode, adv))
{
- nnode = node->next;
- adv = getdata (node);
-
if(adv->ip.s_addr == ip.s_addr )
{
listnode_delete(irdp->AdvPrefList, adv);