update to iperf 1.7.0 in order to support IPv6

inspired by a diff from Romain GAILLEGUE <buchu at biscotte.net>
ok jakob@
This commit is contained in:
sturm 2004-10-16 10:42:31 +00:00
parent 838c96e1c8
commit bd2b430f2d
6 changed files with 38 additions and 109 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.8 2004/02/25 02:35:16 naddy Exp $
# $OpenBSD: Makefile,v 1.9 2004/10/16 10:42:31 sturm Exp $
COMMENT= "tool for measuring maximum TCP and UDP bandwidth"
DISTNAME= iperf-1.2
DISTNAME= iperf-1.7.0
CATEGORIES= net
HOMEPAGE= http://dast.nlanr.net/Projects/Iperf/
@ -14,7 +14,12 @@ PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= "no fee license"
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= http://dast.nlanr.net/Projects/Iperf/
MASTER_SITES= http://dast.nlanr.net/Projects/Iperf/
EXTRACT_SUFX= -source.tar.gz
CONFIGURE_STYLE=gnu
WRKCONF= ${WRKSRC}/cfg
MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/cfg
MAKE_ENV= CC="${CC}" CXX="${CXX}" CXXFLAGS="${CXXFLAGS}"

View File

@ -1,3 +1,3 @@
MD5 (iperf-1.2.tar.gz) = b727074c779f8f3087dec5e455840201
RMD160 (iperf-1.2.tar.gz) = c1cb69ce223aada8fb5a831659a8e98aecee0ff7
SHA1 (iperf-1.2.tar.gz) = da52c4cec75dab85ecf1b024ed8f4bf5586aff11
MD5 (iperf-1.7.0-source.tar.gz) = 3e4aea85822bcf10ed14040f4b26bd26
RMD160 (iperf-1.7.0-source.tar.gz) = 573d325528d5dfdc7c6279ed942bf72948e32bdc
SHA1 (iperf-1.7.0-source.tar.gz) = 6f8058616f2105f8342e3a39366a3362b0f85589

View File

@ -1,71 +1,29 @@
$OpenBSD: patch-cfg_configure,v 1.2 2002/10/04 19:20:24 naddy Exp $
--- cfg/configure.orig Mon Feb 12 17:40:04 2001
+++ cfg/configure Wed Oct 2 00:42:49 2002
@@ -584,6 +584,7 @@ fi
$OpenBSD: patch-cfg_configure,v 1.3 2004/10/16 10:42:31 sturm Exp $
--- cfg/configure.orig Mon Mar 31 22:25:20 2003
+++ cfg/configure Sat Oct 16 09:27:27 2004
@@ -1687,7 +1687,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLA
ac_compiler_gnu=$ac_cv_c_compiler_gnu
OLD_CFLAGS="$CFLAGS"
+ac_cv_prog_CC=${CC-cc}
if test -n "$ac_cv_prog_CC"; then
echo "Using cached C compiler $ac_cv_prog_CC"
echo "To change compilers, use \"make distclean\" then rerun configure"
@@ -831,23 +832,12 @@ fi
-if test "$ac_cv_prog_gcc" = yes ; then
if test "$ac_cv_c_compiler_gnu" = yes ; then
- CFLAGS="$OLD_CFLAGS -Wall -O2"
-else
- if test `uname -s` = "HP-UX"; then
- CFLAGS="$OLD_CFLAGS -Ae +O2"
- elif test `uname -s` = "SunOS"; then
- CFLAGS="$OLD_CFLAGS -xO2"
- else
- CFLAGS="$OLD_CFLAGS -O2"
- fi
-fi
-
+ CFLAGS="$OLD_CFLAGS "
else
if test `uname -s` = "HP-UX"; then
CFLAGS="$OLD_CFLAGS -Ae +O2"
@@ -1999,7 +1999,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLA
ac_compiler_gnu=$ac_cv_c_compiler_gnu
OLD_CXXFLAGS="$CXXFLAGS"
+ac_cv_prog_CXX=${CXX-c++}
if test -n "$ac_cv_prog_CXX"; then
echo "Using cached C++ compiler $ac_cv_prog_CXX"
echo "To change compilers, use \"make distclean\" then rerun configure"
@@ -1016,18 +1006,6 @@ fi
-if test "$ac_cv_prog_gcc" = yes ; then
if test "$ac_cv_c_compiler_gnu" = yes ; then
- CXXFLAGS="$OLD_CXXFLAGS -Wall -O2"
-else
- if test `uname -s` = "HP-UX"; then
- CXXFLAGS="$OLD_CXXFLAGS -Ae +O2"
- elif test `uname -s` = "SunOS"; then
- CXXFLAGS="$OLD_CXXFLAGS -xO2"
- else
- CXXFLAGS="$OLD_CXXFLAGS -O2"
- fi
-fi
-
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
@@ -1065,14 +1043,7 @@ fi
echo
-if test -z "$ac_cv_use_pthread"; then
- ac_cv_use_pthread="yes"
-fi
-echo "Make iperf multi-threaded (using pthreads)? [$ac_cv_use_pthread] "
-read tmp
-if test -n "$tmp"; then
- ac_cv_use_pthread="$tmp"
-fi
+ac_cv_use_pthread="no"
if test "$ac_cv_use_pthread" = yes ; then
+ CXXFLAGS="$OLD_CXXFLAGS "
else
if test `uname -s` = "HP-UX"; then
CXXFLAGS="$OLD_CXXFLAGS -Ae +O2"
@@ -2400,6 +2400,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
+ac_cv_header_pthread_h=no
echo "$as_me:2403: result: $ac_cv_header_pthread_h" >&5
echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
if test $ac_cv_header_pthread_h = yes; then

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-src_Listener_cpp,v 1.1 2002/10/04 19:20:24 naddy Exp $
--- src/Listener.cpp.orig Wed Oct 2 00:20:14 2002
+++ src/Listener.cpp Wed Oct 2 00:22:19 2002
@@ -213,8 +213,8 @@ void Listener::runAsDaemon(const char *p
fflush(stdout);
/*umask(0);*/
- close((int)stdout);
- close((int)stdin);
+ close(fileno(stdout));
+ close(fileno(stdin));
openlog(pname,LOG_CONS,facility);
#else
printf("Windows daemon not supported currently\n");

View File

@ -1,20 +0,0 @@
$OpenBSD: patch-src_PerfSocket_UDP_cpp,v 1.1 2002/10/04 19:20:24 naddy Exp $
--- src/PerfSocket_UDP.cpp.orig Wed Oct 2 00:12:24 2002
+++ src/PerfSocket_UDP.cpp Wed Oct 2 00:14:06 2002
@@ -375,11 +375,13 @@ void PerfSocket::Multicast_remove_client
extern vector<sockaddr_in> clients;
- for (int i=0; i < (int)(clients).size(); i++) {
- sockaddr_in t1 = clients[i];
+ vector<sockaddr_in>::iterator iter = clients.begin();
+
+ for (; iter != clients.end(); iter++) {
+ sockaddr_in t1 = *iter;
if ( ((long) t1.sin_addr.s_addr == (long) peer.sin_addr.s_addr)
&& ( t1.sin_port == peer.sin_port)) {
- (clients).erase(&(clients[i]));
+ clients.erase(iter);
return;
}

View File

@ -1,8 +1,8 @@
@comment $OpenBSD: PLIST,v 1.2 2004/09/15 18:17:41 espie Exp $
@comment $OpenBSD: PLIST,v 1.3 2004/10/16 10:42:31 sturm Exp $
bin/iperf
share/doc/iperf/
share/doc/iperf/dast.gif
share/doc/iperf/index.html
share/doc/iperf/jperf.gif
share/doc/iperf/lib.html
share/doc/iperf/release.html
share/doc/iperf/ui_license.html