X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/7b1edb791d9ca667b95988cb5638c4c88416cd17..ac5ea4a98a4e1d34a076095ea1eaa87e43d1f335:/bsd/net/if_ethersubr.c diff --git a/bsd/net/if_ethersubr.c b/bsd/net/if_ethersubr.c index 7547d9608..892d07158 100644 --- a/bsd/net/if_ethersubr.c +++ b/bsd/net/if_ethersubr.c @@ -52,15 +52,9 @@ * SUCH DAMAGE. * * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93 + * $FreeBSD: src/sys/net/if_ethersubr.c,v 1.70.2.17 2001/08/01 00:47:49 fenner Exp $ */ -#if NOTFB31 -#include "opt_atalk.h" -#include "opt_inet.h" -#include "opt_ipx.h" -#include "opt_bdg.h" -#endif - #include #include #include @@ -77,7 +71,7 @@ #include #include -#if INET +#if INET || INET6 #include #include #include @@ -90,26 +84,6 @@ #include #endif -#if NS -#include -#include -ushort ns_nettype; -int ether_outputdebug = 0; -int ether_inputdebug = 0; -#endif - -#if ISO -#include -#include -#include -#include -#endif - -/*#if LLC -#include -#include -#endif*/ - #include #if LLC && CCITT @@ -136,17 +110,18 @@ extern u_char etherbroadcastaddr[]; */ +/* + IONetworkingFamily should call dlil_if_attach + ether_ifattach becomes obsolete, but remains for + temporary compatibility with third parties extensions +*/ void ether_ifattach(ifp) register struct ifnet *ifp; { - register struct ifaddr *ifa; - register struct sockaddr_dl *sdl; boolean_t funnel_state; funnel_state = thread_funnel_set(network_flock, TRUE); - printf("ether_ifattach called for %s\n", ifp->if_name); - ether_family_init(); ifp->if_name = "en"; ifp->if_family = APPLE_IF_FAM_ETHERNET; @@ -159,19 +134,6 @@ ether_ifattach(ifp) ifp->if_baudrate = 10000000; dlil_if_attach(ifp); - ifa = ifnet_addrs[ifp->if_index - 1]; - if (ifa == 0) { - printf("ether_ifattach: no lladdr!\n"); - (void) thread_funnel_set(network_flock, funnel_state); - return; - } - sdl = (struct sockaddr_dl *)ifa->ifa_addr; - sdl->sdl_type = IFT_ETHER; - sdl->sdl_alen = ifp->if_addrlen; - bcopy((IFP2AC(ifp))->ac_enaddr, LLADDR(sdl), ifp->if_addrlen); -#ifdef INET6 - in6_ifattach_getifid(ifp); -#endif (void) thread_funnel_set(network_flock, funnel_state); }