DHCPD no longer calls directly into the OS, but uses network IOCTL commands to modify the ARP table. Plus, fix a warning.

This commit is contained in:
Gregory Nutt
2016-02-08 12:08:18 -06:00
parent 0af9a197ac
commit 166ad58849
2 changed files with 4 additions and 16 deletions
+2 -14
View File
@@ -1,4 +1,4 @@
NuttX TODO List (Last updated February 6, 2016) NuttX TODO List (Last updated February 8, 2016)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This file summarizes known NuttX bugs, limitations, inconsistencies with This file summarizes known NuttX bugs, limitations, inconsistencies with
@@ -30,7 +30,7 @@ nuttx/
apps/ apps/
(4) Network Utilities (apps/netutils/) (3) Network Utilities (apps/netutils/)
(3) NuttShell (NSH) (apps/nshlib) (3) NuttShell (NSH) (apps/nshlib)
(1) System libraries apps/system (apps/system) (1) System libraries apps/system (apps/system)
(4) Other Applications & Tests (apps/examples/) (4) Other Applications & Tests (apps/examples/)
@@ -1739,18 +1739,6 @@ o Network Utilities (apps/netutils/)
Status: Open. An annoyance, but not a real problem. Status: Open. An annoyance, but not a real problem.
Priority: Low Priority: Low
Title: DHCPD ACCESSES KERNEL PRIVATE INTERFACE
Description: arp_hdr_update() is referenced outside of nuttx/net. It is used in
in the netutils/ DHCPD logic to set entries in the ARP table.
That is violation of the separation of kernel and OS
functionality. As a consequence, dhcpd will not work with the
NuttX kernel built.
This direct OS call needs to be replaced with a network ioctl()
call.
Status: Open
Priority: Medium. Important for full functionality with kernel build.
Title: NETWORK MONITOR NOT GENERALLY AVAILABLE Title: NETWORK MONITOR NOT GENERALLY AVAILABLE
Description: The NSH network management logic has general applicability Description: The NSH network management logic has general applicability
but is currently useful only because it is embedded in the NSH but is currently useful only because it is embedded in the NSH
+2 -2
View File
@@ -182,13 +182,12 @@ int arp_update(in_addr_t ipaddr, FAR uint8_t *ethaddr)
memcpy(tabptr->at_ethaddr.ether_addr_octet, ethaddr, ETHER_ADDR_LEN); memcpy(tabptr->at_ethaddr.ether_addr_octet, ethaddr, ETHER_ADDR_LEN);
tabptr->at_time = g_arptime; tabptr->at_time = g_arptime;
return; return OK;
} }
} }
} }
/* If we get here, no existing ARP table entry was found, so we create one. */ /* If we get here, no existing ARP table entry was found, so we create one. */
/* First, we try to find an unused entry in the ARP table. */ /* First, we try to find an unused entry in the ARP table. */
for (i = 0; i < CONFIG_NET_ARPTAB_SIZE; ++i) for (i = 0; i < CONFIG_NET_ARPTAB_SIZE; ++i)
@@ -230,6 +229,7 @@ int arp_update(in_addr_t ipaddr, FAR uint8_t *ethaddr)
tabptr->at_ipaddr = ipaddr; tabptr->at_ipaddr = ipaddr;
memcpy(tabptr->at_ethaddr.ether_addr_octet, ethaddr, ETHER_ADDR_LEN); memcpy(tabptr->at_ethaddr.ether_addr_octet, ethaddr, ETHER_ADDR_LEN);
tabptr->at_time = g_arptime; tabptr->at_time = g_arptime;
return OK;
} }
/**************************************************************************** /****************************************************************************