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.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -144,7 +144,10 @@ struct bridge_vlan_info { · 143 unmodified lines | ||
| 144 | 144 | * } |
| 145 | 145 | * } |
| 146 | 146 | * [MDBA_ROUTER] = { |
| 147 | − * [MDBA_ROUTER_PORT] | |
| 147 | + * [MDBA_ROUTER_PORT] = { | |
| 148 | + * u32 ifindex | |
| 149 | + * [MDBA_ROUTER_PATTR attributes] | |
| 150 | + * } | |
| 148 | 151 | * } |
| 149 | 152 | */ |
| 150 | 153 | enum { |
| @@ -192,6 +195,15 @@ enum { · 41 unmodified lines | ||
| 192 | 195 | }; |
| 193 | 196 | #define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1) |
| 194 | 197 | |
| 198 | +/* router port attributes */ | |
| 199 | +enum { | |
| 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 | + | |
| 195 | 207 | struct br_port_msg { |
| 196 | 208 | __u8 family; |
| 197 | 209 | __u32 ifindex; |