summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-firewall/shapecfg')
-rw-r--r--net-firewall/shapecfg/Manifest1
-rw-r--r--net-firewall/shapecfg/files/README.shaper50
-rw-r--r--net-firewall/shapecfg/files/shapercfg-2.0.36-glibc.patch15
-rw-r--r--net-firewall/shapecfg/metadata.xml7
-rw-r--r--net-firewall/shapecfg/shapecfg-36.ebuild35
5 files changed, 108 insertions, 0 deletions
diff --git a/net-firewall/shapecfg/Manifest b/net-firewall/shapecfg/Manifest
new file mode 100644
index 000000000000..953a87b53c5d
--- /dev/null
+++ b/net-firewall/shapecfg/Manifest
@@ -0,0 +1 @@
+DIST shaper.36.tar.gz 671 RMD160 1c7ab11cb7f68070aca4aacb1edc0de812314bfb SHA1 7a8fe9f963c2e5b288fefabab173fcf1877234ff SHA256 33abccecf7628da63e668042b3f6d5ac94df6036f8194d86d233964f15400323
diff --git a/net-firewall/shapecfg/files/README.shaper b/net-firewall/shapecfg/files/README.shaper
new file mode 100644
index 000000000000..60c2b4d6afb6
--- /dev/null
+++ b/net-firewall/shapecfg/files/README.shaper
@@ -0,0 +1,50 @@
+
+Traffic Shaper For Linux
+
+This is the current ALPHA release of the traffic shaper for Linux. It works
+within the following limits:
+
+o Minimum shaping speed is currently about 9600 baud (it can only
+ shape down to 1 byte per clock tick)
+
+o Maximum is about 256K, it will go above this but get a bit blocky.
+
+o If you ifconfig the master device that a shaper is attached to down
+ then your machine will follow.
+
+o The shaper must be a module.
+
+
+Setup:
+
+A shaper device is configured using the shapeconfig program.
+Typically you will do something like this
+
+shapecfg attach shaper0 eth1
+shapecfg speed shaper0 64000
+ifconfig shaper0 myhost netmask 255.255.255.240 broadcast 1.2.3.4.255 up
+route add -net some.network netmask a.b.c.d dev shaper0
+
+The shaper should have the same IP address as the device it is attached to
+for normal use.
+
+Gotchas:
+
+ The shaper shapes transmitted traffic. It's rather impossible to
+shape received traffic except at the end (or a router) transmitting it.
+
+ Gated/routed/rwhod/mrouted all see the shaper as an additional device
+and will treat it as such unless patched. Note that for mrouted you can run
+mrouted tunnels via a traffic shaper to control bandwidth usage.
+
+ The shaper is device/route based. This makes it very easy to use
+with any setup BUT less flexible. You may well want to combine this patch
+with Mike McLagan 's patch to allow routes to be
+specified by source/destination pairs.
+
+ There is no "borrowing" or "sharing" scheme. This is a simple
+traffic limiter. I'd like to implement Van Jacobson and Sally Floyd's CBQ
+architecture into Linux one day (maybe in 2.1 sometime) and do this with
+style.
+
+
diff --git a/net-firewall/shapecfg/files/shapercfg-2.0.36-glibc.patch b/net-firewall/shapecfg/files/shapercfg-2.0.36-glibc.patch
new file mode 100644
index 000000000000..3fb6a36ae50b
--- /dev/null
+++ b/net-firewall/shapecfg/files/shapercfg-2.0.36-glibc.patch
@@ -0,0 +1,15 @@
+--- shaper/shapecfg.c.glibc Tue Sep 29 20:24:02 1998
++++ shaper/shapecfg.c Tue Sep 29 20:29:27 1998
+@@ -3,9 +3,9 @@
+ #include <stdlib.h>
+ #include <linux/types.h>
+ #include <netinet/in.h>
+-#include <linux/if.h>
+-#include <linux/if_shaper.h>
+-#include <linux/sockios.h>
++#include <net/if.h>
++#include <net/if_shaper.h>
++#include <sys/ioctl.h>
+
+ void usage(char *name)
+ {
diff --git a/net-firewall/shapecfg/metadata.xml b/net-firewall/shapecfg/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/net-firewall/shapecfg/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-firewall/shapecfg/shapecfg-36.ebuild b/net-firewall/shapecfg/shapecfg-36.ebuild
new file mode 100644
index 000000000000..d8be777b2b0e
--- /dev/null
+++ b/net-firewall/shapecfg/shapecfg-36.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="configuration tool for setting traffic bandwidth parameters"
+HOMEPAGE="ftp://archive.download.redhat.com/pub/redhat/linux/9/en/os/i386/SRPMS http://sourceforge.net/projects/cbqinit"
+SRC_URI="mirror://gentoo/shaper.${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND=""
+
+S=${WORKDIR}/shaper
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/shapercfg-2.0.36-glibc.patch
+ rm -f Makefile
+}
+
+src_compile() {
+ append-flags -Wall
+ emake shapecfg || die
+}
+
+src_install() {
+ dobin shapecfg || die
+ dodoc "${FILESDIR}"/README.shaper
+}