aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /net/bridge/br.c
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'net/bridge/br.c')
-rw-r--r--net/bridge/br.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/net/bridge/br.c b/net/bridge/br.c
new file mode 100644
index 000000000000..f8f184942aaf
--- /dev/null
+++ b/net/bridge/br.c
@@ -0,0 +1,69 @@
1/*
2 * Generic parts
3 * Linux ethernet bridge
4 *
5 * Authors:
6 * Lennert Buytenhek <buytenh@gnu.org>
7 *
8 * $Id: br.c,v 1.47 2001/12/24 00:56:41 davem Exp $
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version
13 * 2 of the License, or (at your option) any later version.
14 */
15
16#include <linux/config.h>
17#include <linux/module.h>
18#include <linux/kernel.h>
19#include <linux/netdevice.h>
20#include <linux/etherdevice.h>
21#include <linux/init.h>
22
23#include "br_private.h"
24
25int (*br_should_route_hook) (struct sk_buff **pskb) = NULL;
26
27static int __init br_init(void)
28{
29 br_fdb_init();
30
31#ifdef CONFIG_BRIDGE_NETFILTER
32 if (br_netfilter_init())
33 return 1;
34#endif
35 brioctl_set(br_ioctl_deviceless_stub);
36 br_handle_frame_hook = br_handle_frame;
37
38 br_fdb_get_hook = br_fdb_get;
39 br_fdb_put_hook = br_fdb_put;
40
41 register_netdevice_notifier(&br_device_notifier);
42
43 return 0;
44}
45
46static void __exit br_deinit(void)
47{
48#ifdef CONFIG_BRIDGE_NETFILTER
49 br_netfilter_fini();
50#endif
51 unregister_netdevice_notifier(&br_device_notifier);
52 brioctl_set(NULL);
53
54 br_cleanup_bridges();
55
56 synchronize_net();
57
58 br_fdb_get_hook = NULL;
59 br_fdb_put_hook = NULL;
60
61 br_handle_frame_hook = NULL;
62 br_fdb_fini();
63}
64
65EXPORT_SYMBOL(br_should_route_hook);
66
67module_init(br_init)
68module_exit(br_deinit)
69MODULE_LICENSE("GPL");