]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/network/netdev/geneve.h
networkd: replace geneve/vxlan port parsing with generic config_parse_ip_port
[thirdparty/systemd.git] / src / network / netdev / geneve.h
CommitLineData
6598e046
SS
1#pragma once
2
3/***
4 This file is part of systemd.
5
6 Copyright 2017 Susant Sahani
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
22typedef struct Geneve Geneve;
23
24#include "in-addr-util.h"
25#include "netdev.h"
26#include "networkd-link.h"
27#include "networkd-network.h"
6598e046
SS
28
29#define GENEVE_VID_MAX (1u << 24) - 1
30
31struct Geneve {
32 NetDev meta;
33
34 uint32_t id;
35 uint32_t flow_label;
36
37 int remote_family;
38
39 uint8_t tos;
40 uint8_t ttl;
41
42 uint16_t dest_port;
43
44 bool udpcsum;
45 bool udp6zerocsumtx;
46 bool udp6zerocsumrx;
47
48 union in_addr_union remote;
49};
50
51DEFINE_NETDEV_CAST(GENEVE, Geneve);
52extern const NetDevVTable geneve_vtable;
53
54int config_parse_geneve_vni(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);
64
6598e046
SS
65int config_parse_geneve_address(const char *unit,
66 const char *filename,
67 unsigned line,
68 const char *section,
69 unsigned section_line,
70 const char *lvalue,
71 int ltype,
72 const char *rvalue,
73 void *data,
74 void *userdata);
75
6598e046
SS
76int config_parse_geneve_flow_label(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);