diff options
author | Patrick McHardy <kaber@trash.net> | 2008-07-06 00:26:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-06 00:26:57 -0400 |
commit | 70c03b49b80ba3634958acc31853771019c0ebd3 (patch) | |
tree | 097861a5da46fc10696c97f21720c1e5053b322f /net/8021q/vlan.h | |
parent | ce305002e1c9b90c2c151ce18bab0b895dd55ae6 (diff) |
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.h | 16 |
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); | |||
37 | int register_vlan_dev(struct net_device *dev); | 37 | int register_vlan_dev(struct net_device *dev); |
38 | void unregister_vlan_dev(struct net_device *dev); | 38 | void unregister_vlan_dev(struct net_device *dev); |
39 | 39 | ||
40 | #ifdef CONFIG_VLAN_8021Q_GVRP | ||
41 | extern int vlan_gvrp_request_join(const struct net_device *dev); | ||
42 | extern void vlan_gvrp_request_leave(const struct net_device *dev); | ||
43 | extern int vlan_gvrp_init_applicant(struct net_device *dev); | ||
44 | extern void vlan_gvrp_uninit_applicant(struct net_device *dev); | ||
45 | extern int vlan_gvrp_init(void); | ||
46 | extern void vlan_gvrp_uninit(void); | ||
47 | #else | ||
48 | static inline int vlan_gvrp_request_join(const struct net_device *dev) { return 0; } | ||
49 | static inline void vlan_gvrp_request_leave(const struct net_device *dev) {} | ||
50 | static inline int vlan_gvrp_init_applicant(struct net_device *dev) { return 0; } | ||
51 | static inline void vlan_gvrp_uninit_applicant(struct net_device *dev) {} | ||
52 | static inline int vlan_gvrp_init(void) { return 0; } | ||
53 | static inline void vlan_gvrp_uninit(void) {} | ||
54 | #endif | ||
55 | |||
40 | int vlan_netlink_init(void); | 56 | int vlan_netlink_init(void); |
41 | void vlan_netlink_fini(void); | 57 | void vlan_netlink_fini(void); |
42 | 58 | ||