Gerrit Renker | c40616c | 2007-12-06 12:26:38 -0200 | [diff] [blame^] | 1 | /* |
| 2 | * TFRC: main module holding the pieces of the TFRC library together |
| 3 | * |
| 4 | * Copyright (c) 2007 The University of Aberdeen, Scotland, UK |
| 5 | * Copyright (c) 2007 Arnaldo Carvalho de Melo <acme@redhat.com> |
| 6 | */ |
| 7 | #include <linux/module.h> |
| 8 | #include <linux/moduleparam.h> |
| 9 | #include "tfrc.h" |
| 10 | |
| 11 | #ifdef CONFIG_IP_DCCP_TFRC_DEBUG |
| 12 | int tfrc_debug; |
| 13 | module_param(tfrc_debug, bool, 0444); |
| 14 | MODULE_PARM_DESC(tfrc_debug, "Enable debug messages"); |
| 15 | #endif |
| 16 | |
| 17 | extern int dccp_li_init(void); |
| 18 | extern void dccp_li_exit(void); |
| 19 | extern int packet_history_init(void); |
| 20 | extern void packet_history_exit(void); |
| 21 | |
| 22 | static int __init tfrc_module_init(void) |
| 23 | { |
| 24 | int rc = dccp_li_init(); |
| 25 | |
| 26 | if (rc == 0) { |
| 27 | rc = packet_history_init(); |
| 28 | if (rc != 0) |
| 29 | dccp_li_exit(); |
| 30 | } |
| 31 | |
| 32 | return rc; |
| 33 | } |
| 34 | |
| 35 | static void __exit tfrc_module_exit(void) |
| 36 | { |
| 37 | packet_history_exit(); |
| 38 | dccp_li_exit(); |
| 39 | } |
| 40 | |
| 41 | module_init(tfrc_module_init); |
| 42 | module_exit(tfrc_module_exit); |
| 43 | |
| 44 | MODULE_AUTHOR("Gerrit Renker <gerrit@erg.abdn.ac.uk>, " |
| 45 | "Ian McDonald <ian.mcdonald@jandi.co.nz>, " |
| 46 | "Arnaldo Carvalho de Melo <acme@redhat.com>"); |
| 47 | MODULE_DESCRIPTION("DCCP TFRC library"); |
| 48 | MODULE_LICENSE("GPL"); |