History

bridge: mcast: add support for more router port information dumping

Allow for more multicast router port information to be dumped such as timer and type attributes. For that that purpose we need to extend the MDBA_ROUTER_PORT attribute similar to how it was done for the mdb entries recently. The new format is thus: [MDBA_ROUTER_PORT] = { <- nested attribute u32 ifindex <- router port ifindex for user-space compatibility [MDBA_ROUTER_PATTR attributes] } This way it remains compatible with older users (they'll simply retrieve the u32 in the beginning) and new users can parse the remaining attributes. It would also allow to add future extensions to the router port without breaking compatibility.

Nikolay Aleksandrov committed 10 years ago

Commit 59f78f91 parent a55d8242 files · +27 −3Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/if_bridge.h+13−1
@@ -144,7 +144,10 @@ struct bridge_vlan_info { · 143 unmodified lines
144 * }144 * }
145 * }145 * }
146 * [MDBA_ROUTER] = {146 * [MDBA_ROUTER] = {
147 * [MDBA_ROUTER_PORT]147 * [MDBA_ROUTER_PORT] = {
148 * u32 ifindex
149 * [MDBA_ROUTER_PATTR attributes]
150 * }
148 * }151 * }
149 */152 */
150enum {153enum {
@@ -192,6 +195,15 @@ enum { · 41 unmodified lines
192};195};
193#define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)196#define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)
194 197
198/* router port attributes */
199enum {
200 MDBA_ROUTER_PATTR_UNSPEC,
201 MDBA_ROUTER_PATTR_TIMER,
202 MDBA_ROUTER_PATTR_TYPE,
203 __MDBA_ROUTER_PATTR_MAX
204};
205#define MDBA_ROUTER_PATTR_MAX (__MDBA_ROUTER_PATTR_MAX - 1)
206
195struct br_port_msg {207struct br_port_msg {
196 __u8 family;208 __u8 family;
197 __u32 ifindex;209 __u32 ifindex;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t