diff options
author | wenxu <wenxu@ucloud.cn> | 2019-07-05 09:16:36 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-07-05 15:34:50 -0400 |
commit | 31aed46fedbba65abece57e14d24f00b52389c4f (patch) | |
tree | 4ad82439952051cb67d222787c1f0347188fab4d /include/linux/if_bridge.h | |
parent | c54c7c685494fc0f1662091d4d0c4fc26e810471 (diff) |
bridge: add br_vlan_get_proto()
This new function allows you to fetch the bridge port vlan protocol.
Signed-off-by: wenxu <wenxu@ucloud.cn>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/linux/if_bridge.h')
-rw-r--r-- | include/linux/if_bridge.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index 950db1dad830..9e57c4411734 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h | |||
@@ -89,6 +89,7 @@ static inline bool br_multicast_router(const struct net_device *dev) | |||
89 | bool br_vlan_enabled(const struct net_device *dev); | 89 | bool br_vlan_enabled(const struct net_device *dev); |
90 | int br_vlan_get_pvid(const struct net_device *dev, u16 *p_pvid); | 90 | int br_vlan_get_pvid(const struct net_device *dev, u16 *p_pvid); |
91 | int br_vlan_get_pvid_rcu(const struct net_device *dev, u16 *p_pvid); | 91 | int br_vlan_get_pvid_rcu(const struct net_device *dev, u16 *p_pvid); |
92 | int br_vlan_get_proto(const struct net_device *dev, u16 *p_proto); | ||
92 | int br_vlan_get_info(const struct net_device *dev, u16 vid, | 93 | int br_vlan_get_info(const struct net_device *dev, u16 vid, |
93 | struct bridge_vlan_info *p_vinfo); | 94 | struct bridge_vlan_info *p_vinfo); |
94 | #else | 95 | #else |
@@ -102,6 +103,11 @@ static inline int br_vlan_get_pvid(const struct net_device *dev, u16 *p_pvid) | |||
102 | return -EINVAL; | 103 | return -EINVAL; |
103 | } | 104 | } |
104 | 105 | ||
106 | static inline int br_vlan_get_proto(const struct net_device *dev, u16 *p_proto) | ||
107 | { | ||
108 | return -EINVAL; | ||
109 | } | ||
110 | |||
105 | static inline int br_vlan_get_pvid_rcu(const struct net_device *dev, u16 *p_pvid) | 111 | static inline int br_vlan_get_pvid_rcu(const struct net_device *dev, u16 *p_pvid) |
106 | { | 112 | { |
107 | return -EINVAL; | 113 | return -EINVAL; |