]>
Commit | Line | Data |
---|---|---|
db9ecf05 | 1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
0ef6f454 LP |
2 | #pragma once |
3 | ||
baa3fadf | 4 | #include "forward.h" |
8e2cb51c | 5 | #include "netdev.h" |
3be1d7e0 | 6 | |
63b98386 JJ |
7 | #define LINK_BRIDGE_PORT_PRIORITY_INVALID 128U |
8 | #define LINK_BRIDGE_PORT_PRIORITY_MAX 63U | |
796aa313 | 9 | |
634f0f98 | 10 | typedef struct Bridge { |
aa9f1140 | 11 | NetDev meta; |
540eb5f0 | 12 | |
3fef7a3f | 13 | int mcast_querier; |
6df6d898 | 14 | int mcast_snooping; |
c6f8d17d | 15 | int vlan_filtering; |
4df4df5b | 16 | int vlan_protocol; |
b760a9af | 17 | int stp; |
c7440e74 | 18 | uint16_t priority; |
c4819961 | 19 | uint16_t group_fwd_mask; |
c7440e74 | 20 | uint16_t default_pvid; |
afa51e2d | 21 | uint8_t igmp_version; |
f379f36b GH |
22 | uint32_t fdb_max_learned; |
23 | bool fdb_max_learned_set; | |
d7de242c | 24 | int linklocal_learn; |
3fef7a3f | 25 | |
540eb5f0 SS |
26 | usec_t forward_delay; |
27 | usec_t hello_time; | |
28 | usec_t max_age; | |
c7440e74 | 29 | usec_t ageing_time; |
634f0f98 | 30 | } Bridge; |
aa9f1140 | 31 | |
8e2cb51c | 32 | typedef enum MulticastRouter { |
ad851cae YW |
33 | MULTICAST_ROUTER_NONE, |
34 | MULTICAST_ROUTER_TEMPORARY_QUERY, | |
35 | MULTICAST_ROUTER_PERMANENT, | |
36 | MULTICAST_ROUTER_TEMPORARY, | |
8e2cb51c | 37 | _MULTICAST_ROUTER_MAX, |
2d93c20e | 38 | _MULTICAST_ROUTER_INVALID = -EINVAL, |
8e2cb51c YW |
39 | } MulticastRouter; |
40 | ||
634f0f98 | 41 | DEFINE_NETDEV_CAST(BRIDGE, Bridge); |
3be1d7e0 | 42 | extern const NetDevVTable bridge_vtable; |
9a81f119 | 43 | |
8e2cb51c YW |
44 | const char* multicast_router_to_string(MulticastRouter i) _const_; |
45 | MulticastRouter multicast_router_from_string(const char *s) _pure_; | |
46 | ||
47 | CONFIG_PARSER_PROTOTYPE(config_parse_multicast_router); | |
afa51e2d | 48 | CONFIG_PARSER_PROTOTYPE(config_parse_bridge_igmp_version); |
796aa313 | 49 | CONFIG_PARSER_PROTOTYPE(config_parse_bridge_port_priority); |
f379f36b | 50 | CONFIG_PARSER_PROTOTYPE(config_parse_bridge_fdb_max_learned); |