aboutsummaryrefslogtreecommitdiff
path: root/src/iperf_api.c
diff options
context:
space:
mode:
authorBruce A. Mah <bmah@es.net>2014-07-24 09:30:45 -0700
committerBruce A. Mah <bmah@es.net>2014-07-24 09:30:45 -0700
commite0d039ea3c852b58b270c7aec518c0946adae8e1 (patch)
treebc08336ba2c288e44e5e140c3307a32410feacd1 /src/iperf_api.c
parentbef5ef87f58a4953a7165d3a5242f2a49cec32cf (diff)
downloadiperf3-e0d039ea3c852b58b270c7aec518c0946adae8e1.tar.gz
Add API methods to allow setting the bind_address test parameter.
This is the same functionality as the -B iperf3 command-line option. Fixes #197.
Diffstat (limited to 'src/iperf_api.c')
-rw-r--r--src/iperf_api.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/iperf_api.c b/src/iperf_api.c
index 767eef6..804ccdb 100644
--- a/src/iperf_api.c
+++ b/src/iperf_api.c
@@ -229,6 +229,12 @@ iperf_get_test_unit_format(struct iperf_test *ipt)
return ipt->settings->unit_format;
}
+char *
+iperf_get_test_bind_address(struct iperf_test *ipt)
+{
+ return ipt->bind_address;
+}
+
/************** Setter routines for some fields inside iperf_test *************/
void
@@ -376,6 +382,12 @@ iperf_set_test_unit_format(struct iperf_test *ipt, char unit_format)
ipt->settings->unit_format = unit_format;
}
+void
+iperf_set_test_bind_address(struct iperf_test *ipt, char *bind_address)
+{
+ ipt->bind_address = strdup(bind_address);
+}
+
/********************** Get/set test protocol structure ***********************/
struct protocol *