/* Create new interface structure. */
struct interface *
-if_create_vrf (const char *name, int namelen, vrf_id_t vrf_id)
+if_create (const char *name, int namelen, vrf_id_t vrf_id)
{
struct interface *ifp;
struct list *intf_list = vrf_iflist_get (vrf_id);
return ifp;
}
-struct interface *
-if_create (const char *name, int namelen)
-{
- return if_create_vrf (name, namelen, VRF_DEFAULT);
-}
-
/* Create new interface structure. */
void
if_update_vrf (struct interface *ifp, const char *name, int namelen, vrf_id_t vrf_id)
struct interface *ifp;
return ((ifp = if_lookup_by_name_vrf (name, vrf_id)) != NULL) ? ifp :
- if_create_vrf (name, strlen(name), vrf_id);
+ if_create (name, strlen(name), vrf_id);
}
struct interface *
}
}
}
- return (if_create_vrf (name, namelen, vrf_id));
+ return (if_create (name, namelen, vrf_id));
}
struct interface *
/* Prototypes. */
extern int if_cmp_name_func (char *, char *);
-extern struct interface *if_create (const char *name, int namelen);
extern struct interface *if_lookup_exact_address (void *matchaddr, int family);
extern struct connected *if_lookup_address (void *matchaddr, int family);
extern struct interface *if_lookup_prefix (struct prefix *prefix);
extern void if_update_vrf (struct interface *, const char *name, int namelen,
vrf_id_t vrf_id);
-extern struct interface *if_create_vrf (const char *name, int namelen,
- vrf_id_t vrf_id);
+extern struct interface *if_create (const char *name, int namelen,
+ vrf_id_t vrf_id);
extern struct interface *if_lookup_by_index (ifindex_t, vrf_id_t vrf_id);
extern struct interface *if_lookup_exact_address_vrf (void *matchaddr, int family,
vrf_id_t vrf_id);
zlog_debug ("ospf_vl_new(): creating pseudo zebra interface");
snprintf (ifname, sizeof(ifname), "VLINK%d", vlink_count);
- vi = if_create (ifname, strnlen(ifname, sizeof(ifname)));
+ vi = if_create (ifname, strnlen(ifname, sizeof(ifname)), VRF_DEFAULT);
/*
* if_create sets ZEBRA_INTERFACE_LINKDETECTION
* virtual links don't need this.
void pim_if_create_pimreg (void)
{
if (!pim_regiface) {
- pim_regiface = if_create("pimreg", strlen("pimreg"));
+ pim_regiface = if_create("pimreg", strlen("pimreg"), VRF_DEFAULT);
pim_regiface->ifindex = PIM_OIF_PIM_REGISTER_VIF;
pim_if_new(pim_regiface, 0, 0);
if (ifp == NULL)
{
/* Interface that zebra was not previously aware of, so create. */
- ifp = if_create (ifname, ifnlen);
+ ifp = if_create (ifname, ifnlen, VRF_DEFAULT);
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug ("%s: creating ifp for ifindex %d",
__func__, ifm->ifm_index);