mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
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:
@@ -174,7 +174,7 @@ static int lo_ifup(FAR struct net_driver_s *dev);
|
||||
static int lo_ifdown(FAR struct net_driver_s *dev);
|
||||
static void lo_txavail_work(FAR void *arg);
|
||||
static int lo_txavail(FAR struct net_driver_s *dev);
|
||||
#ifdef CONFIG_NET_IGMP
|
||||
#ifdef CONFIG_NET_MCASTGROUP
|
||||
static int lo_addmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac);
|
||||
static int lo_rmmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac);
|
||||
#endif
|
||||
@@ -722,7 +722,7 @@ static int lo_txavail(FAR struct net_driver_s *dev)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_IGMP
|
||||
#ifdef CONFIG_NET_MCASTGROUP
|
||||
static int lo_addmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac)
|
||||
{
|
||||
#ifdef CONFIG_NET_6LOWPAN_EXTENDEDADDR
|
||||
@@ -757,7 +757,7 @@ static int lo_addmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_IGMP
|
||||
#ifdef CONFIG_NET_MCASTGROUP
|
||||
static int lo_rmmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac)
|
||||
{
|
||||
#ifdef CONFIG_NET_6LOWPAN_EXTENDEDADDR
|
||||
@@ -1075,7 +1075,7 @@ int ieee8021514_loopback(void)
|
||||
dev->d_ifup = lo_ifup; /* I/F up (new IP address) callback */
|
||||
dev->d_ifdown = lo_ifdown; /* I/F down callback */
|
||||
dev->d_txavail = lo_txavail; /* New TX data callback */
|
||||
#ifdef CONFIG_NET_IGMP
|
||||
#ifdef CONFIG_NET_MCASTGROUP
|
||||
dev->d_addmac = lo_addmac; /* Add multicast MAC address */
|
||||
dev->d_rmmac = lo_rmmac; /* Remove multicast MAC address */
|
||||
#endif
|
||||
|
||||
@@ -211,7 +211,7 @@ static int macnet_ifdown(FAR struct net_driver_s *dev);
|
||||
static void macnet_txavail_work(FAR void *arg);
|
||||
static int macnet_txavail(FAR struct net_driver_s *dev);
|
||||
|
||||
#ifdef CONFIG_NET_IGMP
|
||||
#ifdef CONFIG_NET_MCASTGROUP
|
||||
static int macnet_addmac(FAR struct net_driver_s *dev,
|
||||
FAR const uint8_t *mac);
|
||||
static int macnet_rmmac(FAR struct net_driver_s *dev,
|
||||
@@ -960,7 +960,7 @@ static int macnet_txavail(FAR struct net_driver_s *dev)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_IGMP
|
||||
#ifdef CONFIG_NET_MCASTGROUP
|
||||
static int macnet_addmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac)
|
||||
{
|
||||
FAR struct macnet_driver_s *priv = (FAR struct macnet_driver_s *)dev->d_private;
|
||||
@@ -991,7 +991,7 @@ static int macnet_addmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_IGMP
|
||||
#ifdef CONFIG_NET_MCASTGROUP
|
||||
static int macnet_rmmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac)
|
||||
{
|
||||
FAR struct macnet_driver_s *priv = (FAR struct macnet_driver_s *)dev->d_private;
|
||||
@@ -1391,7 +1391,7 @@ int mac802154netdev_register(MACHANDLE mac)
|
||||
dev->d_ifup = macnet_ifup; /* I/F up (new IP address) callback */
|
||||
dev->d_ifdown = macnet_ifdown; /* I/F down callback */
|
||||
dev->d_txavail = macnet_txavail; /* New TX data callback */
|
||||
#ifdef CONFIG_NET_IGMP
|
||||
#ifdef CONFIG_NET_MCASTGROUP
|
||||
dev->d_addmac = macnet_addmac; /* Add multicast MAC address */
|
||||
dev->d_rmmac = macnet_rmmac; /* Remove multicast MAC address */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user