2009-10-23 22:30:17 +00:00
|
|
|
/*---------------------------------------------------------------
|
2014-09-29 14:00:46 -07:00
|
|
|
* iperf, Copyright (c) 2014, 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.
|
|
|
|
*
|
|
|
|
* If you have questions about your rights to use or distribute this
|
|
|
|
* software, please contact Berkeley Lab's Technology Transfer
|
|
|
|
* Department at TTD@lbl.gov.
|
|
|
|
*
|
|
|
|
* NOTICE. This software is owned by the U.S. Department of Energy.
|
|
|
|
* As such, the U.S. Government has been granted for itself and others
|
|
|
|
* acting on its behalf a paid-up, nonexclusive, irrevocable,
|
|
|
|
* worldwide license in the Software to reproduce, prepare derivative
|
|
|
|
* works, and perform publicly and display publicly. Beginning five
|
|
|
|
* (5) years after the date permission to assert copyright is obtained
|
|
|
|
* from the U.S. Department of Energy, and subject to any subsequent
|
|
|
|
* five (5) year renewals, the U.S. Government is granted for itself
|
|
|
|
* and others acting on its behalf a paid-up, nonexclusive,
|
|
|
|
* irrevocable, worldwide license in the Software to reproduce,
|
|
|
|
* prepare derivative works, distribute copies to the public, perform
|
|
|
|
* publicly and display publicly, and to permit others to do so.
|
|
|
|
*
|
|
|
|
* This code is distributed under a BSD style license, see the LICENSE
|
|
|
|
* file for complete information.
|
2014-05-05 15:32:57 -07:00
|
|
|
*
|
|
|
|
* Based on code that is:
|
|
|
|
*
|
2014-01-15 12:01:22 -08:00
|
|
|
* Copyright (c) 1999,2000,2001,2002,2003
|
2009-10-23 22:30:17 +00:00
|
|
|
* The Board of Trustees of the University of Illinois
|
|
|
|
* All Rights Reserved.
|
|
|
|
*---------------------------------------------------------------
|
|
|
|
* Permission is hereby granted, free of charge, to any person
|
|
|
|
* obtaining a copy of this software (Iperf) and associated
|
|
|
|
* documentation files (the "Software"), to deal in the Software
|
|
|
|
* without restriction, including without limitation the
|
|
|
|
* rights to use, copy, modify, merge, publish, distribute,
|
|
|
|
* sublicense, and/or sell copies of the Software, and to permit
|
|
|
|
* persons to whom the Software is furnished to do
|
|
|
|
* so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Redistributions of source code must retain the above
|
|
|
|
* copyright notice, this list of conditions and
|
|
|
|
* the following disclaimers.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Redistributions in binary form must reproduce the above
|
|
|
|
* copyright notice, this list of conditions and the following
|
|
|
|
* disclaimers in the documentation and/or other materials
|
|
|
|
* provided with the distribution.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Neither the names of the University of Illinois, NCSA,
|
|
|
|
* nor the names of its contributors may be used to endorse
|
|
|
|
* or promote products derived from this Software without
|
|
|
|
* specific prior written permission.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
|
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE CONTIBUTORS OR COPYRIGHT
|
|
|
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
|
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
|
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
* ________________________________________________________________
|
|
|
|
* National Laboratory for Applied Network Research
|
|
|
|
* National Center for Supercomputing Applications
|
|
|
|
* University of Illinois at Urbana-Champaign
|
|
|
|
* http://www.ncsa.uiuc.edu
|
|
|
|
* ________________________________________________________________
|
|
|
|
*
|
|
|
|
* Locale.c
|
|
|
|
* by Ajay Tirumala <tirumala@ncsa.uiuc.edu>
|
|
|
|
* & Mark Gates <mgates@nlanr.net>
|
|
|
|
* -------------------------------------------------------------------
|
|
|
|
* Strings and other stuff that is locale specific.
|
|
|
|
* ------------------------------------------------------------------- */
|
2014-04-14 13:33:33 -07:00
|
|
|
#include "iperf_config.h"
|
2009-10-23 22:30:17 +00:00
|
|
|
|
2009-11-10 17:05:44 +00:00
|
|
|
#include "version.h"
|
2009-10-23 22:30:17 +00:00
|
|
|
|
2013-02-15 09:10:56 -08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
2009-10-23 22:30:17 +00:00
|
|
|
|
|
|
|
/* -------------------------------------------------------------------
|
|
|
|
* usage
|
|
|
|
* ------------------------------------------------------------------- */
|
|
|
|
|
2013-01-28 18:14:34 -08:00
|
|
|
const char usage_shortstr[] = "Usage: iperf [-s|-c host] [options]\n"
|
2010-06-25 00:31:15 +00:00
|
|
|
"Try `iperf --help' for more information.\n";
|
2009-10-23 22:30:17 +00:00
|
|
|
|
2013-01-28 18:14:34 -08:00
|
|
|
const char usage_longstr[] = "Usage: iperf [-s|-c host] [options]\n"
|
2010-06-25 00:31:15 +00:00
|
|
|
" iperf [-h|--help] [-v|--version]\n\n"
|
2013-01-28 18:14:34 -08:00
|
|
|
"Server or Client:\n"
|
|
|
|
" -p, --port # server port to listen on/connect to\n"
|
2010-06-25 00:31:15 +00:00
|
|
|
" -f, --format [kmgKMG] format to report: Kbits, Mbits, KBytes, MBytes\n"
|
|
|
|
" -i, --interval # seconds between periodic bandwidth reports\n"
|
2013-10-25 17:00:52 -07:00
|
|
|
" -F, --file name xmit/recv the specified file\n"
|
2014-04-14 10:45:46 -07:00
|
|
|
#if defined(HAVE_CPU_AFFINITY)
|
2013-10-25 17:00:52 -07:00
|
|
|
" -A, --affinity n/n,m set CPU affinity\n"
|
2014-04-14 10:45:46 -07:00
|
|
|
#endif /* HAVE_CPU_AFFINITY */
|
Fix two related bugs with -B and IPv4 addresses.
If specifying -B with an IPv4 literal address or with an FQDN that
resolved to an IPv4 address, but we had not explicitly specified an
address family with -4, we failed to set up the socket correctly
because we assumed binding to an IPv6 address, and instead (after some
error spewage) wound up binding to wildcard address.
The fix in this commit has multiple parts: First, if the address
family hasn't been explictly specified, don't force AF_INET6 in the
hints to getaddrinfo(3). AF_UNSPEC should generate the correct
(according to RFC 6724) behavior.
Second, iperf_reset_test() should not discard members that were passed
from command-line parameters, because that alters the behavior of the
iperf3 when it tries to recreate the listening socket. In the failure
situation described in this issue (and possibly other as well), the
value of -B gets discarded, so on subsequent attempts to set up the
listening socket it just binds to the wildcard address.
While here, fix on-line help related to the -B option to match
reality.
Note that we're not completely in compliance with RFC 6724, which
states that we should actually try all of the addresses in returned by
getaddrinfo(3), rather than just the first one.
Fixes Issue #193.
2014-07-17 14:30:39 -07:00
|
|
|
" -B, --bind <host> bind to a specific interface\n"
|
2013-02-01 11:42:35 -08:00
|
|
|
" -V, --verbose more detailed output\n"
|
|
|
|
" -J, --json output in JSON format\n"
|
2014-03-14 14:23:38 -07:00
|
|
|
" --logfile f send output to a log file\n"
|
2014-01-15 12:01:22 -08:00
|
|
|
" -d, --debug emit debugging output\n"
|
2013-02-01 11:42:35 -08:00
|
|
|
" -v, --version show version information and quit\n"
|
|
|
|
" -h, --help show this message and quit\n"
|
2010-06-25 00:31:15 +00:00
|
|
|
"Server specific:\n"
|
|
|
|
" -s, --server run in server mode\n"
|
2013-11-26 15:40:19 -08:00
|
|
|
" -D, --daemon run the server as a daemon\n"
|
2014-01-24 16:42:10 -08:00
|
|
|
" -I, --pidfile file write PID file\n"
|
2014-12-22 14:45:40 -08:00
|
|
|
" -1, --one-off handle one client connection then exit\n"
|
2013-01-28 18:14:34 -08:00
|
|
|
"Client specific:\n"
|
|
|
|
" -c, --client <host> run in client mode, connecting to <host>\n"
|
2014-04-09 10:29:16 -07:00
|
|
|
#if defined(HAVE_SCTP)
|
2014-02-14 11:52:16 -08:00
|
|
|
" --sctp use SCTP rather than TCP\n"
|
2015-01-05 15:19:57 -08:00
|
|
|
" -X, --xbind <name> bind SCTP association to links\n"
|
|
|
|
" --nstreams # number of SCTP streams\n"
|
2014-04-09 10:29:16 -07:00
|
|
|
#endif /* HAVE_SCTP */
|
2013-01-28 18:14:34 -08:00
|
|
|
" -u, --udp use UDP rather than TCP\n"
|
2014-08-25 13:15:06 -07:00
|
|
|
" -b, --bandwidth #[KMG][/#] target bandwidth in bits/sec (0 for unlimited)\n"
|
2013-06-24 07:14:14 -07:00
|
|
|
" (default %d Mbit/sec for UDP, unlimited for TCP)\n"
|
2013-12-18 20:56:21 -08:00
|
|
|
" (optional slash and packet count for burst mode)\n"
|
2013-02-27 14:22:44 -08:00
|
|
|
" -t, --time # time in seconds to transmit for (default %d secs)\n"
|
2014-07-10 09:49:31 -07:00
|
|
|
" -n, --bytes #[KMG] number of bytes to transmit (instead of -t)\n"
|
2013-12-19 10:31:22 -08:00
|
|
|
" -k, --blockcount #[KMG] number of blocks (packets) to transmit (instead of -t or -n)\n"
|
2013-02-27 14:22:44 -08:00
|
|
|
" -l, --len #[KMG] length of buffer to read or write\n"
|
|
|
|
" (default %d KB for TCP, %d KB for UDP)\n"
|
2014-09-15 13:11:15 -07:00
|
|
|
" --cport <port> bind to a specific client port (TCP and UDP, default: ephemeral port)\n"
|
2013-02-27 14:22:44 -08:00
|
|
|
" -P, --parallel # number of parallel client streams to run\n"
|
2013-01-28 18:14:34 -08:00
|
|
|
" -R, --reverse run in reverse mode (server sends, client receives)\n"
|
2014-11-12 13:58:23 -08:00
|
|
|
" -w, --window #[KMG] set window size / socket buffer size\n"
|
2014-04-10 10:53:18 -07:00
|
|
|
#if defined(HAVE_TCP_CONGESTION)
|
2014-04-14 13:43:02 -07:00
|
|
|
" -C, --congestion <algo> set TCP congestion control algorithm (Linux and FreeBSD only)\n"
|
2014-04-10 10:53:18 -07:00
|
|
|
#endif /* HAVE_TCP_CONGESTION */
|
2015-01-05 15:19:57 -08:00
|
|
|
" -M, --set-mss # set TCP/SCTP maximum segment size (MTU - 40 bytes)\n"
|
|
|
|
" -N, --no-delay set TCP/SCTP no delay, disabling Nagle's Algorithm\n"
|
2013-03-29 17:49:27 -07:00
|
|
|
" -4, --version4 only use IPv4\n"
|
|
|
|
" -6, --version6 only use IPv6\n"
|
2013-01-28 18:14:34 -08:00
|
|
|
" -S, --tos N set the IP 'type of service'\n"
|
2014-04-10 11:20:36 -07:00
|
|
|
#if defined(HAVE_FLOWLABEL)
|
2013-12-12 09:21:36 -08:00
|
|
|
" -L, --flowlabel N set the IPv6 flow label (only supported on Linux)\n"
|
2014-04-10 11:20:36 -07:00
|
|
|
#endif /* HAVE_FLOWLABEL */
|
2013-03-04 15:55:16 -08:00
|
|
|
" -Z, --zerocopy use a 'zero copy' method of sending data\n"
|
2013-07-05 13:52:19 -07:00
|
|
|
" -O, --omit N omit the first n seconds\n"
|
2013-11-08 20:31:19 -08:00
|
|
|
" -T, --title str prefix every output line with this string\n"
|
2014-06-05 09:48:55 -07:00
|
|
|
" --get-server-output get results from server\n"
|
2014-08-28 08:59:32 -07:00
|
|
|
" --udp-counters-64bit use 64-bit counters in UDP test packets\n"
|
2009-10-23 22:30:17 +00:00
|
|
|
|
2009-11-10 17:05:44 +00:00
|
|
|
#ifdef NOT_YET_SUPPORTED /* still working on these */
|
2009-10-23 22:30:17 +00:00
|
|
|
#endif
|
2010-06-25 00:31:15 +00:00
|
|
|
|
2013-01-28 18:14:34 -08:00
|
|
|
"\n"
|
|
|
|
"[KMG] indicates options that support a K/M/G suffix for kilo-, mega-, or giga-\n"
|
2014-05-05 15:32:57 -07:00
|
|
|
"\n"
|
2014-06-11 12:01:35 -07:00
|
|
|
#ifdef PACKAGE_URL
|
2014-05-05 15:32:57 -07:00
|
|
|
"iperf3 homepage at: " PACKAGE_URL "\n"
|
2014-06-11 12:01:35 -07:00
|
|
|
#endif /* PACKAGE_URL */
|
|
|
|
#ifdef PACKAGE_BUGREPORT
|
2014-05-05 15:32:57 -07:00
|
|
|
"Report bugs to: " PACKAGE_BUGREPORT "\n";
|
2014-06-11 12:01:35 -07:00
|
|
|
#endif /* PACKAGE_BUGREPORT */
|
2009-10-23 22:30:17 +00:00
|
|
|
|
2013-01-28 18:14:34 -08:00
|
|
|
|
2009-10-23 22:30:17 +00:00
|
|
|
#ifdef OBSOLETE /* from old iperf: no longer supported. Add some of these back someday */
|
2013-02-15 09:10:56 -08:00
|
|
|
"-d, --dualtest Do a bidirectional test simultaneously\n"
|
|
|
|
"-L, --listenport # port to recieve bidirectional tests back on\n"
|
|
|
|
"-I, --stdin input the data to be transmitted from stdin\n"
|
|
|
|
"-F, --fileinput <name> input the data to be transmitted from a file\n"
|
|
|
|
"-r, --tradeoff Do a bidirectional test individually\n"
|
|
|
|
"-T, --ttl # time-to-live, for multicast (default 1)\n"
|
|
|
|
"-x, --reportexclude [CDMSV] exclude C(connection) D(data) M(multicast) S(settings) V(server) reports\n"
|
|
|
|
"-y, --reportstyle C report as a Comma-Separated Values\n"
|
2009-10-23 22:30:17 +00:00
|
|
|
#endif
|
|
|
|
|
2014-04-24 10:23:31 -07:00
|
|
|
const char version[] = PACKAGE_STRING;
|
2009-10-23 22:30:17 +00:00
|
|
|
|
|
|
|
/* -------------------------------------------------------------------
|
|
|
|
* settings
|
|
|
|
* ------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
const char seperator_line[] =
|
|
|
|
"------------------------------------------------------------\n";
|
|
|
|
|
|
|
|
const char server_port[] =
|
|
|
|
"Server listening on %s port %d\n";
|
|
|
|
|
|
|
|
const char client_port[] =
|
|
|
|
"Client connecting to %s, %s port %d\n";
|
|
|
|
|
|
|
|
const char bind_address[] =
|
|
|
|
"Binding to local address %s\n";
|
|
|
|
|
2014-09-09 16:31:57 -07:00
|
|
|
const char bind_port[] =
|
|
|
|
"Binding to local port %s\n";
|
|
|
|
|
2009-10-23 22:30:17 +00:00
|
|
|
const char multicast_ttl[] =
|
|
|
|
"Setting multicast TTL to %d\n";
|
|
|
|
|
|
|
|
const char join_multicast[] =
|
|
|
|
"Joining multicast group %s\n";
|
|
|
|
|
|
|
|
const char client_datagram_size[] =
|
|
|
|
"Sending %d byte datagrams\n";
|
|
|
|
|
|
|
|
const char server_datagram_size[] =
|
|
|
|
"Receiving %d byte datagrams\n";
|
|
|
|
|
|
|
|
const char tcp_window_size[] =
|
|
|
|
"TCP window size";
|
|
|
|
|
|
|
|
const char udp_buffer_size[] =
|
|
|
|
"UDP buffer size";
|
|
|
|
|
|
|
|
const char window_default[] =
|
|
|
|
"(default)";
|
|
|
|
|
|
|
|
const char wait_server_threads[] =
|
|
|
|
"Waiting for server threads to complete. Interrupt again to force quit.\n";
|
|
|
|
|
2010-07-07 21:54:24 +00:00
|
|
|
const char test_start_time[] =
|
2013-07-05 13:52:19 -07:00
|
|
|
"Starting Test: protocol: %s, %d streams, %d byte blocks, omitting %d seconds, %d second test\n";
|
2010-07-07 21:54:24 +00:00
|
|
|
|
|
|
|
const char test_start_bytes[] =
|
2013-07-05 13:52:19 -07:00
|
|
|
"Starting Test: protocol: %s, %d streams, %d byte blocks, omitting %d seconds, %llu bytes to send\n";
|
2010-07-07 21:54:24 +00:00
|
|
|
|
2013-12-19 10:31:22 -08:00
|
|
|
const char test_start_blocks[] =
|
|
|
|
"Starting Test: protocol: %s, %d streams, %d byte blocks, omitting %d seconds, %d blocks to send\n";
|
|
|
|
|
2010-07-07 21:54:24 +00:00
|
|
|
|
2009-10-23 22:30:17 +00:00
|
|
|
/* -------------------------------------------------------------------
|
|
|
|
* reports
|
|
|
|
* ------------------------------------------------------------------- */
|
|
|
|
|
2013-11-11 11:18:46 -08:00
|
|
|
const char report_time[] =
|
|
|
|
"Time: %s\n";
|
|
|
|
|
|
|
|
const char report_connecting[] =
|
|
|
|
"Connecting to host %s, port %d\n";
|
|
|
|
|
|
|
|
const char report_reverse[] =
|
|
|
|
"Reverse mode, remote host %s is sending\n";
|
|
|
|
|
|
|
|
const char report_accepted[] =
|
|
|
|
"Accepted connection from %s, port %d\n";
|
|
|
|
|
|
|
|
const char report_cookie[] =
|
|
|
|
" Cookie: %s\n";
|
|
|
|
|
|
|
|
const char report_connected[] =
|
|
|
|
"[%3d] local %s port %d connected to %s port %d\n";
|
|
|
|
|
|
|
|
const char report_window[] =
|
|
|
|
"TCP window size: %s\n";
|
|
|
|
|
|
|
|
const char report_autotune[] =
|
|
|
|
"Using TCP Autotuning\n";
|
|
|
|
|
|
|
|
const char report_omit_done[] =
|
|
|
|
"Finished omit period, starting real test\n";
|
|
|
|
|
|
|
|
const char report_diskfile[] =
|
|
|
|
" Sent %s / %s (%d%%) of %s\n";
|
|
|
|
|
|
|
|
const char report_done[] =
|
|
|
|
"iperf Done.\n";
|
|
|
|
|
2009-10-23 22:30:17 +00:00
|
|
|
const char report_read_lengths[] =
|
|
|
|
"[%3d] Read lengths occurring in more than 5%% of reads:\n";
|
|
|
|
|
|
|
|
const char report_read_length_times[] =
|
|
|
|
"[%3d] %5d bytes read %5d times (%.3g%%)\n";
|
|
|
|
|
|
|
|
const char report_bw_header[] =
|
2012-12-03 16:20:49 -08:00
|
|
|
"[ ID] Interval Transfer Bandwidth\n";
|
2009-10-23 22:30:17 +00:00
|
|
|
|
2012-11-09 16:02:42 -08:00
|
|
|
const char report_bw_retrans_header[] =
|
2013-12-19 14:44:15 -08:00
|
|
|
"[ ID] Interval Transfer Bandwidth Retr\n";
|
2012-11-09 16:02:42 -08:00
|
|
|
|
2014-02-14 11:17:43 -08:00
|
|
|
const char report_bw_retrans_cwnd_header[] =
|
|
|
|
"[ ID] Interval Transfer Bandwidth Retr Cwnd\n";
|
|
|
|
|
2012-11-09 16:02:42 -08:00
|
|
|
const char report_bw_udp_header[] =
|
2013-12-04 09:16:37 -08:00
|
|
|
"[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams\n";
|
|
|
|
|
|
|
|
const char report_bw_udp_sender_header[] =
|
|
|
|
"[ ID] Interval Transfer Bandwidth Total Datagrams\n";
|
2012-10-29 22:30:31 -07:00
|
|
|
|
2009-10-23 22:30:17 +00:00
|
|
|
const char report_bw_format[] =
|
2014-02-14 11:17:43 -08:00
|
|
|
"[%3d] %6.2f-%-6.2f sec %ss %ss/sec %s\n";
|
2009-10-23 22:30:17 +00:00
|
|
|
|
2012-11-09 16:02:42 -08:00
|
|
|
const char report_bw_retrans_format[] =
|
2014-02-14 11:17:43 -08:00
|
|
|
"[%3d] %6.2f-%-6.2f sec %ss %ss/sec %3u %s\n";
|
|
|
|
|
|
|
|
const char report_bw_retrans_cwnd_format[] =
|
|
|
|
"[%3d] %6.2f-%-6.2f sec %ss %ss/sec %3u %ss %s\n";
|
2012-11-09 16:02:42 -08:00
|
|
|
|
|
|
|
const char report_bw_udp_format[] =
|
2013-12-04 09:16:37 -08:00
|
|
|
"[%3d] %6.2f-%-6.2f sec %ss %ss/sec %5.3f ms %d/%d (%.2g%%) %s\n";
|
|
|
|
|
|
|
|
const char report_bw_udp_sender_format[] =
|
|
|
|
"[%3d] %6.2f-%-6.2f sec %ss %ss/sec %d %s\n";
|
2012-11-09 16:02:42 -08:00
|
|
|
|
2013-11-11 11:18:46 -08:00
|
|
|
const char report_summary[] =
|
|
|
|
"Test Complete. Summary Results:\n";
|
|
|
|
|
2009-10-23 22:30:17 +00:00
|
|
|
const char report_sum_bw_format[] =
|
2014-02-14 11:17:43 -08:00
|
|
|
"[SUM] %6.2f-%-6.2f sec %ss %ss/sec %s\n";
|
2009-10-23 22:30:17 +00:00
|
|
|
|
2012-11-09 16:02:42 -08:00
|
|
|
const char report_sum_bw_retrans_format[] =
|
2014-02-14 11:17:43 -08:00
|
|
|
"[SUM] %6.2f-%-6.2f sec %ss %ss/sec %3d %s\n";
|
2009-10-23 22:30:17 +00:00
|
|
|
|
2012-11-09 16:02:42 -08:00
|
|
|
const char report_sum_bw_udp_format[] =
|
2013-12-04 09:16:37 -08:00
|
|
|
"[SUM] %6.2f-%-6.2f sec %ss %ss/sec %5.3f ms %d/%d (%.2g%%) %s\n";
|
|
|
|
|
|
|
|
const char report_sum_bw_udp_sender_format[] =
|
|
|
|
"[SUM] %6.2f-%-6.2f sec %ss %ss/sec %d %s\n";
|
2009-10-23 22:30:17 +00:00
|
|
|
|
2013-11-11 12:16:38 -08:00
|
|
|
const char report_omitted[] = "(omitted)";
|
2013-10-24 14:08:04 -07:00
|
|
|
|
2012-11-09 16:02:42 -08:00
|
|
|
const char report_bw_separator[] =
|
|
|
|
"- - - - - - - - - - - - - - - - - - - - - - - - -\n";
|
|
|
|
|
2009-10-23 22:30:17 +00:00
|
|
|
const char report_outoforder[] =
|
|
|
|
"[%3d] %4.1f-%4.1f sec %d datagrams received out-of-order\n";
|
|
|
|
|
|
|
|
const char report_sum_outoforder[] =
|
|
|
|
"[SUM] %4.1f-%4.1f sec %d datagrams received out-of-order\n";
|
|
|
|
|
|
|
|
const char report_peer[] =
|
|
|
|
"[%3d] local %s port %u connected with %s port %u\n";
|
|
|
|
|
|
|
|
const char report_mss_unsupported[] =
|
|
|
|
"[%3d] MSS and MTU size unknown (TCP_MAXSEG not supported by OS?)\n";
|
|
|
|
|
|
|
|
const char report_mss[] =
|
|
|
|
"[%3d] MSS size %d bytes (MTU %d bytes, %s)\n";
|
|
|
|
|
|
|
|
const char report_datagrams[] =
|
|
|
|
"[%3d] Sent %d datagrams\n";
|
|
|
|
|
|
|
|
const char report_sum_datagrams[] =
|
|
|
|
"[SUM] Sent %d datagrams\n";
|
|
|
|
|
|
|
|
const char server_reporting[] =
|
|
|
|
"[%3d] Server Report:\n";
|
|
|
|
|
|
|
|
const char reportCSV_peer[] =
|
|
|
|
"%s,%u,%s,%u";
|
|
|
|
|
2013-11-11 11:37:07 -08:00
|
|
|
const char report_cpu[] =
|
2013-11-26 14:47:15 -08:00
|
|
|
"CPU Utilization: %s/%s %.1f%% (%.1f%%u/%.1f%%s), %s/%s %.1f%% (%.1f%%u/%.1f%%s)\n";
|
2013-11-11 11:37:07 -08:00
|
|
|
|
|
|
|
const char report_local[] = "local";
|
|
|
|
const char report_remote[] = "remote";
|
|
|
|
const char report_sender[] = "sender";
|
|
|
|
const char report_receiver[] = "receiver";
|
|
|
|
|
2009-10-23 22:30:17 +00:00
|
|
|
#if defined(linux)
|
|
|
|
const char report_tcpInfo[] =
|
2009-11-16 20:10:48 +00:00
|
|
|
"event=TCP_Info CWND=%u SND_SSTHRESH=%u RCV_SSTHRESH=%u UNACKED=%u SACK=%u LOST=%u RETRANS=%u FACK=%u RTT=%u REORDERING=%u\n";
|
2009-10-23 22:30:17 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__FreeBSD__)
|
|
|
|
const char report_tcpInfo[] =
|
2015-02-19 14:23:01 +01:00
|
|
|
"event=TCP_Info CWND=%u RCV_WIND=%u SND_SSTHRESH=%u RTT=%u\n";
|
|
|
|
#endif
|
|
|
|
#if defined(__NetBSD__)
|
|
|
|
const char report_tcpInfo[] =
|
2009-11-16 20:10:48 +00:00
|
|
|
"event=TCP_Info CWND=%u RCV_WIND=%u SND_SSTHRESH=%u RTT=%u\n";
|
2009-10-23 22:30:17 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_QUAD_SUPPORT
|
|
|
|
#ifdef HAVE_PRINTF_QD
|
|
|
|
const char reportCSV_bw_format[] =
|
|
|
|
"%s,%s,%d,%.1f-%.1f,%qd,%qd\n";
|
|
|
|
|
2012-11-09 16:02:42 -08:00
|
|
|
const char reportCSV_bw_udp_format[] =
|
2009-10-23 22:30:17 +00:00
|
|
|
"%s,%s,%d,%.1f-%.1f,%qd,%qd,%.3f,%d,%d,%.3f,%d\n";
|
|
|
|
#else // HAVE_PRINTF_QD
|
|
|
|
const char reportCSV_bw_format[] =
|
|
|
|
"%s,%s,%d,%.1f-%.1f,%lld,%lld\n";
|
|
|
|
|
2012-11-09 16:02:42 -08:00
|
|
|
const char reportCSV_bw_udp_format[] =
|
2009-10-23 22:30:17 +00:00
|
|
|
"%s,%s,%d,%.1f-%.1f,%lld,%lld,%.3f,%d,%d,%.3f,%d\n";
|
|
|
|
#endif // HAVE_PRINTF_QD
|
|
|
|
#else // HAVE_QUAD_SUPPORT
|
|
|
|
#ifdef WIN32
|
|
|
|
const char reportCSV_bw_format[] =
|
|
|
|
"%s,%s,%d,%.1f-%.1f,%I64d,%I64d\n";
|
|
|
|
|
2012-11-09 16:02:42 -08:00
|
|
|
const char reportCSV_bw_udp_format[] =
|
2009-10-23 22:30:17 +00:00
|
|
|
"%s,%s,%d,%.1f-%.1f,%I64d,%I64d,%.3f,%d,%d,%.3f,%d\n";
|
|
|
|
#else
|
|
|
|
const char reportCSV_bw_format[] =
|
|
|
|
"%s,%s,%d,%.1f-%.1f,%d,%d\n";
|
|
|
|
|
2012-11-09 16:02:42 -08:00
|
|
|
const char reportCSV_bw_udp_format[] =
|
2009-10-23 22:30:17 +00:00
|
|
|
"%s,%s,%d,%.1f-%.1f,%d,%d,%.3f,%d,%d,%.3f,%d\n";
|
|
|
|
#endif //WIN32
|
|
|
|
#endif //HAVE_QUAD_SUPPORT
|
|
|
|
/* -------------------------------------------------------------------
|
|
|
|
* warnings
|
|
|
|
* ------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
const char warn_window_requested[] =
|
|
|
|
" (WARNING: requested %s)";
|
|
|
|
|
2013-12-04 09:16:37 -08:00
|
|
|
const char warn_window_small[] =
|
|
|
|
"WARNING: TCP window size set to %d bytes. A small window size\n\
|
2009-10-23 22:30:17 +00:00
|
|
|
will give poor performance. See the Iperf documentation.\n";
|
|
|
|
|
|
|
|
const char warn_delay_large[] =
|
|
|
|
"WARNING: delay too large, reducing from %.1f to 1.0 seconds.\n";
|
|
|
|
|
|
|
|
const char warn_no_pathmtu[] =
|
|
|
|
"WARNING: Path MTU Discovery may not be enabled.\n";
|
|
|
|
|
|
|
|
const char warn_no_ack[]=
|
|
|
|
"[%3d] WARNING: did not receive ack of last datagram after %d tries.\n";
|
|
|
|
|
|
|
|
const char warn_ack_failed[]=
|
|
|
|
"[%3d] WARNING: ack of last datagram failed after %d tries.\n";
|
|
|
|
|
|
|
|
const char warn_fileopen_failed[]=
|
|
|
|
"WARNING: Unable to open file stream for transfer\n\
|
|
|
|
Using default data stream. \n";
|
|
|
|
|
|
|
|
const char unable_to_change_win[]=
|
|
|
|
"WARNING: Unable to change the window size\n";
|
|
|
|
|
|
|
|
const char opt_estimate[]=
|
|
|
|
"Optimal Estimate\n";
|
|
|
|
|
|
|
|
const char report_interval_small[] =
|
|
|
|
"WARNING: interval too small, increasing from %3.2f to 0.5 seconds.\n";
|
|
|
|
|
|
|
|
const char warn_invalid_server_option[] =
|
|
|
|
"WARNING: option -%c is not valid for server mode\n";
|
|
|
|
|
|
|
|
const char warn_invalid_client_option[] =
|
|
|
|
"WARNING: option -%c is not valid for client mode\n";
|
|
|
|
|
|
|
|
const char warn_invalid_compatibility_option[] =
|
|
|
|
"WARNING: option -%c is not valid in compatibility mode\n";
|
|
|
|
|
|
|
|
const char warn_implied_udp[] =
|
|
|
|
"WARNING: option -%c implies udp testing\n";
|
|
|
|
|
|
|
|
const char warn_implied_compatibility[] =
|
|
|
|
"WARNING: option -%c has implied compatibility mode\n";
|
|
|
|
|
|
|
|
const char warn_buffer_too_small[] =
|
|
|
|
"WARNING: the UDP buffer was increased to %d for proper operation\n";
|
|
|
|
|
|
|
|
const char warn_invalid_single_threaded[] =
|
|
|
|
"WARNING: option -%c is not valid in single threaded versions\n";
|
|
|
|
|
|
|
|
const char warn_invalid_report_style[] =
|
|
|
|
"WARNING: unknown reporting style \"%s\", switching to default\n";
|
|
|
|
|
|
|
|
const char warn_invalid_report[] =
|
|
|
|
"WARNING: unknown reporting type \"%c\", ignored\n valid options are:\n\t exclude: C(connection) D(data) M(multicast) S(settings) V(server) report\n\n";
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* end extern "C" */
|
|
|
|
#endif
|