1 #ifndef __NET_VXLAN_WRAPPER_H
2 #define __NET_VXLAN_WRAPPER_H 1
4 #include <linux/skbuff.h>
5 #include <linux/netdevice.h>
8 /* per UDP socket information */
10 struct hlist_node hlist;
13 struct list_head handler_list;
17 typedef int (vxlan_rcv_t)(struct vxlan_handler *vh, struct sk_buff *skb, __be32 key);
19 struct vxlan_handler {
21 struct list_head node;
23 struct vxlan_sock *vs;
26 struct work_struct del_work;
30 void vxlan_handler_put(struct vxlan_handler *vh);
32 struct vxlan_handler *vxlan_handler_add(struct net *net,
33 __be16 portno, vxlan_rcv_t *rcv,
34 void *data, int priority, bool create);
36 int vxlan_xmit_skb(struct net *net, struct vxlan_handler *vh,
37 struct rtable *rt, struct sk_buff *skb,
38 __be32 src, __be32 dst, __u8 tos, __u8 ttl, __be16 df,
39 __be16 src_port, __be16 dst_port, __be32 vni);
41 __be16 vxlan_src_port(__u16 port_min, __u16 port_max, struct sk_buff *skb);