sending of options now works
[ana-net.git] / src / sd_blackhole.c
blobb2327592f771eec1e97779a25483e89184e90663
1 /*
2 * Lightweight Autonomic Network Architecture
4 * Blackhole scheduler.
6 * Copyright 2011 Daniel Borkmann <dborkma@tik.ee.ethz.ch>,
7 * Swiss federal institute of technology (ETH Zurich)
8 * Subject to the GPL.
10 * Note: Quantum tunneling is not supported, too.
13 #include <linux/module.h>
14 #include <linux/kernel.h>
15 #include <linux/cache.h>
17 #include "xt_sched.h"
18 #include "xt_engine.h"
20 static int ppe_blackhole_init(void)
22 return 0;
25 static int ppe_blackhole_sched(struct sk_buff *skb, enum path_type dir)
27 /* ... entering the event horizon! */
28 kfree(skb);
29 return PPE_SUCCESS;
32 static void ppe_blackhole_cleanup(void)
36 static struct ppesched_discipline_ops ppe_blackhole_ops __read_mostly = {
37 .discipline_init = ppe_blackhole_init,
38 .discipline_sched = ppe_blackhole_sched,
39 .discipline_cleanup = ppe_blackhole_cleanup,
42 static struct ppesched_discipline ppe_blackhole __read_mostly = {
43 .name = "blackhole",
44 .ops = &ppe_blackhole_ops,
45 .owner = THIS_MODULE,
48 static int __init init_ppe_blackhole_module(void)
50 return ppesched_discipline_register(&ppe_blackhole);
53 static void __exit cleanup_ppe_blackhole_module(void)
55 return ppesched_discipline_unregister(&ppe_blackhole);
58 module_init(init_ppe_blackhole_module);
59 module_exit(cleanup_ppe_blackhole_module);
61 MODULE_LICENSE("GPL");
62 MODULE_AUTHOR("Daniel Borkmann <dborkma@tik.ee.ethz.ch>");
63 MODULE_DESCRIPTION("LANA black hole scheduler");