diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-07-06 17:22:02 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-07-06 17:22:02 -0600 |
commit | de7f2c8553da00529baa9ba6d2faaf7721d0506d (patch) | |
tree | 3359191c655307f23ecdd5b46dbf3f5bbcbb486e /nuttx/net/icmp | |
parent | 13df5a4fc813c0744f78d40fed3c1e36485fe5a6 (diff) | |
download | px4-nuttx-de7f2c8553da00529baa9ba6d2faaf7721d0506d.tar.gz px4-nuttx-de7f2c8553da00529baa9ba6d2faaf7721d0506d.tar.bz2 px4-nuttx-de7f2c8553da00529baa9ba6d2faaf7721d0506d.zip |
NET: Rename network interrupt event flags more appropriately: TCP_, UDP_, ICMP_, or PKT_ vs UIP_
Diffstat (limited to 'nuttx/net/icmp')
-rw-r--r-- | nuttx/net/icmp/icmp_input.c | 6 | ||||
-rw-r--r-- | nuttx/net/icmp/icmp_ping.c | 11 | ||||
-rw-r--r-- | nuttx/net/icmp/icmp_poll.c | 2 |
3 files changed, 10 insertions, 9 deletions
diff --git a/nuttx/net/icmp/icmp_input.c b/nuttx/net/icmp/icmp_input.c index 6ef90ae72..778ce4dee 100644 --- a/nuttx/net/icmp/icmp_input.c +++ b/nuttx/net/icmp/icmp_input.c @@ -187,7 +187,7 @@ void icmp_input(FAR struct net_driver_s *dev) #ifdef CONFIG_NET_ICMP_PING else if (picmp->type == ICMP_ECHO_REPLY && g_echocallback) { - (void)devif_callback_execute(dev, picmp, UIP_ECHOREPLY, g_echocallback); + (void)devif_callback_execute(dev, picmp, ICMP_ECHOREPLY, g_echocallback); } #endif @@ -269,7 +269,7 @@ typeerr: #ifdef CONFIG_NET_ICMP_PING else if (picmp->type == ICMP6_ECHO_REPLY && g_echocallback) { - uint16_t flags = UIP_ECHOREPLY; + uint16_t flags = ICMP_ECHOREPLY; if (g_echocallback) { @@ -280,7 +280,7 @@ typeerr: /* If the ECHO reply was not handled, then drop the packet */ - if (flags == UIP_ECHOREPLY) + if (flags == ICMP_ECHOREPLY) { /* The ECHO reply was not handled */ 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 */ diff --git a/nuttx/net/icmp/icmp_poll.c b/nuttx/net/icmp/icmp_poll.c index 43ae31154..16f4abf00 100644 --- a/nuttx/net/icmp/icmp_poll.c +++ b/nuttx/net/icmp/icmp_poll.c @@ -98,7 +98,7 @@ void icmp_poll(FAR struct net_driver_s *dev) /* Perform the application callback */ - (void)devif_callback_execute(dev, NULL, UIP_POLL, g_echocallback); + (void)devif_callback_execute(dev, NULL, ICMP_POLL, g_echocallback); } #endif /* CONFIG_NET && CONFIG_NET_ICMP && CONFIG_NET_ICMP_PING */ |