networkd-netdev-vxlan.h revision ea84fd5cb327508ae2b4e9ab8ebf3c09f7471d27
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen/***
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen This file is part of systemd.
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen Copyright 2014 Tom Gundersen <teg@jklm.no>
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen systemd is free software; you can redistribute it and/or modify it
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen under the terms of the GNU Lesser General Public License as published by
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen the Free Software Foundation; either version 2.1 of the License, or
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen (at your option) any later version.
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen systemd is distributed in the hope that it will be useful, but
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen WITHOUT ANY WARRANTY; without even the implied warranty of
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen Lesser General Public License for more details.
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen You should have received a copy of the GNU Lesser General Public License
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen along with systemd; If not, see <http://www.gnu.org/licenses/>.
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen***/
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen#pragma once
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen
aa9f11405829fd4755fef28602a7167dba3ddc89Tom Gundersentypedef struct VxLan VxLan;
aa9f11405829fd4755fef28602a7167dba3ddc89Tom Gundersen
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen#include "networkd-netdev.h"
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen
aa9f11405829fd4755fef28602a7167dba3ddc89Tom Gundersen#include "in-addr-util.h"
aa9f11405829fd4755fef28602a7167dba3ddc89Tom Gundersen
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen#define VXLAN_VID_MAX (1u << 24) - 1
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersen
aa9f11405829fd4755fef28602a7167dba3ddc89Tom Gundersenstruct VxLan {
aa9f11405829fd4755fef28602a7167dba3ddc89Tom Gundersen NetDev meta;
aa9f11405829fd4755fef28602a7167dba3ddc89Tom Gundersen
aa9f11405829fd4755fef28602a7167dba3ddc89Tom Gundersen uint64_t id;
85a8eeee36b57c1ab382b0225fa9a87525bbeee9Susant Sahani
85a8eeee36b57c1ab382b0225fa9a87525bbeee9Susant Sahani int family;
aa9f11405829fd4755fef28602a7167dba3ddc89Tom Gundersen union in_addr_union group;
85a8eeee36b57c1ab382b0225fa9a87525bbeee9Susant Sahani
aa9f11405829fd4755fef28602a7167dba3ddc89Tom Gundersen unsigned tos;
aa9f11405829fd4755fef28602a7167dba3ddc89Tom Gundersen unsigned ttl;
85a8eeee36b57c1ab382b0225fa9a87525bbeee9Susant Sahani
85a8eeee36b57c1ab382b0225fa9a87525bbeee9Susant Sahani usec_t fdb_ageing;
85a8eeee36b57c1ab382b0225fa9a87525bbeee9Susant Sahani
aa9f11405829fd4755fef28602a7167dba3ddc89Tom Gundersen bool learning;
85a8eeee36b57c1ab382b0225fa9a87525bbeee9Susant Sahani bool arp_proxy;
85a8eeee36b57c1ab382b0225fa9a87525bbeee9Susant Sahani bool route_short_circuit;
85a8eeee36b57c1ab382b0225fa9a87525bbeee9Susant Sahani bool l2miss;
85a8eeee36b57c1ab382b0225fa9a87525bbeee9Susant Sahani bool l3miss;
cffacc741cb79f63999720525ceaa65aae01a542Susant Sahani bool udpcsum;
cffacc741cb79f63999720525ceaa65aae01a542Susant Sahani bool udp6zerocsumtx;
cffacc741cb79f63999720525ceaa65aae01a542Susant Sahani bool udp6zerocsumrx;
ea84fd5cb327508ae2b4e9ab8ebf3c09f7471d27Susant Sahani bool group_policy;
aa9f11405829fd4755fef28602a7167dba3ddc89Tom Gundersen};
aa9f11405829fd4755fef28602a7167dba3ddc89Tom Gundersen
3be1d7e0c5bf60658d34eb6311d4e77c6803578cTom Gundersenextern const NetDevVTable vxlan_vtable;
a94d64d256d1a2b73c578116f341824eb5d0fab1Susant Sahani
a94d64d256d1a2b73c578116f341824eb5d0fab1Susant Sahaniint config_parse_vxlan_group_address(const char *unit,
a94d64d256d1a2b73c578116f341824eb5d0fab1Susant Sahani const char *filename,
a94d64d256d1a2b73c578116f341824eb5d0fab1Susant Sahani unsigned line,
a94d64d256d1a2b73c578116f341824eb5d0fab1Susant Sahani const char *section,
a94d64d256d1a2b73c578116f341824eb5d0fab1Susant Sahani unsigned section_line,
a94d64d256d1a2b73c578116f341824eb5d0fab1Susant Sahani const char *lvalue,
a94d64d256d1a2b73c578116f341824eb5d0fab1Susant Sahani int ltype,
a94d64d256d1a2b73c578116f341824eb5d0fab1Susant Sahani const char *rvalue,
a94d64d256d1a2b73c578116f341824eb5d0fab1Susant Sahani void *data,
a94d64d256d1a2b73c578116f341824eb5d0fab1Susant Sahani void *userdata);