2 * Lightweight Autonomic Network Architecture
4 * Collector and loader for all core extensions (xt_*).
6 * Copyright 2011 Daniel Borkmann <dborkma@tik.ee.ethz.ch>,
7 * Swiss federal institute of technology (ETH Zurich)
11 #include <linux/module.h>
12 #include <linux/kernel.h>
13 #include <linux/proc_fs.h>
14 #include <net/net_namespace.h>
16 #include "xt_fblock.h"
18 #include "xt_builder.h"
20 #include "xt_engine.h"
22 struct proc_dir_entry
*lana_proc_dir
;
23 EXPORT_SYMBOL(lana_proc_dir
);
24 struct proc_dir_entry
*fblock_proc_dir
;
25 EXPORT_SYMBOL(fblock_proc_dir
);
27 static int __init
init_lana_core_module(void)
31 printk(KERN_INFO
"[lana] bootstrapping core ...\n");
33 lana_proc_dir
= proc_mkdir("lana", init_net
.proc_net
);
36 fblock_proc_dir
= proc_mkdir("fblock", lana_proc_dir
);
39 ret
= init_vlink_system();
42 ret
= init_fblock_tables();
45 ret
= init_fblock_builder();
48 ret
= init_userctl_system();
55 printk(KERN_INFO
"[lana] core up and running!\n");
58 cleanup_userctl_system();
60 cleanup_fblock_builder();
62 cleanup_fblock_tables();
64 cleanup_vlink_system();
66 remove_proc_entry("fblock", lana_proc_dir
);
68 remove_proc_entry("lana", init_net
.proc_net
);
72 static void __exit
cleanup_lana_core_module(void)
74 printk(KERN_INFO
"[lana] halting core ...\n");
76 cleanup_userctl_system();
77 cleanup_fblock_tables();
78 cleanup_fblock_builder();
79 cleanup_vlink_system();
81 remove_proc_entry("fblock", lana_proc_dir
);
82 remove_proc_entry("lana", init_net
.proc_net
);
84 printk(KERN_INFO
"[lana] core shut down!\n");
87 module_init(init_lana_core_module
);
88 module_exit(cleanup_lana_core_module
);
90 MODULE_LICENSE("GPL");
91 MODULE_AUTHOR("Daniel Borkmann <dborkma@tik.ee.ethz.ch>");
92 MODULE_DESCRIPTION("LANA core driver");