Line data Source code
1 : /* SPDX-License-Identifier: LGPL-2.1+ */ 2 : #pragma once 3 : 4 : typedef struct MacVlan MacVlan; 5 : 6 : #include "netdev/netdev.h" 7 : 8 : typedef enum MacVlanMode { 9 : NETDEV_MACVLAN_MODE_PRIVATE = MACVLAN_MODE_PRIVATE, 10 : NETDEV_MACVLAN_MODE_VEPA = MACVLAN_MODE_VEPA, 11 : NETDEV_MACVLAN_MODE_BRIDGE = MACVLAN_MODE_BRIDGE, 12 : NETDEV_MACVLAN_MODE_PASSTHRU = MACVLAN_MODE_PASSTHRU, 13 : _NETDEV_MACVLAN_MODE_MAX, 14 : _NETDEV_MACVLAN_MODE_INVALID = -1 15 : } MacVlanMode; 16 : 17 : struct MacVlan { 18 : NetDev meta; 19 : 20 : MacVlanMode mode; 21 : }; 22 : 23 0 : DEFINE_NETDEV_CAST(MACVLAN, MacVlan); 24 0 : DEFINE_NETDEV_CAST(MACVTAP, MacVlan); 25 : extern const NetDevVTable macvlan_vtable; 26 : extern const NetDevVTable macvtap_vtable; 27 : 28 : const char *macvlan_mode_to_string(MacVlanMode d) _const_; 29 : MacVlanMode macvlan_mode_from_string(const char *d) _pure_; 30 : 31 : CONFIG_PARSER_PROTOTYPE(config_parse_macvlan_mode);