19#ifndef ZEPHYR_INCLUDE_NET_ZPERF_H_
20#define ZEPHYR_INCLUDE_NET_ZPERF_H_
32 ZPERF_SESSION_STARTED,
33 ZPERF_SESSION_PERIODIC_RESULT,
34 ZPERF_SESSION_FINISHED,
49typedef int (*zperf_data_load_custom)(
void *user_ctx,
uint64_t offset,
52struct zperf_upload_params {
54 zperf_data_load_custom data_loader;
55 void *data_loader_ctx;
59 struct net_sockaddr_storage peer_addr_storage;
62 struct net_sockaddr peer_addr;
68 char if_name[NET_IFNAMSIZ];
73#ifdef CONFIG_ZPERF_SESSION_PER_THREAD
81struct zperf_download_params {
86 struct net_sockaddr_storage addr_storage;
89 struct net_sockaddr addr;
92 char if_name[NET_IFNAMSIZ];
95#ifdef CONFIG_NET_ZPERF_RAW_TX
111struct zperf_raw_upload_params {
245#ifdef CONFIG_NET_ZPERF_RAW_TX
255int zperf_raw_upload(
const struct zperf_raw_upload_params *param,
270int zperf_raw_upload_async(
const struct zperf_raw_upload_params *param,
int zperf_tcp_upload_async(const struct zperf_upload_params *param, zperf_callback callback, void *user_data)
Asynchronous TCP upload operation.
int zperf_tcp_upload(const struct zperf_upload_params *param, struct zperf_results *result)
Synchronous TCP upload operation.
int zperf_udp_download_stop(void)
Stop UDP server.
int zperf_udp_upload(const struct zperf_upload_params *param, struct zperf_results *result)
Synchronous UDP upload operation.
int zperf_tcp_download(const struct zperf_download_params *param, zperf_callback callback, void *user_data)
Start TCP server.
int zperf_udp_download(const struct zperf_download_params *param, zperf_callback callback, void *user_data)
Start UDP server.
int zperf_tcp_download_stop(void)
Stop TCP server.
int zperf_udp_upload_async(const struct zperf_upload_params *param, zperf_callback callback, void *user_data)
Asynchronous UDP upload operation.
void(* zperf_callback)(enum zperf_status status, struct zperf_results *result, void *user_data)
Zperf callback function used for asynchronous operations.
Definition zperf.h:145
BSD Sockets compatible API definitions.
IPv6 and IPv4 definitions.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Performance results.
Definition zperf.h:124
uint64_t total_len
Total length of the transferred data.
Definition zperf.h:129
uint64_t client_time_in_us
Client connection time in microseconds.
Definition zperf.h:132
uint32_t nb_packets_errors
Number of packet errors.
Definition zperf.h:134
uint32_t packet_size
Packet size.
Definition zperf.h:133
bool is_multicast
True if this session used IP multicast.
Definition zperf.h:135
uint32_t nb_packets_outorder
Number of packets out of order.
Definition zperf.h:128
uint64_t time_in_us
Total time of the transfer in microseconds.
Definition zperf.h:130
uint32_t nb_packets_lost
Number of packets lost.
Definition zperf.h:127
uint32_t nb_packets_rcvd
Number of packets received.
Definition zperf.h:126
uint32_t nb_packets_sent
Number of packets sent.
Definition zperf.h:125
uint32_t jitter_in_us
Jitter in microseconds.
Definition zperf.h:131