linux/net/sched/cls_route.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * net/sched/cls_route.c	ROUTE4 classifier.
 *
 * Authors:	Alexey Kuznetsov, <[email protected]>
 */

#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/dst.h>
#include <net/route.h>
#include <net/netlink.h>
#include <net/act_api.h>
#include <net/pkt_cls.h>
#include <net/tc_wrapper.h>

/*
 * 1. For now we assume that route tags < 256.
 *    It allows to use direct table lookups, instead of hash tables.
 * 2. For now we assume that "from TAG" and "fromdev DEV" statements
 *    are mutually  exclusive.
 * 3. "to TAG from ANY" has higher priority, than "to ANY from XXX"
 */
struct route4_fastmap {};

struct route4_head {};

struct route4_bucket {};

struct route4_filter {};

#define ROUTE4_FAILURE

static inline int route4_fastmap_hash(u32 id, int iif)
{}

static DEFINE_SPINLOCK(fastmap_lock);
static void
route4_reset_fastmap(struct route4_head *head)
{}

static void
route4_set_fastmap(struct route4_head *head, u32 id, int iif,
		   struct route4_filter *f)
{}

static inline int route4_hash_to(u32 id)
{}

static inline int route4_hash_from(u32 id)
{}

static inline int route4_hash_iif(int iif)
{}

static inline int route4_hash_wild(void)
{}

#define ROUTE4_APPLY_RESULT()

TC_INDIRECT_SCOPE int route4_classify(struct sk_buff *skb,
				      const struct tcf_proto *tp,
				      struct tcf_result *res)
{}

static inline u32 to_hash(u32 id)
{}

static inline u32 from_hash(u32 id)
{}

static void *route4_get(struct tcf_proto *tp, u32 handle)
{}

static int route4_init(struct tcf_proto *tp)
{}

static void __route4_delete_filter(struct route4_filter *f)
{}

static void route4_delete_filter_work(struct work_struct *work)
{}

static void route4_queue_work(struct route4_filter *f)
{}

static void route4_destroy(struct tcf_proto *tp, bool rtnl_held,
			   struct netlink_ext_ack *extack)
{}

static int route4_delete(struct tcf_proto *tp, void *arg, bool *last,
			 bool rtnl_held, struct netlink_ext_ack *extack)
{}

static const struct nla_policy route4_policy[TCA_ROUTE4_MAX + 1] =;

static int route4_set_parms(struct net *net, struct tcf_proto *tp,
			    unsigned long base, struct route4_filter *f,
			    u32 handle, struct route4_head *head,
			    struct nlattr **tb, struct nlattr *est, int new,
			    u32 flags, struct netlink_ext_ack *extack)
{}

static int route4_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 route4_walk(struct tcf_proto *tp, struct tcf_walker *arg,
			bool rtnl_held)
{}

static int route4_dump(struct net *net, struct tcf_proto *tp, void *fh,
		       struct sk_buff *skb, struct tcmsg *t, bool rtnl_held)
{}

static void route4_bind_class(void *fh, u32 classid, unsigned long cl, void *q,
			      unsigned long base)
{}

static struct tcf_proto_ops cls_route4_ops __read_mostly =;
MODULE_ALIAS_NET_CLS();

static int __init init_route4(void)
{}

static void __exit exit_route4(void)
{}

module_init()
module_exit()
MODULE_DESCRIPTION();
MODULE_LICENSE();