linux/net/netfilter/nft_exthdr.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2008 Patrick McHardy <[email protected]>
 *
 * Development of this code funded by Astaro AG (http://www.astaro.com/)
 */

#include <asm/unaligned.h>
#include <linux/kernel.h>
#include <linux/netlink.h>
#include <linux/netfilter.h>
#include <linux/netfilter/nf_tables.h>
#include <linux/dccp.h>
#include <linux/sctp.h>
#include <net/netfilter/nf_tables_core.h>
#include <net/netfilter/nf_tables.h>
#include <net/tcp.h>

struct nft_exthdr {};

static unsigned int optlen(const u8 *opt, unsigned int offset)
{}

static int nft_skb_copy_to_reg(const struct sk_buff *skb, int offset, u32 *dest, unsigned int len)
{}

static void nft_exthdr_ipv6_eval(const struct nft_expr *expr,
				 struct nft_regs *regs,
				 const struct nft_pktinfo *pkt)
{}

/* find the offset to specified option.
 *
 * If target header is found, its offset is set in *offset and return option
 * number. Otherwise, return negative error.
 *
 * If the first fragment doesn't contain the End of Options it is considered
 * invalid.
 */
static int ipv4_find_option(struct net *net, struct sk_buff *skb,
			    unsigned int *offset, int target)
{}

static void nft_exthdr_ipv4_eval(const struct nft_expr *expr,
				 struct nft_regs *regs,
				 const struct nft_pktinfo *pkt)
{}

static void *
nft_tcp_header_pointer(const struct nft_pktinfo *pkt,
		       unsigned int len, void *buffer, unsigned int *tcphdr_len)
{}

static void nft_exthdr_tcp_eval(const struct nft_expr *expr,
				struct nft_regs *regs,
				const struct nft_pktinfo *pkt)
{}

static void nft_exthdr_tcp_set_eval(const struct nft_expr *expr,
				    struct nft_regs *regs,
				    const struct nft_pktinfo *pkt)
{}

static void nft_exthdr_tcp_strip_eval(const struct nft_expr *expr,
				      struct nft_regs *regs,
				      const struct nft_pktinfo *pkt)
{}

static void nft_exthdr_sctp_eval(const struct nft_expr *expr,
				 struct nft_regs *regs,
				 const struct nft_pktinfo *pkt)
{}

static void nft_exthdr_dccp_eval(const struct nft_expr *expr,
				 struct nft_regs *regs,
				 const struct nft_pktinfo *pkt)
{}

static const struct nla_policy nft_exthdr_policy[NFTA_EXTHDR_MAX + 1] =;

static int nft_exthdr_init(const struct nft_ctx *ctx,
			   const struct nft_expr *expr,
			   const struct nlattr * const tb[])
{}

static int nft_exthdr_tcp_set_init(const struct nft_ctx *ctx,
				   const struct nft_expr *expr,
				   const struct nlattr * const tb[])
{}

static int nft_exthdr_tcp_strip_init(const struct nft_ctx *ctx,
				     const struct nft_expr *expr,
				     const struct nlattr * const tb[])
{}

static int nft_exthdr_ipv4_init(const struct nft_ctx *ctx,
				const struct nft_expr *expr,
				const struct nlattr * const tb[])
{}

static int nft_exthdr_dccp_init(const struct nft_ctx *ctx,
				const struct nft_expr *expr,
				const struct nlattr * const tb[])
{}

static int nft_exthdr_dump_common(struct sk_buff *skb, const struct nft_exthdr *priv)
{}

static int nft_exthdr_dump(struct sk_buff *skb,
			   const struct nft_expr *expr, bool reset)
{}

static int nft_exthdr_dump_set(struct sk_buff *skb,
			       const struct nft_expr *expr, bool reset)
{}

static int nft_exthdr_dump_strip(struct sk_buff *skb,
				 const struct nft_expr *expr, bool reset)
{}

static bool nft_exthdr_reduce(struct nft_regs_track *track,
			       const struct nft_expr *expr)
{}

static const struct nft_expr_ops nft_exthdr_ipv6_ops =;

static const struct nft_expr_ops nft_exthdr_ipv4_ops =;

static const struct nft_expr_ops nft_exthdr_tcp_ops =;

static const struct nft_expr_ops nft_exthdr_tcp_set_ops =;

static const struct nft_expr_ops nft_exthdr_tcp_strip_ops =;

static const struct nft_expr_ops nft_exthdr_sctp_ops =;

static const struct nft_expr_ops nft_exthdr_dccp_ops =;

static const struct nft_expr_ops *
nft_exthdr_select_ops(const struct nft_ctx *ctx,
		      const struct nlattr * const tb[])
{}

struct nft_expr_type nft_exthdr_type __read_mostly =;