blob: 459a5eed689fa306a76b09b2694d39338501f956 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <netinet/in.h>
#include <linux/if_bridge.h>
#include "conf-parser.h"
#include "netdev.h"
#define LINK_BRIDGE_PORT_PRIORITY_INVALID 128
#define LINK_BRIDGE_PORT_PRIORITY_MAX 63
typedef struct Bridge {
NetDev meta;
int mcast_querier;
int mcast_snooping;
int vlan_filtering;
int vlan_protocol;
int stp;
uint16_t priority;
uint16_t group_fwd_mask;
uint16_t default_pvid;
uint8_t igmp_version;
usec_t forward_delay;
usec_t hello_time;
usec_t max_age;
usec_t ageing_time;
} Bridge;
typedef enum MulticastRouter {
MULTICAST_ROUTER_NONE = MDB_RTR_TYPE_DISABLED,
MULTICAST_ROUTER_TEMPORARY_QUERY = MDB_RTR_TYPE_TEMP_QUERY,
MULTICAST_ROUTER_PERMANENT = MDB_RTR_TYPE_PERM,
MULTICAST_ROUTER_TEMPORARY = MDB_RTR_TYPE_TEMP,
_MULTICAST_ROUTER_MAX,
_MULTICAST_ROUTER_INVALID = -EINVAL,
} MulticastRouter;
DEFINE_NETDEV_CAST(BRIDGE, Bridge);
extern const NetDevVTable bridge_vtable;
int link_set_bridge(Link *link);
const char* multicast_router_to_string(MulticastRouter i) _const_;
MulticastRouter multicast_router_from_string(const char *s) _pure_;
CONFIG_PARSER_PROTOTYPE(config_parse_multicast_router);
CONFIG_PARSER_PROTOTYPE(config_parse_bridge_igmp_version);
CONFIG_PARSER_PROTOTYPE(config_parse_bridge_port_priority);
|