]> git.ipfire.org Git - thirdparty/systemd.git/blame_incremental - src/network/netdev/bridge.h
ci: enable arm64 runner for build/unit jobs
[thirdparty/systemd.git] / src / network / netdev / bridge.h
... / ...
CommitLineData
1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2#pragma once
3
4#include "forward.h"
5#include "netdev.h"
6
7#define LINK_BRIDGE_PORT_PRIORITY_INVALID 128U
8#define LINK_BRIDGE_PORT_PRIORITY_MAX 63U
9
10typedef struct Bridge {
11 NetDev meta;
12
13 int mcast_querier;
14 int mcast_snooping;
15 int vlan_filtering;
16 int vlan_protocol;
17 int stp;
18 uint16_t priority;
19 uint16_t group_fwd_mask;
20 uint16_t default_pvid;
21 uint8_t igmp_version;
22 uint32_t fdb_max_learned;
23 bool fdb_max_learned_set;
24 int linklocal_learn;
25
26 usec_t forward_delay;
27 usec_t hello_time;
28 usec_t max_age;
29 usec_t ageing_time;
30} Bridge;
31
32typedef enum MulticastRouter {
33 MULTICAST_ROUTER_NONE,
34 MULTICAST_ROUTER_TEMPORARY_QUERY,
35 MULTICAST_ROUTER_PERMANENT,
36 MULTICAST_ROUTER_TEMPORARY,
37 _MULTICAST_ROUTER_MAX,
38 _MULTICAST_ROUTER_INVALID = -EINVAL,
39} MulticastRouter;
40
41DEFINE_NETDEV_CAST(BRIDGE, Bridge);
42extern const NetDevVTable bridge_vtable;
43
44const char* multicast_router_to_string(MulticastRouter i) _const_;
45MulticastRouter multicast_router_from_string(const char *s) _pure_;
46
47CONFIG_PARSER_PROTOTYPE(config_parse_multicast_router);
48CONFIG_PARSER_PROTOTYPE(config_parse_bridge_igmp_version);
49CONFIG_PARSER_PROTOTYPE(config_parse_bridge_port_priority);
50CONFIG_PARSER_PROTOTYPE(config_parse_bridge_fdb_max_learned);