]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/network/netdev/vxlan.h
Merge pull request #12392 from poettering/firstboot-salt
[thirdparty/systemd.git] / src / network / netdev / vxlan.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
0ef6f454
LP
2#pragma once
3
aa9f1140
TG
4typedef struct VxLan VxLan;
5
1189c00a
SS
6#include <linux/if_link.h>
7
aa9f1140 8#include "in-addr-util.h"
441e9ae4 9#include "netdev/netdev.h"
aa9f1140 10
3be1d7e0 11#define VXLAN_VID_MAX (1u << 24) - 1
d8653945 12#define VXLAN_FLOW_LABEL_MAX_MASK 0xFFFFFU
3be1d7e0 13
1189c00a
SS
14typedef enum VxLanDF {
15 NETDEV_VXLAN_DF_NO = VXLAN_DF_UNSET,
16 NETDEV_VXLAN_DF_YES = VXLAN_DF_SET,
17 NETDEV_VXLAN_DF_INHERIT = VXLAN_DF_INHERIT,
18 _NETDEV_VXLAN_DF_MAX,
19 _NETDEV_VXLAN_DF_INVALID = -1
20} VxLanDF;
21
aa9f1140
TG
22struct VxLan {
23 NetDev meta;
24
8c32c588 25 uint32_t vni;
85a8eeee 26
d35e5d37
SS
27 int remote_family;
28 int local_family;
83cb24ac 29 int group_family;
d35e5d37 30
1189c00a
SS
31 VxLanDF df;
32
d35e5d37
SS
33 union in_addr_union remote;
34 union in_addr_union local;
83cb24ac 35 union in_addr_union group;
85a8eeee 36
aa9f1140
TG
37 unsigned tos;
38 unsigned ttl;
3dbcf579 39 unsigned max_fdb;
d8653945 40 unsigned flow_label;
85a8eeee 41
ea0288d1
SS
42 uint16_t dest_port;
43
85a8eeee
SS
44 usec_t fdb_ageing;
45
aa9f1140 46 bool learning;
85a8eeee
SS
47 bool arp_proxy;
48 bool route_short_circuit;
49 bool l2miss;
50 bool l3miss;
cffacc74
SS
51 bool udpcsum;
52 bool udp6zerocsumtx;
53 bool udp6zerocsumrx;
16441027
SS
54 bool remote_csum_tx;
55 bool remote_csum_rx;
ea84fd5c 56 bool group_policy;
4cc0fd75 57 bool generic_protocol_extension;
f4a8ca32 58 bool inherit;
ea0288d1
SS
59
60 struct ifla_vxlan_port_range port_range;
aa9f1140
TG
61};
62
634f0f98 63DEFINE_NETDEV_CAST(VXLAN, VxLan);
3be1d7e0 64extern const NetDevVTable vxlan_vtable;
a94d64d2 65
1189c00a
SS
66const char *df_to_string(VxLanDF d) _const_;
67VxLanDF df_from_string(const char *d) _pure_;
68
538f15cf
YW
69CONFIG_PARSER_PROTOTYPE(config_parse_vxlan_address);
70CONFIG_PARSER_PROTOTYPE(config_parse_port_range);
71CONFIG_PARSER_PROTOTYPE(config_parse_flow_label);
1189c00a 72CONFIG_PARSER_PROTOTYPE(config_parse_df);
f4a8ca32 73CONFIG_PARSER_PROTOTYPE(config_parse_vxlan_ttl);