#include <linux/err.h>
#include <linux/igmp.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>
#include <linux/rculist.h>
#include <linux/skbuff.h>
#include <linux/if_ether.h>
#include <net/ip.h>
#include <net/netlink.h>
#include <net/switchdev.h>
#if IS_ENABLED(CONFIG_IPV6)
#include <net/ipv6.h>
#include <net/addrconf.h>
#endif
#include "br_private.h"
static bool
br_ip4_rports_get_timer(struct net_bridge_mcast_port *pmctx,
unsigned long *timer)
{ … }
static bool
br_ip6_rports_get_timer(struct net_bridge_mcast_port *pmctx,
unsigned long *timer)
{ … }
static size_t __br_rports_one_size(void)
{ … }
size_t br_rports_size(const struct net_bridge_mcast *brmctx)
{ … }
int br_rports_fill_info(struct sk_buff *skb,
const struct net_bridge_mcast *brmctx)
{ … }
static void __mdb_entry_fill_flags(struct br_mdb_entry *e, unsigned char flags)
{ … }
static void __mdb_entry_to_br_ip(struct br_mdb_entry *entry, struct br_ip *ip,
struct nlattr **mdb_attrs)
{ … }
static int __mdb_fill_srcs(struct sk_buff *skb,
struct net_bridge_port_group *p)
{ … }
static int __mdb_fill_info(struct sk_buff *skb,
struct net_bridge_mdb_entry *mp,
struct net_bridge_port_group *p)
{ … }
static int br_mdb_fill_info(struct sk_buff *skb, struct netlink_callback *cb,
struct net_device *dev)
{ … }
int br_mdb_dump(struct net_device *dev, struct sk_buff *skb,
struct netlink_callback *cb)
{ … }
static int nlmsg_populate_mdb_fill(struct sk_buff *skb,
struct net_device *dev,
struct net_bridge_mdb_entry *mp,
struct net_bridge_port_group *pg,
int type)
{ … }
static size_t rtnl_mdb_nlmsg_pg_size(const struct net_bridge_port_group *pg)
{ … }
static size_t rtnl_mdb_nlmsg_size(const struct net_bridge_port_group *pg)
{ … }
void br_mdb_notify(struct net_device *dev,
struct net_bridge_mdb_entry *mp,
struct net_bridge_port_group *pg,
int type)
{ … }
static int nlmsg_populate_rtr_fill(struct sk_buff *skb,
struct net_device *dev,
int ifindex, u16 vid, u32 pid,
u32 seq, int type, unsigned int flags)
{ … }
static inline size_t rtnl_rtr_nlmsg_size(void)
{ … }
void br_rtr_notify(struct net_device *dev, struct net_bridge_mcast_port *pmctx,
int type)
{ … }
static const struct nla_policy
br_mdbe_src_list_entry_pol[MDBE_SRCATTR_MAX + 1] = …;
static const struct nla_policy
br_mdbe_src_list_pol[MDBE_SRC_LIST_MAX + 1] = …;
static const struct nla_policy br_mdbe_attrs_pol[MDBE_ATTR_MAX + 1] = …;
static bool is_valid_mdb_source(struct nlattr *attr, __be16 proto,
struct netlink_ext_ack *extack)
{ … }
static struct net_bridge_mcast *
__br_mdb_choose_context(struct net_bridge *br,
const struct br_mdb_entry *entry,
struct netlink_ext_ack *extack)
{ … }
static int br_mdb_replace_group_sg(const struct br_mdb_config *cfg,
struct net_bridge_mdb_entry *mp,
struct net_bridge_port_group *pg,
struct net_bridge_mcast *brmctx,
unsigned char flags)
{ … }
static int br_mdb_add_group_sg(const struct br_mdb_config *cfg,
struct net_bridge_mdb_entry *mp,
struct net_bridge_mcast *brmctx,
unsigned char flags,
struct netlink_ext_ack *extack)
{ … }
static int br_mdb_add_group_src_fwd(const struct br_mdb_config *cfg,
struct br_ip *src_ip,
struct net_bridge_mcast *brmctx,
struct netlink_ext_ack *extack)
{ … }
static int br_mdb_add_group_src(const struct br_mdb_config *cfg,
struct net_bridge_port_group *pg,
struct net_bridge_mcast *brmctx,
struct br_mdb_src_entry *src,
struct netlink_ext_ack *extack)
{ … }
static void br_mdb_del_group_src(struct net_bridge_port_group *pg,
struct br_mdb_src_entry *src)
{ … }
static int br_mdb_add_group_srcs(const struct br_mdb_config *cfg,
struct net_bridge_port_group *pg,
struct net_bridge_mcast *brmctx,
struct netlink_ext_ack *extack)
{ … }
static int br_mdb_replace_group_srcs(const struct br_mdb_config *cfg,
struct net_bridge_port_group *pg,
struct net_bridge_mcast *brmctx,
struct netlink_ext_ack *extack)
{ … }
static int br_mdb_replace_group_star_g(const struct br_mdb_config *cfg,
struct net_bridge_mdb_entry *mp,
struct net_bridge_port_group *pg,
struct net_bridge_mcast *brmctx,
unsigned char flags,
struct netlink_ext_ack *extack)
{ … }
static int br_mdb_add_group_star_g(const struct br_mdb_config *cfg,
struct net_bridge_mdb_entry *mp,
struct net_bridge_mcast *brmctx,
unsigned char flags,
struct netlink_ext_ack *extack)
{ … }
static int br_mdb_add_group(const struct br_mdb_config *cfg,
struct netlink_ext_ack *extack)
{ … }
static int __br_mdb_add(const struct br_mdb_config *cfg,
struct netlink_ext_ack *extack)
{ … }
static int br_mdb_config_src_entry_init(struct nlattr *src_entry,
struct br_mdb_src_entry *src,
__be16 proto,
struct netlink_ext_ack *extack)
{ … }
static int br_mdb_config_src_list_init(struct nlattr *src_list,
struct br_mdb_config *cfg,
struct netlink_ext_ack *extack)
{ … }
static void br_mdb_config_src_list_fini(struct br_mdb_config *cfg)
{ … }
static int br_mdb_config_attrs_init(struct nlattr *set_attrs,
struct br_mdb_config *cfg,
struct netlink_ext_ack *extack)
{ … }
static int br_mdb_config_init(struct br_mdb_config *cfg, struct net_device *dev,
struct nlattr *tb[], u16 nlmsg_flags,
struct netlink_ext_ack *extack)
{ … }
static void br_mdb_config_fini(struct br_mdb_config *cfg)
{ … }
int br_mdb_add(struct net_device *dev, struct nlattr *tb[], u16 nlmsg_flags,
struct netlink_ext_ack *extack)
{ … }
static int __br_mdb_del(const struct br_mdb_config *cfg)
{ … }
int br_mdb_del(struct net_device *dev, struct nlattr *tb[],
struct netlink_ext_ack *extack)
{ … }
struct br_mdb_flush_desc { … };
static const struct nla_policy br_mdbe_attrs_del_bulk_pol[MDBE_ATTR_MAX + 1] = …;
static int br_mdb_flush_desc_init(struct br_mdb_flush_desc *desc,
struct nlattr *tb[],
struct netlink_ext_ack *extack)
{ … }
static void br_mdb_flush_host(struct net_bridge *br,
struct net_bridge_mdb_entry *mp,
const struct br_mdb_flush_desc *desc)
{ … }
static void br_mdb_flush_pgs(struct net_bridge *br,
struct net_bridge_mdb_entry *mp,
const struct br_mdb_flush_desc *desc)
{ … }
static void br_mdb_flush(struct net_bridge *br,
const struct br_mdb_flush_desc *desc)
{ … }
int br_mdb_del_bulk(struct net_device *dev, struct nlattr *tb[],
struct netlink_ext_ack *extack)
{ … }
static const struct nla_policy br_mdbe_attrs_get_pol[MDBE_ATTR_MAX + 1] = …;
static int br_mdb_get_parse(struct net_device *dev, struct nlattr *tb[],
struct br_ip *group, struct netlink_ext_ack *extack)
{ … }
static struct sk_buff *
br_mdb_get_reply_alloc(const struct net_bridge_mdb_entry *mp)
{ … }
static int br_mdb_get_reply_fill(struct sk_buff *skb,
struct net_bridge_mdb_entry *mp, u32 portid,
u32 seq)
{ … }
int br_mdb_get(struct net_device *dev, struct nlattr *tb[], u32 portid, u32 seq,
struct netlink_ext_ack *extack)
{ … }