4 #include <linux/kconfig.h>
5 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) && IS_ENABLED(CONFIG_NETFILTER)
6 #include <net/ip_tunnels.h>
19 /* Padding after the end of the tunnel headers to provide alignment
20 * for inner packet IP header after 14 byte Ethernet header.
24 #define STT_BASE_HLEN (sizeof(struct stthdr) + STT_ETH_PAD)
25 #define STT_HEADER_LEN (sizeof(struct tcphdr) + STT_BASE_HLEN)
27 static inline struct stthdr *stt_hdr(const struct sk_buff *skb)
29 return (struct stthdr *)(skb_transport_header(skb) +
30 sizeof(struct tcphdr));
34 typedef void (stt_rcv_t)(struct stt_sock *stt_sock, struct sk_buff *skb);
36 /* @list: Per-net list of STT ports.
37 * @rcv: The callback is called on STT packet recv, STT reassembly can generate
38 * multiple packets, in this case first packet has tunnel outer header, rest
39 * of the packets are inner packet segments with no stt header.
40 * @rcv_data: user data.
41 * @sock: Fake TCP socket for the STT port.
44 struct list_head list;
51 #define stt_sock_add rpl_stt_sock_add
52 struct stt_sock *rpl_stt_sock_add(struct net *net, __be16 port,
53 stt_rcv_t *rcv, void *data);
55 #define stt_sock_release rpl_stt_sock_release
56 void rpl_stt_sock_release(struct stt_sock *stt_sock);
58 #define stt_xmit_skb rpl_stt_xmit_skb
59 int rpl_stt_xmit_skb(struct sk_buff *skb, struct rtable *rt,
60 __be32 src, __be32 dst, __u8 tos,
61 __u8 ttl, __be16 df, __be16 src_port, __be16 dst_port,
64 #define stt_init_module ovs_stt_init_module
65 int ovs_stt_init_module(void);
67 #define stt_cleanup_module ovs_stt_cleanup_module
68 void ovs_stt_cleanup_module(void);
71 #endif /*ifdef__NET_STT_H */