TuyaOS
宏定义 | 类型定义 | 枚举 | 函数
lwiperf.h 文件参考
#include "lwip/opt.h"
#include "lwip/ip_addr.h"
lwiperf.h 的引用(Include)关系图:

浏览源代码.

宏定义

#define LWIPERF_TCP_PORT_DEFAULT   5001
 

类型定义

typedef void(* lwiperf_report_fn) (void *arg, enum lwiperf_report_type report_type, const ip_addr_t *local_addr, u16_t local_port, const ip_addr_t *remote_addr, u16_t remote_port, u32_t bytes_transferred, u32_t ms_duration, u32_t bandwidth_kbitpsec)
 

枚举

enum  lwiperf_client_type { LWIPERF_CLIENT , LWIPERF_DUAL , LWIPERF_TRADEOFF }
 
enum  lwiperf_report_type {
  LWIPERF_TCP_DONE_SERVER , LWIPERF_TCP_DONE_CLIENT , LWIPERF_TCP_ABORTED_LOCAL , LWIPERF_TCP_ABORTED_LOCAL_DATAERROR ,
  LWIPERF_TCP_ABORTED_LOCAL_TXERROR , LWIPERF_TCP_ABORTED_REMOTE
}
 

函数

void lwiperf_abort (void *lwiperf_session)
 
void * lwiperf_start_tcp_client (const ip_addr_t *remote_addr, u16_t remote_port, enum lwiperf_client_type type, lwiperf_report_fn report_fn, void *report_arg)
 
void * lwiperf_start_tcp_client_default (const ip_addr_t *remote_addr, lwiperf_report_fn report_fn, void *report_arg)
 
void * lwiperf_start_tcp_server (const ip_addr_t *local_addr, u16_t local_port, lwiperf_report_fn report_fn, void *report_arg)
 
void * lwiperf_start_tcp_server_default (lwiperf_report_fn report_fn, void *report_arg)
 

详细描述

lwIP iPerf server implementation

类型定义说明

◆ lwiperf_report_fn

typedef void(* lwiperf_report_fn) (void *arg, enum lwiperf_report_type report_type, const ip_addr_t *local_addr, u16_t local_port, const ip_addr_t *remote_addr, u16_t remote_port, u32_t bytes_transferred, u32_t ms_duration, u32_t bandwidth_kbitpsec)

Prototype of a report function that is called when a session is finished. This report function can show the test results.

参数
report_typecontains the test result

枚举类型说明

◆ lwiperf_client_type

Control

枚举值
LWIPERF_CLIENT 

Unidirectional tx only test

LWIPERF_DUAL 

Do a bidirectional test simultaneously

LWIPERF_TRADEOFF 

Do a bidirectional test individually

◆ lwiperf_report_type

lwIPerf test results

枚举值
LWIPERF_TCP_DONE_SERVER 

The server side test is done

LWIPERF_TCP_DONE_CLIENT 

The client side test is done

LWIPERF_TCP_ABORTED_LOCAL 

Local error lead to test abort

LWIPERF_TCP_ABORTED_LOCAL_DATAERROR 

Data check error lead to test abort

LWIPERF_TCP_ABORTED_LOCAL_TXERROR 

Transmit error lead to test abort

LWIPERF_TCP_ABORTED_REMOTE 

Remote side aborted the test