]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/netdev/geneve.h
tree-wide: beautify remaining copyright statements
[thirdparty/systemd.git] / src / network / netdev / geneve.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5 Copyright © 2017 Susant Sahani
6 ***/
7
8 typedef struct Geneve Geneve;
9
10 #include "in-addr-util.h"
11 #include "netdev.h"
12 #include "networkd-link.h"
13 #include "networkd-network.h"
14
15 #define GENEVE_VID_MAX (1u << 24) - 1
16
17 struct Geneve {
18 NetDev meta;
19
20 uint32_t id;
21 uint32_t flow_label;
22
23 int remote_family;
24
25 uint8_t tos;
26 uint8_t ttl;
27
28 uint16_t dest_port;
29
30 bool udpcsum;
31 bool udp6zerocsumtx;
32 bool udp6zerocsumrx;
33
34 union in_addr_union remote;
35 };
36
37 DEFINE_NETDEV_CAST(GENEVE, Geneve);
38 extern const NetDevVTable geneve_vtable;
39
40 int config_parse_geneve_vni(const char *unit,
41 const char *filename,
42 unsigned line,
43 const char *section,
44 unsigned section_line,
45 const char *lvalue,
46 int ltype,
47 const char *rvalue,
48 void *data,
49 void *userdata);
50
51 int config_parse_geneve_address(const char *unit,
52 const char *filename,
53 unsigned line,
54 const char *section,
55 unsigned section_line,
56 const char *lvalue,
57 int ltype,
58 const char *rvalue,
59 void *data,
60 void *userdata);
61
62 int config_parse_geneve_flow_label(const char *unit,
63 const char *filename,
64 unsigned line,
65 const char *section,
66 unsigned section_line,
67 const char *lvalue,
68 int ltype,
69 const char *rvalue,
70 void *data,
71 void *userdata);