]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/ipvlan-util.h
dda659d42ddeac5eebb12998775a9a60d71e33da
[thirdparty/systemd.git] / src / shared / ipvlan-util.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
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 = -1
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 = -1
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_;