summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorxtraeme <xtraeme@pkgsrc.org>2003-09-25 14:19:41 +0000
committerxtraeme <xtraeme@pkgsrc.org>2003-09-25 14:19:41 +0000
commit1284105065b4cebdaa3062b3279cb709a83bb0e8 (patch)
tree1d25459d232544720c3b748e35d5e77b5c5f0a3c /net
parent792d60fc1e0550b39dff7050f3ef2ae66b8923ea (diff)
downloadpkgsrc-1284105065b4cebdaa3062b3279cb709a83bb0e8.tar.gz
Initial import of trickle 1.06. Package imported from pkgsrc-wip.
trickle is a portable lightweight userspace bandwidth shaper. It can run in collaborative mode (together with trickled) or in stand alone mode. trickle works by taking advantage of the unix loader preloading. Essentially it provides, to the application, a new version of the functionality that is required to send and receive data through sockets. It then limits traffic based on delaying the sending and receiving of data over a socket. Trickle runs entirely in userspace and does not require root privileges.
Diffstat (limited to 'net')
-rw-r--r--net/trickle/DESCR8
-rw-r--r--net/trickle/Makefile29
-rw-r--r--net/trickle/PLIST11
-rw-r--r--net/trickle/distinfo5
-rw-r--r--net/trickle/files/trickled.conf13
-rwxr-xr-xnet/trickle/files/trickled.sh17
-rw-r--r--net/trickle/patches/patch-aa13
7 files changed, 96 insertions, 0 deletions
diff --git a/net/trickle/DESCR b/net/trickle/DESCR
new file mode 100644
index 00000000000..7efb141ea95
--- /dev/null
+++ b/net/trickle/DESCR
@@ -0,0 +1,8 @@
+trickle is a portable lightweight userspace bandwidth shaper. It
+can run in collaborative mode (together with trickled) or in stand
+alone mode. trickle works by taking advantage of the unix loader
+preloading. Essentially it provides, to the application, a new
+version of the functionality that is required to send and receive
+data through sockets. It then limits traffic based on delaying the
+sending and receiving of data over a socket. Trickle runs entirely
+in userspace and does not require root privileges.
diff --git a/net/trickle/Makefile b/net/trickle/Makefile
new file mode 100644
index 00000000000..224aa60e576
--- /dev/null
+++ b/net/trickle/Makefile
@@ -0,0 +1,29 @@
+# $NetBSD: Makefile,v 1.1.1.1 2003/09/25 14:19:41 xtraeme Exp $
+#
+
+DISTNAME= trickle-1.06
+CATEGORIES= net
+MASTER_SITES= http://monkey.org/~marius/trickle/
+
+MAINTAINER= xtraeme@NetBSD.org
+HOMEPAGE= http://monkey.org/~marius/trickle/
+COMMENT= Portable lightweight userspace bandwidth shaper
+
+USE_BUILDLINK2= yes
+USE_LIBTOOL= yes
+GNU_CONFIGURE= yes
+USE_PKGINSTALL= yes
+
+LIBTOOL_OVERRIDE= ${WRKSRC}/libtool
+
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
+
+EGDIR= ${PREFIX}/share/examples/trickle
+CONF_FILES= ${EGDIR}/trickled.conf ${PKG_SYSCONFDIR}/trickled.conf
+
+pre-install:
+ ${INSTALL_DATA_DIR} ${EGDIR}
+ ${INSTALL_DATA} ${FILESDIR}/trickled.conf ${EGDIR}
+
+.include "../../devel/libevent/buildlink2.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/trickle/PLIST b/net/trickle/PLIST
new file mode 100644
index 00000000000..7753a5d7cb9
--- /dev/null
+++ b/net/trickle/PLIST
@@ -0,0 +1,11 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2003/09/25 14:19:41 xtraeme Exp $
+bin/trickle
+bin/tricklectl
+bin/trickled
+lib/trickle/trickle-overload.so
+man/man1/trickle.1
+man/man5/trickled.conf.5
+man/man8/trickled.8
+share/examples/trickle/trickled.conf
+@dirrm share/examples/trickle
+@dirrm lib/trickle
diff --git a/net/trickle/distinfo b/net/trickle/distinfo
new file mode 100644
index 00000000000..36b6f2cfb68
--- /dev/null
+++ b/net/trickle/distinfo
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1.1.1 2003/09/25 14:19:41 xtraeme Exp $
+
+SHA1 (trickle-1.06.tar.gz) = bba2305606a94c2d0ce7a9b9f12ea06a6f5f223f
+Size (trickle-1.06.tar.gz) = 166044 bytes
+SHA1 (patch-aa) = aa3bb621c5e09ab6e26132d0b0d4c60fc31d2b13
diff --git a/net/trickle/files/trickled.conf b/net/trickle/files/trickled.conf
new file mode 100644
index 00000000000..c33db8920ef
--- /dev/null
+++ b/net/trickle/files/trickled.conf
@@ -0,0 +1,13 @@
+# $NetBSD: trickled.conf,v 1.1.1.1 2003/09/25 14:19:41 xtraeme Exp $
+#
+# Example configuration file for trickle
+#
+
+[ssh]
+Priority = 1
+Time-Smoothing = 0.1
+Length-Smoothing = 2
+[ftp]
+Priority = 2
+Time-Smoothing = 5
+Length-Smoothing = 20
diff --git a/net/trickle/files/trickled.sh b/net/trickle/files/trickled.sh
new file mode 100755
index 00000000000..890e53d2287
--- /dev/null
+++ b/net/trickle/files/trickled.sh
@@ -0,0 +1,17 @@
+#!@RCS_SCRIPTS_SHELL@
+#
+# $NetBSD: trickled.sh,v 1.1.1.1 2003/09/25 14:19:42 xtraeme Exp $
+#
+# PROVIDE: trickled
+# REQUIRE: DAEMON
+
+. /etc/rc.subr
+
+name="trickled"
+rcvar=$name
+command="@PREFIX@/bin/${name}"
+pidfile="/var/run/${name}.pid"
+required_files="@PKG_SYSCONFDIR@/trickled.conf"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/net/trickle/patches/patch-aa b/net/trickle/patches/patch-aa
new file mode 100644
index 00000000000..eb77796297e
--- /dev/null
+++ b/net/trickle/patches/patch-aa
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1.1.1 2003/09/25 14:19:42 xtraeme Exp $
+
+--- trickle-overload.c.orig 2003-06-04 18:35:52.000000000 +0200
++++ trickle-overload.c 2003-06-04 18:36:45.000000000 +0200
+@@ -476,7 +476,7 @@ select(int nfds, fd_set *rfds, fd_set *w
+ #if defined(__linux__) || (defined(__svr4__) && defined(__sun__))
+ int
+ poll(struct pollfd *fds, nfds_t nfds, int __timeout)
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ int
+ poll(struct pollfd *fds, unsigned int nfds, int __timeout)
+ #else