linux/net/tls/tls_strp.c

// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2016 Tom Herbert <[email protected]> */

#include <linux/skbuff.h>
#include <linux/skbuff_ref.h>
#include <linux/workqueue.h>
#include <net/strparser.h>
#include <net/tcp.h>
#include <net/sock.h>
#include <net/tls.h>

#include "tls.h"

static struct workqueue_struct *tls_strp_wq;

static void tls_strp_abort_strp(struct tls_strparser *strp, int err)
{}

static void tls_strp_anchor_free(struct tls_strparser *strp)
{}

static struct sk_buff *
tls_strp_skb_copy(struct tls_strparser *strp, struct sk_buff *in_skb,
		  int offset, int len)
{}

/* Create a new skb with the contents of input copied to its page frags */
static struct sk_buff *tls_strp_msg_make_copy(struct tls_strparser *strp)
{}

/* Steal the input skb, input msg is invalid after calling this function */
struct sk_buff *tls_strp_msg_detach(struct tls_sw_context_rx *ctx)
{}

/* Force the input skb to be in copy mode. The data ownership remains
 * with the input skb itself (meaning unpause will wipe it) but it can
 * be modified.
 */
int tls_strp_msg_cow(struct tls_sw_context_rx *ctx)
{}

/* Make a clone (in the skb sense) of the input msg to keep a reference
 * to the underlying data. The reference-holding skbs get placed on
 * @dst.
 */
int tls_strp_msg_hold(struct tls_strparser *strp, struct sk_buff_head *dst)
{}

static void tls_strp_flush_anchor_copy(struct tls_strparser *strp)
{}

static int tls_strp_copyin_frag(struct tls_strparser *strp, struct sk_buff *skb,
				struct sk_buff *in_skb, unsigned int offset,
				size_t in_len)
{}

static int tls_strp_copyin_skb(struct tls_strparser *strp, struct sk_buff *skb,
			       struct sk_buff *in_skb, unsigned int offset,
			       size_t in_len)
{}

static int tls_strp_copyin(read_descriptor_t *desc, struct sk_buff *in_skb,
			   unsigned int offset, size_t in_len)
{}

static int tls_strp_read_copyin(struct tls_strparser *strp)
{}

static int tls_strp_read_copy(struct tls_strparser *strp, bool qshort)
{}

static bool tls_strp_check_queue_ok(struct tls_strparser *strp)
{}

static void tls_strp_load_anchor_with_queue(struct tls_strparser *strp, int len)
{}

void tls_strp_msg_load(struct tls_strparser *strp, bool force_refresh)
{}

/* Called with lock held on lower socket */
static int tls_strp_read_sock(struct tls_strparser *strp)
{}

void tls_strp_check_rcv(struct tls_strparser *strp)
{}

/* Lower sock lock held */
void tls_strp_data_ready(struct tls_strparser *strp)
{}

static void tls_strp_work(struct work_struct *w)
{}

void tls_strp_msg_done(struct tls_strparser *strp)
{}

void tls_strp_stop(struct tls_strparser *strp)
{}

int tls_strp_init(struct tls_strparser *strp, struct sock *sk)
{}

/* strp must already be stopped so that tls_strp_recv will no longer be called.
 * Note that tls_strp_done is not called with the lower socket held.
 */
void tls_strp_done(struct tls_strparser *strp)
{}

int __init tls_strp_dev_init(void)
{}

void tls_strp_dev_exit(void)
{}