Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_ethersubr.c
Show First 20 Lines • Show All 437 Lines • ▼ Show 20 Lines | |||||
* in the first mbuf (if BRIDGE'ing). | * in the first mbuf (if BRIDGE'ing). | ||||
*/ | */ | ||||
int | int | ||||
ether_output_frame(struct ifnet *ifp, struct mbuf *m) | ether_output_frame(struct ifnet *ifp, struct mbuf *m) | ||||
{ | { | ||||
int i; | int i; | ||||
if (PFIL_HOOKED(&V_link_pfil_hook)) { | if (PFIL_HOOKED(&V_link_pfil_hook)) { | ||||
i = pfil_run_hooks(&V_link_pfil_hook, &m, ifp, PFIL_OUT, NULL); | i = pfil_run_hooks(&V_link_pfil_hook, &m, ifp, PFIL_OUT, 0, | ||||
NULL); | |||||
if (i != 0) | if (i != 0) | ||||
return (EACCES); | return (EACCES); | ||||
if (m == NULL) | if (m == NULL) | ||||
return (0); | return (0); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 316 Lines • ▼ Show 20 Lines | ether_demux(struct ifnet *ifp, struct mbuf *m) | ||||
struct ether_header *eh; | struct ether_header *eh; | ||||
int i, isr; | int i, isr; | ||||
u_short ether_type; | u_short ether_type; | ||||
KASSERT(ifp != NULL, ("%s: NULL interface pointer", __func__)); | KASSERT(ifp != NULL, ("%s: NULL interface pointer", __func__)); | ||||
/* Do not grab PROMISC frames in case we are re-entered. */ | /* Do not grab PROMISC frames in case we are re-entered. */ | ||||
if (PFIL_HOOKED(&V_link_pfil_hook) && !(m->m_flags & M_PROMISC)) { | if (PFIL_HOOKED(&V_link_pfil_hook) && !(m->m_flags & M_PROMISC)) { | ||||
i = pfil_run_hooks(&V_link_pfil_hook, &m, ifp, PFIL_IN, NULL); | i = pfil_run_hooks(&V_link_pfil_hook, &m, ifp, PFIL_IN, 0, | ||||
NULL); | |||||
if (i != 0 || m == NULL) | if (i != 0 || m == NULL) | ||||
return; | return; | ||||
} | } | ||||
eh = mtod(m, struct ether_header *); | eh = mtod(m, struct ether_header *); | ||||
ether_type = ntohs(eh->ether_type); | ether_type = ntohs(eh->ether_type); | ||||
▲ Show 20 Lines • Show All 466 Lines • Show Last 20 Lines |