]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/netdev/vxlan.h
Merge pull request #5484 from dvdhrm/convertible
[thirdparty/systemd.git] / src / network / netdev / vxlan.h
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
29 struct VxLan {
30 NetDev meta;
31
32 uint64_t id;
33
34 int remote_family;
35 int local_family;
36
37 union in_addr_union remote;
38 union in_addr_union local;
39
40 unsigned tos;
41 unsigned ttl;
42 unsigned max_fdb;
43
44 uint16_t dest_port;
45
46 usec_t fdb_ageing;
47
48 bool learning;
49 bool arp_proxy;
50 bool route_short_circuit;
51 bool l2miss;
52 bool l3miss;
53 bool udpcsum;
54 bool udp6zerocsumtx;
55 bool udp6zerocsumrx;
56 bool remote_csum_tx;
57 bool remote_csum_rx;
58 bool group_policy;
59
60 struct ifla_vxlan_port_range port_range;
61 };
62
63 DEFINE_NETDEV_CAST(VXLAN, VxLan);
64 extern const NetDevVTable vxlan_vtable;
65
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);
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);