Changeset View
Changeset View
Standalone View
Standalone View
head/sys/net/if.c
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | |||||
#include <sys/rwlock.h> | #include <sys/rwlock.h> | ||||
#include <sys/sockio.h> | #include <sys/sockio.h> | ||||
#include <sys/syslog.h> | #include <sys/syslog.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <sys/taskqueue.h> | #include <sys/taskqueue.h> | ||||
#include <sys/domain.h> | #include <sys/domain.h> | ||||
#include <sys/jail.h> | #include <sys/jail.h> | ||||
#include <sys/priv.h> | #include <sys/priv.h> | ||||
#include <sys/eventhandler.h> | |||||
#include <machine/stdarg.h> | #include <machine/stdarg.h> | ||||
#include <vm/uma.h> | #include <vm/uma.h> | ||||
#include <net/bpf.h> | #include <net/bpf.h> | ||||
#include <net/ethernet.h> | #include <net/ethernet.h> | ||||
#include <net/if.h> | #include <net/if.h> | ||||
#include <net/if_arp.h> | #include <net/if_arp.h> | ||||
▲ Show 20 Lines • Show All 2,143 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Mark an interface down and notify protocols of | * Mark an interface down and notify protocols of | ||||
* the transition. | * the transition. | ||||
*/ | */ | ||||
void | void | ||||
if_down(struct ifnet *ifp) | if_down(struct ifnet *ifp) | ||||
{ | { | ||||
EVENTHANDLER_INVOKE(ifnet_event, ifp, IFNET_EVENT_DOWN); | |||||
if_unroute(ifp, IFF_UP, AF_UNSPEC); | if_unroute(ifp, IFF_UP, AF_UNSPEC); | ||||
} | } | ||||
/* | /* | ||||
* Mark an interface up and notify protocols of | * Mark an interface up and notify protocols of | ||||
* the transition. | * the transition. | ||||
*/ | */ | ||||
void | void | ||||
if_up(struct ifnet *ifp) | if_up(struct ifnet *ifp) | ||||
{ | { | ||||
if_route(ifp, IFF_UP, AF_UNSPEC); | if_route(ifp, IFF_UP, AF_UNSPEC); | ||||
EVENTHANDLER_INVOKE(ifnet_event, ifp, IFNET_EVENT_UP); | |||||
} | } | ||||
/* | /* | ||||
* Flush an interface queue. | * Flush an interface queue. | ||||
*/ | */ | ||||
void | void | ||||
if_qflush(struct ifnet *ifp) | if_qflush(struct ifnet *ifp) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 1,926 Lines • Show Last 20 Lines |