Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tfrc.c
Go to the documentation of this file.
1 /*
2  * TFRC library initialisation
3  *
4  * Copyright (c) 2007 The University of Aberdeen, Scotland, UK
5  * Copyright (c) 2007 Arnaldo Carvalho de Melo <[email protected]>
6  */
7 #include <linux/moduleparam.h>
8 #include "tfrc.h"
9 
10 #ifdef CONFIG_IP_DCCP_TFRC_DEBUG
11 bool tfrc_debug;
12 module_param(tfrc_debug, bool, 0644);
13 MODULE_PARM_DESC(tfrc_debug, "Enable TFRC debug messages");
14 #endif
15 
17 {
18  int rc = tfrc_li_init();
19 
20  if (rc)
21  goto out;
22 
24  if (rc)
25  goto out_free_loss_intervals;
26 
28  if (rc)
29  goto out_free_tx_history;
30  return 0;
31 
32 out_free_tx_history:
34 out_free_loss_intervals:
35  tfrc_li_exit();
36 out:
37  return rc;
38 }
39 
40 void tfrc_lib_exit(void)
41 {
44  tfrc_li_exit();
45 }