aboutsummaryrefslogtreecommitdiff
path: root/src/iperf_error.c
diff options
context:
space:
mode:
authorBruce A. Mah <bmah@es.net>2014-04-09 10:29:16 -0700
committerBruce A. Mah <bmah@es.net>2014-04-09 10:29:16 -0700
commitcd81de3c0acbb3d1b38ac7ca14650d00cdd4061b (patch)
tree0c0e93869d3bf61739fc51e74017050efc50f28b /src/iperf_error.c
parente3990c3cc0e3926365f4f2f5d3748a4e869de7af (diff)
downloadiperf3-cd81de3c0acbb3d1b38ac7ca14650d00cdd4061b.tar.gz
Rework detection / enabling of SCTP support.
Rather than doing checks for platforms that we believe support SCTP, instead look for an indication (notably the presence of <netinet/sctp.h>) that it's supported. This makes the conditionals for SCTP more obvious. In addition, it opens up the possibility that SCTP might work on some new OS that's not FreeBSD or Linux. This change may force some additional build-time requirements on Linux, such as lksctp-tools-devel on CentOS / Fedora or libsctp-dev on Ubuntu. Committing this first cut for review and to enable testing on multiple platforms. So far this works correctly on Linux (SCTP support) and MacOS (no SCTP support).
Diffstat (limited to 'src/iperf_error.c')
-rw-r--r--src/iperf_error.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/iperf_error.c b/src/iperf_error.c
index ea889f8..ef1d1ef 100644
--- a/src/iperf_error.c
+++ b/src/iperf_error.c
@@ -130,6 +130,9 @@ iperf_strerror(int i_errno)
snprintf(errstr, len, "unable to open log file");
perr = 1;
break;
+ case IENOSCTP:
+ snprintf(errstr, len, "no SCTP support available");
+ break;
case IENEWTEST:
snprintf(errstr, len, "unable to create a new test");
perr = 1;