#include <net/tls.h>
#include <crypto/aead.h>
#include <crypto/scatterwalk.h>
#include <net/ip6_checksum.h>
#include <linux/skbuff_ref.h>
#include "tls.h"
static void chain_to_walk(struct scatterlist *sg, struct scatter_walk *walk)
{ … }
static int tls_enc_record(struct aead_request *aead_req,
struct crypto_aead *aead, char *aad,
char *iv, __be64 rcd_sn,
struct scatter_walk *in,
struct scatter_walk *out, int *in_len,
struct tls_prot_info *prot)
{ … }
static void tls_init_aead_request(struct aead_request *aead_req,
struct crypto_aead *aead)
{ … }
static struct aead_request *tls_alloc_aead_request(struct crypto_aead *aead,
gfp_t flags)
{ … }
static int tls_enc_records(struct aead_request *aead_req,
struct crypto_aead *aead, struct scatterlist *sg_in,
struct scatterlist *sg_out, char *aad, char *iv,
u64 rcd_sn, int len, struct tls_prot_info *prot)
{ … }
static void update_chksum(struct sk_buff *skb, int headln)
{ … }
static void complete_skb(struct sk_buff *nskb, struct sk_buff *skb, int headln)
{ … }
static int fill_sg_in(struct scatterlist *sg_in,
struct sk_buff *skb,
struct tls_offload_context_tx *ctx,
u64 *rcd_sn,
s32 *sync_size,
int *resync_sgs)
{ … }
static void fill_sg_out(struct scatterlist sg_out[3], void *buf,
struct tls_context *tls_ctx,
struct sk_buff *nskb,
int tcp_payload_offset,
int payload_len,
int sync_size,
void *dummy_buf)
{ … }
static struct sk_buff *tls_enc_skb(struct tls_context *tls_ctx,
struct scatterlist sg_out[3],
struct scatterlist *sg_in,
struct sk_buff *skb,
s32 sync_size, u64 rcd_sn)
{ … }
static struct sk_buff *tls_sw_fallback(struct sock *sk, struct sk_buff *skb)
{ … }
struct sk_buff *tls_validate_xmit_skb(struct sock *sk,
struct net_device *dev,
struct sk_buff *skb)
{ … }
EXPORT_SYMBOL_GPL(…);
struct sk_buff *tls_validate_xmit_skb_sw(struct sock *sk,
struct net_device *dev,
struct sk_buff *skb)
{ … }
struct sk_buff *tls_encrypt_skb(struct sk_buff *skb)
{ … }
EXPORT_SYMBOL_GPL(…);
int tls_sw_fallback_init(struct sock *sk,
struct tls_offload_context_tx *offload_ctx,
struct tls_crypto_info *crypto_info)
{ … }