summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Robbins <drobbins@gentoo.org>2001-10-01 22:35:25 +0000
committerDaniel Robbins <drobbins@gentoo.org>2001-10-01 22:35:25 +0000
commitb9b798bea4d3262e98ad74b987eedbbc50effb2d (patch)
tree1836dae3fac3db48916ebe335fd07347d49b165e /sys-apps
parentfixes. (diff)
downloadhistorical-b9b798bea4d3262e98ad74b987eedbbc50effb2d.tar.gz
historical-b9b798bea4d3262e98ad74b987eedbbc50effb2d.tar.bz2
historical-b9b798bea4d3262e98ad74b987eedbbc50effb2d.zip
fixo
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/iproute2/files/ll_types.c117
-rw-r--r--sys-apps/iproute2/iproute2-2.4.7.ebuild6
2 files changed, 122 insertions, 1 deletions
diff --git a/sys-apps/iproute2/files/ll_types.c b/sys-apps/iproute2/files/ll_types.c
new file mode 100644
index 000000000000..18ea9073c9bb
--- /dev/null
+++ b/sys-apps/iproute2/files/ll_types.c
@@ -0,0 +1,117 @@
+/*
+ * ll_types.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <syslog.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <linux/netdevice.h>
+#include <linux/if_arp.h>
+#include <linux/sockios.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <string.h>
+
+char * ll_type_n2a(int type, char *buf, int len)
+{
+#define __PF(f,n) { ARPHRD_##f, #n },
+static struct {
+ int type;
+ char *name;
+} arphrd_names[] = {
+{ 0, "generic" },
+__PF(ETHER,ether)
+__PF(EETHER,eether)
+__PF(AX25,ax25)
+__PF(PRONET,pronet)
+__PF(CHAOS,chaos)
+#ifdef ARPHRD_IEEE802_TR
+__PF(IEEE802,ieee802)
+#else
+__PF(IEEE802,tr)
+#endif
+__PF(ARCNET,arcnet)
+__PF(APPLETLK,atalk)
+__PF(DLCI,dlci)
+__PF(ATM,atm)
+__PF(METRICOM,metricom)
+#ifdef ARPHRD_IEEE1394_TR
+__PF(IEEE1394,ieee1394)
+#endif
+__PF(SLIP,slip)
+__PF(CSLIP,cslip)
+__PF(SLIP6,slip6)
+__PF(CSLIP6,cslip6)
+__PF(RSRVD,rsrvd)
+__PF(ADAPT,adapt)
+__PF(ROSE,rose)
+__PF(X25,x25)
+__PF(HWX25,hwx25)
+__PF(PPP,ppp)
+__PF(HDLC,hdlc)
+__PF(LAPB,lapb)
+__PF(DDCMP,ddcmp)
+__PF(RAWHDLC,rawhdlc)
+
+__PF(TUNNEL,ipip)
+__PF(TUNNEL6,tunnel6)
+__PF(FRAD,frad)
+__PF(SKIP,skip)
+__PF(LOOPBACK,loopback)
+__PF(LOCALTLK,ltalk)
+__PF(FDDI,fddi)
+__PF(BIF,bif)
+__PF(SIT,sit)
+__PF(IPDDP,ip/ddp)
+__PF(IPGRE,gre)
+__PF(PIMREG,pimreg)
+__PF(HIPPI,hippi)
+__PF(ASH,ash)
+__PF(ECONET,econet)
+__PF(IRDA,irda)
+__PF(FCPP,fcpp)
+__PF(FCAL,fcal)
+__PF(FCPL,fcpl)
+__PF(FCFABRIC,fcfb0)
+__PF(FCFABRIC+1,fcfb1)
+__PF(FCFABRIC+2,fcfb2)
+__PF(FCFABRIC+3,fcfb3)
+__PF(FCFABRIC+4,fcfb4)
+__PF(FCFABRIC+5,fcfb5)
+__PF(FCFABRIC+6,fcfb6)
+__PF(FCFABRIC+7,fcfb7)
+__PF(FCFABRIC+8,fcfb8)
+__PF(FCFABRIC+9,fcfb9)
+__PF(FCFABRIC+10,fcfb10)
+__PF(FCFABRIC+11,fcfb11)
+__PF(FCFABRIC+12,fcfb12)
+#ifdef ARPHRD_IEEE802_TR
+__PF(IEEE802_TR,tr)
+#endif
+__PF(IEEE80211,ieee802.11)
+#ifdef ARPHRD_VOID
+__PF(VOID,void)
+#endif
+};
+#undef __PF
+
+ int i;
+ for (i=0; i<sizeof(arphrd_names)/sizeof(arphrd_names[0]); i++) {
+ if (arphrd_names[i].type == type)
+ return arphrd_names[i].name;
+ }
+ snprintf(buf, len, "[%d]", type);
+ return buf;
+}
diff --git a/sys-apps/iproute2/iproute2-2.4.7.ebuild b/sys-apps/iproute2/iproute2-2.4.7.ebuild
index 9c440f79ce58..cade5336cdce 100644
--- a/sys-apps/iproute2/iproute2-2.4.7.ebuild
+++ b/sys-apps/iproute2/iproute2-2.4.7.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Daniel Robbins <drobbins@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-2.4.7.ebuild,v 1.1 2001/09/18 05:12:22 woodchip Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-2.4.7.ebuild,v 1.2 2001/10/01 22:35:24 drobbins Exp $
A=iproute2-2.4.7-now-ss010824.tar.gz
S=${WORKDIR}/iproute2
@@ -39,6 +39,10 @@ src_unpack() {
# this next thing is required to enable diffserv (ATM support doesn't compile right now)
# cp Config Config.orig
# sed -e 's/DIFFSERV=n/DIFFSERV=y/g' Config.orig > Config
+
+ #this fix optionally disables the IEEE1394 definition if it is not in the kernel headers
+ #This allows this pkg to work with earlier 2.4 kernel headers.
+ cp ${FILESDIR}/ll_types.c ${S}/lib
}
src_compile() {