linux/net/netfilter/nft_quota.c

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

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/atomic.h>
#include <linux/netlink.h>
#include <linux/netfilter.h>
#include <linux/netfilter/nf_tables.h>
#include <net/netfilter/nf_tables.h>

struct nft_quota {};

static inline bool nft_overquota(struct nft_quota *priv,
				 const struct sk_buff *skb)
{}

static inline bool nft_quota_invert(struct nft_quota *priv)
{}

static inline void nft_quota_do_eval(struct nft_quota *priv,
				     struct nft_regs *regs,
				     const struct nft_pktinfo *pkt)
{}

static const struct nla_policy nft_quota_policy[NFTA_QUOTA_MAX + 1] =;

#define NFT_QUOTA_DEPLETED_BIT

static void nft_quota_obj_eval(struct nft_object *obj,
			       struct nft_regs *regs,
			       const struct nft_pktinfo *pkt)
{}

static int nft_quota_do_init(const struct nlattr * const tb[],
			     struct nft_quota *priv)
{}

static void nft_quota_do_destroy(const struct nft_ctx *ctx,
				 struct nft_quota *priv)
{}

static int nft_quota_obj_init(const struct nft_ctx *ctx,
			      const struct nlattr * const tb[],
			      struct nft_object *obj)
{}

static void nft_quota_obj_update(struct nft_object *obj,
				 struct nft_object *newobj)
{}

static int nft_quota_do_dump(struct sk_buff *skb, struct nft_quota *priv,
			     bool reset)
{}

static int nft_quota_obj_dump(struct sk_buff *skb, struct nft_object *obj,
			      bool reset)
{}

static void nft_quota_obj_destroy(const struct nft_ctx *ctx,
				  struct nft_object *obj)
{}

static struct nft_object_type nft_quota_obj_type;
static const struct nft_object_ops nft_quota_obj_ops =;

static struct nft_object_type nft_quota_obj_type __read_mostly =;

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

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

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

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

static int nft_quota_clone(struct nft_expr *dst, const struct nft_expr *src, gfp_t gfp)
{}

static struct nft_expr_type nft_quota_type;
static const struct nft_expr_ops nft_quota_ops =;

static struct nft_expr_type nft_quota_type __read_mostly =;

static int __init nft_quota_module_init(void)
{}

static void __exit nft_quota_module_exit(void)
{}

module_init();
module_exit(nft_quota_module_exit);

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