1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
4 #include <netinet/in.h>
5 #include <linux/if_bridge.h>
7 #include "conf-parser.h"
10 #define LINK_BRIDGE_PORT_PRIORITY_INVALID 128
11 #define LINK_BRIDGE_PORT_PRIORITY_MAX 63
13 typedef struct Bridge
{
22 uint16_t group_fwd_mask
;
23 uint16_t default_pvid
;
32 typedef enum MulticastRouter
{
33 MULTICAST_ROUTER_NONE
= MDB_RTR_TYPE_DISABLED
,
34 MULTICAST_ROUTER_TEMPORARY_QUERY
= MDB_RTR_TYPE_TEMP_QUERY
,
35 MULTICAST_ROUTER_PERMANENT
= MDB_RTR_TYPE_PERM
,
36 MULTICAST_ROUTER_TEMPORARY
= MDB_RTR_TYPE_TEMP
,
37 _MULTICAST_ROUTER_MAX
,
38 _MULTICAST_ROUTER_INVALID
= -EINVAL
,
41 DEFINE_NETDEV_CAST(BRIDGE
, Bridge
);
42 extern const NetDevVTable bridge_vtable
;
44 const char* multicast_router_to_string(MulticastRouter i
) _const_
;
45 MulticastRouter
multicast_router_from_string(const char *s
) _pure_
;
47 CONFIG_PARSER_PROTOTYPE(config_parse_multicast_router
);
48 CONFIG_PARSER_PROTOTYPE(config_parse_bridge_igmp_version
);
49 CONFIG_PARSER_PROTOTYPE(config_parse_bridge_port_priority
);