summaryrefslogtreecommitdiff
path: root/networking/libiproute
diff options
context:
space:
mode:
authorEric Andersen2003-01-14 08:54:08 +0000
committerEric Andersen2003-01-14 08:54:08 +0000
commitab4e19afc66e13b6aac7429fdce95d2aa7cb15ae (patch)
tree712b347dc89d890fe0d5755ebbbe9c23eb891a4c /networking/libiproute
parent92a06d0943a7890b6e69d9ad955feb6d138713b7 (diff)
downloadbusybox-ab4e19afc66e13b6aac7429fdce95d2aa7cb15ae.zip
busybox-ab4e19afc66e13b6aac7429fdce95d2aa7cb15ae.tar.gz
Eliminate most instances where we use linux kernel headers
-Erik
Diffstat (limited to 'networking/libiproute')
-rw-r--r--networking/libiproute/iplink.c15
-rw-r--r--networking/libiproute/iptunnel.c9
-rw-r--r--networking/libiproute/ll_addr.c6
3 files changed, 19 insertions, 11 deletions
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c
index 3b2f4da..1cfaf6d 100644
--- a/networking/libiproute/iplink.c
+++ b/networking/libiproute/iplink.c
@@ -18,10 +18,15 @@
#include <string.h>
#include <unistd.h>
-#include <linux/if.h>
-#include <linux/if_packet.h>
+#include <net/if.h>
+#include <net/if_packet.h>
+#include <netpacket/packet.h>
+
+#if __GLIBC__ >=2 && __GLIBC_MINOR >= 1
+#include <net/ethernet.h>
+#else
#include <linux/if_ether.h>
-#include <linux/sockios.h>
+#endif
#include "rt_names.h"
#include "utils.h"
@@ -29,6 +34,10 @@
#include "libbb.h"
+
+/* take from linux/sockios.h */
+#define SIOCSIFNAME 0x8923 /* set interface name */
+
static int do_link;
static int on_off(char *msg)
diff --git a/networking/libiproute/iptunnel.c b/networking/libiproute/iptunnel.c
index dcf717e..1eb1779 100644
--- a/networking/libiproute/iptunnel.c
+++ b/networking/libiproute/iptunnel.c
@@ -25,10 +25,13 @@
#include <arpa/inet.h>
#include <netinet/ip.h>
+#include <netinet/in.h>
-#define sysinfo kernel_sysinfo
-#include <linux/if_arp.h>
-#undef sysinfo
+#include <net/if.h>
+#include <net/if_arp.h>
+
+#include <asm/types.h>
+#define __constant_htons htons
#include <linux/if_tunnel.h>
#include "rt_names.h"
diff --git a/networking/libiproute/ll_addr.c b/networking/libiproute/ll_addr.c
index 08d5b78..39e561f 100644
--- a/networking/libiproute/ll_addr.c
+++ b/networking/libiproute/ll_addr.c
@@ -11,11 +11,7 @@
#include <arpa/inet.h>
#include <string.h>
-
-#define sysinfo kernel_sysinfo
-#include <linux/if_arp.h>
-#undef sysinfo
-
+#include <net/if_arp.h>
#include "utils.h"
#include "libbb.h"