diff options
author | Dario Nicodemi <dario.sbo@gmail.com> | 2010-04-08 21:50:13 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-15 10:25:30 +0200 |
commit | a03ccc1bbcd0184feb71aaa606a34deee04abadf (patch) | |
tree | b935925336c1a7f4dc870deeb07842939a334501 /network | |
parent | e921af5412f1ad773bcbba21688d25b850990be8 (diff) |
network/ttcp: Added (a TCP/UDP benchmarking tool)
Diffstat (limited to 'network')
-rw-r--r-- | network/ttcp/README | 12 | ||||
-rw-r--r-- | network/ttcp/slack-desc | 19 | ||||
-rwxr-xr-x | network/ttcp/ttcp.SlackBuild | 64 | ||||
-rw-r--r-- | network/ttcp/ttcp.info | 12 | ||||
-rw-r--r-- | network/ttcp/ttcp_man_20100206.patch | 8 |
5 files changed, 115 insertions, 0 deletions
diff --git a/network/ttcp/README b/network/ttcp/README new file mode 100644 index 0000000000000..6ae0c95767a15 --- /dev/null +++ b/network/ttcp/README @@ -0,0 +1,12 @@ +TTCP is a benchmarking tool for determining TCP and UDP performance +between 2 systems. + +The program was created at the US Army Ballistics Research Lab (BRL) +and is in the public domain. Feel free to distribute this program, +but please do leave the credit notices in the source and man page intact. + +How to get TCP performance numbers: +receiver: host1 $ ttcp -r -s +sender: host2 $ ttcp -t -s host1 + +The -n and -l options change the number and size of the buffers. diff --git a/network/ttcp/slack-desc b/network/ttcp/slack-desc new file mode 100644 index 0000000000000..98c015f1bea31 --- /dev/null +++ b/network/ttcp/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' on +# the right side marks the last column you can put a character in. You must make +# exactly 11 lines for the formatting to be correct. It's also customary to +# leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +ttcp: ttcp (TCP/UDP Benchmarking tool) +ttcp: +ttcp: TTCP is a benchmarking tool for determining TCP and UDP performance +ttcp: between two systems. It can also be used as a network pipe to +ttcp: transfer data between two systems. +ttcp: +ttcp: +ttcp: +ttcp: +ttcp: +ttcp: diff --git a/network/ttcp/ttcp.SlackBuild b/network/ttcp/ttcp.SlackBuild new file mode 100755 index 0000000000000..0edd46810a5f9 --- /dev/null +++ b/network/ttcp/ttcp.SlackBuild @@ -0,0 +1,64 @@ +#!/bin/sh + +# Slackware build script for ttcp + +# Written by Dario Nicodemi dario.sbo@gmail.com + +PRGNAM=ttcp +VERSION=${VERSION:-1.12} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +fi + +set -e # Exit on most errors + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +mkdir $PRGNAM-$VERSION +cp $CWD/$PRGNAM.c $CWD/$PRGNAM.1 $PRGNAM-$VERSION +cd $PRGNAM-$VERSION + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Patch the "See Also" section of the man page +patch -p0 < $CWD/ttcp_man_20100206.patch + +gcc $SLKCFLAGS -o $PRGNAM $PRGNAM.c +mkdir -p $PKG/usr/bin $PKG/usr/man/man1 +cp $PRGNAM $PKG/usr/bin +strip --strip-unneeded $PKG/usr/bin/$PRGNAM + +cp $PRGNAM.1 $PKG/usr/man/man1 +gzip -9 $PKG/usr/man/man1/$PRGNAM.1 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/network/ttcp/ttcp.info b/network/ttcp/ttcp.info new file mode 100644 index 0000000000000..0b813dad6e6da --- /dev/null +++ b/network/ttcp/ttcp.info @@ -0,0 +1,12 @@ +PRGNAM="ttcp" +VERSION="1.12" +HOMEPAGE="http://ftp.arl.mil/~mike/ttcp.html" +DOWNLOAD="ftp://ftp.sgi.com/sgi/src/ttcp/ttcp.c \ + ftp://ftp.sgi.com/sgi/src/ttcp/tcp.1" +MD5SUM="3d1b75f6116cc246a4def9788ce58c26 \ + 01d3a511a05dc8a0669f30c15ebaae82" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Dario Nicodemi" +EMAIL="dario.sbo@gmail.com" +APPROVED="rworkman" diff --git a/network/ttcp/ttcp_man_20100206.patch b/network/ttcp/ttcp_man_20100206.patch new file mode 100644 index 0000000000000..005978d0274c8 --- /dev/null +++ b/network/ttcp/ttcp_man_20100206.patch @@ -0,0 +1,8 @@ +--- ttcp.1 2010-02-06 15:13:22.000000000 +0100 ++++ ttcp.1.new 2010-02-06 18:41:20.000000000 +0100 +@@ -140,4 +140,4 @@ + \-d + Debug: set the SO_DEBUG socket option. + .SH SEE ALSO +-ping(1M), traceroute(1M), netsnoop(1M) ++ping(8), traceroute(8) |