This change adds support for semi-standard IPPROTO_ICMP AF_INET datagram sockets. This replaces the old ad hoc, nonstandard way of implementing ping with a more standard, socket interface.

Squashed commit of the following:

    net/icmp:  Finishes off icmp_recvfrom().
    net/icmp:  Add readahead support for IPPROTO_ICMP sockets.
    net/icmp:  Add poll() support for IPPROTO_ICMP sockets.
    net/icmp:  Add a connection structure for IPPROTO_ICMP sockets.
    net/icmp:  Implements sendto for the IPPROTO_ICMP socket.
    net/icmp:  Move icmp_sendto() and icmp_recvfrom() to separate files.  They are likely to be complex (when they are implemented).
    net/icmp:  Hook IPPROTO_ICMP sockets into network.  Fix some naming collisions.  Still missing basic ICMP send/receive logic.
    configs: apps/system/ping current need poll() enabled.
    configs: All defconfig files that use to enable low-level support must now enabled CONFIG_SYSTEM_PING.
    net/icmp:  Adds basic build framework to support IPPROTO_ICMP sockets.
This commit is contained in:
Gregory Nutt
2017-10-23 08:45:12 -06:00
parent c28b938600
commit cccc86da09
106 changed files with 2918 additions and 842 deletions
+3 -3
View File
@@ -282,7 +282,7 @@ static int devif_poll_ieee802154_connections(FAR struct net_driver_s *dev,
*
****************************************************************************/
#if defined(CONFIG_NET_ICMP) && defined(CONFIG_NET_ICMP_PING)
#if defined(CONFIG_NET_ICMP) && defined(CONFIG_NET_ICMP_SOCKET)
static inline int devif_poll_icmp(FAR struct net_driver_s *dev,
devif_poll_callback_t callback)
{
@@ -298,7 +298,7 @@ static inline int devif_poll_icmp(FAR struct net_driver_s *dev,
return callback(dev);
}
#endif /* CONFIG_NET_ICMP && CONFIG_NET_ICMP_PING */
#endif /* CONFIG_NET_ICMP && CONFIG_NET_ICMP_SOCKET */
/****************************************************************************
* Name: devif_poll_icmpv6
@@ -601,7 +601,7 @@ int devif_poll(FAR struct net_driver_s *dev, devif_poll_callback_t callback)
if (!bstop)
#endif
#if defined(CONFIG_NET_ICMP) && defined(CONFIG_NET_ICMP_PING)
#if defined(CONFIG_NET_ICMP) && defined(CONFIG_NET_ICMP_SOCKET)
{
/* Traverse all of the tasks waiting to send an ICMP ECHO request. */