int thrulay_open(thrulay_traffic_type_t traffic, void * setting);
typedef struct _thrulay_setting_tcp {
char *server_name; /* Where to send test traffic. */
int server_port; /* Server listen port number. */
int test_duration; /* For how long to send packet. */
int report_interval; /* How often to report progress. */
int window_size; /* TCP Window size, in bytes. */
int block_size; /* TCP send block size, in bytes.*/
int nstream; /* Number of paralle streams. */
int tos; /* Type of service setting. */
} thrulay_setting_tcp_t;
typedef struct _thrulay_setting_udp
{
char *server_name; /* Where to send test traffic. */
int server_port; /* Server listen port number. */
int test_duration; /* For how long to send packet. */
int udp_buffer_size; /* Size of client UDP send buffer.*/
int packet_size; /* Size of a single UDP packet. */
int nstream; /* Number of paralle test streams.*/
int tos; /* Type of service setting. */
u_int64_t rate; /* For how fast to send a packet. */
thrulay_wait_type_t wt; /* How to wait before sending. */
} thrulay_setting_udp_t;
int
tid;
thrulay_setting_tcp_t setting_tcp;
thrulay_init();
setting_tcp.server_name = "nmsa-aami.internet2.edu";
setting_tcp.port = 5003;
setting_tcp.test_duration = 5;
setting_tcp.report_interval = 1;
setting_tcp.nstream = 2;
tid = thrulay_open(THRULAY_TCP, &setting_tcp);