#include "zebra/rtadv.h"
#include "zebra_ns.h"
+#include "zebra_vrf.h"
#include "zebra/interface.h"
#include "zebra/rib.h"
#include "zebra/zserv.h"
vrf_config_write (struct vty *vty)
{
struct listnode *node;
- struct vrf *vrf;
+ struct zebra_vrf *zvrf;
- for (ALL_LIST_ELEMENTS_RO (vrf_list, node, vrf))
+ for (ALL_LIST_ELEMENTS_RO (zvrf_list, node, zvrf))
{
- if (strcmp(vrf->name, VRF_DEFAULT_NAME))
+ if (strcmp(zvrf->name, VRF_DEFAULT_NAME))
{
- vty_out (vty, "vrf %s%s", vrf->name, VTY_NEWLINE);
+ vty_out (vty, "vrf %s%s", zvrf->name, VTY_NEWLINE);
vty_out (vty, "!%s", VTY_NEWLINE);
}
}
struct zebra_vrf *zvrf;
int write =0;
struct listnode *node;
- struct vrf *vrfp;
- for (ALL_LIST_ELEMENTS_RO (vrf_list, node, vrfp))
+ for (ALL_LIST_ELEMENTS_RO (zvrf_list, node, zvrf))
{
- if ((zvrf = vrfp->info) == NULL ||
- (stable = zvrf->stable[AFI_IP][safi]) == NULL)
+ if ((stable = zvrf->stable[AFI_IP][safi]) == NULL)
continue;
for (rn = route_top (stable); rn; rn = route_next (rn))
vty_out (vty, " %d", si->distance);
if (si->vrf_id != VRF_DEFAULT)
- vty_out (vty, " vrf %s", vrfp ? vrfp->name : "");
+ vty_out (vty, " vrf %s", zvrf ? zvrf->name : "");
vty_out (vty, "%s", VTY_NEWLINE);
struct route_table *stable;
struct zebra_vrf *zvrf;
struct listnode *node;
- struct vrf *vrfp;
- for (ALL_LIST_ELEMENTS_RO (vrf_list, node, vrfp))
+ for (ALL_LIST_ELEMENTS_RO (zvrf_list, node, zvrf))
{
- if ((zvrf = vrfp->info) == NULL ||
- (stable = zvrf->stable[AFI_IP6][SAFI_UNICAST]) == NULL)
+ if ((stable = zvrf->stable[AFI_IP6][SAFI_UNICAST]) == NULL)
continue;
for (rn = route_top (stable); rn; rn = route_next (rn))
if (si->vrf_id != VRF_DEFAULT)
{
- zvrf = vrf_info_lookup (si->vrf_id);
- vty_out (vty, " vrf %s", vrfp->name);
+ vty_out (vty, " vrf %s", zvrf->name);
}
vty_out (vty, "%s", VTY_NEWLINE);
{
struct zebra_vrf *zvrf;
struct listnode *node;
- struct vrf *vrfp;
- for (ALL_LIST_ELEMENTS_RO (vrf_list, node, vrfp))
+ for (ALL_LIST_ELEMENTS_RO (zvrf_list, node, zvrf))
{
- if ((zvrf = vrfp->info) == NULL)
- continue;
if (!zvrf->vrf_id)
continue;