Skip to content

Commit

Permalink
Adding API function to set debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hanvari committed Jul 7, 2021
1 parent 844ba8c commit 7e59b37
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/iperf_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ iperf_get_verbose(struct iperf_test *ipt)
return ipt->verbose;
}

int
iperf_get_debug(struct iperf_test *ipt)
{
return ipt->debug;
}

int
iperf_get_control_socket(struct iperf_test *ipt)
{
Expand Down Expand Up @@ -425,6 +431,12 @@ iperf_set_verbose(struct iperf_test *ipt, int verbose)
ipt->verbose = verbose;
}

void
iperf_set_debug(struct iperf_test *ipt, int debug)
{
ipt->debug = debug;
}

void
iperf_set_control_socket(struct iperf_test *ipt, int ctrl_sck)
{
Expand Down
2 changes: 2 additions & 0 deletions src/iperf_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ typedef uint64_t iperf_size_t;

/* Getter routines for some fields inside iperf_test. */
int iperf_get_verbose( struct iperf_test* ipt );
int iperf_get_debug( struct iperf_test* ipt );
int iperf_get_control_socket( struct iperf_test* ipt );
int iperf_get_test_omit( struct iperf_test* ipt );
int iperf_get_test_duration( struct iperf_test* ipt );
Expand Down Expand Up @@ -151,6 +152,7 @@ uint64_t iperf_get_test_bytes_sent(struct iperf_test* ipt);

/* Setter routines for some fields inside iperf_test. */
void iperf_set_verbose( struct iperf_test* ipt, int verbose );
void iperf_set_debug( struct iperf_test* ipt, int debug );
void iperf_set_control_socket( struct iperf_test* ipt, int ctrl_sck );
void iperf_set_test_omit( struct iperf_test* ipt, int omit );
void iperf_set_test_duration( struct iperf_test* ipt, int duration );
Expand Down

0 comments on commit 7e59b37

Please sign in to comment.