]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/network/netdev/vxlan.h
tree-wide: beautify remaining copyright statements
[thirdparty/systemd.git] / src / network / netdev / vxlan.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
0ef6f454
LP
2#pragma once
3
3be1d7e0 4/***
96b2fb93 5 Copyright © 2014 Tom Gundersen <teg@jklm.no>
3be1d7e0
TG
6***/
7
aa9f1140
TG
8typedef struct VxLan VxLan;
9
aa9f1140 10#include "in-addr-util.h"
441e9ae4 11#include "netdev/netdev.h"
aa9f1140 12
3be1d7e0 13#define VXLAN_VID_MAX (1u << 24) - 1
d8653945 14#define VXLAN_FLOW_LABEL_MAX_MASK 0xFFFFFU
3be1d7e0 15
aa9f1140
TG
16struct VxLan {
17 NetDev meta;
18
19 uint64_t id;
85a8eeee 20
d35e5d37
SS
21 int remote_family;
22 int local_family;
23
24 union in_addr_union remote;
25 union in_addr_union local;
85a8eeee 26
aa9f1140
TG
27 unsigned tos;
28 unsigned ttl;
3dbcf579 29 unsigned max_fdb;
d8653945 30 unsigned flow_label;
85a8eeee 31
ea0288d1
SS
32 uint16_t dest_port;
33
85a8eeee
SS
34 usec_t fdb_ageing;
35
aa9f1140 36 bool learning;
85a8eeee
SS
37 bool arp_proxy;
38 bool route_short_circuit;
39 bool l2miss;
40 bool l3miss;
cffacc74
SS
41 bool udpcsum;
42 bool udp6zerocsumtx;
43 bool udp6zerocsumrx;
16441027
SS
44 bool remote_csum_tx;
45 bool remote_csum_rx;
ea84fd5c 46 bool group_policy;
ea0288d1
SS
47
48 struct ifla_vxlan_port_range port_range;
aa9f1140
TG
49};
50
634f0f98 51DEFINE_NETDEV_CAST(VXLAN, VxLan);
3be1d7e0 52extern const NetDevVTable vxlan_vtable;
a94d64d2 53
d35e5d37
SS
54int config_parse_vxlan_address(const char *unit,
55 const char *filename,
56 unsigned line,
57 const char *section,
58 unsigned section_line,
59 const char *lvalue,
60 int ltype,
61 const char *rvalue,
62 void *data,
63 void *userdata);
ea0288d1
SS
64int config_parse_port_range(const char *unit,
65 const char *filename,
66 unsigned line,
67 const char *section,
68 unsigned section_line,
69 const char *lvalue,
70 int ltype,
71 const char *rvalue,
72 void *data,
73 void *userdata);
74
d8653945
SS
75int config_parse_flow_label(const char *unit,
76 const char *filename,
77 unsigned line,
78 const char *section,
79 unsigned section_line,
80 const char *lvalue,
81 int ltype,
82 const char *rvalue,
83 void *data,
84 void *userdata);