Merge branches 'pm-cpufreq-fixes' and 'pm-cpuidle-fixes'
[linux/fpc-iii.git] / net / bridge / br_private_tunnel.h
blob4a447a378ab3719b5dae18c5a90d51cb04972fac
1 /*
2 * Bridge per vlan tunnels
4 * Authors:
5 * Roopa Prabhu <roopa@cumulusnetworks.com>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
13 #ifndef _BR_PRIVATE_TUNNEL_H
14 #define _BR_PRIVATE_TUNNEL_H
16 struct vtunnel_info {
17 u32 tunid;
18 u16 vid;
19 u16 flags;
22 /* br_netlink_tunnel.c */
23 int br_parse_vlan_tunnel_info(struct nlattr *attr,
24 struct vtunnel_info *tinfo);
25 int br_process_vlan_tunnel_info(struct net_bridge *br,
26 struct net_bridge_port *p,
27 int cmd,
28 struct vtunnel_info *tinfo_curr,
29 struct vtunnel_info *tinfo_last);
30 int br_get_vlan_tunnel_info_size(struct net_bridge_vlan_group *vg);
31 int br_fill_vlan_tunnel_info(struct sk_buff *skb,
32 struct net_bridge_vlan_group *vg);
34 #ifdef CONFIG_BRIDGE_VLAN_FILTERING
35 /* br_vlan_tunnel.c */
36 int vlan_tunnel_init(struct net_bridge_vlan_group *vg);
37 void vlan_tunnel_deinit(struct net_bridge_vlan_group *vg);
38 int nbp_vlan_tunnel_info_delete(struct net_bridge_port *port, u16 vid);
39 int nbp_vlan_tunnel_info_add(struct net_bridge_port *port, u16 vid, u32 tun_id);
40 void nbp_vlan_tunnel_info_flush(struct net_bridge_port *port);
41 void vlan_tunnel_info_del(struct net_bridge_vlan_group *vg,
42 struct net_bridge_vlan *vlan);
43 int br_handle_ingress_vlan_tunnel(struct sk_buff *skb,
44 struct net_bridge_port *p,
45 struct net_bridge_vlan_group *vg);
46 int br_handle_egress_vlan_tunnel(struct sk_buff *skb,
47 struct net_bridge_vlan *vlan);
48 #else
49 static inline int vlan_tunnel_init(struct net_bridge_vlan_group *vg)
51 return 0;
54 static inline int nbp_vlan_tunnel_info_delete(struct net_bridge_port *port,
55 u16 vid)
57 return 0;
60 static inline int nbp_vlan_tunnel_info_add(struct net_bridge_port *port,
61 u16 vid, u32 tun_id)
63 return 0;
66 static inline void nbp_vlan_tunnel_info_flush(struct net_bridge_port *port)
70 static inline void vlan_tunnel_info_del(struct net_bridge_vlan_group *vg,
71 struct net_bridge_vlan *vlan)
75 static inline int br_handle_ingress_vlan_tunnel(struct sk_buff *skb,
76 struct net_bridge_port *p,
77 struct net_bridge_vlan_group *vg)
79 return 0;
81 #endif
83 #endif