pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/iperf2 net/iperf2: Add version 2.0.13



details:   https://anonhg.NetBSD.org/pkgsrc/rev/176222c1cdd5
branches:  trunk
changeset: 448830:176222c1cdd5
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Mon Mar 15 16:44:32 2021 +0000

description:
net/iperf2: Add version 2.0.13

As discussed on pksrc-users@, this is the currently-maintained, more
or less, continuation fork of an older fork (in net/iperf) that is not
maintained.  It's net/iperf2 to avoid misleading users looking for
"iperf" into thinking that it is the normal approach.

Relative to net/iperf, this update drops a patch deleting upstream's
ad hoc definition of bool, because it fails to build on NetBSD with
that modification.

Iperf is a tool for measuring TCP and UDP bandwidth performance.
It reports bandwidth, delay jitter, datagram loss. It also supports
IPv6 and IP Multicast.

This version is a continuation fork of an older continuation fork of
the original code.  The original code and the first continuation fork
are no longer maintained.   See also net/iperf3.

diffstat:

 net/iperf2/DESCR                            |   7 +++++
 net/iperf2/Makefile                         |  26 ++++++++++++++++++++++
 net/iperf2/PLIST                            |   6 +++++
 net/iperf2/distinfo                         |   8 ++++++
 net/iperf2/patches/patch-src_Listener.cpp   |  34 +++++++++++++++++++++++++++++
 net/iperf2/patches/patch-src_PerfSocket.cpp |  20 +++++++++++++++++
 6 files changed, 101 insertions(+), 0 deletions(-)

diffs (125 lines):

diff -r 52722c1fb5e6 -r 176222c1cdd5 net/iperf2/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/iperf2/DESCR  Mon Mar 15 16:44:32 2021 +0000
@@ -0,0 +1,7 @@
+Iperf is a tool for measuring TCP and UDP bandwidth performance.
+It reports bandwidth, delay jitter, datagram loss. It also supports
+IPv6 and IP Multicast.
+
+This version is a continuation fork of an older continuation fork of
+the original code.  The original code and the first continuation fork
+are no longer maintained.   See also net/iperf3.
diff -r 52722c1fb5e6 -r 176222c1cdd5 net/iperf2/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/iperf2/Makefile       Mon Mar 15 16:44:32 2021 +0000
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1 2021/03/15 16:44:32 gdt Exp $
+
+DISTNAME=      iperf-2.0.13
+CATEGORIES=    net benchmarks
+MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=iperf2/}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://sourceforge.net/projects/iperf2/
+COMMENT=       TCP and UDP bandwidth performance measurement tool
+LICENSE=       modified-bsd
+
+.include "../../mk/bsd.prefs.mk"
+
+USE_LANGUAGES=         c c++
+GNU_CONFIGURE=         yes
+
+LIBS.SunOS+=           -lrt
+
+INSTALLATION_DIRS+=    share/doc/${PKGBASE}
+
+post-install:
+       ${INSTALL_DATA} ${WRKSRC}/doc/*.gif ${WRKSRC}/doc/*.html \
+               ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
+
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 52722c1fb5e6 -r 176222c1cdd5 net/iperf2/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/iperf2/PLIST  Mon Mar 15 16:44:32 2021 +0000
@@ -0,0 +1,6 @@
+@comment $NetBSD: PLIST,v 1.1 2021/03/15 16:44:32 gdt Exp $
+bin/iperf
+man/man1/iperf.1
+share/doc/iperf/dast.gif
+share/doc/iperf/index.html
+share/doc/iperf/ui_license.html
diff -r 52722c1fb5e6 -r 176222c1cdd5 net/iperf2/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/iperf2/distinfo       Mon Mar 15 16:44:32 2021 +0000
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2021/03/15 16:44:32 gdt Exp $
+
+SHA1 (iperf-2.0.13.tar.gz) = 0c7625c61087b9e6866421abb8bb533658b40a8d
+RMD160 (iperf-2.0.13.tar.gz) = 199ccc03cabb48e825b948688bbc1867369cf9ef
+SHA512 (iperf-2.0.13.tar.gz) = 40fcfb8f4d27887f53a743ac07396511fb2a7ac59f4b300fe36896bd0241e191945fa253705990711772ee776d5e4227ed62760fc92abebdfebcedd11c27c0ea
+Size (iperf-2.0.13.tar.gz) = 326148 bytes
+SHA1 (patch-src_Listener.cpp) = cb253ec55576675d5bf50a29e6b4ebe6a1391ac7
+SHA1 (patch-src_PerfSocket.cpp) = 1b1ef70ab3938078876277a37fc1a0d7c26deb49
diff -r 52722c1fb5e6 -r 176222c1cdd5 net/iperf2/patches/patch-src_Listener.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/iperf2/patches/patch-src_Listener.cpp Mon Mar 15 16:44:32 2021 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_Listener.cpp,v 1.1 2021/03/15 16:44:32 gdt Exp $
+
+Fix bug where the standards-specificed IPV6_JOIN_GROUP is not used.
+See https://tools.ietf.org/html/rfc3493 on page 20.
+See https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_10_16
+
+Fix bug where setsockopt was used with int when it is defined to use
+unsigned char.  This should avoid bugs on BE machines.
+
+Not yet reported upstream.
+
+--- src/Listener.cpp.orig      2019-01-22 20:31:17.000000000 +0000
++++ src/Listener.cpp
+@@ -462,6 +462,9 @@ void Listener::McastJoin( ) {
+ 
+       } else {
+ #ifdef HAVE_IPV6_MULTICAST
++#if !defined(IPV6_ADD_MEMBERSHIP) && defined(IPV6_JOIN_GROUP)
++#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
++#endif
+           struct ipv6_mreq mreq;
+ 
+           memcpy( &mreq.ipv6mr_multiaddr, SockAddr_get_in6_addr( &mSettings->local ),
+@@ -759,8 +762,9 @@ int Listener::L2_setup (void) {
+ void Listener::McastSetTTL( int val ) {
+ #ifdef HAVE_MULTICAST
+     if ( !SockAddr_isIPv6( &mSettings->local ) ) {
++        u_char uval = val;
+         int rc = setsockopt( mSettings->mSock, IPPROTO_IP, IP_MULTICAST_TTL,
+-                             (char*) &val, sizeof(val));
++                             (char*) &uval, sizeof(uval));
+         WARN_errno( rc == SOCKET_ERROR, "multicast ttl" );
+     }
+ #ifdef HAVE_IPV6_MULTICAST
diff -r 52722c1fb5e6 -r 176222c1cdd5 net/iperf2/patches/patch-src_PerfSocket.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/iperf2/patches/patch-src_PerfSocket.cpp       Mon Mar 15 16:44:32 2021 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-src_PerfSocket.cpp,v 1.1 2021/03/15 16:44:32 gdt Exp $
+
+Fix bug where setsockopt was used with int when it is defined to use
+unsigned char.  This should avoid bugs on BE machines.
+
+Not yet reported upstream.
+
+--- src/PerfSocket.cpp.orig    2019-01-22 20:31:18.000000000 +0000
++++ src/PerfSocket.cpp
+@@ -120,8 +120,9 @@ void SetSocketOptions( thread_Settings *
+           // set TTL
+           int val = inSettings->mTTL;
+           if ( !isIPV6(inSettings) ) {
++              u_char uval = val;
+               int rc = setsockopt( inSettings->mSock, IPPROTO_IP, IP_MULTICAST_TTL,
+-                                   (char*) &val, (Socklen_t) sizeof(val));
++                                   (char*) &uval, (Socklen_t) sizeof(val));
+ 
+               WARN_errno( rc == SOCKET_ERROR, "multicast v4 ttl" );
+           } else



Home | Main Index | Thread Index | Old Index