linux/net/netfilter/nft_compat.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * (C) 2012-2013 by Pablo Neira Ayuso <[email protected]>
 *
 * This software has been sponsored by Sophos Astaro <http://www.sophos.com>
 */

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/netlink.h>
#include <linux/netfilter.h>
#include <linux/netfilter/nfnetlink.h>
#include <linux/netfilter/nf_tables.h>
#include <linux/netfilter/nf_tables_compat.h>
#include <linux/netfilter/x_tables.h>
#include <linux/netfilter_ipv4/ip_tables.h>
#include <linux/netfilter_ipv6/ip6_tables.h>
#include <linux/netfilter_bridge/ebtables.h>
#include <linux/netfilter_arp/arp_tables.h>
#include <net/netfilter/nf_tables.h>
#include <net/netfilter/nf_log.h>

/* Used for matches where *info is larger than X byte */
#define NFT_MATCH_LARGE_THRESH

struct nft_xt_match_priv {};

static int nft_compat_chain_validate_dependency(const struct nft_ctx *ctx,
						const char *tablename)
{}

nft_entry;

static inline void
nft_compat_set_par(struct xt_action_param *par,
		   const struct nft_pktinfo *pkt,
		   const void *xt, const void *xt_info)
{}

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

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

static const struct nla_policy nft_target_policy[NFTA_TARGET_MAX + 1] =;

static void
nft_target_set_tgchk_param(struct xt_tgchk_param *par,
			   const struct nft_ctx *ctx,
			   struct xt_target *target, void *info,
			   union nft_entry *entry, u16 proto, bool inv)
{}

static void target_compat_from_user(struct xt_target *t, void *in, void *out)
{}

static const struct nla_policy nft_rule_compat_policy[NFTA_RULE_COMPAT_MAX + 1] =;

static int nft_parse_compat(const struct nlattr *attr, u16 *proto, bool *inv)
{}

static void nft_compat_wait_for_destructors(void)
{}

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

static void __nft_mt_tg_destroy(struct module *me, const struct nft_expr *expr)
{}

static void
nft_target_destroy(const struct nft_ctx *ctx, const struct nft_expr *expr)
{}

static int nft_extension_dump_info(struct sk_buff *skb, int attr,
				   const void *info,
				   unsigned int size, unsigned int user_size)
{}

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

static int nft_target_validate(const struct nft_ctx *ctx,
			       const struct nft_expr *expr,
			       const struct nft_data **data)
{}

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

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

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

static const struct nla_policy nft_match_policy[NFTA_MATCH_MAX + 1] =;

/* struct xt_mtchk_param and xt_tgchk_param look very similar */
static void
nft_match_set_mtchk_param(struct xt_mtchk_param *par, const struct nft_ctx *ctx,
			  struct xt_match *match, void *info,
			  union nft_entry *entry, u16 proto, bool inv)
{}

static void match_compat_from_user(struct xt_match *m, void *in, void *out)
{}

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

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

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

static void
__nft_match_destroy(const struct nft_ctx *ctx, const struct nft_expr *expr,
		    void *info)
{}

static void
nft_match_destroy(const struct nft_ctx *ctx, const struct nft_expr *expr)
{}

static void
nft_match_large_destroy(const struct nft_ctx *ctx, const struct nft_expr *expr)
{}

static int __nft_match_dump(struct sk_buff *skb, const struct nft_expr *expr,
			    void *info)
{}

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

static int nft_match_large_dump(struct sk_buff *skb,
				const struct nft_expr *e, bool reset)
{}

static int nft_match_validate(const struct nft_ctx *ctx,
			      const struct nft_expr *expr,
			      const struct nft_data **data)
{}

static int
nfnl_compat_fill_info(struct sk_buff *skb, u32 portid, u32 seq, u32 type,
		      int event, u16 family, const char *name,
		      int rev, int target)
{}

static int nfnl_compat_get_rcu(struct sk_buff *skb,
			       const struct nfnl_info *info,
			       const struct nlattr * const tb[])
{}

static const struct nla_policy nfnl_compat_policy_get[NFTA_COMPAT_MAX+1] =;

static const struct nfnl_callback nfnl_nft_compat_cb[NFNL_MSG_COMPAT_MAX] =;

static const struct nfnetlink_subsystem nfnl_compat_subsys =;

static struct nft_expr_type nft_match_type;

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

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

static void nft_match_release_ops(const struct nft_expr_ops *ops)
{}

static struct nft_expr_type nft_match_type __read_mostly =;

static struct nft_expr_type nft_target_type;

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

static void nft_target_release_ops(const struct nft_expr_ops *ops)
{}

static struct nft_expr_type nft_target_type __read_mostly =;

static int __init nft_compat_module_init(void)
{}

static void __exit nft_compat_module_exit(void)
{}

MODULE_ALIAS_NFNL_SUBSYS();

module_init();
module_exit(nft_compat_module_exit);

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_ALIAS_NFT_EXPR();
MODULE_ALIAS_NFT_EXPR();
MODULE_DESCRIPTION();