uodate to iperf3-3.12 and patch to enable TCP_INFO support
From Brad, plus I bumped SHARED_LIBS due to new symbols and size changes. maintainer timeout
This commit is contained in:
parent
e6b72692a8
commit
0f43696249
@ -1,11 +1,10 @@
|
|||||||
COMMENT= tool to measure maximum achievable bandwidth on IP networks
|
COMMENT= tool to measure maximum achievable bandwidth on IP networks
|
||||||
|
|
||||||
V= 3.10.1
|
V= 3.12
|
||||||
PKGNAME= iperf3-${V}
|
PKGNAME= iperf3-${V}
|
||||||
DISTNAME= iperf-${V}
|
DISTNAME= iperf-${V}
|
||||||
REVISION= 0
|
|
||||||
|
|
||||||
SHARED_LIBS += iperf 1.1 # 0.0
|
SHARED_LIBS += iperf 2.0 # 0.0
|
||||||
|
|
||||||
CATEGORIES= net
|
CATEGORIES= net
|
||||||
|
|
||||||
@ -20,7 +19,9 @@ WANTLIB += c m
|
|||||||
|
|
||||||
MASTER_SITES= https://downloads.es.net/pub/iperf/
|
MASTER_SITES= https://downloads.es.net/pub/iperf/
|
||||||
|
|
||||||
CONFIGURE_STYLE= gnu
|
AUTOCONF_VERSION= 2.71
|
||||||
|
|
||||||
|
CONFIGURE_STYLE= autoconf
|
||||||
CONFIGURE_ARGS= --with-openssl=no
|
CONFIGURE_ARGS= --with-openssl=no
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk>
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
SHA256 (iperf-3.10.1.tar.gz) = A7yXYMxUokUZHUa/yO2vikdQ8Oh6vKZ2RIaXIETWcVo=
|
SHA256 (iperf-3.12.tar.gz) = cgNOz7an1tZ+OE4Z+27/8yNspPftTFGNfbZJxEfh/9Y=
|
||||||
SIZE (iperf-3.10.1.tar.gz) = 633304
|
SIZE (iperf-3.12.tar.gz) = 644807
|
||||||
|
14
net/iperf3/patches/patch-configure_ac
Normal file
14
net/iperf3/patches/patch-configure_ac
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
Add support for OpenBSD systems which have TCP_INFO implemented.
|
||||||
|
463571f25e8bcb49ae37fec77d63c3fe65dd0638
|
||||||
|
|
||||||
|
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
|
||||||
|
])
|
@ -3,7 +3,7 @@ Default to IPv4.
|
|||||||
Index: src/iperf_api.c
|
Index: src/iperf_api.c
|
||||||
--- src/iperf_api.c.orig
|
--- src/iperf_api.c.orig
|
||||||
+++ src/iperf_api.c
|
+++ 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->stats_interval = testp->reporter_interval = 1;
|
||||||
testp->num_streams = 1;
|
testp->num_streams = 1;
|
||||||
|
|
||||||
|
18
net/iperf3/patches/patch-src_iperf_h
Normal file
18
net/iperf3/patches/patch-src_iperf_h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
Add support for OpenBSD systems which have TCP_INFO implemented.
|
||||||
|
463571f25e8bcb49ae37fec77d63c3fe65dd0638
|
||||||
|
|
||||||
|
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;
|
19
net/iperf3/patches/patch-src_iperf_locale_c
Normal file
19
net/iperf3/patches/patch-src_iperf_locale_c
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Add support for OpenBSD systems which have TCP_INFO implemented.
|
||||||
|
463571f25e8bcb49ae37fec77d63c3fe65dd0638
|
||||||
|
|
||||||
|
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
|
91
net/iperf3/patches/patch-src_tcp_info_c
Normal file
91
net/iperf3/patches/patch-src_tcp_info_c
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
Add support for OpenBSD systems which have TCP_INFO implemented.
|
||||||
|
463571f25e8bcb49ae37fec77d63c3fe65dd0638
|
||||||
|
|
||||||
|
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
|
@ -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"
|
|
Loading…
x
Reference in New Issue
Block a user