source: svn/trunk/newcon3bcm2_21bu/toolchain/mips-linux-uclibc/include/linux/if_bridge.h

Last change on this file was 2, checked in by phkim, 11 years ago

1.phkim

  1. revision copy newcon3sk r27
  • Property svn:executable set to *
File size: 2.3 KB
Line 
1/*
2 *      Linux ethernet bridge
3 *
4 *      Authors:
5 *      Lennert Buytenhek               <buytenh@gnu.org>
6 *
7 *
8 *      This program is free software; you can redistribute it and/or
9 *      modify it under the terms of the GNU General Public License
10 *      as published by the Free Software Foundation; either version
11 *      2 of the License, or (at your option) any later version.
12 */
13
14#ifndef _LINUX_IF_BRIDGE_H
15#define _LINUX_IF_BRIDGE_H
16
17#include <linux/types.h>
18
19#define SYSFS_BRIDGE_ATTR       "bridge"
20#define SYSFS_BRIDGE_FDB        "brforward"
21#define SYSFS_BRIDGE_PORT_SUBDIR "brif"
22#define SYSFS_BRIDGE_PORT_ATTR  "brport"
23#define SYSFS_BRIDGE_PORT_LINK  "bridge"
24
25#define BRCTL_VERSION 1
26
27#define BRCTL_GET_VERSION 0
28#define BRCTL_GET_BRIDGES 1
29#define BRCTL_ADD_BRIDGE 2
30#define BRCTL_DEL_BRIDGE 3
31#define BRCTL_ADD_IF 4
32#define BRCTL_DEL_IF 5
33#define BRCTL_GET_BRIDGE_INFO 6
34#define BRCTL_GET_PORT_LIST 7
35#define BRCTL_SET_BRIDGE_FORWARD_DELAY 8
36#define BRCTL_SET_BRIDGE_HELLO_TIME 9
37#define BRCTL_SET_BRIDGE_MAX_AGE 10
38#define BRCTL_SET_AGEING_TIME 11
39#define BRCTL_SET_GC_INTERVAL 12
40#define BRCTL_GET_PORT_INFO 13
41#define BRCTL_SET_BRIDGE_STP_STATE 14
42#define BRCTL_SET_BRIDGE_PRIORITY 15
43#define BRCTL_SET_PORT_PRIORITY 16
44#define BRCTL_SET_PATH_COST 17
45#define BRCTL_GET_FDB_ENTRIES 18
46
47#define BR_STATE_DISABLED 0
48#define BR_STATE_LISTENING 1
49#define BR_STATE_LEARNING 2
50#define BR_STATE_FORWARDING 3
51#define BR_STATE_BLOCKING 4
52
53struct __bridge_info
54{
55        __u64 designated_root;
56        __u64 bridge_id;
57        __u32 root_path_cost;
58        __u32 max_age;
59        __u32 hello_time;
60        __u32 forward_delay;
61        __u32 bridge_max_age;
62        __u32 bridge_hello_time;
63        __u32 bridge_forward_delay;
64        __u8 topology_change;
65        __u8 topology_change_detected;
66        __u8 root_port;
67        __u8 stp_enabled;
68        __u32 ageing_time;
69        __u32 gc_interval;
70        __u32 hello_timer_value;
71        __u32 tcn_timer_value;
72        __u32 topology_change_timer_value;
73        __u32 gc_timer_value;
74};
75
76struct __port_info
77{
78        __u64 designated_root;
79        __u64 designated_bridge;
80        __u16 port_id;
81        __u16 designated_port;
82        __u32 path_cost;
83        __u32 designated_cost;
84        __u8 state;
85        __u8 top_change_ack;
86        __u8 config_pending;
87        __u8 unused0;
88        __u32 message_age_timer_value;
89        __u32 forward_delay_timer_value;
90        __u32 hold_timer_value;
91};
92
93struct __fdb_entry
94{
95        __u8 mac_addr[6];
96        __u8 port_no;
97        __u8 is_local;
98        __u32 ageing_timer_value;
99        __u32 unused;
100};
101
102#endif
Note: See TracBrowser for help on using the repository browser.