diff options
author | Kai Borowiak <quartoxuna@users.noreply.github.com> | 2018-03-23 14:28:20 +0100 |
---|---|---|
committer | Bruce A. Mah <bmah@kitchenlab.org> | 2018-03-23 06:28:20 -0700 |
commit | c0a441756a37d1ef41bd11ab5fbdf8e6cad6981e (patch) | |
tree | 1562e72ee341e2421304721c1378afcf91ac6289 | |
parent | 4fe72e1979e281f0a216c6506a83eff1c4e4e9a4 (diff) | |
download | iperf3-c0a441756a37d1ef41bd11ab5fbdf8e6cad6981e.tar.gz |
Add ToS Byte to iperf API (#719)
* Add ToS byte to iperf API
* Add function prototype to manual page
-rwxr-xr-x | src/iperf_api.c | 12 | ||||
-rwxr-xr-x | src/iperf_api.h | 2 | ||||
-rw-r--r-- | src/libiperf.3 | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/src/iperf_api.c b/src/iperf_api.c index 878c9c4..8bf5296 100755 --- a/src/iperf_api.c +++ b/src/iperf_api.c @@ -290,6 +290,12 @@ iperf_get_test_one_off(struct iperf_test *ipt) return ipt->one_off; } +int +iperf_get_test_tos(struct iperf_test *ipt) +{ + return ipt->settings->tos; +} + /************** Setter routines for some fields inside iperf_test *************/ void @@ -467,6 +473,12 @@ iperf_set_test_one_off(struct iperf_test *ipt, int one_off) ipt->one_off = one_off; } +void +iperf_set_test_tos(struct iperf_test *ipt, int tos) +{ + ipt->settings->tos = tos; +} + /********************** Get/set test protocol structure ***********************/ struct protocol * diff --git a/src/iperf_api.h b/src/iperf_api.h index 3a5df03..ddd002b 100755 --- a/src/iperf_api.h +++ b/src/iperf_api.h @@ -115,6 +115,7 @@ int iperf_get_test_get_server_output( struct iperf_test* ipt ); char* iperf_get_test_bind_address ( struct iperf_test* ipt ); int iperf_get_test_udp_counters_64bit( struct iperf_test* ipt ); int iperf_get_test_one_off( struct iperf_test* ipt ); +int iperf_get_test_tos( struct iperf_test* ipt ); /* Setter routines for some fields inside iperf_test. */ void iperf_set_verbose( struct iperf_test* ipt, int verbose ); @@ -141,6 +142,7 @@ void iperf_set_test_get_server_output( struct iperf_test* ipt, int get_server_ou void iperf_set_test_bind_address( struct iperf_test* ipt, char *bind_address ); void iperf_set_test_udp_counters_64bit( struct iperf_test* ipt, int udp_counters_64bit ); void iperf_set_test_one_off( struct iperf_test* ipt, int one_off ); +void iperf_set_test_tos( struct iperf_test* ipt, int tos ); /** * exchange_parameters - handles the param_Exchange part for client diff --git a/src/libiperf.3 b/src/libiperf.3 index 674d95f..078b7be 100644 --- a/src/libiperf.3 +++ b/src/libiperf.3 @@ -33,6 +33,7 @@ Setting test parameters: void iperf_set_test_json_output( struct iperf_test *t, int json_output ); int iperf_has_zerocopy( void ); void iperf_set_test_zerocopy( struct iperf_test* t, int zerocopy ); + void iperf_set_test_tos( struct iperf_test* t, int tos ); .fi Running a test: .nf |