From afd9bff828ec33766e673bc16e81020cc9d0cb1a Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 15 Nov 2005 00:48:55 +0000 Subject: [PATCH] initial import Package-Manager: portage-2.0.53_rc7 --- net-firewall/shapecfg/ChangeLog | 8 +++ net-firewall/shapecfg/Manifest | 15 ++++++ net-firewall/shapecfg/files/README.shaper | 50 +++++++++++++++++++ .../shapecfg/files/digest-shapecfg-36 | 1 + .../files/shapercfg-2.0.36-glibc.patch | 15 ++++++ net-firewall/shapecfg/shapecfg-36.ebuild | 35 +++++++++++++ 6 files changed, 124 insertions(+) create mode 100644 net-firewall/shapecfg/ChangeLog create mode 100644 net-firewall/shapecfg/Manifest create mode 100644 net-firewall/shapecfg/files/README.shaper create mode 100644 net-firewall/shapecfg/files/digest-shapecfg-36 create mode 100644 net-firewall/shapecfg/files/shapercfg-2.0.36-glibc.patch create mode 100644 net-firewall/shapecfg/shapecfg-36.ebuild diff --git a/net-firewall/shapecfg/ChangeLog b/net-firewall/shapecfg/ChangeLog new file mode 100644 index 000000000000..c62714a9ce93 --- /dev/null +++ b/net-firewall/shapecfg/ChangeLog @@ -0,0 +1,8 @@ +# ChangeLog for net-firewall/shapecfg +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/shapecfg/ChangeLog,v 1.1 2005/11/15 00:48:55 vapier Exp $ + +*shapecfg-36 (14 Nov 2005) + + 14 Nov 2005; Mike Frysinger : + Initial import. Ebuild submitted by me. diff --git a/net-firewall/shapecfg/Manifest b/net-firewall/shapecfg/Manifest new file mode 100644 index 000000000000..7d16b8a1caf9 --- /dev/null +++ b/net-firewall/shapecfg/Manifest @@ -0,0 +1,15 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +MD5 9380c343275d66f55bc0626f896a0798 ChangeLog 338 +MD5 67ba4a8b44f135c870db3e0254972d7e files/README.shaper 1698 +MD5 8736c01b98e3b29cc1c7c8dc4f4a5ad4 files/digest-shapecfg-36 58 +MD5 d663363debcea6f0db4842a8e3c50b17 files/shapercfg-2.0.36-glibc.patch 372 +MD5 193298cc47dd9b1e1c1a3207a3de07f4 shapecfg-36.ebuild 726 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.2 (GNU/Linux) + +iD8DBQFDeTC/gIKl8Uu19MoRAn0RAJwL2d6IAkLiRZZAJS7QLasr0F5xuQCeI+2l +i1+3NMiizJ3rF0T9LvAQwkU= +=fd+i +-----END PGP SIGNATURE----- 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/digest-shapecfg-36 b/net-firewall/shapecfg/files/digest-shapecfg-36 new file mode 100644 index 000000000000..9f114c3a6aab --- /dev/null +++ b/net-firewall/shapecfg/files/digest-shapecfg-36 @@ -0,0 +1 @@ +MD5 fc009b9dfc7b85722c73636c99be9a6b shaper.36.tar.gz 671 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 + #include + #include +-#include +-#include +-#include ++#include ++#include ++#include + + void usage(char *name) + { diff --git a/net-firewall/shapecfg/shapecfg-36.ebuild b/net-firewall/shapecfg/shapecfg-36.ebuild new file mode 100644 index 000000000000..77769d75fcc3 --- /dev/null +++ b/net-firewall/shapecfg/shapecfg-36.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/shapecfg/shapecfg-36.ebuild,v 1.1 2005/11/15 00:48:55 vapier Exp $ + +inherit eutils flag-o-matic + +DESCRIPTION="configuration tool for setting traffic bandwidth parameters" +HOMEPAGE="" +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 +} -- 2.26.2