diff options
author | Linus Lüssing <linus.luessing@web.de> | 2014-06-07 20:26:28 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-11 10:50:47 +0400 |
commit | 07f8ac4a1e26e8283542cdaf658a6e2a12fd6980 (patch) | |
tree | 767bc394b56374b576feb4da5ff38808428c0857 /include/linux/if_bridge.h | |
parent | dc4eb53a996a78bfb8ea07b47423ff5a3aadc362 (diff) | |
download | linux-07f8ac4a1e26e8283542cdaf658a6e2a12fd6980.tar.xz |
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/linux/if_bridge.h')
-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 @@ #include <linux/netdevice.h> #include <uapi/linux/if_bridge.h> +struct br_ip { + union { + __be32 ip4; +#if IS_ENABLED(CONFIG_IPV6) + struct in6_addr ip6; +#endif + } u; + __be16 proto; + __u16 vid; +}; + +struct br_ip_list { + struct list_head list; + struct br_ip addr; +}; + extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); typedef int br_should_route_hook_t(struct sk_buff *skb); extern br_should_route_hook_t __rcu *br_should_route_hook; +int br_multicast_list_adjacent(struct net_device *dev, + struct list_head *br_ip_list); #endif |