iPerf#

The iPerf component provides an iPerf2-compatible solution to measure UDP throughput. It has a full UDP support and implements a server and client modes, which are capable of sending and receiving packets to measure the bandwidth performance, the inter-arrival jitter, and packet loss.

The component relies on different functions to help configure and run your iPerf test. It allows you to set up your server and client port, your preferred bandwidth, number of packets, remote peer address, and so on. At the end of every iPerf test, an iPerf report is output. Multicast target measurement is supported also. The component can be used with any network stack because it has a portable custom network interface.

To use the iPerf component in your application, add it to your project and initialize it with sl_iperf_service_init().

Modules#

iPerf type definitions

Functions#

void

Initialize the iPerf service.

void
sl_iperf_test_init(sl_iperf_test_t *const test, sl_iperf_mode_t mode, sl_iperf_protocol_t protocol)

Initialize the iPerf test.

void
sl_iperf_test_set_default_logger(sl_iperf_test_t *const test)

Set the default internal logger for the test descriptor.

void
sl_iperf_test_set_default_buff(sl_iperf_test_t *const test)

Set the default internal test buffer.

bool
sl_iperf_test_add(sl_iperf_test_t *const test)

Add the iPerf test to the execution queue.

bool
sl_iperf_test_get(sl_iperf_test_t *const test, const uint32_t timeout_ms)

Get the iPerf test from the result queue.

void
sl_iperf_test_udp_client(sl_iperf_test_t *test)

Execute the iPerf UDP client test.

void
sl_iperf_test_udp_server(sl_iperf_test_t *test)

Execute the iPerf UDP server test.

Function Documentation#

sl_iperf_service_init#

void sl_iperf_service_init (void )

Initialize the iPerf service.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Init OS objects and default contents


sl_iperf_test_init#

void sl_iperf_test_init (sl_iperf_test_t *const test, sl_iperf_mode_t mode, sl_iperf_protocol_t protocol)

Initialize the iPerf test.

Parameters
TypeDirectionArgument NameDescription
sl_iperf_test_t *const[inout]test

Test descriptor

sl_iperf_mode_t[in]mode

Mode

sl_iperf_protocol_t[in]protocol

Protocol

Initialize a test descriptor with default content


sl_iperf_test_set_default_logger#

void sl_iperf_test_set_default_logger (sl_iperf_test_t *const test)

Set the default internal logger for the test descriptor.

Parameters
TypeDirectionArgument NameDescription
sl_iperf_test_t *const[out]test

Test descriptor

Helper function


sl_iperf_test_set_default_buff#

void sl_iperf_test_set_default_buff (sl_iperf_test_t *const test)

Set the default internal test buffer.

Parameters
TypeDirectionArgument NameDescription
sl_iperf_test_t *const[out]test

Test descriptor

Helper function


sl_iperf_test_add#

bool sl_iperf_test_add (sl_iperf_test_t *const test)

Add the iPerf test to the execution queue.

Parameters
TypeDirectionArgument NameDescription
sl_iperf_test_t *const[in]test

Test descriptor

Add test to the input messagequeue. Returns

  • true On Success

  • false On Failure


sl_iperf_test_get#

bool sl_iperf_test_get (sl_iperf_test_t *const test, const uint32_t timeout_ms)

Get the iPerf test from the result queue.

Parameters
TypeDirectionArgument NameDescription
sl_iperf_test_t *const[out]test

Destination test descriptor

const uint32_t[in]timeout_ms

Timeout for getting test from messagequeue

Get the test from the output messagequeue. Returns

  • true On Success

  • false On Failure


sl_iperf_test_udp_client#

void sl_iperf_test_udp_client (sl_iperf_test_t * test)

Execute the iPerf UDP client test.

Parameters
TypeDirectionArgument NameDescription
sl_iperf_test_t *[inout]test

Test descriptor

iPerf UDP client test.


sl_iperf_test_udp_server#

void sl_iperf_test_udp_server (sl_iperf_test_t * test)

Execute the iPerf UDP server test.

Parameters
TypeDirectionArgument NameDescription
sl_iperf_test_t *[inout]test

Test descriptor

iPerf UDP server test.