summaryrefslogtreecommitdiff
path: root/net/dccp/ccids/lib/tfrc.c
blob: 3a7a1838a64b48b9f447b2f48c58623206732738 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
 * TFRC: main module holding the pieces of the TFRC library together
 *
 * Copyright (c) 2007 The University of Aberdeen, Scotland, UK
 * Copyright (c) 2007 Arnaldo Carvalho de Melo <acme@redhat.com>
 */
#include <linux/module.h>
#include <linux/moduleparam.h>
#include "tfrc.h"

#ifdef CONFIG_IP_DCCP_TFRC_DEBUG
int tfrc_debug;
module_param(tfrc_debug, bool, 0444);
MODULE_PARM_DESC(tfrc_debug, "Enable debug messages");
#endif

extern int  dccp_li_init(void);
extern void dccp_li_exit(void);
extern int packet_history_init(void);
extern void packet_history_exit(void);

static int __init tfrc_module_init(void)
{
	int rc = dccp_li_init();

	if (rc == 0) {
		rc = packet_history_init();
		if (rc != 0)
			dccp_li_exit();
	}

	return rc;
}

static void __exit tfrc_module_exit(void)
{
	packet_history_exit();
	dccp_li_exit();
}

module_init(tfrc_module_init);
module_exit(tfrc_module_exit);

MODULE_AUTHOR("Gerrit Renker <gerrit@erg.abdn.ac.uk>, "
	      "Ian McDonald <ian.mcdonald@jandi.co.nz>, "
	      "Arnaldo Carvalho de Melo <acme@redhat.com>");
MODULE_DESCRIPTION("DCCP TFRC library");
MODULE_LICENSE("GPL");