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