pkgsrc-Changes archive

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

CVS commit: pkgsrc/net/iperf2



Module Name:    pkgsrc
Committed By:   gdt
Date:           Mon Mar 15 16:44:32 UTC 2021

Added Files:
        pkgsrc/net/iperf2: DESCR Makefile PLIST distinfo
        pkgsrc/net/iperf2/patches: patch-src_Listener.cpp
            patch-src_PerfSocket.cpp

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/net/iperf2/DESCR pkgsrc/net/iperf2/Makefile \
    pkgsrc/net/iperf2/PLIST pkgsrc/net/iperf2/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/iperf2/patches/patch-src_Listener.cpp \
    pkgsrc/net/iperf2/patches/patch-src_PerfSocket.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/net/iperf2/DESCR
diff -u /dev/null pkgsrc/net/iperf2/DESCR:1.1
--- /dev/null   Mon Mar 15 16:44:32 2021
+++ pkgsrc/net/iperf2/DESCR     Mon Mar 15 16:44:32 2021
@@ -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.
Index: pkgsrc/net/iperf2/Makefile
diff -u /dev/null pkgsrc/net/iperf2/Makefile:1.1
--- /dev/null   Mon Mar 15 16:44:32 2021
+++ pkgsrc/net/iperf2/Makefile  Mon Mar 15 16:44:32 2021
@@ -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"
Index: pkgsrc/net/iperf2/PLIST
diff -u /dev/null pkgsrc/net/iperf2/PLIST:1.1
--- /dev/null   Mon Mar 15 16:44:32 2021
+++ pkgsrc/net/iperf2/PLIST     Mon Mar 15 16:44:32 2021
@@ -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
Index: pkgsrc/net/iperf2/distinfo
diff -u /dev/null pkgsrc/net/iperf2/distinfo:1.1
--- /dev/null   Mon Mar 15 16:44:32 2021
+++ pkgsrc/net/iperf2/distinfo  Mon Mar 15 16:44:32 2021
@@ -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

Index: pkgsrc/net/iperf2/patches/patch-src_Listener.cpp
diff -u /dev/null pkgsrc/net/iperf2/patches/patch-src_Listener.cpp:1.1
--- /dev/null   Mon Mar 15 16:44:32 2021
+++ pkgsrc/net/iperf2/patches/patch-src_Listener.cpp    Mon Mar 15 16:44:32 2021
@@ -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
Index: pkgsrc/net/iperf2/patches/patch-src_PerfSocket.cpp
diff -u /dev/null pkgsrc/net/iperf2/patches/patch-src_PerfSocket.cpp:1.1
--- /dev/null   Mon Mar 15 16:44:32 2021
+++ pkgsrc/net/iperf2/patches/patch-src_PerfSocket.cpp  Mon Mar 15 16:44:32 2021
@@ -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