linux/net/strparser/strparser.c

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

#include <linux/bpf.h>
#include <linux/errno.h>
#include <linux/errqueue.h>
#include <linux/file.h>
#include <linux/in.h>
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/init.h>
#include <linux/net.h>
#include <linux/netdevice.h>
#include <linux/poll.h>
#include <linux/rculist.h>
#include <linux/skbuff.h>
#include <linux/socket.h>
#include <linux/uaccess.h>
#include <linux/workqueue.h>
#include <net/strparser.h>
#include <net/netns/generic.h>
#include <net/sock.h>

static struct workqueue_struct *strp_wq;

static inline struct _strp_msg *_strp_msg(struct sk_buff *skb)
{}

/* Lower lock held */
static void strp_abort_strp(struct strparser *strp, int err)
{}

static void strp_start_timer(struct strparser *strp, long timeo)
{}

/* Lower lock held */
static void strp_parser_err(struct strparser *strp, int err,
			    read_descriptor_t *desc)
{}

static inline int strp_peek_len(struct strparser *strp)
{}

/* Lower socket lock held */
static int __strp_recv(read_descriptor_t *desc, struct sk_buff *orig_skb,
		       unsigned int orig_offset, size_t orig_len,
		       size_t max_msg_size, long timeo)
{}

int strp_process(struct strparser *strp, struct sk_buff *orig_skb,
		 unsigned int orig_offset, size_t orig_len,
		 size_t max_msg_size, long timeo)
{}
EXPORT_SYMBOL_GPL();

static int strp_recv(read_descriptor_t *desc, struct sk_buff *orig_skb,
		     unsigned int orig_offset, size_t orig_len)
{}

static int default_read_sock_done(struct strparser *strp, int err)
{}

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

/* Lower sock lock held */
void strp_data_ready(struct strparser *strp)
{}
EXPORT_SYMBOL_GPL();

static void do_strp_work(struct strparser *strp)
{}

static void strp_work(struct work_struct *w)
{}

static void strp_msg_timeout(struct work_struct *w)
{}

static void strp_sock_lock(struct strparser *strp)
{}

static void strp_sock_unlock(struct strparser *strp)
{}

int strp_init(struct strparser *strp, struct sock *sk,
	      const struct strp_callbacks *cb)
{}
EXPORT_SYMBOL_GPL();

/* Sock process lock held (lock_sock) */
void __strp_unpause(struct strparser *strp)
{}
EXPORT_SYMBOL_GPL();

void strp_unpause(struct strparser *strp)
{}
EXPORT_SYMBOL_GPL();

/* strp must already be stopped so that strp_recv will no longer be called.
 * Note that strp_done is not called with the lower socket held.
 */
void strp_done(struct strparser *strp)
{}
EXPORT_SYMBOL_GPL();

void strp_stop(struct strparser *strp)
{}
EXPORT_SYMBOL_GPL();

void strp_check_rcv(struct strparser *strp)
{}
EXPORT_SYMBOL_GPL();

static int __init strp_dev_init(void)
{}
device_initcall(strp_dev_init);