This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new cfc005a46 arp: Remove the unnecessary inclusion of nuttx/net/arp
cfc005a46 is described below
commit cfc005a4604f429dc683bd4eb303aec586c442b5
Author: Xiang Xiao <[email protected]>
AuthorDate: Thu Dec 15 18:57:43 2022 +0800
arp: Remove the unnecessary inclusion of nuttx/net/arp
and change the remain inclusion to netinet/arp.h
Signed-off-by: Xiang Xiao <[email protected]>
---
examples/bridge/bridge_main.c | 2 --
examples/discover/discover_main.c | 1 -
examples/netlink_route/netlink_route_main.c | 2 +-
examples/tcpecho/tcpecho_main.c | 5 -----
examples/thttpd/thttpd_main.c | 1 -
examples/webserver/webserver_main.c | 1 -
examples/xmlrpc/xmlrpc_main.c | 5 -----
netutils/netlib/netlib_delarp.c | 2 +-
netutils/netlib/netlib_getarp.c | 2 +-
netutils/netlib/netlib_getarptab.c | 3 +--
netutils/netlib/netlib_getdevs.c | 2 --
netutils/netlib/netlib_setarp.c | 2 +-
nshlib/nsh_netcmds.c | 5 +----
wireless/wapi/src/wireless.c | 2 +-
14 files changed, 7 insertions(+), 28 deletions(-)
diff --git a/examples/bridge/bridge_main.c b/examples/bridge/bridge_main.c
index 7eb932c2b..35f35cdce 100644
--- a/examples/bridge/bridge_main.c
+++ b/examples/bridge/bridge_main.c
@@ -33,12 +33,10 @@
#include <arpa/inet.h>
#include <netinet/in.h>
-#include <nuttx/net/arp.h>
#include "netutils/netlib.h"
#if defined(CONFIG_EXAMPLES_BRIDGE_NET1_DHCPC) || \
defined(CONFIG_EXAMPLES_BRIDGE_NET2_DHCPC)
-# include <arpa/inet.h>
# include "netutils/dhcpc.h"
#endif
diff --git a/examples/discover/discover_main.c
b/examples/discover/discover_main.c
index d176e4fa5..9a3bfe3c8 100644
--- a/examples/discover/discover_main.c
+++ b/examples/discover/discover_main.c
@@ -31,7 +31,6 @@
#include <net/if.h>
#include <netinet/in.h>
-#include <nuttx/net/arp.h>
#include "netutils/netlib.h"
#include "netutils/discover.h"
diff --git a/examples/netlink_route/netlink_route_main.c
b/examples/netlink_route/netlink_route_main.c
index ed3c48106..6d3356a46 100644
--- a/examples/netlink_route/netlink_route_main.c
+++ b/examples/netlink_route/netlink_route_main.c
@@ -34,9 +34,9 @@
#include <net/if.h>
#include <net/route.h>
#include <net/ethernet.h>
+#include <netinet/arp.h>
#include <netinet/in.h>
-#include <nuttx/net/arp.h>
#include <nuttx/net/neighbor.h>
#include "netutils/netlib.h"
diff --git a/examples/tcpecho/tcpecho_main.c b/examples/tcpecho/tcpecho_main.c
index 3f39f5345..6524048b0 100644
--- a/examples/tcpecho/tcpecho_main.c
+++ b/examples/tcpecho/tcpecho_main.c
@@ -40,13 +40,8 @@
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <nuttx/net/arp.h>
#include "netutils/netlib.h"
-#ifdef CONFIG_EXAMPLES_TCPECHO_DHCPC
-# include <arpa/inet.h>
-#endif
-
/* Here we include the header file for the application(s) we use in
* our project as defined in the config/<board-name>/defconfig file
*/
diff --git a/examples/thttpd/thttpd_main.c b/examples/thttpd/thttpd_main.c
index ae9b82df8..fe51fb41d 100644
--- a/examples/thttpd/thttpd_main.c
+++ b/examples/thttpd/thttpd_main.c
@@ -38,7 +38,6 @@
#include <netinet/in.h>
#include <netinet/ether.h>
-#include <nuttx/net/arp.h>
#include "netutils/netlib.h"
#include "netutils/thttpd.h"
diff --git a/examples/webserver/webserver_main.c
b/examples/webserver/webserver_main.c
index 55a14534b..5e9a5f683 100644
--- a/examples/webserver/webserver_main.c
+++ b/examples/webserver/webserver_main.c
@@ -56,7 +56,6 @@
#include <net/if.h>
#include <netinet/in.h>
-#include <nuttx/net/arp.h>
#include "netutils/netlib.h"
#ifdef CONFIG_EXAMPLES_WEBSERVER_DHCPC
diff --git a/examples/xmlrpc/xmlrpc_main.c b/examples/xmlrpc/xmlrpc_main.c
index 555e3928a..dbd807353 100644
--- a/examples/xmlrpc/xmlrpc_main.c
+++ b/examples/xmlrpc/xmlrpc_main.c
@@ -65,14 +65,9 @@
#include <net/if.h>
#include <netinet/in.h>
-#include <nuttx/net/arp.h>
#include "netutils/netlib.h"
#include "netutils/xmlrpc.h"
-#ifdef CONFIG_EXAMPLES_XMLRPC_DHCPC
-# include <arpa/inet.h>
-#endif
-
/* Here we include the header file for the application(s) we use in
* our project as defined in the config/<board-name>/defconfig file
*/
diff --git a/netutils/netlib/netlib_delarp.c b/netutils/netlib/netlib_delarp.c
index b0275545c..77778ad42 100644
--- a/netutils/netlib/netlib_delarp.c
+++ b/netutils/netlib/netlib_delarp.c
@@ -33,10 +33,10 @@
#include <assert.h>
#include <errno.h>
+#include <netinet/arp.h>
#include <netinet/in.h>
#include <net/if.h>
-#include <nuttx/net/arp.h>
#include "netutils/netlib.h"
/****************************************************************************
diff --git a/netutils/netlib/netlib_getarp.c b/netutils/netlib/netlib_getarp.c
index c54accb0f..63ec03b0c 100644
--- a/netutils/netlib/netlib_getarp.c
+++ b/netutils/netlib/netlib_getarp.c
@@ -33,10 +33,10 @@
#include <assert.h>
#include <errno.h>
+#include <netinet/arp.h>
#include <netinet/in.h>
#include <net/if.h>
-#include <nuttx/net/arp.h>
#include "netutils/netlib.h"
/****************************************************************************
diff --git a/netutils/netlib/netlib_getarptab.c
b/netutils/netlib/netlib_getarptab.c
index 089e8e950..cd2969622 100644
--- a/netutils/netlib/netlib_getarptab.c
+++ b/netutils/netlib/netlib_getarptab.c
@@ -30,10 +30,9 @@
#include <string.h>
#include <errno.h>
+#include <netinet/arp.h>
#include <netpacket/netlink.h>
-#include <nuttx/net/arp.h>
-
#include "netutils/netlib.h"
#if defined(CONFIG_NET_ARP) && defined(CONFIG_NETLINK_ROUTE)
diff --git a/netutils/netlib/netlib_getdevs.c b/netutils/netlib/netlib_getdevs.c
index 08ce0723c..64260e4a0 100644
--- a/netutils/netlib/netlib_getdevs.c
+++ b/netutils/netlib/netlib_getdevs.c
@@ -33,8 +33,6 @@
#include <netpacket/netlink.h>
-#include <nuttx/net/arp.h>
-
#include "netutils/netlib.h"
#ifdef CONFIG_NETLINK_ROUTE
diff --git a/netutils/netlib/netlib_setarp.c b/netutils/netlib/netlib_setarp.c
index 2e0644164..edb566089 100644
--- a/netutils/netlib/netlib_setarp.c
+++ b/netutils/netlib/netlib_setarp.c
@@ -33,10 +33,10 @@
#include <assert.h>
#include <errno.h>
+#include <netinet/arp.h>
#include <netinet/in.h>
#include <net/if.h>
-#include <nuttx/net/arp.h>
#include "netutils/netlib.h"
/****************************************************************************
diff --git a/nshlib/nsh_netcmds.c b/nshlib/nsh_netcmds.c
index 3e1e4a4c3..8e804a710 100644
--- a/nshlib/nsh_netcmds.c
+++ b/nshlib/nsh_netcmds.c
@@ -53,6 +53,7 @@
#include <net/if.h>
#include <arpa/inet.h>
#include <netinet/in.h>
+#include <netinet/arp.h>
#include <netinet/ether.h>
#include <nuttx/irq.h>
@@ -71,10 +72,6 @@
# endif
#endif
-#ifdef CONFIG_NETLINK_ROUTE
-# include <nuttx/net/arp.h>
-#endif
-
#ifdef CONFIG_NETUTILS_NETLIB
# include "netutils/netlib.h"
#endif
diff --git a/wireless/wapi/src/wireless.c b/wireless/wapi/src/wireless.c
index 142b9b516..ee5e65882 100644
--- a/wireless/wapi/src/wireless.c
+++ b/wireless/wapi/src/wireless.c
@@ -44,8 +44,8 @@
#include <strings.h>
#include <math.h>
#include <errno.h>
+#include <netinet/arp.h>
-#include <nuttx/net/arp.h>
#include <nuttx/wireless/wireless.h>
#include "wireless/wapi.h"