]>
Commit | Line | Data |
---|---|---|
1 | #pragma once | |
2 | ||
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 | ||
22 | typedef struct VxLan VxLan; | |
23 | ||
24 | #include "in-addr-util.h" | |
25 | #include "netdev/netdev.h" | |
26 | ||
27 | #define VXLAN_VID_MAX (1u << 24) - 1 | |
28 | #define VXLAN_FLOW_LABEL_MAX_MASK 0xFFFFFU | |
29 | ||
30 | struct VxLan { | |
31 | NetDev meta; | |
32 | ||
33 | uint64_t id; | |
34 | ||
35 | int remote_family; | |
36 | int local_family; | |
37 | ||
38 | union in_addr_union remote; | |
39 | union in_addr_union local; | |
40 | ||
41 | unsigned tos; | |
42 | unsigned ttl; | |
43 | unsigned max_fdb; | |
44 | unsigned flow_label; | |
45 | ||
46 | uint16_t dest_port; | |
47 | ||
48 | usec_t fdb_ageing; | |
49 | ||
50 | bool learning; | |
51 | bool arp_proxy; | |
52 | bool route_short_circuit; | |
53 | bool l2miss; | |
54 | bool l3miss; | |
55 | bool udpcsum; | |
56 | bool udp6zerocsumtx; | |
57 | bool udp6zerocsumrx; | |
58 | bool remote_csum_tx; | |
59 | bool remote_csum_rx; | |
60 | bool group_policy; | |
61 | ||
62 | struct ifla_vxlan_port_range port_range; | |
63 | }; | |
64 | ||
65 | DEFINE_NETDEV_CAST(VXLAN, VxLan); | |
66 | extern const NetDevVTable vxlan_vtable; | |
67 | ||
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); | |
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 | ||
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); |