summaryrefslogtreecommitdiff
path: root/net/8021q/vlan.h
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-07-06 08:26:57 +0400
committerDavid S. Miller <davem@davemloft.net>2008-07-06 08:26:57 +0400
commit70c03b49b80ba3634958acc31853771019c0ebd3 (patch)
tree097861a5da46fc10696c97f21720c1e5053b322f /net/8021q/vlan.h
parentce305002e1c9b90c2c151ce18bab0b895dd55ae6 (diff)
downloadlinux-70c03b49b80ba3634958acc31853771019c0ebd3.tar.xz
vlan: Add GVRP support
Add GVRP support for dynamically registering VLANs with switches. By default GVRP is disabled because we only support the applicant-only participant model, which means it should not be enabled on vlans that are members of a bridge. Since there is currently no way to cleanly determine that, the user is responsible for enabling it. The code is pretty small and low impact, its wrapped in a config option though because it depends on the GARP implementation and the STP core. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q/vlan.h')
-rw-r--r--net/8021q/vlan.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/8021q/vlan.h b/net/8021q/vlan.h
index 639e2544a804..097b2e04c928 100644
--- a/net/8021q/vlan.h
+++ b/net/8021q/vlan.h
@@ -37,6 +37,22 @@ void vlan_setup(struct net_device *dev);
int register_vlan_dev(struct net_device *dev);
void unregister_vlan_dev(struct net_device *dev);
+#ifdef CONFIG_VLAN_8021Q_GVRP
+extern int vlan_gvrp_request_join(const struct net_device *dev);
+extern void vlan_gvrp_request_leave(const struct net_device *dev);
+extern int vlan_gvrp_init_applicant(struct net_device *dev);
+extern void vlan_gvrp_uninit_applicant(struct net_device *dev);
+extern int vlan_gvrp_init(void);
+extern void vlan_gvrp_uninit(void);
+#else
+static inline int vlan_gvrp_request_join(const struct net_device *dev) { return 0; }
+static inline void vlan_gvrp_request_leave(const struct net_device *dev) {}
+static inline int vlan_gvrp_init_applicant(struct net_device *dev) { return 0; }
+static inline void vlan_gvrp_uninit_applicant(struct net_device *dev) {}
+static inline int vlan_gvrp_init(void) { return 0; }
+static inline void vlan_gvrp_uninit(void) {}
+#endif
+
int vlan_netlink_init(void);
void vlan_netlink_fini(void);