#include <linux/errno.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/netfilter.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <net/dst.h>
#include <net/gso.h>
#include <net/icmp.h>
#include <net/inet_ecn.h>
#include <net/xfrm.h>
#if IS_ENABLED(CONFIG_IPV6)
#include <net/ip6_route.h>
#include <net/ipv6_stubs.h>
#endif
#include "xfrm_inout.h"
static int xfrm_output2(struct net *net, struct sock *sk, struct sk_buff *skb);
static int xfrm_inner_extract_output(struct xfrm_state *x, struct sk_buff *skb);
static int xfrm_skb_check_space(struct sk_buff *skb)
{ … }
static struct dst_entry *skb_dst_pop(struct sk_buff *skb)
{ … }
static int xfrm4_transport_output(struct xfrm_state *x, struct sk_buff *skb)
{ … }
#if IS_ENABLED(CONFIG_IPV6_MIP6)
static int mip6_rthdr_offset(struct sk_buff *skb, u8 **nexthdr, int type)
{ … }
#endif
#if IS_ENABLED(CONFIG_IPV6)
static int xfrm6_hdr_offset(struct xfrm_state *x, struct sk_buff *skb, u8 **prevhdr)
{ … }
#endif
static int xfrm6_transport_output(struct xfrm_state *x, struct sk_buff *skb)
{ … }
static int xfrm6_ro_output(struct xfrm_state *x, struct sk_buff *skb)
{ … }
static int xfrm4_beet_encap_add(struct xfrm_state *x, struct sk_buff *skb)
{ … }
static int xfrm4_tunnel_encap_add(struct xfrm_state *x, struct sk_buff *skb)
{ … }
#if IS_ENABLED(CONFIG_IPV6)
static int xfrm6_tunnel_encap_add(struct xfrm_state *x, struct sk_buff *skb)
{ … }
static int xfrm6_beet_encap_add(struct xfrm_state *x, struct sk_buff *skb)
{ … }
#endif
static int xfrm4_prepare_output(struct xfrm_state *x, struct sk_buff *skb)
{ … }
static int xfrm6_prepare_output(struct xfrm_state *x, struct sk_buff *skb)
{ … }
static int xfrm_outer_mode_output(struct xfrm_state *x, struct sk_buff *skb)
{ … }
#if IS_ENABLED(CONFIG_NET_PKTGEN)
int pktgen_xfrm_outer_mode_output(struct xfrm_state *x, struct sk_buff *skb)
{ … }
EXPORT_SYMBOL_GPL(…);
#endif
static int xfrm_output_one(struct sk_buff *skb, int err)
{ … }
int xfrm_output_resume(struct sock *sk, struct sk_buff *skb, int err)
{ … }
EXPORT_SYMBOL_GPL(…);
static int xfrm_output2(struct net *net, struct sock *sk, struct sk_buff *skb)
{ … }
static int xfrm_output_gso(struct net *net, struct sock *sk, struct sk_buff *skb)
{ … }
static void xfrm_get_inner_ipproto(struct sk_buff *skb, struct xfrm_state *x)
{ … }
int xfrm_output(struct sock *sk, struct sk_buff *skb)
{ … }
EXPORT_SYMBOL_GPL(…);
static int xfrm4_tunnel_check_size(struct sk_buff *skb)
{ … }
static int xfrm4_extract_output(struct xfrm_state *x, struct sk_buff *skb)
{ … }
#if IS_ENABLED(CONFIG_IPV6)
static int xfrm6_tunnel_check_size(struct sk_buff *skb)
{ … }
#endif
static int xfrm6_extract_output(struct xfrm_state *x, struct sk_buff *skb)
{ … }
static int xfrm_inner_extract_output(struct xfrm_state *x, struct sk_buff *skb)
{ … }
void xfrm_local_error(struct sk_buff *skb, int mtu)
{ … }
EXPORT_SYMBOL_GPL(…);