mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
This commit is contained in:
+41
-1
@@ -57,8 +57,9 @@
|
||||
#include "bluetooth/bluetooth.h"
|
||||
#include "ieee802154/ieee802154.h"
|
||||
#include "icmp/icmp.h"
|
||||
#include "icmpv6/icmpv6.h"
|
||||
#include "igmp/igmp.h"
|
||||
#include "icmpv6/icmpv6.h"
|
||||
#include "mld/mld.h"
|
||||
#include "ipforward/ipforward.h"
|
||||
#include "sixlowpan/sixlowpan.h"
|
||||
|
||||
@@ -421,6 +422,36 @@ static inline int devif_poll_igmp(FAR struct net_driver_s *dev,
|
||||
}
|
||||
#endif /* CONFIG_NET_IGMP */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: devif_poll_mld
|
||||
*
|
||||
* Description:
|
||||
* Poll all MLD connections for available packets to send.
|
||||
*
|
||||
* Assumptions:
|
||||
* This function is called from the MAC device driver with the network
|
||||
* locked.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_MLD
|
||||
static inline int devif_poll_mld(FAR struct net_driver_s *dev,
|
||||
devif_poll_callback_t callback)
|
||||
{
|
||||
/* Perform the MLD TX poll */
|
||||
|
||||
mld_poll(dev);
|
||||
|
||||
/* Perform any necessary conversions on outgoing ICMPv6 packets */
|
||||
|
||||
devif_packet_conversion(dev, DEVIF_ICMP6);
|
||||
|
||||
/* Call back into the driver */
|
||||
|
||||
return callback(dev);
|
||||
}
|
||||
#endif /* CONFIG_NET_MLD */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: devif_poll_udp_connections
|
||||
*
|
||||
@@ -626,6 +657,15 @@ int devif_poll(FAR struct net_driver_s *dev, devif_poll_callback_t callback)
|
||||
|
||||
if (!bstop)
|
||||
#endif
|
||||
#ifdef CONFIG_NET_MLD
|
||||
{
|
||||
/* Check for pending MLD messages */
|
||||
|
||||
bstop = devif_poll_mld(dev, callback);
|
||||
}
|
||||
|
||||
if (!bstop)
|
||||
#endif
|
||||
#ifdef NET_TCP_HAVE_STACK
|
||||
{
|
||||
/* Traverse all of the active TCP connections and perform the poll
|
||||
|
||||
Reference in New Issue
Block a user