#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/skbuff.h>
#include <linux/rtnetlink.h>
#include <net/netlink.h>
#include <net/pkt_sched.h>
#include <net/ip.h>
#include <net/ipv6.h>
#include <net/dsfield.h>
#include <net/pkt_cls.h>
#include <net/tc_wrapper.h>
#include <linux/tc_act/tc_skbedit.h>
#include <net/tc_act/tc_skbedit.h>
static struct tc_action_ops act_skbedit_ops;
static u16 tcf_skbedit_hash(struct tcf_skbedit_params *params,
struct sk_buff *skb)
{ … }
TC_INDIRECT_SCOPE int tcf_skbedit_act(struct sk_buff *skb,
const struct tc_action *a,
struct tcf_result *res)
{ … }
static void tcf_skbedit_stats_update(struct tc_action *a, u64 bytes,
u64 packets, u64 drops,
u64 lastuse, bool hw)
{ … }
static const struct nla_policy skbedit_policy[TCA_SKBEDIT_MAX + 1] = …;
static int tcf_skbedit_init(struct net *net, struct nlattr *nla,
struct nlattr *est, struct tc_action **a,
struct tcf_proto *tp, u32 act_flags,
struct netlink_ext_ack *extack)
{ … }
static int tcf_skbedit_dump(struct sk_buff *skb, struct tc_action *a,
int bind, int ref)
{ … }
static void tcf_skbedit_cleanup(struct tc_action *a)
{ … }
static size_t tcf_skbedit_get_fill_size(const struct tc_action *act)
{ … }
static int tcf_skbedit_offload_act_setup(struct tc_action *act, void *entry_data,
u32 *index_inc, bool bind,
struct netlink_ext_ack *extack)
{ … }
static struct tc_action_ops act_skbedit_ops = …;
MODULE_ALIAS_NET_ACT(…) …;
static __net_init int skbedit_init_net(struct net *net)
{ … }
static void __net_exit skbedit_exit_net(struct list_head *net_list)
{ … }
static struct pernet_operations skbedit_net_ops = …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
static int __init skbedit_init_module(void)
{ … }
static void __exit skbedit_cleanup_module(void)
{ … }
module_init(…) …;
module_exit(skbedit_cleanup_module);