linux/net/netfilter/nft_cmp.c

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

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/netlink.h>
#include <linux/netfilter.h>
#include <linux/if_arp.h>
#include <linux/netfilter/nf_tables.h>
#include <net/netfilter/nf_tables_core.h>
#include <net/netfilter/nf_tables_offload.h>
#include <net/netfilter/nf_tables.h>

struct nft_cmp_expr {};

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

static const struct nla_policy nft_cmp_policy[NFTA_CMP_MAX + 1] =;

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

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

nft_cmp_offload_data;

static void nft_payload_n2h(union nft_cmp_offload_data *data,
			    const u8 *val, u32 len)
{}

static int __nft_cmp_offload(struct nft_offload_ctx *ctx,
			     struct nft_flow_rule *flow,
			     const struct nft_cmp_expr *priv)
{}

static int nft_cmp_offload(struct nft_offload_ctx *ctx,
			   struct nft_flow_rule *flow,
			   const struct nft_expr *expr)
{}

static const struct nft_expr_ops nft_cmp_ops =;

/* Calculate the mask for the nft_cmp_fast expression. On big endian the
 * mask needs to include the *upper* bytes when interpreting that data as
 * something smaller than the full u32, therefore a cpu_to_le32 is done.
 */
static u32 nft_cmp_fast_mask(unsigned int len)
{}

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

static int nft_cmp_fast_offload(struct nft_offload_ctx *ctx,
				struct nft_flow_rule *flow,
				const struct nft_expr *expr)
{}

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

const struct nft_expr_ops nft_cmp_fast_ops =;

static u32 nft_cmp_mask(u32 bitlen)
{}

static void nft_cmp16_fast_mask(struct nft_data *data, unsigned int bitlen)
{}

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

static int nft_cmp16_fast_offload(struct nft_offload_ctx *ctx,
				  struct nft_flow_rule *flow,
				  const struct nft_expr *expr)
{}

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


const struct nft_expr_ops nft_cmp16_fast_ops =;

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

struct nft_expr_type nft_cmp_type __read_mostly =;