]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/netdev/geneve.h
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / network / netdev / geneve.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5 This file is part of systemd.
6
7 Copyright 2017 Susant Sahani
8
9 systemd is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation; either version 2.1 of the License, or
12 (at your option) any later version.
13
14 systemd is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with systemd; If not, see <http://www.gnu.org/licenses/>.
21 ***/
22
23 typedef struct Geneve Geneve;
24
25 #include "in-addr-util.h"
26 #include "netdev.h"
27 #include "networkd-link.h"
28 #include "networkd-network.h"
29
30 #define GENEVE_VID_MAX (1u << 24) - 1
31
32 struct Geneve {
33 NetDev meta;
34
35 uint32_t id;
36 uint32_t flow_label;
37
38 int remote_family;
39
40 uint8_t tos;
41 uint8_t ttl;
42
43 uint16_t dest_port;
44
45 bool udpcsum;
46 bool udp6zerocsumtx;
47 bool udp6zerocsumrx;
48
49 union in_addr_union remote;
50 };
51
52 DEFINE_NETDEV_CAST(GENEVE, Geneve);
53 extern const NetDevVTable geneve_vtable;
54
55 int config_parse_geneve_vni(const char *unit,
56 const char *filename,
57 unsigned line,
58 const char *section,
59 unsigned section_line,
60 const char *lvalue,
61 int ltype,
62 const char *rvalue,
63 void *data,
64 void *userdata);
65
66 int config_parse_geneve_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
77 int config_parse_geneve_flow_label(const char *unit,
78 const char *filename,
79 unsigned line,
80 const char *section,
81 unsigned section_line,
82 const char *lvalue,
83 int ltype,
84 const char *rvalue,
85 void *data,
86 void *userdata);