diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-04-18 23:01:34 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-04-18 23:01:34 +0000 |
commit | 2079096b145542ffd12cc460f1b45588121a0109 (patch) | |
tree | 3d2d39394a9cb126a0a3aff7a0a7c3493a63a2c7 /sys-apps/iproute2 | |
parent | Initial commit for bug 127210. Thanks to <cygeus at gmail dot com>. (diff) | |
download | gentoo-2-2079096b145542ffd12cc460f1b45588121a0109.tar.gz gentoo-2-2079096b145542ffd12cc460f1b45588121a0109.tar.bz2 gentoo-2-2079096b145542ffd12cc460f1b45588121a0109.zip |
old
Diffstat (limited to 'sys-apps/iproute2')
24 files changed, 0 insertions, 2133 deletions
diff --git a/sys-apps/iproute2/files/2.4.7.20020116-hfsc.patch b/sys-apps/iproute2/files/2.4.7.20020116-hfsc.patch deleted file mode 100644 index 6c9e669673ef..000000000000 --- a/sys-apps/iproute2/files/2.4.7.20020116-hfsc.patch +++ /dev/null @@ -1,416 +0,0 @@ -diff -urN a/tc/Makefile b/tc/Makefile ---- a/tc/Makefile 2000-04-16 19:42:53.000000000 +0200 -+++ b/tc/Makefile 2004-01-04 23:24:39.000000000 +0100 -@@ -26,7 +26,7 @@ - - #TCMODULES += q_csz.o - #TCMODULES += q_hpfq.o --#TCMODULES += q_hfsc.o -+TCMODULES += q_hfsc.o - - TCOBJ += $(TCMODULES) - -diff -urN a/tc/q_hfsc.c b/tc/q_hfsc.c ---- a/tc/q_hfsc.c 2000-04-16 19:42:54.000000000 +0200 -+++ b/tc/q_hfsc.c 2004-01-25 14:42:43.000000000 +0100 -@@ -1,12 +1,12 @@ - /* -- * q_hfsc.c HFSC. -+ * q_hfsc.c HFSC. - * - * 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> -+ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>; Patrick McHardy, <kaber@trash.ner> - * - */ - -@@ -19,36 +19,247 @@ - #include <netinet/in.h> - #include <arpa/inet.h> - #include <string.h> -+#include <math.h> - - #include "utils.h" - #include "tc_util.h" - --static void explain() -+static int hfsc_get_sc(int *, char ***, struct tc_service_curve *); -+ -+ -+static void -+explain_qdisc(void) -+{ -+ fprintf(stderr, -+ "Usage: ... hfsc [ default CLASSID ]\n" -+ "\n" -+ " default: default class for unclassified packets\n" -+ ); -+} -+ -+static void -+explain_class(void) - { -- fprintf(stderr, "Usage: ... hfsc \n"); -+ fprintf(stderr, -+ "Usage: ... hfsc [ rt SC ] [ ls SC ] [ ul SC ]\n" -+ "\n" -+ "SC := [ [ m1 BPS ] [ d SEC ] m2 BPS\n" -+ "\n" -+ " m1 : slope of first segment\n" -+ " d : x-coordinate of intersection\n" -+ " m2 : slope of second segment\n" -+ "\n" -+ "Alternative format:\n" -+ "\n" -+ "SC := [ [ umax BYTE ] dmax SEC ] rate BPS\n" -+ "\n" -+ " umax : maximum unit of work\n" -+ " dmax : maximum delay\n" -+ " rate : rate\n" -+ "\n" -+ ); - } - --static void explain1(char *arg) -+static void -+explain1(char *arg) - { -- fprintf(stderr, "Illegal \"%s\"\n", arg); -+ fprintf(stderr, "HFSC: Illegal \"%s\"\n", arg); - } - -+static int -+hfsc_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n) -+{ -+ struct tc_hfsc_qopt qopt; -+ -+ memset(&qopt, 0, sizeof(qopt)); -+ -+ while (argc > 0) { -+ if (matches(*argv, "default") == 0) { -+ NEXT_ARG(); -+ if (qopt.defcls != 0) { -+ fprintf(stderr, "HFSC: Double \"default\"\n"); -+ return -1; -+ } -+ if (get_u16(&qopt.defcls, *argv, 16) < 0) { -+ explain1("default"); -+ return -1; -+ } -+ } else if (matches(*argv, "help") == 0) { -+ explain_qdisc(); -+ return -1; -+ } else { -+ fprintf(stderr, "HFSC: What is \"%s\" ?\n", *argv); -+ explain_qdisc(); -+ return -1; -+ } -+ argc--, argv++; -+ } - --#define usage() return(-1) -+ addattr_l(n, 1024, TCA_OPTIONS, &qopt, sizeof(qopt)); -+ return 0; -+} - --static int hfsc_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n) -+static int -+hfsc_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) - { -- return -1; -+ struct tc_hfsc_qopt *qopt; -+ -+ if (opt == NULL) -+ return 0; -+ if (RTA_PAYLOAD(opt) < sizeof(*qopt)) -+ return -1; -+ qopt = RTA_DATA(opt); -+ -+ if (qopt->defcls != 0) -+ fprintf(f, "default %x ", qopt->defcls); -+ -+ return 0; - } - --static int hfsc_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) -+static int -+hfsc_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats) - { -- return -1; -+ struct tc_hfsc_stats *st; -+ -+ if (xstats == NULL) -+ return 0; -+ if (RTA_PAYLOAD(xstats) < sizeof(*st)) -+ return -1; -+ st = RTA_DATA(xstats); -+ -+ fprintf(f, " period %u ", st->period); -+ if (st->work != 0) -+ fprintf(f, "work %llu bytes ", st->work); -+ if (st->rtwork != 0) -+ fprintf(f, "rtwork %llu bytes ", st->rtwork); -+ fprintf(f, "level %u ", st->level); -+ fprintf(f, "\n"); -+ -+ return 0; - } - --static int hfsc_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats) -+static int -+hfsc_parse_class_opt(struct qdisc_util *qu, int argc, char **argv, -+ struct nlmsghdr *n) - { -- return -1; -+ struct tc_service_curve rsc, fsc, usc; -+ int rsc_ok, fsc_ok, usc_ok; -+ struct rtattr *tail; -+ -+ memset(&rsc, 0, sizeof(rsc)); -+ memset(&fsc, 0, sizeof(fsc)); -+ memset(&usc, 0, sizeof(usc)); -+ rsc_ok = fsc_ok = usc_ok = 0; -+ -+ while (argc > 0) { -+ if (matches(*argv, "rt") == 0) { -+ NEXT_ARG(); -+ if (hfsc_get_sc(&argc, &argv, &rsc) < 0) { -+ explain1("rt"); -+ return -1; -+ } -+ rsc_ok = 1; -+ } else if (matches(*argv, "ls") == 0) { -+ NEXT_ARG(); -+ if (hfsc_get_sc(&argc, &argv, &fsc) < 0) { -+ explain1("ls"); -+ return -1; -+ } -+ fsc_ok = 1; -+ } else if (matches(*argv, "ul") == 0) { -+ NEXT_ARG(); -+ if (hfsc_get_sc(&argc, &argv, &usc) < 0) { -+ explain1("ul"); -+ return -1; -+ } -+ usc_ok = 1; -+ } else if (matches(*argv, "help") == 0) { -+ explain_class(); -+ return -1; -+ } else { -+ fprintf(stderr, "HFSC: What is \"%s\" ?\n", *argv); -+ explain_class(); -+ return -1; -+ } -+ argc--, argv++; -+ } -+ -+ if (!(rsc_ok || fsc_ok || usc_ok)) { -+ fprintf(stderr, "HFSC: no parameters given\n"); -+ explain_class(); -+ return -1; -+ } -+ if (usc_ok && !fsc_ok) { -+ fprintf(stderr, "HFSC: Upper-limit Service Curve without " -+ "Link-Share Service Curve\n"); -+ explain_class(); -+ return -1; -+ } -+ -+ tail = (struct rtattr*)(((void*)n) + NLMSG_ALIGN(n->nlmsg_len)); -+ -+ addattr_l(n, 1024, TCA_OPTIONS, NULL, 0); -+ if (rsc_ok) -+ addattr_l(n, 1024, TCA_HFSC_RSC, &rsc, sizeof(rsc)); -+ if (fsc_ok) -+ addattr_l(n, 1024, TCA_HFSC_FSC, &fsc, sizeof(fsc)); -+ if (usc_ok) -+ addattr_l(n, 1024, TCA_HFSC_USC, &usc, sizeof(usc)); -+ -+ tail->rta_len = (((void*)n) + NLMSG_ALIGN(n->nlmsg_len)) - (void*)tail; -+ return 0; -+} -+ -+static void -+hfsc_print_sc(FILE *f, char *name, struct tc_service_curve *sc) -+{ -+ SPRINT_BUF(b1); -+ -+ fprintf(f, "%s ", name); -+ fprintf(f, "m1 %s ", sprint_rate(sc->m1, b1)); -+ fprintf(f, "d %s ", sprint_usecs(sc->d, b1)); -+ fprintf(f, "m2 %s ", sprint_rate(sc->m2, b1)); -+} -+ -+static int -+hfsc_print_class_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) -+{ -+ struct rtattr *tb[TCA_HFSC_MAX+1]; -+ struct tc_service_curve *rsc = NULL, *fsc = NULL, *usc = NULL; -+ -+ if (opt == NULL) -+ return 0; -+ -+ memset(tb, 0, sizeof(tb)); -+ parse_rtattr(tb, TCA_HFSC_MAX, RTA_DATA(opt), RTA_PAYLOAD(opt)); -+ -+ if (tb[TCA_HFSC_RSC]) { -+ if (RTA_PAYLOAD(tb[TCA_HFSC_RSC]) < sizeof(*rsc)) -+ fprintf(stderr, "HFSC: truncated realtime option\n"); -+ else -+ rsc = RTA_DATA(tb[TCA_HFSC_RSC]); -+ } -+ if (tb[TCA_HFSC_FSC]) { -+ if (RTA_PAYLOAD(tb[TCA_HFSC_FSC]) < sizeof(*fsc)) -+ fprintf(stderr, "HFSC: truncated linkshare option\n"); -+ else -+ fsc = RTA_DATA(tb[TCA_HFSC_FSC]); -+ } -+ if (tb[TCA_HFSC_USC]) { -+ if (RTA_PAYLOAD(tb[TCA_HFSC_USC]) < sizeof(*usc)) -+ fprintf(stderr, "HFSC: truncated upperlimit option\n"); -+ else -+ usc = RTA_DATA(tb[TCA_HFSC_USC]); -+ } -+ -+ if (rsc != NULL) -+ hfsc_print_sc(f, "rt", rsc); -+ if (fsc != NULL) -+ hfsc_print_sc(f, "ls", fsc); -+ if (usc != NULL) -+ hfsc_print_sc(f, "ul", usc); -+ -+ return 0; - } - - struct qdisc_util hfsc_util = { -@@ -57,5 +268,126 @@ - hfsc_parse_opt, - hfsc_print_opt, - hfsc_print_xstats, -+ hfsc_parse_class_opt, -+ hfsc_print_class_opt, - }; - -+static int -+hfsc_get_sc1(int *argcp, char ***argvp, struct tc_service_curve *sc) -+{ -+ char **argv = *argvp; -+ int argc = *argcp; -+ unsigned int m1 = 0, d = 0, m2 = 0; -+ -+ if (matches(*argv, "m1") == 0) { -+ NEXT_ARG(); -+ if (get_rate(&m1, *argv) < 0) { -+ explain1("m1"); -+ return -1; -+ } -+ NEXT_ARG(); -+ } -+ -+ if (matches(*argv, "d") == 0) { -+ NEXT_ARG(); -+ if (get_usecs(&d, *argv) < 0) { -+ explain1("d"); -+ return -1; -+ } -+ NEXT_ARG(); -+ } -+ -+ if (matches(*argv, "m2") == 0) { -+ NEXT_ARG(); -+ if (get_rate(&m2, *argv) < 0) { -+ explain1("m2"); -+ return -1; -+ } -+ } else -+ return -1; -+ -+ sc->m1 = m1; -+ sc->d = d; -+ sc->m2 = m2; -+ -+ *argvp = argv; -+ *argcp = argc; -+ return 0; -+} -+ -+static int -+hfsc_get_sc2(int *argcp, char ***argvp, struct tc_service_curve *sc) -+{ -+ char **argv = *argvp; -+ int argc = *argcp; -+ unsigned int umax = 0, dmax = 0, rate = 0; -+ -+ if (matches(*argv, "umax") == 0) { -+ NEXT_ARG(); -+ if (get_size(&umax, *argv) < 0) { -+ explain1("umax"); -+ return -1; -+ } -+ NEXT_ARG(); -+ } -+ -+ if (matches(*argv, "dmax") == 0) { -+ NEXT_ARG(); -+ if (get_usecs(&dmax, *argv) < 0) { -+ explain1("dmax"); -+ return -1; -+ } -+ NEXT_ARG(); -+ } -+ -+ if (matches(*argv, "rate") == 0) { -+ NEXT_ARG(); -+ if (get_rate(&rate, *argv) < 0) { -+ explain1("rate"); -+ return -1; -+ } -+ } else -+ return -1; -+ -+ if (umax != 0 && dmax == 0) { -+ fprintf(stderr, "HFSC: umax given but dmax is zero.\n"); -+ return -1; -+ } -+ -+ if (dmax != 0 && ceil(umax * 1000000.0 / dmax) > rate) { -+ /* -+ * concave curve, slope of first segment is umax/dmax, -+ * intersection is at dmax -+ */ -+ sc->m1 = ceil(umax * 1000000.0 / dmax); /* in bps */ -+ sc->d = dmax; -+ sc->m2 = rate; -+ } else { -+ /* -+ * convex curve, slope of first segment is 0, intersection -+ * is at dmax - umax / rate -+ */ -+ sc->m1 = 0; -+ sc->d = ceil(dmax - umax * 1000000.0 / rate); /* in usec */ -+ sc->m2 = rate; -+ } -+ -+ *argvp = argv; -+ *argcp = argc; -+ return 0; -+} -+ -+static int -+hfsc_get_sc(int *argcp, char ***argvp, struct tc_service_curve *sc) -+{ -+ if (hfsc_get_sc1(argcp, argvp, sc) < 0 && -+ hfsc_get_sc2(argcp, argvp, sc) < 0) -+ return -1; -+ -+ if (sc->m1 == 0 && sc->m2 == 0) { -+ fprintf(stderr, "HFSC: Service Curve has two zero slopes\n"); -+ return -1; -+ } -+ -+ return 0; -+} diff --git a/sys-apps/iproute2/files/2.6.12-rc1-esfq.patch b/sys-apps/iproute2/files/2.6.12-rc1-esfq.patch deleted file mode 100644 index 3e25143a5b68..000000000000 --- a/sys-apps/iproute2/files/2.6.12-rc1-esfq.patch +++ /dev/null @@ -1,218 +0,0 @@ -http://fatooh.org/esfq-2.6/ - -diff -Naur iproute2-2.6.11-old/include/linux/pkt_sched.h iproute2-2.6.11/include/linux/pkt_sched.h ---- iproute2-2.6.11-old/include/linux/pkt_sched.h 2005-03-14 14:23:54.000000000 -0800 -+++ iproute2-2.6.11/include/linux/pkt_sched.h 2005-03-20 21:42:20.000000000 -0800 -@@ -145,8 +145,29 @@ - * - * The only reason for this is efficiency, it is possible - * to change these parameters in compile time. -+ * -+ * If you need to play with these values use esfq instead. - */ - -+/* ESFQ section */ -+ -+enum -+{ -+ TCA_SFQ_HASH_CLASSIC, -+ TCA_SFQ_HASH_DST, -+ TCA_SFQ_HASH_SRC, -+}; -+ -+struct tc_esfq_qopt -+{ -+ unsigned quantum; /* Bytes per round allocated to flow */ -+ int perturb_period; /* Period of hash perturbation */ -+ __u32 limit; /* Maximal packets in queue */ -+ unsigned divisor; /* Hash divisor */ -+ unsigned flows; /* Maximal number of flows */ -+ unsigned hash_kind; /* Hash function to use for flow identification */ -+}; -+ - /* RED section */ - - enum -diff -Naur iproute2-2.6.11-old/tc/Makefile iproute2-2.6.11/tc/Makefile ---- iproute2-2.6.11-old/tc/Makefile 2005-03-14 14:23:54.000000000 -0800 -+++ iproute2-2.6.11/tc/Makefile 2005-03-20 21:33:28.000000000 -0800 -@@ -6,6 +6,7 @@ - TCMODULES := - TCMODULES += q_fifo.o - TCMODULES += q_sfq.o -+TCMODULES += q_esfq.o - TCMODULES += q_red.o - TCMODULES += q_prio.o - TCMODULES += q_tbf.o -diff -Naur iproute2-2.6.11-old/tc/q_esfq.c iproute2-2.6.11/tc/q_esfq.c ---- iproute2-2.6.11-old/tc/q_esfq.c 1969-12-31 16:00:00.000000000 -0800 -+++ iproute2-2.6.11/tc/q_esfq.c 2005-03-20 21:45:07.000000000 -0800 -@@ -0,0 +1,168 @@ -+/* -+ * q_esfq.c ESFQ. -+ * -+ * 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> -+ * -+ * Changes: Alexander Atanasov, <alex@ssi.bg> -+ * Added depth,limit,divisor,hash_kind options. -+ */ -+ -+#include <stdio.h> -+#include <stdlib.h> -+#include <unistd.h> -+#include <syslog.h> -+#include <fcntl.h> -+#include <math.h> -+#include <sys/socket.h> -+#include <netinet/in.h> -+#include <arpa/inet.h> -+#include <string.h> -+ -+#include "utils.h" -+#include "tc_util.h" -+ -+static void explain(void) -+{ -+ fprintf(stderr, "Usage: ... esfq [ perturb SECS ] [ quantum BYTES ] [ depth FLOWS ]\n\t[ divisor HASHBITS ] [ limit PKTS ] [ hash HASHTYPE]\n"); -+ fprintf(stderr,"Where: \n"); -+ fprintf(stderr,"HASHTYPE := { classic | src | dst }\n"); -+} -+ -+#define usage() return(-1) -+ -+static int esfq_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n) -+{ -+ int ok=0; -+ struct tc_esfq_qopt opt; -+ -+ memset(&opt, 0, sizeof(opt)); -+ -+ opt.hash_kind= TCA_SFQ_HASH_CLASSIC; -+ -+ while (argc > 0) { -+ if (strcmp(*argv, "quantum") == 0) { -+ NEXT_ARG(); -+ if (get_size(&opt.quantum, *argv)) { -+ fprintf(stderr, "Illegal \"quantum\"\n"); -+ return -1; -+ } -+ ok++; -+ } else if (strcmp(*argv, "perturb") == 0) { -+ NEXT_ARG(); -+ if (get_integer(&opt.perturb_period, *argv, 0)) { -+ fprintf(stderr, "Illegal \"perturb\"\n"); -+ return -1; -+ } -+ ok++; -+ } else if (strcmp(*argv, "depth") == 0) { -+ NEXT_ARG(); -+ if (get_integer(&opt.flows, *argv, 0)) { -+ fprintf(stderr, "Illegal \"depth\"\n"); -+ return -1; -+ } -+ ok++; -+ } else if (strcmp(*argv, "divisor") == 0) { -+ NEXT_ARG(); -+ if (get_integer(&opt.divisor, *argv, 0)) { -+ fprintf(stderr, "Illegal \"divisor\"\n"); -+ return -1; -+ } -+ if(opt.divisor >= 15) { -+ fprintf(stderr, "Illegal \"divisor\" must be < 15\n"); -+ return -1; -+ } -+ opt.divisor=pow(2,opt.divisor); -+ ok++; -+ } else if (strcmp(*argv, "limit") == 0) { -+ NEXT_ARG(); -+ if (get_integer(&opt.limit, *argv, 0)) { -+ fprintf(stderr, "Illegal \"limit\"\n"); -+ return -1; -+ } -+ ok++; -+ } else if (strcmp(*argv, "hash") == 0) { -+ NEXT_ARG(); -+ if(strcmp(*argv,"classic") == 0) { -+ opt.hash_kind= TCA_SFQ_HASH_CLASSIC; -+ } else -+ if(strcmp(*argv,"dst") == 0) { -+ opt.hash_kind= TCA_SFQ_HASH_DST; -+ } else -+ if(strcmp(*argv,"src") == 0) { -+ opt.hash_kind= TCA_SFQ_HASH_SRC; -+ } else { -+ fprintf(stderr, "Illegal \"hash\"\n"); -+ explain(); -+ return -1; -+ } -+ ok++; -+ } else if (strcmp(*argv, "help") == 0) { -+ explain(); -+ return -1; -+ } else { -+ fprintf(stderr, "What is \"%s\"?\n", *argv); -+ explain(); -+ return -1; -+ } -+ argc--; argv++; -+ } -+ -+ if (ok) -+ addattr_l(n, 1024, TCA_OPTIONS, &opt, sizeof(opt)); -+ return 0; -+} -+ -+static int esfq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) -+{ -+ struct tc_esfq_qopt *qopt; -+ SPRINT_BUF(b1); -+ -+ if (opt == NULL) -+ return 0; -+ -+ if (RTA_PAYLOAD(opt) < sizeof(*qopt)) -+ return -1; -+ qopt = RTA_DATA(opt); -+ fprintf(f, "quantum %s ", sprint_size(qopt->quantum, b1)); -+ if (show_details) { -+ fprintf(f, "limit %up flows %u/%u ", -+ qopt->limit, qopt->flows, qopt->divisor); -+ } -+ if (qopt->perturb_period) -+ fprintf(f, "perturb %dsec ", qopt->perturb_period); -+ -+ fprintf(f,"hash: "); -+ switch(qopt->hash_kind) -+ { -+ case TCA_SFQ_HASH_CLASSIC: -+ fprintf(f,"classic"); -+ break; -+ case TCA_SFQ_HASH_DST: -+ fprintf(f,"dst"); -+ break; -+ case TCA_SFQ_HASH_SRC: -+ fprintf(f,"src"); -+ break; -+ default: -+ fprintf(f,"Unknown"); -+ } -+ return 0; -+} -+ -+static int esfq_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats) -+{ -+ return 0; -+} -+ -+ -+struct qdisc_util esfq_qdisc_util = { -+ .id = "esfq", -+ .parse_qopt = esfq_parse_opt, -+ .print_qopt = esfq_print_opt, -+ .print_xstats = esfq_print_xstats, -+}; diff --git a/sys-apps/iproute2/files/2.6.7.20040608-misc-deb-fixes.patch b/sys-apps/iproute2/files/2.6.7.20040608-misc-deb-fixes.patch deleted file mode 100644 index 8f4dc393e72f..000000000000 --- a/sys-apps/iproute2/files/2.6.7.20040608-misc-deb-fixes.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- iproute-20010824.orig/tc/tc_qdisc.c -+++ iproute-20010824/tc/tc_qdisc.c -@@ -245,7 +245,7 @@ - fprintf(fp, "\n"); - if (show_stats) { - if (tb[TCA_STATS]) { -- if (RTA_PAYLOAD(tb[TCA_STATS]) < sizeof(struct tc_stats)) -+ if (RTA_PAYLOAD(tb[TCA_STATS]) < offsetof(struct tc_stats,backlog)+sizeof(((struct tc_stats*)0)->backlog)) - fprintf(fp, "statistics truncated"); - else { - struct tc_stats st; ---- iproute-20010824.orig/include-glibc/glibc-bugs.h -+++ iproute-20010824/include-glibc/glibc-bugs.h -@@ -12,9 +12,6 @@ - - #include <linux/types.h> - --typedef __u16 in_port_t; --typedef __u32 in_addr_t; -- - #endif - - #endif diff --git a/sys-apps/iproute2/files/2.6.7.20040608-misc-gentoo-fixes.patch b/sys-apps/iproute2/files/2.6.7.20040608-misc-gentoo-fixes.patch deleted file mode 100644 index ead416350e22..000000000000 --- a/sys-apps/iproute2/files/2.6.7.20040608-misc-gentoo-fixes.patch +++ /dev/null @@ -1,126 +0,0 @@ -diff -ur iproute2-2.6.7.orig/lib/ll_addr.c iproute2-2.6.7/lib/ll_addr.c ---- iproute2-2.6.7.orig/lib/ll_addr.c 2004-06-22 15:23:26.671351840 -0400 -+++ iproute2-2.6.7/lib/ll_addr.c 2004-06-22 15:24:05.193495584 -0400 -@@ -17,10 +17,10 @@ - #include <sys/ioctl.h> - #include <sys/socket.h> - #include <sys/ioctl.h> -+#include <netinet/in.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> - -diff -ur iproute2-2.6.7.orig/lib/ll_proto.c iproute2-2.6.7/lib/ll_proto.c ---- iproute2-2.6.7.orig/lib/ll_proto.c 2004-06-22 15:23:26.671351840 -0400 -+++ iproute2-2.6.7/lib/ll_proto.c 2004-06-22 15:23:55.268004488 -0400 -@@ -17,10 +17,10 @@ - #include <sys/ioctl.h> - #include <sys/socket.h> - #include <sys/ioctl.h> -+#include <netinet/in.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> - -diff -ur iproute2-2.6.7.orig/lib/ll_types.c iproute2-2.6.7/lib/ll_types.c ---- iproute2-2.6.7.orig/lib/ll_types.c 2004-06-22 15:23:26.671351840 -0400 -+++ iproute2-2.6.7/lib/ll_types.c 2004-06-22 15:23:42.533940360 -0400 -@@ -17,10 +17,10 @@ - #include <sys/ioctl.h> - #include <sys/socket.h> - #include <sys/ioctl.h> -+#include <netinet/in.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> - -diff -ur iproute2-2.6.7.orig/ip/ipaddress.c iproute2-2.6.7/ip/ipaddress.c ---- iproute2-2.6.7.orig/ip/ipaddress.c 2004-06-22 15:26:00.353988528 -0400 -+++ iproute2-2.6.7/ip/ipaddress.c 2004-06-22 15:26:11.743257096 -0400 -@@ -20,10 +20,10 @@ - #include <sys/ioctl.h> - #include <sys/socket.h> - #include <sys/ioctl.h> -+#include <netinet/in.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> - #include <fnmatch.h> -diff -ur iproute2-2.6.7.orig/misc/ss.c iproute2-2.6.7/misc/ss.c ---- iproute2-2.6.7.orig/misc/ss.c 2004-06-22 15:26:00.414979256 -0400 -+++ iproute2-2.6.7/misc/ss.c 2004-06-22 15:26:30.166456344 -0400 -@@ -35,6 +35,7 @@ - #include <asm/byteorder.h> - #include <linux/tcp.h> - #include <linux/tcp_diag.h> -+#include <linux/version.h> - - int resolve_hosts = 0; - int resolve_services = 1; -@@ -1318,11 +1319,14 @@ - if (info->tcpi_snd_ssthresh < 0xFFFF) - printf(" ssthresh:%d", info->tcpi_snd_ssthresh); - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,7) - if (info->tcpi_rcv_rtt) - printf(" rcv_rtt:%g", (double) info->tcpi_rcv_rtt/1000); - if (info->tcpi_rcv_space) - printf(" rcv_space:%d", info->tcpi_rcv_space); -+#endif - -+#ifdef TCPDIAG_VEGASINFO - if (tb[TCPDIAG_VEGASINFO]) { - const struct tcpvegas_info *vinfo - = RTA_DATA(tb[TCPDIAG_VEGASINFO]); -@@ -1340,6 +1341,7 @@ - 8000000. / (double) vinfo->tcpv_rtt); - } - } -+#endif - } - } - -diff -ur iproute2-2.6.7.orig/ip/ipmaddr.c iproute2-2.6.7/ip/ipmaddr.c ---- iproute2-2.6.7.orig/ip/ipmaddr.c 2004-06-22 15:27:35.910461736 -0400 -+++ iproute2-2.6.7/ip/ipmaddr.c 2004-06-22 15:28:30.871106448 -0400 -@@ -17,11 +17,11 @@ - #include <fcntl.h> - #include <sys/ioctl.h> - #include <sys/socket.h> -+#include <netinet/in.h> - #include <linux/netdevice.h> - #include <linux/if.h> - #include <linux/if_arp.h> - #include <linux/sockios.h> --#include <netinet/in.h> - #include <arpa/inet.h> - #include <string.h> - -diff -ur iproute2-2.6.7.orig/ip/ipmroute.c iproute2-2.6.7/ip/ipmroute.c ---- iproute2-2.6.7.orig/ip/ipmroute.c 2004-06-22 15:27:35.912461432 -0400 -+++ iproute2-2.6.7/ip/ipmroute.c 2004-06-22 15:28:55.027434128 -0400 -@@ -17,11 +17,11 @@ - #include <fcntl.h> - #include <sys/ioctl.h> - #include <sys/socket.h> -+#include <netinet/in.h> - #include <linux/netdevice.h> - #include <linux/if.h> - #include <linux/if_arp.h> - #include <linux/sockios.h> --#include <netinet/in.h> - #include <arpa/inet.h> - #include <string.h> - diff --git a/sys-apps/iproute2/files/2.6.9.20041019-wrr.patch b/sys-apps/iproute2/files/2.6.9.20041019-wrr.patch deleted file mode 100644 index 62548f62c2ac..000000000000 --- a/sys-apps/iproute2/files/2.6.9.20041019-wrr.patch +++ /dev/null @@ -1,459 +0,0 @@ -diff -Naur iproute2-2.6.9.orig/include/linux/pkt_sched.h iproute2-2.6.9.wrr/include/linux/pkt_sched.h ---- iproute2-2.6.9.orig/include/linux/pkt_sched.h 2004-08-31 11:32:14.000000000 -0700 -+++ iproute2-2.6.9.wrr/include/linux/pkt_sched.h 2004-10-26 02:52:23.161578317 -0700 -@@ -375,6 +375,118 @@ - - #define TCA_CBQ_MAX TCA_CBQ_POLICE - -+/* WRR section */ -+ -+/* Other includes */ -+#include <linux/if_ether.h> -+ -+// A sub weight and of a class -+// All numbers are represented as parts of (2^64-1). -+struct tc_wrr_class_weight { -+ __u64 val; // Current value (0 is not valid) -+ __u64 decr; // Value pr bytes (2^64-1 is not valid) -+ __u64 incr; // Value pr seconds (2^64-1 is not valid) -+ __u64 min; // Minimal value (0 is not valid) -+ __u64 max; // Minimal value (0 is not valid) -+ -+ // The time where the above information was correct: -+ time_t tim; -+}; -+ -+// Pakcet send when modifying a class: -+struct tc_wrr_class_modf { -+ // Not-valid values are ignored. -+ struct tc_wrr_class_weight weight1; -+ struct tc_wrr_class_weight weight2; -+}; -+ -+// Packet returned when quering a class: -+struct tc_wrr_class_stats { -+ char used; // If this is false the information below is invalid -+ -+ struct tc_wrr_class_modf class_modf; -+ -+ unsigned char addr[ETH_ALEN]; -+ char usemac; // True if addr is a MAC address, else it is an IP address -+ // (this value is only for convience, it is always the same -+ // value as in the qdisc) -+ int heappos; // Current heap position or 0 if not in heap -+ __u64 penal_ls; // Penalty value in heap (ls) -+ __u64 penal_ms; // Penalty value in heap (ms) -+}; -+ -+// Qdisc-wide penalty information (boolean values - 2 not valid) -+struct tc_wrr_qdisc_weight { -+ char weight_mode; // 0=No automatic change to weight -+ // 1=Decrease normally -+ // 2=Also multiply with number of machines -+ // 3=Instead multiply with priority divided -+ // with priority of the other. -+ // -1=no change -+}; -+ -+// Packet send when modifing a qdisc: -+struct tc_wrr_qdisc_modf { -+ // Not-valid values are ignored: -+ struct tc_wrr_qdisc_weight weight1; -+ struct tc_wrr_qdisc_weight weight2; -+}; -+ -+// Packet send when creating a qdisc: -+struct tc_wrr_qdisc_crt { -+ struct tc_wrr_qdisc_modf qdisc_modf; -+ -+ char srcaddr; // 1=lookup source, 0=lookup destination -+ char usemac; // 1=Classify on MAC addresses, 0=classify on IP -+ char usemasq; // 1=Classify based on masqgrading - only valid -+ // if usemac is zero -+ int bands_max; // Maximal number of bands (i.e.: classes) -+ int proxy_maxconn; // If differnt from 0 then we support proxy remapping -+ // of packets. And this is the number of maximal -+ // concurrent proxy connections. -+}; -+ -+// Packet returned when quering a qdisc: -+struct tc_wrr_qdisc_stats { -+ struct tc_wrr_qdisc_crt qdisc_crt; -+ int proxy_curconn; -+ int nodes_in_heap; // Current number of bands wanting to send something -+ int bands_cur; // Current number of bands used (i.e.: MAC/IP addresses seen) -+ int bands_reused; // Number of times this band has been reused. -+ int packets_requed; // Number of times packets have been requeued. -+ __u64 priosum; // Sum of priorities in heap where 1 is 2^32 -+}; -+ -+struct tc_wrr_qdisc_modf_std { -+ // This indicates which of the tc_wrr_qdisc_modf structers this is: -+ char proxy; // 0=This struct -+ -+ // Should we also change a class? -+ char change_class; -+ -+ // Only valid if change_class is false -+ struct tc_wrr_qdisc_modf qdisc_modf; -+ -+ // Only valid if change_class is true: -+ unsigned char addr[ETH_ALEN]; // Class to change (non-used bytes should be 0) -+ struct tc_wrr_class_modf class_modf; // The change -+}; -+ -+// Used for proxyrempping: -+struct tc_wrr_qdisc_modf_proxy { -+ // This indicates which of the tc_wrr_qdisc_modf structers this is: -+ char proxy; // 1=This struct -+ -+ // This is 1 if the proxyremap information should be reset -+ char reset; -+ -+ // changec is the number of elements in changes. -+ int changec; -+ -+ // This is an array of type ProxyRemapBlock: -+ long changes[0]; -+}; -+ - /* dsmark section */ - - enum { -diff -Naur iproute2-2.6.9.orig/tc/Makefile iproute2-2.6.9.wrr/tc/Makefile ---- iproute2-2.6.9.orig/tc/Makefile 2004-08-31 11:32:14.000000000 -0700 -+++ iproute2-2.6.9.wrr/tc/Makefile 2004-10-26 02:52:12.653007205 -0700 -@@ -10,6 +10,7 @@ - TCMODULES += q_prio.o - TCMODULES += q_tbf.o - TCMODULES += q_cbq.o -+TCMODULES += q_wrr.o - TCMODULES += f_rsvp.o - TCMODULES += f_u32.o - TCMODULES += f_route.o -diff -Naur iproute2-2.6.9.orig/tc/q_wrr.c iproute2-2.6.9.wrr/tc/q_wrr.c ---- iproute2-2.6.9.orig/tc/q_wrr.c 1969-12-31 16:00:00.000000000 -0800 -+++ iproute2-2.6.9.wrr/tc/q_wrr.c 2004-10-26 02:52:12.655006743 -0700 -@@ -0,0 +1,322 @@ -+#include <stdio.h> -+#include <stdlib.h> -+#include <unistd.h> -+#include <syslog.h> -+#include <fcntl.h> -+#include <sys/socket.h> -+#include <netinet/in.h> -+#include <arpa/inet.h> -+#include <string.h> -+#include <math.h> -+ -+#include "utils.h" -+#include "tc_util.h" -+ -+#define usage() return(-1) -+ -+// Returns -1 on error -+static int wrr_parse_qdisc_weight(int argc, char** argv, -+ struct tc_wrr_qdisc_modf* opt) { -+ int i; -+ -+ opt->weight1.weight_mode=-1; -+ opt->weight2.weight_mode=-1; -+ -+ for(i=0; i<argc; i++) { -+ if(!memcmp(argv[i],"wmode1=",7)) { -+ opt->weight1.weight_mode=atoi(argv[i]+7); -+ } else if(!memcmp(argv[i],"wmode2=",7)) { -+ opt->weight2.weight_mode=atoi(argv[i]+7); -+ } else { -+ printf("Usage: ... [wmode1=0|1|2|3] [wmode2=0|1|2|3]\n"); -+ return -1; -+ } -+ } -+ return 0; -+} -+ -+static int wrr_parse_class_modf(int argc, char** argv, -+ struct tc_wrr_class_modf* modf) { -+ int i; -+ -+ if(argc<1) { -+ fprintf(stderr, "Usage: ... [weight1=val] [decr1=val] [incr1=val] [min1=val] [max1=val] [val2=val] ...\n"); -+ fprintf(stderr, " The values can be floating point like 0.42 or divisions like 42/100\n"); -+ return -1; -+ } -+ -+ // Set meaningless values: -+ modf->weight1.val=0; -+ modf->weight1.decr=(__u64)-1; -+ modf->weight1.incr=(__u64)-1; -+ modf->weight1.min=0; -+ modf->weight1.max=0; -+ modf->weight2.val=0; -+ modf->weight2.decr=(__u64)-1; -+ modf->weight2.incr=(__u64)-1; -+ modf->weight2.min=0; -+ modf->weight2.max=0; -+ -+ // And read values: -+ for(i=0; i<argc; i++) { -+ char arg[80]; -+ char* name,*value1=0,*value2=0; -+ long double f_val1,f_val2=1,value; -+ if(strlen(argv[i])>=sizeof(arg)) { -+ fprintf(stderr,"Argument too long: %s\n",argv[i]); -+ return -1; -+ } -+ strcpy(arg,argv[i]); -+ -+ name=strtok(arg,"="); -+ if(name) value1=strtok(0,"/"); -+ if(value1) value2=strtok(0,""); -+ -+ if(!value1) { -+ fprintf(stderr,"No = found in argument: %s\n",argv[i]); -+ return -1; -+ } -+ -+ f_val1=atof(value1); -+ if(value2) f_val2=atof(value2); -+ -+ if(f_val2==0) { -+ fprintf(stderr,"Division by 0\n"); -+ return -1; -+ } -+ -+ value=f_val1/f_val2; -+ if(value>1) value=1; -+ if(value<0) value=0; -+ value*=((__u64)-1); -+ -+ // And find the value set -+ if(!strcmp(name,"weight1")) modf->weight1.val=value; -+ else if(!strcmp(name,"decr1")) modf->weight1.decr=value; -+ else if(!strcmp(name,"incr1")) modf->weight1.incr=value; -+ else if(!strcmp(name,"min1")) modf->weight1.min=value; -+ else if(!strcmp(name,"max1")) modf->weight1.max=value; -+ else if(!strcmp(name,"weight2")) modf->weight2.val=value; -+ else if(!strcmp(name,"decr2")) modf->weight2.decr=value; -+ else if(!strcmp(name,"incr2")) modf->weight2.incr=value; -+ else if(!strcmp(name,"min2")) modf->weight2.min=value; -+ else if(!strcmp(name,"max2")) modf->weight2.max=value; -+ else { -+ fprintf(stderr,"illegal value: %s\n",name); -+ return -1; -+ } -+ } -+ -+ return 0; -+} -+ -+static int wrr_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n) -+{ -+ if(n->nlmsg_flags & NLM_F_CREATE) { -+ // This is a create request: -+ struct tc_wrr_qdisc_crt opt; -+ -+ int sour,dest,ip,mac,masq; -+ -+ if(argc<4) { -+ fprintf(stderr, "Usage: ... wrr sour|dest ip|masq|mac maxclasses proxymaxcon [penalty-setup]\n"); -+ return -1; -+ } -+ -+ // Read sour/dest: -+ memset(&opt,0,sizeof(opt)); -+ sour=!strcmp(argv[0],"sour"); -+ dest=!strcmp(argv[0],"dest"); -+ -+ if(!sour && !dest) { -+ fprintf(stderr,"sour or dest must be specified\n"); -+ return -1; -+ } -+ -+ // Read ip/mac -+ ip=!strcmp(argv[1],"ip"); -+ mac=!strcmp(argv[1],"mac"); -+ masq=!strcmp(argv[1],"masq"); -+ -+ if(!ip && !mac && !masq) { -+ fprintf(stderr,"ip, masq or mac must be specified\n"); -+ return -1; -+ } -+ -+ opt.srcaddr=sour; -+ opt.usemac=mac; -+ opt.usemasq=masq; -+ opt.bands_max=atoi(argv[2]); -+ -+ opt.proxy_maxconn=atoi(argv[3]); -+ -+ // Read weights: -+ if(wrr_parse_qdisc_weight(argc-4,argv+4,&opt.qdisc_modf)<0) return -1; -+ if(opt.qdisc_modf.weight1.weight_mode==-1) opt.qdisc_modf.weight1.weight_mode=0; -+ if(opt.qdisc_modf.weight2.weight_mode==-1) opt.qdisc_modf.weight2.weight_mode=0; -+ -+ addattr_l(n, 1024, TCA_OPTIONS, &opt, sizeof(opt)); -+ } else { -+ struct tc_wrr_qdisc_modf_std opt; -+ char qdisc,class; -+ -+ // This is a modify request: -+ if(argc<1) { -+ fprintf(stderr,"... qdisc ... or ... class ...\n"); -+ return -1; -+ } -+ -+ qdisc=!strcmp(argv[0],"qdisc"); -+ class=!strcmp(argv[0],"class"); -+ -+ if(!qdisc && !class) { -+ fprintf(stderr,"qdisc or class must be specified\n"); -+ return -1; -+ } -+ -+ argc--; -+ argv++; -+ -+ opt.proxy=0; -+ -+ if(qdisc) { -+ opt.change_class=0; -+ if(wrr_parse_qdisc_weight(argc, argv, &opt.qdisc_modf)<0) return -1; -+ } else { -+ int a0,a1,a2,a3,a4=0,a5=0; -+ -+ opt.change_class=1; -+ -+ if(argc<1) { -+ fprintf(stderr,"... <mac>|<ip>|<masq> ...\n"); -+ return -1; -+ } -+ memset(opt.addr,0,sizeof(opt.addr)); -+ -+ if((sscanf(argv[0],"%i.%i.%i.%i",&a0,&a1,&a2,&a3)!=4) && -+ (sscanf(argv[0],"%x:%x:%x:%x:%x:%x",&a0,&a1,&a2,&a3,&a4,&a5)!=6)) { -+ fprintf(stderr,"Wrong format of mac or ip address\n"); -+ return -1; -+ } -+ -+ opt.addr[0]=a0; opt.addr[1]=a1; opt.addr[2]=a2; -+ opt.addr[3]=a3; opt.addr[4]=a4; opt.addr[5]=a5; -+ -+ if(wrr_parse_class_modf(argc-1, argv+1, &opt.class_modf)<0) return -1; -+ } -+ -+ addattr_l(n, 1024, TCA_OPTIONS, &opt, sizeof(opt)); -+ } -+ return 0; -+} -+ -+static int wrr_parse_copt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n) { -+ struct tc_wrr_class_modf opt; -+ -+ memset(&opt,0,sizeof(opt)); -+ if(wrr_parse_class_modf(argc,argv,&opt)<0) return -1; -+ -+ addattr_l(n, 1024, TCA_OPTIONS, &opt, sizeof(opt)); -+ return 0; -+} -+ -+static int wrr_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) -+{ -+ struct tc_wrr_qdisc_stats *qopt; -+ -+ if (opt == NULL) -+ return 0; -+ -+ if (RTA_PAYLOAD(opt) < sizeof(*qopt)) -+ return -1; -+ qopt = RTA_DATA(opt); -+ -+ fprintf(f,"\n (%s/%s) (maxclasses %i) (usedclasses %i) (reused classes %i)\n", -+ qopt->qdisc_crt.srcaddr ? "sour" : "dest", -+ qopt->qdisc_crt.usemac ? "mac" : (qopt->qdisc_crt.usemasq ? "masq" : "ip"), -+ qopt->qdisc_crt.bands_max, -+ qopt->bands_cur, -+ qopt->bands_reused -+ ); -+ -+ if(qopt->qdisc_crt.proxy_maxconn) { -+ fprintf(f," (proxy maxcon %i) (proxy curcon %i)\n", -+ qopt->qdisc_crt.proxy_maxconn,qopt->proxy_curconn); -+ } -+ -+ fprintf(f," (waiting classes %i) (packets requeued %i) (priosum: %Lg)\n", -+ qopt->nodes_in_heap, -+ qopt->packets_requed, -+ qopt->priosum/((long double)((__u32)-1)) -+ ); -+ -+ fprintf(f," (wmode1 %i) (wmode2 %i) \n", -+ qopt->qdisc_crt.qdisc_modf.weight1.weight_mode, -+ qopt->qdisc_crt.qdisc_modf.weight2.weight_mode); -+ -+ return 0; -+} -+ -+static int wrr_print_copt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) { -+ struct tc_wrr_class_stats *copt; -+ long double d=(__u64)-1; -+ -+ if (opt == NULL) return 0; -+ -+ if (RTA_PAYLOAD(opt) < sizeof(*copt)) -+ return -1; -+ copt = RTA_DATA(opt); -+ -+ if(!copt->used) { -+ fprintf(f,"(unused)"); -+ return 0; -+ } -+ -+ if(copt->usemac) { -+ fprintf(f,"\n (address: %.2X:%.2X:%.2X:%.2X:%.2X:%.2X)\n", -+ copt->addr[0],copt->addr[1],copt->addr[2], -+ copt->addr[3],copt->addr[4],copt->addr[5]); -+ } else { -+ fprintf(f,"\n (address: %i.%i.%i.%i)\n",copt->addr[0],copt->addr[1],copt->addr[2],copt->addr[3]); -+ } -+ -+ fprintf(f," (total weight: %Lg) (current position: %i) (counters: %u %u : %u %u)\n", -+ (copt->class_modf.weight1.val/d)*(copt->class_modf.weight2.val/d), -+ copt->heappos, -+ (unsigned)(copt->penal_ms>>32), -+ (unsigned)(copt->penal_ms & 0xffffffffU), -+ (unsigned)(copt->penal_ls>>32), -+ (unsigned)(copt->penal_ls & 0xffffffffU) -+ ); -+ -+ fprintf(f," Pars 1: (weight %Lg) (decr: %Lg) (incr: %Lg) (min: %Lg) (max: %Lg)\n", -+ copt->class_modf.weight1.val/d, -+ copt->class_modf.weight1.decr/d, -+ copt->class_modf.weight1.incr/d, -+ copt->class_modf.weight1.min/d, -+ copt->class_modf.weight1.max/d); -+ -+ fprintf(f," Pars 2: (weight %Lg) (decr: %Lg) (incr: %Lg) (min: %Lg) (max: %Lg)", -+ copt->class_modf.weight2.val/d, -+ copt->class_modf.weight2.decr/d, -+ copt->class_modf.weight2.incr/d, -+ copt->class_modf.weight2.min/d, -+ copt->class_modf.weight2.max/d); -+ -+ return 0; -+} -+ -+static int wrr_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats) -+{ -+ return 0; -+} -+ -+ -+struct qdisc_util wrr_qdisc_util = { -+ .id = "wrr", -+ .parse_qopt = wrr_parse_opt, -+ .print_qopt = wrr_print_opt, -+ .print_xstats = wrr_print_xstats, -+ .parse_copt = wrr_parse_copt, -+ .print_copt = wrr_print_copt -+}; diff --git a/sys-apps/iproute2/files/2.6.9.20041106-esfq.patch b/sys-apps/iproute2/files/2.6.9.20041106-esfq.patch deleted file mode 100644 index 356d65aee3a3..000000000000 --- a/sys-apps/iproute2/files/2.6.9.20041106-esfq.patch +++ /dev/null @@ -1,218 +0,0 @@ -diff -Naur iproute2-2.6.9.orig/include/linux/pkt_sched.h iproute2-2.6.9/include/linux/pkt_sched.h ---- iproute2-2.6.9.orig/include/linux/pkt_sched.h 2004-10-19 13:49:02.000000000 -0700 -+++ iproute2-2.6.9/include/linux/pkt_sched.h 2004-11-06 17:39:22.000000000 -0800 -@@ -126,6 +126,14 @@ - - /* SFQ section */ - -+enum -+{ -+ TCA_SFQ_HASH_CLASSIC, -+ TCA_SFQ_HASH_DST, -+ TCA_SFQ_HASH_SRC, -+}; -+ -+ - struct tc_sfq_qopt - { - unsigned quantum; /* Bytes per round allocated to flow */ -@@ -133,6 +141,7 @@ - __u32 limit; /* Maximal packets in queue */ - unsigned divisor; /* Hash divisor */ - unsigned flows; /* Maximal number of flows */ -+ unsigned hash_kind; /* Hash function to use for flow identification */ - }; - - /* -@@ -142,6 +151,8 @@ - * - * The only reason for this is efficiency, it is possible - * to change these parameters in compile time. -+ * -+ * If you need to play with these values use esfq instead. - */ - - /* RED section */ -diff -Naur iproute2-2.6.9.orig/tc/Makefile iproute2-2.6.9/tc/Makefile ---- iproute2-2.6.9.orig/tc/Makefile 2004-10-19 13:49:02.000000000 -0700 -+++ iproute2-2.6.9/tc/Makefile 2004-11-06 17:39:22.000000000 -0800 -@@ -6,6 +6,7 @@ - TCMODULES := - TCMODULES += q_fifo.o - TCMODULES += q_sfq.o -+TCMODULES += q_esfq.o - TCMODULES += q_red.o - TCMODULES += q_prio.o - TCMODULES += q_tbf.o -diff -Naur iproute2-2.6.9.orig/tc/q_esfq.c iproute2-2.6.9/tc/q_esfq.c ---- iproute2-2.6.9.orig/tc/q_esfq.c 1969-12-31 16:00:00.000000000 -0800 -+++ iproute2-2.6.9/tc/q_esfq.c 2004-11-06 17:40:30.000000000 -0800 -@@ -0,0 +1,168 @@ -+/* -+ * q_esfq.c ESFQ. -+ * -+ * 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> -+ * -+ * Changes: Alexander Atanasov, <alex@ssi.bg> -+ * Added depth,limit,divisor,hash_kind options. -+ */ -+ -+#include <stdio.h> -+#include <stdlib.h> -+#include <unistd.h> -+#include <syslog.h> -+#include <fcntl.h> -+#include <math.h> -+#include <sys/socket.h> -+#include <netinet/in.h> -+#include <arpa/inet.h> -+#include <string.h> -+ -+#include "utils.h" -+#include "tc_util.h" -+ -+static void explain(void) -+{ -+ fprintf(stderr, "Usage: ... esfq [ perturb SECS ] [ quantum BYTES ] [ depth FLOWS ]\n\t[ divisor HASHBITS ] [ limit PKTS ] [ hash HASHTYPE]\n"); -+ fprintf(stderr,"Where: \n"); -+ fprintf(stderr,"HASHTYPE := { classic | src | dst }\n"); -+} -+ -+#define usage() return(-1) -+ -+static int esfq_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n) -+{ -+ int ok=0; -+ struct tc_sfq_qopt opt; -+ -+ memset(&opt, 0, sizeof(opt)); -+ -+ opt.hash_kind= TCA_SFQ_HASH_CLASSIC; -+ -+ while (argc > 0) { -+ if (strcmp(*argv, "quantum") == 0) { -+ NEXT_ARG(); -+ if (get_size(&opt.quantum, *argv)) { -+ fprintf(stderr, "Illegal \"quantum\"\n"); -+ return -1; -+ } -+ ok++; -+ } else if (strcmp(*argv, "perturb") == 0) { -+ NEXT_ARG(); -+ if (get_integer(&opt.perturb_period, *argv, 0)) { -+ fprintf(stderr, "Illegal \"perturb\"\n"); -+ return -1; -+ } -+ ok++; -+ } else if (strcmp(*argv, "depth") == 0) { -+ NEXT_ARG(); -+ if (get_integer(&opt.flows, *argv, 0)) { -+ fprintf(stderr, "Illegal \"depth\"\n"); -+ return -1; -+ } -+ ok++; -+ } else if (strcmp(*argv, "divisor") == 0) { -+ NEXT_ARG(); -+ if (get_integer(&opt.divisor, *argv, 0)) { -+ fprintf(stderr, "Illegal \"divisor\"\n"); -+ return -1; -+ } -+ if(opt.divisor >= 15) { -+ fprintf(stderr, "Illegal \"divisor\" must be < 15\n"); -+ return -1; -+ } -+ opt.divisor=pow(2,opt.divisor); -+ ok++; -+ } else if (strcmp(*argv, "limit") == 0) { -+ NEXT_ARG(); -+ if (get_integer(&opt.limit, *argv, 0)) { -+ fprintf(stderr, "Illegal \"limit\"\n"); -+ return -1; -+ } -+ ok++; -+ } else if (strcmp(*argv, "hash") == 0) { -+ NEXT_ARG(); -+ if(strcmp(*argv,"classic") == 0) { -+ opt.hash_kind= TCA_SFQ_HASH_CLASSIC; -+ } else -+ if(strcmp(*argv,"dst") == 0) { -+ opt.hash_kind= TCA_SFQ_HASH_DST; -+ } else -+ if(strcmp(*argv,"src") == 0) { -+ opt.hash_kind= TCA_SFQ_HASH_SRC; -+ } else { -+ fprintf(stderr, "Illegal \"hash\"\n"); -+ explain(); -+ return -1; -+ } -+ ok++; -+ } else if (strcmp(*argv, "help") == 0) { -+ explain(); -+ return -1; -+ } else { -+ fprintf(stderr, "What is \"%s\"?\n", *argv); -+ explain(); -+ return -1; -+ } -+ argc--; argv++; -+ } -+ -+ if (ok) -+ addattr_l(n, 1024, TCA_OPTIONS, &opt, sizeof(opt)); -+ return 0; -+} -+ -+static int esfq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) -+{ -+ struct tc_sfq_qopt *qopt; -+ SPRINT_BUF(b1); -+ -+ if (opt == NULL) -+ return 0; -+ -+ if (RTA_PAYLOAD(opt) < sizeof(*qopt)) -+ return -1; -+ qopt = RTA_DATA(opt); -+ fprintf(f, "quantum %s ", sprint_size(qopt->quantum, b1)); -+ if (show_details) { -+ fprintf(f, "limit %up flows %u/%u ", -+ qopt->limit, qopt->flows, qopt->divisor); -+ } -+ if (qopt->perturb_period) -+ fprintf(f, "perturb %dsec ", qopt->perturb_period); -+ -+ fprintf(f,"hash: "); -+ switch(qopt->hash_kind) -+ { -+ case TCA_SFQ_HASH_CLASSIC: -+ fprintf(f,"classic"); -+ break; -+ case TCA_SFQ_HASH_DST: -+ fprintf(f,"dst"); -+ break; -+ case TCA_SFQ_HASH_SRC: -+ fprintf(f,"src"); -+ break; -+ default: -+ fprintf(f,"Unknown"); -+ } -+ return 0; -+} -+ -+static int esfq_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats) -+{ -+ return 0; -+} -+ -+ -+struct qdisc_util esfq_qdisc_util = { -+ .id = "esfq", -+ .parse_qopt = esfq_parse_opt, -+ .print_qopt = esfq_print_opt, -+ .print_xstats = esfq_print_xstats, -+}; diff --git a/sys-apps/iproute2/files/digest-iproute2-2.6.10.20050112-r1 b/sys-apps/iproute2/files/digest-iproute2-2.6.10.20050112-r1 deleted file mode 100644 index 230bc8fcdb9b..000000000000 --- a/sys-apps/iproute2/files/digest-iproute2-2.6.10.20050112-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 43b454cfa0948e234f128cce41db4911 iproute2-2.6.10-ss050112.tar.gz 307663 diff --git a/sys-apps/iproute2/files/digest-iproute2-2.6.10.20050124 b/sys-apps/iproute2/files/digest-iproute2-2.6.10.20050124 deleted file mode 100644 index bc71c5114255..000000000000 --- a/sys-apps/iproute2/files/digest-iproute2-2.6.10.20050124 +++ /dev/null @@ -1 +0,0 @@ -MD5 7ae2bab0858766d61d7e92670cc2e622 iproute2-2.6.10-ss050124.tar.gz 311721 diff --git a/sys-apps/iproute2/files/digest-iproute2-2.6.11.20050310-r1 b/sys-apps/iproute2/files/digest-iproute2-2.6.11.20050310-r1 deleted file mode 100644 index a358693ed666..000000000000 --- a/sys-apps/iproute2/files/digest-iproute2-2.6.11.20050310-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 d7ad6748ebf980499ae6b10c2679e99a iproute2-2.6.11-050310.tar.gz 341467 diff --git a/sys-apps/iproute2/files/digest-iproute2-2.6.11.20050310-r2 b/sys-apps/iproute2/files/digest-iproute2-2.6.11.20050310-r2 deleted file mode 100644 index a358693ed666..000000000000 --- a/sys-apps/iproute2/files/digest-iproute2-2.6.11.20050310-r2 +++ /dev/null @@ -1 +0,0 @@ -MD5 d7ad6748ebf980499ae6b10c2679e99a iproute2-2.6.11-050310.tar.gz 341467 diff --git a/sys-apps/iproute2/files/digest-iproute2-2.6.11.20050330-r1 b/sys-apps/iproute2/files/digest-iproute2-2.6.11.20050330-r1 deleted file mode 100644 index f938b1ed6874..000000000000 --- a/sys-apps/iproute2/files/digest-iproute2-2.6.11.20050330-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 e705f26b5ae93e0332e46ae3ff15d934 iproute2-2.6.11-050330.tar.gz 347051 diff --git a/sys-apps/iproute2/files/digest-iproute2-2.6.13.051007 b/sys-apps/iproute2/files/digest-iproute2-2.6.13.051007 deleted file mode 100644 index 82ab5386d1d5..000000000000 --- a/sys-apps/iproute2/files/digest-iproute2-2.6.13.051007 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 53f47d46f50eff9ed8c6fa2ac2b41a80 iproute2-051007.tar.gz 370767 -RMD160 663d743fb39f9f5b1822be51c64e9fc15e419152 iproute2-051007.tar.gz 370767 -SHA256 7769b17e01f00f1638249ad402660a31375112e2c89bce4d13b6d2d2130726dd iproute2-051007.tar.gz 370767 diff --git a/sys-apps/iproute2/files/digest-iproute2-2.6.7.20040608-r1 b/sys-apps/iproute2/files/digest-iproute2-2.6.7.20040608-r1 deleted file mode 100644 index f2c9c1a6d985..000000000000 --- a/sys-apps/iproute2/files/digest-iproute2-2.6.7.20040608-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 28196897deb1a45295cd606bd911a33d iproute2-2.6.7-ss040608.tar.gz 235008 diff --git a/sys-apps/iproute2/files/iproute2-2.6.11.20050310-dsmark-qdisc.patch b/sys-apps/iproute2/files/iproute2-2.6.11.20050310-dsmark-qdisc.patch deleted file mode 100644 index 8bea13615479..000000000000 --- a/sys-apps/iproute2/files/iproute2-2.6.11.20050310-dsmark-qdisc.patch +++ /dev/null @@ -1,45 +0,0 @@ -# 2005/03/20 17:19:39+01:00 tgraf at suug.ch -# Fix netlink message alignment when the last routing attribute added -# has a data length not aligned to RTA_ALIGNTO. - -http://mailman.ds9a.nl/pipermail/lartc/2005q1/015295.html -http://bugs.gentoo.org/show_bug.cgi?id=86729 - ---- lib/libnetlink.c -+++ lib/libnetlink.c -@@ -491,7 +491,7 @@ - int len = RTA_LENGTH(alen); - struct rtattr *rta; - -- if (NLMSG_ALIGN(n->nlmsg_len) + len > maxlen) { -+ if (NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len) > maxlen) { - fprintf(stderr, "addattr_l ERROR: message exceeded bound of %d\n",maxlen); - return -1; - } -@@ -499,7 +499,7 @@ - rta->rta_type = type; - rta->rta_len = len; - memcpy(RTA_DATA(rta), data, alen); -- n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + len; -+ n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len); - return 0; - } - -@@ -539,7 +539,7 @@ - struct rtattr *subrta; - int len = RTA_LENGTH(alen); - -- if (RTA_ALIGN(rta->rta_len) + len > maxlen) { -+ if (RTA_ALIGN(rta->rta_len) + RTA_ALIGN(len) > maxlen) { - fprintf(stderr,"rta_addattr_l: Error! max allowed bound %d exceeded\n",maxlen); - return -1; - } -@@ -547,7 +547,7 @@ - subrta->rta_type = type; - subrta->rta_len = len; - memcpy(RTA_DATA(subrta), data, alen); -- rta->rta_len = NLMSG_ALIGN(rta->rta_len) + len; -+ rta->rta_len = NLMSG_ALIGN(rta->rta_len) + RTA_ALIGN(len); - return 0; - } - diff --git a/sys-apps/iproute2/files/iproute2-2.6.11.20050330-parallel-build.patch b/sys-apps/iproute2/files/iproute2-2.6.11.20050330-parallel-build.patch deleted file mode 100644 index a208fb68a842..000000000000 --- a/sys-apps/iproute2/files/iproute2-2.6.11.20050330-parallel-build.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- netem/Makefile -+++ netem/Makefile -@@ -1,16 +1,19 @@ - DISTGEN = maketable normal pareto paretonormal - DISTDATA = normal.dist pareto.dist paretonormal.dist experimental.dist - -+HOSTCC ?= $(CC) - LDLIBS += -lm - --%.dist: %.c -- $(HOSTCC) $(CFLAGS) -o $* $< -lm -- ./$* >$@ -- --%.dist: %.dat -- ./maketable $< >$@ -- - all: $(DISTGEN) $(DISTDATA) -+ -+$(DISTGEN): -+ $(HOSTCC) -I../include -O1 -o $@ $@.c -lm -+ -+%.dist: % -+ ./$* > $@ -+ -+experimental.dist: maketable experimental.dat -+ ./maketable experimental.dat > experimental.dist - - install: all - mkdir -p $(DESTDIR)/usr/lib/tc -@@ -20,8 +23,3 @@ - - clean: - rm -f $(DISTDATA) $(DISTGEN) -- --maketable: maketable.c -- $(HOSTCC) $(CFLAGS) -o $@ $< -lm -- -- diff --git a/sys-apps/iproute2/files/iproute2-2.6.11.20050330-stack.patch b/sys-apps/iproute2/files/iproute2-2.6.11.20050330-stack.patch deleted file mode 100644 index 1ca6a704f220..000000000000 --- a/sys-apps/iproute2/files/iproute2-2.6.11.20050330-stack.patch +++ /dev/null @@ -1,15 +0,0 @@ -Fix from upstream to fix overflow. - -http://bugs.gentoo.org/99487 - ---- netem/paretonormal.c -+++ netem/paretonormal.c -@@ -51,7 +51,7 @@ - { - int i,n; - double x; -- double table[TABLESIZE]; -+ double table[TABLESIZE+1]; - - for (x = -10.0; x < 10.05; x += .00005) { - i = rint(TABLESIZE*normal(x, 0.0, 1.0)); diff --git a/sys-apps/iproute2/files/iproute2-2.6.11.20050330-tc-check-qdisc-features.patch b/sys-apps/iproute2/files/iproute2-2.6.11.20050330-tc-check-qdisc-features.patch deleted file mode 100644 index 2c1c277f071c..000000000000 --- a/sys-apps/iproute2/files/iproute2-2.6.11.20050330-tc-check-qdisc-features.patch +++ /dev/null @@ -1,29 +0,0 @@ -Make sure BODY is initialized before we use it and make sure the specified -q_disc supports option parsing before calling parse_qopt() - -http://bugs.gentoo.org/108307 - ---- tc/tc.c -+++ tc/tc.c -@@ -38,7 +38,7 @@ - int force = 0; - struct rtnl_handle rth; - --static void *BODY; /* cached handle dlopen(NULL) */ -+static void *BODY = NULL; /* cached handle dlopen(NULL) */ - static struct qdisc_util * qdisc_list; - static struct filter_util * filter_list; - ---- tc/tc_qdisc.c -+++ tc/tc_qdisc.c -@@ -126,6 +126,10 @@ - addattr_l(&req.n, sizeof(req), TCA_RATE, &est, sizeof(est)); - - if (q) { -+ if (!q->parse_qopt) { -+ fprintf(stderr, "qdisc '%s' does not support option parsing\n", k); -+ return -1; -+ } - if (q->parse_qopt(q, argc, argv, &req.n)) - return 1; - } else { diff --git a/sys-apps/iproute2/iproute2-2.6.10.20050112-r1.ebuild b/sys-apps/iproute2/iproute2-2.6.10.20050112-r1.ebuild deleted file mode 100644 index cbfaa25e002c..000000000000 --- a/sys-apps/iproute2/iproute2-2.6.10.20050112-r1.ebuild +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-2.6.10.20050112-r1.ebuild,v 1.10 2005/10/30 04:15:55 vapier Exp $ - -inherit eutils toolchain-funcs - -MY_PV=${PV%.*} -SNAP=${PV##*.} -SNAP=ss${SNAP:2} -DESCRIPTION="kernel routing and traffic control utilities" -HOMEPAGE="http://linux-net.osdl.org/index.php/Iproute2" -SRC_URI="http://developer.osdl.org/dev/iproute2/download/${PN}-${MY_PV}-${SNAP}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sparc x86" -IUSE="atm berkdb minimal" - -RDEPEND="virtual/libc - !minimal? ( berkdb? ( sys-libs/db ) ) - atm? ( net-dialup/linux-atm )" -DEPEND="${RDEPEND} - >=virtual/os-headers-2.4.21 - >=sys-apps/sed-4" - -S=${WORKDIR}/${PN}-${MY_PV}-${SNAP} - -src_unpack() { - unpack ${A} - cd ${S} - sed -i -e "s:-O2:${CFLAGS}:" Makefile || die "sed Makefile failed" - #68948 - esfq/wrr patches - epatch \ - ${FILESDIR}/2.6.9.20041106-esfq.patch \ - ${FILESDIR}/2.6.9.20041019-wrr.patch - # don't build arpd if USE=-berkdb #81660 - use berkdb || sed -i '/^TARGETS=/s: arpd : :' misc/Makefile - # Multilib fixes - sed -i "s:/usr/lib/tc:/usr/$(get_libdir)/tc:g" ${S}/tc/Makefile ${S}/tc/tc.c ${S}/tc/q_netem.c -} - -src_compile() { - echo -n 'TC_CONFIG_ATM:=' > Config - use atm \ - && echo 'y' >> Config \ - || echo 'n' >> Config - - local SUBDIRS="lib ip tc misc" - use minimal && SUBDIRS="lib tc" - emake \ - CC="$(tc-getCC)" \ - AR="$(tc-getAR)" \ - SUBDIRS="${SUBDIRS}" \ - || die "make" -} - -src_install() { - if use minimal; then - into / - dosbin tc/tc || die "minimal" - return 0 - fi - - dodir /usr/share/man/man3 - make \ - DESTDIR="${D}" \ - SBINDIR=/sbin \ - DOCDIR=/usr/share/doc/${PF} \ - install \ - || die "make install failed" -} diff --git a/sys-apps/iproute2/iproute2-2.6.10.20050124.ebuild b/sys-apps/iproute2/iproute2-2.6.10.20050124.ebuild deleted file mode 100644 index afdf00070db2..000000000000 --- a/sys-apps/iproute2/iproute2-2.6.10.20050124.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-2.6.10.20050124.ebuild,v 1.5 2005/10/30 04:15:55 vapier Exp $ - -inherit eutils toolchain-funcs - -MY_PV=${PV%.*} -SNAP=${PV##*.} -SNAP=ss${SNAP:2} -DESCRIPTION="kernel routing and traffic control utilities" -HOMEPAGE="http://linux-net.osdl.org/index.php/Iproute2" -SRC_URI="http://developer.osdl.org/dev/iproute2/download/${PN}-${MY_PV}-${SNAP}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="atm berkdb minimal" - -RDEPEND="virtual/libc - !minimal? ( berkdb? ( sys-libs/db ) ) - atm? ( net-dialup/linux-atm )" -DEPEND="${RDEPEND} - >=virtual/os-headers-2.4.21 - >=sys-apps/sed-4" - -S=${WORKDIR}/${PN}-${SNAP/ss} - -src_unpack() { - unpack ${A} - cd ${S} - sed -i -e "s:-O2:${CFLAGS}:" Makefile || die "sed Makefile failed" - #68948 - esfq/wrr patches - epatch \ - ${FILESDIR}/2.6.9.20041106-esfq.patch \ - ${FILESDIR}/2.6.9.20041019-wrr.patch - # don't build arpd if USE=-berkdb #81660 - use berkdb || sed -i '/^TARGETS=/s: arpd : :' misc/Makefile - # Multilib fixes - sed -i "s:/usr/lib/tc:/usr/$(get_libdir)/tc:g" \ - tc/Makefile tc/tc.c tc/q_netem.c -} - -src_compile() { - echo -n 'TC_CONFIG_ATM:=' > Config - use atm \ - && echo 'y' >> Config \ - || echo 'n' >> Config - - local SUBDIRS="lib ip tc misc" - use minimal && SUBDIRS="lib tc" - emake \ - CC="$(tc-getCC)" \ - AR="$(tc-getAR)" \ - SUBDIRS="${SUBDIRS}" \ - || die "make" -} - -src_install() { - if use minimal; then - into / - dosbin tc/tc || die "minimal" - return 0 - fi - - dodir /usr/share/man/man3 - make \ - DESTDIR="${D}" \ - SBINDIR=/sbin \ - DOCDIR=/usr/share/doc/${PF} \ - install \ - || die "make install failed" - # bug 47482, arpd doesn't need to be in /sbin - dodir /usr/sbin - mv ${D}/sbin/arpd ${D}/usr/sbin/ -} diff --git a/sys-apps/iproute2/iproute2-2.6.11.20050310-r1.ebuild b/sys-apps/iproute2/iproute2-2.6.11.20050310-r1.ebuild deleted file mode 100644 index 430b6a6e8a07..000000000000 --- a/sys-apps/iproute2/iproute2-2.6.11.20050310-r1.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-2.6.11.20050310-r1.ebuild,v 1.11 2006/03/05 19:41:05 vapier Exp $ - -inherit eutils toolchain-funcs - -MY_PV=${PV%.*} -SNAP=${PV##*.} -SNAP=${SNAP:2} -DESCRIPTION="kernel routing and traffic control utilities" -HOMEPAGE="http://linux-net.osdl.org/index.php/Iproute2" -SRC_URI="http://developer.osdl.org/dev/iproute2/download/${PN}-${MY_PV}-${SNAP}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sparc x86" -IUSE="atm berkdb minimal" - -RDEPEND="!minimal? ( berkdb? ( sys-libs/db ) ) - atm? ( net-dialup/linux-atm )" -DEPEND="${RDEPEND} - >=virtual/os-headers-2.4.21" - -S=${WORKDIR}/${PN}-${MY_PV} - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/${P}-dsmark-qdisc.patch #86729 - sed -i -e "s:-O2:${CFLAGS}:" Makefile || die "sed Makefile failed" - #68948 - esfq/wrr patches - epatch \ - "${FILESDIR}"/2.6.9.20041106-esfq.patch \ - "${FILESDIR}"/2.6.9.20041019-wrr.patch - # don't build arpd if USE=-berkdb #81660 - use berkdb || sed -i '/^TARGETS=/s: arpd : :' misc/Makefile - # Multilib fixes - sed -i 's:/usr/local:/usr:' tc/m_ipt.c - sed -i "s:/usr/lib/tc:/usr/$(get_libdir)/tc:g" \ - tc/Makefile tc/tc.c tc/q_netem.c || die -} - -src_compile() { - echo -n 'TC_CONFIG_ATM:=' > Config - use atm \ - && echo 'y' >> Config \ - || echo 'n' >> Config - - local SUBDIRS="lib ip tc misc" - use minimal && SUBDIRS="lib tc" - emake \ - CC="$(tc-getCC)" \ - AR="$(tc-getAR)" \ - SUBDIRS="${SUBDIRS}" \ - || die "make" -} - -src_install() { - if use minimal ; then - into / - dosbin tc/tc || die "minimal" - return 0 - fi - - make \ - DESTDIR="${D}" \ - SBINDIR=/sbin \ - DOCDIR=/usr/share/doc/${PF} \ - install \ - || die "make install failed" - if use berkdb ; then - dodir /var/lib/arpd - # bug 47482, arpd doesn't need to be in /sbin - dodir /usr/sbin - mv "${D}"/sbin/arpd "${D}"/usr/sbin/ - fi -} diff --git a/sys-apps/iproute2/iproute2-2.6.11.20050310-r2.ebuild b/sys-apps/iproute2/iproute2-2.6.11.20050310-r2.ebuild deleted file mode 100644 index cbca63593700..000000000000 --- a/sys-apps/iproute2/iproute2-2.6.11.20050310-r2.ebuild +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-2.6.11.20050310-r2.ebuild,v 1.3 2005/10/30 04:15:55 vapier Exp $ - -inherit eutils toolchain-funcs - -MY_PV=${PV%.*} -SNAP=${PV##*.} -SNAP=${SNAP:2} -DESCRIPTION="kernel routing and traffic control utilities" -HOMEPAGE="http://linux-net.osdl.org/index.php/Iproute2" -SRC_URI="http://developer.osdl.org/dev/iproute2/download/${PN}-${MY_PV}-${SNAP}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="atm berkdb minimal" - -RDEPEND="!minimal? ( berkdb? ( sys-libs/db ) ) - atm? ( net-dialup/linux-atm )" -DEPEND="${RDEPEND} - >=virtual/os-headers-2.4.21" - -S=${WORKDIR}/${PN}-${MY_PV} - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/${P}-dsmark-qdisc.patch #86729 - sed -i -e "s:-O2:${CFLAGS}:" Makefile || die "sed Makefile failed" - #68948 - esfq/wrr patches - epatch \ - "${FILESDIR}"/2.6.12-rc1-esfq.patch \ - "${FILESDIR}"/2.6.9.20041019-wrr.patch - # don't build arpd if USE=-berkdb #81660 - use berkdb || sed -i '/^TARGETS=/s: arpd : :' misc/Makefile - # Multilib fixes - sed -i 's:/usr/local:/usr:' tc/m_ipt.c - sed -i "s:/usr/lib/tc:/usr/$(get_libdir)/tc:g" \ - tc/Makefile tc/tc.c tc/q_netem.c || die -} - -src_compile() { - echo -n 'TC_CONFIG_ATM:=' > Config - use atm \ - && echo 'y' >> Config \ - || echo 'n' >> Config - - local SUBDIRS="lib ip tc misc" - use minimal && SUBDIRS="lib tc" - emake \ - CC="$(tc-getCC)" \ - AR="$(tc-getAR)" \ - SUBDIRS="${SUBDIRS}" \ - || die "make" -} - -src_install() { - if use minimal; then - into / - dosbin tc/tc || die "minimal" - return 0 - fi - - make \ - DESTDIR="${D}" \ - SBINDIR=/sbin \ - DOCDIR=/usr/share/doc/${PF} \ - install \ - || die "make install failed" - if use berkdb ; then - # bug 47482, arpd doesn't need to be in /sbin - dodir /usr/sbin - mv "${D}"/sbin/arpd "${D}"/usr/sbin/ - fi -} diff --git a/sys-apps/iproute2/iproute2-2.6.11.20050330-r1.ebuild b/sys-apps/iproute2/iproute2-2.6.11.20050330-r1.ebuild deleted file mode 100644 index 1ca0cefbd7d9..000000000000 --- a/sys-apps/iproute2/iproute2-2.6.11.20050330-r1.ebuild +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-2.6.11.20050330-r1.ebuild,v 1.3 2005/10/30 04:15:55 vapier Exp $ - -inherit eutils toolchain-funcs - -MY_PV=${PV%.*} -SNAP=${PV##*.} -SNAP=${SNAP:2} -DESCRIPTION="kernel routing and traffic control utilities" -HOMEPAGE="http://linux-net.osdl.org/index.php/Iproute2" -SRC_URI="http://developer.osdl.org/dev/iproute2/download/${PN}-${MY_PV}-${SNAP}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="atm berkdb minimal" - -RDEPEND="!minimal? ( berkdb? ( sys-libs/db ) ) - atm? ( net-dialup/linux-atm )" -DEPEND="${RDEPEND} - >=virtual/os-headers-2.4.21" - -S=${WORKDIR}/${PN}-${MY_PV}-${SNAP} - -src_unpack() { - unpack ${A} - cd "${S}" - sed -i -e "s:-O2:${CFLAGS}:" Makefile || die "sed Makefile failed" - epatch "${FILESDIR}"/${P}-stack.patch - epatch "${FILESDIR}"/${P}-parallel-build.patch - epatch "${FILESDIR}"/${P}-tc-check-qdisc-features.patch - #68948 - esfq/wrr patches - epatch \ - "${FILESDIR}"/2.6.12-rc1-esfq.patch \ - "${FILESDIR}"/${P}-wrr.patch - # don't build arpd if USE=-berkdb #81660 - use berkdb || sed -i '/^TARGETS=/s: arpd : :' misc/Makefile - # Multilib fixes - sed -i 's:/usr/local:/usr:' tc/m_ipt.c - sed -i "s:/usr/lib/tc:/usr/$(get_libdir)/tc:g" \ - tc/Makefile tc/tc.c tc/q_netem.c || die -} - -src_compile() { - echo -n 'TC_CONFIG_ATM:=' > Config - use atm \ - && echo 'y' >> Config \ - || echo 'n' >> Config - - local SUBDIRS="lib ip tc misc netem" - use minimal && SUBDIRS="lib tc" - emake \ - CC="$(tc-getCC)" \ - AR="$(tc-getAR)" \ - SUBDIRS="${SUBDIRS}" \ - || die "make" -} - -src_install() { - if use minimal; then - into / - dosbin tc/tc || die "minimal" - return 0 - fi - - make \ - DESTDIR="${D}" \ - SBINDIR=/sbin \ - DOCDIR=/usr/share/doc/${PF} \ - install \ - || die "make install failed" - if use berkdb ; then - # bug 47482, arpd doesn't need to be in /sbin - dodir /usr/sbin - mv "${D}"/sbin/arpd "${D}"/usr/sbin/ - fi -} diff --git a/sys-apps/iproute2/iproute2-2.6.13.051007.ebuild b/sys-apps/iproute2/iproute2-2.6.13.051007.ebuild deleted file mode 100644 index 47eed4b31941..000000000000 --- a/sys-apps/iproute2/iproute2-2.6.13.051007.ebuild +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-2.6.13.051007.ebuild,v 1.1 2006/01/30 03:09:01 vapier Exp $ - -inherit eutils toolchain-funcs - -MY_PV=051007 -DESCRIPTION="kernel routing and traffic control utilities" -HOMEPAGE="http://linux-net.osdl.org/index.php/Iproute2" -SRC_URI="http://developer.osdl.org/dev/iproute2/download/${PN}-${MY_PV}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="atm berkdb minimal" - -RDEPEND="!minimal? ( berkdb? ( sys-libs/db ) ) - atm? ( net-dialup/linux-atm )" -DEPEND="${RDEPEND} - >=virtual/os-headers-2.4.21" - -S=${WORKDIR}/${PN}-${MY_PV} - -src_unpack() { - unpack ${A} - cd "${S}" - sed -i -e "s:-O2:${CFLAGS}:" Makefile || die "sed Makefile failed" - - #68948 - esfq/wrr patches - epatch "${FILESDIR}"/${PN}-051007-esfq-2.6.13.patch - epatch "${FILESDIR}"/${PN}-2.6.11.20050330-wrr.patch - - # don't build arpd if USE=-berkdb #81660 - use berkdb || sed -i '/^TARGETS=/s: arpd : :' misc/Makefile - # Multilib fixes - sed -i 's:/usr/local:/usr:' tc/m_ipt.c - sed -i "s:/usr/lib:/usr/$(get_libdir):g" \ - netem/Makefile tc/{Makefile,tc.c,q_netem.c,m_ipt.c} || die -} - -src_compile() { - echo -n 'TC_CONFIG_ATM:=' > Config - use atm \ - && echo 'y' >> Config \ - || echo 'n' >> Config - - local SUBDIRS="lib ip tc misc netem" - use minimal && SUBDIRS="lib tc" - emake \ - CC="$(tc-getCC)" \ - AR="$(tc-getAR)" \ - SUBDIRS="${SUBDIRS}" \ - || die "make" -} - -src_install() { - if use minimal; then - into / - dosbin tc/tc || die "minimal" - return 0 - fi - - make \ - DESTDIR="${D}" \ - SBINDIR=/sbin \ - DOCDIR=/usr/share/doc/${PF} \ - install \ - || die "make install failed" - if use berkdb ; then - # bug 47482, arpd doesn't need to be in /sbin - dodir /usr/sbin - mv "${D}"/sbin/arpd "${D}"/usr/sbin/ - fi -} diff --git a/sys-apps/iproute2/iproute2-2.6.7.20040608-r1.ebuild b/sys-apps/iproute2/iproute2-2.6.7.20040608-r1.ebuild deleted file mode 100644 index 25a67ed63c3e..000000000000 --- a/sys-apps/iproute2/iproute2-2.6.7.20040608-r1.ebuild +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-2.6.7.20040608-r1.ebuild,v 1.8 2005/10/30 04:15:55 vapier Exp $ - -inherit eutils toolchain-funcs - -MY_PV="${PV:0:5}" -SNAP="${PV:${#PV}-6}" -DESCRIPTION="kernel routing and traffic control utilities" -HOMEPAGE="http://linux-net.osdl.org/index.php/Iproute2" -SRC_URI="http://developer.osdl.org/dev/iproute2/download/${PN}-${MY_PV}-ss${SNAP}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sparc x86" -IUSE="atm minimal" - -RDEPEND="virtual/libc - !minimal? ( sys-libs/db ) - atm? ( net-dialup/linux-atm )" -DEPEND="${RDEPEND} - >=virtual/os-headers-2.4.21 - >=sys-apps/sed-4" - -S=${WORKDIR}/${PN}-${MY_PV} - -pkg_setup() { - SUBDIRS="lib ip tc misc" - use minimal && SUBDIRS="lib tc" -} - -src_unpack() { - unpack ${A} - cd ${S} - - # Enable HFSC scheduler #45274 - if [ ! -z "`grep tc_service_curve ${ROOT}/usr/include/linux/pkt_sched.h`" ] ; then - epatch ${FILESDIR}/2.4.7.20020116-hfsc.patch - else - ewarn "Your linux-headers in /usr/include/linux are too old to" - ewarn "support the HFSC scheduler. It has been disabled." - echo - fi - # Disable q_delay if need be - if [ -z "`grep tc_dly_qopt ${ROOT}/usr/include/linux/pkt_sched.h`" ] ; then - ewarn "Your linux-headers in /usr/include/linux are too old to" - ewarn "support the DELAY scheduler. It has been disabled." - echo - sed -i '/q_delay/s:.*::' tc/Makefile - fi - - # Add a few debian fixes - epatch ${FILESDIR}/${PV}-misc-deb-fixes.patch - epatch ${FILESDIR}/${PV}-misc-gentoo-fixes.patch - - # Fix cflags and db code - sed -i \ - -e 's:-I/usr/include/db3::g' \ - -e "s:-O2:${CFLAGS}:g" \ - Makefile || die "sed Makefile failed" - sed -i 's:-ldb-4\.1:-ldb:' misc/Makefile || die "sed misc/Makefile failed" - sed -i 's:db41/db_185:db_185:' misc/arpd.c || die "sed misc/arpd.c failed" - - # Enable diffserv/atm support - if use atm ; then - sed -i 's:=n$:=y:' Config || die "sed Config failed" - fi -} - -src_compile() { - emake CC="$(tc-getCC)" KERNEL_INCLUDE=${ROOT}/usr/include SUBDIRS="${SUBDIRS}" || die -} - -src_install() { - if use minimal; then - into / - dosbin tc/tc - return 0 - fi - make install DESTDIR=${D} DOCDIR=/usr/share/doc/${PF} || die "make install failed" - - into / - dosbin ip/{ifcfg,rtpr} || die "dosbin failed" - - doman man/*/* -} |