HALF ECHO LEARN / REFERENCE COLLECTION

v262.2

src/network/netdev/vxlan.h

1,825 bytesGit mode 100644Download original fileLGPL-2.1-or-later

Git blob: 90fc92e45aa1d61c86f67c0c05fc93898e82d1b9

Lines 1–75 of 75

/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
 
#include <linux/if_link.h>
 
#include "in-addr-util.h"
#include "netdev.h"
 
#define VXLAN_VID_MAX (1u << 24) - 1
#define VXLAN_FLOW_LABEL_MAX_MASK 0xFFFFFU
 
typedef enum VxLanDF {
        NETDEV_VXLAN_DF_NO = VXLAN_DF_UNSET,
        NETDEV_VXLAN_DF_YES = VXLAN_DF_SET,
        NETDEV_VXLAN_DF_INHERIT = VXLAN_DF_INHERIT,
        _NETDEV_VXLAN_DF_MAX,
        _NETDEV_VXLAN_DF_INVALID = -EINVAL,
} VxLanDF;
 
typedef struct VxLan {
        NetDev meta;
 
        uint32_t vni;
 
        int remote_family;
        int local_family;
        int group_family;
 
        VxLanDF df;
 
        NetDevLocalAddressType local_type;
        union in_addr_union local;
        union in_addr_union remote;
        union in_addr_union group;
 
        unsigned tos;
        unsigned ttl;
        unsigned max_fdb;
        unsigned flow_label;
 
        uint16_t dest_port;
 
        usec_t fdb_ageing;
 
        bool learning;
        bool arp_proxy;
        bool route_short_circuit;
        bool l2miss;
        bool l3miss;
        bool udpcsum;
        bool udp6zerocsumtx;
        bool udp6zerocsumrx;
        bool remote_csum_tx;
        bool remote_csum_rx;
        bool group_policy;
        bool generic_protocol_extension;
        bool inherit;
        bool independent;
        bool external; /* a.k.a collect metadata mode */
        bool vnifilter;
 
        struct ifla_vxlan_port_range port_range;
} VxLan;
 
DEFINE_NETDEV_CAST(VXLAN, VxLan);
extern const NetDevVTable vxlan_vtable;
 
DECLARE_STRING_TABLE_LOOKUP(df, VxLanDF);
 
CONFIG_PARSER_PROTOTYPE(config_parse_vxlan_address);
CONFIG_PARSER_PROTOTYPE(config_parse_port_range);
CONFIG_PARSER_PROTOTYPE(config_parse_flow_label);
CONFIG_PARSER_PROTOTYPE(config_parse_df);
CONFIG_PARSER_PROTOTYPE(config_parse_vxlan_ttl);