summaryrefslogtreecommitdiffstats
path: root/freebsd/sbin/ifconfig
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-09 22:52:54 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-10 09:08:23 +0200
commite599318e912d8836c59d8b5202e3e31a6b8dcae9 (patch)
tree1172b8b830a1c3236e45c834c2b80e01325ea144 /freebsd/sbin/ifconfig
parentMove files to match FreeBSD layout (diff)
downloadrtems-libbsd-e599318e912d8836c59d8b5202e3e31a6b8dcae9.tar.bz2
Update files to match FreeBSD layout
Add compatibility with Newlib header files. Some FreeBSD header files are mapped by the translation script: o rtems/bsd/sys/_types.h o rtems/bsd/sys/errno.h o rtems/bsd/sys/lock.h o rtems/bsd/sys/param.h o rtems/bsd/sys/resource.h o rtems/bsd/sys/time.h o rtems/bsd/sys/timespec.h o rtems/bsd/sys/types.h o rtems/bsd/sys/unistd.h It is now possible to include <sys/socket.h> directly for example. Generate one Makefile which builds everything including tests.
Diffstat (limited to 'freebsd/sbin/ifconfig')
-rw-r--r--freebsd/sbin/ifconfig/af_atalk.c2
-rw-r--r--freebsd/sbin/ifconfig/af_inet.c11
-rw-r--r--freebsd/sbin/ifconfig/af_inet6.c11
-rw-r--r--freebsd/sbin/ifconfig/af_link.c6
-rw-r--r--freebsd/sbin/ifconfig/af_nd6.c11
-rw-r--r--freebsd/sbin/ifconfig/ifbridge.c10
-rw-r--r--freebsd/sbin/ifconfig/ifcarp.c6
-rw-r--r--freebsd/sbin/ifconfig/ifclone.c6
-rw-r--r--freebsd/sbin/ifconfig/ifconfig.c17
-rw-r--r--freebsd/sbin/ifconfig/ifconfig.h4
-rw-r--r--freebsd/sbin/ifconfig/ifgif.c6
-rw-r--r--freebsd/sbin/ifconfig/ifgre.c6
-rw-r--r--freebsd/sbin/ifconfig/ifgroup.c2
-rw-r--r--freebsd/sbin/ifconfig/ifieee80211.c16
-rw-r--r--freebsd/sbin/ifconfig/iflagg.c6
-rw-r--r--freebsd/sbin/ifconfig/ifmac.c6
-rw-r--r--freebsd/sbin/ifconfig/ifmedia.c13
-rw-r--r--freebsd/sbin/ifconfig/ifpfsync.c7
-rw-r--r--freebsd/sbin/ifconfig/ifvlan.c7
-rw-r--r--freebsd/sbin/ifconfig/regdomain.h5
20 files changed, 21 insertions, 137 deletions
diff --git a/freebsd/sbin/ifconfig/af_atalk.c b/freebsd/sbin/ifconfig/af_atalk.c
index c50e0fd1..4890ded9 100644
--- a/freebsd/sbin/ifconfig/af_atalk.c
+++ b/freebsd/sbin/ifconfig/af_atalk.c
@@ -32,7 +32,7 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
-#include <sys/types.h>
+#include <rtems/bsd/sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>
diff --git a/freebsd/sbin/ifconfig/af_inet.c b/freebsd/sbin/ifconfig/af_inet.c
index 65488a35..3ef6c1a1 100644
--- a/freebsd/sbin/ifconfig/af_inet.c
+++ b/freebsd/sbin/ifconfig/af_inet.c
@@ -32,7 +32,7 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
-#include <sys/types.h>
+#include <rtems/bsd/sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>
@@ -46,22 +46,13 @@ static const char rcsid[] =
#include <ifaddrs.h>
#include <netinet/in.h>
-#ifdef __rtems__
-#include <freebsd/net/if_var.h> /* for struct ifaddr */
-#include <freebsd/netinet/in_var.h>
-#else
#include <net/if_var.h> /* for struct ifaddr */
#include <netinet/in_var.h>
-#endif
#include <arpa/inet.h>
#include <netdb.h>
#include "ifconfig.h"
-#ifdef __rtems__
-#include <freebsd/sys/sockio.h>
-#endif
-
static struct in_aliasreq in_addreq;
static struct ifreq in_ridreq;
diff --git a/freebsd/sbin/ifconfig/af_inet6.c b/freebsd/sbin/ifconfig/af_inet6.c
index ff0df5b0..9eadbec1 100644
--- a/freebsd/sbin/ifconfig/af_inet6.c
+++ b/freebsd/sbin/ifconfig/af_inet6.c
@@ -32,7 +32,7 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
-#include <sys/param.h>
+#include <rtems/bsd/sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>
@@ -47,21 +47,12 @@ static const char rcsid[] =
#include <arpa/inet.h>
#include <netinet/in.h>
-#ifdef __rtems__
-#include <freebsd/net/if_var.h> /* for struct ifaddr */
-#include <freebsd/netinet/in_var.h>
-#else
#include <net/if_var.h> /* for struct ifaddr */
#include <netinet/in_var.h>
-#endif
#include <arpa/inet.h>
#include <netdb.h>
-#ifdef __rtems__
-#include <freebsd/netinet6/nd6.h> /* Define ND6_INFINITE_LIFETIME */
-#else
#include <netinet6/nd6.h> /* Define ND6_INFINITE_LIFETIME */
-#endif
#include "ifconfig.h"
diff --git a/freebsd/sbin/ifconfig/af_link.c b/freebsd/sbin/ifconfig/af_link.c
index 2de85045..b7a7fecf 100644
--- a/freebsd/sbin/ifconfig/af_link.c
+++ b/freebsd/sbin/ifconfig/af_link.c
@@ -32,7 +32,7 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
-#include <sys/types.h>
+#include <rtems/bsd/sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>
@@ -49,10 +49,6 @@ static const char rcsid[] =
#include "ifconfig.h"
-#ifdef __rtems__
-#include <freebsd/sys/sockio.h>
-#endif
-
static struct ifreq link_ridreq;
static void
diff --git a/freebsd/sbin/ifconfig/af_nd6.c b/freebsd/sbin/ifconfig/af_nd6.c
index 74820732..55adba49 100644
--- a/freebsd/sbin/ifconfig/af_nd6.c
+++ b/freebsd/sbin/ifconfig/af_nd6.c
@@ -28,7 +28,7 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
-#include <sys/param.h>
+#include <rtems/bsd/sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
@@ -46,21 +46,12 @@ static const char rcsid[] =
#include <arpa/inet.h>
#include <netinet/in.h>
-#ifdef __rtems__
-#include <freebsd/net/if_var.h>
-#include <freebsd/netinet/in_var.h>
-#else
#include <net/if_var.h>
#include <netinet/in_var.h>
-#endif
#include <arpa/inet.h>
#include <netdb.h>
-#ifdef __rtems__
-#include <freebsd/netinet6/nd6.h>
-#else
#include <netinet6/nd6.h>
-#endif
#include "ifconfig.h"
diff --git a/freebsd/sbin/ifconfig/ifbridge.c b/freebsd/sbin/ifconfig/ifbridge.c
index 049a0e7c..98df1820 100644
--- a/freebsd/sbin/ifconfig/ifbridge.c
+++ b/freebsd/sbin/ifconfig/ifbridge.c
@@ -38,7 +38,7 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
-#include <sys/param.h>
+#include <rtems/bsd/sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/sockio.h>
@@ -48,11 +48,7 @@ static const char rcsid[] =
#include <net/ethernet.h>
#include <net/if.h>
-#ifdef __rtems__
-#include <freebsd/net/if_bridgevar.h>
-#else
#include <net/if_bridgevar.h>
-#endif
#include <net/route.h>
#include <ctype.h>
@@ -65,10 +61,6 @@ static const char rcsid[] =
#include "ifconfig.h"
-#ifdef __rtems__
-#include <freebsd/sys/sockio.h>
-#endif
-
#define PV2ID(pv, epri, eaddr) do { \
epri = pv >> 48; \
eaddr[0] = pv >> 40; \
diff --git a/freebsd/sbin/ifconfig/ifcarp.c b/freebsd/sbin/ifconfig/ifcarp.c
index 6c8c5a1b..89128a09 100644
--- a/freebsd/sbin/ifconfig/ifcarp.c
+++ b/freebsd/sbin/ifconfig/ifcarp.c
@@ -27,7 +27,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <rtems/bsd/sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/sockio.h>
@@ -37,11 +37,7 @@
#include <net/ethernet.h>
#include <net/if.h>
-#ifdef __rtems__
-#include <freebsd/netinet/ip_carp.h>
-#else
#include <netinet/ip_carp.h>
-#endif
#include <net/route.h>
#include <ctype.h>
diff --git a/freebsd/sbin/ifconfig/ifclone.c b/freebsd/sbin/ifconfig/ifclone.c
index 7929208b..2d49780d 100644
--- a/freebsd/sbin/ifconfig/ifclone.c
+++ b/freebsd/sbin/ifconfig/ifclone.c
@@ -33,7 +33,7 @@ static const char rcsid[] =
#endif /* not lint */
#include <sys/queue.h>
-#include <sys/types.h>
+#include <rtems/bsd/sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>
@@ -46,10 +46,6 @@ static const char rcsid[] =
#include "ifconfig.h"
-#ifdef __rtems__
-#include <freebsd/sys/sockio.h>
-#endif
-
static void
list_cloners(void)
{
diff --git a/freebsd/sbin/ifconfig/ifconfig.c b/freebsd/sbin/ifconfig/ifconfig.c
index afc952af..5ea94671 100644
--- a/freebsd/sbin/ifconfig/ifconfig.c
+++ b/freebsd/sbin/ifconfig/ifconfig.c
@@ -45,36 +45,23 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
-#include <sys/param.h>
+#include <rtems/bsd/sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
-#include <sys/time.h>
-#ifdef __rtems__
-#include <freebsd/sys/module.h>
-#include <freebsd/sys/linker.h>
-#else
+#include <rtems/bsd/sys/time.h>
#include <sys/module.h>
#include <sys/linker.h>
-#endif
#include <net/ethernet.h>
#include <net/if.h>
-#ifdef __rtems__
-#include <freebsd/net/if_var.h>
-#else
#include <net/if_var.h>
-#endif
#include <net/if_dl.h>
#include <net/if_types.h>
#include <net/route.h>
/* IP */
#include <netinet/in.h>
-#ifdef __rtems__
-#include <freebsd/netinet/in_var.h>
-#else
#include <netinet/in_var.h>
-#endif
#include <arpa/inet.h>
#include <netdb.h>
diff --git a/freebsd/sbin/ifconfig/ifconfig.h b/freebsd/sbin/ifconfig/ifconfig.h
index 479bc2ad..150367f7 100644
--- a/freebsd/sbin/ifconfig/ifconfig.h
+++ b/freebsd/sbin/ifconfig/ifconfig.h
@@ -34,10 +34,6 @@
* $FreeBSD$
*/
-#ifdef __rtems__
-#include <freebsd/sys/sockio.h>
-#endif
-
#define __constructor __attribute__((constructor))
struct afswtch;
diff --git a/freebsd/sbin/ifconfig/ifgif.c b/freebsd/sbin/ifconfig/ifgif.c
index d23b384b..1fe6f426 100644
--- a/freebsd/sbin/ifconfig/ifgif.c
+++ b/freebsd/sbin/ifconfig/ifgif.c
@@ -28,7 +28,7 @@ static const char rcsid[] =
"$FreeBSD$";
#endif
-#include <sys/param.h>
+#include <rtems/bsd/sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/sockio.h>
@@ -38,11 +38,7 @@ static const char rcsid[] =
#include <net/ethernet.h>
#include <net/if.h>
-#ifdef __rtems__
-#include <freebsd/net/if_gif.h>
-#else
#include <net/if_gif.h>
-#endif
#include <net/route.h>
#include <ctype.h>
diff --git a/freebsd/sbin/ifconfig/ifgre.c b/freebsd/sbin/ifconfig/ifgre.c
index 58d5bcf5..db871e3d 100644
--- a/freebsd/sbin/ifconfig/ifgre.c
+++ b/freebsd/sbin/ifconfig/ifgre.c
@@ -28,7 +28,7 @@ static const char rcsid[] =
"$FreeBSD$";
#endif
-#include <sys/param.h>
+#include <rtems/bsd/sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/sockio.h>
@@ -38,11 +38,7 @@ static const char rcsid[] =
#include <net/ethernet.h>
#include <net/if.h>
-#ifdef __rtems__
-#include <freebsd/net/if_gre.h>
-#else
#include <net/if_gre.h>
-#endif
#include <net/route.h>
#include <ctype.h>
diff --git a/freebsd/sbin/ifconfig/ifgroup.c b/freebsd/sbin/ifconfig/ifgroup.c
index 2de03e73..0c328e94 100644
--- a/freebsd/sbin/ifconfig/ifgroup.c
+++ b/freebsd/sbin/ifconfig/ifgroup.c
@@ -28,7 +28,7 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
-#include <sys/types.h>
+#include <rtems/bsd/sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>
diff --git a/freebsd/sbin/ifconfig/ifieee80211.c b/freebsd/sbin/ifconfig/ifieee80211.c
index 57713ca4..a4bb59fb 100644
--- a/freebsd/sbin/ifconfig/ifieee80211.c
+++ b/freebsd/sbin/ifconfig/ifieee80211.c
@@ -64,36 +64,24 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <rtems/bsd/sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
-#include <sys/time.h>
+#include <rtems/bsd/sys/time.h>
#include <net/ethernet.h>
#include <net/if.h>
#include <net/if_dl.h>
#include <net/if_types.h>
-#ifdef __rtems__
-#include <freebsd/net/if_media.h>
-#else
#include <net/if_media.h>
-#endif
#include <net/route.h>
-#ifdef __rtems__
-#include <freebsd/net80211/ieee80211_ioctl.h>
-#include <freebsd/net80211/ieee80211_freebsd.h>
-#include <freebsd/net80211/ieee80211_superg.h>
-#include <freebsd/net80211/ieee80211_tdma.h>
-#include <freebsd/net80211/ieee80211_mesh.h>
-#else
#include <net80211/ieee80211_ioctl.h>
#include <net80211/ieee80211_freebsd.h>
#include <net80211/ieee80211_superg.h>
#include <net80211/ieee80211_tdma.h>
#include <net80211/ieee80211_mesh.h>
-#endif
#include <assert.h>
#include <ctype.h>
diff --git a/freebsd/sbin/ifconfig/iflagg.c b/freebsd/sbin/ifconfig/iflagg.c
index 4204d929..d2b62122 100644
--- a/freebsd/sbin/ifconfig/iflagg.c
+++ b/freebsd/sbin/ifconfig/iflagg.c
@@ -6,7 +6,7 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
-#include <sys/param.h>
+#include <rtems/bsd/sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/sockio.h>
@@ -16,11 +16,7 @@ static const char rcsid[] =
#include <net/ethernet.h>
#include <net/if.h>
-#ifdef __rtems__
-#include <freebsd/net/if_lagg.h>
-#else
#include <net/if_lagg.h>
-#endif
#include <net/route.h>
#include <ctype.h>
diff --git a/freebsd/sbin/ifconfig/ifmac.c b/freebsd/sbin/ifconfig/ifmac.c
index 31d40b13..be7787c0 100644
--- a/freebsd/sbin/ifconfig/ifmac.c
+++ b/freebsd/sbin/ifconfig/ifmac.c
@@ -34,13 +34,9 @@
* $FreeBSD$
*/
-#include <sys/param.h>
+#include <rtems/bsd/sys/param.h>
#include <sys/ioctl.h>
-#ifdef __rtems__
-#include <freebsd/sys/mac.h>
-#else
#include <sys/mac.h>
-#endif
#include <sys/socket.h>
#include <sys/sockio.h>
diff --git a/freebsd/sbin/ifconfig/ifmedia.c b/freebsd/sbin/ifconfig/ifmedia.c
index ebca67de..518bcc4f 100644
--- a/freebsd/sbin/ifconfig/ifmedia.c
+++ b/freebsd/sbin/ifconfig/ifmedia.c
@@ -66,25 +66,16 @@
* SUCH DAMAGE.
*/
-
-#include <sys/param.h>
+#include <rtems/bsd/sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
-#include <sys/time.h>
+#include <rtems/bsd/sys/time.h>
#include <net/if.h>
#include <net/if_dl.h>
#include <net/if_types.h>
-
-#ifdef __rtems__
-#define _KERNEL
-#include <freebsd/net/if_media.h>
-#undef _KERNEL
-#else
#include <net/if_media.h>
-#endif
-
#include <net/route.h>
#include <ctype.h>
diff --git a/freebsd/sbin/ifconfig/ifpfsync.c b/freebsd/sbin/ifconfig/ifpfsync.c
index 886a75e6..c0b86a9b 100644
--- a/freebsd/sbin/ifconfig/ifpfsync.c
+++ b/freebsd/sbin/ifconfig/ifpfsync.c
@@ -26,19 +26,14 @@
* $FreeBSD$
*/
-#include <sys/types.h>
+#include <rtems/bsd/sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
-#ifdef __rtems__
-#include <freebsd/net/pfvar.h>
-#include <freebsd/net/if_pfsync.h>
-#else
#include <net/pfvar.h>
#include <net/if_pfsync.h>
-#endif
#include <net/route.h>
#include <arpa/inet.h>
diff --git a/freebsd/sbin/ifconfig/ifvlan.c b/freebsd/sbin/ifconfig/ifvlan.c
index 8ec3766f..b8f761d4 100644
--- a/freebsd/sbin/ifconfig/ifvlan.c
+++ b/freebsd/sbin/ifconfig/ifvlan.c
@@ -30,7 +30,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <rtems/bsd/sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/sockio.h>
@@ -40,13 +40,8 @@
#include <net/ethernet.h>
#include <net/if.h>
-#ifdef __rtems__
-#include <freebsd/net/if_var.h>
-#include <freebsd/net/if_vlan_var.h>
-#else
#include <net/if_var.h>
#include <net/if_vlan_var.h>
-#endif
#include <net/route.h>
#include <ctype.h>
diff --git a/freebsd/sbin/ifconfig/regdomain.h b/freebsd/sbin/ifconfig/regdomain.h
index 81588752..cfc2be02 100644
--- a/freebsd/sbin/ifconfig/regdomain.h
+++ b/freebsd/sbin/ifconfig/regdomain.h
@@ -30,12 +30,7 @@
#include <sys/cdefs.h>
#include <sys/queue.h>
-#ifdef __rtems__
-#include <freebsd/net80211/ieee80211_regdomain.h>
-#else
#include <net80211/ieee80211_regdomain.h>
-#endif
-
__BEGIN_DECLS