[BusyBox-cvs] busybox/networking/libiproute iplink.c,1.7,1.8 libnetlink.c,1.4,1.5 ll_proto.c,1.2,1.3 ll_types.c,1.2,1.3
Erik Andersen
andersen at busybox.net
Fri Jun 20 09:05:06 UTC 2003
- Previous message: [BusyBox-cvs] busybox/coreutils cut.c,1.25,1.26 date.c,1.39,1.40 dd.c,1.53,1.54 df.c,1.52,1.53 du.c,1.57,1.58 env.c,1.5,1.6 mkdir.c,1.34,1.35 mv.c,1.18,1.19 rm.c,1.36,1.37 stty.c,1.8,1.9 test.c,1.22,1.23
- Next message: [BusyBox-cvs] busybox/include libbb.h,1.99,1.100
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/cvs/busybox/networking/libiproute
In directory winder:/tmp/cvs-serv14819/networking/libiproute
Modified Files:
iplink.c libnetlink.c ll_proto.c ll_types.c
Log Message:
Patch from Lars Kellogg-Stedman:
I'm building BusyBox using a development kit for MontaVista Hardhat Linux
(PPC) -- which, at least in this instance, is based around kernel 2.2.14.
I've had to massage a few files in networking/libiproute/ to make it
compile. Specifically:
(1) Added a #include <sys/uio.h> for the iovec structure in
libnetlink.c,
(2) Put ifdefs in ll_types.c and ll_proto.c around various
constants (ETH_P_xxx and ARPHRD_xxx) that weren't defined,
(3) Make do_changename() in iplink.c require a kernel >=
2.4.0 -- the ifr structure in my environment doesn't
have the ifr_name attribute. I've assumed this is
a kernel dependency -- let me know if I ought to be
checking something else.
In the absence of the correct kernel, do_changename()
always returns 0.
Attached is a patch against the current CVS that will make these changes.
-- Lars
Index: iplink.c
===================================================================
RCS file: /var/cvs/busybox/networking/libiproute/iplink.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- iplink.c 19 Mar 2003 09:12:42 -0000 1.7
+++ iplink.c 20 Jun 2003 09:05:00 -0000 1.8
@@ -12,6 +12,7 @@
#include <sys/ioctl.h>
#include <sys/socket.h>
+#include <linux/version.h>
#include <errno.h>
#include <stdlib.h>
@@ -95,6 +96,7 @@
static int do_changename(char *dev, char *newdev)
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)
struct ifreq ifr;
int fd;
int err;
@@ -112,6 +114,8 @@
}
close(fd);
return err;
+#endif
+ return 0;
}
static int set_qlen(char *dev, int qlen)
Index: libnetlink.c
===================================================================
RCS file: /var/cvs/busybox/networking/libiproute/libnetlink.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- libnetlink.c 19 Mar 2003 09:12:42 -0000 1.4
+++ libnetlink.c 20 Jun 2003 09:05:00 -0000 1.5
@@ -18,6 +18,8 @@
#include <time.h>
#include <unistd.h>
+#include <sys/uio.h>
+
#include "libnetlink.h"
#include "libbb.h"
Index: ll_proto.c
===================================================================
RCS file: /var/cvs/busybox/networking/libiproute/ll_proto.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ll_proto.c 16 Dec 2002 07:37:21 -0000 1.2
+++ ll_proto.c 20 Jun 2003 09:05:00 -0000 1.3
@@ -51,10 +51,18 @@
__PF(AARP,aarp)
__PF(IPX,ipx)
__PF(IPV6,ipv6)
+#ifdef ETH_P_PPP_DISC
__PF(PPP_DISC,ppp_disc)
+#endif
+#ifdef ETH_P_PPP_SES
__PF(PPP_SES,ppp_ses)
+#endif
+#ifdef ETH_P_ATMMPOA
__PF(ATMMPOA,atmmpoa)
+#endif
+#ifdef ETH_P_ATMFATE
__PF(ATMFATE,atmfate)
+#endif
__PF(802_3,802_3)
__PF(AX25,ax25)
@@ -70,7 +78,9 @@
__PF(MOBITEX,mobitex)
__PF(CONTROL,control)
__PF(IRDA,irda)
+#ifdef ETH_P_ECONET
__PF(ECONET,econet)
+#endif
{ 0x8100, "802.1Q" },
{ ETH_P_IP, "ipv4" },
Index: ll_types.c
===================================================================
RCS file: /var/cvs/busybox/networking/libiproute/ll_types.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ll_types.c 16 Dec 2002 07:37:21 -0000 1.2
+++ ll_types.c 20 Jun 2003 09:05:00 -0000 1.3
@@ -34,7 +34,9 @@
__PF(ARCNET,arcnet)
__PF(APPLETLK,atalk)
__PF(DLCI,dlci)
+#ifdef ARPHRD_ATM
__PF(ATM,atm)
+#endif
__PF(METRICOM,metricom)
#ifdef ARPHRD_IEEE1394
__PF(IEEE1394,ieee1394)
@@ -48,12 +50,16 @@
__PF(ADAPT,adapt)
__PF(ROSE,rose)
__PF(X25,x25)
+#ifdef ARPHRD_HWX25
__PF(HWX25,hwx25)
+#endif
__PF(PPP,ppp)
__PF(HDLC,hdlc)
__PF(LAPB,lapb)
+#ifdef ARPHRD_DDCMP
__PF(DDCMP,ddcmp)
__PF(RAWHDLC,rawhdlc)
+#endif
__PF(TUNNEL,ipip)
__PF(TUNNEL6,tunnel6)
- Previous message: [BusyBox-cvs] busybox/coreutils cut.c,1.25,1.26 date.c,1.39,1.40 dd.c,1.53,1.54 df.c,1.52,1.53 du.c,1.57,1.58 env.c,1.5,1.6 mkdir.c,1.34,1.35 mv.c,1.18,1.19 rm.c,1.36,1.37 stty.c,1.8,1.9 test.c,1.22,1.23
- Next message: [BusyBox-cvs] busybox/include libbb.h,1.99,1.100
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the busybox-cvs
mailing list