Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_ethersubr.c
Show First 20 Lines • Show All 280 Lines • ▼ Show 20 Lines | ether_output(struct ifnet *ifp, struct mbuf *m, | ||||
int error = 0; | int error = 0; | ||||
char linkhdr[ETHER_HDR_LEN], *phdr; | char linkhdr[ETHER_HDR_LEN], *phdr; | ||||
struct ether_header *eh; | struct ether_header *eh; | ||||
struct pf_mtag *t; | struct pf_mtag *t; | ||||
int loop_copy = 1; | int loop_copy = 1; | ||||
int hlen; /* link layer header length */ | int hlen; /* link layer header length */ | ||||
uint32_t pflags; | uint32_t pflags; | ||||
struct llentry *lle = NULL; | struct llentry *lle = NULL; | ||||
struct rtentry *rt0 = NULL; | |||||
int addref = 0; | int addref = 0; | ||||
phdr = NULL; | phdr = NULL; | ||||
pflags = 0; | pflags = 0; | ||||
if (ro != NULL) { | if (ro != NULL) { | ||||
/* XXX BPF uses ro_prepend */ | /* XXX BPF uses ro_prepend */ | ||||
if (ro->ro_prepend != NULL) { | if (ro->ro_prepend != NULL) { | ||||
phdr = ro->ro_prepend; | phdr = ro->ro_prepend; | ||||
Show All 13 Lines | if (ro->ro_prepend != NULL) { | ||||
} | } | ||||
} | } | ||||
if (lle != NULL) { | if (lle != NULL) { | ||||
phdr = lle->r_linkdata; | phdr = lle->r_linkdata; | ||||
hlen = lle->r_hdrlen; | hlen = lle->r_hdrlen; | ||||
pflags = lle->r_flags; | pflags = lle->r_flags; | ||||
} | } | ||||
} | } | ||||
rt0 = ro->ro_rt; | |||||
} | } | ||||
#ifdef MAC | #ifdef MAC | ||||
error = mac_ifnet_check_transmit(ifp, m); | error = mac_ifnet_check_transmit(ifp, m); | ||||
if (error) | if (error) | ||||
senderr(error); | senderr(error); | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 916 Lines • Show Last 20 Lines |