]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
0ef6f454 LP |
2 | #pragma once |
3 | ||
3be1d7e0 TG |
4 | /*** |
5 | This file is part of systemd. | |
6 | ||
7 | Copyright 2014 Tom Gundersen <teg@jklm.no> | |
8 | ||
9 | systemd is free software; you can redistribute it and/or modify it | |
10 | under the terms of the GNU Lesser General Public License as published by | |
11 | the Free Software Foundation; either version 2.1 of the License, or | |
12 | (at your option) any later version. | |
13 | ||
14 | systemd is distributed in the hope that it will be useful, but | |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
17 | Lesser General Public License for more details. | |
18 | ||
19 | You should have received a copy of the GNU Lesser General Public License | |
20 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
21 | ***/ | |
22 | ||
aa9f1140 TG |
23 | typedef struct VxLan VxLan; |
24 | ||
aa9f1140 | 25 | #include "in-addr-util.h" |
441e9ae4 | 26 | #include "netdev/netdev.h" |
aa9f1140 | 27 | |
3be1d7e0 | 28 | #define VXLAN_VID_MAX (1u << 24) - 1 |
d8653945 | 29 | #define VXLAN_FLOW_LABEL_MAX_MASK 0xFFFFFU |
3be1d7e0 | 30 | |
aa9f1140 TG |
31 | struct VxLan { |
32 | NetDev meta; | |
33 | ||
34 | uint64_t id; | |
85a8eeee | 35 | |
d35e5d37 SS |
36 | int remote_family; |
37 | int local_family; | |
38 | ||
39 | union in_addr_union remote; | |
40 | union in_addr_union local; | |
85a8eeee | 41 | |
aa9f1140 TG |
42 | unsigned tos; |
43 | unsigned ttl; | |
3dbcf579 | 44 | unsigned max_fdb; |
d8653945 | 45 | unsigned flow_label; |
85a8eeee | 46 | |
ea0288d1 SS |
47 | uint16_t dest_port; |
48 | ||
85a8eeee SS |
49 | usec_t fdb_ageing; |
50 | ||
aa9f1140 | 51 | bool learning; |
85a8eeee SS |
52 | bool arp_proxy; |
53 | bool route_short_circuit; | |
54 | bool l2miss; | |
55 | bool l3miss; | |
cffacc74 SS |
56 | bool udpcsum; |
57 | bool udp6zerocsumtx; | |
58 | bool udp6zerocsumrx; | |
16441027 SS |
59 | bool remote_csum_tx; |
60 | bool remote_csum_rx; | |
ea84fd5c | 61 | bool group_policy; |
ea0288d1 SS |
62 | |
63 | struct ifla_vxlan_port_range port_range; | |
aa9f1140 TG |
64 | }; |
65 | ||
634f0f98 | 66 | DEFINE_NETDEV_CAST(VXLAN, VxLan); |
3be1d7e0 | 67 | extern const NetDevVTable vxlan_vtable; |
a94d64d2 | 68 | |
d35e5d37 SS |
69 | int config_parse_vxlan_address(const char *unit, |
70 | const char *filename, | |
71 | unsigned line, | |
72 | const char *section, | |
73 | unsigned section_line, | |
74 | const char *lvalue, | |
75 | int ltype, | |
76 | const char *rvalue, | |
77 | void *data, | |
78 | void *userdata); | |
ea0288d1 SS |
79 | int config_parse_port_range(const char *unit, |
80 | const char *filename, | |
81 | unsigned line, | |
82 | const char *section, | |
83 | unsigned section_line, | |
84 | const char *lvalue, | |
85 | int ltype, | |
86 | const char *rvalue, | |
87 | void *data, | |
88 | void *userdata); | |
89 | ||
d8653945 SS |
90 | int config_parse_flow_label(const char *unit, |
91 | const char *filename, | |
92 | unsigned line, | |
93 | const char *section, | |
94 | unsigned section_line, | |
95 | const char *lvalue, | |
96 | int ltype, | |
97 | const char *rvalue, | |
98 | void *data, | |
99 | void *userdata); |