doc: final revise of the document
[p2p-kernel-protocol.git] / module / p2pkp.c
1 /*
2  * Peer to Peer Kernel Protocol
3  *
4  * Răzvan Crainea
5  * Tudor Cazangiu
6  */
7
8 #include <linux/kernel.h>
9 #include <linux/module.h>
10 #include <linux/init.h>
11
12 #include "p2pkp_sock.h"
13 #include "p2pkp_debug.h"
14
15 MODULE_DESCRIPTION("P2P Kernel Protocol");
16 MODULE_AUTHOR("Razvan Crainea and Tudor Cazangiu");
17 MODULE_LICENSE("GPL");
18
19 int __init p2pkp_sock_init(void)
20 {
21         if (p2pkp_register_protocol() < 0) {
22                 ERROR("error while registering socket operations");
23                 return -1;
24         }
25         return 0;
26 }
27
28 void __exit p2pkp_sock_exit(void)
29 {
30         /* cleanup socket */
31         p2pkp_unregister_protocol();
32 }
33
34 module_init(p2pkp_sock_init);
35 module_exit(p2pkp_sock_exit);