#include <linux/module.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/skbuff.h>
#include <net/netlink.h>
#include <net/act_api.h>
#include <net/pkt_cls.h>
#include <net/sch_generic.h>
#include <net/tc_wrapper.h>
#define HTSIZE …
struct fw_head { … };
struct fw_filter { … };
static u32 fw_hash(u32 handle)
{ … }
TC_INDIRECT_SCOPE int fw_classify(struct sk_buff *skb,
const struct tcf_proto *tp,
struct tcf_result *res)
{ … }
static void *fw_get(struct tcf_proto *tp, u32 handle)
{ … }
static int fw_init(struct tcf_proto *tp)
{ … }
static void __fw_delete_filter(struct fw_filter *f)
{ … }
static void fw_delete_filter_work(struct work_struct *work)
{ … }
static void fw_destroy(struct tcf_proto *tp, bool rtnl_held,
struct netlink_ext_ack *extack)
{ … }
static int fw_delete(struct tcf_proto *tp, void *arg, bool *last,
bool rtnl_held, struct netlink_ext_ack *extack)
{ … }
static const struct nla_policy fw_policy[TCA_FW_MAX + 1] = …;
static int fw_set_parms(struct net *net, struct tcf_proto *tp,
struct fw_filter *f, struct nlattr **tb,
struct nlattr **tca, unsigned long base, u32 flags,
struct netlink_ext_ack *extack)
{ … }
static int fw_change(struct net *net, struct sk_buff *in_skb,
struct tcf_proto *tp, unsigned long base,
u32 handle, struct nlattr **tca, void **arg,
u32 flags, struct netlink_ext_ack *extack)
{ … }
static void fw_walk(struct tcf_proto *tp, struct tcf_walker *arg,
bool rtnl_held)
{ … }
static int fw_dump(struct net *net, struct tcf_proto *tp, void *fh,
struct sk_buff *skb, struct tcmsg *t, bool rtnl_held)
{ … }
static void fw_bind_class(void *fh, u32 classid, unsigned long cl, void *q,
unsigned long base)
{ … }
static struct tcf_proto_ops cls_fw_ops __read_mostly = …;
MODULE_ALIAS_NET_CLS(…) …;
static int __init init_fw(void)
{ … }
static void __exit exit_fw(void)
{ … }
module_init(…) …
module_exit(…)
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;