#include <net/inet_common.h>
#include <net/ip6_checksum.h>
#include <net/xfrm.h>
static DEFINE_PER_CPU(struct sock *, nat_keepalive_sk_ipv4);
#if IS_ENABLED(CONFIG_IPV6)
static DEFINE_PER_CPU(struct sock *, nat_keepalive_sk_ipv6);
#endif
struct nat_keepalive { … };
static void nat_keepalive_init(struct nat_keepalive *ka, struct xfrm_state *x)
{ … }
static int nat_keepalive_send_ipv4(struct sk_buff *skb,
struct nat_keepalive *ka)
{ … }
#if IS_ENABLED(CONFIG_IPV6)
static int nat_keepalive_send_ipv6(struct sk_buff *skb,
struct nat_keepalive *ka,
struct udphdr *uh)
{ … }
#endif
static void nat_keepalive_send(struct nat_keepalive *ka)
{ … }
struct nat_keepalive_work_ctx { … };
static int nat_keepalive_work_single(struct xfrm_state *x, int count, void *ptr)
{ … }
static void nat_keepalive_work(struct work_struct *work)
{ … }
static int nat_keepalive_sk_init(struct sock * __percpu *socks,
unsigned short family)
{ … }
static void nat_keepalive_sk_fini(struct sock * __percpu *socks)
{ … }
void xfrm_nat_keepalive_state_updated(struct xfrm_state *x)
{ … }
int __net_init xfrm_nat_keepalive_net_init(struct net *net)
{ … }
int xfrm_nat_keepalive_net_fini(struct net *net)
{ … }
int xfrm_nat_keepalive_init(unsigned short family)
{ … }
EXPORT_SYMBOL_GPL(…);
void xfrm_nat_keepalive_fini(unsigned short family)
{ … }
EXPORT_SYMBOL_GPL(…);