summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/examples/discover/discover_main.c2
-rw-r--r--apps/examples/tcpecho/tcpecho_main.c2
-rw-r--r--apps/examples/thttpd/thttpd_main.c2
-rw-r--r--apps/examples/uip/uip_main.c2
-rw-r--r--apps/examples/xmlrpc/xmlrpc_main.c2
-rw-r--r--apps/netutils/dhcpd/dhcpd.c4
-rw-r--r--nuttx/arch/arm/src/c5471/c5471_ethernet.c10
-rw-r--r--nuttx/arch/arm/src/kinetis/kinetis_enet.c10
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c10
-rw-r--r--nuttx/arch/arm/src/sam34/sam_emac.c10
-rw-r--r--nuttx/arch/arm/src/sama5/sam_emac.c10
-rw-r--r--nuttx/arch/arm/src/sama5/sam_gmac.c10
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_eth.c10
-rw-r--r--nuttx/arch/arm/src/tiva/tiva_ethernet.c10
-rw-r--r--nuttx/arch/hc/src/m9s12/m9s12_ethernet.c10
-rw-r--r--nuttx/arch/mips/src/pic32mx/pic32mx-ethernet.c10
-rw-r--r--nuttx/arch/sim/src/up_uipdriver.c10
-rw-r--r--nuttx/arch/z80/src/ez80/ez80_emac.c10
-rw-r--r--nuttx/drivers/net/cs89x0.c10
-rw-r--r--nuttx/drivers/net/dm90x0.c10
-rw-r--r--nuttx/drivers/net/e1000.c10
-rw-r--r--nuttx/drivers/net/enc28j60.c10
-rw-r--r--nuttx/drivers/net/encx24j600.c10
-rw-r--r--nuttx/drivers/net/skeleton.c12
-rw-r--r--nuttx/drivers/net/vnet.c10
-rw-r--r--nuttx/include/netinet/arp.h2
-rw-r--r--nuttx/include/nuttx/net/arp.h (renamed from nuttx/include/nuttx/net/uip/uip-arp.h)89
-rw-r--r--nuttx/include/nuttx/net/uip/uip-arch.h10
-rw-r--r--nuttx/net/arp/arp_inout.c (renamed from nuttx/net/arp/uip_arp.c)28
-rw-r--r--nuttx/net/arp/arp_table.c (renamed from nuttx/net/arp/uip_arptab.c)22
-rw-r--r--nuttx/net/arp/arp_timer.c (renamed from nuttx/net/net_arptimer.c)12
-rw-r--r--nuttx/net/net_internal.h8
-rw-r--r--nuttx/net/net_send_buffered.c8
-rw-r--r--nuttx/net/net_send_unbuffered.c8
-rw-r--r--nuttx/net/net_sendfile.c4
-rw-r--r--nuttx/net/net_sockets.c2
36 files changed, 202 insertions, 197 deletions
diff --git a/apps/examples/discover/discover_main.c b/apps/examples/discover/discover_main.c
index 00c8e7fba..0fc6e7b7b 100644
--- a/apps/examples/discover/discover_main.c
+++ b/apps/examples/discover/discover_main.c
@@ -49,7 +49,7 @@
#include <net/if.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <apps/netutils/uiplib.h>
#include <apps/netutils/discover.h>
diff --git a/apps/examples/tcpecho/tcpecho_main.c b/apps/examples/tcpecho/tcpecho_main.c
index 8b26656f4..88b931def 100644
--- a/apps/examples/tcpecho/tcpecho_main.c
+++ b/apps/examples/tcpecho/tcpecho_main.c
@@ -55,7 +55,7 @@
#include <net/if.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <apps/netutils/uiplib.h>
diff --git a/apps/examples/thttpd/thttpd_main.c b/apps/examples/thttpd/thttpd_main.c
index 71fc8de6a..da040a218 100644
--- a/apps/examples/thttpd/thttpd_main.c
+++ b/apps/examples/thttpd/thttpd_main.c
@@ -51,7 +51,7 @@
#include <net/if.h>
#include <netinet/ether.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <apps/netutils/uiplib.h>
#include <apps/netutils/thttpd.h>
diff --git a/apps/examples/uip/uip_main.c b/apps/examples/uip/uip_main.c
index 3dbf0eb82..68fc20bf5 100644
--- a/apps/examples/uip/uip_main.c
+++ b/apps/examples/uip/uip_main.c
@@ -55,7 +55,7 @@
#include <net/if.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <apps/netutils/uiplib.h>
diff --git a/apps/examples/xmlrpc/xmlrpc_main.c b/apps/examples/xmlrpc/xmlrpc_main.c
index d28d6eae6..5d4e52299 100644
--- a/apps/examples/xmlrpc/xmlrpc_main.c
+++ b/apps/examples/xmlrpc/xmlrpc_main.c
@@ -64,7 +64,7 @@
#include <net/if.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <apps/netutils/uiplib.h>
#include <apps/netutils/xmlrpc.h>
diff --git a/apps/netutils/dhcpd/dhcpd.c b/apps/netutils/dhcpd/dhcpd.c
index c600be2fa..edc9195d0 100644
--- a/apps/netutils/dhcpd/dhcpd.c
+++ b/apps/netutils/dhcpd/dhcpd.c
@@ -56,7 +56,7 @@
# include <debug.h> /* For ndbg, vdbg */
# include <nuttx/compiler.h> /* For CONFIG_CPP_HAVE_WARNING */
# include <arch/irq.h> /* For irqstore() and friends -- REVISIT */
-# include <nuttx/net/uip/uip-arp.h> /* For low-level ARP interfaces -- REVISIT */
+# include <nuttx/net/arp.h> /* For low-level ARP interfaces -- REVISIT */
# include <apps/netutils/dhcpd.h> /* Advertised DHCPD APIs */
#endif
@@ -277,7 +277,7 @@ static inline void dhcpd_arpupdate(uint16_t *pipaddr, uint8_t *phwaddr)
*/
flags = uip_lock();
- uip_arp_update(pipaddr, phwaddr);
+ arp_update(pipaddr, phwaddr);
uip_unlock(flags);
}
#else
diff --git a/nuttx/arch/arm/src/c5471/c5471_ethernet.c b/nuttx/arch/arm/src/c5471/c5471_ethernet.c
index 94b392153..4a6ff9bde 100644
--- a/nuttx/arch/arm/src/c5471/c5471_ethernet.c
+++ b/nuttx/arch/arm/src/c5471/c5471_ethernet.c
@@ -59,7 +59,7 @@
#include <net/ethernet.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
#include "chip.h"
@@ -984,7 +984,7 @@ static int c5471_uiptxpoll(struct uip_driver_s *dev)
if (c5471->c_dev.d_len > 0)
{
- uip_arp_out(&c5471->c_dev);
+ arp_out(&c5471->c_dev);
c5471_transmit(c5471);
/* Check if the ESM has let go of the RX descriptor giving us access
@@ -1238,7 +1238,7 @@ static void c5471_receive(struct c5471_driver_s *c5471)
if (BUF->type == HTONS(UIP_ETHTYPE_IP))
#endif
{
- uip_arp_ipin(dev);
+ arp_ipin(dev);
uip_input(dev);
/* If the above function invocation resulted in data that should be
@@ -1250,13 +1250,13 @@ static void c5471_receive(struct c5471_driver_s *c5471)
if (dev->d_len > 0 &&
(EIM_TXDESC_OWN_HOST & getreg32(c5471->c_rxcpudesc)) == 0)
{
- uip_arp_out(dev);
+ arp_out(dev);
c5471_transmit(c5471);
}
}
else if (BUF->type == HTONS(UIP_ETHTYPE_ARP))
{
- uip_arp_arpin(dev);
+ arp_arpin(dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value > 0.
diff --git a/nuttx/arch/arm/src/kinetis/kinetis_enet.c b/nuttx/arch/arm/src/kinetis/kinetis_enet.c
index 2607b6bdf..096ff54a3 100644
--- a/nuttx/arch/arm/src/kinetis/kinetis_enet.c
+++ b/nuttx/arch/arm/src/kinetis/kinetis_enet.c
@@ -54,7 +54,7 @@
#include <nuttx/net/mii.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
#include "up_arch.h"
@@ -444,7 +444,7 @@ static int kinetis_uiptxpoll(struct uip_driver_s *dev)
if (priv->dev.d_len > 0)
{
- uip_arp_out(&priv->dev);
+ arp_out(&priv->dev);
kinetis_transmit(priv);
/* Check if there is room in the device to hold another packet. If not,
@@ -522,7 +522,7 @@ static void kinetis_receive(FAR struct kinetis_driver_s *priv)
if (BUF->type == HTONS(UIP_ETHTYPE_IP))
#endif
{
- uip_arp_ipin(&priv->dev);
+ arp_ipin(&priv->dev);
uip_input(&priv->dev);
/* If the above function invocation resulted in data that should be
@@ -531,13 +531,13 @@ static void kinetis_receive(FAR struct kinetis_driver_s *priv)
if (priv->dev.d_len > 0)
{
- uip_arp_out(&priv->dev);
+ arp_out(&priv->dev);
kinetis_transmit(priv);
}
}
else if (BUF->type == htons(UIP_ETHTYPE_ARP))
{
- uip_arp_arpin(&priv->dev);
+ arp_arpin(&priv->dev);
/* If the above function invocation resulted in data that should
* be sent out on the network, the field d_len will set to a
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c b/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c
index 360b6acc9..60dee4a8e 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c
@@ -54,7 +54,7 @@
#include <nuttx/net/uip/uip.h>
#include <nuttx/net/uip/uipopt.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
#include "up_arch.h"
@@ -681,7 +681,7 @@ static int lpc17_uiptxpoll(struct uip_driver_s *dev)
* at least one more packet in the descriptor list.
*/
- uip_arp_out(&priv->lp_dev);
+ arp_out(&priv->lp_dev);
lpc17_transmit(priv);
/* Check if there is room in the device to hold another packet. If not,
@@ -867,7 +867,7 @@ static void lpc17_rxdone(struct lpc17_driver_s *priv)
/* Handle the incoming Rx packet */
EMAC_STAT(priv, rx_ip);
- uip_arp_ipin(&priv->lp_dev);
+ arp_ipin(&priv->lp_dev);
uip_input(&priv->lp_dev);
/* If the above function invocation resulted in data that
@@ -877,14 +877,14 @@ static void lpc17_rxdone(struct lpc17_driver_s *priv)
if (priv->lp_dev.d_len > 0)
{
- uip_arp_out(&priv->lp_dev);
+ arp_out(&priv->lp_dev);
lpc17_response(priv);
}
}
else if (BUF->type == htons(UIP_ETHTYPE_ARP))
{
EMAC_STAT(priv, rx_arp);
- uip_arp_arpin(&priv->lp_dev);
+ arp_arpin(&priv->lp_dev);
/* If the above function invocation resulted in data that
* should be sent out on the network, the field d_len will
diff --git a/nuttx/arch/arm/src/sam34/sam_emac.c b/nuttx/arch/arm/src/sam34/sam_emac.c
index d2c134c90..3bdd288ee 100644
--- a/nuttx/arch/arm/src/sam34/sam_emac.c
+++ b/nuttx/arch/arm/src/sam34/sam_emac.c
@@ -64,7 +64,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/net/mii.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
#include "up_arch.h"
@@ -820,7 +820,7 @@ static int sam_uiptxpoll(struct uip_driver_s *dev)
{
/* Send the packet */
- uip_arp_out(&priv->dev);
+ arp_out(&priv->dev);
sam_transmit(priv);
/* Check if the there are any free TX descriptors. We cannot perform
@@ -1139,7 +1139,7 @@ static void sam_receive(struct sam_emac_s *priv)
/* Handle ARP on input then give the IP packet to uIP */
- uip_arp_ipin(&priv->dev);
+ arp_ipin(&priv->dev);
uip_input(&priv->dev);
/* If the above function invocation resulted in data that should be
@@ -1148,7 +1148,7 @@ static void sam_receive(struct sam_emac_s *priv)
if (priv->dev.d_len > 0)
{
- uip_arp_out(&priv->dev);
+ arp_out(&priv->dev);
sam_transmit(priv);
}
}
@@ -1158,7 +1158,7 @@ static void sam_receive(struct sam_emac_s *priv)
/* Handle ARP packet */
- uip_arp_arpin(&priv->dev);
+ arp_arpin(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value > 0.
diff --git a/nuttx/arch/arm/src/sama5/sam_emac.c b/nuttx/arch/arm/src/sama5/sam_emac.c
index b20446ec7..b62f39b63 100644
--- a/nuttx/arch/arm/src/sama5/sam_emac.c
+++ b/nuttx/arch/arm/src/sama5/sam_emac.c
@@ -62,7 +62,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/net/mii.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
#include "up_arch.h"
@@ -824,7 +824,7 @@ static int sam_uiptxpoll(struct uip_driver_s *dev)
{
/* Send the packet */
- uip_arp_out(&priv->dev);
+ arp_out(&priv->dev);
sam_transmit(priv);
/* Check if the there are any free TX descriptors. We cannot perform
@@ -1171,7 +1171,7 @@ static void sam_receive(struct sam_emac_s *priv)
/* Handle ARP on input then give the IP packet to uIP */
- uip_arp_ipin(&priv->dev);
+ arp_ipin(&priv->dev);
uip_input(&priv->dev);
/* If the above function invocation resulted in data that should be
@@ -1180,7 +1180,7 @@ static void sam_receive(struct sam_emac_s *priv)
if (priv->dev.d_len > 0)
{
- uip_arp_out(&priv->dev);
+ arp_out(&priv->dev);
sam_transmit(priv);
}
}
@@ -1190,7 +1190,7 @@ static void sam_receive(struct sam_emac_s *priv)
/* Handle ARP packet */
- uip_arp_arpin(&priv->dev);
+ arp_arpin(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value > 0.
diff --git a/nuttx/arch/arm/src/sama5/sam_gmac.c b/nuttx/arch/arm/src/sama5/sam_gmac.c
index 453dca9c0..096405573 100644
--- a/nuttx/arch/arm/src/sama5/sam_gmac.c
+++ b/nuttx/arch/arm/src/sama5/sam_gmac.c
@@ -62,7 +62,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/net/gmii.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
#include "up_arch.h"
@@ -762,7 +762,7 @@ static int sam_uiptxpoll(struct uip_driver_s *dev)
{
/* Send the packet */
- uip_arp_out(&priv->dev);
+ arp_out(&priv->dev);
sam_transmit(priv);
/* Check if the there are any free TX descriptors. We cannot perform
@@ -1109,7 +1109,7 @@ static void sam_receive(struct sam_gmac_s *priv)
/* Handle ARP on input then give the IP packet to uIP */
- uip_arp_ipin(&priv->dev);
+ arp_ipin(&priv->dev);
uip_input(&priv->dev);
/* If the above function invocation resulted in data that should be
@@ -1118,7 +1118,7 @@ static void sam_receive(struct sam_gmac_s *priv)
if (priv->dev.d_len > 0)
{
- uip_arp_out(&priv->dev);
+ arp_out(&priv->dev);
sam_transmit(priv);
}
}
@@ -1128,7 +1128,7 @@ static void sam_receive(struct sam_gmac_s *priv)
/* Handle ARP packet */
- uip_arp_arpin(&priv->dev);
+ arp_arpin(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value > 0.
diff --git a/nuttx/arch/arm/src/stm32/stm32_eth.c b/nuttx/arch/arm/src/stm32/stm32_eth.c
index 7cd5d6a13..60187bcff 100644
--- a/nuttx/arch/arm/src/stm32/stm32_eth.c
+++ b/nuttx/arch/arm/src/stm32/stm32_eth.c
@@ -54,7 +54,7 @@
#include <nuttx/net/mii.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
#include "up_internal.h"
@@ -1167,7 +1167,7 @@ static int stm32_uiptxpoll(struct uip_driver_s *dev)
{
/* Send the packet */
- uip_arp_out(&priv->dev);
+ arp_out(&priv->dev);
stm32_transmit(priv);
DEBUGASSERT(dev->d_len == 0 && dev->d_buf == NULL);
@@ -1610,7 +1610,7 @@ static void stm32_receive(FAR struct stm32_ethmac_s *priv)
/* Handle ARP on input then give the IP packet to uIP */
- uip_arp_ipin(&priv->dev);
+ arp_ipin(&priv->dev);
uip_input(&priv->dev);
/* If the above function invocation resulted in data that should be
@@ -1619,7 +1619,7 @@ static void stm32_receive(FAR struct stm32_ethmac_s *priv)
if (priv->dev.d_len > 0)
{
- uip_arp_out(&priv->dev);
+ arp_out(&priv->dev);
stm32_transmit(priv);
}
}
@@ -1629,7 +1629,7 @@ static void stm32_receive(FAR struct stm32_ethmac_s *priv)
/* Handle ARP packet */
- uip_arp_arpin(&priv->dev);
+ arp_arpin(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value > 0.
diff --git a/nuttx/arch/arm/src/tiva/tiva_ethernet.c b/nuttx/arch/arm/src/tiva/tiva_ethernet.c
index 070236827..a3a282111 100644
--- a/nuttx/arch/arm/src/tiva/tiva_ethernet.c
+++ b/nuttx/arch/arm/src/tiva/tiva_ethernet.c
@@ -52,7 +52,7 @@
#include <nuttx/arch.h>
#include <arch/board/board.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
#include "chip.h"
@@ -610,7 +610,7 @@ static int tiva_uiptxpoll(struct uip_driver_s *dev)
*/
DEBUGASSERT((tiva_ethin(priv, TIVA_MAC_TR_OFFSET) & MAC_TR_NEWTX) == 0)
- uip_arp_out(&priv->ld_dev);
+ arp_out(&priv->ld_dev);
ret = tiva_transmit(priv);
}
@@ -766,7 +766,7 @@ static void tiva_receive(struct tiva_driver_s *priv)
nllvdbg("IP packet received (%02x)\n", ETHBUF->type);
EMAC_STAT(priv, rx_ip);
- uip_arp_ipin(&priv->ld_dev);
+ arp_ipin(&priv->ld_dev);
uip_input(&priv->ld_dev);
/* If the above function invocation resulted in data that should be
@@ -775,7 +775,7 @@ static void tiva_receive(struct tiva_driver_s *priv)
if (priv->ld_dev.d_len > 0)
{
- uip_arp_out(&priv->ld_dev);
+ arp_out(&priv->ld_dev);
tiva_transmit(priv);
}
}
@@ -784,7 +784,7 @@ static void tiva_receive(struct tiva_driver_s *priv)
nllvdbg("ARP packet received (%02x)\n", ETHBUF->type);
EMAC_STAT(priv, rx_arp);
- uip_arp_arpin(&priv->ld_dev);
+ arp_arpin(&priv->ld_dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value > 0.
diff --git a/nuttx/arch/hc/src/m9s12/m9s12_ethernet.c b/nuttx/arch/hc/src/m9s12/m9s12_ethernet.c
index b01bc1284..857469b28 100644
--- a/nuttx/arch/hc/src/m9s12/m9s12_ethernet.c
+++ b/nuttx/arch/hc/src/m9s12/m9s12_ethernet.c
@@ -52,7 +52,7 @@
#include <nuttx/arch.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
/****************************************************************************
@@ -212,7 +212,7 @@ static int emac_uiptxpoll(struct uip_driver_s *dev)
if (priv->d_dev.d_len > 0)
{
- uip_arp_out(&priv->d_dev);
+ arp_out(&priv->d_dev);
emac_transmit(priv);
/* Check if there is room in the device to hold another packet. If not,
@@ -264,7 +264,7 @@ static void emac_receive(FAR struct emac_driver_s *priv)
if (BUF->type == HTONS(UIP_ETHTYPE_IP))
#endif
{
- uip_arp_ipin(&priv->d_dev);
+ arp_ipin(&priv->d_dev);
uip_input(&priv->d_dev);
/* If the above function invocation resulted in data that should be
@@ -273,13 +273,13 @@ static void emac_receive(FAR struct emac_driver_s *priv)
if (priv->d_dev.d_len > 0)
{
- uip_arp_out(&priv->d_dev);
+ arp_out(&priv->d_dev);
emac_transmit(priv);
}
}
else if (BUF->type == htons(UIP_ETHTYPE_ARP))
{
- uip_arp_arpin(&priv->d_dev);
+ arp_arpin(&priv->d_dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value > 0.
diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-ethernet.c b/nuttx/arch/mips/src/pic32mx/pic32mx-ethernet.c
index fedf20b04..5af9e7452 100644
--- a/nuttx/arch/mips/src/pic32mx/pic32mx-ethernet.c
+++ b/nuttx/arch/mips/src/pic32mx/pic32mx-ethernet.c
@@ -57,7 +57,7 @@
#include <nuttx/net/uip/uip.h>
#include <nuttx/net/uip/uipopt.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
#include <arch/irq.h>
@@ -1147,7 +1147,7 @@ static int pic32mx_uiptxpoll(struct uip_driver_s *dev)
* at least one more packet in the descriptor list.
*/
- uip_arp_out(&priv->pd_dev);
+ arp_out(&priv->pd_dev);
pic32mx_transmit(priv);
/* Check if the next TX descriptor is available. If not, return a
@@ -1435,7 +1435,7 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv)
/* Handle the incoming IP packet */
EMAC_STAT(priv, rx_ip);
- uip_arp_ipin(&priv->pd_dev);
+ arp_ipin(&priv->pd_dev);
uip_input(&priv->pd_dev);
/* If the above function invocation resulted in data that
@@ -1445,7 +1445,7 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv)
if (priv->pd_dev.d_len > 0)
{
- uip_arp_out(&priv->pd_dev);
+ arp_out(&priv->pd_dev);
pic32mx_response(priv);
}
}
@@ -1454,7 +1454,7 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv)
/* Handle the incoming ARP packet */
EMAC_STAT(priv, rx_arp);
- uip_arp_arpin(&priv->pd_dev);
+ arp_arpin(&priv->pd_dev);
/* If the above function invocation resulted in data that
* should be sent out on the network, the field d_len will
diff --git a/nuttx/arch/sim/src/up_uipdriver.c b/nuttx/arch/sim/src/up_uipdriver.c
index 99f37b22f..3bc0bf9df 100644
--- a/nuttx/arch/sim/src/up_uipdriver.c
+++ b/nuttx/arch/sim/src/up_uipdriver.c
@@ -55,7 +55,7 @@
#include <net/ethernet.h>
#include <nuttx/net/uip/uip.h>
#include <nuttx/net/uip/uip-arch.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include "up_internal.h"
@@ -123,7 +123,7 @@ static int sim_uiptxpoll(struct uip_driver_s *dev)
if (g_sim_dev.d_len > 0)
{
- uip_arp_out(&g_sim_dev);
+ arp_out(&g_sim_dev);
netdev_send(g_sim_dev.d_buf, g_sim_dev.d_len);
}
@@ -166,7 +166,7 @@ void uipdriver_loop(void)
if (BUF->ether_type == htons(UIP_ETHTYPE_IP))
#endif
{
- uip_arp_ipin(&g_sim_dev);
+ arp_ipin(&g_sim_dev);
uip_input(&g_sim_dev);
/* If the above function invocation resulted in data that
@@ -176,13 +176,13 @@ void uipdriver_loop(void)
if (g_sim_dev.d_len > 0)
{
- uip_arp_out(&g_sim_dev);
+ arp_out(&g_sim_dev);
netdev_send(g_sim_dev.d_buf, g_sim_dev.d_len);
}
}
else if (BUF->ether_type == htons(UIP_ETHTYPE_ARP))
{
- uip_arp_arpin(&g_sim_dev);
+ arp_arpin(&g_sim_dev);
/* If the above function invocation resulted in data that
* should be sent out on the network, the global variable
diff --git a/nuttx/arch/z80/src/ez80/ez80_emac.c b/nuttx/arch/z80/src/ez80/ez80_emac.c
index 4957a5bd8..5787303eb 100644
--- a/nuttx/arch/z80/src/ez80/ez80_emac.c
+++ b/nuttx/arch/z80/src/ez80/ez80_emac.c
@@ -59,7 +59,7 @@
#include <arch/io.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
#include "chip.h"
@@ -1080,7 +1080,7 @@ static int ez80emac_uiptxpoll(struct uip_driver_s *dev)
* packet was successfully handled.
*/
- uip_arp_out(&priv->dev);
+ arp_out(&priv->dev);
ret = ez80emac_transmit(priv);
}
@@ -1274,7 +1274,7 @@ static int ez80emac_receive(struct ez80emac_driver_s *priv)
nvdbg("IP packet received (%02x)\n", ETHBUF->type);
EMAC_STAT(priv, rx_ip);
- uip_arp_ipin(&priv->dev);
+ arp_ipin(&priv->dev);
uip_input(&priv->dev);
/* If the above function invocation resulted in data that should be
@@ -1283,7 +1283,7 @@ static int ez80emac_receive(struct ez80emac_driver_s *priv)
if (priv->dev.d_len > 0)
{
- uip_arp_out(&priv->dev);
+ arp_out(&priv->dev);
ez80emac_transmit(priv);
}
}
@@ -1292,7 +1292,7 @@ static int ez80emac_receive(struct ez80emac_driver_s *priv)
nvdbg("ARP packet received (%02x)\n", ETHBUF->type);
EMAC_STAT(priv, rx_arp);
- uip_arp_arpin(&priv->dev);
+ arp_arpin(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value > 0.
diff --git a/nuttx/drivers/net/cs89x0.c b/nuttx/drivers/net/cs89x0.c
index 8b431eb66..860830777 100644
--- a/nuttx/drivers/net/cs89x0.c
+++ b/nuttx/drivers/net/cs89x0.c
@@ -52,7 +52,7 @@
#include <nuttx/arch.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
/****************************************************************************
@@ -337,7 +337,7 @@ static int cs89x0_uiptxpoll(struct uip_driver_s *dev)
if (cs89x0->cs_dev.d_len > 0)
{
- uip_arp_out(&cs89x0->cs_dev);
+ arp_out(&cs89x0->cs_dev);
cs89x0_transmit(cs89x0);
/* Check if there is room in the CS89x0 to hold another packet. If not,
@@ -438,7 +438,7 @@ static void cs89x0_receive(struct cs89x0_driver_s *cs89x0, uint16_t isq)
if (BUF->type == HTONS(UIP_ETHTYPE_IP))
#endif
{
- uip_arp_ipin(&cs89x0->cs_dev);
+ arp_ipin(&cs89x0->cs_dev);
uip_input(&cs89x0->cs_dev);
/* If the above function invocation resulted in data that should be
@@ -447,13 +447,13 @@ static void cs89x0_receive(struct cs89x0_driver_s *cs89x0, uint16_t isq)
if (cs89x0->cs_dev.d_len > 0)
{
- uip_arp_out(&cs89x0->cs_dev);
+ arp_out(&cs89x0->cs_dev);
cs89x0_transmit(cs89x0);
}
}
else if (BUF->type == htons(UIP_ETHTYPE_ARP))
{
- uip_arp_arpin(&cs89x0->cs_dev);
+ arp_arpin(&cs89x0->cs_dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value > 0.
diff --git a/nuttx/drivers/net/dm90x0.c b/nuttx/drivers/net/dm90x0.c
index 33d294532..0f4fb0e49 100644
--- a/nuttx/drivers/net/dm90x0.c
+++ b/nuttx/drivers/net/dm90x0.c
@@ -65,7 +65,7 @@
#include <net/ethernet.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
/****************************************************************************
@@ -849,7 +849,7 @@ static int dm9x_uiptxpoll(struct uip_driver_s *dev)
if (dm9x->dm_dev.d_len > 0)
{
- uip_arp_out(&dm9x->dm_dev);
+ arp_out(&dm9x->dm_dev);
dm9x_transmit(dm9x);
/* Check if there is room in the DM90x0 to hold another packet. In 100M mode,
@@ -988,7 +988,7 @@ static void dm9x_receive(struct dm9x_driver_s *dm9x)
if (BUF->type == HTONS(UIP_ETHTYPE_IP))
#endif
{
- uip_arp_ipin(&dm9x->dm_dev);
+ arp_ipin(&dm9x->dm_dev);
uip_input(&dm9x->dm_dev);
/* If the above function invocation resulted in data that should be
@@ -997,13 +997,13 @@ static void dm9x_receive(struct dm9x_driver_s *dm9x)
if (dm9x->dm_dev.d_len > 0)
{
- uip_arp_out(&dm9x->dm_dev);
+ arp_out(&dm9x->dm_dev);
dm9x_transmit(dm9x);
}
}
else if (BUF->type == htons(UIP_ETHTYPE_ARP))
{
- uip_arp_arpin(&dm9x->dm_dev);
+ arp_arpin(&dm9x->dm_dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value > 0.
diff --git a/nuttx/drivers/net/e1000.c b/nuttx/drivers/net/e1000.c
index dda9692b7..255bd01d1 100644
--- a/nuttx/drivers/net/e1000.c
+++ b/nuttx/drivers/net/e1000.c
@@ -55,7 +55,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
#include <rgmp/pmap.h>
@@ -487,7 +487,7 @@ static int e1000_uiptxpoll(struct uip_driver_s *dev)
if (e1000->uip_dev.d_len > 0)
{
- uip_arp_out(&e1000->uip_dev);
+ arp_out(&e1000->uip_dev);
e1000_transmit(e1000);
/* Check if there is room in the device to hold another packet. If not,
@@ -573,7 +573,7 @@ static void e1000_receive(struct e1000_dev *e1000)
if (BUF->type == HTONS(UIP_ETHTYPE_IP))
#endif
{
- uip_arp_ipin(&e1000->uip_dev);
+ arp_ipin(&e1000->uip_dev);
uip_input(&e1000->uip_dev);
/* If the above function invocation resulted in data that should be
@@ -582,13 +582,13 @@ static void e1000_receive(struct e1000_dev *e1000)
if (e1000->uip_dev.d_len > 0)
{
- uip_arp_out(&e1000->uip_dev);
+ arp_out(&e1000->uip_dev);
e1000_transmit(e1000);
}
}
else if (BUF->type == htons(UIP_ETHTYPE_ARP))
{
- uip_arp_arpin(&e1000->uip_dev);
+ arp_arpin(&e1000->uip_dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value > 0.
diff --git a/nuttx/drivers/net/enc28j60.c b/nuttx/drivers/net/enc28j60.c
index 113411bc7..374821914 100644
--- a/nuttx/drivers/net/enc28j60.c
+++ b/nuttx/drivers/net/enc28j60.c
@@ -62,7 +62,7 @@
#include <nuttx/net/enc28j60.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
#include "enc28j60.h"
@@ -1195,7 +1195,7 @@ static int enc_uiptxpoll(struct uip_driver_s *dev)
nllvdbg("Poll result: d_len=%d\n", priv->dev.d_len);
if (priv->dev.d_len > 0)
{
- uip_arp_out(&priv->dev);
+ arp_out(&priv->dev);
enc_transmit(priv);
/* Stop the poll now because we can queue only one packet */
@@ -1378,7 +1378,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv)
#endif
{
nllvdbg("IP packet received (%02x)\n", BUF->type);
- uip_arp_ipin(&priv->dev);
+ arp_ipin(&priv->dev);
uip_input(&priv->dev);
/* If the above function invocation resulted in data that should be
@@ -1387,14 +1387,14 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv)
if (priv->dev.d_len > 0)
{
- uip_arp_out(&priv->dev);
+ arp_out(&priv->dev);
enc_transmit(priv);
}
}
else if (BUF->type == htons(UIP_ETHTYPE_ARP))
{
nllvdbg("ARP packet received (%02x)\n", BUF->type);
- uip_arp_arpin(&priv->dev);
+ arp_arpin(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value > 0.
diff --git a/nuttx/drivers/net/encx24j600.c b/nuttx/drivers/net/encx24j600.c
index 548340e97..28c49469e 100644
--- a/nuttx/drivers/net/encx24j600.c
+++ b/nuttx/drivers/net/encx24j600.c
@@ -68,7 +68,7 @@
#include <nuttx/net/encx24j600.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
#include "encx24j600.h"
@@ -1209,7 +1209,7 @@ static int enc_uiptxpoll(struct uip_driver_s *dev)
if (priv->dev.d_len > 0)
{
- uip_arp_out(&priv->dev);
+ arp_out(&priv->dev);
ret = enc_txenqueue(priv);
}
@@ -1496,7 +1496,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv)
{
nllvdbg("Try to process IP packet (%02x)\n", BUF->type);
- uip_arp_ipin(&priv->dev);
+ arp_ipin(&priv->dev);
ret = uip_input(&priv->dev);
if (ret == OK || (clock_systimer() - descr->ts) > ENC_RXTIMEOUT)
@@ -1514,14 +1514,14 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv)
if (priv->dev.d_len > 0)
{
- uip_arp_out(&priv->dev);
+ arp_out(&priv->dev);
enc_txenqueue(priv);
}
}
else if (BUF->type == htons(UIP_ETHTYPE_ARP))
{
nllvdbg("ARP packet received (%02x)\n", BUF->type);
- uip_arp_arpin(&priv->dev);
+ arp_arpin(&priv->dev);
/* ARP packets are freed immediately */
diff --git a/nuttx/drivers/net/skeleton.c b/nuttx/drivers/net/skeleton.c
index b4d4811a8..6dd17958d 100644
--- a/nuttx/drivers/net/skeleton.c
+++ b/nuttx/drivers/net/skeleton.c
@@ -1,7 +1,7 @@
/****************************************************************************
* drivers/net/skeleton.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -52,7 +52,7 @@
#include <nuttx/arch.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
/****************************************************************************
@@ -212,7 +212,7 @@ static int skel_uiptxpoll(struct uip_driver_s *dev)
if (skel->sk_dev.d_len > 0)
{
- uip_arp_out(&skel->sk_dev);
+ arp_out(&skel->sk_dev);
skel_transmit(skel);
/* Check if there is room in the device to hold another packet. If not,
@@ -264,7 +264,7 @@ static void skel_receive(FAR struct skel_driver_s *skel)
if (BUF->type == HTONS(UIP_ETHTYPE_IP))
#endif
{
- uip_arp_ipin(&skel->sk_dev);
+ arp_ipin(&skel->sk_dev);
uip_input(&skel->sk_dev);
/* If the above function invocation resulted in data that should be
@@ -273,13 +273,13 @@ static void skel_receive(FAR struct skel_driver_s *skel)
if (skel->sk_dev.d_len > 0)
{
- uip_arp_out(&skel->sk_dev);
+ arp_out(&skel->sk_dev);
skel_transmit(skel);
}
}
else if (BUF->type == htons(UIP_ETHTYPE_ARP))
{
- uip_arp_arpin(&skel->sk_dev);
+ arp_arpin(&skel->sk_dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value > 0.
diff --git a/nuttx/drivers/net/vnet.c b/nuttx/drivers/net/vnet.c
index 5ca63e3c0..671ece432 100644
--- a/nuttx/drivers/net/vnet.c
+++ b/nuttx/drivers/net/vnet.c
@@ -56,7 +56,7 @@
#include <nuttx/arch.h>
#include <nuttx/net/uip/uip.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
#include <rgmp/vnet.h>
@@ -231,7 +231,7 @@ static int vnet_uiptxpoll(struct uip_driver_s *dev)
if (vnet->sk_dev.d_len > 0)
{
- uip_arp_out(&vnet->sk_dev);
+ arp_out(&vnet->sk_dev);
vnet_transmit(vnet);
/* Check if there is room in the device to hold another packet. If not,
@@ -293,18 +293,18 @@ void rtos_vnet_recv(struct rgmp_vnet *rgmp_vnet, char *data, int len)
if (BUF->type == HTONS(UIP_ETHTYPE_IP))
#endif
{
- uip_arp_ipin(&vnet->sk_dev);
+ arp_ipin(&vnet->sk_dev);
uip_input(&vnet->sk_dev);
// If the above function invocation resulted in data that should be
// sent out on the network, the field d_len will set to a value > 0.
if (vnet->sk_dev.d_len > 0) {
- uip_arp_out(&vnet->sk_dev);
+ arp_out(&vnet->sk_dev);
vnet_transmit(vnet);
}
}
else if (BUF->type == htons(UIP_ETHTYPE_ARP)) {
- uip_arp_arpin(&vnet->sk_dev);
+ arp_arpin(&vnet->sk_dev);
// If the above function invocation resulted in data that should be
// sent out on the network, the field d_len will set to a value > 0.
diff --git a/nuttx/include/netinet/arp.h b/nuttx/include/netinet/arp.h
index e318945aa..5a041f4f0 100644
--- a/nuttx/include/netinet/arp.h
+++ b/nuttx/include/netinet/arp.h
@@ -102,7 +102,7 @@ extern "C" {
/* If CONFIG_NET_ARPIOCTLS is defined then the semi-standard ioctl commands
* described above are supported. If not, you can call the uIP ARP interfaces
- * directly in a very non-standard way. See include/nuttx/net/uip/uip-arp.h for
+ * directly in a very non-standard way. See include/nuttx/net/arp.h for
* prototypes.
*/
diff --git a/nuttx/include/nuttx/net/uip/uip-arp.h b/nuttx/include/nuttx/net/arp.h
index ba704cc13..52051a52e 100644
--- a/nuttx/include/nuttx/net/uip/uip-arp.h
+++ b/nuttx/include/nuttx/net/arp.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * include/nuttx/net/uip/uip-arch.h
+ * include/nuttx/net/arp.h
* Macros and definitions for the ARP module.
*
* Copyright (C) 2007, 2009-2012 Gregory Nutt. All rights reserved.
@@ -38,8 +38,8 @@
*
****************************************************************************/
-#ifndef __INCLUDE_NUTTX_NET_UIP_UIP_ARP_H
-#define __INCLUDE_NUTTX_NET_UIP_UIP_ARP_H
+#ifndef __INCLUDE_NUTTX_NET_ARP_H
+#define __INCLUDE_NUTTX_NET_ARP_H
/****************************************************************************
* Included Files
@@ -106,7 +106,7 @@ extern "C" {
#ifdef CONFIG_NET_ARP
/****************************************************************************
- * Name: uip_arp_init
+ * Name: arp_init
*
* Description:
* Initialize the ARP module. This function must be called before any of
@@ -114,13 +114,13 @@ extern "C" {
*
****************************************************************************/
-EXTERN void uip_arp_init(void);
+void arp_init(void);
/****************************************************************************
- * Name: uip_arp_ipin
+ * Name: arp_ipin
*
* Description:
- * The uip_arp_ipin() function should be called whenever an IP packet
+ * The arp_ipin() function should be called whenever an IP packet
* arrives from the Ethernet. This function refreshes the ARP table or
* inserts a new mapping if none exists. The function assumes that an
* IP packet with an Ethernet header is present in the d_buf buffer
@@ -129,31 +129,31 @@ EXTERN void uip_arp_init(void);
****************************************************************************/
#ifdef CONFIG_NET_ARP_IPIN
-EXTERN void uip_arp_ipin(struct uip_driver_s *dev);
+void arp_ipin(struct uip_driver_s *dev);
#else
-# define uip_arp_ipin(dev)
+# define arp_ipin(dev)
#endif
/****************************************************************************
- * Name: uip_arp_arpin
+ * Name: arp_arpin
*
* Description:
- * The uip_arp_arpin() should be called when an ARP packet is received
+ * The arp_arpin() should be called when an ARP packet is received
* by the Ethernet driver. This function also assumes that the
* Ethernet frame is present in the d_buf buffer. When the
- * uip_arp_arpin() function returns, the contents of the d_buf
+ * arp_arpin() function returns, the contents of the d_buf
* buffer should be sent out on the Ethernet if the d_len field
* is > 0.
*
****************************************************************************/
-EXTERN void uip_arp_arpin(struct uip_driver_s *dev);
+void arp_arpin(struct uip_driver_s *dev);
/****************************************************************************
- * Name: uip_arp_arpin
+ * Name: arp_arpin
*
* Description:
- * The uip_arp_out() function should be called when an IP packet
+ * The arp_out() function should be called when an IP packet
* should be sent out on the Ethernet. This function creates an
* Ethernet header before the IP header in the d_buf buffer. The
* Ethernet header will have the correct Ethernet MAC destination
@@ -166,10 +166,30 @@ EXTERN void uip_arp_arpin(struct uip_driver_s *dev);
*
****************************************************************************/
-EXTERN void uip_arp_out(struct uip_driver_s *dev);
+void arp_out(struct uip_driver_s *dev);
/****************************************************************************
- * Name: uip_arp_timer
+ * Function: arp_timer_init
+ *
+ * Description:
+ * Initialized the 10 second timer that is need by uIP to age ARP
+ * associations
+ *
+ * Parameters:
+ * None
+ *
+ * Returned Value:
+ * None
+ *
+ * Assumptions:
+ * Called once at system initialization time
+ *
+ ****************************************************************************/
+
+void arp_timer_init(void);
+
+/****************************************************************************
+ * Name: arp_timer
*
* Description:
* This function performs periodic timer processing in the ARP module
@@ -179,10 +199,10 @@ EXTERN void uip_arp_out(struct uip_driver_s *dev);
*
****************************************************************************/
-EXTERN void uip_arp_timer(void);
+void arp_timer(void);
/****************************************************************************
- * Name: uip_arp_update
+ * Name: arp_update
*
* Description:
* Add the IP/HW address mapping to the ARP table -OR- change the IP
@@ -197,10 +217,10 @@ EXTERN void uip_arp_timer(void);
*
****************************************************************************/
-EXTERN void uip_arp_update(uint16_t *pipaddr, uint8_t *ethaddr);
+void arp_update(FAR uint16_t *pipaddr, FAR uint8_t *ethaddr);
/****************************************************************************
- * Name: uip_arp_find
+ * Name: arp_find
*
* Description:
* Find the ARP entry corresponding to this IP address.
@@ -214,10 +234,10 @@ EXTERN void uip_arp_update(uint16_t *pipaddr, uint8_t *ethaddr);
*
****************************************************************************/
-EXTERN struct arp_entry *uip_arp_find(in_addr_t ipaddr);
+struct arp_entry *arp_find(in_addr_t ipaddr);
/****************************************************************************
- * Name: uip_arp_delete
+ * Name: arp_delete
*
* Description:
* Remove an IP association from the ARP table
@@ -230,9 +250,9 @@ EXTERN struct arp_entry *uip_arp_find(in_addr_t ipaddr);
*
****************************************************************************/
-#define uip_arp_delete(ipaddr) \
+#define arp_delete(ipaddr) \
{ \
- struct arp_entry *tabptr = uip_arp_find(ipaddr); \
+ struct arp_entry *tabptr = arp_find(ipaddr); \
if (tabptr) \
{ \
tabptr->at_ipaddr = 0; \
@@ -243,14 +263,15 @@ EXTERN struct arp_entry *uip_arp_find(in_addr_t ipaddr);
/* If ARP is disabled, stub out all ARP interfaces */
-# define uip_arp_init()
-# define uip_arp_ipin(dev)
-# define uip_arp_arpin(dev)
-# define uip_arp_out(dev)
-# define uip_arp_timer()
-# define uip_arp_update(pipaddr,ethaddr)
-# define uip_arp_find(ipaddr) NULL
-# define uip_arp_delete(ipaddr)
+# define arp_init()
+# define arp_ipin(dev)
+# define arp_arpin(dev)
+# define arp_out(dev)
+# define arp_timer()
+# define arp_update(pipaddr,ethaddr)
+# define arp_find(ipaddr) NULL
+# define arp_delete(ipaddr)
+# define arp_timer_init(void);
#endif /* CONFIG_NET_ARP */
@@ -259,4 +280,4 @@ EXTERN struct arp_entry *uip_arp_find(in_addr_t ipaddr);
}
#endif
-#endif /* __INCLUDE_NUTTX_NET_UIP_UIP_ARP_H */
+#endif /* __INCLUDE_NUTTX_NET_ARP_H */
diff --git a/nuttx/include/nuttx/net/uip/uip-arch.h b/nuttx/include/nuttx/net/uip/uip-arch.h
index 9dffdcede..c6b664d7f 100644
--- a/nuttx/include/nuttx/net/uip/uip-arch.h
+++ b/nuttx/include/nuttx/net/uip/uip-arch.h
@@ -242,17 +242,17 @@ struct uip_driver_s
* {
* if (BUF->type == HTONS(UIP_ETHTYPE_IP))
* {
- * uip_arp_ipin();
+ * arp_ipin();
* uip_input(dev);
* if (dev->d_len > 0)
* {
- * uip_arp_out();
+ * arp_out();
* devicedriver_send();
* }
* }
* else if (BUF->type == HTONS(UIP_ETHTYPE_ARP))
* {
- * uip_arp_arpin();
+ * arp_arpin();
* if (dev->d_len > 0)
* {
* devicedriver_send();
@@ -297,14 +297,14 @@ int uip_input(struct uip_driver_s *dev);
*
* Note: If you are writing a uIP device driver that needs ARP (Address
* Resolution Protocol), e.g., when running uIP over Ethernet, you will
- * need to call the uip_arp_out() function in the callback function
+ * need to call the arp_out() function in the callback function
* before sending the packet:
*
* int driver_callback(struct uip_driver_dev *dev)
* {
* if (dev->d_len > 0)
* {
- * uip_arp_out();
+ * arp_out();
* devicedriver_send();
* return 1; <-- Terminates polling if necessary
* }
diff --git a/nuttx/net/arp/uip_arp.c b/nuttx/net/arp/arp_inout.c
index a58a1560a..78bebae6d 100644
--- a/nuttx/net/arp/uip_arp.c
+++ b/nuttx/net/arp/arp_inout.c
@@ -1,8 +1,8 @@
/****************************************************************************
- * net/arp/uip_arp.c
+ * net/arp/arm_inout.c
* Implementation of the ARP Address Resolution Protocol.
*
- * Copyright (C) 2007-2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2011, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Based on uIP which also has a BSD style license:
@@ -65,7 +65,7 @@
#include <net/ethernet.h>
#include <nuttx/net/uip/uipopt.h>
#include <nuttx/net/uip/uip-arch.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#ifdef CONFIG_NET_ARP
@@ -155,7 +155,7 @@ static const uint8_t g_multicast_ethaddr[3] = {0x01, 0x00, 0x5e};
****************************************************************************/
#if defined(CONFIG_NET_DUMPARP) && defined(CONFIG_DEBUG)
-static void uip_arp_dump(struct arp_hdr_s *arp)
+static void arp_dump(struct arp_hdr_s *arp)
{
nlldbg(" HW type: %04x Protocol: %04x\n",
arp->ah_hwtype, arp->ah_protocol);\
@@ -173,7 +173,7 @@ static void uip_arp_dump(struct arp_hdr_s *arp)
arp->ah_dipaddr[1] & 0xff, arp->ah_dipaddr[1] >> 8);
}
#else
-# define uip_arp_dump(arp)
+# define arp_dump(arp)
#endif
/****************************************************************************
@@ -192,7 +192,7 @@ static void uip_arp_dump(struct arp_hdr_s *arp)
*/
#ifdef CONFIG_NET_ARP_IPIN
-void uip_arp_ipin(struct uip_driver_s *dev)
+void arp_ipin(struct uip_driver_s *dev)
{
in_addr_t srcipaddr;
@@ -203,7 +203,7 @@ void uip_arp_ipin(struct uip_driver_s *dev)
srcipaddr = uip_ip4addr_conv(IPBUF->eh_srcipaddr);
if (uip_ipaddr_maskcmp(srcipaddr, dev->d_ipaddr, dev->d_netmask))
{
- uip_arp_update(IPBUF->eh_srcipaddr, ETHBUF->src);
+ arp_update(IPBUF->eh_srcipaddr, ETHBUF->src);
}
}
#endif /* CONFIG_NET_ARP_IPIN */
@@ -229,7 +229,7 @@ void uip_arp_ipin(struct uip_driver_s *dev)
* variable d_len.
*/
-void uip_arp_arpin(struct uip_driver_s *dev)
+void arp_arpin(struct uip_driver_s *dev)
{
struct arp_hdr_s *parp = ARPBUF;
in_addr_t ipaddr;
@@ -260,7 +260,7 @@ void uip_arp_arpin(struct uip_driver_s *dev)
* with this host in the future.
*/
- uip_arp_update(parp->ah_sipaddr, parp->ah_shwaddr);
+ arp_update(parp->ah_sipaddr, parp->ah_shwaddr);
parp->ah_opcode = HTONS(ARP_REPLY);
memcpy(parp->ah_dhwaddr, parp->ah_shwaddr, ETHER_ADDR_LEN);
@@ -271,7 +271,7 @@ void uip_arp_arpin(struct uip_driver_s *dev)
parp->ah_dipaddr[0] = parp->ah_sipaddr[0];
parp->ah_dipaddr[1] = parp->ah_sipaddr[1];
uiphdr_ipaddr_copy(parp->ah_sipaddr, &dev->d_ipaddr);
- uip_arp_dump(parp);
+ arp_dump(parp);
peth->type = HTONS(UIP_ETHTYPE_ARP);
dev->d_len = sizeof(struct arp_hdr_s) + UIP_LLH_LEN;
@@ -287,7 +287,7 @@ void uip_arp_arpin(struct uip_driver_s *dev)
if (uip_ipaddr_cmp(ipaddr, dev->d_ipaddr))
{
- uip_arp_update(parp->ah_sipaddr, parp->ah_shwaddr);
+ arp_update(parp->ah_sipaddr, parp->ah_shwaddr);
}
break;
}
@@ -318,7 +318,7 @@ void uip_arp_arpin(struct uip_driver_s *dev)
* buffer, and the length of the packet is in the field d_len.
*/
-void uip_arp_out(struct uip_driver_s *dev)
+void arp_out(struct uip_driver_s *dev)
{
const struct arp_entry *tabptr = NULL;
struct arp_hdr_s *parp = ARPBUF;
@@ -399,7 +399,7 @@ void uip_arp_out(struct uip_driver_s *dev)
/* Check if we already have this destination address in the ARP table */
- tabptr = uip_arp_find(ipaddr);
+ tabptr = arp_find(ipaddr);
if (!tabptr)
{
nllvdbg("ARP request for IP %04lx\n", (long)ipaddr);
@@ -421,7 +421,7 @@ void uip_arp_out(struct uip_driver_s *dev)
parp->ah_protocol = HTONS(UIP_ETHTYPE_IP);
parp->ah_hwlen = ETHER_ADDR_LEN;
parp->ah_protolen = 4;
- uip_arp_dump(parp);
+ arp_dump(parp);
peth->type = HTONS(UIP_ETHTYPE_ARP);
dev->d_len = sizeof(struct arp_hdr_s) + UIP_LLH_LEN;
diff --git a/nuttx/net/arp/uip_arptab.c b/nuttx/net/arp/arp_table.c
index 96a0f19b5..b4d7ac684 100644
--- a/nuttx/net/arp/uip_arptab.c
+++ b/nuttx/net/arp/arp_table.c
@@ -1,8 +1,8 @@
/****************************************************************************
- * net/arp/uip_arptab.c
+ * net/arp/arp_table.c
* Implementation of the ARP Address Resolution Protocol.
*
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2011, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Based originally on uIP which also has a BSD style license:
@@ -55,7 +55,7 @@
#include <net/ethernet.h>
#include <nuttx/net/uip/uipopt.h>
#include <nuttx/net/uip/uip-arch.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#ifdef CONFIG_NET_ARP
@@ -85,7 +85,7 @@ static uint8_t g_arptime;
****************************************************************************/
/****************************************************************************
- * Name: uip_arp_init
+ * Name: arp_init
*
* Description:
* Initialize the ARP module. This function must be called before any of
@@ -93,7 +93,7 @@ static uint8_t g_arptime;
*
****************************************************************************/
-void uip_arp_init(void)
+void arp_init(void)
{
int i;
for (i = 0; i < CONFIG_NET_ARPTAB_SIZE; ++i)
@@ -103,7 +103,7 @@ void uip_arp_init(void)
}
/****************************************************************************
- * Name: uip_arp_timer
+ * Name: arp_timer
*
* Description:
* This function performs periodic timer processing in the ARP module
@@ -113,7 +113,7 @@ void uip_arp_init(void)
*
****************************************************************************/
-void uip_arp_timer(void)
+void arp_timer(void)
{
struct arp_entry *tabptr;
int i;
@@ -130,7 +130,7 @@ void uip_arp_timer(void)
}
/****************************************************************************
- * Name: uip_arp_update
+ * Name: arp_update
*
* Description:
* Add the IP/HW address mapping to the ARP table -OR- change the IP
@@ -145,7 +145,7 @@ void uip_arp_timer(void)
*
****************************************************************************/
-void uip_arp_update(uint16_t *pipaddr, uint8_t *ethaddr)
+void arp_update(uint16_t *pipaddr, uint8_t *ethaddr)
{
struct arp_entry *tabptr = NULL;
in_addr_t ipaddr = uip_ip4addr_conv(pipaddr);
@@ -225,7 +225,7 @@ void uip_arp_update(uint16_t *pipaddr, uint8_t *ethaddr)
}
/****************************************************************************
- * Name: uip_arp_find
+ * Name: arp_find
*
* Description:
* Find the ARP entry corresponding to this IP address.
@@ -239,7 +239,7 @@ void uip_arp_update(uint16_t *pipaddr, uint8_t *ethaddr)
*
****************************************************************************/
-struct arp_entry *uip_arp_find(in_addr_t ipaddr)
+struct arp_entry *arp_find(in_addr_t ipaddr)
{
struct arp_entry *tabptr;
int i;
diff --git a/nuttx/net/net_arptimer.c b/nuttx/net/arp/arp_timer.c
index 2c5d33c91..d6f105ac1 100644
--- a/nuttx/net/net_arptimer.c
+++ b/nuttx/net/arp/arp_timer.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * net/net_arptimer.c
+ * net/arp/arp_timer.c
*
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2011, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -46,7 +46,7 @@
#include <debug.h>
#include <nuttx/net/uip/uipopt.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include "net_internal.h"
@@ -93,7 +93,7 @@ static void arptimer_poll(int argc, uint32_t arg, ...)
{
/* Call the ARP timer function every 10 seconds. */
- uip_arp_timer();
+ arp_timer();
/* Setup the watchdog timer again */
@@ -105,7 +105,7 @@ static void arptimer_poll(int argc, uint32_t arg, ...)
****************************************************************************/
/****************************************************************************
- * Function: arptimer_init
+ * Function: arp_timer_init
*
* Description:
* Initialized the 10 second timer that is need by uIP to age ARP
@@ -122,7 +122,7 @@ static void arptimer_poll(int argc, uint32_t arg, ...)
*
****************************************************************************/
-void arptimer_init(void)
+void arp_timer_init(void)
{
/* Create and start the ARP timer */
diff --git a/nuttx/net/net_internal.h b/nuttx/net/net_internal.h
index abea7ccfe..d8691aaee 100644
--- a/nuttx/net/net_internal.h
+++ b/nuttx/net/net_internal.h
@@ -225,14 +225,6 @@ void netdev_rxnotify(const uip_ipaddr_t addr);
int netdev_count(void);
#endif
-/* net_arptimer.c ************************************************************/
-
-#ifdef CONFIG_NET_ARP
-void arptimer_init(void);
-#else
-# define arptimer_init()
-#endif
-
/* send.c ********************************************************************/
ssize_t psock_send(FAR struct socket *psock, FAR const void *buf, size_t len,
diff --git a/nuttx/net/net_send_buffered.c b/nuttx/net/net_send_buffered.c
index c7263a675..f54079f39 100644
--- a/nuttx/net/net_send_buffered.c
+++ b/nuttx/net/net_send_buffered.c
@@ -56,13 +56,9 @@
#include <arch/irq.h>
#include <nuttx/clock.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
-#ifdef CONFIG_NET_ARP_IPIN
-# include <nuttx/net/uip/uip-arp.h>
-#endif
-
#include "net_internal.h"
#include "uip/uip_internal.h"
@@ -275,7 +271,7 @@ static uint16_t send_interrupt(FAR struct uip_driver_s *dev, FAR void *pvconn,
*/
#if defined(CONFIG_NET_ETHERNET) && !defined(CONFIG_NET_ARP_IPIN)
- if (uip_arp_find(conn->ripaddr) != NULL)
+ if (arp_find(conn->ripaddr) != NULL)
#endif
{
FAR struct uip_wrbuffer_s *segment;
diff --git a/nuttx/net/net_send_unbuffered.c b/nuttx/net/net_send_unbuffered.c
index 7d5a3e33a..db192d48f 100644
--- a/nuttx/net/net_send_unbuffered.c
+++ b/nuttx/net/net_send_unbuffered.c
@@ -52,13 +52,9 @@
#include <arch/irq.h>
#include <nuttx/clock.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
-#ifdef CONFIG_NET_ARP_IPIN
-# include <nuttx/net/uip/uip-arp.h>
-#endif
-
#include "net_internal.h"
#include "uip/uip_internal.h"
@@ -392,7 +388,7 @@ static uint16_t send_interrupt(FAR struct uip_driver_s *dev, FAR void *pvconn,
*/
#if defined(CONFIG_NET_ETHERNET) && !defined(CONFIG_NET_ARP_IPIN)
- if (pstate->snd_sent != 0 || uip_arp_find(conn->ripaddr) != NULL)
+ if (pstate->snd_sent != 0 || arp_find(conn->ripaddr) != NULL)
#endif
{
/* Update the amount of data sent (but not necessarily ACKed) */
diff --git a/nuttx/net/net_sendfile.c b/nuttx/net/net_sendfile.c
index 81dbbada9..124336b73 100644
--- a/nuttx/net/net_sendfile.c
+++ b/nuttx/net/net_sendfile.c
@@ -58,7 +58,7 @@
#include <arch/irq.h>
#include <nuttx/clock.h>
#include <nuttx/fs/fs.h>
-#include <nuttx/net/uip/uip-arp.h>
+#include <nuttx/net/arp.h>
#include <nuttx/net/uip/uip-arch.h>
#include "net_internal.h"
@@ -321,7 +321,7 @@ static uint16_t sendfile_interrupt(FAR struct uip_driver_s *dev, FAR void *pvcon
*/
#if defined(CONFIG_NET_ETHERNET) && !defined (CONFIG_NET_ARP_IPIN)
- if (pstate->snd_sent != 0 || uip_arp_find(conn->ripaddr) != NULL)
+ if (pstate->snd_sent != 0 || arp_find(conn->ripaddr) != NULL)
#endif
{
/* Update the amount of data sent (but not necessarily ACKed) */
diff --git a/nuttx/net/net_sockets.c b/nuttx/net/net_sockets.c
index a81620a71..ae5463352 100644
--- a/nuttx/net/net_sockets.c
+++ b/nuttx/net/net_sockets.c
@@ -118,7 +118,7 @@ void net_initialize(void)
/* Initialize the periodic ARP timer */
- arptimer_init();
+ arp_timer_init();
}
#if CONFIG_NSOCKET_DESCRIPTORS > 0