Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_vxlan.c
Show First 20 Lines • Show All 357 Lines • ▼ Show 20 Lines | static void vxlan_encap_header(struct vxlan_softc *, struct mbuf *, | ||||
int, uint16_t, uint16_t); | int, uint16_t, uint16_t); | ||||
#endif | #endif | ||||
static int vxlan_encap4(struct vxlan_softc *, | static int vxlan_encap4(struct vxlan_softc *, | ||||
const union vxlan_sockaddr *, struct mbuf *); | const union vxlan_sockaddr *, struct mbuf *); | ||||
static int vxlan_encap6(struct vxlan_softc *, | static int vxlan_encap6(struct vxlan_softc *, | ||||
const union vxlan_sockaddr *, struct mbuf *); | const union vxlan_sockaddr *, struct mbuf *); | ||||
static int vxlan_transmit(struct ifnet *, struct mbuf *); | static int vxlan_transmit(struct ifnet *, struct mbuf *); | ||||
static void vxlan_qflush(struct ifnet *); | static void vxlan_qflush(struct ifnet *); | ||||
static void vxlan_rcv_udp_packet(struct mbuf *, int, struct inpcb *, | static bool vxlan_rcv_udp_packet(struct mbuf *, int, struct inpcb *, | ||||
const struct sockaddr *, void *); | const struct sockaddr *, void *); | ||||
static int vxlan_input(struct vxlan_socket *, uint32_t, struct mbuf **, | static int vxlan_input(struct vxlan_socket *, uint32_t, struct mbuf **, | ||||
const struct sockaddr *); | const struct sockaddr *); | ||||
static int vxlan_stats_alloc(struct vxlan_softc *); | static int vxlan_stats_alloc(struct vxlan_softc *); | ||||
static void vxlan_stats_free(struct vxlan_softc *); | static void vxlan_stats_free(struct vxlan_softc *); | ||||
static void vxlan_set_default_config(struct vxlan_softc *); | static void vxlan_set_default_config(struct vxlan_softc *); | ||||
static int vxlan_set_user_config(struct vxlan_softc *, | static int vxlan_set_user_config(struct vxlan_softc *, | ||||
▲ Show 20 Lines • Show All 2,378 Lines • ▼ Show 20 Lines | vxlan_transmit(struct ifnet *ifp, struct mbuf *m) | ||||
return (error); | return (error); | ||||
} | } | ||||
static void | static void | ||||
vxlan_qflush(struct ifnet *ifp __unused) | vxlan_qflush(struct ifnet *ifp __unused) | ||||
{ | { | ||||
} | } | ||||
static void | static bool | ||||
vxlan_rcv_udp_packet(struct mbuf *m, int offset, struct inpcb *inpcb, | vxlan_rcv_udp_packet(struct mbuf *m, int offset, struct inpcb *inpcb, | ||||
const struct sockaddr *srcsa, void *xvso) | const struct sockaddr *srcsa, void *xvso) | ||||
{ | { | ||||
struct vxlan_socket *vso; | struct vxlan_socket *vso; | ||||
struct vxlan_header *vxh, vxlanhdr; | struct vxlan_header *vxh, vxlanhdr; | ||||
uint32_t vni; | uint32_t vni; | ||||
int error __unused; | int error __unused; | ||||
Show All 27 Lines | vxlan_rcv_udp_packet(struct mbuf *m, int offset, struct inpcb *inpcb, | ||||
m_adj_decap(m, offset + sizeof(struct vxlan_header)); | m_adj_decap(m, offset + sizeof(struct vxlan_header)); | ||||
error = vxlan_input(vso, vni, &m, srcsa); | error = vxlan_input(vso, vni, &m, srcsa); | ||||
MPASS(error != 0 || m == NULL); | MPASS(error != 0 || m == NULL); | ||||
out: | out: | ||||
if (m != NULL) | if (m != NULL) | ||||
m_freem(m); | m_freem(m); | ||||
return (true); | |||||
} | } | ||||
static int | static int | ||||
vxlan_input(struct vxlan_socket *vso, uint32_t vni, struct mbuf **m0, | vxlan_input(struct vxlan_socket *vso, uint32_t vni, struct mbuf **m0, | ||||
const struct sockaddr *sa) | const struct sockaddr *sa) | ||||
{ | { | ||||
struct vxlan_softc *sc; | struct vxlan_softc *sc; | ||||
struct ifnet *ifp; | struct ifnet *ifp; | ||||
▲ Show 20 Lines • Show All 849 Lines • Show Last 20 Lines |