summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/ttcp
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/ttcp')
-rw-r--r--net-analyzer/ttcp/Manifest2
-rw-r--r--net-analyzer/ttcp/files/ttcp-1.12-amd64.patch217
-rw-r--r--net-analyzer/ttcp/metadata.xml5
-rw-r--r--net-analyzer/ttcp/ttcp-1.12-r2.ebuild28
4 files changed, 252 insertions, 0 deletions
diff --git a/net-analyzer/ttcp/Manifest b/net-analyzer/ttcp/Manifest
new file mode 100644
index 000000000000..ff3d45619d1c
--- /dev/null
+++ b/net-analyzer/ttcp/Manifest
@@ -0,0 +1,2 @@
+DIST ttcp-1.12.tar.bz2 8086 SHA256 a87b7b7fb14a0d067a49905c66cee2f552efc0d326b6734ec3d160518febd5a8 SHA512 2218f801a04964dcc684bac2957f892569e4458eb7770e26d4ac5a9a5beebb16b9191cacd8e60cceee306b8fe53000248b52457cb679a3d12ad4308bb0066dbb WHIRLPOOL 75f3b7a0f4c5d2e6da0392078f2fa27ffe1bb4413cecffe947fa13b74f477869fa65f8a253215a4a6d970d7d8324a7fd824cad82ae03d7958523338fa85fd268
+DIST ttcp.c 23690 SHA256 52f438ef4f57ddbdd1e0dcd77efeffbdf10e59ff09279cff2fcc717803536612 SHA512 8fc800b05fcf3590d15a87983ac7abc3646c6d4a89f7cc6b91e495066a90a6ce21f7bd7b6ab21e09f07bfa20c39bdc7bcec479449d7cd2b88639dc6cca4a432e WHIRLPOOL ff33d64e541207d2c3bf62facf20038fb63ed00a71b4347a0610e25ad0122dea839b281ff8e871fabd4bfbd64ba4bde01d6fa5dde840e65924e15ecb6d5e818b
diff --git a/net-analyzer/ttcp/files/ttcp-1.12-amd64.patch b/net-analyzer/ttcp/files/ttcp-1.12-amd64.patch
new file mode 100644
index 000000000000..41d9af240743
--- /dev/null
+++ b/net-analyzer/ttcp/files/ttcp-1.12-amd64.patch
@@ -0,0 +1,217 @@
+--- ttcp-1.12/sgi-ttcp.c 1999-06-24 17:59:43.000000000 -0400
++++ sgi-ttcp.c 2004-03-26 11:09:06.387402200 -0500
+@@ -45,6 +45,9 @@
+ /* #define SYSV */ /* required on SGI IRIX releases before 3.3 */
+
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
+ #include <signal.h>
+ #include <ctype.h>
+ #include <errno.h>
+@@ -133,7 +136,7 @@
+
+ void err();
+ void mes();
+-int pattern();
++void pattern();
+ void prep_timer();
+ double read_timer();
+ int Nread();
+@@ -147,6 +150,7 @@
+ {
+ }
+
++int
+ main(argc,argv)
+ int argc;
+ char **argv;
+@@ -263,7 +267,7 @@
+ if ( (buf = (char *)malloc(buflen+bufalign)) == (char *)NULL)
+ err("malloc");
+ if (bufalign != 0)
+- buf +=(bufalign - ((int)buf % bufalign) + bufoffset) % bufalign;
++ buf +=(bufalign - ((intptr_t)buf % bufalign) + bufoffset) % bufalign;
+
+ if (trans) {
+ fprintf(stdout,
+@@ -285,7 +289,7 @@
+ err("socket");
+ mes("socket");
+
+- if (bind(fd, &sinme, sizeof(sinme)) < 0)
++ if (bind(fd, (struct sockaddr *)&sinme, sizeof(sinme)) < 0)
+ err("bind");
+
+ #if defined(SO_SNDBUF) || defined(SO_RCVBUF)
+@@ -326,7 +330,7 @@
+ mes("nodelay");
+ }
+ #endif
+- if(connect(fd, &sinhim, sizeof(sinhim) ) < 0)
++ if(connect(fd, (struct sockaddr *)&sinhim, sizeof(sinhim) ) < 0)
+ err("connect");
+ mes("connect");
+ } else {
+@@ -348,11 +352,11 @@
+ }
+ fromlen = sizeof(frominet);
+ domain = AF_INET;
+- if((fd=accept(fd, &frominet, &fromlen) ) < 0)
++ if((fd=accept(fd, (struct sockaddr *)&frominet, &fromlen) ) < 0)
+ err("accept");
+ { struct sockaddr_in peer;
+ int peerlen = sizeof(peer);
+- if (getpeername(fd, (struct sockaddr_in *) &peer,
++ if (getpeername(fd, (struct sockaddr *) &peer,
+ &peerlen) < 0) {
+ err("getpeername");
+ }
+@@ -423,7 +427,7 @@
+ nbytes, cput, outfmt(nbytes/cput));
+ }
+ fprintf(stdout,
+- "ttcp%s: %d I/O calls, msec/call = %.2f, calls/sec = %.2f\n",
++ "ttcp%s: %ld I/O calls, msec/call = %.2f, calls/sec = %.2f\n",
+ trans?"-t":"-r",
+ numCalls,
+ 1024.0 * realt/((double)numCalls),
+@@ -431,9 +435,9 @@
+ fprintf(stdout,"ttcp%s: %s\n", trans?"-t":"-r", stats);
+ if (verbose) {
+ fprintf(stdout,
+- "ttcp%s: buffer address %#x\n",
++ "ttcp%s: buffer address %#lx\n",
+ trans?"-t":"-r",
+- buf);
++ (unsigned long)buf);
+ }
+ exit(0);
+
+@@ -459,6 +463,7 @@
+ fprintf(stderr,"ttcp%s: %s\n", trans?"-t":"-r", s);
+ }
+
++void
+ pattern( cp, cnt )
+ register char *cp;
+ register int cnt;
+@@ -614,13 +619,13 @@
+
+ case 'U':
+ tvsub(&tdiff, &r1->ru_utime, &r0->ru_utime);
+- sprintf(outp,"%d.%01d", tdiff.tv_sec, tdiff.tv_usec/100000);
++ sprintf(outp,"%ld.%01ld", tdiff.tv_sec, tdiff.tv_usec/100000);
+ END(outp);
+ break;
+
+ case 'S':
+ tvsub(&tdiff, &r1->ru_stime, &r0->ru_stime);
+- sprintf(outp,"%d.%01d", tdiff.tv_sec, tdiff.tv_usec/100000);
++ sprintf(outp,"%ld.%01ld", tdiff.tv_sec, tdiff.tv_usec/100000);
+ END(outp);
+ break;
+
+@@ -642,49 +647,49 @@
+ break;
+
+ case 'X':
+- sprintf(outp,"%d", t == 0 ? 0 : (r1->ru_ixrss-r0->ru_ixrss)/t);
++ sprintf(outp,"%ld", t == 0 ? 0 : (r1->ru_ixrss-r0->ru_ixrss)/t);
+ END(outp);
+ break;
+
+ case 'D':
+- sprintf(outp,"%d", t == 0 ? 0 :
++ sprintf(outp,"%ld", t == 0 ? 0 :
+ (r1->ru_idrss+r1->ru_isrss-(r0->ru_idrss+r0->ru_isrss))/t);
+ END(outp);
+ break;
+
+ case 'K':
+- sprintf(outp,"%d", t == 0 ? 0 :
++ sprintf(outp,"%ld", t == 0 ? 0 :
+ ((r1->ru_ixrss+r1->ru_isrss+r1->ru_idrss) -
+ (r0->ru_ixrss+r0->ru_idrss+r0->ru_isrss))/t);
+ END(outp);
+ break;
+
+ case 'M':
+- sprintf(outp,"%d", r1->ru_maxrss/2);
++ sprintf(outp,"%ld", r1->ru_maxrss/2);
+ END(outp);
+ break;
+
+ case 'F':
+- sprintf(outp,"%d", r1->ru_majflt-r0->ru_majflt);
++ sprintf(outp,"%ld", r1->ru_majflt-r0->ru_majflt);
+ END(outp);
+ break;
+
+ case 'R':
+- sprintf(outp,"%d", r1->ru_minflt-r0->ru_minflt);
++ sprintf(outp,"%ld", r1->ru_minflt-r0->ru_minflt);
+ END(outp);
+ break;
+
+ case 'I':
+- sprintf(outp,"%d", r1->ru_inblock-r0->ru_inblock);
++ sprintf(outp,"%ld", r1->ru_inblock-r0->ru_inblock);
+ END(outp);
+ break;
+
+ case 'O':
+- sprintf(outp,"%d", r1->ru_oublock-r0->ru_oublock);
++ sprintf(outp,"%ld", r1->ru_oublock-r0->ru_oublock);
+ END(outp);
+ break;
+ case 'C':
+- sprintf(outp,"%d+%d", r1->ru_nvcsw-r0->ru_nvcsw,
++ sprintf(outp,"%ld+%ld", r1->ru_nvcsw-r0->ru_nvcsw,
+ r1->ru_nivcsw-r0->ru_nivcsw );
+ END(outp);
+ break;
+@@ -743,6 +748,7 @@
+ /*
+ * N R E A D
+ */
++int
+ Nread( fd, buf, count )
+ int fd;
+ void *buf;
+@@ -752,7 +758,7 @@
+ int len = sizeof(from);
+ register int cnt;
+ if( udp ) {
+- cnt = recvfrom( fd, buf, count, 0, &from, &len );
++ cnt = recvfrom( fd, buf, count, 0, (struct sockaddr *)&from, &len );
+ numCalls++;
+ } else {
+ if( b_flag )
+@@ -774,6 +780,7 @@
+ /*
+ * N W R I T E
+ */
++int
+ Nwrite( fd, buf, count )
+ int fd;
+ void *buf;
+@@ -782,7 +789,7 @@
+ register int cnt;
+ if( udp ) {
+ again:
+- cnt = sendto( fd, buf, count, 0, &sinhim, sizeof(sinhim) );
++ cnt = sendto( fd, buf, count, 0, (struct sockaddr *)&sinhim, sizeof(sinhim) );
+ numCalls++;
+ if( cnt<0 && errno == ENOBUFS ) {
+ delay(18000);
+@@ -803,7 +810,7 @@
+
+ tv.tv_sec = 0;
+ tv.tv_usec = us;
+- (void)select( 1, (char *)0, (char *)0, (char *)0, &tv );
++ (void)select( 1, NULL, NULL, NULL, &tv );
+ }
+
+ /*
diff --git a/net-analyzer/ttcp/metadata.xml b/net-analyzer/ttcp/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/ttcp/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/ttcp/ttcp-1.12-r2.ebuild b/net-analyzer/ttcp/ttcp-1.12-r2.ebuild
new file mode 100644
index 000000000000..1f8cb4251e5e
--- /dev/null
+++ b/net-analyzer/ttcp/ttcp-1.12-r2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="Tool to test TCP and UDP throughput"
+HOMEPAGE="
+ http://ftp.arl.mil/~mike/ttcp.html
+ http://www.netcore.fi/pekkas/linux/ipv6/
+"
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ~mips ppc ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+SRC_URI="
+ mirror://gentoo/${P}.tar.bz2
+ http://www.netcore.fi/pekkas/linux/ipv6/${PN}.c
+"
+
+src_compile() {
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o ${PN} "${DISTDIR}"/${PN}.c || die
+}
+
+src_install() {
+ dobin ${PN}
+ newman sgi-${PN}.1 ${PN}.1
+}