Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Data Structures

struct  zperf_results
 Performance results. More...
 

Typedefs

typedef void(* zperf_callback) (enum zperf_status status, struct zperf_results *result, void *user_data)
 Zperf callback function used for asynchronous operations.
 

Functions

int zperf_udp_upload (const struct zperf_upload_params *param, struct zperf_results *result)
 Synchronous UDP upload operation.
 
int zperf_tcp_upload (const struct zperf_upload_params *param, struct zperf_results *result)
 Synchronous TCP upload operation.
 
int zperf_udp_upload_async (const struct zperf_upload_params *param, zperf_callback callback, void *user_data)
 Asynchronous UDP upload operation.
 
int zperf_tcp_upload_async (const struct zperf_upload_params *param, zperf_callback callback, void *user_data)
 Asynchronous TCP upload operation.
 
int zperf_udp_download (const struct zperf_download_params *param, zperf_callback callback, void *user_data)
 Start UDP server.
 
int zperf_tcp_download (const struct zperf_download_params *param, zperf_callback callback, void *user_data)
 Start TCP server.
 
int zperf_udp_download_stop (void)
 Stop UDP server.
 
int zperf_tcp_download_stop (void)
 Stop TCP server.
 

Detailed Description

Since
3.3
Version
0.8.0

Typedef Documentation

◆ zperf_callback

typedef void(* zperf_callback) (enum zperf_status status, struct zperf_results *result, void *user_data)

#include <zephyr/net/zperf.h>

Zperf callback function used for asynchronous operations.

Parameters
statusSession status.
resultSession results. May be NULL for certain events.
user_dataA pointer to the user provided data.

Function Documentation

◆ zperf_tcp_download()

int zperf_tcp_download ( const struct zperf_download_params * param,
zperf_callback callback,
void * user_data )

#include <zephyr/net/zperf.h>

Start TCP server.

Note
Only one TCP server instance can run at a time.
Parameters
paramDownload parameters.
callbackSession results callback.
user_dataA pointer to the user data to be provided with the callback.
Returns
0 if server was started, a negative error code otherwise.

◆ zperf_tcp_download_stop()

int zperf_tcp_download_stop ( void )

#include <zephyr/net/zperf.h>

Stop TCP server.

Returns
0 if server was stopped successfully, a negative error code otherwise.

◆ zperf_tcp_upload()

int zperf_tcp_upload ( const struct zperf_upload_params * param,
struct zperf_results * result )

#include <zephyr/net/zperf.h>

Synchronous TCP upload operation.

The function blocks until the upload is complete.

Parameters
paramUpload parameters.
resultSession results.
Returns
0 if session completed successfully, a negative error code otherwise.

◆ zperf_tcp_upload_async()

int zperf_tcp_upload_async ( const struct zperf_upload_params * param,
zperf_callback callback,
void * user_data )

#include <zephyr/net/zperf.h>

Asynchronous TCP upload operation.

Note
Only one asynchronous upload can be performed at a time.
Parameters
paramUpload parameters.
callbackSession results callback.
user_dataA pointer to the user data to be provided with the callback.
Returns
0 if session was scheduled successfully, a negative error code otherwise.

◆ zperf_udp_download()

int zperf_udp_download ( const struct zperf_download_params * param,
zperf_callback callback,
void * user_data )

#include <zephyr/net/zperf.h>

Start UDP server.

Note
Only one UDP server instance can run at a time.
Parameters
paramDownload parameters.
callbackSession results callback.
user_dataA pointer to the user data to be provided with the callback.
Returns
0 if server was started, a negative error code otherwise.

◆ zperf_udp_download_stop()

int zperf_udp_download_stop ( void )

#include <zephyr/net/zperf.h>

Stop UDP server.

Returns
0 if server was stopped successfully, a negative error code otherwise.

◆ zperf_udp_upload()

int zperf_udp_upload ( const struct zperf_upload_params * param,
struct zperf_results * result )

#include <zephyr/net/zperf.h>

Synchronous UDP upload operation.

The function blocks until the upload is complete.

Parameters
paramUpload parameters.
resultSession results.
Returns
0 if session completed successfully, a negative error code otherwise.

◆ zperf_udp_upload_async()

int zperf_udp_upload_async ( const struct zperf_upload_params * param,
zperf_callback callback,
void * user_data )

#include <zephyr/net/zperf.h>

Asynchronous UDP upload operation.

Note
Only one asynchronous upload can be performed at a time.
Parameters
paramUpload parameters.
callbackSession results callback.
user_dataA pointer to the user data to be provided with the callback.
Returns
0 if session was scheduled successfully, a negative error code otherwise.