}
struct interface *
-if_get_by_name_len_vrf (const char *name, size_t namelen, vrf_id_t vrf_id, int vty)
+if_get_by_name_len (const char *name, size_t namelen, vrf_id_t vrf_id, int vty)
{
struct interface *ifp;
struct vrf *vrf;
return (if_create (name, namelen, vrf_id));
}
-struct interface *
-if_get_by_name_len (const char *name, size_t namelen)
-{
- return if_get_by_name_len_vrf (name, namelen, VRF_DEFAULT, 0);
-}
-
/* Does interface up ? */
int
if_is_up (struct interface *ifp)
/* Wont catch seperator as last char, e.g. 'foo0:' but thats invalid */
if (seppos < nlen)
- return if_get_by_name_len_vrf (name, seppos, vrf_id, 1);
+ return if_get_by_name_len (name, seppos, vrf_id, 1);
else
- return if_get_by_name_len_vrf (name, nlen, vrf_id, 1);
+ return if_get_by_name_len (name, nlen, vrf_id, 1);
}
#endif /* SUNOS_5 */
#ifdef SUNOS_5
ifp = if_sunwzebra_get (ifname, sl, vrf_id);
#else
- ifp = if_get_by_name_len_vrf (ifname, sl, vrf_id, 1);
+ ifp = if_get_by_name_len (ifname, sl, vrf_id, 1);
#endif /* SUNOS_5 */
if (!ifp)
/* For these 2 functions, the namelen argument should be the precise length
of the ifname string (not counting any optional trailing '\0' character).
In most cases, strnlen should be used to calculate the namelen value. */
-extern struct interface *if_get_by_name_len(const char *ifname,size_t namelen);
-
extern struct interface *if_lookup_by_name_len(const char *ifname,
size_t namelen, vrf_id_t vrf_id);
-extern struct interface *if_get_by_name_len_vrf(const char *ifname,
+extern struct interface *if_get_by_name_len(const char *ifname,
size_t namelen, vrf_id_t vrf_id, int vty);
stream_get (ifname_tmp, s, INTERFACE_NAMSIZ);
/* Lookup/create interface by name. */
- ifp = if_get_by_name_len_vrf (ifname_tmp,
- strnlen (ifname_tmp, INTERFACE_NAMSIZ),
- vrf_id, 0);
+ ifp = if_get_by_name_len (ifname_tmp,
+ strnlen (ifname_tmp, INTERFACE_NAMSIZ),
+ vrf_id, 0);
zebra_interface_if_set_value (s, ifp);
ifreq = (struct ifreq *)((caddr_t) ifconf.ifc_req + n);
ifp = if_get_by_name_len(ifreq->ifr_name,
strnlen(ifreq->ifr_name,
- sizeof(ifreq->ifr_name)));
+ sizeof(ifreq->ifr_name)),
+ VRF_DEFAULT, 0);
if_add_update (ifp);
size = ifreq->ifr_addr.sa_len;
if (size < sizeof (ifreq->ifr_addr))
{
ifp = if_get_by_name_len(ifreq->ifr_name,
strnlen(ifreq->ifr_name,
- sizeof(ifreq->ifr_name)));
+ sizeof(ifreq->ifr_name)),
+ VRF_DEFAULT, 0);
if_add_update (ifp);
ifreq++;
}
&& ( *(lifreq->lifr_name + normallen) != ':') )
normallen++;
- ifp = if_get_by_name_len(lifreq->lifr_name, normallen);
+ ifp = if_get_by_name_len(lifreq->lifr_name, normallen, VRF_DEFAULT, 0);
if (lifreq->lifr_addr.ss_family == AF_INET)
ifp->flags |= IFF_IPV4;
/* Create Interface */
ifp = if_get_by_name_len(ifan->ifan_name,
strnlen(ifan->ifan_name,
- sizeof(ifan->ifan_name)));
+ sizeof(ifan->ifan_name)),
+ VRF_DEFAULT, 0);
ifp->ifindex = ifan->ifan_index;
if_get_metric (ifp);