Here is an update to iperf3.
https://raw.githubusercontent.com/esnet/iperf/master/RELNOTES.md Index: Makefile =================================================================== RCS file: /home/cvs/ports/net/iperf3/Makefile,v retrieving revision 1.9 diff -u -p -u -p -r1.9 Makefile --- Makefile 11 Mar 2022 19:46:08 -0000 1.9 +++ Makefile 7 Oct 2022 21:39:50 -0000 @@ -1,6 +1,6 @@ COMMENT= tool to measure maximum achievable bandwidth on IP networks -V= 3.10.1 +V= 3.12 PKGNAME= iperf3-${V} DISTNAME= iperf-${V} @@ -19,7 +19,9 @@ WANTLIB += c m MASTER_SITES= https://downloads.es.net/pub/iperf/ -CONFIGURE_STYLE= gnu +AUTOCONF_VERSION= 2.71 + +CONFIGURE_STYLE= autoconf CONFIGURE_ARGS= --with-openssl=no .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /home/cvs/ports/net/iperf3/distinfo,v retrieving revision 1.6 diff -u -p -u -p -r1.6 distinfo --- distinfo 13 Jul 2021 02:02:09 -0000 1.6 +++ distinfo 3 Oct 2022 05:54:03 -0000 @@ -1,2 +1,2 @@ -SHA256 (iperf-3.10.1.tar.gz) = A7yXYMxUokUZHUa/yO2vikdQ8Oh6vKZ2RIaXIETWcVo= -SIZE (iperf-3.10.1.tar.gz) = 633304 +SHA256 (iperf-3.12.tar.gz) = cgNOz7an1tZ+OE4Z+27/8yNspPftTFGNfbZJxEfh/9Y= +SIZE (iperf-3.12.tar.gz) = 644807 Index: patches/patch-configure_ac =================================================================== RCS file: patches/patch-configure_ac diff -N patches/patch-configure_ac --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-configure_ac 7 Oct 2022 21:37:49 -0000 @@ -0,0 +1,13 @@ +Add support for OpenBSD systems which have TCP_INFO implemented. + +Index: configure.ac +--- configure.ac.orig ++++ configure.ac +@@ -305,6 +305,7 @@ AC_CHECK_MEMBER([struct tcp_info.tcpi_snd_wnd], + [#ifdef HAVE_LINUX_TCP_H + #include <linux/tcp.h> + #else ++#include <sys/types.h> + #include <netinet/tcp.h> + #endif + ]) Index: patches/patch-src_iperf_api_c =================================================================== RCS file: /home/cvs/ports/net/iperf3/patches/patch-src_iperf_api_c,v retrieving revision 1.5 diff -u -p -u -p -r1.5 patch-src_iperf_api_c --- patches/patch-src_iperf_api_c 11 Mar 2022 19:46:08 -0000 1.5 +++ patches/patch-src_iperf_api_c 3 Oct 2022 05:54:34 -0000 @@ -3,7 +3,7 @@ Default to IPv4. Index: src/iperf_api.c --- src/iperf_api.c.orig +++ src/iperf_api.c -@@ -2314,7 +2314,7 @@ iperf_defaults(struct iperf_test *testp) +@@ -2787,7 +2787,7 @@ iperf_defaults(struct iperf_test *testp) testp->stats_interval = testp->reporter_interval = 1; testp->num_streams = 1; Index: patches/patch-src_iperf_h =================================================================== RCS file: patches/patch-src_iperf_h diff -N patches/patch-src_iperf_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_iperf_h 7 Oct 2022 21:38:07 -0000 @@ -0,0 +1,17 @@ +Add support for OpenBSD systems which have TCP_INFO implemented. + +Index: src/iperf.h +--- src/iperf.h.orig ++++ src/iperf.h +@@ -94,9 +94,9 @@ struct iperf_interval_results + int cnt_error; + + int omitted; +-#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__)) && \ ++#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && \ + defined(TCP_INFO) +- struct tcp_info tcpInfo; /* getsockopt(TCP_INFO) for Linux, {Free,Net}BSD */ ++ struct tcp_info tcpInfo; /* getsockopt(TCP_INFO) for Linux, {Free,Net,Open}BSD */ + #else + /* Just placeholders, never accessed. */ + char *tcpInfo; Index: patches/patch-src_iperf_locale_c =================================================================== RCS file: patches/patch-src_iperf_locale_c diff -N patches/patch-src_iperf_locale_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_iperf_locale_c 7 Oct 2022 21:38:18 -0000 @@ -0,0 +1,18 @@ +Add support for OpenBSD systems which have TCP_INFO implemented. + +Index: src/iperf_locale.c +--- src/iperf_locale.c.orig ++++ src/iperf_locale.c +@@ -450,11 +450,7 @@ const char report_receiver_not_available_summary_forma + const char report_tcpInfo[] = + "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"; + #endif +-#if defined(__FreeBSD__) +-const char report_tcpInfo[] = +-"event=TCP_Info CWND=%u RCV_WIND=%u SND_SSTHRESH=%u RTT=%u\n"; +-#endif +-#if defined(__NetBSD__) ++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) + const char report_tcpInfo[] = + "event=TCP_Info CWND=%u RCV_WIND=%u SND_SSTHRESH=%u RTT=%u\n"; + #endif Index: patches/patch-src_tcp_info_c =================================================================== RCS file: patches/patch-src_tcp_info_c diff -N patches/patch-src_tcp_info_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_tcp_info_c 7 Oct 2022 21:38:44 -0000 @@ -0,0 +1,90 @@ +Add support for OpenBSD systems which have TCP_INFO implemented. + +Index: src/tcp_info.c +--- src/tcp_info.c.orig ++++ src/tcp_info.c +@@ -60,7 +60,7 @@ + int + has_tcpinfo(void) + { +-#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__)) \ ++#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) \ + && defined(TCP_INFO) + return 1; + #else +@@ -82,7 +82,7 @@ has_tcpinfo_retransmits(void) + #else + #if defined(__FreeBSD__) && __FreeBSD_version >= 600000 + return 1; /* Should work now */ +-#elif defined(__NetBSD__) && defined(TCP_INFO) ++#elif (defined(__NetBSD__) || defined(__OpenBSD__)) && defined(TCP_INFO) + return 1; + #else + return 0; +@@ -94,7 +94,7 @@ has_tcpinfo_retransmits(void) + void + save_tcpinfo(struct iperf_stream *sp, struct iperf_interval_results *irp) + { +-#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__)) && \ ++#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && \ + defined(TCP_INFO) + socklen_t tcp_info_length = sizeof(struct tcp_info); + +@@ -118,7 +118,7 @@ get_total_retransmits(struct iperf_interval_results *i + return irp->tcpInfo.tcpi_total_retrans; + #elif defined(__FreeBSD__) && __FreeBSD_version >= 600000 + return irp->tcpInfo.tcpi_snd_rexmitpack; +-#elif defined(__NetBSD__) && defined(TCP_INFO) ++#elif (defined(__NetBSD__) || defined(__OpenBSD__)) && defined(TCP_INFO) + return irp->tcpInfo.tcpi_snd_rexmitpack; + #else + return -1; +@@ -138,6 +138,8 @@ get_snd_cwnd(struct iperf_interval_results *irp) + return irp->tcpInfo.tcpi_snd_cwnd; + #elif defined(__NetBSD__) && defined(TCP_INFO) + return (long)irp->tcpInfo.tcpi_snd_cwnd * irp->tcpInfo.tcpi_snd_mss; ++#elif defined(__OpenBSD__) && defined(TCP_INFO) ++ return irp->tcpInfo.tcpi_snd_cwnd; + #else + return -1; + #endif +@@ -158,6 +160,8 @@ get_snd_wnd(struct iperf_interval_results *irp) + return irp->tcpInfo.tcpi_snd_wnd; + #elif defined(__NetBSD__) && defined(TCP_INFO) + return (long)irp->tcpInfo.tcpi_snd_wnd * irp->tcpInfo.tcpi_snd_mss; ++#elif defined(__OpenBSD__) && defined(TCP_INFO) ++ return irp->tcpInfo.tcpi_snd_wnd; + #else + return -1; + #endif +@@ -174,7 +178,7 @@ get_rtt(struct iperf_interval_results *irp) + return irp->tcpInfo.tcpi_rtt; + #elif defined(__FreeBSD__) && __FreeBSD_version >= 600000 + return irp->tcpInfo.tcpi_rtt; +-#elif defined(__NetBSD__) && defined(TCP_INFO) ++#elif (defined(__NetBSD__) || defined(__OpenBSD__)) && defined(TCP_INFO) + return irp->tcpInfo.tcpi_rtt; + #else + return -1; +@@ -192,7 +196,7 @@ get_rttvar(struct iperf_interval_results *irp) + return irp->tcpInfo.tcpi_rttvar; + #elif defined(__FreeBSD__) && __FreeBSD_version >= 600000 + return irp->tcpInfo.tcpi_rttvar; +-#elif defined(__NetBSD__) && defined(TCP_INFO) ++#elif (defined(__NetBSD__) || defined(__OpenBSD__)) && defined(TCP_INFO) + return irp->tcpInfo.tcpi_rttvar; + #else + return -1; +@@ -223,11 +227,7 @@ build_tcpinfo_message(struct iperf_interval_results *r + r->tcpInfo.tcpi_lost, r->tcpInfo.tcpi_retrans, r->tcpInfo.tcpi_fackets, + r->tcpInfo.tcpi_rtt, r->tcpInfo.tcpi_reordering); + #endif +-#if defined(__FreeBSD__) && defined(TCP_INFO) +- sprintf(message, report_tcpInfo, r->tcpInfo.tcpi_snd_cwnd, +- r->tcpInfo.tcpi_rcv_space, r->tcpInfo.tcpi_snd_ssthresh, r->tcpInfo.tcpi_rtt); +-#endif +-#if defined(__NetBSD__) && defined(TCP_INFO) ++#if (defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && defined(TCP_INFO) + sprintf(message, report_tcpInfo, r->tcpInfo.tcpi_snd_cwnd, + r->tcpInfo.tcpi_rcv_space, r->tcpInfo.tcpi_snd_ssthresh, r->tcpInfo.tcpi_rtt); + #endif Index: patches/patch-src_timer_c =================================================================== RCS file: patches/patch-src_timer_c diff -N patches/patch-src_timer_c --- patches/patch-src_timer_c 11 Mar 2022 19:46:08 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,13 +0,0 @@ -for struct timeval - -Index: src/timer.c ---- src/timer.c.orig -+++ src/timer.c -@@ -28,6 +28,7 @@ - */ - - #include <sys/types.h> -+#include <sys/time.h> - #include <stdlib.h> - - #include "timer.h"