Changeset View
Changeset View
Standalone View
Standalone View
head/sys/net/if_ethersubr.c
Show All 32 Lines | |||||
#include "opt_inet.h" | #include "opt_inet.h" | ||||
#include "opt_inet6.h" | #include "opt_inet6.h" | ||||
#include "opt_netgraph.h" | #include "opt_netgraph.h" | ||||
#include "opt_mbuf_profiling.h" | #include "opt_mbuf_profiling.h" | ||||
#include "opt_rss.h" | #include "opt_rss.h" | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/bus.h> | |||||
#include <sys/eventhandler.h> | |||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/module.h> | #include <sys/module.h> | ||||
#include <sys/mbuf.h> | #include <sys/mbuf.h> | ||||
#include <sys/random.h> | #include <sys/random.h> | ||||
#include <sys/socket.h> | #include <sys/socket.h> | ||||
#include <sys/sockio.h> | #include <sys/sockio.h> | ||||
▲ Show 20 Lines • Show All 877 Lines • ▼ Show 20 Lines | #endif | ||||
/* Announce Ethernet MAC address if non-zero. */ | /* Announce Ethernet MAC address if non-zero. */ | ||||
for (i = 0; i < ifp->if_addrlen; i++) | for (i = 0; i < ifp->if_addrlen; i++) | ||||
if (lla[i] != 0) | if (lla[i] != 0) | ||||
break; | break; | ||||
if (i != ifp->if_addrlen) | if (i != ifp->if_addrlen) | ||||
if_printf(ifp, "Ethernet address: %6D\n", lla, ":"); | if_printf(ifp, "Ethernet address: %6D\n", lla, ":"); | ||||
uuid_ether_add(LLADDR(sdl)); | uuid_ether_add(LLADDR(sdl)); | ||||
/* Add necessary bits are setup; announce it now. */ | |||||
EVENTHANDLER_INVOKE(ether_ifattach_event, ifp); | |||||
if (IS_DEFAULT_VNET(curvnet)) | |||||
devctl_notify("ETHERNET", ifp->if_xname, "IFATTACH", NULL); | |||||
} | } | ||||
/* | /* | ||||
* Perform common duties while detaching an Ethernet interface | * Perform common duties while detaching an Ethernet interface | ||||
*/ | */ | ||||
void | void | ||||
ether_ifdetach(struct ifnet *ifp) | ether_ifdetach(struct ifnet *ifp) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 305 Lines • Show Last 20 Lines |