Add new netlink attributes to the RTM_NEWMDB request that allow user space to add (*, G) with a source list and filter mode. The RTM_NEWMDB message can already dump such entries (created by the kernel) so there is no need to add dump support. However, the message contains a different set of attributes depending if it is a request or a response. The naming and structure of the new attributes try to follow the existing ones used in the response. Request: [ struct nlmsghdr ] [ struct br_port_msg ] [ MDBA_SET_ENTRY ] struct br_mdb_entry [ MDBA_SET_ENTRY_ATTRS ] [ MDBE_ATTR_SOURCE ] struct in_addr / struct in6_addr [ MDBE_ATTR_SRC_LIST ] // new [ MDBE_SRC_LIST_ENTRY ] [ MDBE_SRCATTR_ADDRESS ] struct in_addr / struct in6_addr [ ...] [ MDBE_ATTR_GROUP_MODE ] // new u8 Response: [ struct nlmsghdr ] [ struct br_port_msg ] [ MDBA_MDB ] [ MDBA_MDB_ENTRY ] [ MDBA_MDB_ENTRY_INFO ] struct br_mdb_entry [ MDBA_MDB_EATTR_TIMER ] u32 [ MDBA_MDB_EATTR_SOURCE ] struct in_addr / struct in6_addr [ MDBA_MDB_EATTR_RTPROT ] u8 [ MDBA_MDB_EATTR_SRC_LIST ] [ MDBA_MDB_SRCLIST_ENTRY ] [ MDBA_MDB_SRCATTR_ADDRESS ] struct in_addr / struct in6_addr [ MDBA_MDB_SRCATTR_TIMER ] u8 [...] [ MDBA_MDB_EATTR_GROUP_MODE ] u8
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -723,10 +723,30 @@ enum { · 722 unmodified lines | |||
| 723 | enum { | 723 | enum { |
| 724 | MDBE_ATTR_UNSPEC, | 724 | MDBE_ATTR_UNSPEC, |
| 725 | MDBE_ATTR_SOURCE, | 725 | MDBE_ATTR_SOURCE, |
| 726 | MDBE_ATTR_SRC_LIST, | ||
| 727 | MDBE_ATTR_GROUP_MODE, | ||
| 726 | __MDBE_ATTR_MAX, | 728 | __MDBE_ATTR_MAX, |
| 727 | }; | 729 | }; |
| 728 | #define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1) | 730 | #define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1) |
| 729 | 731 | ||
| 732 | /* per mdb entry source */ | ||
| 733 | enum { | ||
| 734 | MDBE_SRC_LIST_UNSPEC, | ||
| 735 | MDBE_SRC_LIST_ENTRY, | ||
| 736 | __MDBE_SRC_LIST_MAX, | ||
| 737 | }; | ||
| 738 | #define MDBE_SRC_LIST_MAX (__MDBE_SRC_LIST_MAX - 1) | ||
| 739 | |||
| 740 | /* per mdb entry per source attributes | ||
| 741 | * these are embedded in MDBE_SRC_LIST_ENTRY | ||
| 742 | */ | ||
| 743 | enum { | ||
| 744 | MDBE_SRCATTR_UNSPEC, | ||
| 745 | MDBE_SRCATTR_ADDRESS, | ||
| 746 | __MDBE_SRCATTR_MAX, | ||
| 747 | }; | ||
| 748 | #define MDBE_SRCATTR_MAX (__MDBE_SRCATTR_MAX - 1) | ||
| 749 | |||
| 730 | /* Embedded inside LINK_XSTATS_TYPE_BRIDGE */ | 750 | /* Embedded inside LINK_XSTATS_TYPE_BRIDGE */ |
| 731 | enum { | 751 | enum { |
| 732 | BRIDGE_XSTATS_UNSPEC, | 752 | BRIDGE_XSTATS_UNSPEC, |