History

bridge: export multicast database via netlink

V5: fix two bugs pointed out by Thomas remove seq check for now, mark it as TODO V4: remove some useless #include some coding style fix V3: drop debugging printk's update selinux perm table as well V2: drop patch 1/2, export ifindex directly Redesign netlink attributes Improve netlink seq check Handle IPv6 addr as well This patch exports bridge multicast database via netlink message type RTM_GETMDB. Similar to fdb, but currently bridge-specific. We may need to support modify multicast database too (RTM_{ADD,DEL}MDB). (Thanks to Thomas for patient reviews)

Cong Wang committed 13 years ago

Commit ee07c6e1 parent 5d248c47 files · +225 −1Browse files

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

Unified · Split

2 files
  1. include/uapi/linux/if_bridge.h +55 −0
  2. include/uapi/linux/rtnetlink.h +3 −0
include/uapi/linux/if_bridge.h+55−0
@@ -116,4 +116,59 @@ enum { · 115 unmodified lines
116 __IFLA_BRIDGE_MAX,116 __IFLA_BRIDGE_MAX,
117};117};
118#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)118#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
119
120/* Bridge multicast database attributes
121 * [MDBA_MDB] = {
122 * [MDBA_MDB_ENTRY] = {
123 * [MDBA_MDB_ENTRY_INFO]
124 * }
125 * }
126 * [MDBA_ROUTER] = {
127 * [MDBA_ROUTER_PORT]
128 * }
129 */
130enum {
131 MDBA_UNSPEC,
132 MDBA_MDB,
133 MDBA_ROUTER,
134 __MDBA_MAX,
135};
136#define MDBA_MAX (__MDBA_MAX - 1)
137
138enum {
139 MDBA_MDB_UNSPEC,
140 MDBA_MDB_ENTRY,
141 __MDBA_MDB_MAX,
142};
143#define MDBA_MDB_MAX (__MDBA_MDB_MAX - 1)
144
145enum {
146 MDBA_MDB_ENTRY_UNSPEC,
147 MDBA_MDB_ENTRY_INFO,
148 __MDBA_MDB_ENTRY_MAX,
149};
150#define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1)
151
152enum {
153 MDBA_ROUTER_UNSPEC,
154 MDBA_ROUTER_PORT,
155 __MDBA_ROUTER_MAX,
156};
157#define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)
158
159struct br_port_msg {
160 __u32 ifindex;
161};
162
163struct br_mdb_entry {
164 __u32 ifindex;
165 struct {
166 union {
167 __be32 ip4;
168 struct in6_addr ip6;
169 } u;
170 __be16 proto;
171 } addr;
172};
173
119#endif /* _UAPI_LINUX_IF_BRIDGE_H */174#endif /* _UAPI_LINUX_IF_BRIDGE_H */
include/uapi/linux/rtnetlink.h+3−0
@@ -125,6 +125,9 @@ enum { · 124 unmodified lines
125 RTM_GETNETCONF = 82,125 RTM_GETNETCONF = 82,
126#define RTM_GETNETCONF RTM_GETNETCONF126#define RTM_GETNETCONF RTM_GETNETCONF
127 127
128 RTM_GETMDB = 86,
129#define RTM_GETMDB RTM_GETMDB
130
128 __RTM_MAX,131 __RTM_MAX,
129#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)132#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
130};133};

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