summaryrefslogtreecommitdiff
path: root/nuttx/net/icmp/icmp_ping.c
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-07-06 17:22:02 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-07-06 17:22:02 -0600
commitde7f2c8553da00529baa9ba6d2faaf7721d0506d (patch)
tree3359191c655307f23ecdd5b46dbf3f5bbcbb486e /nuttx/net/icmp/icmp_ping.c
parent13df5a4fc813c0744f78d40fed3c1e36485fe5a6 (diff)
downloadnuttx-de7f2c8553da00529baa9ba6d2faaf7721d0506d.tar.gz
nuttx-de7f2c8553da00529baa9ba6d2faaf7721d0506d.tar.bz2
nuttx-de7f2c8553da00529baa9ba6d2faaf7721d0506d.zip
NET: Rename network interrupt event flags more appropriately: TCP_, UDP_, ICMP_, or PKT_ vs UIP_
Diffstat (limited to 'nuttx/net/icmp/icmp_ping.c')
-rw-r--r--nuttx/net/icmp/icmp_ping.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/nuttx/net/icmp/icmp_ping.c b/nuttx/net/icmp/icmp_ping.c
index 2124765b9..bc615a06b 100644
--- a/nuttx/net/icmp/icmp_ping.c
+++ b/nuttx/net/icmp/icmp_ping.c
@@ -136,7 +136,8 @@ static inline int ping_timeout(FAR struct icmp_ping_s *pstate)
*
* Description:
* This function is called from the interrupt level to perform the actual
- * ECHO request and/or ECHO reply actions when polled by the uIP layer.
+ * ECHO request and/or ECHO reply actions when polled by the lower, device
+ * interfacing layer.
*
* Parameters:
* dev The structure of the network driver that caused the interrupt
@@ -168,7 +169,7 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn,
* response from a previous ping.
*/
- if ((flags & UIP_ECHOREPLY) != 0 && conn != NULL)
+ if ((flags & ICMP_ECHOREPLY) != 0 && conn != NULL)
{
FAR struct icmp_iphdr_s *icmp = (FAR struct icmp_iphdr_s *)conn;
@@ -179,7 +180,7 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn,
{
/* Consume the ECHOREPLY */
- flags &= ~UIP_ECHOREPLY;
+ flags &= ~ICMP_ECHOREPLY;
dev->d_len = 0;
/* Return the result to the caller */
@@ -204,7 +205,7 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn,
*/
if (dev->d_sndlen <= 0 && /* Packet available */
- (flags & UIP_NEWDATA) == 0 && /* No incoming data */
+ (flags & ICMP_NEWDATA) == 0 && /* No incoming data */
!pstate->png_sent) /* Request not sent */
{
FAR struct icmp_iphdr_s *picmp = ICMPBUF;
@@ -350,7 +351,7 @@ int icmp_ping(net_ipaddr_t addr, uint16_t id, uint16_t seqno,
state.png_cb = icmp_callback_alloc();
if (state.png_cb)
{
- state.png_cb->flags = UIP_POLL|UIP_ECHOREPLY;
+ state.png_cb->flags = (ICMP_POLL | ICMP_ECHOREPLY);
state.png_cb->priv = (void*)&state;
state.png_cb->event = ping_interrupt;
state.png_result = -EINTR; /* Assume sem-wait interrupted by signal */