linux/net/bridge/br_multicast_eht.c

// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2020, Nikolay Aleksandrov <[email protected]>
#include <linux/err.h>
#include <linux/export.h>
#include <linux/if_ether.h>
#include <linux/igmp.h>
#include <linux/in.h>
#include <linux/jhash.h>
#include <linux/kernel.h>
#include <linux/log2.h>
#include <linux/netdevice.h>
#include <linux/netfilter_bridge.h>
#include <linux/random.h>
#include <linux/rculist.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/timer.h>
#include <linux/inetdevice.h>
#include <linux/mroute.h>
#include <net/ip.h>
#include <net/switchdev.h>
#if IS_ENABLED(CONFIG_IPV6)
#include <linux/icmpv6.h>
#include <net/ipv6.h>
#include <net/mld.h>
#include <net/ip6_checksum.h>
#include <net/addrconf.h>
#endif

#include "br_private.h"
#include "br_private_mcast_eht.h"

static bool br_multicast_del_eht_set_entry(struct net_bridge_port_group *pg,
					   union net_bridge_eht_addr *src_addr,
					   union net_bridge_eht_addr *h_addr);
static void br_multicast_create_eht_set_entry(const struct net_bridge_mcast *brmctx,
					      struct net_bridge_port_group *pg,
					      union net_bridge_eht_addr *src_addr,
					      union net_bridge_eht_addr *h_addr,
					      int filter_mode,
					      bool allow_zero_src);

static struct net_bridge_group_eht_host *
br_multicast_eht_host_lookup(struct net_bridge_port_group *pg,
			     union net_bridge_eht_addr *h_addr)
{}

static int br_multicast_eht_host_filter_mode(struct net_bridge_port_group *pg,
					     union net_bridge_eht_addr *h_addr)
{}

static struct net_bridge_group_eht_set_entry *
br_multicast_eht_set_entry_lookup(struct net_bridge_group_eht_set *eht_set,
				  union net_bridge_eht_addr *h_addr)
{}

static struct net_bridge_group_eht_set *
br_multicast_eht_set_lookup(struct net_bridge_port_group *pg,
			    union net_bridge_eht_addr *src_addr)
{}

static void __eht_destroy_host(struct net_bridge_group_eht_host *eht_host)
{}

static void br_multicast_destroy_eht_set_entry(struct net_bridge_mcast_gc *gc)
{}

static void br_multicast_destroy_eht_set(struct net_bridge_mcast_gc *gc)
{}

static void __eht_del_set_entry(struct net_bridge_group_eht_set_entry *set_h)
{}

static void br_multicast_del_eht_set(struct net_bridge_group_eht_set *eht_set)
{}

void br_multicast_eht_clean_sets(struct net_bridge_port_group *pg)
{}

static void br_multicast_eht_set_entry_expired(struct timer_list *t)
{}

static void br_multicast_eht_set_expired(struct timer_list *t)
{}

static struct net_bridge_group_eht_host *
__eht_lookup_create_host(struct net_bridge_port_group *pg,
			 union net_bridge_eht_addr *h_addr,
			 unsigned char filter_mode)
{}

static struct net_bridge_group_eht_set_entry *
__eht_lookup_create_set_entry(struct net_bridge *br,
			      struct net_bridge_group_eht_set *eht_set,
			      struct net_bridge_group_eht_host *eht_host,
			      bool allow_zero_src)
{}

static struct net_bridge_group_eht_set *
__eht_lookup_create_set(struct net_bridge_port_group *pg,
			union net_bridge_eht_addr *src_addr)
{}

static void br_multicast_ip_src_to_eht_addr(const struct br_ip *src,
					    union net_bridge_eht_addr *dest)
{}

static void br_eht_convert_host_filter_mode(const struct net_bridge_mcast *brmctx,
					    struct net_bridge_port_group *pg,
					    union net_bridge_eht_addr *h_addr,
					    int filter_mode)
{}

static void br_multicast_create_eht_set_entry(const struct net_bridge_mcast *brmctx,
					      struct net_bridge_port_group *pg,
					      union net_bridge_eht_addr *src_addr,
					      union net_bridge_eht_addr *h_addr,
					      int filter_mode,
					      bool allow_zero_src)
{}

static bool br_multicast_del_eht_set_entry(struct net_bridge_port_group *pg,
					   union net_bridge_eht_addr *src_addr,
					   union net_bridge_eht_addr *h_addr)
{}

static void br_multicast_del_eht_host(struct net_bridge_port_group *pg,
				      union net_bridge_eht_addr *h_addr)
{}

/* create new set entries from reports */
static void __eht_create_set_entries(const struct net_bridge_mcast *brmctx,
				     struct net_bridge_port_group *pg,
				     union net_bridge_eht_addr *h_addr,
				     void *srcs,
				     u32 nsrcs,
				     size_t addr_size,
				     int filter_mode)
{}

/* delete existing set entries and their (S,G) entries if they were the last */
static bool __eht_del_set_entries(struct net_bridge_port_group *pg,
				  union net_bridge_eht_addr *h_addr,
				  void *srcs,
				  u32 nsrcs,
				  size_t addr_size)
{}

static bool br_multicast_eht_allow(const struct net_bridge_mcast *brmctx,
				   struct net_bridge_port_group *pg,
				   union net_bridge_eht_addr *h_addr,
				   void *srcs,
				   u32 nsrcs,
				   size_t addr_size)
{}

static bool br_multicast_eht_block(const struct net_bridge_mcast *brmctx,
				   struct net_bridge_port_group *pg,
				   union net_bridge_eht_addr *h_addr,
				   void *srcs,
				   u32 nsrcs,
				   size_t addr_size)
{}

/* flush_entries is true when changing mode */
static bool __eht_inc_exc(const struct net_bridge_mcast *brmctx,
			  struct net_bridge_port_group *pg,
			  union net_bridge_eht_addr *h_addr,
			  void *srcs,
			  u32 nsrcs,
			  size_t addr_size,
			  unsigned char filter_mode,
			  bool to_report)
{}

static bool br_multicast_eht_inc(const struct net_bridge_mcast *brmctx,
				 struct net_bridge_port_group *pg,
				 union net_bridge_eht_addr *h_addr,
				 void *srcs,
				 u32 nsrcs,
				 size_t addr_size,
				 bool to_report)
{}

static bool br_multicast_eht_exc(const struct net_bridge_mcast *brmctx,
				 struct net_bridge_port_group *pg,
				 union net_bridge_eht_addr *h_addr,
				 void *srcs,
				 u32 nsrcs,
				 size_t addr_size,
				 bool to_report)
{}

static bool __eht_ip4_handle(const struct net_bridge_mcast *brmctx,
			     struct net_bridge_port_group *pg,
			     union net_bridge_eht_addr *h_addr,
			     void *srcs,
			     u32 nsrcs,
			     int grec_type)
{}

#if IS_ENABLED(CONFIG_IPV6)
static bool __eht_ip6_handle(const struct net_bridge_mcast *brmctx,
			     struct net_bridge_port_group *pg,
			     union net_bridge_eht_addr *h_addr,
			     void *srcs,
			     u32 nsrcs,
			     int grec_type)
{}
#endif

/* true means an entry was deleted */
bool br_multicast_eht_handle(const struct net_bridge_mcast *brmctx,
			     struct net_bridge_port_group *pg,
			     void *h_addr,
			     void *srcs,
			     u32 nsrcs,
			     size_t addr_size,
			     int grec_type)
{}

int br_multicast_eht_set_hosts_limit(struct net_bridge_port *p,
				     u32 eht_hosts_limit)
{}