Annotation of embedaddon/iperf/src/iperf_locale.c, revision 1.1.1.3
1.1.1.3 ! misho 1: /*---------------------------------------------------------------
! 2: * iperf, Copyright (c) 2014-2022, The Regents of the University of
1.1 misho 3: * California, through Lawrence Berkeley National Laboratory (subject
4: * to receipt of any required approvals from the U.S. Dept. of
5: * Energy). All rights reserved.
6: *
7: * If you have questions about your rights to use or distribute this
8: * software, please contact Berkeley Lab's Technology Transfer
9: * Department at TTD@lbl.gov.
10: *
11: * NOTICE. This software is owned by the U.S. Department of Energy.
12: * As such, the U.S. Government has been granted for itself and others
13: * acting on its behalf a paid-up, nonexclusive, irrevocable,
14: * worldwide license in the Software to reproduce, prepare derivative
15: * works, and perform publicly and display publicly. Beginning five
16: * (5) years after the date permission to assert copyright is obtained
17: * from the U.S. Department of Energy, and subject to any subsequent
18: * five (5) year renewals, the U.S. Government is granted for itself
19: * and others acting on its behalf a paid-up, nonexclusive,
20: * irrevocable, worldwide license in the Software to reproduce,
21: * prepare derivative works, distribute copies to the public, perform
22: * publicly and display publicly, and to permit others to do so.
23: *
24: * This code is distributed under a BSD style license, see the LICENSE
25: * file for complete information.
26: *
27: * Based on code that is:
28: *
29: * Copyright (c) 1999,2000,2001,2002,2003
1.1.1.3 ! misho 30: * The Board of Trustees of the University of Illinois
! 31: * All Rights Reserved.
! 32: *---------------------------------------------------------------
! 33: * Permission is hereby granted, free of charge, to any person
! 34: * obtaining a copy of this software (Iperf) and associated
! 35: * documentation files (the "Software"), to deal in the Software
! 36: * without restriction, including without limitation the
! 37: * rights to use, copy, modify, merge, publish, distribute,
! 38: * sublicense, and/or sell copies of the Software, and to permit
1.1 misho 39: * persons to whom the Software is furnished to do
1.1.1.3 ! misho 40: * so, subject to the following conditions:
1.1 misho 41: *
1.1.1.3 ! misho 42: *
! 43: * Redistributions of source code must retain the above
! 44: * copyright notice, this list of conditions and
! 45: * the following disclaimers.
! 46: *
! 47: *
! 48: * Redistributions in binary form must reproduce the above
! 49: * copyright notice, this list of conditions and the following
! 50: * disclaimers in the documentation and/or other materials
! 51: * provided with the distribution.
! 52: *
! 53: *
! 54: * Neither the names of the University of Illinois, NCSA,
! 55: * nor the names of its contributors may be used to endorse
1.1 misho 56: * or promote products derived from this Software without
1.1.1.3 ! misho 57: * specific prior written permission.
! 58: *
! 59: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
! 60: * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
! 61: * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
! 62: * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTIBUTORS OR COPYRIGHT
! 63: * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
! 64: * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1.1 misho 65: * ARISING FROM, OUT OF OR IN CONNECTION WITH THE
1.1.1.3 ! misho 66: * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1.1 misho 67: * ________________________________________________________________
1.1.1.3 ! misho 68: * National Laboratory for Applied Network Research
! 69: * National Center for Supercomputing Applications
! 70: * University of Illinois at Urbana-Champaign
1.1 misho 71: * http://www.ncsa.uiuc.edu
1.1.1.3 ! misho 72: * ________________________________________________________________
1.1 misho 73: *
74: * Locale.c
75: * by Ajay Tirumala <tirumala@ncsa.uiuc.edu>
76: * & Mark Gates <mgates@nlanr.net>
77: * -------------------------------------------------------------------
78: * Strings and other stuff that is locale specific.
79: * ------------------------------------------------------------------- */
80: #include "iperf_config.h"
81:
82: #include "version.h"
83:
1.1.1.3 ! misho 84: #if defined(HAVE_INTTYPES_H)
! 85: # include <inttypes.h>
! 86: #else
! 87: # ifndef PRIu64
! 88: # if sizeof(long) == 8
! 89: # define PRIu64 "lu"
! 90: # else
! 91: # define PRIu64 "llu"
! 92: # endif
! 93: # endif
! 94: #endif
! 95:
1.1 misho 96: #ifdef __cplusplus
97: extern "C"
98: {
99: #endif
100:
101:
102: /* -------------------------------------------------------------------
103: * usage
104: * ------------------------------------------------------------------- */
105:
1.1.1.2 misho 106: const char usage_shortstr[] = "Usage: iperf3 [-s|-c host] [options]\n"
107: "Try `iperf3 --help' for more information.\n";
1.1 misho 108:
1.1.1.2 misho 109: const char usage_longstr[] = "Usage: iperf3 [-s|-c host] [options]\n"
110: " iperf3 [-h|--help] [-v|--version]\n\n"
1.1 misho 111: "Server or Client:\n"
112: " -p, --port # server port to listen on/connect to\n"
1.1.1.2 misho 113: " -f, --format [kmgtKMGT] format to report: Kbits, Mbits, Gbits, Tbits\n"
114: " -i, --interval # seconds between periodic throughput reports\n"
1.1.1.3 ! misho 115: " -I, --pidfile file write PID file\n"
1.1 misho 116: " -F, --file name xmit/recv the specified file\n"
117: #if defined(HAVE_CPU_AFFINITY)
118: " -A, --affinity n/n,m set CPU affinity\n"
119: #endif /* HAVE_CPU_AFFINITY */
1.1.1.3 ! misho 120: #if defined(HAVE_SO_BINDTODEVICE)
! 121: " -B, --bind <host>[%%<dev>] bind to the interface associated with the address <host>\n"
! 122: " (optional <dev> equivalent to `--bind-dev <dev>`)\n"
! 123: " --bind-dev <dev> bind to the network interface with SO_BINDTODEVICE\n"
! 124: #else /* HAVE_SO_BINDTODEVICE */
1.1.1.2 misho 125: " -B, --bind <host> bind to the interface associated with the address <host>\n"
1.1.1.3 ! misho 126: #endif /* HAVE_SO_BINDTODEVICE */
1.1 misho 127: " -V, --verbose more detailed output\n"
128: " -J, --json output in JSON format\n"
129: " --logfile f send output to a log file\n"
1.1.1.2 misho 130: " --forceflush force flushing output at every interval\n"
1.1.1.3 ! misho 131: " --timestamps<=format> emit a timestamp at the start of each output line\n"
! 132: " (optional \"=\" and format string as per strftime(3))\n"
! 133:
! 134: " --rcv-timeout # idle timeout for receiving data (default %d ms)\n"
! 135: #if defined(HAVE_TCP_USER_TIMEOUT)
! 136: " --snd-timeout # timeout for unacknowledged TCP data\n"
! 137: " (in ms, default is system settings)\n"
! 138: #endif /* HAVE_TCP_USER_TIMEOUT */
! 139: " -d, --debug[=#] emit debugging output\n"
! 140: " (optional optional \"=\" and debug level: 1-4. Default is 4 - all messages)\n"
1.1 misho 141: " -v, --version show version information and quit\n"
142: " -h, --help show this message and quit\n"
143: "Server specific:\n"
144: " -s, --server run in server mode\n"
145: " -D, --daemon run the server as a daemon\n"
146: " -1, --one-off handle one client connection then exit\n"
1.1.1.2 misho 147: " --server-bitrate-limit #[KMG][/#] server's total bit rate limit (default 0 = no limit)\n"
148: " (optional slash and number of secs interval for averaging\n"
149: " total data rate. Default is 5 seconds)\n"
1.1.1.3 ! misho 150: " --idle-timeout # restart idle server after # seconds in case it\n"
! 151: " got stuck (default - no timeout)\n"
1.1.1.2 misho 152: #if defined(HAVE_SSL)
153: " --rsa-private-key-path path to the RSA private key used to decrypt\n"
154: " authentication credentials\n"
155: " --authorized-users-path path to the configuration file containing user\n"
156: " credentials\n"
1.1.1.3 ! misho 157: " --time-skew-threshold time skew threshold (in seconds) between the server\n"
! 158: " and client during the authentication process\n"
1.1.1.2 misho 159: #endif //HAVE_SSL
1.1 misho 160: "Client specific:\n"
1.1.1.3 ! misho 161: " -c, --client <host>[%%<dev>] run in client mode, connecting to <host>\n"
! 162: " (option <dev> equivalent to `--bind-dev <dev>`)\n"
1.1.1.2 misho 163: #if defined(HAVE_SCTP_H)
1.1 misho 164: " --sctp use SCTP rather than TCP\n"
165: " -X, --xbind <name> bind SCTP association to links\n"
166: " --nstreams # number of SCTP streams\n"
1.1.1.2 misho 167: #endif /* HAVE_SCTP_H */
1.1 misho 168: " -u, --udp use UDP rather than TCP\n"
1.1.1.2 misho 169: " --connect-timeout # timeout for control connection setup (ms)\n"
170: " -b, --bitrate #[KMG][/#] target bitrate in bits/sec (0 for unlimited)\n"
1.1 misho 171: " (default %d Mbit/sec for UDP, unlimited for TCP)\n"
172: " (optional slash and packet count for burst mode)\n"
1.1.1.3 ! misho 173: " --pacing-timer #[KMG] set the timing for pacing, in microseconds (default %d)\n"
1.1.1.2 misho 174: #if defined(HAVE_SO_MAX_PACING_RATE)
175: " --fq-rate #[KMG] enable fair-queuing based socket pacing in\n"
176: " bits/sec (Linux only)\n"
177: #endif
1.1 misho 178: " -t, --time # time in seconds to transmit for (default %d secs)\n"
179: " -n, --bytes #[KMG] number of bytes to transmit (instead of -t)\n"
180: " -k, --blockcount #[KMG] number of blocks (packets) to transmit (instead of -t or -n)\n"
1.1.1.2 misho 181: " -l, --length #[KMG] length of buffer to read or write\n"
182: " (default %d KB for TCP, dynamic or %d for UDP)\n"
1.1 misho 183: " --cport <port> bind to a specific client port (TCP and UDP, default: ephemeral port)\n"
184: " -P, --parallel # number of parallel client streams to run\n"
185: " -R, --reverse run in reverse mode (server sends, client receives)\n"
1.1.1.2 misho 186: " --bidir run in bidirectional mode.\n"
187: " Client and server send and receive data.\n"
1.1.1.3 ! misho 188: " -w, --window #[KMG] set send/receive socket buffer sizes\n"
! 189: " (indirectly sets TCP window size)\n"
! 190:
1.1 misho 191: #if defined(HAVE_TCP_CONGESTION)
192: " -C, --congestion <algo> set TCP congestion control algorithm (Linux and FreeBSD only)\n"
193: #endif /* HAVE_TCP_CONGESTION */
194: " -M, --set-mss # set TCP/SCTP maximum segment size (MTU - 40 bytes)\n"
195: " -N, --no-delay set TCP/SCTP no delay, disabling Nagle's Algorithm\n"
196: " -4, --version4 only use IPv4\n"
197: " -6, --version6 only use IPv6\n"
1.1.1.2 misho 198: " -S, --tos N set the IP type of service, 0-255.\n"
199: " The usual prefixes for octal and hex can be used,\n"
200: " i.e. 52, 064 and 0x34 all specify the same value.\n"
201:
202: " --dscp N or --dscp val set the IP dscp value, either 0-63 or symbolic.\n"
203: " Numeric values can be specified in decimal,\n"
204: " octal and hex (see --tos above).\n"
1.1 misho 205: #if defined(HAVE_FLOWLABEL)
206: " -L, --flowlabel N set the IPv6 flow label (only supported on Linux)\n"
207: #endif /* HAVE_FLOWLABEL */
208: " -Z, --zerocopy use a 'zero copy' method of sending data\n"
1.1.1.3 ! misho 209: " -O, --omit N perform pre-test for N seconds and omit the pre-test statistics\n"
1.1 misho 210: " -T, --title str prefix every output line with this string\n"
1.1.1.2 misho 211: " --extra-data str data string to include in client and server JSON\n"
1.1 misho 212: " --get-server-output get results from server\n"
213: " --udp-counters-64bit use 64-bit counters in UDP test packets\n"
1.1.1.2 misho 214: " --repeating-payload use repeating pattern in payload, instead of\n"
215: " randomized payload (like in iperf2)\n"
1.1.1.3 ! misho 216: #if defined(HAVE_DONT_FRAGMENT)
! 217: " --dont-fragment set IPv4 Don't Fragment flag\n"
! 218: #endif /* HAVE_DONT_FRAGMENT */
1.1.1.2 misho 219: #if defined(HAVE_SSL)
220: " --username username for authentication\n"
221: " --rsa-public-key-path path to the RSA public key used to encrypt\n"
222: " authentication credentials\n"
223: #endif //HAVESSL
1.1.1.3 ! misho 224:
1.1 misho 225: #ifdef NOT_YET_SUPPORTED /* still working on these */
226: #endif
227:
228: "\n"
229: "[KMG] indicates options that support a K/M/G suffix for kilo-, mega-, or giga-\n"
230: "\n"
231: #ifdef PACKAGE_URL
232: "iperf3 homepage at: " PACKAGE_URL "\n"
233: #endif /* PACKAGE_URL */
234: #ifdef PACKAGE_BUGREPORT
235: "Report bugs to: " PACKAGE_BUGREPORT "\n"
236: #endif /* PACKAGE_BUGREPORT */
237: ;
238:
239: #ifdef OBSOLETE /* from old iperf: no longer supported. Add some of these back someday */
240: "-d, --dualtest Do a bidirectional test simultaneously\n"
1.1.1.3 ! misho 241: "-L, --listenport # port to receive bidirectional tests back on\n"
1.1 misho 242: "-I, --stdin input the data to be transmitted from stdin\n"
243: "-F, --fileinput <name> input the data to be transmitted from a file\n"
244: "-r, --tradeoff Do a bidirectional test individually\n"
245: "-T, --ttl # time-to-live, for multicast (default 1)\n"
246: "-x, --reportexclude [CDMSV] exclude C(connection) D(data) M(multicast) S(settings) V(server) reports\n"
247: "-y, --reportstyle C report as a Comma-Separated Values\n"
248: #endif
249:
250: const char version[] = PACKAGE_STRING;
251:
252: /* -------------------------------------------------------------------
253: * settings
254: * ------------------------------------------------------------------- */
255:
256: const char seperator_line[] =
257: "------------------------------------------------------------\n";
258:
259: const char server_port[] =
260: "Server listening on %s port %d\n";
261:
262: const char client_port[] =
263: "Client connecting to %s, %s port %d\n";
264:
265: const char bind_address[] =
266: "Binding to local address %s\n";
267:
1.1.1.3 ! misho 268: const char bind_dev[] =
! 269: "Binding to local network device %s\n";
! 270:
1.1 misho 271: const char bind_port[] =
272: "Binding to local port %s\n";
273:
274: const char multicast_ttl[] =
275: "Setting multicast TTL to %d\n";
276:
277: const char join_multicast[] =
278: "Joining multicast group %s\n";
279:
280: const char client_datagram_size[] =
281: "Sending %d byte datagrams\n";
282:
283: const char server_datagram_size[] =
284: "Receiving %d byte datagrams\n";
285:
286: const char tcp_window_size[] =
287: "TCP window size";
288:
289: const char udp_buffer_size[] =
290: "UDP buffer size";
291:
292: const char window_default[] =
293: "(default)";
294:
295: const char wait_server_threads[] =
296: "Waiting for server threads to complete. Interrupt again to force quit.\n";
297:
298: const char test_start_time[] =
1.1.1.2 misho 299: "Starting Test: protocol: %s, %d streams, %d byte blocks, omitting %d seconds, %d second test, tos %d\n";
1.1 misho 300:
301: const char test_start_bytes[] =
1.1.1.2 misho 302: "Starting Test: protocol: %s, %d streams, %d byte blocks, omitting %d seconds, %llu bytes to send, tos %d\n";
1.1 misho 303:
304: const char test_start_blocks[] =
1.1.1.2 misho 305: "Starting Test: protocol: %s, %d streams, %d byte blocks, omitting %d seconds, %d blocks to send, tos %d\n";
1.1 misho 306:
307:
308: /* -------------------------------------------------------------------
309: * reports
310: * ------------------------------------------------------------------- */
311:
312: const char report_time[] =
313: "Time: %s\n";
314:
315: const char report_connecting[] =
316: "Connecting to host %s, port %d\n";
317:
1.1.1.2 misho 318: const char report_authentication_succeeded[] =
1.1.1.3 ! misho 319: "Authentication succeeded for user '%s' ts %ld\n";
1.1.1.2 misho 320:
321: const char report_authentication_failed[] =
1.1.1.3 ! misho 322: "Authentication failed with return code %d for user '%s' ts %ld\n";
1.1.1.2 misho 323:
1.1 misho 324: const char report_reverse[] =
325: "Reverse mode, remote host %s is sending\n";
326:
327: const char report_accepted[] =
328: "Accepted connection from %s, port %d\n";
329:
330: const char report_cookie[] =
331: " Cookie: %s\n";
332:
333: const char report_connected[] =
334: "[%3d] local %s port %d connected to %s port %d\n";
335:
336: const char report_window[] =
337: "TCP window size: %s\n";
338:
339: const char report_autotune[] =
340: "Using TCP Autotuning\n";
341:
342: const char report_omit_done[] =
343: "Finished omit period, starting real test\n";
344:
345: const char report_diskfile[] =
346: " Sent %s / %s (%d%%) of %s\n";
347:
348: const char report_done[] =
349: "iperf Done.\n";
350:
351: const char report_read_lengths[] =
352: "[%3d] Read lengths occurring in more than 5%% of reads:\n";
353:
354: const char report_read_length_times[] =
355: "[%3d] %5d bytes read %5d times (%.3g%%)\n";
356:
357: const char report_bw_header[] =
1.1.1.2 misho 358: "[ ID] Interval Transfer Bitrate\n";
359:
360: const char report_bw_header_bidir[] =
361: "[ ID][Role] Interval Transfer Bitrate\n";
1.1 misho 362:
363: const char report_bw_retrans_header[] =
1.1.1.2 misho 364: "[ ID] Interval Transfer Bitrate Retr\n";
365:
366: const char report_bw_retrans_header_bidir[] =
367: "[ ID][Role] Interval Transfer Bitrate Retr\n";
1.1 misho 368:
369: const char report_bw_retrans_cwnd_header[] =
1.1.1.2 misho 370: "[ ID] Interval Transfer Bitrate Retr Cwnd\n";
371:
372: const char report_bw_retrans_cwnd_header_bidir[] =
373: "[ ID][Role] Interval Transfer Bitrate Retr Cwnd\n";
1.1 misho 374:
375: const char report_bw_udp_header[] =
1.1.1.2 misho 376: "[ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams\n";
377:
378: const char report_bw_udp_header_bidir[] =
379: "[ ID][Role] Interval Transfer Bitrate Jitter Lost/Total Datagrams\n";
1.1 misho 380:
381: const char report_bw_udp_sender_header[] =
1.1.1.2 misho 382: "[ ID] Interval Transfer Bitrate Total Datagrams\n";
383:
384: const char report_bw_udp_sender_header_bidir[] =
385: "[ ID][Role] Interval Transfer Bitrate Total Datagrams\n";
1.1 misho 386:
387: const char report_bw_format[] =
1.1.1.2 misho 388: "[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %s\n";
1.1 misho 389:
390: const char report_bw_retrans_format[] =
1.1.1.2 misho 391: "[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %3u %s\n";
1.1 misho 392:
393: const char report_bw_retrans_cwnd_format[] =
1.1.1.2 misho 394: "[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %3u %ss %s\n";
1.1 misho 395:
396: const char report_bw_udp_format[] =
1.1.1.3 ! misho 397: "[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %5.3f ms %" PRIu64 "/%" PRIu64 " (%.2g%%) %s\n";
! 398:
! 399: const char report_bw_udp_format_no_omitted_error[] =
! 400: "[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %5.3f ms Unknown/%" PRIu64 " %s\n";
1.1 misho 401:
402: const char report_bw_udp_sender_format[] =
1.1.1.3 ! misho 403: "[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %s %" PRIu64 " %s\n";
1.1 misho 404:
405: const char report_summary[] =
406: "Test Complete. Summary Results:\n";
407:
408: const char report_sum_bw_format[] =
1.1.1.2 misho 409: "[SUM]%s %6.2f-%-6.2f sec %ss %ss/sec %s\n";
1.1 misho 410:
411: const char report_sum_bw_retrans_format[] =
1.1.1.2 misho 412: "[SUM]%s %6.2f-%-6.2f sec %ss %ss/sec %3d %s\n";
1.1 misho 413:
414: const char report_sum_bw_udp_format[] =
1.1.1.3 ! misho 415: "[SUM]%s %6.2f-%-6.2f sec %ss %ss/sec %5.3f ms %" PRIu64 "/%" PRIu64 " (%.2g%%) %s\n";
1.1 misho 416:
417: const char report_sum_bw_udp_sender_format[] =
1.1.1.3 ! misho 418: "[SUM]%s %6.2f-%-6.2f sec %ss %ss/sec %s %" PRIu64 " %s\n";
1.1 misho 419:
420: const char report_omitted[] = "(omitted)";
421:
422: const char report_bw_separator[] =
423: "- - - - - - - - - - - - - - - - - - - - - - - - -\n";
424:
425: const char report_outoforder[] =
1.1.1.2 misho 426: "[%3d]%s %4.1f-%4.1f sec %d datagrams received out-of-order\n";
1.1 misho 427:
428: const char report_sum_outoforder[] =
1.1.1.2 misho 429: "[SUM]%s %4.1f-%4.1f sec %d datagrams received out-of-order\n";
1.1 misho 430:
431: const char report_peer[] =
432: "[%3d] local %s port %u connected with %s port %u\n";
433:
434: const char report_mss_unsupported[] =
435: "[%3d] MSS and MTU size unknown (TCP_MAXSEG not supported by OS?)\n";
436:
437: const char report_mss[] =
438: "[%3d] MSS size %d bytes (MTU %d bytes, %s)\n";
439:
440: const char report_datagrams[] =
441: "[%3d] Sent %d datagrams\n";
442:
443: const char report_sum_datagrams[] =
444: "[SUM] Sent %d datagrams\n";
445:
446: const char server_reporting[] =
447: "[%3d] Server Report:\n";
448:
449: const char reportCSV_peer[] =
450: "%s,%u,%s,%u";
451:
452: const char report_cpu[] =
453: "CPU Utilization: %s/%s %.1f%% (%.1f%%u/%.1f%%s), %s/%s %.1f%% (%.1f%%u/%.1f%%s)\n";
454:
455: const char report_local[] = "local";
456: const char report_remote[] = "remote";
457: const char report_sender[] = "sender";
458: const char report_receiver[] = "receiver";
1.1.1.2 misho 459: const char report_sender_not_available_format[] = "[%3d] (sender statistics not available)\n";
460: const char report_sender_not_available_summary_format[] = "[%3s] (sender statistics not available)\n";
461: const char report_receiver_not_available_format[] = "[%3d] (receiver statistics not available)\n";
462: const char report_receiver_not_available_summary_format[] = "[%3s] (receiver statistics not available)\n";
1.1 misho 463:
464: #if defined(linux)
465: const char report_tcpInfo[] =
466: "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";
467: #endif
1.1.1.3 ! misho 468: #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
1.1 misho 469: const char report_tcpInfo[] =
470: "event=TCP_Info CWND=%u RCV_WIND=%u SND_SSTHRESH=%u RTT=%u\n";
471: #endif
472:
473:
474: #ifdef HAVE_QUAD_SUPPORT
475: #ifdef HAVE_PRINTF_QD
476: const char reportCSV_bw_format[] =
477: "%s,%s,%d,%.1f-%.1f,%qd,%qd\n";
478:
479: const char reportCSV_bw_udp_format[] =
480: "%s,%s,%d,%.1f-%.1f,%qd,%qd,%.3f,%d,%d,%.3f,%d\n";
481: #else // HAVE_PRINTF_QD
482: const char reportCSV_bw_format[] =
483: "%s,%s,%d,%.1f-%.1f,%lld,%lld\n";
484:
485: const char reportCSV_bw_udp_format[] =
486: "%s,%s,%d,%.1f-%.1f,%lld,%lld,%.3f,%d,%d,%.3f,%d\n";
487: #endif // HAVE_PRINTF_QD
488: #else // HAVE_QUAD_SUPPORT
489: #ifdef WIN32
490: const char reportCSV_bw_format[] =
491: "%s,%s,%d,%.1f-%.1f,%I64d,%I64d\n";
492:
493: const char reportCSV_bw_udp_format[] =
494: "%s,%s,%d,%.1f-%.1f,%I64d,%I64d,%.3f,%d,%d,%.3f,%d\n";
495: #else
496: const char reportCSV_bw_format[] =
497: "%s,%s,%d,%.1f-%.1f,%d,%d\n";
498:
499: const char reportCSV_bw_udp_format[] =
500: "%s,%s,%d,%.1f-%.1f,%d,%d,%.3f,%d,%d,%.3f,%d\n";
501: #endif //WIN32
502: #endif //HAVE_QUAD_SUPPORT
503: /* -------------------------------------------------------------------
504: * warnings
505: * ------------------------------------------------------------------- */
506:
507: const char warn_window_requested[] =
508: " (WARNING: requested %s)";
509:
510: const char warn_window_small[] =
511: "WARNING: TCP window size set to %d bytes. A small window size\n\
512: will give poor performance. See the Iperf documentation.\n";
513:
514: const char warn_delay_large[] =
515: "WARNING: delay too large, reducing from %.1f to 1.0 seconds.\n";
516:
517: const char warn_no_pathmtu[] =
518: "WARNING: Path MTU Discovery may not be enabled.\n";
519:
520: const char warn_no_ack[]=
521: "[%3d] WARNING: did not receive ack of last datagram after %d tries.\n";
522:
523: const char warn_ack_failed[]=
524: "[%3d] WARNING: ack of last datagram failed after %d tries.\n";
525:
526: const char warn_fileopen_failed[]=
527: "WARNING: Unable to open file stream for transfer\n\
528: Using default data stream. \n";
529:
530: const char unable_to_change_win[]=
531: "WARNING: Unable to change the window size\n";
532:
533: const char opt_estimate[]=
534: "Optimal Estimate\n";
535:
536: const char report_interval_small[] =
537: "WARNING: interval too small, increasing from %3.2f to 0.5 seconds.\n";
538:
539: const char warn_invalid_server_option[] =
540: "WARNING: option -%c is not valid for server mode\n";
541:
542: const char warn_invalid_client_option[] =
543: "WARNING: option -%c is not valid for client mode\n";
544:
545: const char warn_invalid_compatibility_option[] =
546: "WARNING: option -%c is not valid in compatibility mode\n";
547:
548: const char warn_implied_udp[] =
549: "WARNING: option -%c implies udp testing\n";
550:
551: const char warn_implied_compatibility[] =
552: "WARNING: option -%c has implied compatibility mode\n";
553:
554: const char warn_buffer_too_small[] =
555: "WARNING: the UDP buffer was increased to %d for proper operation\n";
556:
557: const char warn_invalid_single_threaded[] =
558: "WARNING: option -%c is not valid in single threaded versions\n";
559:
560: const char warn_invalid_report_style[] =
561: "WARNING: unknown reporting style \"%s\", switching to default\n";
562:
563: const char warn_invalid_report[] =
564: "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";
565:
566: #ifdef __cplusplus
567: } /* end extern "C" */
568: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>