diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/if_bridge.h |
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 'include/linux/if_bridge.h')
-rw-r--r-- | include/linux/if_bridge.h | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h new file mode 100644 index 000000000000..fd1b6eb94a5f --- /dev/null +++ b/include/linux/if_bridge.h | |||
@@ -0,0 +1,113 @@ | |||
1 | /* | ||
2 | * Linux ethernet bridge | ||
3 | * | ||
4 | * Authors: | ||
5 | * Lennert Buytenhek <buytenh@gnu.org> | ||
6 | * | ||
7 | * $Id: if_bridge.h,v 1.1 2000/02/18 16:47:01 davem Exp $ | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * as published by the Free Software Foundation; either version | ||
12 | * 2 of the License, or (at your option) any later version. | ||
13 | */ | ||
14 | |||
15 | #ifndef _LINUX_IF_BRIDGE_H | ||
16 | #define _LINUX_IF_BRIDGE_H | ||
17 | |||
18 | #include <linux/types.h> | ||
19 | |||
20 | #define SYSFS_BRIDGE_ATTR "bridge" | ||
21 | #define SYSFS_BRIDGE_FDB "brforward" | ||
22 | #define SYSFS_BRIDGE_PORT_SUBDIR "brif" | ||
23 | #define SYSFS_BRIDGE_PORT_ATTR "brport" | ||
24 | #define SYSFS_BRIDGE_PORT_LINK "bridge" | ||
25 | |||
26 | #define BRCTL_VERSION 1 | ||
27 | |||
28 | #define BRCTL_GET_VERSION 0 | ||
29 | #define BRCTL_GET_BRIDGES 1 | ||
30 | #define BRCTL_ADD_BRIDGE 2 | ||
31 | #define BRCTL_DEL_BRIDGE 3 | ||
32 | #define BRCTL_ADD_IF 4 | ||
33 | #define BRCTL_DEL_IF 5 | ||
34 | #define BRCTL_GET_BRIDGE_INFO 6 | ||
35 | #define BRCTL_GET_PORT_LIST 7 | ||
36 | #define BRCTL_SET_BRIDGE_FORWARD_DELAY 8 | ||
37 | #define BRCTL_SET_BRIDGE_HELLO_TIME 9 | ||
38 | #define BRCTL_SET_BRIDGE_MAX_AGE 10 | ||
39 | #define BRCTL_SET_AGEING_TIME 11 | ||
40 | #define BRCTL_SET_GC_INTERVAL 12 | ||
41 | #define BRCTL_GET_PORT_INFO 13 | ||
42 | #define BRCTL_SET_BRIDGE_STP_STATE 14 | ||
43 | #define BRCTL_SET_BRIDGE_PRIORITY 15 | ||
44 | #define BRCTL_SET_PORT_PRIORITY 16 | ||
45 | #define BRCTL_SET_PATH_COST 17 | ||
46 | #define BRCTL_GET_FDB_ENTRIES 18 | ||
47 | |||
48 | #define BR_STATE_DISABLED 0 | ||
49 | #define BR_STATE_LISTENING 1 | ||
50 | #define BR_STATE_LEARNING 2 | ||
51 | #define BR_STATE_FORWARDING 3 | ||
52 | #define BR_STATE_BLOCKING 4 | ||
53 | |||
54 | struct __bridge_info | ||
55 | { | ||
56 | __u64 designated_root; | ||
57 | __u64 bridge_id; | ||
58 | __u32 root_path_cost; | ||
59 | __u32 max_age; | ||
60 | __u32 hello_time; | ||
61 | __u32 forward_delay; | ||
62 | __u32 bridge_max_age; | ||
63 | __u32 bridge_hello_time; | ||
64 | __u32 bridge_forward_delay; | ||
65 | __u8 topology_change; | ||
66 | __u8 topology_change_detected; | ||
67 | __u8 root_port; | ||
68 | __u8 stp_enabled; | ||
69 | __u32 ageing_time; | ||
70 | __u32 gc_interval; | ||
71 | __u32 hello_timer_value; | ||
72 | __u32 tcn_timer_value; | ||
73 | __u32 topology_change_timer_value; | ||
74 | __u32 gc_timer_value; | ||
75 | }; | ||
76 | |||
77 | struct __port_info | ||
78 | { | ||
79 | __u64 designated_root; | ||
80 | __u64 designated_bridge; | ||
81 | __u16 port_id; | ||
82 | __u16 designated_port; | ||
83 | __u32 path_cost; | ||
84 | __u32 designated_cost; | ||
85 | __u8 state; | ||
86 | __u8 top_change_ack; | ||
87 | __u8 config_pending; | ||
88 | __u8 unused0; | ||
89 | __u32 message_age_timer_value; | ||
90 | __u32 forward_delay_timer_value; | ||
91 | __u32 hold_timer_value; | ||
92 | }; | ||
93 | |||
94 | struct __fdb_entry | ||
95 | { | ||
96 | __u8 mac_addr[6]; | ||
97 | __u8 port_no; | ||
98 | __u8 is_local; | ||
99 | __u32 ageing_timer_value; | ||
100 | __u32 unused; | ||
101 | }; | ||
102 | |||
103 | #ifdef __KERNEL__ | ||
104 | |||
105 | #include <linux/netdevice.h> | ||
106 | |||
107 | extern void brioctl_set(int (*ioctl_hook)(unsigned int, void __user *)); | ||
108 | extern int (*br_handle_frame_hook)(struct net_bridge_port *p, struct sk_buff **pskb); | ||
109 | extern int (*br_should_route_hook)(struct sk_buff **pskb); | ||
110 | |||
111 | #endif | ||
112 | |||
113 | #endif | ||