Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_me.c
Show First 20 Lines • Show All 445 Lines • ▼ Show 20 Lines | |||||
me_input(struct mbuf *m, int off, int proto, void *arg) | me_input(struct mbuf *m, int off, int proto, void *arg) | ||||
{ | { | ||||
struct me_softc *sc = arg; | struct me_softc *sc = arg; | ||||
struct mobhdr *mh; | struct mobhdr *mh; | ||||
struct ifnet *ifp; | struct ifnet *ifp; | ||||
struct ip *ip; | struct ip *ip; | ||||
int hlen; | int hlen; | ||||
NET_EPOCH_ASSERT(); | |||||
ifp = ME2IFP(sc); | ifp = ME2IFP(sc); | ||||
/* checks for short packets */ | /* checks for short packets */ | ||||
hlen = sizeof(struct mobhdr); | hlen = sizeof(struct mobhdr); | ||||
if (m->m_pkthdr.len < sizeof(struct ip) + hlen) | if (m->m_pkthdr.len < sizeof(struct ip) + hlen) | ||||
hlen -= sizeof(struct in_addr); | hlen -= sizeof(struct in_addr); | ||||
if (m->m_len < sizeof(struct ip) + hlen) | if (m->m_len < sizeof(struct ip) + hlen) | ||||
m = m_pullup(m, sizeof(struct ip) + hlen); | m = m_pullup(m, sizeof(struct ip) + hlen); | ||||
if (m == NULL) | if (m == NULL) | ||||
▲ Show 20 Lines • Show All 202 Lines • Show Last 20 Lines |