XFusion API v1.3.0
载入中...
搜索中...
未找到
xf_iperf.c 文件参考
#include <stdio.h>
#include <string.h>
#include <sys/param.h>
#include "lwip/err.h"
#include "lwip/sockets.h"
#include "lwip/sys.h"
#include "lwip/netdb.h"
#include "xf_utils.h"
#include "xf_netif.h"
#include "xf_osal.h"
#include "xf_sys.h"
#include "xf_iperf.h"
xf_iperf.c 的引用(Include)关系图:

浏览源代码.

宏定义

#define IPERF_HUNDRED   100
 
#define XF_ASSERT_RET_GOTO(condition, err_code, label, tag, format, ...)
 

函数

static bool iperf_is_udp_client (void)
 
static bool iperf_is_udp_server (void)
 
static bool iperf_is_tcp_client (void)
 
static bool iperf_is_tcp_server (void)
 
static int iperf_get_socket_error_code (int sockfd)
 
static int iperf_show_socket_error_reason (const char *str, int sockfd)
 
static void iperf_report_task (void *arg)
 
static xf_err_t iperf_start_report (void)
 
static void socket_recv (int recv_socket, struct sockaddr *listen_addr, uint8_t type)
 
static void socket_send (int send_socket, struct sockaddr *dest_addr, uint8_t type, int bw_lim)
 
static xf_err_t iperf_run_tcp_server (void)
 
static xf_err_t iperf_run_tcp_client (void)
 
static xf_err_t iperf_run_udp_server (void)
 
static xf_err_t iperf_run_udp_client (void)
 
static void iperf_task_traffic (void *arg)
 
static uint32_t iperf_get_buffer_len (void)
 
static uint32_t iperf_get_float_int (float in)
 
static uint32_t iperf_get_float_dec (float in)
 
xf_err_t xf_iperf_start (const xf_iperf_cfg_t *p_cfg, xf_iperf_cb_t cb_func, void *user_args)
 启动 iperf.
 
xf_err_t xf_iperf_stop (void)
 停止 iperf.
 
bool xf_iperf_is_running (void)
 检查 iperf 是否正在运行。
 

变量

static xf_iperf_ctx_t s_ctx
 
static const char * TAG = "iperf"
 

详细描述

作者
catcatBlue (catca.nosp@m.tblu.nosp@m.e@qq..nosp@m.com)
版本
1.0
日期
2024-09-26

Copyright (c) 2024, CorAL. All rights reserved.

在文件 xf_iperf.c 中定义.

宏定义说明

◆ IPERF_HUNDRED

#define IPERF_HUNDRED   100

在文件 xf_iperf.c41 行定义.

◆ XF_ASSERT_RET_GOTO

#define XF_ASSERT_RET_GOTO (   condition,
  err_code,
  label,
  tag,
  format,
  ... 
)
值:
do { \
ret = err_code; \
XF_ASSERT_GOTO(condition, label, tag, format, ##__VA_ARGS__); \
} while (0)

在文件 xf_iperf.c73 行定义.

函数说明

◆ iperf_is_udp_client()

static bool iperf_is_udp_client ( void  )
inlinestatic

在文件 xf_iperf.c147 行定义.

◆ iperf_is_udp_server()

static bool iperf_is_udp_server ( void  )
inlinestatic

在文件 xf_iperf.c153 行定义.

◆ iperf_is_tcp_client()

static bool iperf_is_tcp_client ( void  )
inlinestatic

在文件 xf_iperf.c159 行定义.

◆ iperf_is_tcp_server()

static bool iperf_is_tcp_server ( void  )
inlinestatic

在文件 xf_iperf.c165 行定义.

◆ iperf_get_socket_error_code()

static int iperf_get_socket_error_code ( int  sockfd)
static

在文件 xf_iperf.c171 行定义.

◆ iperf_show_socket_error_reason()

static int iperf_show_socket_error_reason ( const char *  str,
int  sockfd 
)
static

在文件 xf_iperf.c176 行定义.

◆ iperf_report_task()

static void iperf_report_task ( void *  arg)
static

在文件 xf_iperf.c187 行定义.

◆ iperf_start_report()

static xf_err_t iperf_start_report ( void  )
static

在文件 xf_iperf.c258 行定义.

◆ socket_recv()

static void socket_recv ( int  recv_socket,
struct sockaddr *  listen_addr,
uint8_t  type 
)
static

在文件 xf_iperf.c274 行定义.

◆ socket_send()

static void socket_send ( int  send_socket,
struct sockaddr *  dest_addr,
uint8_t  type,
int  bw_lim 
)
static

在文件 xf_iperf.c308 行定义.

◆ iperf_run_tcp_server()

static xf_err_t iperf_run_tcp_server ( void  )
static

在文件 xf_iperf.c375 行定义.

◆ iperf_run_tcp_client()

static xf_err_t iperf_run_tcp_client ( void  )
static

在文件 xf_iperf.c461 行定义.

◆ iperf_run_udp_server()

static xf_err_t iperf_run_udp_server ( void  )
static

在文件 xf_iperf.c512 行定义.

◆ iperf_run_udp_client()

static xf_err_t iperf_run_udp_client ( void  )
static

在文件 xf_iperf.c577 行定义.

◆ iperf_task_traffic()

static void iperf_task_traffic ( void *  arg)
static

在文件 xf_iperf.c628 行定义.

◆ iperf_get_buffer_len()

static uint32_t iperf_get_buffer_len ( void  )
static

在文件 xf_iperf.c649 行定义.

◆ iperf_get_float_int()

static uint32_t iperf_get_float_int ( float  in)
static

在文件 xf_iperf.c677 行定义.

◆ iperf_get_float_dec()

static uint32_t iperf_get_float_dec ( float  in)
static

在文件 xf_iperf.c682 行定义.

变量说明

◆ s_ctx

xf_iperf_ctx_t s_ctx
static

在文件 xf_iperf.c68 行定义.

◆ TAG

const char* TAG = "iperf"
static

在文件 xf_iperf.c69 行定义.