ReactOS 0.4.16-dev-297-gc569aee
lwiperf.h File Reference
#include "lwip/opt.h"
#include "lwip/ip_addr.h"
Include dependency graph for lwiperf.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LWIPERF_TCP_PORT_DEFAULT   5001
 

Typedefs

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)
 

Enumerations

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
}
 
enum  lwiperf_client_type { LWIPERF_CLIENT , LWIPERF_DUAL , LWIPERF_TRADEOFF }
 

Functions

voidlwiperf_start_tcp_server (const ip_addr_t *local_addr, u16_t local_port, lwiperf_report_fn report_fn, void *report_arg)
 
voidlwiperf_start_tcp_server_default (lwiperf_report_fn report_fn, void *report_arg)
 
voidlwiperf_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)
 
voidlwiperf_start_tcp_client_default (const ip_addr_t *remote_addr, lwiperf_report_fn report_fn, void *report_arg)
 
void lwiperf_abort (void *lwiperf_session)
 

Detailed Description

lwIP iPerf server implementation

Definition in file lwiperf.h.

Macro Definition Documentation

◆ LWIPERF_TCP_PORT_DEFAULT

#define LWIPERF_TCP_PORT_DEFAULT   5001

Definition at line 47 of file lwiperf.h.

Typedef Documentation

◆ 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.

Parameters
argReport_arg from when the test was started.
report_typecontains the test result
local_addrThe local address from the session
local_portThe local port
remote_addrThe remote address from the session
remote_portThe remote port
bytes_transferredTotal transferred bytes
ms_durationTotal session duration, in milliseconds
bandwidth_kbitpsecAverage bandwidth during the session, in kbps

Definition at line 89 of file lwiperf.h.

Enumeration Type Documentation

◆ lwiperf_client_type

Control

Enumerator
LWIPERF_CLIENT 

Unidirectional tx only test

LWIPERF_DUAL 

Do a bidirectional test simultaneously

LWIPERF_TRADEOFF 

Do a bidirectional test individually

Definition at line 67 of file lwiperf.h.

68{
75};
@ LWIPERF_DUAL
Definition: lwiperf.h:72
@ LWIPERF_TRADEOFF
Definition: lwiperf.h:74
@ LWIPERF_CLIENT
Definition: lwiperf.h:70

◆ lwiperf_report_type

lwIPerf test results

Enumerator
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

Definition at line 50 of file lwiperf.h.

51{
64};
@ LWIPERF_TCP_ABORTED_LOCAL_TXERROR
Definition: lwiperf.h:61
@ LWIPERF_TCP_DONE_CLIENT
Definition: lwiperf.h:55
@ LWIPERF_TCP_DONE_SERVER
Definition: lwiperf.h:53
@ LWIPERF_TCP_ABORTED_LOCAL
Definition: lwiperf.h:57
@ LWIPERF_TCP_ABORTED_LOCAL_DATAERROR
Definition: lwiperf.h:59
@ LWIPERF_TCP_ABORTED_REMOTE
Definition: lwiperf.h:63

Function Documentation

◆ lwiperf_abort()

void lwiperf_abort ( void lwiperf_session)

◆ lwiperf_start_tcp_client()

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 
)

◆ lwiperf_start_tcp_client_default()

void * lwiperf_start_tcp_client_default ( const ip_addr_t remote_addr,
lwiperf_report_fn  report_fn,
void report_arg 
)

◆ lwiperf_start_tcp_server()

void * lwiperf_start_tcp_server ( const ip_addr_t local_addr,
u16_t  local_port,
lwiperf_report_fn  report_fn,
void report_arg 
)

◆ lwiperf_start_tcp_server_default()

void * lwiperf_start_tcp_server_default ( lwiperf_report_fn  report_fn,
void report_arg 
)

Referenced by lwip_fuzztest().