summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-09-07 06:19:02 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-09-10 10:38:44 +0200
commitcb682532cf9927619a3c8d168253187140835cc6 (patch)
treeefb8abc9206b17b12fd97a8bb7a02b53c00fe452 /cpukit/libnetworking/rtems
parentnetwork: Remove man page installation (diff)
downloadrtems-cb682532cf9927619a3c8d168253187140835cc6.tar.bz2
network: Use kernel/user space header files
Add and use <machine/rtems-bsd-kernel-space.h> and <machine/rtems-bsd-user-space.h> similar to the libbsd to avoid command line defines and defines scattered throught the code base. Simplify cpukit/libnetworking/Makefile.am. Update #3375.
Diffstat (limited to 'cpukit/libnetworking/rtems')
-rw-r--r--cpukit/libnetworking/rtems/mkrootfs.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_bootp.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_bsdnet.h22
-rw-r--r--cpukit/libnetworking/rtems/rtems_bsdnet_malloc_starvation.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_dhcp.c17
-rw-r--r--cpukit/libnetworking/rtems/rtems_dhcp_failsafe.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_glue.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_malloc_mbuf.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_mii_ioctl.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_mii_ioctl_kern.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_select.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_showicmpstat.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_showifstat.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_showipstat.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_showmbuf.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_showroute.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_showtcpstat.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_showudpstat.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_socketpair.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_syscall.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_syscall_api.c2
-rw-r--r--cpukit/libnetworking/rtems/sghostname.c2
22 files changed, 43 insertions, 36 deletions
diff --git a/cpukit/libnetworking/rtems/mkrootfs.c b/cpukit/libnetworking/rtems/mkrootfs.c
index c110a62b0a..66d79750b7 100644
--- a/cpukit/libnetworking/rtems/mkrootfs.c
+++ b/cpukit/libnetworking/rtems/mkrootfs.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
/*
------------------------------------------------------------------------
diff --git a/cpukit/libnetworking/rtems/rtems_bootp.c b/cpukit/libnetworking/rtems/rtems_bootp.c
index 2743dc0a05..8446d6ade9 100644
--- a/cpukit/libnetworking/rtems/rtems_bootp.c
+++ b/cpukit/libnetworking/rtems/rtems_bootp.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/cpukit/libnetworking/rtems/rtems_bsdnet.h b/cpukit/libnetworking/rtems/rtems_bsdnet.h
index a97c058f78..74626378e3 100644
--- a/cpukit/libnetworking/rtems/rtems_bsdnet.h
+++ b/cpukit/libnetworking/rtems/rtems_bsdnet.h
@@ -17,28 +17,6 @@ extern "C" {
#endif
/*
- * If this file is included from inside the Network Stack proper or
- * a device driver, then __INSIDE_RTEMS_BSD_TCPIP_STACK__ should be
- * defined. This triggers a number of internally used definitions.
- */
-
-#if defined(__INSIDE_RTEMS_BSD_TCPIP_STACK__)
-#undef _KERNEL
-#undef INET
-#undef NFS
-#undef DIAGNOSTIC
-#undef BOOTP_COMPAT
-#undef __BSD_VISIBLE
-
-#define _KERNEL
-#define INET
-#define NFS
-#define DIAGNOSTIC
-#define BOOTP_COMPAT
-#define __BSD_VISIBLE 1
-#endif
-
-/*
* Values that may be obtained by BOOTP
*/
extern struct in_addr rtems_bsdnet_bootp_server_address;
diff --git a/cpukit/libnetworking/rtems/rtems_bsdnet_malloc_starvation.c b/cpukit/libnetworking/rtems/rtems_bsdnet_malloc_starvation.c
index 563ece810b..1744f714f6 100644
--- a/cpukit/libnetworking/rtems/rtems_bsdnet_malloc_starvation.c
+++ b/cpukit/libnetworking/rtems/rtems_bsdnet_malloc_starvation.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
/*
* Routine called when malloc() is not succeeding. This can be overridden
* by a BSP.
diff --git a/cpukit/libnetworking/rtems/rtems_dhcp.c b/cpukit/libnetworking/rtems/rtems_dhcp.c
index 13c06bc732..ca89b19fd5 100644
--- a/cpukit/libnetworking/rtems/rtems_dhcp.c
+++ b/cpukit/libnetworking/rtems/rtems_dhcp.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
/*
* DCHP client for RTEMS
* Andrew Bythell, <abythell@nortelnetworks.com>
@@ -54,20 +56,7 @@
*
*/
-/*
- * WARNING:
- * This file should be moved into c/src/libnetworking/nfs
- * and the following two #ifndef...#endif blocks and the #undefs at
- * the end of the file should be removed
- */
-
-#ifndef __INSIDE_RTEMS_BSD_TCPIP_STACK__
-#define __INSIDE_RTEMS_BSD_TCPIP_STACK__
-#endif
-
-#ifndef __BSD_VISIBLE
-#define __BSD_VISIBLE 1
-#endif
+#include <machine/rtems-bsd-kernel-space.h>
#if HAVE_CONFIG_H
#include "config.h"
diff --git a/cpukit/libnetworking/rtems/rtems_dhcp_failsafe.c b/cpukit/libnetworking/rtems/rtems_dhcp_failsafe.c
index acdec137fc..10ac661aee 100644
--- a/cpukit/libnetworking/rtems/rtems_dhcp_failsafe.c
+++ b/cpukit/libnetworking/rtems/rtems_dhcp_failsafe.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
/*
Description: Wrapper around DHCP client to restart it when the interface
moves to another network.
diff --git a/cpukit/libnetworking/rtems/rtems_glue.c b/cpukit/libnetworking/rtems/rtems_glue.c
index 1b3f3a6483..13b16c9113 100644
--- a/cpukit/libnetworking/rtems/rtems_glue.c
+++ b/cpukit/libnetworking/rtems/rtems_glue.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/cpukit/libnetworking/rtems/rtems_malloc_mbuf.c b/cpukit/libnetworking/rtems/rtems_malloc_mbuf.c
index 602876a76b..99b9dbae30 100644
--- a/cpukit/libnetworking/rtems/rtems_malloc_mbuf.c
+++ b/cpukit/libnetworking/rtems/rtems_malloc_mbuf.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/cpukit/libnetworking/rtems/rtems_mii_ioctl.c b/cpukit/libnetworking/rtems/rtems_mii_ioctl.c
index cb970caad3..2559f4b3c7 100644
--- a/cpukit/libnetworking/rtems/rtems_mii_ioctl.c
+++ b/cpukit/libnetworking/rtems/rtems_mii_ioctl.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
/* Simple (default) implementation for SIOCGIFMEDIA/SIOCSIFMEDIA
* to be used by ethernet drivers [from their ioctl].
*
diff --git a/cpukit/libnetworking/rtems/rtems_mii_ioctl_kern.c b/cpukit/libnetworking/rtems/rtems_mii_ioctl_kern.c
index 47d4de90db..2944f0add5 100644
--- a/cpukit/libnetworking/rtems/rtems_mii_ioctl_kern.c
+++ b/cpukit/libnetworking/rtems/rtems_mii_ioctl_kern.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
/* Simple (default) implementation for SIOCGIFMEDIA/SIOCSIFMEDIA
* to be used by ethernet drivers [from their ioctl].
*
diff --git a/cpukit/libnetworking/rtems/rtems_select.c b/cpukit/libnetworking/rtems/rtems_select.c
index eddb122d63..309aa020da 100644
--- a/cpukit/libnetworking/rtems/rtems_select.c
+++ b/cpukit/libnetworking/rtems/rtems_select.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/cpukit/libnetworking/rtems/rtems_showicmpstat.c b/cpukit/libnetworking/rtems/rtems_showicmpstat.c
index c5ba5528d9..1e44fcf73a 100644
--- a/cpukit/libnetworking/rtems/rtems_showicmpstat.c
+++ b/cpukit/libnetworking/rtems/rtems_showicmpstat.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/cpukit/libnetworking/rtems/rtems_showifstat.c b/cpukit/libnetworking/rtems/rtems_showifstat.c
index d13efa6129..cbab561001 100644
--- a/cpukit/libnetworking/rtems/rtems_showifstat.c
+++ b/cpukit/libnetworking/rtems/rtems_showifstat.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/cpukit/libnetworking/rtems/rtems_showipstat.c b/cpukit/libnetworking/rtems/rtems_showipstat.c
index 1040c71ef0..01a89bace6 100644
--- a/cpukit/libnetworking/rtems/rtems_showipstat.c
+++ b/cpukit/libnetworking/rtems/rtems_showipstat.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/cpukit/libnetworking/rtems/rtems_showmbuf.c b/cpukit/libnetworking/rtems/rtems_showmbuf.c
index 14aa79e733..247b1b1473 100644
--- a/cpukit/libnetworking/rtems/rtems_showmbuf.c
+++ b/cpukit/libnetworking/rtems/rtems_showmbuf.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/cpukit/libnetworking/rtems/rtems_showroute.c b/cpukit/libnetworking/rtems/rtems_showroute.c
index fb85ff2d3c..952bb7ee73 100644
--- a/cpukit/libnetworking/rtems/rtems_showroute.c
+++ b/cpukit/libnetworking/rtems/rtems_showroute.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/cpukit/libnetworking/rtems/rtems_showtcpstat.c b/cpukit/libnetworking/rtems/rtems_showtcpstat.c
index 403e3c9f3d..d4b4a98fb3 100644
--- a/cpukit/libnetworking/rtems/rtems_showtcpstat.c
+++ b/cpukit/libnetworking/rtems/rtems_showtcpstat.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/cpukit/libnetworking/rtems/rtems_showudpstat.c b/cpukit/libnetworking/rtems/rtems_showudpstat.c
index 285a5a69fc..1e3f294a48 100644
--- a/cpukit/libnetworking/rtems/rtems_showudpstat.c
+++ b/cpukit/libnetworking/rtems/rtems_showudpstat.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/cpukit/libnetworking/rtems/rtems_socketpair.c b/cpukit/libnetworking/rtems/rtems_socketpair.c
index 55734dd791..0a0ad2eadb 100644
--- a/cpukit/libnetworking/rtems/rtems_socketpair.c
+++ b/cpukit/libnetworking/rtems/rtems_socketpair.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
/*
* socketpair() for RTEMS
*
diff --git a/cpukit/libnetworking/rtems/rtems_syscall.c b/cpukit/libnetworking/rtems/rtems_syscall.c
index 5225b53beb..5fa0e7d10c 100644
--- a/cpukit/libnetworking/rtems/rtems_syscall.c
+++ b/cpukit/libnetworking/rtems/rtems_syscall.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/cpukit/libnetworking/rtems/rtems_syscall_api.c b/cpukit/libnetworking/rtems/rtems_syscall_api.c
index ac3ab6e4e2..7315a6c0f1 100644
--- a/cpukit/libnetworking/rtems/rtems_syscall_api.c
+++ b/cpukit/libnetworking/rtems/rtems_syscall_api.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/*
* Copyright (c) 2016 embedded brains GmbH. All rights reserved.
*
diff --git a/cpukit/libnetworking/rtems/sghostname.c b/cpukit/libnetworking/rtems/sghostname.c
index af383d41b9..9c756bcc31 100644
--- a/cpukit/libnetworking/rtems/sghostname.c
+++ b/cpukit/libnetworking/rtems/sghostname.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
/*
* RTEMS versions of hostname functions
* FIXME: Not thread-safe