linux/net/xfrm/xfrm_input.c

// SPDX-License-Identifier: GPL-2.0
/*
 * xfrm_input.c
 *
 * Changes:
 * 	YOSHIFUJI Hideaki @USAGI
 * 		Split up af-specific portion
 *
 */

#include <linux/bottom_half.h>
#include <linux/cache.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/percpu.h>
#include <net/dst.h>
#include <net/ip.h>
#include <net/xfrm.h>
#include <net/ip_tunnels.h>
#include <net/ip6_tunnel.h>
#include <net/dst_metadata.h>
#include <net/hotdata.h>

#include "xfrm_inout.h"

struct xfrm_trans_tasklet {};

struct xfrm_trans_cb {};

#define XFRM_TRANS_SKB_CB(__skb)

static DEFINE_SPINLOCK(xfrm_input_afinfo_lock);
static struct xfrm_input_afinfo const __rcu *xfrm_input_afinfo[2][AF_INET6 + 1];

static struct gro_cells gro_cells;
static struct net_device xfrm_napi_dev;

static DEFINE_PER_CPU(struct xfrm_trans_tasklet, xfrm_trans_tasklet);

int xfrm_input_register_afinfo(const struct xfrm_input_afinfo *afinfo)
{}
EXPORT_SYMBOL();

int xfrm_input_unregister_afinfo(const struct xfrm_input_afinfo *afinfo)
{}
EXPORT_SYMBOL();

static const struct xfrm_input_afinfo *xfrm_input_get_afinfo(u8 family, bool is_ipip)
{}

static int xfrm_rcv_cb(struct sk_buff *skb, unsigned int family, u8 protocol,
		       int err)
{}

struct sec_path *secpath_set(struct sk_buff *skb)
{}
EXPORT_SYMBOL();

/* Fetch spi and seq from ipsec header */

int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 *spi, __be32 *seq)
{}
EXPORT_SYMBOL();

static int xfrm4_remove_beet_encap(struct xfrm_state *x, struct sk_buff *skb)
{}

static void ipip_ecn_decapsulate(struct sk_buff *skb)
{}

static int xfrm4_remove_tunnel_encap(struct xfrm_state *x, struct sk_buff *skb)
{}

static void ipip6_ecn_decapsulate(struct sk_buff *skb)
{}

static int xfrm6_remove_tunnel_encap(struct xfrm_state *x, struct sk_buff *skb)
{}

static int xfrm6_remove_beet_encap(struct xfrm_state *x, struct sk_buff *skb)
{}

/* Remove encapsulation header.
 *
 * The IP header will be moved over the top of the encapsulation
 * header.
 *
 * On entry, the transport header shall point to where the IP header
 * should be and the network header shall be set to where the IP
 * header currently is.  skb->data shall point to the start of the
 * payload.
 */
static int
xfrm_inner_mode_encap_remove(struct xfrm_state *x,
			     struct sk_buff *skb)
{}

static int xfrm_prepare_input(struct xfrm_state *x, struct sk_buff *skb)
{}

/* Remove encapsulation header.
 *
 * The IP header will be moved over the top of the encapsulation header.
 *
 * On entry, skb_transport_header() shall point to where the IP header
 * should be and skb_network_header() shall be set to where the IP header
 * currently is.  skb->data shall point to the start of the payload.
 */
static int xfrm4_transport_input(struct xfrm_state *x, struct sk_buff *skb)
{}

static int xfrm6_transport_input(struct xfrm_state *x, struct sk_buff *skb)
{}

static int xfrm_inner_mode_input(struct xfrm_state *x,
				 struct sk_buff *skb)
{}

int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
{}
EXPORT_SYMBOL();

int xfrm_input_resume(struct sk_buff *skb, int nexthdr)
{}
EXPORT_SYMBOL();

static void xfrm_trans_reinject(struct work_struct *work)
{}

int xfrm_trans_queue_net(struct net *net, struct sk_buff *skb,
			 int (*finish)(struct net *, struct sock *,
				       struct sk_buff *))
{}
EXPORT_SYMBOL();

int xfrm_trans_queue(struct sk_buff *skb,
		     int (*finish)(struct net *, struct sock *,
				   struct sk_buff *))
{}
EXPORT_SYMBOL();

void __init xfrm_input_init(void)
{}