]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/netdev/vxlan.h
09d0a263d4c1264271a5d2a172059c01ba88027b
[thirdparty/systemd.git] / src / network / netdev / vxlan.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5 Copyright 2014 Tom Gundersen <teg@jklm.no>
6 ***/
7
8 typedef struct VxLan VxLan;
9
10 #include "in-addr-util.h"
11 #include "netdev/netdev.h"
12
13 #define VXLAN_VID_MAX (1u << 24) - 1
14 #define VXLAN_FLOW_LABEL_MAX_MASK 0xFFFFFU
15
16 struct VxLan {
17 NetDev meta;
18
19 uint64_t id;
20
21 int remote_family;
22 int local_family;
23
24 union in_addr_union remote;
25 union in_addr_union local;
26
27 unsigned tos;
28 unsigned ttl;
29 unsigned max_fdb;
30 unsigned flow_label;
31
32 uint16_t dest_port;
33
34 usec_t fdb_ageing;
35
36 bool learning;
37 bool arp_proxy;
38 bool route_short_circuit;
39 bool l2miss;
40 bool l3miss;
41 bool udpcsum;
42 bool udp6zerocsumtx;
43 bool udp6zerocsumrx;
44 bool remote_csum_tx;
45 bool remote_csum_rx;
46 bool group_policy;
47
48 struct ifla_vxlan_port_range port_range;
49 };
50
51 DEFINE_NETDEV_CAST(VXLAN, VxLan);
52 extern const NetDevVTable vxlan_vtable;
53
54 int config_parse_vxlan_address(const char *unit,
55 const char *filename,
56 unsigned line,
57 const char *section,
58 unsigned section_line,
59 const char *lvalue,
60 int ltype,
61 const char *rvalue,
62 void *data,
63 void *userdata);
64 int config_parse_port_range(const char *unit,
65 const char *filename,
66 unsigned line,
67 const char *section,
68 unsigned section_line,
69 const char *lvalue,
70 int ltype,
71 const char *rvalue,
72 void *data,
73 void *userdata);
74
75 int config_parse_flow_label(const char *unit,
76 const char *filename,
77 unsigned line,
78 const char *section,
79 unsigned section_line,
80 const char *lvalue,
81 int ltype,
82 const char *rvalue,
83 void *data,
84 void *userdata);