This is an iperf implementation that supports both TCP and UDP.
|
| enum | mmiperf_report_type {
MMIPERF_TCP_DONE_SERVER
, MMIPERF_TCP_DONE_CLIENT
, MMIPERF_TCP_ABORTED_LOCAL
, MMIPERF_TCP_ABORTED_LOCAL_DATAERROR
,
MMIPERF_TCP_ABORTED_LOCAL_TXERROR
, MMIPERF_TCP_ABORTED_REMOTE
, MMIPERF_UDP_DONE_SERVER
, MMIPERF_UDP_DONE_CLIENT
,
MMIPERF_INTERRIM_REPORT
} |
| | Enumeration of iperf report types. More...
|
| |
| enum | traffic_agent_state { TRAFFIC_AGENT_NOT_STARTED
, TRAFFIC_AGENT_RUNNING
, TRAFFIC_AGENT_STOPPED
} |
| | Enumeration of traffic agent state. More...
|
| |
| enum | iperf_version { IPERF_VERSION_2_0_13
, IPERF_VERSION_2_0_9
} |
| | Enumeration of Iperf versions. More...
|
| |
◆ BLOCK_DURATION_MS
| #define BLOCK_DURATION_MS 200 |
If a bandwidth limit is set then we divide transmission into blocks and limit the amount of data that can be sent per block.
This sets the duration of each block (in milliseconds).
Definition at line 27 of file mmiperf.h.
◆ IPV6_HEADER_SIZE_DIFF
| #define IPV6_HEADER_SIZE_DIFF (20) |
Difference between IPv4 and IPv6 Header size in bytes.
Definition at line 30 of file mmiperf.h.
◆ MMIPERF_CLIENT_ARGS_DEFAULT
| #define MMIPERF_CLIENT_ARGS_DEFAULT |
Value: { \
}
#define MMIPERF_DEFAULT_AMOUNT
Default amount iperf (negative number indicates a time in hundredths of seconds, a positive value ind...
#define MMIPERF_DEFAULT_BANDWIDTH
Default bandwidth limit for iperf (in kbps)
#define MMIPERF_DEFAULT_PORT
Default port for TCP and UDP iperf.
@ IPERF_VERSION_2_0_13
Iperf version 2.0.13.
Initializer for mmiperf_client_args.
Definition at line 181 of file mmiperf.h.
◆ MMIPERF_DEFAULT_AMOUNT
| #define MMIPERF_DEFAULT_AMOUNT (-1000) |
Default amount iperf (negative number indicates a time in hundredths of seconds, a positive value indicates a number of bytes).
Definition at line 40 of file mmiperf.h.
◆ MMIPERF_DEFAULT_BANDWIDTH
| #define MMIPERF_DEFAULT_BANDWIDTH (0) |
Default bandwidth limit for iperf (in kbps)
Definition at line 42 of file mmiperf.h.
◆ MMIPERF_DEFAULT_PORT
| #define MMIPERF_DEFAULT_PORT (5001) |
Default port for TCP and UDP iperf.
Definition at line 33 of file mmiperf.h.
◆ MMIPERF_DEFAULT_UDP_PACKET_SIZE_V4
| #define MMIPERF_DEFAULT_UDP_PACKET_SIZE_V4 (1460) |
Default packet size for IPv4 UDP iperf.
Definition at line 35 of file mmiperf.h.
◆ MMIPERF_DEFAULT_UDP_PACKET_SIZE_V6
| #define MMIPERF_DEFAULT_UDP_PACKET_SIZE_V6 (1440) |
Default packet size for IPv4 UDP iperf.
Definition at line 37 of file mmiperf.h.
◆ MMIPERF_IPADDR_MAXLEN
| #define MMIPERF_IPADDR_MAXLEN (48) |
Maximum length of an IP address string including null-terminator.
Definition at line 45 of file mmiperf.h.
◆ MMIPERF_SERVER_ARGS_DEFAULT
| #define MMIPERF_SERVER_ARGS_DEFAULT |
◆ MMIPERF_STACK_SIZE
| #define MMIPERF_STACK_SIZE 512 |
Default stack to use for MMIPERF tasks.
Definition at line 49 of file mmiperf.h.
◆ mmiperf_handle_t
Iperf client/server handle.
Definition at line 96 of file mmiperf.h.
◆ mmiperf_report_fn
Report callback function prototype.
- Parameters
-
| report | The report data. |
| arg | Opaque argument given when the iperf server/client was started. |
| handle | Handle of the iperf client/server that generated the report. |
Definition at line 143 of file mmiperf.h.
◆ iperf_version
Enumeration of Iperf versions.
| Enumerator |
|---|
| IPERF_VERSION_2_0_13 | Iperf version 2.0.13.
|
| IPERF_VERSION_2_0_9 | Iperf version 2.0.9.
|
Definition at line 87 of file mmiperf.h.
◆ mmiperf_report_type
Enumeration of iperf report types.
| Enumerator |
|---|
| MMIPERF_TCP_DONE_SERVER | The server side test is done.
|
| MMIPERF_TCP_DONE_CLIENT | The client side test is done.
|
| MMIPERF_TCP_ABORTED_LOCAL | Local error lead to test abort.
|
| MMIPERF_TCP_ABORTED_LOCAL_DATAERROR | Data check error lead to test abort.
|
| MMIPERF_TCP_ABORTED_LOCAL_TXERROR | Transmit error lead to test abort.
|
| MMIPERF_TCP_ABORTED_REMOTE | Remote side aborted the test.
|
| MMIPERF_UDP_DONE_SERVER | The server side test is done.
|
| MMIPERF_UDP_DONE_CLIENT | The client side test is done.
|
| MMIPERF_INTERRIM_REPORT | Interrim report requested via mmiperf_get_interim_report().
|
Definition at line 53 of file mmiperf.h.
◆ traffic_agent_state
Enumeration of traffic agent state.
| Enumerator |
|---|
| TRAFFIC_AGENT_NOT_STARTED | Traffic agent has not started.
|
| TRAFFIC_AGENT_RUNNING | Traffic agent is running.
|
| TRAFFIC_AGENT_STOPPED | Traffic agent has stopped.
|
Definition at line 76 of file mmiperf.h.
◆ mmiperf_get_interim_report()
Retrieve report for an in progress iperf session.
This shall not be called after the report callback has been received for the given session.
- Parameters
-
| handle | Handle to the iperf session to retrieve the report for. |
| report | Pointer to a report instance to receive the report. |
- Returns
true on success or false on error (e.g., the handle was invalid).
◆ mmiperf_start_tcp_client()
Start a TCP iperf client.
- Parameters
-
| args | Iperf client arguments. |
- Returns
- a handle to the client on success, or
NULL on failure.
◆ mmiperf_start_tcp_server()
Start a TCP iperf server.
- Parameters
-
| args | Iperf server arguments. |
- Returns
- a handle to the server on success, or
NULL on failure.
◆ mmiperf_start_udp_client()
Start a UDP iperf client.
- Parameters
-
| args | Iperf client arguments. |
- Returns
- a handle to the client on success, or
NULL on failure.
◆ mmiperf_start_udp_server()
Start a UDP iperf server.
- Parameters
-
| args | Iperf server arguments. |
- Returns
- a handle to the server on success, or
NULL on failure.