Blame view

include/linux/if_bridge.h 2.53 KB
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
3
4
5
6
  /*
   *	Linux ethernet bridge
   *
   *	Authors:
   *	Lennert Buytenhek		<buytenh@gnu.org>
   *
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
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
49
50
   *	This program is free software; you can redistribute it and/or
   *	modify it under the terms of the GNU General Public License
   *	as published by the Free Software Foundation; either version
   *	2 of the License, or (at your option) any later version.
   */
  
  #ifndef _LINUX_IF_BRIDGE_H
  #define _LINUX_IF_BRIDGE_H
  
  #include <linux/types.h>
  
  #define SYSFS_BRIDGE_ATTR	"bridge"
  #define SYSFS_BRIDGE_FDB	"brforward"
  #define SYSFS_BRIDGE_PORT_SUBDIR "brif"
  #define SYSFS_BRIDGE_PORT_ATTR	"brport"
  #define SYSFS_BRIDGE_PORT_LINK	"bridge"
  
  #define BRCTL_VERSION 1
  
  #define BRCTL_GET_VERSION 0
  #define BRCTL_GET_BRIDGES 1
  #define BRCTL_ADD_BRIDGE 2
  #define BRCTL_DEL_BRIDGE 3
  #define BRCTL_ADD_IF 4
  #define BRCTL_DEL_IF 5
  #define BRCTL_GET_BRIDGE_INFO 6
  #define BRCTL_GET_PORT_LIST 7
  #define BRCTL_SET_BRIDGE_FORWARD_DELAY 8
  #define BRCTL_SET_BRIDGE_HELLO_TIME 9
  #define BRCTL_SET_BRIDGE_MAX_AGE 10
  #define BRCTL_SET_AGEING_TIME 11
  #define BRCTL_SET_GC_INTERVAL 12
  #define BRCTL_GET_PORT_INFO 13
  #define BRCTL_SET_BRIDGE_STP_STATE 14
  #define BRCTL_SET_BRIDGE_PRIORITY 15
  #define BRCTL_SET_PORT_PRIORITY 16
  #define BRCTL_SET_PATH_COST 17
  #define BRCTL_GET_FDB_ENTRIES 18
  
  #define BR_STATE_DISABLED 0
  #define BR_STATE_LISTENING 1
  #define BR_STATE_LEARNING 2
  #define BR_STATE_FORWARDING 3
  #define BR_STATE_BLOCKING 4
d94d9fee9   Eric Dumazet   net: cleanup incl...
51
  struct __bridge_info {
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
  	__u64 designated_root;
  	__u64 bridge_id;
  	__u32 root_path_cost;
  	__u32 max_age;
  	__u32 hello_time;
  	__u32 forward_delay;
  	__u32 bridge_max_age;
  	__u32 bridge_hello_time;
  	__u32 bridge_forward_delay;
  	__u8 topology_change;
  	__u8 topology_change_detected;
  	__u8 root_port;
  	__u8 stp_enabled;
  	__u32 ageing_time;
  	__u32 gc_interval;
  	__u32 hello_timer_value;
  	__u32 tcn_timer_value;
  	__u32 topology_change_timer_value;
  	__u32 gc_timer_value;
  };
d94d9fee9   Eric Dumazet   net: cleanup incl...
72
  struct __port_info {
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
73
74
75
76
77
78
79
80
81
82
83
84
85
86
  	__u64 designated_root;
  	__u64 designated_bridge;
  	__u16 port_id;
  	__u16 designated_port;
  	__u32 path_cost;
  	__u32 designated_cost;
  	__u8 state;
  	__u8 top_change_ack;
  	__u8 config_pending;
  	__u8 unused0;
  	__u32 message_age_timer_value;
  	__u32 forward_delay_timer_value;
  	__u32 hold_timer_value;
  };
d94d9fee9   Eric Dumazet   net: cleanup incl...
87
  struct __fdb_entry {
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
88
89
90
91
  	__u8 mac_addr[6];
  	__u8 port_no;
  	__u8 is_local;
  	__u32 ageing_timer_value;
ae4f8fca4   Stephen Hemminger   bridge: forwardin...
92
93
94
  	__u8 port_hi;
  	__u8 pad0;
  	__u16 unused;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
95
96
97
98
99
  };
  
  #ifdef __KERNEL__
  
  #include <linux/netdevice.h>
881d966b4   Eric W. Biederman   [NET]: Make the d...
100
  extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *));
a386f9902   Eric Dumazet   bridge: add prope...
101

2f46e0799   Florian Westphal   netfilter: ebtabl...
102
  typedef int br_should_route_hook_t(struct sk_buff *skb);
a386f9902   Eric Dumazet   bridge: add prope...
103
  extern br_should_route_hook_t __rcu *br_should_route_hook;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
104
105
106
107
  
  #endif
  
  #endif