Add new configuratin CONFIG_NET_MCASTGROUP. This option is selected automatically if either CONFIG_NET_IGMP or CONFIG_NET_MLD are selected. Most conditional logic based on CONFIG_NET_IGMP replaced with conditioning on CONFIG_NET_MCASTGROUP.

This commit is contained in:
Gregory Nutt
2018-10-31 15:03:51 -06:00
parent dde1e89b8c
commit 6d93658ff8
56 changed files with 239 additions and 220 deletions
+3
View File
@@ -123,6 +123,9 @@ extern "C"
****************************************************************************/
#ifdef CONFIG_NET_ARP
struct net_driver_s; /* Forward reference */
/****************************************************************************
* Name: arp_ipin
*
+1 -1
View File
@@ -224,7 +224,7 @@ struct mld_mcast_addrec_v2_s
{
uint8_t rectype; /* Record type. See definitions above. */
uint8_t auxdatlen; /* Auxiliary data length */
uin16_t nsources; /* Number of sources */
uint16_t nsources; /* Number of sources */
net_ipv6addr_t mcast; /* 128-bit IPv6 multicast address */
net_ipv6addr_t srcaddr[1]; /* Array of source IPv6 address (actual size is
* nsources) */
+7 -3
View File
@@ -63,6 +63,10 @@
# include <nuttx/net/igmp.h>
#endif
#ifdef CONFIG_NET_MLD
# include <nuttx/net/mld.h>
#endif
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@@ -336,8 +340,8 @@ struct net_driver_s
uint16_t d_sndlen;
#ifdef CONFIG_NET_IGMP
/* IGMP group list */
#ifdef CONFIG_NET_MCASTGROUP
/* IGMP/MLD group list */
sq_queue_t grplist;
#endif
@@ -380,7 +384,7 @@ struct net_driver_s
int (*d_ifup)(FAR struct net_driver_s *dev);
int (*d_ifdown)(FAR struct net_driver_s *dev);
int (*d_txavail)(FAR struct net_driver_s *dev);
#ifdef CONFIG_NET_IGMP
#ifdef CONFIG_NET_MCASTGROUP
int (*d_addmac)(FAR struct net_driver_s *dev, FAR const uint8_t *mac);
int (*d_rmmac)(FAR struct net_driver_s *dev, FAR const uint8_t *mac);
#endif