#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/skbuff.h>
#include <net/pkt_sched.h>
#include <net/pkt_cls.h>
#include <net/inet_ecn.h>
#include <net/red.h>
struct red_sched_data { … };
#define TC_RED_SUPPORTED_FLAGS …
static inline int red_use_ecn(struct red_sched_data *q)
{ … }
static inline int red_use_harddrop(struct red_sched_data *q)
{ … }
static int red_use_nodrop(struct red_sched_data *q)
{ … }
static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch,
struct sk_buff **to_free)
{ … }
static struct sk_buff *red_dequeue(struct Qdisc *sch)
{ … }
static struct sk_buff *red_peek(struct Qdisc *sch)
{ … }
static void red_reset(struct Qdisc *sch)
{ … }
static int red_offload(struct Qdisc *sch, bool enable)
{ … }
static void red_destroy(struct Qdisc *sch)
{ … }
static const struct nla_policy red_policy[TCA_RED_MAX + 1] = …;
static int __red_change(struct Qdisc *sch, struct nlattr **tb,
struct netlink_ext_ack *extack)
{ … }
static inline void red_adaptative_timer(struct timer_list *t)
{ … }
static int red_init(struct Qdisc *sch, struct nlattr *opt,
struct netlink_ext_ack *extack)
{ … }
static int red_change(struct Qdisc *sch, struct nlattr *opt,
struct netlink_ext_ack *extack)
{ … }
static int red_dump_offload_stats(struct Qdisc *sch)
{ … }
static int red_dump(struct Qdisc *sch, struct sk_buff *skb)
{ … }
static int red_dump_stats(struct Qdisc *sch, struct gnet_dump *d)
{ … }
static int red_dump_class(struct Qdisc *sch, unsigned long cl,
struct sk_buff *skb, struct tcmsg *tcm)
{ … }
static void red_graft_offload(struct Qdisc *sch,
struct Qdisc *new, struct Qdisc *old,
struct netlink_ext_ack *extack)
{ … }
static int red_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
struct Qdisc **old, struct netlink_ext_ack *extack)
{ … }
static struct Qdisc *red_leaf(struct Qdisc *sch, unsigned long arg)
{ … }
static unsigned long red_find(struct Qdisc *sch, u32 classid)
{ … }
static void red_walk(struct Qdisc *sch, struct qdisc_walker *walker)
{ … }
static const struct Qdisc_class_ops red_class_ops = …;
static struct Qdisc_ops red_qdisc_ops __read_mostly = …;
MODULE_ALIAS_NET_SCH(…) …;
static int __init red_module_init(void)
{ … }
static void __exit red_module_exit(void)
{ … }
module_init(…) …
module_exit(…)
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;