27#define BLOCK_DURATION_MS 200
30#define IPV6_HEADER_SIZE_DIFF (20)
33#define MMIPERF_DEFAULT_PORT (5001)
35#define MMIPERF_DEFAULT_UDP_PACKET_SIZE_V4 (1460)
37#define MMIPERF_DEFAULT_UDP_PACKET_SIZE_V6 (1440)
40#define MMIPERF_DEFAULT_AMOUNT (-1000)
42#define MMIPERF_DEFAULT_BANDWIDTH (0)
45#define MMIPERF_IPADDR_MAXLEN (48)
47#ifndef MMIPERF_STACK_SIZE
49#define MMIPERF_STACK_SIZE 512
181#define MMIPERF_CLIENT_ARGS_DEFAULT \
183 { 0 }, MMIPERF_DEFAULT_PORT, MMIPERF_DEFAULT_BANDWIDTH, \
184 0, MMIPERF_DEFAULT_AMOUNT, NULL, \
185 NULL, IPERF_VERSION_2_0_13, \
213#define MMIPERF_SERVER_ARGS_DEFAULT \
215 { 0 }, MMIPERF_DEFAULT_PORT, NULL, NULL, IPERF_VERSION_2_0_13, \
mmiperf_handle_t mmiperf_start_tcp_client(const struct mmiperf_client_args *args)
Start a TCP iperf client.
traffic_agent_state
Enumeration of traffic agent state.
mmiperf_handle_t mmiperf_start_udp_client(const struct mmiperf_client_args *args)
Start a UDP iperf client.
mmiperf_report_type
Enumeration of iperf report types.
void(* mmiperf_report_fn)(const struct mmiperf_report *report, void *arg, mmiperf_handle_t handle)
Report callback function prototype.
mmiperf_handle_t mmiperf_start_udp_server(const struct mmiperf_server_args *args)
Start a UDP iperf server.
iperf_version
Enumeration of Iperf versions.
#define MMIPERF_IPADDR_MAXLEN
Maximum length of an IP address string including null-terminator.
struct mmiperf_state * mmiperf_handle_t
Iperf client/server handle.
mmiperf_handle_t mmiperf_start_tcp_server(const struct mmiperf_server_args *args)
Start a TCP iperf server.
bool mmiperf_get_interim_report(mmiperf_handle_t handle, struct mmiperf_report *report)
Retrieve report for an in progress iperf session.
@ TRAFFIC_AGENT_STOPPED
Traffic agent has stopped.
@ TRAFFIC_AGENT_NOT_STARTED
Traffic agent has not started.
@ TRAFFIC_AGENT_RUNNING
Traffic agent is running.
@ MMIPERF_UDP_DONE_CLIENT
The client side test is done.
@ MMIPERF_TCP_ABORTED_LOCAL_TXERROR
Transmit error lead to test abort.
@ MMIPERF_INTERRIM_REPORT
Interrim report requested via mmiperf_get_interim_report().
@ MMIPERF_TCP_ABORTED_LOCAL
Local error lead to test abort.
@ MMIPERF_TCP_DONE_CLIENT
The client side test is done.
@ MMIPERF_TCP_ABORTED_REMOTE
Remote side aborted the test.
@ MMIPERF_TCP_ABORTED_LOCAL_DATAERROR
Data check error lead to test abort.
@ MMIPERF_UDP_DONE_SERVER
The server side test is done.
@ MMIPERF_TCP_DONE_SERVER
The server side test is done.
@ IPERF_VERSION_2_0_13
Iperf version 2.0.13.
@ IPERF_VERSION_2_0_9
Iperf version 2.0.9.
Iperf client arguments data structure.
char server_addr[MMIPERF_IPADDR_MAXLEN]
IP address of iperf server to communicate with (as a string).
uint32_t packet_size
Packet size to use.
mmiperf_report_fn report_fn
Report callback function to invoke on completion/abort.
uint32_t target_bw
Bandwidth limit (in kbps) to communicate with (0 indicates no limit).
int32_t amount
If positive specifies how many bytes to transfer; if negative the absolute value specifies the durati...
void * report_arg
Opaque argument to pass to the report callback.
enum iperf_version version
Iperf version used to parse packet header.
uint16_t server_port
Port on iperf server to communicate with.
uint32_t ipg_sum_ms
Sum of inter-packet gaps (UDP only).
enum mmiperf_report_type report_type
Type of report.
char local_addr[MMIPERF_IPADDR_MAXLEN]
Local address (as string).
uint16_t local_port
Local port.
uint16_t remote_port
Remote port.
uint32_t bandwidth_kbitpsec
Average throughput in kbps.
uint32_t rx_frames
Number of frames received during test (UDP only).
char remote_addr[MMIPERF_IPADDR_MAXLEN]
Remote address (as string).
uint32_t out_of_sequence_frames
Number of out of sequence frames received during test (UDP only).
uint32_t ipg_count
Number of inter-packet gaps (UDP only).
uint64_t bytes_transferred
Number of bytes of data transferred during test.
uint32_t tx_frames
Number of frames transmitted during test (UDP only).
uint32_t duration_ms
Duration of the test in milliseconds.
uint32_t error_count
Number of packet errors (UDP only).
Iperf server arguments data structure.
enum iperf_version version
Iperf version used to parse packet header.
mmiperf_report_fn report_fn
Report callback function to invoke on completion/abort.
void * report_arg
Opaque argument to pass to the report callback.
uint16_t local_port
Local port to listen on.
char local_addr[MMIPERF_IPADDR_MAXLEN]
Local address to listen on (as a string).