Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_me.c
Show First 20 Lines • Show All 527 Lines • ▼ Show 20 Lines | #endif | ||||
return (IPPROTO_DONE); | return (IPPROTO_DONE); | ||||
drop: | drop: | ||||
if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); | if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); | ||||
return (IPPROTO_DONE); | return (IPPROTO_DONE); | ||||
} | } | ||||
static int | static int | ||||
me_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, | me_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, | ||||
struct route *ro __unused) | struct route *ro) | ||||
{ | { | ||||
uint32_t af; | uint32_t af; | ||||
if (dst->sa_family == AF_UNSPEC) | if (dst->sa_family == AF_UNSPEC) | ||||
bcopy(dst->sa_data, &af, sizeof(af)); | bcopy(dst->sa_data, &af, sizeof(af)); | ||||
else | else | ||||
af = dst->sa_family; | af = RO_GET_FAMILY(ro, dst); | ||||
m->m_pkthdr.csum_data = af; | m->m_pkthdr.csum_data = af; | ||||
return (ifp->if_transmit(ifp, m)); | return (ifp->if_transmit(ifp, m)); | ||||
} | } | ||||
#define MTAG_ME 1414491977 | #define MTAG_ME 1414491977 | ||||
static int | static int | ||||
me_transmit(struct ifnet *ifp, struct mbuf *m) | me_transmit(struct ifnet *ifp, struct mbuf *m) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 135 Lines • Show Last 20 Lines |