1
1

Added zerocopy stuff to the API, so that bwctl can use it.

Этот коммит содержится в:
Jef Poskanzer 2013-03-06 07:46:28 -08:00
родитель c57e9f2494
Коммит a5621dd908
2 изменённых файлов: 21 добавлений и 0 удалений

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

@ -158,6 +158,12 @@ iperf_get_test_json_output(struct iperf_test *ipt)
return ipt->json_output;
}
int
iperf_get_test_zerocopy(struct iperf_test *ipt)
{
return ipt->zerocopy;
}
/************** Setter routines for some fields inside iperf_test *************/
void
@ -238,6 +244,18 @@ iperf_set_test_json_output(struct iperf_test *ipt, int json_output)
ipt->json_output = json_output;
}
int
iperf_has_zerocopy( void )
{
return has_sendfile();
}
void
iperf_set_test_zerocopy(struct iperf_test *ipt, int zerocopy)
{
ipt->zerocopy = zerocopy;
}
/********************** Get/set test protocol structure ***********************/
struct protocol *

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

@ -57,6 +57,7 @@ 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 );
int iperf_get_test_zerocopy( struct iperf_test* ipt );
/* Setter routines for some fields inside iperf_test. */
void iperf_set_control_socket( struct iperf_test* ipt, int ctrl_sck );
@ -72,6 +73,8 @@ 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 );
int iperf_has_zerocopy( void );
void iperf_set_test_zerocopy( struct iperf_test* ipt, int zerocopy );
/**
* exchange_parameters - handles the param_Exchange part for client