diff options
author | Linus Lüssing <linus.luessing@web.de> | 2014-06-07 12:26:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-11 02:50:47 -0400 |
commit | 07f8ac4a1e26e8283542cdaf658a6e2a12fd6980 (patch) | |
tree | 767bc394b56374b576feb4da5ff38808428c0857 /include | |
parent | dc4eb53a996a78bfb8ea07b47423ff5a3aadc362 (diff) |
bridge: add export of multicast database adjacent to net_dev
With this new, exported function br_multicast_list_adjacent(net_dev) a
list of IPv4/6 addresses is returned. This list contains all multicast
addresses sensed by the bridge multicast snooping feature on all bridge
ports of the bridge interface of net_dev, excluding addresses from the
specified net_device itself.
Adding bridge support to the batman-adv multicast optimization requires
batman-adv knowing about the existence of bridged-in multicast
listeners to be able to reliably serve them with multicast packets.
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/if_bridge.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index 1085ffeef956..44d6eb0eb852 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h | |||
@@ -16,9 +16,27 @@ | |||
16 | #include <linux/netdevice.h> | 16 | #include <linux/netdevice.h> |
17 | #include <uapi/linux/if_bridge.h> | 17 | #include <uapi/linux/if_bridge.h> |
18 | 18 | ||
19 | struct br_ip { | ||
20 | union { | ||
21 | __be32 ip4; | ||
22 | #if IS_ENABLED(CONFIG_IPV6) | ||
23 | struct in6_addr ip6; | ||
24 | #endif | ||
25 | } u; | ||
26 | __be16 proto; | ||
27 | __u16 vid; | ||
28 | }; | ||
29 | |||
30 | struct br_ip_list { | ||
31 | struct list_head list; | ||
32 | struct br_ip addr; | ||
33 | }; | ||
34 | |||
19 | extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); | 35 | extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); |
20 | 36 | ||
21 | typedef int br_should_route_hook_t(struct sk_buff *skb); | 37 | typedef int br_should_route_hook_t(struct sk_buff *skb); |
22 | extern br_should_route_hook_t __rcu *br_should_route_hook; | 38 | extern br_should_route_hook_t __rcu *br_should_route_hook; |
39 | int br_multicast_list_adjacent(struct net_device *dev, | ||
40 | struct list_head *br_ip_list); | ||
23 | 41 | ||
24 | #endif | 42 | #endif |