#define pr_fmt(fmt) …
#include <crypto/aead.h>
#include <crypto/authenc.h>
#include <linux/err.h>
#include <linux/module.h>
#include <net/ip.h>
#include <net/xfrm.h>
#include <net/esp.h>
#include <linux/scatterlist.h>
#include <linux/kernel.h>
#include <linux/pfkeyv2.h>
#include <linux/random.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <net/ip6_checksum.h>
#include <net/ip6_route.h>
#include <net/icmp.h>
#include <net/ipv6.h>
#include <net/protocol.h>
#include <net/udp.h>
#include <linux/icmpv6.h>
#include <net/tcp.h>
#include <net/espintcp.h>
#include <net/inet6_hashtables.h>
#include <linux/skbuff_ref.h>
#include <linux/highmem.h>
struct esp_skb_cb { … };
struct esp_output_extra { … };
#define ESP_SKB_CB(__skb) …
static void *esp_alloc_tmp(struct crypto_aead *aead, int nfrags, int seqihlen)
{ … }
static inline void *esp_tmp_extra(void *tmp)
{ … }
static inline u8 *esp_tmp_iv(struct crypto_aead *aead, void *tmp, int seqhilen)
{ … }
static inline struct aead_request *esp_tmp_req(struct crypto_aead *aead, u8 *iv)
{ … }
static inline struct scatterlist *esp_req_sg(struct crypto_aead *aead,
struct aead_request *req)
{ … }
static void esp_ssg_unref(struct xfrm_state *x, void *tmp, struct sk_buff *skb)
{ … }
#ifdef CONFIG_INET6_ESPINTCP
struct esp_tcp_sk { … };
static void esp_free_tcp_sk(struct rcu_head *head)
{ … }
static struct sock *esp6_find_tcp_sk(struct xfrm_state *x)
{ … }
static int esp_output_tcp_finish(struct xfrm_state *x, struct sk_buff *skb)
{ … }
static int esp_output_tcp_encap_cb(struct net *net, struct sock *sk,
struct sk_buff *skb)
{ … }
static int esp_output_tail_tcp(struct xfrm_state *x, struct sk_buff *skb)
{ … }
#else
static int esp_output_tail_tcp(struct xfrm_state *x, struct sk_buff *skb)
{
WARN_ON(1);
return -EOPNOTSUPP;
}
#endif
static void esp_output_encap_csum(struct sk_buff *skb)
{ … }
static void esp_output_done(void *data, int err)
{ … }
static void esp_restore_header(struct sk_buff *skb, unsigned int offset)
{ … }
static void esp_output_restore_header(struct sk_buff *skb)
{ … }
static struct ip_esp_hdr *esp_output_set_esn(struct sk_buff *skb,
struct xfrm_state *x,
struct ip_esp_hdr *esph,
struct esp_output_extra *extra)
{ … }
static void esp_output_done_esn(void *data, int err)
{ … }
static struct ip_esp_hdr *esp6_output_udp_encap(struct sk_buff *skb,
int encap_type,
struct esp_info *esp,
__be16 sport,
__be16 dport)
{ … }
#ifdef CONFIG_INET6_ESPINTCP
static struct ip_esp_hdr *esp6_output_tcp_encap(struct xfrm_state *x,
struct sk_buff *skb,
struct esp_info *esp)
{ … }
#else
static struct ip_esp_hdr *esp6_output_tcp_encap(struct xfrm_state *x,
struct sk_buff *skb,
struct esp_info *esp)
{
return ERR_PTR(-EOPNOTSUPP);
}
#endif
static int esp6_output_encap(struct xfrm_state *x, struct sk_buff *skb,
struct esp_info *esp)
{ … }
int esp6_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp)
{ … }
EXPORT_SYMBOL_GPL(…);
int esp6_output_tail(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp)
{ … }
EXPORT_SYMBOL_GPL(…);
static int esp6_output(struct xfrm_state *x, struct sk_buff *skb)
{ … }
static inline int esp_remove_trailer(struct sk_buff *skb)
{ … }
int esp6_input_done2(struct sk_buff *skb, int err)
{ … }
EXPORT_SYMBOL_GPL(…);
static void esp_input_done(void *data, int err)
{ … }
static void esp_input_restore_header(struct sk_buff *skb)
{ … }
static void esp_input_set_header(struct sk_buff *skb, __be32 *seqhi)
{ … }
static void esp_input_done_esn(void *data, int err)
{ … }
static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
{ … }
static int esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
u8 type, u8 code, int offset, __be32 info)
{ … }
static void esp6_destroy(struct xfrm_state *x)
{ … }
static int esp_init_aead(struct xfrm_state *x, struct netlink_ext_ack *extack)
{ … }
static int esp_init_authenc(struct xfrm_state *x,
struct netlink_ext_ack *extack)
{ … }
static int esp6_init_state(struct xfrm_state *x, struct netlink_ext_ack *extack)
{ … }
static int esp6_rcv_cb(struct sk_buff *skb, int err)
{ … }
static const struct xfrm_type esp6_type = …;
static struct xfrm6_protocol esp6_protocol = …;
static int __init esp6_init(void)
{ … }
static void __exit esp6_fini(void)
{ … }
module_init(…) …;
module_exit(esp6_fini);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS_XFRM_TYPE(…);