]>
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 TG |
27 | #define VXLAN_VID_MAX (1u << 24) - 1 |
28 | ||
aa9f1140 TG |
29 | struct VxLan { |
30 | NetDev meta; | |
31 | ||
32 | uint64_t id; | |
85a8eeee | 33 | |
d35e5d37 SS |
34 | int remote_family; |
35 | int local_family; | |
36 | ||
37 | union in_addr_union remote; | |
38 | union in_addr_union local; | |
85a8eeee | 39 | |
aa9f1140 TG |
40 | unsigned tos; |
41 | unsigned ttl; | |
3dbcf579 | 42 | unsigned max_fdb; |
85a8eeee | 43 | |
ea0288d1 SS |
44 | uint16_t dest_port; |
45 | ||
85a8eeee SS |
46 | usec_t fdb_ageing; |
47 | ||
aa9f1140 | 48 | bool learning; |
85a8eeee SS |
49 | bool arp_proxy; |
50 | bool route_short_circuit; | |
51 | bool l2miss; | |
52 | bool l3miss; | |
cffacc74 SS |
53 | bool udpcsum; |
54 | bool udp6zerocsumtx; | |
55 | bool udp6zerocsumrx; | |
16441027 SS |
56 | bool remote_csum_tx; |
57 | bool remote_csum_rx; | |
ea84fd5c | 58 | bool group_policy; |
ea0288d1 SS |
59 | |
60 | struct ifla_vxlan_port_range port_range; | |
aa9f1140 TG |
61 | }; |
62 | ||
634f0f98 | 63 | DEFINE_NETDEV_CAST(VXLAN, VxLan); |
3be1d7e0 | 64 | extern const NetDevVTable vxlan_vtable; |
a94d64d2 | 65 | |
d35e5d37 SS |
66 | int config_parse_vxlan_address(const char *unit, |
67 | const char *filename, | |
68 | unsigned line, | |
69 | const char *section, | |
70 | unsigned section_line, | |
71 | const char *lvalue, | |
72 | int ltype, | |
73 | const char *rvalue, | |
74 | void *data, | |
75 | void *userdata); | |
ea0288d1 SS |
76 | int config_parse_port_range(const char *unit, |
77 | const char *filename, | |
78 | unsigned line, | |
79 | const char *section, | |
80 | unsigned section_line, | |
81 | const char *lvalue, | |
82 | int ltype, | |
83 | const char *rvalue, | |
84 | void *data, | |
85 | void *userdata); | |
86 | ||
87 | int config_parse_destination_port(const char *unit, | |
88 | const char *filename, | |
89 | unsigned line, | |
90 | const char *section, | |
91 | unsigned section_line, | |
92 | const char *lvalue, | |
93 | int ltype, | |
94 | const char *rvalue, | |
95 | void *data, | |
96 | void *userdata); |