1 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 2 #pragma once 3 4 #include <netinet/in.h> 5 #include <linux/if_link.h> 6 7 #include "macro.h" 8 9 typedef enum IPVlanMode { 10 NETDEV_IPVLAN_MODE_L2 = IPVLAN_MODE_L2, 11 NETDEV_IPVLAN_MODE_L3 = IPVLAN_MODE_L3, 12 NETDEV_IPVLAN_MODE_L3S = IPVLAN_MODE_L3S, 13 _NETDEV_IPVLAN_MODE_MAX, 14 _NETDEV_IPVLAN_MODE_INVALID = -EINVAL, 15 } IPVlanMode; 16 17 typedef enum IPVlanFlags { 18 NETDEV_IPVLAN_FLAGS_BRIGDE, 19 NETDEV_IPVLAN_FLAGS_PRIVATE = IPVLAN_F_PRIVATE, 20 NETDEV_IPVLAN_FLAGS_VEPA = IPVLAN_F_VEPA, 21 _NETDEV_IPVLAN_FLAGS_MAX, 22 _NETDEV_IPVLAN_FLAGS_INVALID = -EINVAL, 23 } IPVlanFlags; 24 25 const char *ipvlan_mode_to_string(IPVlanMode d) _const_; 26 IPVlanMode ipvlan_mode_from_string(const char *d) _pure_; 27 28 const char *ipvlan_flags_to_string(IPVlanFlags d) _const_; 29 IPVlanFlags ipvlan_flags_from_string(const char *d) _pure_; 30