Merge branch 'master' into issue-1215-tcp-send-timeout

This commit is contained in:
Bruce A. Mah 2022-03-28 13:23:47 -07:00 committed by GitHub
commit 5c2cbf4cf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 398 additions and 263 deletions

View File

@ -1,5 +1,5 @@
"iperf, Copyright (c) 2014-2021, The Regents of the University of California,
through Lawrence Berkeley National Laboratory (subject to receipt of any
"iperf, Copyright (c) 2014-2022, The Regents of the University of California,
through Lawrence Berkeley National Laboratory (subject to receipt of any
required approvals from the U.S. Dept. of Energy). All rights reserved."
Redistribution and use in source and binary forms, with or without

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.3 from Makefile.am.
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -154,18 +154,16 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/iperf3.spec.in \
$(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \
$(top_srcdir)/config/config.sub \
$(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \
$(top_srcdir)/config/missing \
$(top_srcdir)/config/mkinstalldirs INSTALL config/compile \
config/config.guess config/config.sub config/install-sh \
config/ltmain.sh config/missing config/mkinstalldirs
$(top_srcdir)/config/mkinstalldirs INSTALL README.md \
config/compile config/config.guess config/config.sub \
config/install-sh config/ltmain.sh config/missing \
config/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@ -222,6 +220,8 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@ -232,6 +232,7 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
@ -484,7 +485,6 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am

View File

@ -150,7 +150,7 @@ responsibility for the content of these pages.
Copyright
---------
iperf, Copyright (c) 2014-2021, The Regents of the University of
iperf, Copyright (c) 2014-2022, The Regents of the University of
California, through Lawrence Berkeley National Laboratory (subject
to receipt of any required approvals from the U.S. Dept. of
Energy). All rights reserved.

View File

@ -1,6 +1,39 @@
iperf3 Release Notes
====================
iperf-3.11 2022-01-31
-----------------------
* Notable user-visible changes
* Update links to Discussions in documentation
* Fix DSCP so that TOS = DSCP * 4 (#1162)
* Fix --bind-dev for TCP streams (#1153)
* Fix interface specification so doesn't overlap with IPv6 link-local addresses for -c and -B (#1157, #1180)
* Add get/set test_unit_format function declaration to iperf_api.h
* Auto adjustment of test-end condition for file transfers (-F), if no end condition is set, it will automatically adjust it to file size in bytes
* Exit if idle time expires waiting for a connection in one-off mode (#1187, #1197)
* Support zerocopy by reverse mode (#1204)
* Update help and manpage text for #1157, support bind device
* Consistently print target_bandwidth in JSON start section (#1177)
* Test bitrate added to JSON output (#1168)
* Remove fsync call after every write to receiving --file (#1176, #1159)
* Update documentation for -w (#1175)
* Fix for #952, different JSON object names for bidir reverse channel
iperf-3.10.1 2021-06-03
-----------------------

66
aclocal.m4 vendored
View File

@ -1,6 +1,6 @@
# generated automatically by aclocal 1.16.3 -*- Autoconf -*-
# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -9044,7 +9044,7 @@ m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
# Copyright (C) 2002-2020 Free Software Foundation, Inc.
# Copyright (C) 2002-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -9059,7 +9059,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.16.3], [],
m4_if([$1], [1.16.5], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@ -9075,14 +9075,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.16.3])dnl
[AM_AUTOMAKE_VERSION([1.16.5])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -9134,7 +9134,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
# Copyright (C) 1997-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -9165,7 +9165,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -9356,7 +9356,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -9424,7 +9424,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -9452,6 +9452,10 @@ m4_defn([AC_PROG_CC])
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.65])dnl
m4_ifdef([_$0_ALREADY_INIT],
[m4_fatal([$0 expanded multiple times
]m4_defn([_$0_ALREADY_INIT]))],
[m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@ -9488,7 +9492,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
m4_if(
m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
[ok:ok],,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
@ -9540,6 +9544,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
[m4_define([AC_PROG_OBJCXX],
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
])
# Variables for tags utilities; see am/tags.am
if test -z "$CTAGS"; then
CTAGS=ctags
fi
AC_SUBST([CTAGS])
if test -z "$ETAGS"; then
ETAGS=etags
fi
AC_SUBST([ETAGS])
if test -z "$CSCOPE"; then
CSCOPE=cscope
fi
AC_SUBST([CSCOPE])
AC_REQUIRE([AM_SILENT_RULES])dnl
dnl The testsuite driver may need to know about EXEEXT, so add the
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
@ -9621,7 +9639,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -9642,7 +9660,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
# Copyright (C) 2003-2020 Free Software Foundation, Inc.
# Copyright (C) 2003-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -9664,7 +9682,7 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -9699,7 +9717,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -9742,7 +9760,7 @@ AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
# Copyright (C) 1997-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -9776,7 +9794,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -9805,7 +9823,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -9852,7 +9870,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -9871,7 +9889,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -9952,7 +9970,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
# Copyright (C) 2009-2020 Free Software Foundation, Inc.
# Copyright (C) 2009-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -10012,7 +10030,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -10040,7 +10058,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006-2020 Free Software Foundation, Inc.
# Copyright (C) 2006-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -10059,7 +10077,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004-2020 Free Software Foundation, Inc.
# Copyright (C) 2004-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,

View File

@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify

View File

@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify

27
configure vendored
View File

@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='iperf'
PACKAGE_TARNAME='iperf'
PACKAGE_VERSION='3.10.1+'
PACKAGE_STRING='iperf 3.10.1+'
PACKAGE_VERSION='3.11'
PACKAGE_STRING='iperf 3.11'
PACKAGE_BUGREPORT='https://github.com/esnet/iperf'
PACKAGE_URL='https://software.es.net/iperf/'
@ -695,6 +695,9 @@ AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
AM_V
CSCOPE
ETAGS
CTAGS
am__untar
am__tar
AMTAR
@ -1339,7 +1342,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures iperf 3.10.1+ to adapt to many kinds of systems.
\`configure' configures iperf 3.11 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1410,7 +1413,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of iperf 3.10.1+:";;
short | recursive ) echo "Configuration of iperf 3.11:";;
esac
cat <<\_ACEOF
@ -2910,7 +2913,7 @@ fi
# Define the identity of the package.
PACKAGE='iperf'
VERSION='3.10.1+'
VERSION='3.11'
cat >>confdefs.h <<_ACEOF
@ -2960,6 +2963,20 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
# Variables for tags utilities; see am/tags.am
if test -z "$CTAGS"; then
CTAGS=ctags
fi
if test -z "$ETAGS"; then
ETAGS=etags
fi
if test -z "$CSCOPE"; then
CSCOPE=cscope
fi
# POSIX will say in a future version that running "rm -f" with no argument
# is OK; and we want to be able to make that assumption in our Makefile

View File

@ -1,4 +1,4 @@
# iperf, Copyright (c) 2014-2021, The Regents of the University of
# iperf, Copyright (c) 2014-2022, The Regents of the University of
# California, through Lawrence Berkeley National Laboratory (subject
# to receipt of any required approvals from the U.S. Dept. of
# Energy). All rights reserved.
@ -25,7 +25,7 @@
# Initialize the autoconf system for the specified tool, version and mailing list
AC_PREREQ([2.71])
AC_INIT([iperf],[3.10.1+],[https://github.com/esnet/iperf],[iperf],[https://software.es.net/iperf/])
AC_INIT([iperf],[3.11],[https://github.com/esnet/iperf],[iperf],[https://software.es.net/iperf/])
m4_include([config/ax_check_openssl.m4])
m4_include([config/iperf_config_static_bin.m4])
AC_LANG(C)

View File

@ -45,7 +45,7 @@ master_doc = 'index'
# General information about the project.
project = u'iperf3'
copyright = u'2014-2021, ESnet'
copyright = u'2014-2022, ESnet'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the

View File

@ -28,72 +28,72 @@ the executable.
::
IPERF3(1) User Manuals IPERF3(1)
NAME
iperf3 - perform network throughput tests
SYNOPSIS
iperf3 -s [ options ]
iperf3 -c server [ options ]
DESCRIPTION
iperf3 is a tool for performing network throughput measurements. It
can test TCP, UDP, or SCTP throughput. To perform an iperf3 test the
user must establish both a server and a client.
The iperf3 executable contains both client and server functionality.
An iperf3 server can be started using either of the -s or --server com-
mand-line parameters, for example:
iperf3 -s
iperf3 --server
Note that many iperf3 parameters have both short (-s) and long
(--server) forms. In this section we will generally use the short form
of command-line flags, unless only the long form of a flag is avail-
able.
By default, the iperf3 server listens on TCP port 5201 for connections
from an iperf3 client. A custom port can be specified by using the -p
flag, for example:
iperf3 -s -p 5002
After the server is started, it will listen for connections from iperf3
clients (in other words, the iperf3 program run in client mode). The
client mode can be started using the -c command-line option, which also
requires a host to which iperf3 should connect. The host can by speci-
fied by hostname, IPv4 literal, or IPv6 literal:
iperf3 -c iperf3.example.com
iperf3 -c 192.0.2.1
iperf3 -c 2001:db8::1
If the iperf3 server is running on a non-default TCP port, that port
number needs to be specified on the client as well:
iperf3 -c iperf3.example.com -p 5002
The initial TCP connection is used to exchange test parameters, control
the start and end of the test, and to exchange test results. This is
sometimes referred to as the "control connection". The actual test
data is sent over a separate TCP connection, as a separate flow of UDP
packets, or as an independent SCTP connection, depending on what proto-
col was specified by the client.
Normally, the test data is sent from the client to the server, and mea-
sures the upload speed of the client. Measuring the download speed
from the server can be done by specifying the -R flag on the client.
This causes data to be sent from the server to the client.
iperf3 -c iperf3.example.com -p 5202 -R
Results are displayed on both the client and server. There will be at
least one line of output per measurement interval (by default a mea-
surement interval lasts for one second, but this can be changed by the
@ -103,43 +103,43 @@ the executable.
measurement interval are taken from the point of view of the endpoint
process emitting that output (in other words, the output on the client
shows the measurement interval data for the client.
At the end of the test is a set of statistics that shows (at least as
much as possible) a summary of the test as seen by both the sender and
the receiver, with lines tagged accordingly. Recall that by default
the client is the sender and the server is the receiver, although as
indicated above, use of the -R flag will reverse these roles.
The client can be made to retrieve the server-side output for a given
test by specifying the --get-server-output flag.
Either the client or the server can produce its output in a JSON struc-
ture, useful for integration with other programs, by passing it the -J
flag. Because the contents of the JSON structure are only competely
flag. Because the contents of the JSON structure are only completely
known after the test has finished, no JSON output will be emitted until
the end of the test.
iperf3 has a (overly) large set of command-line options that can be
used to set the parameters of a test. They are given in the "GENERAL
OPTIONS" section of the manual page below, as well as summarized in
iperf3's help output, which can be viewed by running iperf3 with the -h
flag.
GENERAL OPTIONS
-p, --port n
set server port to listen on/connect to to n (default 5201)
-f, --format
[kmgtKMGT] format to report: Kbits/Mbits/Gbits/Tbits
-i, --interval n
pause n seconds between periodic throughput reports; default is
1, use 0 to disable
-I, --pidfile file
write a file with the process ID, most useful when running as a
daemon.
-F, --file name
Use a file as the source (on the sender) or sink (on the
receiver) of data, rather than just generating random data or
@ -148,7 +148,7 @@ the executable.
It does not turn iperf3 into a file transfer tool. The length,
attributes, and in some cases contents of the received file may
not match those of the original file.
-A, --affinity n/n,m
Set the CPU affinity, if possible (Linux, FreeBSD, and Windows
only). On both the client and server you can set the local
@ -157,105 +157,118 @@ the executable.
server's affinity for just that one test, using the n,m form of
argument. Note that when using this feature, a process will
only be bound to a single CPU (as opposed to a set containing
potentialy multiple CPUs).
-B, --bind host
bind to the specific interface associated with address host.
--bind-dev dev.ft R bind to the specified network interface.
This option uses SO_BINDTODEVICE, and may require root permis-
sions. (Available on Linux and possibly other systems.)
potentially multiple CPUs).
-B, --bind host[%dev]
bind to the specific interface associated with address host. If
an optional interface is specified, it is treated as a shortcut
for --bind-dev dev. Note that a percent sign and interface
device name are required for IPv6 link-local address literals.
--bind-dev dev bind to the specified network interface. This
option uses SO_BINDTODEVICE, and may require root permissions.
(Available on Linux and possibly other systems.)
-V, --verbose
give more detailed output
-J, --json
output in JSON format
--logfile file
send output to a log file.
--forceflush
force flushing output at every interval. Used to avoid buffer-
force flushing output at every interval. Used to avoid buffer-
ing when sending output to pipe.
--timestamps[=format]
prepend a timestamp at the start of each output line. By
default, timestamps have the format emitted by ctime(1).
Optionally, = followed by a format specification can be passed
to customize the timestamps, see strftime(3). If this optional
format is given, the = must immediately follow the --timestamps
prepend a timestamp at the start of each output line. By
default, timestamps have the format emitted by ctime(1).
Optionally, = followed by a format specification can be passed
to customize the timestamps, see strftime(3). If this optional
format is given, the = must immediately follow the --timestamps
option with no whitespace intervening.
--rcv-timeout #
set idle timeout for receiving data during active tests. The
set idle timeout for receiving data during active tests. The
receiver will halt a test if no data is received from the sender
for this number of ms (default to 12000 ms, or 2 minutes).
-d, --debug
emit debugging output. Primarily (perhaps exclusively) of use
emit debugging output. Primarily (perhaps exclusively) of use
to developers.
-v, --version
show version information and quit
-h, --help
show a help synopsis
SERVER SPECIFIC OPTIONS
-s, --server
run in server mode
-D, --daemon
run the server in background as a daemon
-1, --one-off
handle one client connection, then exit.
handle one client connection, then exit. If an idle time is
set, the server will exit after that amount of time with no con-
nection.
--idle-timeout n
restart the server after n seconds in case it gets stuck. In
one-off mode, this is the number of seconds the server will wait
before exiting.
--server-bitrate-limit n[KMGT]
set a limit on the server side, which will cause a test to abort
if the client specifies a test of more than n bits per second,
if the client specifies a test of more than n bits per second,
or if the average data sent or received by the client (including
all data streams) is greater than n bits per second. The
default limit is zero, which implies no limit. The interval
all data streams) is greater than n bits per second. The
default limit is zero, which implies no limit. The interval
over which to average the data rate is 5 seconds by default, but
can be specified by adding a '/' and a number to the bitrate
can be specified by adding a '/' and a number to the bitrate
specifier.
--rsa-private-key-path file
path to the RSA private key (not password-protected) used to
decrypt authentication credentials from the client (if built
path to the RSA private key (not password-protected) used to
decrypt authentication credentials from the client (if built
with OpenSSL support).
--authorized-users-path file
path to the configuration file containing authorized users cre-
dentials to run iperf tests (if built with OpenSSL support).
The file is a comma separated list of usernames and password
hashes; more information on the structure of the file can be
path to the configuration file containing authorized users cre-
dentials to run iperf tests (if built with OpenSSL support).
The file is a comma separated list of usernames and password
hashes; more information on the structure of the file can be
found in the EXAMPLES section.
--time-skew-thresholdsecond seconds
time skew threshold (in seconds) between the server and client
time skew threshold (in seconds) between the server and client
during the authentication process.
CLIENT SPECIFIC OPTIONS
-c, --client host
run in client mode, connecting to the specified server. By
default, a test consists of sending data from the client to the
server, unless the -R flag is specified.
-c, --client host[%dev]
run in client mode, connecting to the specified server. By
default, a test consists of sending data from the client to the
server, unless the -R flag is specified. If an optional inter-
face is specified, it is treated as a shortcut for --bind-dev
dev. Note that a percent sign and interface device name are
required for IPv6 link-local address literals.
--sctp use SCTP rather than TCP (FreeBSD and Linux)
-u, --udp
use UDP rather than TCP
--connect-timeout n
set timeout for establishing the initial control connection to
the server, in milliseconds. The default behavior is the oper-
ating system's timeout for TCP connection establishment. Pro-
viding a shorter value may speed up detection of a down iperf3
server.
-b, --bitrate n[KMGT]
set target bitrate to n bits/sec (default 1 Mbit/sec for UDP,
unlimited for TCP/SCTP). If there are multiple streams (-P
@ -269,7 +282,7 @@ the executable.
inside iperf3, and is available on all platforms. Compare with
the --fq-rate flag. This option replaces the --bandwidth flag,
which is now deprecated but (at least for now) still accepted.
--pacing-timer n[KMGT]
set pacing timer interval in microseconds (default 1000
microseconds, or 1 ms). This controls iperf3's internal pacing
@ -278,7 +291,7 @@ the executable.
timer parameter smooth out the traffic emitted by iperf3, but
potentially at the cost of performance due to more frequent
timer processing.
--fq-rate n[KMGT]
Set a rate to be used with fair-queueing based socket-level pac-
ing, in bits per second. This pacing (if specified) will be in
@ -287,201 +300,207 @@ the executable.
test. Only available on platforms supporting the SO_MAX_PAC-
ING_RATE socket option (currently only Linux). The default is
no fair-queueing based pacing.
--no-fq-socket-pacing
This option is deprecated and will be removed. It is equivalent
to specifying --fq-rate=0.
-t, --time n
time in seconds to transmit for (default 10 secs)
-n, --bytes n[KMGT]
number of bytes to transmit (instead of -t)
-k, --blockcount n[KMGT]
number of blocks (packets) to transmit (instead of -t or -n)
-l, --length n[KMGT]
length of buffer to read or write. For TCP tests, the default
value is 128KB. In the case of UDP, iperf3 tries to dynamically
determine a reasonable sending size based on the path MTU; if
that cannot be determined it uses 1460 bytes as a sending size.
For SCTP tests, the default size is 64KB.
--cport port
bind data streams to a specific client port (for TCP and UDP
only, default is to use an ephemeral port)
-P, --parallel n
number of parallel client streams to run. Note that iperf3 is
single threaded, so if you are CPU bound, this will not yield
higher throughput.
-R, --reverse
reverse the direction of a test, so that the server sends data
to the client
--bidir
test in both directions (normal and reverse), with both the
client and server sending and receiving data simultaneously
-w, --window n[KMGT]
window size / socket buffer size (this gets sent to the server
and used on that side too)
set socket buffer size / window size. This value gets sent to
the server and used on that side too; on both sides this option
sets both the sending and receiving socket buffer sizes. This
option can be used to set (indirectly) the maximum TCP window
size. Note that on Linux systems, the effective maximum window
size is approximately double what is specified by this option
(this behavior is not a bug in iperf3 but a "feature" of the
Linux kernel, as documented by tcp(7) and socket(7)).
-M, --set-mss n
set TCP/SCTP maximum segment size (MTU - 40 bytes)
-N, --no-delay
set TCP/SCTP no delay, disabling Nagle's Algorithm
-4, --version4
only use IPv4
-6, --version6
only use IPv6
-S, --tos n
set the IP type of service. The usual prefixes for octal and hex
can be used, i.e. 52, 064 and 0x34 all specify the same value.
--dscp dscp
set the IP DSCP bits. Both numeric and symbolic values are
accepted. Numeric values can be specified in decimal, octal and
hex (see --tos above).
hex (see --tos above). To set both the DSCP bits and the ECN
bits, use --tos.
-L, --flowlabel n
set the IPv6 flow label (currently only supported on Linux)
-X, --xbind name
Bind SCTP associations to a specific subset of links using
sctp_bindx(3). The --B flag will be ignored if this flag is
Bind SCTP associations to a specific subset of links using
sctp_bindx(3). The --B flag will be ignored if this flag is
specified. Normally SCTP will include the protocol addresses of
all active links on the local host when setting up an associa-
tion. Specifying at least one --X name will disable this behav-
iour. This flag must be specified for each link to be included
in the association, and is supported for both iperf servers and
all active links on the local host when setting up an associa-
tion. Specifying at least one --X name will disable this behav-
iour. This flag must be specified for each link to be included
in the association, and is supported for both iperf servers and
clients (the latter are supported by passing the first --X argu-
ment to bind(2)). Hostnames are accepted as arguments and are
resolved using getaddrinfo(3). If the --4 or --6 flags are
specified, names which do not resolve to addresses within the
ment to bind(2)). Hostnames are accepted as arguments and are
resolved using getaddrinfo(3). If the --4 or --6 flags are
specified, names which do not resolve to addresses within the
specified protocol family will be ignored.
--nstreams n
Set number of SCTP streams.
-Z, --zerocopy
Use a "zero copy" method of sending data, such as sendfile(2),
Use a "zero copy" method of sending data, such as sendfile(2),
instead of the usual write(2).
-O, --omit n
Omit the first n seconds of the test, to skip past the TCP slow-
start period.
-T, --title str
Prefix every output line with this string.
--extra-data str
Specify an extra data string field to be included in JSON out-
Specify an extra data string field to be included in JSON out-
put.
-C, --congestion algo
Set the congestion control algorithm (Linux and FreeBSD only).
An older --linux-congestion synonym for this flag is accepted
Set the congestion control algorithm (Linux and FreeBSD only).
An older --linux-congestion synonym for this flag is accepted
but is deprecated.
--get-server-output
Get the output from the server. The output format is determined
by the server (in particular, if the server was invoked with the
--json flag, the output will be in JSON format, otherwise it
will be in human-readable format). If the client is run with
--json, the server output is included in a JSON object; other-
wise it is appended at the bottom of the human-readable output.
--json flag, the output will be in JSON format, otherwise it
will be in human-readable format). If the client is run with
--json, the server output is included in a JSON object; other-
wise it is appended at the bottom of the human-readable output.
--udp-counters-64bit
Use 64-bit counters in UDP test packets. The use of this option
can help prevent counter overflows during long or high-bitrate
UDP tests. Both client and server need to be running at least
version 3.1 for this option to work. It may become the default
can help prevent counter overflows during long or high-bitrate
UDP tests. Both client and server need to be running at least
version 3.1 for this option to work. It may become the default
behavior at some point in the future.
--repeating-payload
Use repeating pattern in payload, instead of random bytes. The
same payload is used in iperf2 (ASCII '0..9' repeating). It
might help to test and reveal problems in networking gear with
hardware compression (including some WiFi access points), where
iperf2 and iperf3 perform differently, just based on payload
Use repeating pattern in payload, instead of random bytes. The
same payload is used in iperf2 (ASCII '0..9' repeating). It
might help to test and reveal problems in networking gear with
hardware compression (including some WiFi access points), where
iperf2 and iperf3 perform differently, just based on payload
entropy.
--dont-fragment
Set the IPv4 Don't Fragment (DF) bit on outgoing packets. Only
Set the IPv4 Don't Fragment (DF) bit on outgoing packets. Only
applicable to tests doing UDP over IPv4.
--username username
username to use for authentication to the iperf server (if built
with OpenSSL support). The password will be prompted for inter-
actively when the test is run. Note, the password to use can
also be specified via the IPERF3_PASSWORD environment variable.
If this variable is present, the password prompt will be
actively when the test is run. Note, the password to use can
also be specified via the IPERF3_PASSWORD environment variable.
If this variable is present, the password prompt will be
skipped.
--rsa-public-key-path file
path to the RSA public key used to encrypt authentication cre-
path to the RSA public key used to encrypt authentication cre-
dentials (if built with OpenSSL support)
EXAMPLES
Authentication - RSA Keypair
The authentication feature of iperf3 requires an RSA public keypair.
The public key is used to encrypt the authentication token containing
the user credentials, while the private key is used to decrypt the
authentication token. The private key must be in PEM format and addi-
tionally must not have a password set. The public key must be in PEM
format and use SubjectPrefixKeyInfo encoding. An example of a set of
UNIX/Linux commands using OpenSSL to generate a correctly-formed key-
The authentication feature of iperf3 requires an RSA public keypair.
The public key is used to encrypt the authentication token containing
the user credentials, while the private key is used to decrypt the
authentication token. The private key must be in PEM format and addi-
tionally must not have a password set. The public key must be in PEM
format and use SubjectPrefixKeyInfo encoding. An example of a set of
UNIX/Linux commands using OpenSSL to generate a correctly-formed key-
pair follows:
> openssl genrsa -des3 -out private.pem 2048
> openssl rsa -in private.pem -outform PEM -pubout -out public.pem
> openssl rsa -in private.pem -out private_not_protected.pem -out-
form PEM
After these commands, the public key will be contained in the file pub-
lic.pem and the private key will be contained in the file pri-
lic.pem and the private key will be contained in the file pri-
vate_not_protected.pem.
Authentication - Authorized users configuration file
A simple plaintext file must be provided to the iperf3 server in order
to specify the authorized user credentials. The file is a simple list
of comma-separated pairs of a username and a corresponding password
hash. The password hash is a SHA256 hash of the string "{$user}$pass-
word". The file can also contain commented lines (starting with the #
character). An example of commands to generate the password hash on a
A simple plaintext file must be provided to the iperf3 server in order
to specify the authorized user credentials. The file is a simple list
of comma-separated pairs of a username and a corresponding password
hash. The password hash is a SHA256 hash of the string "{$user}$pass-
word". The file can also contain commented lines (starting with the #
character). An example of commands to generate the password hash on a
UNIX/Linux system is given below:
> S_USER=mario S_PASSWD=rossi
> echo -n "{$S_USER}$S_PASSWD" | sha256sum | awk '{ print $1 }'
An example of a password file (with an entry corresponding to the above
username and password) is given below:
> cat credentials.csv
# file format: username,sha256
mario,bf7a49a846d44b454a5d11e7acfaf13d138bbe0b7483aa3e050879700572709b
AUTHORS
A list of the contributors to iperf3 can be found within the documenta-
tion located at https://software.es.net/iperf/dev.html#authors.
SEE ALSO
libiperf(3), https://software.es.net/iperf
ESnet February 2021
IPERF3(1)
ESnet January 2022 IPERF3(1)
The iperf3 manual page will typically be installed in manual
section 1.

View File

@ -1,6 +1,15 @@
iperf3 Project News
===================
2022-01-28: iperf-3.11 released
----------------------------------
| URL: https://downloads.es.net/pub/iperf/iperf-3.11.tar.gz
| SHA256: ``de8cb409fad61a0574f4cb07eb19ce1159707403ac2dc01b5d175e91240b7e5f``
iperf 3.11 is principally a bugfix release. Also GitHub
Discussions are now supported.
2021-06-02: iperf-3.10.1 released
----------------------------------

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.3 from Makefile.am.
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -177,8 +177,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \
$(top_srcdir)/config/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@ -194,6 +192,8 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@ -204,6 +204,7 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
@ -483,7 +484,6 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am

View File

@ -16,8 +16,8 @@ dirname=`echo "$tag $proj" | awk '{
gsub(/-RELEASE/, "", $1);
print $2"-"$1 }'`
# echo tag $tag
# echo dirname $dirname
echo tag $tag
echo dirname $dirname
do_tag ()
{

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.3 from Makefile.am.
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -322,8 +322,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__tty_colors_dummy = \
mgn= red= grn= lgn= blu= brg= std=; \
am__color_tests=no
@ -520,6 +518,8 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@ -530,6 +530,7 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
@ -1649,7 +1650,6 @@ t_auth.log: t_auth$(EXEEXT)
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am

View File

@ -422,4 +422,12 @@ struct iperf_test
extern int gerror; /* error value from getaddrinfo(3), for use in internal error handling */
/* UDP "connect" message and reply (textual value for Wireshark, etc. readability - legacy was numeric) */
#define UDP_CONNECT_MSG 0x36373839 // "6789" - legacy value was 123456789
#define UDP_CONNECT_REPLY 0x39383736 // "9876" - legacy value was 987654321
#define LEGACY_UDP_CONNECT_REPLY 987654321 // Old servers may still reply with the legacy value
/* In Reverse mode, maxmimum number of packtes to wait for "accept" response - to handle out of order packets */
#define MAX_REVERSE_OUT_OF_ORDER_PACKETS 2
#endif /* !__IPERF_H */

View File

@ -1,4 +1,4 @@
.TH IPERF3 1 "February 2021" ESnet "User Manuals"
.TH IPERF3 1 "January 2022" ESnet "User Manuals"
.SH NAME
iperf3 \- perform network throughput tests
.SH SYNOPSIS
@ -145,6 +145,7 @@ bind to the specific interface associated with address \fIhost\fR.
If an optional interface is specified, it is treated as a shortcut
for \fB--bind-dev \fIdev\fR.
Note that a percent sign and interface device name are required for IPv6 link-local address literals.
.TP
.BR --bind-dev " \fIdev\fR"
bind to the specified network interface.
This option uses SO_BINDTODEVICE, and may require root permissions.

View File

@ -1,5 +1,5 @@
/*
* iperf, Copyright (c) 2014-2021, The Regents of the University of
* iperf, Copyright (c) 2014-2022, The Regents of the University of
* California, through Lawrence Berkeley National Laboratory (subject
* to receipt of any required approvals from the U.S. Dept. of
* Energy). All rights reserved.
@ -1659,7 +1659,7 @@ iperf_parse_arguments(struct iperf_test *test, int argc, char **argv)
iperf_size_t file_bytes = st.st_size;
test->settings->bytes = file_bytes;
if (test->debug)
printf("End condition set to file-size: %d bytes\n", test->settings->bytes);
printf("End condition set to file-size: %"PRIu64" bytes\n", test->settings->bytes);
}
// if failing to read file stat, it should fallback to default duration mode
}
@ -4346,6 +4346,10 @@ iperf_add_stream(struct iperf_test *test, struct iperf_stream *sp)
sp->id = 1;
} else {
// for (n = test->streams, i = 2; n->next; n = n->next, ++i);
// NOTE: this would ideally be set to 1, however this will not
// be changed since it is not causing a significant problem
// and changing it would break multi-stream tests between old
// and new iperf3 versions.
i = 2;
SLIST_FOREACH(n, &test->streams, streams) {
prev = n;
@ -4438,7 +4442,7 @@ diskfile_recv(struct iperf_stream *sp)
r = sp->rcv2(sp);
if (r > 0) {
(void) write(sp->diskfile_fd, sp->buffer, r);
(void) (write(sp->diskfile_fd, sp->buffer, r) + 1);
}
return r;
}

View File

@ -1,5 +1,5 @@
/*
* iperf, Copyright (c) 2014-2021, The Regents of the University of
* iperf, Copyright (c) 2014-2022, The Regents of the University of
* California, through Lawrence Berkeley National Laboratory (subject
* to receipt of any required approvals from the U.S. Dept. of
* Energy). All rights reserved.

View File

@ -1,5 +1,5 @@
/*
* iperf, Copyright (c) 2014-2021, The Regents of the University of
* iperf, Copyright (c) 2014-2022, The Regents of the University of
* California, through Lawrence Berkeley National Laboratory (subject
* to receipt of any required approvals from the U.S. Dept. of
* Energy). All rights reserved.
@ -69,9 +69,15 @@ iperf_create_streams(struct iperf_test *test, int sender)
for (i = 0; i < test->num_streams; ++i) {
test->bind_port = orig_bind_port;
if (orig_bind_port)
if (orig_bind_port) {
test->bind_port += i;
if ((s = test->protocol->connect(test)) < 0)
// If Bidir make sure send and receive ports are different
if (!sender && test->mode == BIDIRECTIONAL)
test->bind_port += test->num_streams;
}
s = test->protocol->connect(test);
test->bind_port = orig_bind_port;
if (s < 0)
return -1;
#if defined(HAVE_TCP_CONGESTION)

View File

@ -1,5 +1,5 @@
/*
* iperf, Copyright (c) 2014-2021, The Regents of the University of
* iperf, Copyright (c) 2014-2022, The Regents of the University of
* California, through Lawrence Berkeley National Laboratory (subject
* to receipt of any required approvals from the U.S. Dept. of
* Energy). All rights reserved.

View File

@ -1,5 +1,5 @@
/*---------------------------------------------------------------
* iperf, Copyright (c) 2014-2021, The Regents of the University of
* iperf, Copyright (c) 2014-2022, The Regents of the University of
* California, through Lawrence Berkeley National Laboratory (subject
* to receipt of any required approvals from the U.S. Dept. of
* Energy). All rights reserved.

View File

@ -1,5 +1,5 @@
/*
* iperf, Copyright (c) 2014-2021 The Regents of the University of
* iperf, Copyright (c) 2014-2022 The Regents of the University of
* California, through Lawrence Berkeley National Laboratory (subject
* to receipt of any required approvals from the U.S. Dept. of
* Energy). All rights reserved.
@ -447,7 +447,7 @@ iperf_run_server(struct iperf_test *test)
if (test->logfile)
if (iperf_open_logfile(test) < 0)
return -1;
return -2;
if (test->affinity != -1)
if (iperf_setaffinity(test, test->affinity) != 0)

View File

@ -1,5 +1,5 @@
/*
* iperf, Copyright (c) 2014-2021, The Regents of the University of
* iperf, Copyright (c) 2014-2022, The Regents of the University of
* California, through Lawrence Berkeley National Laboratory (subject
* to receipt of any required approvals from the U.S. Dept. of
* Energy). All rights reserved.

View File

@ -1,5 +1,5 @@
/*
* iperf, Copyright (c) 2014-2021, The Regents of the University of
* iperf, Copyright (c) 2014-2022, The Regents of the University of
* California, through Lawrence Berkeley National Laboratory (subject
* to receipt of any required approvals from the U.S. Dept. of
* Energy). All rights reserved.
@ -365,7 +365,7 @@ int
iperf_udp_accept(struct iperf_test *test)
{
struct sockaddr_storage sa_peer;
int buf;
unsigned int buf;
socklen_t len;
int sz, s;
int rc;
@ -452,7 +452,7 @@ iperf_udp_accept(struct iperf_test *test)
test->max_fd = (test->max_fd < test->prot_listener) ? test->prot_listener : test->max_fd;
/* Let the client know we're ready "accept" another UDP "stream" */
buf = 987654321; /* any content will work here */
buf = UDP_CONNECT_REPLY;
if (write(s, &buf, sizeof(buf)) < 0) {
i_errno = IESTREAMWRITE;
return -1;
@ -494,11 +494,13 @@ iperf_udp_listen(struct iperf_test *test)
int
iperf_udp_connect(struct iperf_test *test)
{
int s, buf, sz;
int s, sz;
unsigned int buf;
#ifdef SO_RCVTIMEO
struct timeval tv;
#endif
int rc;
int i, max_len_wait_for_reply;
/* Create and bind our local socket. */
if ((s = netdial(test->settings->domain, Pudp, test->bind_address, test->bind_dev, test->bind_port, test->server_hostname, test->server_port, -1)) < 0) {
@ -564,7 +566,10 @@ iperf_udp_connect(struct iperf_test *test)
* Write a datagram to the UDP stream to let the server know we're here.
* The server learns our address by obtaining its peer's address.
*/
buf = 123456789; /* this can be pretty much anything */
buf = UDP_CONNECT_MSG;
if (test->debug) {
printf("Sending Connect message to Sockt %d\n", s);
}
if (write(s, &buf, sizeof(buf)) < 0) {
// XXX: Should this be changed to IESTREAMCONNECT?
i_errno = IESTREAMWRITE;
@ -572,9 +577,24 @@ iperf_udp_connect(struct iperf_test *test)
}
/*
* Wait until the server replies back to us.
* Wait until the server replies back to us with the "accept" response.
*/
if ((sz = recv(s, &buf, sizeof(buf), 0)) < 0) {
i = 0;
max_len_wait_for_reply = sizeof(buf);
if (test->reverse) /* In reverse mode allow few packets to have the "accept" response - to handle out of order packets */
max_len_wait_for_reply += MAX_REVERSE_OUT_OF_ORDER_PACKETS * test->settings->blksize;
do {
if ((sz = recv(s, &buf, sizeof(buf), 0)) < 0) {
i_errno = IESTREAMREAD;
return -1;
}
if (test->debug) {
printf("Connect received for Socket %d, sz=%d, buf=%x, i=%d, max_len_wait_for_reply=%d\n", s, sz, buf, i, max_len_wait_for_reply);
}
i += sz;
} while (buf != UDP_CONNECT_REPLY && buf != LEGACY_UDP_CONNECT_REPLY && i < max_len_wait_for_reply);
if (buf != UDP_CONNECT_REPLY && buf != LEGACY_UDP_CONNECT_REPLY) {
i_errno = IESTREAMREAD;
return -1;
}

View File

@ -1,4 +1,4 @@
.TH LIBIPERF 3 "December 2020" ESnet "User Manuals"
.TH LIBIPERF 3 "January 2022" ESnet "User Manuals"
.SH NAME
libiperf \- API for iperf3 network throughput tester

View File

@ -1,5 +1,5 @@
/*
* iperf, Copyright (c) 2014-2021, The Regents of the University of
* iperf, Copyright (c) 2014-2022, The Regents of the University of
* California, through Lawrence Berkeley National Laboratory (subject
* to receipt of any required approvals from the U.S. Dept. of
* Energy). All rights reserved.