sdk-core
v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Toggle main menu visibility
Loading...
Searching...
No Matches
lwiperf.h
Go to the documentation of this file.
1
6
7
/*
8
* Copyright (c) 2014 Simon Goldschmidt
9
* All rights reserved.
10
*
11
* Redistribution and use in source and binary forms, with or without modification,
12
* are permitted provided that the following conditions are met:
13
*
14
* 1. Redistributions of source code must retain the above copyright notice,
15
* this list of conditions and the following disclaimer.
16
* 2. Redistributions in binary form must reproduce the above copyright notice,
17
* this list of conditions and the following disclaimer in the documentation
18
* and/or other materials provided with the distribution.
19
* 3. The name of the author may not be used to endorse or promote products
20
* derived from this software without specific prior written permission.
21
*
22
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
23
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
25
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
27
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
30
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
31
* OF SUCH DAMAGE.
32
*
33
* This file is part of the lwIP TCP/IP stack.
34
*
35
* Author: Simon Goldschmidt
36
*
37
*/
38
#ifndef LWIP_HDR_APPS_LWIPERF_H
39
#define LWIP_HDR_APPS_LWIPERF_H
40
41
#include "
lwip/opt.h
"
42
#include "
lwip/ip_addr.h
"
43
44
#ifdef __cplusplus
45
extern
"C"
{
46
#endif
47
48
#define LWIPERF_TCP_PORT_DEFAULT 5001
49
51
enum
lwiperf_report_type
52
{
54
LWIPERF_TCP_DONE_SERVER
,
56
LWIPERF_TCP_DONE_CLIENT
,
58
LWIPERF_TCP_ABORTED_LOCAL
,
60
LWIPERF_TCP_ABORTED_LOCAL_DATAERROR
,
62
LWIPERF_TCP_ABORTED_LOCAL_TXERROR
,
64
LWIPERF_TCP_ABORTED_REMOTE
65
};
66
68
enum
lwiperf_client_type
69
{
71
LWIPERF_CLIENT
,
73
LWIPERF_DUAL
,
75
LWIPERF_TRADEOFF
76
};
77
90
typedef
void (*
lwiperf_report_fn
)(
void
*arg,
enum
lwiperf_report_type
report_type,
91
const
ip_addr_t* local_addr, u16_t local_port,
const
ip_addr_t* remote_addr, u16_t remote_port,
92
u32_t bytes_transferred, u32_t ms_duration, u32_t bandwidth_kbitpsec);
93
94
void
* lwiperf_start_tcp_server(
const
ip_addr_t* local_addr, u16_t local_port,
95
lwiperf_report_fn
report_fn,
void
* report_arg);
96
void
* lwiperf_start_tcp_server_default(
lwiperf_report_fn
report_fn,
void
* report_arg);
97
void
* lwiperf_start_tcp_client(
const
ip_addr_t* remote_addr, u16_t remote_port,
98
enum
lwiperf_client_type
type,
99
lwiperf_report_fn
report_fn,
void
* report_arg);
100
void
* lwiperf_start_tcp_client_default(
const
ip_addr_t* remote_addr,
101
lwiperf_report_fn
report_fn,
void
* report_arg);
102
103
void
lwiperf_abort(
void
* lwiperf_session);
104
105
106
#ifdef __cplusplus
107
}
108
#endif
109
110
#endif
/* LWIP_HDR_APPS_LWIPERF_H */
ip_addr.h
lwiperf_report_fn
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)
Definition
lwiperf.h:90
lwiperf_client_type
lwiperf_client_type
Definition
lwiperf.h:69
LWIPERF_DUAL
@ LWIPERF_DUAL
Definition
lwiperf.h:73
LWIPERF_TRADEOFF
@ LWIPERF_TRADEOFF
Definition
lwiperf.h:75
LWIPERF_CLIENT
@ LWIPERF_CLIENT
Definition
lwiperf.h:71
lwiperf_report_type
lwiperf_report_type
Definition
lwiperf.h:52
LWIPERF_TCP_ABORTED_LOCAL_TXERROR
@ LWIPERF_TCP_ABORTED_LOCAL_TXERROR
Definition
lwiperf.h:62
LWIPERF_TCP_DONE_CLIENT
@ LWIPERF_TCP_DONE_CLIENT
Definition
lwiperf.h:56
LWIPERF_TCP_DONE_SERVER
@ LWIPERF_TCP_DONE_SERVER
Definition
lwiperf.h:54
LWIPERF_TCP_ABORTED_LOCAL
@ LWIPERF_TCP_ABORTED_LOCAL
Definition
lwiperf.h:58
LWIPERF_TCP_ABORTED_LOCAL_DATAERROR
@ LWIPERF_TCP_ABORTED_LOCAL_DATAERROR
Definition
lwiperf.h:60
LWIPERF_TCP_ABORTED_REMOTE
@ LWIPERF_TCP_ABORTED_REMOTE
Definition
lwiperf.h:64
opt.h
core
ps2ip
include
lwip_include
lwip
apps
lwiperf.h
Generated by
1.18.0