iperf: add output format change function for iperf

This commit is contained in:
Xu Si Yu
2022-11-02 12:04:27 +08:00
parent e7879abbcc
commit fcafd8dc27
2 changed files with 13 additions and 5 deletions

View File

@@ -52,6 +52,10 @@ extern "C" {
#define IPERF_SOCKET_RX_TIMEOUT 10
#define IPERF_SOCKET_ACCEPT_TIMEOUT 5
typedef enum {
MBITS_PER_SEC, KBITS_PER_SEC, BITS_PER_SEC
} iperf_output_format;
typedef struct {
uint32_t flag;
union {
@@ -69,6 +73,7 @@ typedef struct {
uint32_t time;
uint16_t len_send_buf;
int32_t bw_lim;
iperf_output_format format;
} iperf_cfg_t;
esp_err_t iperf_start(iperf_cfg_t *cfg);