ICMPv6: Adds basic logic to support verification that we have the IPv6 address in the Neighbor Table. This feature is important because otherwise the first packet sent to a remote peer will fail (it will be replaced with a Neighbor Solicitation).

This commit is contained in:
Gregory Nutt
2015-02-02 13:44:31 -06:00
parent 4ce94a7e95
commit a07a764d42
20 changed files with 933 additions and 108 deletions
-12
View File
@@ -114,11 +114,6 @@
* OUT: Cleared (only) by the socket layer logic to indicate
* that the reply was processed, suppressing further
* attempts to process the reply.
*
* ICMPv6_ADVERTISE IN: An ICMPv6 Neighbor Advertisement has been received.
* Used to support ICMPv6 Neighbor Discovery Protocol.
* OUT: Cleared (only) by the socket layer logic to indicate
* that the reply was processed.
*/
#define TCP_ACKDATA (1 << 0)
@@ -142,7 +137,6 @@
#define TCP_TIMEDOUT (1 << 9)
#define ICMP_ECHOREPLY (1 << 10)
#define ICMPv6_ECHOREPLY ICMP_ECHOREPLY
#define ICMPv6_ADVERTISE (1 << 11)
#define TCP_CONN_EVENTS (TCP_CLOSE | TCP_ABORT | TCP_CONNECTED | TCP_TIMEDOUT)
@@ -217,12 +211,6 @@ extern uint8_t g_reassembly_timer;
extern struct devif_callback_s *g_icmp_echocallback;
#endif
#if defined(CONFIG_NET_ICMPv6) && defined(CONFIG_NET_ICMPv6_PING)
/* List of applications waiting for ICMPv6 ECHO REPLY */
extern struct devif_callback_s *g_icmpv6_echocallback;
#endif
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
+3 -3
View File
@@ -129,7 +129,7 @@ static inline int devif_poll_icmp(FAR struct net_driver_s *dev,
*
****************************************************************************/
#if defined(CONFIG_NET_ICMPv6_PING) || defined(CONFIG_NET_NET_ICMPv6_NEIGHBOR)
#if defined(CONFIG_NET_ICMPv6_PING) || defined(CONFIG_NET_ICMPv6_NEIGHBOR)
static inline int devif_poll_icmpv6(FAR struct net_driver_s *dev,
devif_poll_callback_t callback)
{
@@ -141,7 +141,7 @@ static inline int devif_poll_icmpv6(FAR struct net_driver_s *dev,
return callback(dev);
}
#endif /* CONFIG_NET_ICMPv6_PING || CONFIG_NET_NET_ICMPv6_NEIGHBOR*/
#endif /* CONFIG_NET_ICMPv6_PING || CONFIG_NET_ICMPv6_NEIGHBOR*/
/****************************************************************************
* Function: devif_poll_igmp
@@ -374,7 +374,7 @@ int devif_poll(FAR struct net_driver_s *dev, devif_poll_callback_t callback)
if (!bstop)
#endif
#if defined(CONFIG_NET_ICMPv6_PING) || defined(CONFIG_NET_NET_ICMPv6_NEIGHBOR)
#if defined(CONFIG_NET_ICMPv6_PING) || defined(CONFIG_NET_ICMPv6_NEIGHBOR)
{
/* Traverse all of the tasks waiting to send an ICMPv6 ECHO request. */