diff --git a/sys/net/if.c b/sys/net/if.c index e8d65e64518..f43c1597c41 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -412,20 +412,6 @@ ifnet_byindexgen(uint16_t idx, uint16_t gen) return (NULL); } -struct ifaddr * -ifaddr_byindex(u_short idx) -{ - struct ifnet *ifp; - struct ifaddr *ifa = NULL; - - NET_EPOCH_ASSERT(); - - ifp = ifnet_byindex(idx); - if (ifp != NULL && (ifa = ifp->if_addr) != NULL) - ifa_ref(ifa); - return (ifa); -} - /* * Network interface utility routines. * diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 21b3687f62c..e054c613e9e 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -373,7 +373,7 @@ struct ifnet { * addresses which store the link-level address and the name * of the interface. * However, access to the AF_LINK address through this - * field is deprecated. Use if_addr or ifaddr_byindex() instead. + * field is deprecated. Use if_addr instead. */ struct ifaddrhead if_addrhead; /* linked list of addresses per if */ struct ifmultihead if_multiaddrs; /* multicast addresses configured */ @@ -651,13 +651,6 @@ struct ifnet *ifnet_byindex_ref(u_int); */ struct ifnet *ifnet_byindexgen(uint16_t idx, uint16_t gen); -/* - * Given the index, ifaddr_byindex() returns the one and only - * link-level ifaddr for the interface. You are not supposed to use - * it to traverse the list of addresses associated to the interface. - */ -struct ifaddr *ifaddr_byindex(u_short idx); - VNET_DECLARE(struct ifnethead, ifnet); VNET_DECLARE(struct ifgrouphead, ifg_head); VNET_DECLARE(struct ifnet *, loif); /* first loopback interface */