Add get/set json_output to the API.

This commit is contained in:
Jef Poskanzer 2013-02-26 15:54:29 -08:00
parent 43929b3698
commit 50a45ea47e
2 changed files with 14 additions and 0 deletions

View File

@ -151,6 +151,12 @@ iperf_get_test_protocol_id(struct iperf_test *ipt)
return ipt->protocol->id;
}
int
iperf_get_test_json_output(struct iperf_test *ipt)
{
return ipt->json_output;
}
/************** Setter routines for some fields inside iperf_test *************/
void
@ -225,6 +231,12 @@ iperf_set_test_server_hostname(struct iperf_test *ipt, char *server_hostname)
ipt->server_hostname = server_hostname;
}
void
iperf_set_test_json_output(struct iperf_test *ipt, int json_output)
{
ipt->json_output = json_output;
}
/********************** Get/set test protocol structure ***********************/
struct protocol *

View File

@ -56,6 +56,7 @@ int iperf_get_test_num_streams( struct iperf_test* ipt );
int iperf_get_test_server_port( struct iperf_test* ipt );
char* iperf_get_test_server_hostname( struct iperf_test* ipt );
int iperf_get_test_protocol_id( struct iperf_test* ipt );
int iperf_get_test_json_output( struct iperf_test* ipt );
/* Setter routines for some fields inside iperf_test. */
void iperf_set_control_socket( struct iperf_test* ipt, int ctrl_sck );
@ -70,6 +71,7 @@ void iperf_set_test_socket_bufsize( struct iperf_test* ipt, int socket_bufsize )
void iperf_set_test_num_streams( struct iperf_test* ipt, int num_streams );
void iperf_set_test_role( struct iperf_test* ipt, char role );
void iperf_set_test_server_hostname( struct iperf_test* ipt, char* server_hostname );
void iperf_set_test_json_output( struct iperf_test* ipt, int json_output );
/**
* exchange_parameters - handles the param_Exchange part for client