1
1

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.
Этот коммит содержится в:
Bruce A. Mah 2014-07-24 09:30:45 -07:00
родитель bef5ef87f5
Коммит e0d039ea3c
3 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -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 *

Просмотреть файл

@ -72,6 +72,7 @@ int iperf_get_test_json_output( struct iperf_test* ipt );
char* iperf_get_test_json_output_string ( struct iperf_test* ipt );
int iperf_get_test_zerocopy( struct iperf_test* ipt );
int iperf_get_test_get_server_output( struct iperf_test* ipt );
char* iperf_get_test_bind_address ( struct iperf_test* ipt );
/* Setter routines for some fields inside iperf_test. */
void iperf_set_verbose( struct iperf_test* ipt, int verbose );
@ -94,6 +95,7 @@ void iperf_set_test_json_output( struct iperf_test* ipt, int json_output );
int iperf_has_zerocopy( void );
void iperf_set_test_zerocopy( struct iperf_test* ipt, int zerocopy );
void iperf_set_test_get_server_output( struct iperf_test* ipt, int get_server_output );
void iperf_set_test_bind_address( struct iperf_test* ipt, char *bind_address );
/**
* exchange_parameters - handles the param_Exchange part for client

Просмотреть файл

@ -24,6 +24,7 @@ Initialization / termination:
Setting test parameters:
.nf
void iperf_set_test_role( struct iperf_test *pt, char role );
void iperf_set_test_bind_address( struct iperf_test *t, char *bind_address );
void iperf_set_test_server_hostname( struct iperf_test *t, char *server_hos
void iperf_set_test_server_port( struct iperf_test *t, int server_port );
void iperf_set_test_duration( struct iperf_test *t, int duration );