mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
2874c5fd28
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 3029 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
81 lines
2.1 KiB
C
81 lines
2.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* Bridge per vlan tunnels
|
|
*
|
|
* Authors:
|
|
* Roopa Prabhu <roopa@cumulusnetworks.com>
|
|
*/
|
|
|
|
#ifndef _BR_PRIVATE_TUNNEL_H
|
|
#define _BR_PRIVATE_TUNNEL_H
|
|
|
|
struct vtunnel_info {
|
|
u32 tunid;
|
|
u16 vid;
|
|
u16 flags;
|
|
};
|
|
|
|
/* br_netlink_tunnel.c */
|
|
int br_parse_vlan_tunnel_info(struct nlattr *attr,
|
|
struct vtunnel_info *tinfo);
|
|
int br_process_vlan_tunnel_info(struct net_bridge *br,
|
|
struct net_bridge_port *p,
|
|
int cmd,
|
|
struct vtunnel_info *tinfo_curr,
|
|
struct vtunnel_info *tinfo_last,
|
|
bool *changed);
|
|
int br_get_vlan_tunnel_info_size(struct net_bridge_vlan_group *vg);
|
|
int br_fill_vlan_tunnel_info(struct sk_buff *skb,
|
|
struct net_bridge_vlan_group *vg);
|
|
|
|
#ifdef CONFIG_BRIDGE_VLAN_FILTERING
|
|
/* br_vlan_tunnel.c */
|
|
int vlan_tunnel_init(struct net_bridge_vlan_group *vg);
|
|
void vlan_tunnel_deinit(struct net_bridge_vlan_group *vg);
|
|
int nbp_vlan_tunnel_info_delete(struct net_bridge_port *port, u16 vid);
|
|
int nbp_vlan_tunnel_info_add(struct net_bridge_port *port, u16 vid, u32 tun_id);
|
|
void nbp_vlan_tunnel_info_flush(struct net_bridge_port *port);
|
|
void vlan_tunnel_info_del(struct net_bridge_vlan_group *vg,
|
|
struct net_bridge_vlan *vlan);
|
|
int br_handle_ingress_vlan_tunnel(struct sk_buff *skb,
|
|
struct net_bridge_port *p,
|
|
struct net_bridge_vlan_group *vg);
|
|
int br_handle_egress_vlan_tunnel(struct sk_buff *skb,
|
|
struct net_bridge_vlan *vlan);
|
|
#else
|
|
static inline int vlan_tunnel_init(struct net_bridge_vlan_group *vg)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline int nbp_vlan_tunnel_info_delete(struct net_bridge_port *port,
|
|
u16 vid)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline int nbp_vlan_tunnel_info_add(struct net_bridge_port *port,
|
|
u16 vid, u32 tun_id)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline void nbp_vlan_tunnel_info_flush(struct net_bridge_port *port)
|
|
{
|
|
}
|
|
|
|
static inline void vlan_tunnel_info_del(struct net_bridge_vlan_group *vg,
|
|
struct net_bridge_vlan *vlan)
|
|
{
|
|
}
|
|
|
|
static inline int br_handle_ingress_vlan_tunnel(struct sk_buff *skb,
|
|
struct net_bridge_port *p,
|
|
struct net_bridge_vlan_group *vg)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif
|
|
|
|
#endif
|