if_bridge.h
001:
002:
003:
004:
005: <buytenh@gnu.org>
006:
007:
008:
009:
010:
011:
012:
013: #ifndef _LINUX_IF_BRIDGE_H
014: #define _LINUX_IF_BRIDGE_H
015:
016: #include <linux/types.h>
017:
018: #define SYSFS_BRIDGE_ATTR "bridge"
019: #define SYSFS_BRIDGE_FDB "brforward"
020: #define SYSFS_BRIDGE_PORT_SUBDIR "brif"
021: #define SYSFS_BRIDGE_PORT_ATTR "brport"
022: #define SYSFS_BRIDGE_PORT_LINK "bridge"
023:
024: #define BRCTL_VERSION 1
025:
026: #define BRCTL_GET_VERSION 0
027: #define BRCTL_GET_BRIDGES 1
028: #define BRCTL_ADD_BRIDGE 2
029: #define BRCTL_DEL_BRIDGE 3
030: #define BRCTL_ADD_IF 4
031: #define BRCTL_DEL_IF 5
032: #define BRCTL_GET_BRIDGE_INFO 6
033: #define BRCTL_GET_PORT_LIST 7
034: #define BRCTL_SET_BRIDGE_FORWARD_DELAY 8
035: #define BRCTL_SET_BRIDGE_HELLO_TIME 9
036: #define BRCTL_SET_BRIDGE_MAX_AGE 10
037: #define BRCTL_SET_AGEING_TIME 11
038: #define BRCTL_SET_GC_INTERVAL 12
039: #define BRCTL_GET_PORT_INFO 13
040: #define BRCTL_SET_BRIDGE_STP_STATE 14
041: #define BRCTL_SET_BRIDGE_PRIORITY 15
042: #define BRCTL_SET_PORT_PRIORITY 16
043: #define BRCTL_SET_PATH_COST 17
044: #define BRCTL_GET_FDB_ENTRIES 18
045:
046: #define BR_STATE_DISABLED 0
047: #define BR_STATE_LISTENING 1
048: #define BR_STATE_LEARNING 2
049: #define BR_STATE_FORWARDING 3
050: #define BR_STATE_BLOCKING 4
051:
052: struct __bridge_info {
053: __u64 designated_root;
054: __u64 bridge_id;
055: __u32 root_path_cost;
056: __u32 max_age;
057: __u32 hello_time;
058: __u32 forward_delay;
059: __u32 bridge_max_age;
060: __u32 bridge_hello_time;
061: __u32 bridge_forward_delay;
062: __u8 topology_change;
063: __u8 topology_change_detected;
064: __u8 root_port;
065: __u8 stp_enabled;
066: __u32 ageing_time;
067: __u32 gc_interval;
068: __u32 hello_timer_value;
069: __u32 tcn_timer_value;
070: __u32 topology_change_timer_value;
071: __u32 gc_timer_value;
072: };
073:
074: struct __port_info {
075: __u64 designated_root;
076: __u64 designated_bridge;
077: __u16 port_id;
078: __u16 designated_port;
079: __u32 path_cost;
080: __u32 designated_cost;
081: __u8 state;
082: __u8 top_change_ack;
083: __u8 config_pending;
084: __u8 unused0;
085: __u32 message_age_timer_value;
086: __u32 forward_delay_timer_value;
087: __u32 hold_timer_value;
088: };
089:
090: struct __fdb_entry {
091: __u8 mac_addr[6];
092: __u8 port_no;
093: __u8 is_local;
094: __u32 ageing_timer_value;
095: __u8 port_hi;
096: __u8 pad0;
097: __u16 unused;
098: };
099:
100:
101: #endif
102:
© Andrew Scott 2006 -
2025,
All Rights Reserved