mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
This commit adds support for semi-standard IPPROTO_ICMP6 sockets. This is a replacement for the non-standard ICMPv6 ping support that violated the portable POSIX OS interface.
Squashed commit of the following:
net/icmpv6: IPPROT_ICMP6 socket logic now builds without error.
net/icmpv6: Add support for read-ahead and poll(). Initial commit is just cloned from ICMP with the appropriate name changes.
configs/: All defconfig filess that include CONFIG_NET_ICMPv6_SOCKET=y need to select CONFIG_SYSTEM_PING6=y and deselect CONFIG_DISABLE_POLL.
Update NSH documention to show that ping6 is now a built in command.
net/icmpv6: Add icmpv6_sendto.c and icmpv6_recvfrom.c. Initial versions are just clones from icmp/ with appropriate name changes.
net/icmpv6: Clone some ICMP socket logic as the beginning of support for ICMPv6 socket support.
Rename CONFIG_NET_ICMPv6_PING to CONFIG_NET_ICMPv6_SOCKET. Move prototype for icmpv6_ping from include/nuttx/net/icmpv6 to net/icmpv6/icmpv6.h
This commit is contained in:
@@ -308,7 +308,7 @@ static inline int devif_poll_icmp(FAR struct net_driver_s *dev,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_NET_ICMPv6_PING) || defined(CONFIG_NET_ICMPv6_NEIGHBOR)
|
||||
#if defined(CONFIG_NET_ICMPv6_SOCKET) || defined(CONFIG_NET_ICMPv6_NEIGHBOR)
|
||||
static inline int devif_poll_icmpv6(FAR struct net_driver_s *dev,
|
||||
devif_poll_callback_t callback)
|
||||
{
|
||||
@@ -324,7 +324,7 @@ static inline int devif_poll_icmpv6(FAR struct net_driver_s *dev,
|
||||
|
||||
return callback(dev);
|
||||
}
|
||||
#endif /* CONFIG_NET_ICMPv6_PING || CONFIG_NET_ICMPv6_NEIGHBOR*/
|
||||
#endif /* CONFIG_NET_ICMPv6_SOCKET || CONFIG_NET_ICMPv6_NEIGHBOR*/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: devif_poll_forward
|
||||
@@ -351,7 +351,7 @@ static inline int devif_poll_forward(FAR struct net_driver_s *dev,
|
||||
|
||||
return callback(dev);
|
||||
}
|
||||
#endif /* CONFIG_NET_ICMPv6_PING || CONFIG_NET_ICMPv6_NEIGHBOR*/
|
||||
#endif /* CONFIG_NET_ICMPv6_SOCKET || CONFIG_NET_ICMPv6_NEIGHBOR*/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: devif_poll_igmp
|
||||
@@ -610,7 +610,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_ICMPv6_NEIGHBOR)
|
||||
#if defined(CONFIG_NET_ICMPv6_SOCKET) || defined(CONFIG_NET_ICMPv6_NEIGHBOR)
|
||||
{
|
||||
/* Traverse all of the tasks waiting to send an ICMPv6 ECHO request. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user