1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3 
4 #include <netinet/in.h>
5 #include <linux/if_bridge.h>
6 
7 #include "conf-parser.h"
8 
9 typedef enum BridgeState {
10         NETDEV_BRIDGE_STATE_DISABLED   = BR_STATE_DISABLED,
11         NETDEV_BRIDGE_STATE_LISTENING  = BR_STATE_LISTENING,
12         NETDEV_BRIDGE_STATE_LEARNING   = BR_STATE_LEARNING,
13         NETDEV_BRIDGE_STATE_FORWARDING = BR_STATE_FORWARDING,
14         NETDEV_BRIDGE_STATE_BLOCKING   = BR_STATE_BLOCKING,
15         _NETDEV_BRIDGE_STATE_MAX,
16         _NETDEV_BRIDGE_STATE_INVALID   = -EINVAL,
17 } BridgeState;
18 
19 const char *bridge_state_to_string(BridgeState d) _const_;
20 BridgeState bridge_state_from_string(const char *d) _pure_;
21