diff options
Diffstat (limited to 'src/iperf.h')
-rw-r--r-- | src/iperf.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/iperf.h b/src/iperf.h index 6ce77f5..5b1da46 100644 --- a/src/iperf.h +++ b/src/iperf.h @@ -1,5 +1,5 @@ /* - * iperf, Copyright (c) 2014-2019, The Regents of the University of + * iperf, Copyright (c) 2014-2020, 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. @@ -68,7 +68,9 @@ #include <openssl/evp.h> #endif // HAVE_SSL +#if !defined(__IPERF_API_H) typedef uint64_t iperf_size_t; +#endif // __IPERF_API_H struct iperf_interval_results { @@ -135,7 +137,10 @@ struct iperf_settings int domain; /* AF_INET or AF_INET6 */ int socket_bufsize; /* window size for TCP */ int blksize; /* size of read/writes (-l) */ - uint64_t rate; /* target data rate for application pacing*/ + iperf_size_t rate; /* target data rate for application pacing*/ + iperf_size_t bitrate_limit; /* server's maximum allowed total data rate for all streams*/ + double bitrate_limit_interval; /* interval for avaraging total data rate */ + int bitrate_limit_stats_per_interval; /* calculated number of stats periods for averaging total data rate */ uint64_t fqrate; /* target data rate for FQ pacing*/ int pacing_timer; /* pacing timer in microseconds */ int burst; /* packets per burst */ @@ -298,6 +303,8 @@ struct iperf_test int forceflush; /* --forceflush - flushing output at every interval */ int multisend; int repeating_payload; /* --repeating-payload */ + int timestamps; /* --timestamps */ + char *timestamp_format; char *json_output_string; /* rendered JSON output if json_output is set */ /* Select related parameters */ @@ -328,6 +335,11 @@ struct iperf_test iperf_size_t bytes_received; iperf_size_t blocks_received; + iperf_size_t bitrate_limit_stats_count; /* Number of stats periods accumulated for server's total bitrate average */ + iperf_size_t *bitrate_limit_intervals_traffic_bytes; /* Pointer to a cyclic array that includes the last interval's bytes transferred */ + iperf_size_t bitrate_limit_last_interval_index; /* Index of the last interval traffic insrted into the cyclic array */ + int bitrate_limit_exceeded; /* Set by callback routine when average data rate exceeded the server's bitrate limit */ + char cookie[COOKIE_SIZE]; // struct iperf_stream *streams; /* pointer to list of struct stream */ SLIST_HEAD(slisthead, iperf_stream) streams; @@ -385,6 +397,8 @@ struct iperf_test #define MAX_MSS (9 * 1024) #define MAX_STREAMS 128 +#define TIMESTAMP_FORMAT "%c " + extern int gerror; /* error value from getaddrinfo(3), for use in internal error handling */ #endif /* !__IPERF_H */ |