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/nttcp
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/nttcp')
-rw-r--r--net-analyzer/nttcp/Manifest1
-rw-r--r--net-analyzer/nttcp/files/nttcp-1.47-format-security.patch132
-rw-r--r--net-analyzer/nttcp/metadata.xml6
-rw-r--r--net-analyzer/nttcp/nttcp-1.47-r1.ebuild31
-rw-r--r--net-analyzer/nttcp/nttcp-1.47-r3.ebuild31
5 files changed, 201 insertions, 0 deletions
diff --git a/net-analyzer/nttcp/Manifest b/net-analyzer/nttcp/Manifest
new file mode 100644
index 000000000000..f56f939b5b4a
--- /dev/null
+++ b/net-analyzer/nttcp/Manifest
@@ -0,0 +1 @@
+DIST nttcp-1.47.tar.gz 25693 SHA256 a0e0ac34d250ba874f9ce75da60717cde8da4ebbef56879bbc8b8ed2743b81ae SHA512 eb0a5aa0633555a6e4c3834e99666cd0e00d41da5d82fdfd2644a9f59727236f1b24fbe810272cf9cfb96d76361b028bcf57025008570dbd6b0d761df5cce625 WHIRLPOOL 4565335b23ad89e609d04a8c2c8eef914bbe85da2696da5a1fa352a02feaa13faca71f9058e34ab621fcf3b3653a334cfad67a22b81ca325c0caed789b7931fc
diff --git a/net-analyzer/nttcp/files/nttcp-1.47-format-security.patch b/net-analyzer/nttcp/files/nttcp-1.47-format-security.patch
new file mode 100644
index 000000000000..514b5fa6e33b
--- /dev/null
+++ b/net-analyzer/nttcp/files/nttcp-1.47-format-security.patch
@@ -0,0 +1,132 @@
+--- a/nttcp.c
++++ b/nttcp.c
+@@ -372,7 +372,7 @@
+ #define Message(x) fMessage(stdout, x)
+
+ void Exit(char *s, int ret) {
+- syslog(LOG_DEBUG, s);
++ syslog(LOG_DEBUG, "%s\n", s);
+ fMessage(stderr,s);
+ exit(ret);
+ }
+@@ -694,7 +694,7 @@
+ register int cnt;
+ if (opt.udp) {
+ struct sockaddr_in from;
+- int len= sizeof(from);
++ socklen_t len= sizeof(from);
+ cnt= recvfrom(fd, buf, count, 0, (struct sockaddr *)&from, &len);
+ SysCalls++;
+ }
+@@ -1150,8 +1150,8 @@
+ int main(int argc, char *argv[]) {
+
+ struct sockaddr_in PeerAddr;
+- int PeerAddrLeng;
+- char *DataPortFormat= "dataport: %d\n";
++ socklen_t PeerAddrLeng;
++ const char DataPortFormat[]= "dataport: %d\n";
+ int DataPort;
+ struct sockaddr_in sinlh; /* for control socket on local host */
+ int fd; /* data socket to transport the data */
+@@ -1184,7 +1184,8 @@
+ }
+ if (opt.inetd) {
+ /* we simulate inetd behaviour */
+- int nsrv, srv, fromleng;
++ int nsrv, srv;
++ socklen_t fromleng;
+ struct sockaddr_in sinsrv;
+ struct sockaddr_in frominet;
+ if (opt.Verbose) {
+@@ -1285,7 +1286,7 @@
+ Exit(MsgBuf, 2);
+ }
+ if (OptionLine[sizeof(OptionLine)-1] != '\0') {
+- sprintf(MsgBuf, "%s: optionline longer than %d\n",
++ sprintf(MsgBuf, "%s: optionline longer than %zd\n",
+ myname, sizeof(OptionLine)-1);
+ Exit(MsgBuf, 3);
+ }
+@@ -1308,7 +1309,7 @@
+ Peer[PeerCount].fin= stdin;
+ Peer[PeerCount].fout= stdout;
+ syslog(LOG_DEBUG,
+- "call from %.50 (=%.30s): done remote initial processing\n",
++ "call from %.50s (=%.30s): done remote initial processing\n",
+ Peer[PeerCount].HostName, Peer[PeerCount].IPName);
+ PeerCount++;
+ }
+@@ -1617,7 +1618,7 @@
+ sinlh.sin_family = AF_INET;
+ #if defined(MULTICAST)
+ if (opt.MulticastChannel) {
+- int ml, p, join_group;
++ int p, join_group;
+ struct ip_mreq mreq;
+ sinlh.sin_port = htons(opt.MulticastPort);
+ if (bind(fd, (struct sockaddr *)&sinlh, sizeof(sinlh)) < 0) {
+@@ -1640,7 +1641,6 @@
+ sprintf(MsgBuf, DataPortFormat, DEFAULT_PORT);
+
+ /* tell it our clients */
+- ml= strlen(MsgBuf);
+ for (p=0; p<PeerCount; p++) {
+ fputs(MsgBuf, Peer[p].fout);
+ fflush(Peer[p].fout);
+@@ -1683,7 +1683,7 @@
+ }
+ else { /* == TCP */
+ struct sockaddr_in frominet;
+- int fromleng;
++ socklen_t fromleng;
+ fromleng = sizeof(frominet);
+ memset(&frominet, 0, fromleng);
+ AlarmMsg= "accept timed out\n";
+@@ -1694,7 +1694,7 @@
+ SetItVal(0);
+ if (opt.Verbose) {
+ struct sockaddr_in peer;
+- int peerlen = sizeof(peer);
++ socklen_t peerlen = sizeof(peer);
+ if (getpeername(fd, (struct sockaddr *)&peer, &peerlen) < 0)
+ exitError("getpeername", 19);
+ sprintf(MsgBuf,
+@@ -1732,7 +1732,7 @@
+
+ /* print window sizes */
+ if (opt.Verbose) {
+- int optlen;
++ socklen_t optlen;
+ int WinSize;
+
+ optlen= sizeof(WinSize);
+@@ -1899,8 +1899,8 @@
+ * rcr real call reate in Calls/s (float)
+ * ccr cpu call rate in Calls/s (float)
+ */
+- char *iFormat= "%*.*ld";
+- char *fFormat= "%*.*f";
++ const char iFormat[]= "%*.*ld";
++ const char fFormat[]= "%*.*f";
+ char *fs;
+ LenStr *TitleLine, *StatLine;
+
+@@ -2002,7 +2002,7 @@
+ fs+= 2;
+ }
+ else if (*fs == 'l') {
+- sprintf(MsgBuf, iFormat, fw, fp, opt.BufLen);
++ sprintf(MsgBuf, iFormat, fw, fp, (long int)opt.BufLen);
+ TitleStr= "BufLen";
+ fs++;
+ }
+@@ -2017,7 +2017,7 @@
+ fs++;
+ }
+ else if (*fs == 'c') {
+- sprintf(MsgBuf, iFormat, fw, fp, SysCalls);
++ sprintf(MsgBuf, iFormat, fw, fp, (long int)SysCalls);
+ TitleStr= "Calls";
+ fs++;
+ }
diff --git a/net-analyzer/nttcp/metadata.xml b/net-analyzer/nttcp/metadata.xml
new file mode 100644
index 000000000000..5051377f5abc
--- /dev/null
+++ b/net-analyzer/nttcp/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>tool to test TCP and UDP throughput</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/nttcp/nttcp-1.47-r1.ebuild b/net-analyzer/nttcp/nttcp-1.47-r1.ebuild
new file mode 100644
index 000000000000..5434fcc143dc
--- /dev/null
+++ b/net-analyzer/nttcp/nttcp-1.47-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="tool to test TCP and UDP throughput"
+HOMEPAGE="http://www.leo.org/~elmar/nttcp/"
+SRC_URI="http://www.leo.org/~elmar/nttcp/${P}.tar.gz"
+LICENSE="public-domain"
+
+SLOT="0"
+KEYWORDS="amd64 ~mips ~ppc x86"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-format-security.patch
+}
+
+src_compile() {
+ emake \
+ ARCH= \
+ CC="$(tc-getCC)" \
+ LFLAGS="${LDFLAGS}" \
+ OPT="${CFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.1
+}
diff --git a/net-analyzer/nttcp/nttcp-1.47-r3.ebuild b/net-analyzer/nttcp/nttcp-1.47-r3.ebuild
new file mode 100644
index 000000000000..906a90c352c7
--- /dev/null
+++ b/net-analyzer/nttcp/nttcp-1.47-r3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="tool to test TCP and UDP throughput"
+HOMEPAGE="http://www.leo.org/~elmar/nttcp/"
+SRC_URI="http://www.leo.org/~elmar/nttcp/${P}.tar.gz"
+LICENSE="public-domain"
+
+SLOT="0"
+KEYWORDS="amd64 ~mips ~ppc x86"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-format-security.patch
+}
+
+src_compile() {
+ emake \
+ ARCH= \
+ CC="$(tc-getCC)" \
+ LFLAGS="${LDFLAGS}" \
+ OPT="${CFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.1
+}