-#define VXLAN_FLAGS 0x08000000 /* struct vxlanhdr.vx_flags required value. */
-
-/**
- * struct vxlanhdr - VXLAN header
- * @vx_flags: Must have the exact value %VXLAN_FLAGS.
- * @vx_vni: VXLAN Network Identifier (VNI) in top 24 bits, low 8 bits zeroed.
- */
-struct vxlanhdr {
- __be32 vx_flags;
- __be32 vx_vni;
-};
-
-#define VXLAN_HLEN (sizeof(struct udphdr) + sizeof(struct vxlanhdr))
-
-static inline int vxlan_hdr_len(const struct tnl_mutable_config *mutable,
- const struct ovs_key_ipv4_tunnel *tun_key)
-{
- return VXLAN_HLEN;
-}
-
-/**
- * struct vxlan_port - Keeps track of open UDP ports
- * @list: list element.
- * @port: The UDP port number in network byte order.
- * @socket: The socket created for this port number.
- * @count: How many ports are using this socket/port.
- */
-struct vxlan_port {
- struct list_head list;
- __be16 port;
- struct socket *vxlan_rcv_socket;
- int count;
-};
-
-static LIST_HEAD(vxlan_ports);
-
-static struct vxlan_port *vxlan_port_exists(struct net *net, __be16 port)
-{
- struct vxlan_port *vxlan_port;
-
- list_for_each_entry(vxlan_port, &vxlan_ports, list) {
- if (vxlan_port->port == port &&
- net_eq(sock_net(vxlan_port->vxlan_rcv_socket->sk), net))
- return vxlan_port;
- }
-
- return NULL;
-}
-
-static inline struct vxlanhdr *vxlan_hdr(const struct sk_buff *skb)
-{
- return (struct vxlanhdr *)(udp_hdr(skb) + 1);
-}