diff options
author | Vlad Yasevich <vyasevic@redhat.com> | 2013-02-13 07:00:12 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-13 19:41:46 -0500 |
commit | 407af3299ef1ac7e87ce3fb530e32a009d1a9efd (patch) | |
tree | 9572e0b02eb9f6c2952b490f3a79f4b790fcea3c /include | |
parent | 85f46c6baef1486ce20e13dd7cdea5dd15be2a90 (diff) |
bridge: Add netlink interface to configure vlans on bridge ports
Add a netlink interface to add and remove vlan configuration on bridge port.
The interface uses the RTM_SETLINK message and encodes the vlan
configuration inside the IFLA_AF_SPEC. It is possble to include multiple
vlans to either add or remove in a single message.
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 2 | ||||
-rw-r--r-- | include/uapi/linux/if_bridge.h | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 25bd46f52877..1b90f9401000 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1020,6 +1020,8 @@ struct net_device_ops { | |||
1020 | int (*ndo_bridge_getlink)(struct sk_buff *skb, | 1020 | int (*ndo_bridge_getlink)(struct sk_buff *skb, |
1021 | u32 pid, u32 seq, | 1021 | u32 pid, u32 seq, |
1022 | struct net_device *dev); | 1022 | struct net_device *dev); |
1023 | int (*ndo_bridge_dellink)(struct net_device *dev, | ||
1024 | struct nlmsghdr *nlh); | ||
1023 | int (*ndo_change_carrier)(struct net_device *dev, | 1025 | int (*ndo_change_carrier)(struct net_device *dev, |
1024 | bool new_carrier); | 1026 | bool new_carrier); |
1025 | }; | 1027 | }; |
diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h index 5db297514aec..3ca9817ca7e8 100644 --- a/include/uapi/linux/if_bridge.h +++ b/include/uapi/linux/if_bridge.h | |||
@@ -108,15 +108,24 @@ struct __fdb_entry { | |||
108 | * [IFLA_AF_SPEC] = { | 108 | * [IFLA_AF_SPEC] = { |
109 | * [IFLA_BRIDGE_FLAGS] | 109 | * [IFLA_BRIDGE_FLAGS] |
110 | * [IFLA_BRIDGE_MODE] | 110 | * [IFLA_BRIDGE_MODE] |
111 | * [IFLA_BRIDGE_VLAN_INFO] | ||
111 | * } | 112 | * } |
112 | */ | 113 | */ |
113 | enum { | 114 | enum { |
114 | IFLA_BRIDGE_FLAGS, | 115 | IFLA_BRIDGE_FLAGS, |
115 | IFLA_BRIDGE_MODE, | 116 | IFLA_BRIDGE_MODE, |
117 | IFLA_BRIDGE_VLAN_INFO, | ||
116 | __IFLA_BRIDGE_MAX, | 118 | __IFLA_BRIDGE_MAX, |
117 | }; | 119 | }; |
118 | #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1) | 120 | #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1) |
119 | 121 | ||
122 | #define BRIDGE_VLAN_INFO_MASTER (1<<0) /* Operate on Bridge device as well */ | ||
123 | |||
124 | struct bridge_vlan_info { | ||
125 | u16 flags; | ||
126 | u16 vid; | ||
127 | }; | ||
128 | |||
120 | /* Bridge multicast database attributes | 129 | /* Bridge multicast database attributes |
121 | * [MDBA_MDB] = { | 130 | * [MDBA_MDB] = { |
122 | * [MDBA_MDB_ENTRY] = { | 131 | * [MDBA_MDB_ENTRY] = { |