Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API interface for setting/getting congestion control (#1036) #1112

Merged
merged 1 commit into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/iperf_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,12 @@ iperf_get_test_idle_timeout(struct iperf_test *ipt)
return ipt->settings->idle_timeout;
}

char*
iperf_get_test_congestion_control(struct iperf_test* ipt)
{
return ipt->congestion;
}

/************** Setter routines for some fields inside iperf_test *************/

void
Expand Down Expand Up @@ -731,6 +737,12 @@ iperf_set_test_idle_timeout(struct iperf_test* ipt, int to)
ipt->settings->idle_timeout = to;
}

void
iperf_set_test_congestion_control(struct iperf_test* ipt, char* cc)
{
ipt->congestion = strdup(cc);
}


/********************** Get/set test protocol structure ***********************/

Expand Down
2 changes: 2 additions & 0 deletions src/iperf_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ char* iperf_get_extra_data( struct iperf_test* ipt );
char* iperf_get_iperf_version(void);
int iperf_get_test_no_delay( struct iperf_test* ipt );
int iperf_get_test_connect_timeout( struct iperf_test* ipt );
char* iperf_get_test_congestion_control(struct iperf_test* ipt);

/* Setter routines for some fields inside iperf_test. */
void iperf_set_verbose( struct iperf_test* ipt, int verbose );
Expand Down Expand Up @@ -177,6 +178,7 @@ void iperf_set_test_tos( struct iperf_test* ipt, int tos );
void iperf_set_test_extra_data( struct iperf_test* ipt, const char *dat );
void iperf_set_test_bidirectional( struct iperf_test* ipt, int bidirectional);
void iperf_set_test_no_delay( struct iperf_test* ipt, int no_delay);
void iperf_set_test_congestion_control(struct iperf_test* ipt, char* cc);

#if defined(HAVE_SSL)
void iperf_set_test_client_username(struct iperf_test *ipt, const char *client_username);
Expand Down